Files
SIG/Scripts/AjaxControlToolkit/Release/HtmlEditor.ToolbarButtons.SelectButton.js
rrene 927295c7ba Revert "-- corr"
This reverts commit 5315c47fcd.
2024-11-05 10:55:34 -07:00

1 line
1.7 KiB
JavaScript

Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.SelectButton=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.SelectButton.initializeBase(this,[n]);this._onclick_option$delegate=Function.createDelegate(this,this._onclick_option);this._onchange$delegate=Function.createDelegate(this,this._onchange)};Sys.Extended.UI.HtmlEditor.ToolbarButtons.SelectButton.prototype={initialize:function(){var i=this.get_element().id,n,t;for(Sys.Extended.UI.HtmlEditor.ToolbarButtons.SelectButton.callBaseMethod(this,"initialize"),this._select=$get(i+"_select"),$addHandler(this._select,"change",this._onchange$delegate),n=0;n<this._select.options.length;n++)t=this._select.options[n],$addHandler(t,"click",this._onclick_option$delegate)},dispose:function(){for(var t,n=0;n<this._select.options.length;n++)t=this._select.options[n],$removeHandler(t,"click",this._onclick_option$delegate);$removeHandler(this._select,"change",this._onchange$delegate);Sys.Extended.UI.HtmlEditor.ToolbarButtons.SelectButton.callBaseMethod(this,"dispose")},isImage:function(){return!1},callMethod:function(){return!0},_onclick_option:function(n){if(!this.isEnable())return!1;var t=n.target;return(t.parentNode.value=t.value,Sys.Extended.UI.HtmlEditor._stopEvent(n),!Sys.Extended.UI.HtmlEditor.isSafari)?!1:(this.callMethod(t.parentNode,n),!0)},_onchange:function(n){if(!this.isEnable())return!1;var t=n.target;return Sys.Extended.UI.HtmlEditor._stopEvent(n),this.callMethod(t,n),!0}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.SelectButton.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.SelectButton",Sys.Extended.UI.HtmlEditor.ToolbarButtons.CommonButton);