فهرست منبع

脚本API createDocument 添加参数 afterLoad

unknown 5 سال پیش
والد
کامیت
c335063b3b
2فایلهای تغییر یافته به همراه6 افزوده شده و 6 حذف شده
  1. 4 4
      o2web/source/x_component_cms_Index/Newer.js
  2. 2 2
      o2web/source/x_component_cms_Xform/Form.js

+ 4 - 4
o2web/source/x_component_cms_Index/Newer.js

@@ -491,13 +491,13 @@ MWF.xApplication.cms.Index.Newer = new Class({
                 "readonly" :false,
                 "readonly" :false,
                 "documentId": id,
                 "documentId": id,
                 "appId": appId,
                 "appId": appId,
-                "onPostPublish" : function(){
-                    this.fireEvent( "postPublish" );
+                "onPostPublish" : function( args ){
+                    this.fireEvent( "postPublish", args );
                 }.bind(this),
                 }.bind(this),
-                "onAfterPublish" : function () {
+                "onAfterPublish" : function ( args ) {
                     debugger;
                     debugger;
                     if(_self.view && _self.view.reload )_self.view.reload();
                     if(_self.view && _self.view.reload )_self.view.reload();
-                    _self.fireEvent( "afterPublish" );
+                    _self.fireEvent( "afterPublish", args );
                 }
                 }
             };
             };
             if( typeOf(this.options.autoSave) == "boolean" )options.autoSave = this.options.autoSave;
             if( typeOf(this.options.autoSave) == "boolean" )options.autoSave = this.options.autoSave;

+ 2 - 2
o2web/source/x_component_cms_Xform/Form.js

@@ -465,8 +465,8 @@ MWF.xApplication.cms.Xform.Form = MWF.CMSForm = new Class({
         }
         }
         this.documentAction.publishDocumentComplex(documentData, function (json) {
         this.documentAction.publishDocumentComplex(documentData, function (json) {
             this.businessData.data.isNew = false;
             this.businessData.data.isNew = false;
-            this.fireEvent("afterPublish");
-            if (this.app) if (this.app.fireEvent) this.app.fireEvent("afterPublish");
+            this.fireEvent("afterPublish", [this, json.data]);
+            if (this.app) if (this.app.fireEvent) this.app.fireEvent("afterPublish",[this, json.data]);
             if (callback) callback();
             if (callback) callback();
             if (this.app.mobile) {
             if (this.app.mobile) {
                 this.app.content.unmask();
                 this.app.content.unmask();