Jelajahi Sumber

提交自定义

unknown 5 tahun lalu
induk
melakukan
f26eded37b
1 mengubah file dengan 24 tambahan dan 18 penghapusan
  1. 24 18
      o2web/source/x_component_process_Xform/Form.js

+ 24 - 18
o2web/source/x_component_process_Xform/Form.js

@@ -230,19 +230,19 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
         }
         }
         var stylesUrl = "/x_component_process_FormDesigner/Module/Form/skin/" + this.json.styleConfig.extendFile;
         var stylesUrl = "/x_component_process_FormDesigner/Module/Form/skin/" + this.json.styleConfig.extendFile;
         MWF.getJSON(stylesUrl, {
         MWF.getJSON(stylesUrl, {
-            "onSuccess": function (responseJSON) {
-                if (responseJSON && responseJSON.form) {
-                    this.json = Object.merge(this.json, responseJSON.form);
-                }
-                if (callback) callback();
-            }.bind(this),
-            "onRequestFailure": function () {
-                if (callback) callback();
-            }.bind(this),
-            "onError": function () {
-                if (callback) callback();
-            }.bind(this)
-        }
+                "onSuccess": function (responseJSON) {
+                    if (responseJSON && responseJSON.form) {
+                        this.json = Object.merge(this.json, responseJSON.form);
+                    }
+                    if (callback) callback();
+                }.bind(this),
+                "onRequestFailure": function () {
+                    if (callback) callback();
+                }.bind(this),
+                "onError": function () {
+                    if (callback) callback();
+                }.bind(this)
+            }
         );
         );
     },
     },
     loadMacro: function (callback) {
     loadMacro: function (callback) {
@@ -1713,6 +1713,7 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
 
 
     },
     },
     processWork_pc: function(){
     processWork_pc: function(){
+        var _self = this;
         this.fireEvent("beforeProcessWork");
         this.fireEvent("beforeProcessWork");
         if (this.app && this.app.fireEvent) this.app.fireEvent("beforeProcessWork");
         if (this.app && this.app.fireEvent) this.app.fireEvent("beforeProcessWork");
 
 
@@ -1743,15 +1744,18 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
             });
             });
             var s = dlg.setContentSize();
             var s = dlg.setContentSize();
             if (dlg.content.getStyle("overflow-y") === "auto" && dlg.content.getStyle("overflow-x") !== "auto") {
             if (dlg.content.getStyle("overflow-y") === "auto" && dlg.content.getStyle("overflow-x") !== "auto") {
-                dlg.node.setStyle("width", dlg.node.getStyle("width").toInt() + 20 + "px");
-                dlg.content.setStyle("width", dlg.content.getStyle("width").toInt() + 20 + "px");
+                var paddingRight = (dlg.content.getStyle("padding-right").toInt() || 0 );
+                if( paddingRight < 20 ){
+                    dlg.node.setStyle("width", dlg.node.getStyle("width").toInt() + 20 + "px");
+                    dlg.content.setStyle("width", dlg.content.getStyle("width").toInt() + 20 + "px");
+                }
             }
             }
             if (!notRecenter) dlg.reCenter();
             if (!notRecenter) dlg.reCenter();
         }
         }
 
 
         //var node = new Element("div", {"styles": this.css.rollbackAreaNode});
         //var node = new Element("div", {"styles": this.css.rollbackAreaNode});
         var processNode = new Element("div", { "styles": this.app.css.processNode_Area }).inject(this.node);
         var processNode = new Element("div", { "styles": this.app.css.processNode_Area }).inject(this.node);
-        this.setProcessNode(processNode, "process", function () {
+        this.setProcessNode(processNode, "process", function ( processor ){
             this.processDlg = o2.DL.open({
             this.processDlg = o2.DL.open({
                 "title": this.app.lp.process,
                 "title": this.app.lp.process,
                 "style": this.json.dialogStyle || "user",
                 "style": this.json.dialogStyle || "user",
@@ -1782,6 +1786,7 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
                     }
                     }
                 ],
                 ],
                 "onPostLoad": function () {
                 "onPostLoad": function () {
+                    processor.options.mediaNode = this.content;
                     setSize.call(this)
                     setSize.call(this)
                 }
                 }
             });
             });
@@ -1889,14 +1894,15 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
             if (layout.mobile) {
             if (layout.mobile) {
                 innerNode = new Element("div").inject(processNode);
                 innerNode = new Element("div").inject(processNode);
             }
             }
+
             this.processor = new MWF.xApplication.process.Work.Processor(innerNode || processNode, this.businessData.task, {
             this.processor = new MWF.xApplication.process.Work.Processor(innerNode || processNode, this.businessData.task, {
                 "style": (layout.mobile) ? "mobile" : (style || "default"),
                 "style": (layout.mobile) ? "mobile" : (style || "default"),
                 "opinion": op.opinion,
                 "opinion": op.opinion,
                 "tabletWidth": this.json.tabletWidth || 0,
                 "tabletWidth": this.json.tabletWidth || 0,
                 "tabletHeight": this.json.tabletHeight || 0,
                 "tabletHeight": this.json.tabletHeight || 0,
                 "onPostLoad": function () {
                 "onPostLoad": function () {
-                    if (postLoadFun) postLoadFun();
-                }.bind(this),
+                    if (postLoadFun) postLoadFun( this );
+                },
                 "onResize": function () {
                 "onResize": function () {
                     if (resizeFun) resizeFun();
                     if (resizeFun) resizeFun();
                 },
                 },