Implement Becs' changes to Posts widget and post rendering
This commit is contained in:
@@ -214,6 +214,7 @@ define([
|
||||
this.model.set(field, value);
|
||||
},
|
||||
onBeforeDestroy: function() {
|
||||
console.log('Calling close');
|
||||
MailPoet.Modal.close();
|
||||
},
|
||||
});
|
||||
|
@@ -241,6 +241,7 @@ define([
|
||||
insertPosts: function() {
|
||||
this.model.trigger('insertSelectedPosts');
|
||||
this.model.destroy();
|
||||
this.close();
|
||||
},
|
||||
});
|
||||
|
||||
@@ -332,11 +333,6 @@ define([
|
||||
},
|
||||
}).trigger( 'change' );
|
||||
},
|
||||
onBeforeDestroy: function() {
|
||||
base.BlockSettingsView.prototype.onBeforeDestroy.apply(this, arguments);
|
||||
// Force close select2 if it hasn't closed yet
|
||||
this.$('.mailpoet_posts_categories_and_tags').select2('close');
|
||||
},
|
||||
changeField: function(field, event) {
|
||||
this.model.set(field, jQuery(event.target).val());
|
||||
},
|
||||
|
@@ -56,7 +56,7 @@ define([
|
||||
};
|
||||
|
||||
Module.getTransformedPosts = function(options) {
|
||||
return Module._cachedQuery({
|
||||
return Module._query({
|
||||
action: 'getTransformedPosts',
|
||||
options: options,
|
||||
});
|
||||
|
Reference in New Issue
Block a user