Remove no longer needed highlighting behaviour
[MAILPOET-1708]
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
/**
|
||||
* Highlight Container Behavior
|
||||
*
|
||||
* Highlights a container block when hovering over its tools
|
||||
*/
|
||||
define([
|
||||
'backbone.marionette',
|
||||
'newsletter_editor/behaviors/BehaviorsLookup'
|
||||
], function (Marionette, BehaviorsLookup) { // eslint-disable-line func-names
|
||||
var BL = BehaviorsLookup;
|
||||
|
||||
BL.HighlightContainerBehavior = Marionette.Behavior.extend({
|
||||
events: {
|
||||
'mouseenter @ui.tools': 'enableHighlight',
|
||||
'mouseleave @ui.tools': 'disableHighlight'
|
||||
},
|
||||
enableHighlight: function () { // eslint-disable-line func-names
|
||||
this.$el.addClass('mailpoet_highlight');
|
||||
},
|
||||
disableHighlight: function () { // eslint-disable-line func-names
|
||||
if (!this.view._isBeingEdited) {
|
||||
this.$el.removeClass('mailpoet_highlight');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
@@ -1,26 +0,0 @@
|
||||
/**
|
||||
* Highlight Editing Behavior
|
||||
*
|
||||
* Highlights a block that is being edited
|
||||
*/
|
||||
define([
|
||||
'backbone.marionette',
|
||||
'newsletter_editor/behaviors/BehaviorsLookup'
|
||||
], function (Marionette, BehaviorsLookup) { // eslint-disable-line func-names
|
||||
var BL = BehaviorsLookup;
|
||||
|
||||
BL.HighlightEditingBehavior = Marionette.Behavior.extend({
|
||||
modelEvents: {
|
||||
startEditing: 'enableHighlight',
|
||||
stopEditing: 'disableHighlight'
|
||||
},
|
||||
enableHighlight: function () { // eslint-disable-line func-names
|
||||
this.view._isBeingEdited = true;
|
||||
this.$el.addClass('mailpoet_highlight');
|
||||
},
|
||||
disableHighlight: function () { // eslint-disable-line func-names
|
||||
this.view._isBeingEdited = false;
|
||||
this.$el.removeClass('mailpoet_highlight');
|
||||
}
|
||||
});
|
||||
});
|
@@ -90,8 +90,7 @@ define([
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
},
|
||||
HighlightEditingBehavior: {}
|
||||
}
|
||||
},
|
||||
templateContext: function templateContext() {
|
||||
return {
|
||||
|
@@ -146,8 +146,7 @@ define([
|
||||
// for root and column containers.
|
||||
return view.renderOptions.depth === 1;
|
||||
}
|
||||
},
|
||||
HighlightContainerBehavior: {}
|
||||
}
|
||||
}),
|
||||
onDragSubstituteBy: function () {
|
||||
// For two and three column layouts display their respective widgets,
|
||||
|
@@ -26,8 +26,6 @@ import 'newsletter_editor/behaviors/BehaviorsLookup.js'; // side effect - assing
|
||||
import 'newsletter_editor/behaviors/ColorPickerBehavior.js'; // side effect - assigns to BehaviorsLookup
|
||||
import 'newsletter_editor/behaviors/ContainerDropZoneBehavior.js'; // side effect - assigns to BehaviorsLookup
|
||||
import 'newsletter_editor/behaviors/DraggableBehavior.js'; // side effect - assigns to BehaviorsLookup
|
||||
import 'newsletter_editor/behaviors/HighlightContainerBehavior.js'; // side effect - assigns to BehaviorsLookup
|
||||
import 'newsletter_editor/behaviors/HighlightEditingBehavior.js'; // side effect - assigns to BehaviorsLookup
|
||||
import 'newsletter_editor/behaviors/MediaManagerBehavior.js'; // side effect - assigns to BehaviorsLookup
|
||||
import 'newsletter_editor/behaviors/ResizableBehavior.js'; // side effect - assigns to BehaviorsLookup
|
||||
import 'newsletter_editor/behaviors/SortableBehavior.js'; // side effect - assigns to BehaviorsLookup
|
||||
|
Reference in New Issue
Block a user