Преглед изворни кода

Merge branch 'fix/scriptEditor_save' into 'develop'

Merge of fix/scriptEditor_save to develop 修复门户脚本保存错误

See merge request o2oa/o2oa!675
胡起 пре 5 година
родитељ
комит
3734b8eb1f
1 измењених фајлова са 11 додато и 10 уклоњено
  1. 11 10
      o2web/source/x_component_portal_ScriptDesigner/Script.js

+ 11 - 10
o2web/source/x_component_portal_ScriptDesigner/Script.js

@@ -212,16 +212,17 @@ MWF.xApplication.portal.ScriptDesigner.Script = new Class({
 
     save: function(callback){
         if (!this.isSave){
-            var session = this.editor.editor.getSession();
-            var annotations = session.getAnnotations();
-            var validated = true;
-            for (var i=0; i<annotations.length; i++){
-                if (annotations[i].type=="error"){
-                    validated = false;
-                    break;
-                }
-            }
+            // var session = this.editor.editor.getSession();
+            // var annotations = session.getAnnotations();
+            // var validated = true;
+            // for (var i=0; i<annotations.length; i++){
+            //     if (annotations[i].type=="error"){
+            //         validated = false;
+            //         break;
+            //     }
+            // }
 
+            var validated = this.editor.validated();
             var name = this.designer.propertyNameNode.get("value");
             var alias = this.designer.propertyAliasNode.get("value");
             var description = this.designer.propertyDescriptionNode.get("value");
@@ -314,4 +315,4 @@ MWF.xApplication.portal.ScriptDesigner.Script = new Class({
     explode: function(){},
     implode: function(){}
 
-});
+});