Fix Select2 placeholder in Posts settings
This commit is contained in:
@ -216,8 +216,8 @@ define([
|
|||||||
var that = this,
|
var that = this,
|
||||||
blockView = this.model.request('blockView');
|
blockView = this.model.request('blockView');
|
||||||
|
|
||||||
this.selectionRegion.show(this.selectionView);
|
this.showChildView('selectionRegion', this.selectionView);
|
||||||
this.displayOptionsRegion.show(this.displayOptionsView);
|
this.showChildView('displayOptionsRegion', this.displayOptionsView);
|
||||||
|
|
||||||
MailPoet.Modal.panel({
|
MailPoet.Modal.panel({
|
||||||
element: this.$el,
|
element: this.$el,
|
||||||
@ -230,6 +230,9 @@ define([
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Inform child views that they have been attached to document
|
||||||
|
this.selectionView.triggerMethod('attach');
|
||||||
|
this.displayOptionsView.triggerMethod('attach');
|
||||||
},
|
},
|
||||||
switchToDisplayOptions: function() {
|
switchToDisplayOptions: function() {
|
||||||
// Switch content view
|
// Switch content view
|
||||||
@ -279,10 +282,14 @@ define([
|
|||||||
Marionette.CompositeView.apply(this, arguments);
|
Marionette.CompositeView.apply(this, arguments);
|
||||||
},
|
},
|
||||||
onRender: function() {
|
onRender: function() {
|
||||||
|
// Dynamically update available post types
|
||||||
|
CommunicationComponent.getPostTypes().done(_.bind(this._updateContentTypes, this));
|
||||||
|
},
|
||||||
|
onAttach: function() {
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
||||||
// Dynamically update available post types
|
// Dynamically update available post types
|
||||||
CommunicationComponent.getPostTypes().done(_.bind(this._updateContentTypes, this));
|
//CommunicationComponent.getPostTypes().done(_.bind(this._updateContentTypes, this));
|
||||||
|
|
||||||
this.$('.mailpoet_posts_categories_and_tags').select2({
|
this.$('.mailpoet_posts_categories_and_tags').select2({
|
||||||
multiple: true,
|
multiple: true,
|
||||||
|
@ -42,6 +42,7 @@ global.interact = function () {
|
|||||||
on: global.interact,
|
on: global.interact,
|
||||||
dropzone: global.interact,
|
dropzone: global.interact,
|
||||||
preventDefault: global.interact,
|
preventDefault: global.interact,
|
||||||
|
actionChecker: global.interact,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user