Selaa lähdekoodia

新政脚本编辑器monaco

huqi 5 vuotta sitten
vanhempi
commit
046cb0b984

+ 11 - 0
o2web/source/x_component_cms_ScriptDesigner/Script.js

@@ -171,6 +171,17 @@ MWF.xApplication.cms.ScriptDesigner.Script = new Class({
                 }
                 }
             }
             }
 
 
+            if (this.designer.monacoStyleSelectNode){
+                options = this.designer.monacoStyleSelectNode.options;
+                for (var i=0; i<options.length; i++){
+                    var option = options[i];
+                    if (option.value==this.editor.theme){
+                        option.set("selected", true);
+                        break;
+                    }
+                }
+            }
+
             if (this.designer.styleSelectNode && this.designer.monacoStyleSelectNode){
             if (this.designer.styleSelectNode && this.designer.monacoStyleSelectNode){
                 if (this.editor.options.type=="ace"){
                 if (this.editor.options.type=="ace"){
                     this.designer.monacoStyleSelectNode.hide();
                     this.designer.monacoStyleSelectNode.hide();

+ 9 - 0
o2web/source/x_component_portal_ScriptDesigner/Script.js

@@ -158,6 +158,15 @@ MWF.xApplication.portal.ScriptDesigner.Script = new Class({
                 }
                 }
             }
             }
 
 
+            options = this.designer.monacoStyleSelectNode.options;
+            for (var i=0; i<options.length; i++){
+                var option = options[i];
+                if (option.value==this.editor.theme){
+                    option.set("selected", true);
+                    break;
+                }
+            }
+
             if (this.editor.options.type=="ace"){
             if (this.editor.options.type=="ace"){
                 this.designer.monacoStyleSelectNode.hide();
                 this.designer.monacoStyleSelectNode.hide();
                 this.designer.styleSelectNode.show();
                 this.designer.styleSelectNode.show();

+ 8 - 0
o2web/source/x_component_process_ScriptDesigner/Script.js

@@ -168,6 +168,14 @@ MWF.xApplication.process.ScriptDesigner.Script = new Class({
                     break;
                     break;
                 }
                 }
             }
             }
+            options = this.designer.monacoStyleSelectNode.options;
+            for (var i=0; i<options.length; i++){
+                var option = options[i];
+                if (option.value==this.editor.theme){
+                    option.set("selected", true);
+                    break;
+                }
+            }
 
 
             if (this.editor.options.type=="ace"){
             if (this.editor.options.type=="ace"){
                 this.designer.monacoStyleSelectNode.hide();
                 this.designer.monacoStyleSelectNode.hide();

+ 8 - 0
o2web/source/x_component_service_AgentDesigner/Agent.js

@@ -174,6 +174,14 @@ MWF.xApplication.service.AgentDesigner.Agent = new Class({
                     break;
                     break;
                 }
                 }
             }
             }
+            options = this.designer.monacoStyleSelectNode.options;
+            for (var i=0; i<options.length; i++){
+                var option = options[i];
+                if (option.value==this.editor.theme){
+                    option.set("selected", true);
+                    break;
+                }
+            }
 
 
             if (this.editor.options.type=="ace"){
             if (this.editor.options.type=="ace"){
                 this.designer.monacoStyleSelectNode.hide();
                 this.designer.monacoStyleSelectNode.hide();

+ 8 - 1
o2web/source/x_component_service_InvokeDesigner/Invoke.js

@@ -180,7 +180,14 @@ MWF.xApplication.service.InvokeDesigner.Invoke = new Class({
                     break;
                     break;
                 }
                 }
             }
             }
-
+            options = this.designer.monacoStyleSelectNode.options;
+            for (var i=0; i<options.length; i++){
+                var option = options[i];
+                if (option.value==this.editor.theme){
+                    option.set("selected", true);
+                    break;
+                }
+            }
             if (this.editor.options.type=="ace"){
             if (this.editor.options.type=="ace"){
                 this.designer.monacoStyleSelectNode.hide();
                 this.designer.monacoStyleSelectNode.hide();
                 this.designer.styleSelectNode.show();
                 this.designer.styleSelectNode.show();