diff --git a/assets/js/src/newsletter_editor/App.js b/assets/js/src/newsletter_editor/App.js index 871e527d9c..2edefba6df 100644 --- a/assets/js/src/newsletter_editor/App.js +++ b/assets/js/src/newsletter_editor/App.js @@ -33,7 +33,7 @@ var EditorApplication = Marionette.Application.extend({ onStart: function onStart() { this._appView = new AppView(); this.showView(this._appView); - this.listenTo(this.getChannel(), 'settingsShowed', this.setShowedSettingsId); + this.listenTo(this.getChannel(), 'settingsDisplayed', this.setDisplayedSettingsId); }, getChannel: function getChannel(channel) { @@ -43,12 +43,12 @@ var EditorApplication = Marionette.Application.extend({ return Radio.channel(channel); }, - getShowedSettingsId: function getShowedSettingsId() { - return this.showedSettingsId; + getDisplayedSettingsId: function getDisplayedSettingsId() { + return this.displayedSettingsId; }, - setShowedSettingsId: function setShowedSettingsId(id) { - this.showedSettingsId = id; + setDisplayedSettingsId: function setDisplayedSettingsId(id) { + this.displayedSettingsId = id; }, }); diff --git a/assets/js/src/newsletter_editor/behaviors/HighlightEditingBehavior.js b/assets/js/src/newsletter_editor/behaviors/HighlightEditingBehavior.js index e270d98e14..eb383dbf1a 100644 --- a/assets/js/src/newsletter_editor/behaviors/HighlightEditingBehavior.js +++ b/assets/js/src/newsletter_editor/behaviors/HighlightEditingBehavior.js @@ -26,7 +26,7 @@ BL.HighlightEditingBehavior = Marionette.Behavior.extend({ return; } // Ignore mouse events when settings panel is showed - if (App.getShowedSettingsId()) { + if (App.getDisplayedSettingsId()) { return; } this.view.addHighlight(); @@ -55,7 +55,7 @@ BL.HighlightEditingBehavior = Marionette.Behavior.extend({ }, onStopResizing: function onStopResizing(event) { this.isFocusedByPointer = isEventInsideElement(event, this.view.$el); - if (!App.getShowedSettingsId()) { + if (!App.getDisplayedSettingsId()) { this.onStopEditing(); } this.view.triggerMethod('resizeStop', event); diff --git a/assets/js/src/newsletter_editor/behaviors/TextEditorBehavior.js b/assets/js/src/newsletter_editor/behaviors/TextEditorBehavior.js index 2af7a2457b..b812fbdbf8 100644 --- a/assets/js/src/newsletter_editor/behaviors/TextEditorBehavior.js +++ b/assets/js/src/newsletter_editor/behaviors/TextEditorBehavior.js @@ -71,7 +71,7 @@ BL.TextEditorBehavior = Marionette.Behavior.extend({ }); editor.on('click', function onClick(e) { - if (App.getShowedSettingsId()) { + if (App.getDisplayedSettingsId()) { App.getChannel().trigger('hideSettings'); } // if caret not in editor, place it there (triggers focus on editor) diff --git a/assets/js/src/newsletter_editor/blocks/base.js b/assets/js/src/newsletter_editor/blocks/base.js index d3cec496b3..290b1f1d06 100644 --- a/assets/js/src/newsletter_editor/blocks/base.js +++ b/assets/js/src/newsletter_editor/blocks/base.js @@ -226,15 +226,15 @@ Module.BlockToolsView = AugmentedView.extend({ }, changeSettings: function changeSettings(options) { var ViewType = this.getSettingsView(); - var showedSettingsId = App.getShowedSettingsId(); - if (showedSettingsId) { - if (showedSettingsId === this.model.cid) { + var displayedSettingsId = App.getDisplayedSettingsId(); + if (displayedSettingsId) { + if (displayedSettingsId === this.model.cid) { return; } App.getChannel().trigger('hideSettings'); return; } - App.getChannel().trigger('settingsShowed', this.model.cid); + App.getChannel().trigger('settingsDisplayed', this.model.cid); (new ViewType(_.extend({ model: this.model }, options || {}))).render(); }, showDeletionConfirmation: function showDeletionConfirmation() { @@ -326,7 +326,7 @@ Module.BlockSettingsView = Marionette.View.extend({ onBeforeDestroy: function onBeforeDestroy() { MailPoet.Modal.close(); this.model.trigger('stopEditing'); - App.getChannel().trigger('settingsShowed', null); + App.getChannel().trigger('settingsDisplayed', null); }, });