Changeset 1845091
- Timestamp:
- 03/22/2018 02:02:32 PM (8 years ago)
- Location:
- playbuzz/trunk/js/story-creator
- Files:
-
- 2 edited
-
pb-story-creator-controller.js (modified) (1 diff)
-
pb-story-creator-model.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
playbuzz/trunk/js/story-creator/pb-story-creator-controller.js
r1845084 r1845091 46 46 47 47 //_this.model.savePost(sender.wp).then(_this.postSuccessHandler.bind(_this), _this.errorHandler.bind(_this)); 48 _this.model.previewPost(sender.wp).then(_this. postSuccessHandler.bind(_this), _this.errorHandler.bind(_this));48 _this.model.previewPost(sender.wp).then(_this.refreshCreator.bind(_this), _this.errorHandler.bind(_this)); 49 49 50 50 }); -
playbuzz/trunk/js/story-creator/pb-story-creator-model.js
r1845084 r1845091 45 45 * 3. perform given action (save/ publish) via wordpress 46 46 * @param action 47 * @param actionOnWP47 * @param wpOriginalElement 48 48 * @returns {Promise} 49 49 */ 50 PbStoryCreatorModel.prototype.performAction = function (action, actionOnWP, paramsToAction) {50 PbStoryCreatorModel.prototype.performAction = function (action, wpOriginalElement, paramsToAction) { 51 51 52 52 var _this = this; … … 71 71 .then(function (res) { 72 72 73 actionOnWP.click();73 wpOriginalElement.click(); 74 74 deferred.resolve(res); 75 75 }) … … 107 107 PbStoryCreatorModel.prototype.savePost = function (saveButton) { 108 108 109 return this.performAction(this.pbCreator. save, saveButton);109 return this.performAction(this.pbCreator.publish, saveButton); 110 110 111 111 }; … … 120 120 var redirect = true; 121 121 122 return this.performAction(this.pbCreator. save, previewButton, redirect);122 return this.performAction(this.pbCreator.publish , previewButton, redirect); 123 123 124 124 };
Note: See TracChangeset
for help on using the changeset viewer.