roojs-ui.js
authorAlan <alan@roojs.com>
Fri, 17 Dec 2021 03:29:39 +0000 (11:29 +0800)
committerAlan <alan@roojs.com>
Fri, 17 Dec 2021 03:29:39 +0000 (11:29 +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 f27cde9..065dddb 100644 (file)
@@ -2074,7 +2074,7 @@ this.footer.show();A.on('hide',function(){this.footer.hide()},this);A.on('show',
 return;}if(ev&&(ev.type=='mouseup'||ev.type=='click')&&ev.target&&ev.target.tagName!='BODY'){B=ev.target;}Roo.select('.roo-ed-selection',false,this.editorcore.doc).removeClass('roo-ed-selection');var C=this.editorcore.getAllAncestors();var ty=Roo.form.HtmlEditor.ToolbarContext.types;
 if(!B){B=C.length?(C[0]?C[0]:C[1]):this.editorcore.doc.body;B=B?B:this.editorcore.doc.body;B=B.tagName.length?B:this.editorcore.doc.body;}var tn=B.tagName.toUpperCase();var D=this.tb.selectedNode;this.tb.selectedNode=B;var E=tn;var F=Roo.get(B);var db=false;
 if(B&&B.hasAttribute('data-block')){db=B;}else if(B&&!B.hasAttribute('contenteditable')){db=F.findParent('[data-block]');var G=F.findParent('[contenteditable=true]');if(db&&G&&G.tagName!='BODY'){db=false;}}var H=false;if(db){H=Roo.htmleditor.Block.factory(db);
-if(H){Roo.get(db).addClass('roo-ed-selection');tn='BLOCK.'+db.getAttribute('data-block');if(typeof(this.toolbars[tn])=='undefined'){this.toolbars[tn]=this.buildToolbar(false,tn,H.friendly_name,H);}this.toolbars[tn].selectedNode=db;E=H.friendly_name;C=this.editorcore.getAllAncestors();
+if(H){Roo.fly(db).addClass('roo-ed-selection');tn='BLOCK.'+db.getAttribute('data-block');if(typeof(this.toolbars[tn])=='undefined'){this.toolbars[tn]=this.buildToolbar(false,tn,H.friendly_name,H);}this.toolbars[tn].selectedNode=db;E=H.friendly_name;C=this.editorcore.getAllAncestors();
 }}if(this.tb.name==tn&&D==this.tb.selectedNode&&ev!==false){return;}this.tb.el.hide();this.tb=typeof(this.toolbars[tn])!='undefined'?this.toolbars[tn]:this.toolbars['*'];this.tb.el.show();this.tb.items.first().el.innerHTML=E+':&nbsp;';if(H){this.tb.fields.each(function(e){e.setValue(H[e.name]);
 });}else if(this.tb.fields&&this.tb.selectedNode){this.tb.fields.each(function(e){if(e.stylename){e.setValue(this.tb.selectedNode.style[e.stylename]);return;}e.setValue(this.tb.selectedNode.getAttribute(e.attrname));},this);this.updateToolbarStyles(this.tb.selectedNode);
 }Roo.menu.MenuMgr.hideAll();this.updateFooter(C);},updateToolbarStyles:function(A){var B=false;for(var i in this.styles){B=true;break;}if(B&&this.tb.hasStyles){var st=this.tb.fields.item(0);st.store.removeAll();var cn=A.className.split(/\s+/);var C=[];if(this.styles['*']){Roo.each(this.styles['*'],function(v){C.push([v,cn.indexOf(v)>-1?1:0]);
index 5e89e7c..91963cb 100644 (file)
@@ -49769,7 +49769,7 @@ Roo.apply(Roo.form.HtmlEditor.ToolbarContext.prototype,  {
             
             
             if (block) {
-                Roo.get(db).addClass('roo-ed-selection');
+                Roo.fly(db).addClass('roo-ed-selection');
                 tn = 'BLOCK.' + db.getAttribute('data-block');
                 
                 //this.editorcore.selectNode(db);
index bc93973..d00d384 100644 (file)
@@ -25498,7 +25498,7 @@ Roo.apply(Roo.form.HtmlEditor.ToolbarContext.prototype,  {
             
             
             if (block) {
-                Roo.get(db).addClass('roo-ed-selection');
+                Roo.fly(db).addClass('roo-ed-selection');
                 tn = 'BLOCK.' + db.getAttribute('data-block');
                 
                 //this.editorcore.selectNode(db);
index 1315d37..d398494 100644 (file)
@@ -1139,7 +1139,7 @@ this.footer.show();A.on('hide',function(){this.footer.hide()},this);A.on('show',
 return;}if(ev&&(ev.type=='mouseup'||ev.type=='click')&&ev.target&&ev.target.tagName!='BODY'){B=ev.target;}Roo.select('.roo-ed-selection',false,this.editorcore.doc).removeClass('roo-ed-selection');var C=this.editorcore.getAllAncestors();var ty=Roo.form.HtmlEditor.ToolbarContext.types;
 if(!B){B=C.length?(C[0]?C[0]:C[1]):this.editorcore.doc.body;B=B?B:this.editorcore.doc.body;B=B.tagName.length?B:this.editorcore.doc.body;}var tn=B.tagName.toUpperCase();var D=this.tb.selectedNode;this.tb.selectedNode=B;var E=tn;var F=Roo.get(B);var db=false;
 if(B&&B.hasAttribute('data-block')){db=B;}else if(B&&!B.hasAttribute('contenteditable')){db=F.findParent('[data-block]');var G=F.findParent('[contenteditable=true]');if(db&&G&&G.tagName!='BODY'){db=false;}}var H=false;if(db){H=Roo.htmleditor.Block.factory(db);
-if(H){Roo.get(db).addClass('roo-ed-selection');tn='BLOCK.'+db.getAttribute('data-block');if(typeof(this.toolbars[tn])=='undefined'){this.toolbars[tn]=this.buildToolbar(false,tn,H.friendly_name,H);}this.toolbars[tn].selectedNode=db;E=H.friendly_name;C=this.editorcore.getAllAncestors();
+if(H){Roo.fly(db).addClass('roo-ed-selection');tn='BLOCK.'+db.getAttribute('data-block');if(typeof(this.toolbars[tn])=='undefined'){this.toolbars[tn]=this.buildToolbar(false,tn,H.friendly_name,H);}this.toolbars[tn].selectedNode=db;E=H.friendly_name;C=this.editorcore.getAllAncestors();
 }}if(this.tb.name==tn&&D==this.tb.selectedNode&&ev!==false){return;}this.tb.el.hide();this.tb=typeof(this.toolbars[tn])!='undefined'?this.toolbars[tn]:this.toolbars['*'];this.tb.el.show();this.tb.items.first().el.innerHTML=E+':&nbsp;';if(H){this.tb.fields.each(function(e){e.setValue(H[e.name]);
 });}else if(this.tb.fields&&this.tb.selectedNode){this.tb.fields.each(function(e){if(e.stylename){e.setValue(this.tb.selectedNode.style[e.stylename]);return;}e.setValue(this.tb.selectedNode.getAttribute(e.attrname));},this);this.updateToolbarStyles(this.tb.selectedNode);
 }Roo.menu.MenuMgr.hideAll();this.updateFooter(C);},updateToolbarStyles:function(A){var B=false;for(var i in this.styles){B=true;break;}if(B&&this.tb.hasStyles){var st=this.tb.fields.item(0);st.store.removeAll();var cn=A.className.split(/\s+/);var C=[];if(this.styles['*']){Roo.each(this.styles['*'],function(v){C.push([v,cn.indexOf(v)>-1?1:0]);