roojs-ui.js
authorAlan <alan@roojs.com>
Mon, 10 Jan 2022 07:25:09 +0000 (15:25 +0800)
committerAlan <alan@roojs.com>
Mon, 10 Jan 2022 07:25:09 +0000 (15:25 +0800)
roojs-ui-debug.js
roojs-all.js
roojs-debug.js

roojs-all.js
roojs-debug.js
roojs-ui-debug.js
roojs-ui.js

index ef70aad..e78b7fd 100644 (file)
@@ -2153,9 +2153,9 @@ F.menu.items.push({actiontype:'word',html:'Remove MS Word Formating',handler:fun
 );F.menu.items.push({actiontype:'tidy',html:'Tidy HTML Source',handler:function(a,b){new Roo.htmleditor.Tidy(B.doc.body);B.syncValue();},tabIndex:-1});tb.add(F);}if(!this.disable.specialElements){var G={text:"Other;",cls:'x-edit-none',menu:{items:[]}};for(var i=0;
 i<this.specialElements.length;i++){G.menu.items.push(Roo.apply({handler:function(a,b){A.insertAtCursor(this.ihtml);}},this.specialElements[i]));}tb.add(G);}if(this.btns){for(var i=0;i<this.btns.length;i++){var b=Roo.factory(this.btns[i],this.btns[i].xns||Roo.form);
 b.cls='x-edit-none';if(typeof(this.btns[i].cls)!='undefined'&&this.btns[i].cls.indexOf('x-init-enable')!==-1){b.cls+=' x-init-enable';}b.scope=B;tb.add(b);}}this.tb.items.each(function(H){if(H.id!=B.frameId+'-sourceedit'&&(typeof(H.cls)!='undefined'&&H.cls.indexOf('x-init-enable')===-1)){H.disable();
-}});this.rendered=true;A.on('editorevent',this.updateToolbar,this);},relayBtnCmd:function(A){this.editorcore.relayCmd(A.cmd);},createLink:function(){Roo.log("create link?");var ec=this.editorcore;Roo.MessageBox.prompt("Add Link URL",this.createLinkText,function(A){if(A&&A!='http:/'+'/'){ec.relayCmd('createlink',A);
-}});},updateToolbar:function(){if(!this.editorcore.activated){this.editor.onFirstFocus();return;}var A=this.tb.items.map,B=this.editorcore.doc,C=this.editorcore.frameId;if(!this.disable.font&&!Roo.isSafari){}if(!this.disable.format){A[C+'-bold'].toggle(B.queryCommandState('bold'));
-A[C+'-italic'].toggle(B.queryCommandState('italic'));A[C+'-underline'].toggle(B.queryCommandState('underline'));A[C+'-strikethrough'].toggle(B.queryCommandState('strikethrough'));}if(!this.disable.alignments){A[C+'-justifyleft'].toggle(B.queryCommandState('justifyleft'));
+}});this.rendered=true;A.on('editorevent',this.updateToolbar,this);},relayBtnCmd:function(A){this.editorcore.relayCmd(A.cmd);},createLink:function(){Roo.log("create link?");var ec=this.editorcore;Roo.MessageBox.prompt("Add Link URL",this.createLinkText,function(A,B){if(A!='ok'){return;
+}if(B&&B!='http:/'+'/'){ec.relayCmd('createlink',B);}});},updateToolbar:function(){if(!this.editorcore.activated){this.editor.onFirstFocus();return;}var A=this.tb.items.map,B=this.editorcore.doc,C=this.editorcore.frameId;if(!this.disable.font&&!Roo.isSafari){}
+if(!this.disable.format){A[C+'-bold'].toggle(B.queryCommandState('bold'));A[C+'-italic'].toggle(B.queryCommandState('italic'));A[C+'-underline'].toggle(B.queryCommandState('underline'));A[C+'-strikethrough'].toggle(B.queryCommandState('strikethrough'));}if(!this.disable.alignments){A[C+'-justifyleft'].toggle(B.queryCommandState('justifyleft'));
 A[C+'-justifycenter'].toggle(B.queryCommandState('justifycenter'));A[C+'-justifyright'].toggle(B.queryCommandState('justifyright'));}if(!Roo.isSafari&&!this.disable.lists){A[C+'-insertorderedlist'].toggle(B.queryCommandState('insertorderedlist'));A[C+'-insertunorderedlist'].toggle(B.queryCommandState('insertunorderedlist'));
 }var D=this.editorcore.getAllAncestors();if(this.formatCombo){var E=this.formatCombo.store;this.formatCombo.setValue("");for(var i=0;i<D.length;i++){if(D[i]&&E.query('tag',D[i].tagName.toLowerCase(),false).length){this.formatCombo.setValue(D[i].tagName.toLowerCase());
 break;}}}Roo.menu.MenuMgr.hideAll();},createFontOptions:function(){var A=[],fs=this.fontFamilies,ff,lc;for(var i=0,B=fs.length;i<B;i++){ff=fs[i];lc=ff.toLowerCase();A.push('<option value="',lc,'" style="font-family:',ff,';"',(this.defaultFont==lc?' selected="true">':'>'),ff,'</option>');
index 647a840..a33f95b 100644 (file)
@@ -52206,7 +52206,10 @@ Roo.apply(Roo.form.HtmlEditor.ToolbarStandard.prototype,  {
     createLink : function(){
         Roo.log("create link?");
         var ec = this.editorcore;
-        Roo.MessageBox.prompt("Add Link URL",this.createLinkText, function(url) {
+        Roo.MessageBox.prompt("Add Link URL",this.createLinkText, function(btn, url) {
+            if (btn != 'ok') {
+                return;
+            }
             if(url && url != 'http:/'+'/'){
                 ec.relayCmd('createlink', url);
             }
index 4c4500c..3a0ad3c 100644 (file)
@@ -27737,7 +27737,10 @@ Roo.apply(Roo.form.HtmlEditor.ToolbarStandard.prototype,  {
     createLink : function(){
         Roo.log("create link?");
         var ec = this.editorcore;
-        Roo.MessageBox.prompt("Add Link URL",this.createLinkText, function(url) {
+        Roo.MessageBox.prompt("Add Link URL",this.createLinkText, function(btn, url) {
+            if (btn != 'ok') {
+                return;
+            }
             if(url && url != 'http:/'+'/'){
                 ec.relayCmd('createlink', url);
             }
index dfeada0..ebb31f9 100644 (file)
@@ -1208,9 +1208,9 @@ F.menu.items.push({actiontype:'word',html:'Remove MS Word Formating',handler:fun
 );F.menu.items.push({actiontype:'tidy',html:'Tidy HTML Source',handler:function(a,b){new Roo.htmleditor.Tidy(B.doc.body);B.syncValue();},tabIndex:-1});tb.add(F);}if(!this.disable.specialElements){var G={text:"Other;",cls:'x-edit-none',menu:{items:[]}};for(var i=0;
 i<this.specialElements.length;i++){G.menu.items.push(Roo.apply({handler:function(a,b){A.insertAtCursor(this.ihtml);}},this.specialElements[i]));}tb.add(G);}if(this.btns){for(var i=0;i<this.btns.length;i++){var b=Roo.factory(this.btns[i],this.btns[i].xns||Roo.form);
 b.cls='x-edit-none';if(typeof(this.btns[i].cls)!='undefined'&&this.btns[i].cls.indexOf('x-init-enable')!==-1){b.cls+=' x-init-enable';}b.scope=B;tb.add(b);}}this.tb.items.each(function(H){if(H.id!=B.frameId+'-sourceedit'&&(typeof(H.cls)!='undefined'&&H.cls.indexOf('x-init-enable')===-1)){H.disable();
-}});this.rendered=true;A.on('editorevent',this.updateToolbar,this);},relayBtnCmd:function(A){this.editorcore.relayCmd(A.cmd);},createLink:function(){Roo.log("create link?");var ec=this.editorcore;Roo.MessageBox.prompt("Add Link URL",this.createLinkText,function(A){if(A&&A!='http:/'+'/'){ec.relayCmd('createlink',A);
-}});},updateToolbar:function(){if(!this.editorcore.activated){this.editor.onFirstFocus();return;}var A=this.tb.items.map,B=this.editorcore.doc,C=this.editorcore.frameId;if(!this.disable.font&&!Roo.isSafari){}if(!this.disable.format){A[C+'-bold'].toggle(B.queryCommandState('bold'));
-A[C+'-italic'].toggle(B.queryCommandState('italic'));A[C+'-underline'].toggle(B.queryCommandState('underline'));A[C+'-strikethrough'].toggle(B.queryCommandState('strikethrough'));}if(!this.disable.alignments){A[C+'-justifyleft'].toggle(B.queryCommandState('justifyleft'));
+}});this.rendered=true;A.on('editorevent',this.updateToolbar,this);},relayBtnCmd:function(A){this.editorcore.relayCmd(A.cmd);},createLink:function(){Roo.log("create link?");var ec=this.editorcore;Roo.MessageBox.prompt("Add Link URL",this.createLinkText,function(A,B){if(A!='ok'){return;
+}if(B&&B!='http:/'+'/'){ec.relayCmd('createlink',B);}});},updateToolbar:function(){if(!this.editorcore.activated){this.editor.onFirstFocus();return;}var A=this.tb.items.map,B=this.editorcore.doc,C=this.editorcore.frameId;if(!this.disable.font&&!Roo.isSafari){}
+if(!this.disable.format){A[C+'-bold'].toggle(B.queryCommandState('bold'));A[C+'-italic'].toggle(B.queryCommandState('italic'));A[C+'-underline'].toggle(B.queryCommandState('underline'));A[C+'-strikethrough'].toggle(B.queryCommandState('strikethrough'));}if(!this.disable.alignments){A[C+'-justifyleft'].toggle(B.queryCommandState('justifyleft'));
 A[C+'-justifycenter'].toggle(B.queryCommandState('justifycenter'));A[C+'-justifyright'].toggle(B.queryCommandState('justifyright'));}if(!Roo.isSafari&&!this.disable.lists){A[C+'-insertorderedlist'].toggle(B.queryCommandState('insertorderedlist'));A[C+'-insertunorderedlist'].toggle(B.queryCommandState('insertunorderedlist'));
 }var D=this.editorcore.getAllAncestors();if(this.formatCombo){var E=this.formatCombo.store;this.formatCombo.setValue("");for(var i=0;i<D.length;i++){if(D[i]&&E.query('tag',D[i].tagName.toLowerCase(),false).length){this.formatCombo.setValue(D[i].tagName.toLowerCase());
 break;}}}Roo.menu.MenuMgr.hideAll();},createFontOptions:function(){var A=[],fs=this.fontFamilies,ff,lc;for(var i=0,B=fs.length;i<B;i++){ff=fs[i];lc=ff.toLowerCase();A.push('<option value="',lc,'" style="font-family:',ff,';"',(this.defaultFont==lc?' selected="true">':'>'),ff,'</option>');