From d27eed4e15e1bb3c421fbb549fd65744250f7e40 Mon Sep 17 00:00:00 2001 From: Sam Georges Date: Sat, 20 Sep 2014 13:25:09 +1000 Subject: [PATCH] Bug fix --- .../formwidgets/richeditor/assets/js/plugin.figure.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/backend/formwidgets/richeditor/assets/js/plugin.figure.js b/modules/backend/formwidgets/richeditor/assets/js/plugin.figure.js index 30158e7e0..35e3ac30d 100644 --- a/modules/backend/formwidgets/richeditor/assets/js/plugin.figure.js +++ b/modules/backend/formwidgets/richeditor/assets/js/plugin.figure.js @@ -77,8 +77,8 @@ showToolbar: function (event) { var $figure = $(event.currentTarget), - $toolbar = this.getToolbar(type).data('figure', $figure).prependTo($figure), - type = $figure.data('type') || 'default' + type = $figure.data('type') || 'default', + $toolbar = this.getToolbar(type).data('figure', $figure).prependTo($figure) if (this.redactor[type] && this.redactor[type].onShow) { this.redactor[type].onShow($figure, $toolbar) @@ -154,9 +154,8 @@ getToolbar: function (type) { - if (this.toolbar[type]) { + if (this.toolbar[type]) return this.toolbar[type] - } var controlGroup = (this.redactor[type] && this.redactor[type].controlGroup) || this.controlGroup, controls = $.extend({}, this.control, (this.redactor[type] && this.redactor[type].control) || {}),