Przeglądaj źródła

子数据源reload错误

huqi 5 lat temu
rodzic
commit
507cb62ff0
1 zmienionych plików z 11 dodań i 13 usunięć
  1. 11 13
      o2web/source/x_component_process_Xform/SubSource.js

+ 11 - 13
o2web/source/x_component_process_Xform/SubSource.js

@@ -18,7 +18,16 @@ MWF.xApplication.process.Xform.SubSource = MWF.APPSubSource =  new Class({
     _loadUserInterface: function(){
         this.loopNodes = [];
         this.subSourceItems = [];
-        this.node.hide();
+        var node = new Element("div").inject(this.node, "before");
+        this.node.inject(node);
+        this.loopNode = this.node.dispose();
+        this.node = node;
+        var id = node.get("id");
+        node.set("id", "");
+        this.node.set({
+            "id": id,
+            "mwftype": node.get("mwftype")
+        });
         this.node.store("module", this);
         this._loadJsonData();
     },
@@ -97,20 +106,9 @@ MWF.xApplication.process.Xform.SubSource = MWF.APPSubSource =  new Class({
             if (this.source.data){
                 this._getSourceData(this.source.data);
                 this.fireEvent("postLoadData");
-                this.node.show();
                 if (typeOf(this.data)=="array"){
-                    var node = new Element("div").inject(this.node, "before");
-                    this.node.inject(node);
-                    this.loopNode = this.node.dispose();
-                    this.node = node;
-                    var id = node.get("id");
-                    node.set("id", "");
-                    this.node.set({
-                        "id": id,
-                        "mwftype": node.get("mwftype")
-                    });
-
                     this._loopData();
+
                     this.fireEvent("loadData");
                 }else{
                     this.form._loadModules(this.node);