Explorar o código

修复脚本拷贝粘贴时,和设计元素的拷贝粘贴冲突

huqi %!s(int64=5) %!d(string=hai) anos
pai
achega
12f52d8cb9

+ 8 - 0
o2web/source/o2_core/o2/widget/JavascriptEditor.js

@@ -139,6 +139,14 @@ o2.widget.JavascriptEditor = new Class({
                     this.editor.updateOptions( {"fontSize": this.fontSize} );
                 }
 
+                this.editor.onDidFocusEditorText(function(e){
+                    o2.shortcut.keyboard.deactivate();
+                }.bind(this));
+                this.editor.onDidBlurEditorText(function(e){
+                    o2.shortcut.keyboard.activate();
+                }.bind(this));
+
+
                 o2.widget.JavascriptEditor.getCompletionEnvironment(this.options.runtime, function(){
                     this.monacoModel = this.editor.getModel();
                     this.monacoModel.o2Editor = this;

+ 6 - 5
o2web/source/x_component_process_FormDesigner/Main.js

@@ -90,9 +90,10 @@ MWF.xApplication.process.FormDesigner.Main = new Class({
         if (this.shortcut) {
             if (this.form) {
                 //           if (this.form.isFocus){
-                if (!this.form.node.contains(document.activeElement)){
-                    return false;
-                }
+                debugger;
+                // if (!this.form.node.contains(document.activeElement)){
+                //     return false;
+                // }
                 if (this.form.currentSelectedModule) {
                     var module = this.form.currentSelectedModule;
                     if (module.moduleType != "form" && module.moduleName.indexOf("$") == -1) {
@@ -123,7 +124,7 @@ MWF.xApplication.process.FormDesigner.Main = new Class({
         if (this.shortcut) {
             if (this.form) {
                 //          if (this.form.isFocus){
-                if (!this.form.node.contains(document.activeElement)) return false;
+                //if (!this.form.node.contains(document.activeElement)) return false;
                 if (this.form.currentSelectedModule) {
                     var module = this.form.currentSelectedModule;
                     if (module.moduleType != "form" && module.moduleName.indexOf("$") == -1) {
@@ -144,7 +145,7 @@ MWF.xApplication.process.FormDesigner.Main = new Class({
         if (this.shortcut) {
             if (this.form) {
                 debugger;
-                if (!this.form.node.contains(document.activeElement)) return false;
+                //if (!this.form.node.contains(document.activeElement)) return false;
                 //    if (this.form.isFocus){
                 if (MWF.clipboard.data) {
                     if (MWF.clipboard.data.type == "form") {

+ 2 - 2
o2web/source/x_component_process_ProcessDesigner/Main.js

@@ -102,7 +102,7 @@ MWF.xApplication.process.ProcessDesigner.Main = new Class({
         if (this.shortcut) {
             if (this.process) {
                 //       if (this.process.isFocus){
-                if (!this.paperInNode.contains(document.activeElement)) return false;
+                //if (!this.paperInNode.contains(document.activeElement)) return false;
                 if (this.process.selectedActivitys.length) {
                     var activitys = [];
                     var routes = [];
@@ -160,7 +160,7 @@ MWF.xApplication.process.ProcessDesigner.Main = new Class({
     pasteModule: function(){
         if (this.process){
             //        if (this.process.isFocus){
-            if (!this.paperInNode.contains(document.activeElement)) return false;
+            //if (!this.paperInNode.contains(document.activeElement)) return false;
 
             if (MWF.clipboard.data){
                 if (MWF.clipboard.data.type=="process"){