diff --git a/o2web/source/x_component_cms_Document/Main.js b/o2web/source/x_component_cms_Document/Main.js index c51e27c886f2989a894abfc86c279cadbe14bf31..4be814992be59aff2cefc240adcdb2710a08d917 100644 --- a/o2web/source/x_component_cms_Document/Main.js +++ b/o2web/source/x_component_cms_Document/Main.js @@ -366,6 +366,7 @@ MWF.xApplication.cms.Document.Main = new Class({ "autoSave" : this.options.autoSave, "saveOnClose" : this.options.saveOnClose, "onPostPublish" : this.options.postPublish, + "onAfterPublish" : this.options.afterPublish, "onPostDelete" : this.options.postDelete }); this.appForm.businessData = { diff --git a/o2web/source/x_component_cms_Index/Newer.js b/o2web/source/x_component_cms_Index/Newer.js index 0402dc9257d634d8de3e14c7423a860c07d1c57a..c0c4c95c364191acb229e52cef149033371bea6d 100644 --- a/o2web/source/x_component_cms_Index/Newer.js +++ b/o2web/source/x_component_cms_Index/Newer.js @@ -492,10 +492,13 @@ MWF.xApplication.cms.Index.Newer = new Class({ "documentId": id, "appId": appId, "onPostPublish" : function(){ + this.fireEvent( "postPublish" ); + }.bind(this), + "onAfterPublish" : function () { debugger; if(_self.view && _self.view.reload )_self.view.reload(); - this.fireEvent( "postPublish" ); - }.bind(this) + _self.fireEvent( "afterPublish" ); + } }; if( typeOf(this.options.autoSave) == "boolean" )options.autoSave = this.options.autoSave; if( typeOf(this.options.saveOnClose) == "boolean" )options.saveOnClose = this.options.saveOnClose; diff --git a/o2web/source/x_component_cms_Module/Main.js b/o2web/source/x_component_cms_Module/Main.js index 665554e0f022e756ad66d3f829b7df2bcd20849b..4a2f8771382deb7898fa1fa6ccdd2cfa5685088d 100644 --- a/o2web/source/x_component_cms_Module/Main.js +++ b/o2web/source/x_component_cms_Module/Main.js @@ -226,16 +226,15 @@ MWF.xApplication.cms.Module.Main = new Class({ //if(this.options.columnData.ignoreTitle===undefined) this.options.columnData.ignoreTitle = false; this.creater = new MWF.xApplication.cms.Index.Newer( this.options.columnData, null, this, this.view, { - restrictToColumn : true, - onPostPublish : function () { - debugger; - try{ - if(this.view && this.view.reload){ - this.view.reload(); - } - }catch (e) { - } - }.bind(this) + restrictToColumn : true + // onAfterPublish : function () { + // try{ + // if(this.view && this.view.reload){ + // this.view.reload(); + // } + // }catch (e) { + // } + // }.bind(this) //ignoreTitle : this.options.columnData.ignoreTitle, //latest : this.options.columnData.latest }); diff --git a/o2web/source/x_component_cms_Xform/Form.js b/o2web/source/x_component_cms_Xform/Form.js index 6ff749aaf76724d658c00b46b782c3831a3914c4..5a5a8ac09b9b052316b826aa5b69c546c63f24c7 100644 --- a/o2web/source/x_component_cms_Xform/Form.js +++ b/o2web/source/x_component_cms_Xform/Form.js @@ -457,6 +457,7 @@ MWF.xApplication.cms.Xform.Form = MWF.CMSForm = new Class({ delete documentData.attachmentList; //this.documentAction.saveDocument(documentData, function(){ this.fireEvent("postPublish", [documentData]); + if (this.app) if (this.app.fireEvent) this.app.fireEvent("postPublish",[documentData]); if (this.officeList) { this.officeList.each(function (module) { module.save(history); @@ -465,6 +466,7 @@ MWF.xApplication.cms.Xform.Form = MWF.CMSForm = new Class({ this.documentAction.publishDocumentComplex(documentData, function (json) { this.businessData.data.isNew = false; this.fireEvent("afterPublish"); + if (this.app) if (this.app.fireEvent) this.app.fireEvent("afterPublish"); if (callback) callback(); if (this.app.mobile) { this.app.content.unmask();