Просмотр исходного кода

Merge branch 'feature/new-JSONData' into 'wrdp'

数据字典IE编辑错误修复

See merge request o2oa/o2oa!2235
胡起 5 лет назад
Родитель
Сommit
77c1588e8b

+ 1 - 1
o2web/source/x_component_cms_DictionaryDesigner/Dictionary.js

@@ -128,7 +128,7 @@ MWF.xApplication.cms.DictionaryDesigner.Dictionary = new Class({
             return false;
         }
     },
-    checkValid( obj, silence ){
+    checkValid: function( obj, silence ){
         if( typeOf(obj) !== "object" ){
             return true;
         }

+ 2 - 2
o2web/source/x_component_process_DictionaryDesigner/Dictionary.js

@@ -128,7 +128,7 @@ MWF.xApplication.process.DictionaryDesigner.Dictionary = new Class({
             return false;
         }
     },
-    checkValid( obj, silence ){
+    checkValid: function( obj, silence ){
         if( typeOf(obj) !== "object" ){
             return true;
         }
@@ -1390,4 +1390,4 @@ MWF.xApplication.process.DictionaryDesigner.Dictionary.ItemReader= new Class({
 //		this.data = process.process;
 //		this.htmlPath = "../x_component_process_ProcessDesigner//$Process/process.html";
 //	}
-//});
+//});

+ 26 - 18
o2web/source/x_component_process_ProcessManager/Explorer.js

@@ -167,26 +167,34 @@ MWF.xApplication.process.ProcessManager.Explorer = new Class({
             "styles": this.css.elementContentListNode
         }).inject(this.elementContentNode);
 
-        this.setContentSize();
-        this.app.addEvent("resize", this.setContentSize.bind(this));
+        this.setContentSizeFun = this.setContentSize.bind(this);
+        this.app.addEvent("resize", this.setContentSizeFun);
+        this.app.addEvent("close", function(){
+            if (this.setContentSizeFun){
+                this.app.removeEvent("resize", this.setContentSizeFun);
+                this.setContentSizeFun = null;
+            }
+        }.bind(this));
     },
     setContentSize: function(){
-        var toolbarSize = (this.toolbarNode) ? this.toolbarNode.getSize() : {"x": 0, "y": 0};
-        var nodeSize = this.node.getSize();
-        var pt = this.elementContentNode.getStyle("padding-top").toFloat();
-        var pb = this.elementContentNode.getStyle("padding-bottom").toFloat();
-
-        var height = nodeSize.y-toolbarSize.y-pt-pb;
-        this.elementContentNode.setStyle("height", ""+height+"px");
-
-        var count = (nodeSize.x/282).toInt();
-        var x = count*282;
-        var m = (nodeSize.x-x)/2-10;
-
-        this.elementContentListNode.setStyles({
-            "width": ""+x+"px",
-            "margin-left": "" + m + "px"
-        });
+        if (this.elementContentListNode){
+            var toolbarSize = (this.toolbarNode) ? this.toolbarNode.getSize() : {"x": 0, "y": 0};
+            var nodeSize = (this.node) ? this.node.getSize() : {"x": 0, "y": 0};
+            var pt = this.elementContentNode.getStyle("padding-top").toFloat();
+            var pb = this.elementContentNode.getStyle("padding-bottom").toFloat();
+
+            var height = nodeSize.y-toolbarSize.y-pt-pb;
+            this.elementContentNode.setStyle("height", ""+height+"px");
+
+            var count = (nodeSize.x/282).toInt();
+            var x = count*282;
+            var m = (nodeSize.x-x)/2-10;
+
+            this.elementContentListNode.setStyles({
+                "width": ""+x+"px",
+                "margin-left": "" + m + "px"
+            });
+        }
     },
     setNodeScroll: function(){
         MWF.require("MWF.widget.DragScroll", function(){