From ebae565968b7155a9ff21d9667670755e71d986d Mon Sep 17 00:00:00 2001 From: Edward Date: Mon, 13 Jan 2014 17:17:32 +0800 Subject: [PATCH] roojs-all.js roojs-debug.js --- roojs-all.js | 2 +- roojs-debug.js | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/roojs-all.js b/roojs-all.js index 8e58d62f87..b3f71745ca 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -892,7 +892,7 @@ this.cleanUpChildren(A);}});Roo.form.HtmlEditor.white=['area','br','img','input' //Roo/form/HtmlEditor/ToolbarStandard.js Roo.form.HtmlEditor.ToolbarStandard=function(A){Roo.apply(this,A);this.disable=this.disable||{};Roo.applyIf(this.disable,{fontSize:true,colors:true,specialElements:true});} Roo.apply(Roo.form.HtmlEditor.ToolbarStandard.prototype,{tb:false,rendered:false,editor:false,disable:false,fontFamilies:['Arial','Courier New','Tahoma','Times New Roman','Verdana'],specialChars:["©","®","™","£","…","÷","€","°"],specialElements:[{text:"Insert Table",xtype:'MenuItem',xns:Roo.Menu,ihtml:'
Cell
'},{text:"Insert Image",xtype:'MenuItem',xns:Roo.Menu,ihtml:''}],inputElements:["form","input:text","input:hidden","input:checkbox","input:radio","input:password","input:submit","input:button","select","textarea","label"],formats:[["p"],["h1"],["h2"],["h3"],["h4"],["h5"],["h6"],["pre"],["code"],["abbr"],["acronym"],["address"],["cite"],["samp"],["var"],['div'],['span']],cleanStyles:["font-size"],defaultFont:'tahoma',fontSelect:false,formatCombo:false,init:function(A){this.editor=A;var B=A.frameId;var C=this;function btn(id,G,H){var I=B+'-'+id;return {id:I,cmd:id,cls:'x-btn-icon x-edit-'+id,enableToggle:G!==false,scope:A,handler:H||A.relayBtnCmd,clickEvent:'mousedown',tooltip:C.buttonTips[id]||undefined,tabIndex:-1};}var tb=new Roo.Toolbar(A.wrap.dom.firstChild);this.tb=tb;tb.el.on('click',function(e){e.preventDefault();});if(!this.disable.font){};if(!this.disable.formats){this.formatCombo=new Roo.form.ComboBox({store:new Roo.data.SimpleStore({id:'tag',fields:['tag'],data:this.formats}),blockFocus:true,name:'',displayField:'tag',typeAhead:false,mode:'local',editable:false,triggerAction:'all',emptyText:'Add tag',selectOnFocus:true,width:135,listeners:{'select':function(c,r,i){A.insertTag(r.get('tag'));A.focus();}}});tb.addField(this.formatCombo);}if(!this.disable.format){tb.add(btn('bold'),btn('italic'),btn('underline'));};if(!this.disable.fontSize){tb.add('-',btn('increasefontsize',false,A.adjustFont),btn('decreasefontsize',false,A.adjustFont));};if(!this.disable.colors){tb.add('-',{id:A.frameId+'-forecolor',cls:'x-btn-icon x-edit-forecolor',clickEvent:'mousedown',tooltip:this.buttonTips['forecolor']||undefined,tabIndex:-1,menu:new Roo.menu.ColorMenu({allowReselect:true,focus:Roo.emptyFn,value:'000000',plain:true,selectHandler:function(cp,G){A.execCmd('forecolor',Roo.isSafari||Roo.isIE?'#'+G:G);A.deferFocus();},scope:A,clickEvent:'mousedown'})},{id:A.frameId+'backcolor',cls:'x-btn-icon x-edit-backcolor',clickEvent:'mousedown',tooltip:this.buttonTips['backcolor']||undefined,tabIndex:-1,menu:new Roo.menu.ColorMenu({focus:Roo.emptyFn,value:'FFFFFF',plain:true,allowReselect:true,selectHandler:function(cp,G){if(Roo.isGecko){A.execCmd('useCSS',false);A.execCmd('hilitecolor',G);A.execCmd('useCSS',true);A.deferFocus();}else {A.execCmd(Roo.isOpera?'hilitecolor':'backcolor',Roo.isSafari||Roo.isIE?'#'+G:G);A.deferFocus();}},scope:A,clickEvent:'mousedown'})});};if(!this.disable.alignments){tb.add('-',btn('justifyleft'),btn('justifycenter'),btn('justifyright'));};if(!this.disable.links){tb.add('-',btn('createlink',false,A.createLink));};if(!this.disable.lists){tb.add('-',btn('insertorderedlist'),btn('insertunorderedlist'));}if(!this.disable.sourceEdit){tb.add('-',btn('sourceedit',true,function(G){this.toggleSourceEdit(G.pressed);}));}var D={};if(!this.disable.special){D={text:"©",cls:'x-edit-none',menu:{items:[]}};for(var i=0;i