Files
SIG/Scripts/AjaxControlToolkit/Release/HtmlEditor.ToolbarButtons.FontSize.js
JORGE LUIS CAUDILLO ESPARZA c35cf91883 Commit inicial Ventas Productivo
2019-08-14 16:40:54 -07:00

1 line
1.7 KiB
JavaScript

Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontSize=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontSize.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontSize.prototype={initialize:function(){Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontSize.callBaseMethod(this,"initialize")},callMethod:function(n){if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontSize.callBaseMethod(this,"callMethod"))return!1;try{var t=this._designPanel;t._execCommand("FontSize",!1,Sys.Extended.UI.HtmlEditor.fontSizeSeek(n.options.item(n.selectedIndex).value))}catch(i){}},checkState:function(){var i,t,e,o,r;if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontSize.callBaseMethod(this,"checkState"))return!1;var u=this._designPanel,n=null,f=this._select.id;try{n=Function.createDelegate(u,Sys.Extended.UI.HtmlEditor._queryCommandValue)("fontsize",f)}catch(s){}n&&(n=n.toString());u._FontNotSet||n&&n.length!=0||(n=Sys.Extended.UI.HtmlEditor.getStyle(u._doc.body,"font-size"),n=Sys.Extended.UI.HtmlEditor._TryTransformFromPxToPt(n,this,f));try{if(i=this._select,t=0,n&&n.length>0){for(e=n.toLowerCase().split(",")[0],t=0;t<i.options.length;t++)if(o=Sys.Extended.UI.HtmlEditor.fontSizeSeek(i.options.item(t).value.toLowerCase().split(",")[0]),o==e)break;if(t==i.options.length)try{r=document.createElement("OPTION");r.value=n;r.text=n;i.add(r,Sys.Extended.UI.HtmlEditor.isIE?t:null);$addHandler(r,"click",this._onclick_option$delegate)}catch(s){t=0}}i.selectedIndex=t}catch(s){}}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontSize.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontSize",Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeSelectButton);