Browse Source

Merge branch 'fix/Process.opinion_not_load' into 'develop'

Merge of fix/Process.opinion_not_load to develop

See merge request o2oa/o2oa!1380
蔡祥熠 5 years ago
parent
commit
eabf264862

+ 2 - 2
o2web/source/o2_core/o2/xScript/CMSEnvironment.js

@@ -1566,10 +1566,10 @@ MWF.xScript.createCMSDict = function(application){
             return ar.join("/");
         };
 
-        this.get = function(path, success, failure, async){
+        this.get = function(path, success, failure, async, refresh){
             var value = null;
             if (path){
-                if (this.dictData[path]){
+                if ( !refresh && this.dictData[path] ){
                     if (success) success(this.dictData[path]);
                     return this.dictData[path];
                 }

+ 2 - 2
o2web/source/o2_core/o2/xScript/Environment.js

@@ -1662,10 +1662,10 @@ MWF.xScript.createDict = function(application){
             return ar.join("/");
         };
 
-        this.get = function(path, success, failure, async){
+        this.get = function(path, success, failure, async, refresh){
             var value = null;
             if (path){
-                if (this.dictData[path]){
+                if (!refresh && this.dictData[path]){
                     if (success) success(this.dictData[path]);
                     return this.dictData[path];
                 }

+ 2 - 2
o2web/source/o2_core/o2/xScript/PageEnvironment.js

@@ -1379,10 +1379,10 @@ MWF.xScript.createDict = function(application){
             return ar.join("/");
         };
 
-        this.get = function(path, success, failure, async){
+        this.get = function(path, success, failure, async, refresh){
             var value = null;
             if (path){
-                if (this.dictData[path]){
+                if ( !refresh && this.dictData[path]){
                     if (success) success(this.dictData[path]);
                     return this.dictData[path];
                 }

+ 2 - 2
o2web/source/o2_core/o2/xScript/ViewEnvironment.js

@@ -1137,10 +1137,10 @@ if( !MWF.xScript.createDict ){
                 return ar.join("/");
             };
 
-            this.get = function(path, success, failure, async){
+            this.get = function(path, success, failure, async, refresh){
                 var value = null;
                 if (path){
-                    if (this.dictData[path]){
+                    if (!refresh && this.dictData[path]){
                         if (success) success(this.dictData[path]);
                         return this.dictData[path];
                     }

+ 5 - 4
o2web/source/x_component_process_Xform/Opinion.js

@@ -179,10 +179,11 @@ MWF.xApplication.process.Xform.Opinion = MWF.APPOpinion =  new Class({
             }
         }.bind(this));
 
-
-        MWF.UD.getDataJson("userOpinion", function(json){
-            this.userOpinions = json;
-        }.bind(this), false);
+        if( !this.form.json.notLoadUserOpinion ){
+            MWF.UD.getDataJson("userOpinion", function(json){
+                this.userOpinions = json;
+            }.bind(this), false);
+        }
         this.node.getFirst().addEvent("input", function(e){
             this.startSearchOpinion();
         }.bind(this));