Remove obsolete comments, fix ALC settings

This commit is contained in:
Tautvidas Sipavičius
2017-04-13 15:24:08 +03:00
parent 477e2737b1
commit 5efe611b2d
3 changed files with 3 additions and 39 deletions

View File

@@ -261,9 +261,9 @@ define([
var PostSelectionSettingsView = Marionette.CompositeView.extend({ var PostSelectionSettingsView = Marionette.CompositeView.extend({
getTemplate: function() { return templates.postSelectionPostsBlockSettings; }, getTemplate: function() { return templates.postSelectionPostsBlockSettings; },
getChildView: function() { return SinglePostSelectionSettingsView; }, childView: function() { return SinglePostSelectionSettingsView; },
childViewContainer: '.mailpoet_post_selection_container', childViewContainer: '.mailpoet_post_selection_container',
getEmptyView: function() { return EmptyPostSelectionSettingsView; }, emptyView: function() { return EmptyPostSelectionSettingsView; },
childViewOptions: function() { childViewOptions: function() {
return { return {
blockModel: this.model, blockModel: this.model,

View File

@@ -148,18 +148,9 @@ define([
ShowSettingsBehavior: {}, ShowSettingsBehavior: {},
}, },
onDragSubstituteBy: function() { return Module.SocialWidgetView; }, onDragSubstituteBy: function() { return Module.SocialWidgetView; },
//constructor: function() {
//// Set the block collection to be handled by this view as well
//arguments[0].collection = arguments[0].model.get('icons');
//Marionette.CompositeView.apply(this, arguments);
//},
initialize: function() { initialize: function() {
this.on('showSettings', this.showSettings, this); this.on('showSettings', this.showSettings, this);
//this.on('dom:refresh', this.showBlock, this);
//this._isFirstRender = true;
}, },
// Determines which view type should be used for a child
//childView: SocialIconView,
templateContext: function() { templateContext: function() {
return { return {
model: this.model.toJSON(), model: this.model.toJSON(),
@@ -167,16 +158,12 @@ define([
}; };
}, },
onRender: function() { onRender: function() {
//this._rebuildRegions();
this.toolsView = new Module.SocialBlockToolsView({ model: this.model }); this.toolsView = new Module.SocialBlockToolsView({ model: this.model });
this.showChildView('toolsRegion', this.toolsView); this.showChildView('toolsRegion', this.toolsView);
this.showChildView('icons', new Module.SocialIconCollectionView({ this.showChildView('icons', new Module.SocialIconCollectionView({
collection: this.model.get('icons') collection: this.model.get('icons')
})) }))
}, },
//onBeforeDestroy: function() {
//this.regionManager.destroy();
//},
showTools: function(_event) { showTools: function(_event) {
this.$(this.ui.tools).addClass('mailpoet_display_tools'); this.$(this.ui.tools).addClass('mailpoet_display_tools');
_event.stopPropagation(); _event.stopPropagation();
@@ -193,29 +180,6 @@ define([
return this.model.clone(); return this.model.clone();
}.bind(this); }.bind(this);
}, },
//_buildRegions: function(regions) {
//var that = this;
//var defaults = {
//regionClass: this.getOption('regionClass'),
//parentEl: function() { return that.$el; }
//};
//return this.regionManager.addRegions(regions, defaults);
//},
//_rebuildRegions: function() {
//if (this.regionManager === undefined) {
//this.regionManager = new Marionette.RegionManager();
//}
//this.regionManager.destroy();
//_.extend(this, this._buildRegions(this.regions));
//},
//showBlock: function() {
//if (this._isFirstRender) {
//this.transitionIn();
//this._isFirstRender = false;
//}
//},
deleteBlock: function() { deleteBlock: function() {
this.transitionOut().done(function() { this.transitionOut().done(function() {
this.model.destroy(); this.model.destroy();

View File

@@ -15,7 +15,7 @@
<div class="mailpoet_form_field"> <div class="mailpoet_form_field">
<div class="mailpoet_form_field_select_option"> <div class="mailpoet_form_field_select_option">
<select class="mailpoet_select mailpoet_automated_latest_content_categories_and_tags" multiple="multiple"> <select class="mailpoet_select mailpoet_automated_latest_content_categories_and_tags" multiple="multiple">
{{#each terms}} {{#each model.terms}}
<option value="{{ id }}" selected="selected">{{ text }}</option> <option value="{{ id }}" selected="selected">{{ text }}</option>
{{/each}} {{/each}}
</select> </select>