Pārlūkot izejas kodu

自定义提交

unknown 5 gadi atpakaļ
vecāks
revīzija
aa17c81b44

+ 8 - 1
o2web/source/o2_core/o2/xDesktop/Dialog.js

@@ -268,7 +268,14 @@ o2.xDesktop.Dialog = o2.DDL = new Class({
         this.fireEvent("restore");
     },
     reCenter: function(){
-        var size = this.node.getSize();
+	    var size;
+	    if( this.node.offsetParent === null ){ //如果是隐藏的
+            size = this.node.measure(function(){
+                return this.getSize();
+            });
+        }else{
+            size = this.node.getSize();
+        }
 
         if( this.options.positionWidth ){
             size.x = parseInt(this.options.positionWidth);

+ 10 - 2
o2web/source/x_component_process_Work/Processor.js

@@ -1539,7 +1539,7 @@ MWF.xApplication.process.Work.Processor = new Class({
 
         //var width = this.node.retrieve("width");
         //empowerNode.setStyle( "width", width );
-        var width = "880";
+        var width = 840;
         //if( len > 1 ){
         //    width = "840"
         //}else{
@@ -1556,9 +1556,17 @@ MWF.xApplication.process.Work.Processor = new Class({
             "isResize": false,
             "content": empowerNode,
             //"container" : this.node,
-            "width": width, //600,
+            "width": width + 40, //600,
             "height": "auto", //dlgHeight,
             "mark" : false,
+            "onPostLoad" : function () {
+                if( this.nodeWidth ){
+                    this.node.setStyle("width", this.nodeWidth+"px" );
+                }
+                if( this.nodeHeight ){
+                    this.node.setStyle("height", this.nodeHeight+"px" );
+                }
+            },
             "buttonList": [
                 {
                     "type" : "ok",