提交 5ddf1644 编写于 作者: U unknown

修复内容管理文档发布以后,栏目列表界面不刷新的问题

上级 da3e8650
......@@ -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 = {
......
......@@ -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;
......
......@@ -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
});
......
......@@ -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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册