Bläddra i källkod

Merge branch 'feature/documenteditor_custom_templete' into 'develop'

Merge of feature/documenteditor_custom_templete to develop 修正cms表单脚本编辑器拷贝粘贴的问题

See merge request o2oa/o2oa!891
胡起 5 år sedan
förälder
incheckning
a588e7e390

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

@@ -126,6 +126,15 @@ o2.widget.JavascriptEditor = new Class({
                     this.format();
                     this.format();
                 }.bind(this));
                 }.bind(this));
 
 
+                this.editor.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyMod.Alt | monaco.KeyCode.KEY_F, function(e){
+                    this.format();
+                }.bind(this));
+
+                // this.editor.onKeyDown(function(e){
+                //     debugger;
+                //     e.preventDefault();
+                // });
+
                 if( this.fontSize ){
                 if( this.fontSize ){
                     this.editor.updateOptions( {"fontSize": this.fontSize} );
                     this.editor.updateOptions( {"fontSize": this.fontSize} );
                 }
                 }

+ 3 - 0
o2web/source/x_component_cms_FormDesigner/Main.js

@@ -92,6 +92,9 @@ MWF.xApplication.cms.FormDesigner.Main = new Class({
         if (this.shortcut) {
         if (this.shortcut) {
             if (this.form) {
             if (this.form) {
                 //           if (this.form.isFocus){
                 //           if (this.form.isFocus){
+                if (!this.form.node.contains(document.activeElement)){
+                    return false;
+                }
                 if (this.form.currentSelectedModule) {
                 if (this.form.currentSelectedModule) {
                     var module = this.form.currentSelectedModule;
                     var module = this.form.currentSelectedModule;
                     if (module.moduleType != "form" && module.moduleName.indexOf("$") == -1) {
                     if (module.moduleType != "form" && module.moduleName.indexOf("$") == -1) {