Files
SIG/Scripts/AjaxControlToolkit/Release/HtmlEditor.ToolbarButtons.Rtl.js
2024-11-05 10:47:20 -07:00

1 line
1.1 KiB
JavaScript

Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons"),Sys.Extended.UI.HtmlEditor.ToolbarButtons.Rtl=function(t){Sys.Extended.UI.HtmlEditor.ToolbarButtons.Rtl.initializeBase(this,[t])},Sys.Extended.UI.HtmlEditor.ToolbarButtons.Rtl.prototype={callMethod:function(){if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.Rtl.callBaseMethod(this,"callMethod"))return!1;if(this._designPanel._doc.body.style.direction=this.checkState()?"":"rtl",!Sys.Extended.UI.HtmlEditor.isIE){var t=this._designPanel._getSelection(),e=this._designPanel._createRange(t);this._designPanel._removeAllRanges(t),this._designPanel._selectRange(t,e),this._designPanel.focusEditor()}var o=this;setTimeout(function(){o._editPanel.updateToolbar()},0)},checkState:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.Rtl.callBaseMethod(this,"checkState")&&!(!this._designPanel._doc.body.style.direction||"rtl"!=this._designPanel._doc.body.style.direction)}},Sys.Extended.UI.HtmlEditor.ToolbarButtons.Rtl.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.Rtl",Sys.Extended.UI.HtmlEditor.ToolbarButtons.EditorToggleButton);