Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadInputControl=function(_1){
Telerik.Web.UI.RadInputControl.initializeBase(this,[_1]);
this._autoPostBack=false;
this._enabled=true;
this._showButton=false;
this._invalidStyleDuration=100;
this._emptyMessage="";
this._selectionOnFocus=Telerik.Web.UI.SelectionOnFocus.None;
this._postBackEventReferenceScript="";
this._styles=null;
this._isEnterPressed=false;
this._isDroped=false;
this._onTextBoxKeyUpDelegate=null;
this._onTextBoxKeyPressDelegate=null;
this._onTextBoxBlurDelegate=null;
this._onTextBoxFocusDelegate=null;
this._onTextBoxMouseOutDelegate=null;
this._onTextBoxMouseOverDelegate=null;
this._onTextBoxKeyDownDelegate=null;
this._onTextBoxMouseWheelDelegate=null;
this._onTextBoxDragDropDelegate=null;
if($telerik.isSafari){
this._onTextBoxMouseUpDelegate=null;
}
this._focused=false;
};
Telerik.Web.UI.RadInputControl.prototype={initialize:function(){
Telerik.Web.UI.RadInputControl.callBaseMethod(this,"initialize");
this._clientID=this.get_id();
this._wrapperElementID=this.get_id()+"_wrapper";
this._textBoxElement=$get(this.get_id()+"_text");
this._originalTextBoxCssText=this._textBoxElement.style.cssText;
if(this._originalTextBoxCssText.indexOf(";")!=this._originalTextBoxCssText.length-1){
this._originalTextBoxCssText+=";";
}
this._updatePercentageHeight();
this.resetWidthInPixels();
this._originalMaxLength=this._textBoxElement.maxLength;
if(this._originalMaxLength==-1){
this._originalMaxLength=2147483647;
}
this._initializeHiddenElement(this.get_id());
this._initializeValidationField(this.get_id());
this._selectionEnd=0;
this._selectionStart=0;
this._isInFocus=true;
this._hovered=false;
this._invalid=false;
this._attachEventHandlers();
this.updateCssClass();
this._initializeButtons();
this._initialValue=this.get_value();
this.raise_load(Sys.EventArgs.Empty);
if(this._focused){
this._updateStateOnFocus();
}
},dispose:function(){
Telerik.Web.UI.RadInputControl.callBaseMethod(this,"dispose");
if(this.Button){
if(this._onButtonClickDelegate){
$removeHandler(this.Button,"click",this._onButtonClickDelegate);
this._onButtonClickDelegate=null;
}
}
if($telerik.isIE){
if(this._onTextBoxPasteDelegate){
$removeHandler(this._textBoxElement,"paste",this._onTextBoxPasteDelegate);
this._onTextBoxPasteDelegate=null;
}
}else{
if(this._onTextBoxInputDelegate){
$removeHandler(this._textBoxElement,"input",this._onTextBoxInputDelegate);
this._onTextBoxInputDelegate=null;
}
}
if(this._onTextBoxKeyDownDelegate){
$removeHandler(this._textBoxElement,"keydown",this._onTextBoxKeyDownDelegate);
this._onTextBoxKeyDownDelegate=null;
}
if(this._onTextBoxKeyPressDelegate){
$removeHandler(this._textBoxElement,"keypress",this._onTextBoxKeyPressDelegate);
this._onTextBoxKeyPressDelegate=null;
}
if(this._onTextBoxKeyUpDelegate){
$removeHandler(this._textBoxElement,"keyup",this._onTextBoxKeyUpDelegate);
this._onTextBoxKeyUpDelegate=null;
}
if(this._onTextBoxBlurDelegate){
$removeHandler(this._textBoxElement,"blur",this._onTextBoxBlurDelegate);
this._onTextBoxBlurDelegate=null;
}
if(this._onTextBoxFocusDelegate){
$removeHandler(this._textBoxElement,"focus",this._onTextBoxFocusDelegate);
this._onTextBoxFocusDelegate=null;
}
if(this._onTextBoxMouseOutDelegate){
$removeHandler(this._textBoxElement,"mouseout",this._onTextBoxMouseOutDelegate);
this._onTextBoxMouseOutDelegate=null;
}
if(this._onTextBoxMouseOverDelegate){
$removeHandler(this._textBoxElement,"mouseover",this._onTextBoxMouseOverDelegate);
this._onTextBoxMouseOverDelegate=null;
}
if($telerik.isSafari&&this._onTextBoxMouseUpDelegate){
$removeHandler(this._textBoxElement,"mouseup",this._onTextBoxMouseUpDelegate);
this._onTextBoxMouseUpDelegate=null;
}
if(Sys.Browser.agent!=Sys.Browser.InternetExplorer){
if(this._onTextBoxMouseWheelDelegate){
$removeHandler(this._textBoxElement,"DOMMouseScroll",this._onTextBoxMouseWheelDelegate);
this._onTextBoxMouseWheelDelegate=null;
}
if(this._onTextBoxDragDropDelegate){
$removeHandler(this._textBoxElement,"dragdrop",this._onTextBoxDragDropDelegate);
this._onTextBoxDragDropDelegate=null;
}
}else{
if(this._onTextBoxMouseWheelDelegate){
$removeHandler(this._textBoxElement,"mousewheel",this._onTextBoxMouseWheelDelegate);
this._onTextBoxMouseWheelDelegate=null;
}
if(this._onTextBoxDragDropDelegate){
$removeHandler(this._textBoxElement,"drop",this._onTextBoxDragDropDelegate);
this._onTextBoxDragDropDelegate=null;
}
}
if(this._textBoxElement){
this._textBoxElement._events=null;
}
},clear:function(){
this.set_value("");
},disable:function(){
this.set_enabled(false);
this._textBoxElement.disabled="disabled";
this.updateCssClass();
this.updateClientState();
this.raise_disable(Sys.EventArgs.Empty);
},enable:function(){
this.set_enabled(true);
this._textBoxElement.disabled="";
this.updateCssClass();
this.updateClientState();
this.raise_enable(Sys.EventArgs.Empty);
},focus:function(){
this._textBoxElement.focus();
},blur:function(){
this._textBoxElement.blur();
},isEmpty:function(){
return this._hiddenElement.value=="";
},isNegative:function(){
return false;
},isReadOnly:function(){
return this._textBoxElement.readOnly||!this._enabled;
},isMultiLine:function(){
return this._textBoxElement.tagName.toUpperCase()=="TEXTAREA";
},updateDisplayValue:function(){
if(this._focused){
this.set_textBoxValue(this.get_editValue());
}else{
if(this.isEmpty()&&this.get_emptyMessage()){
this._textBoxElement.maxLength=2147483647;
this._isEmptyMessage=true;
this.set_textBoxValue(this.get_emptyMessage());
this._textBoxElement.maxLength=this._originalMaxLength;
}else{
this._isEmptyMessage=false;
this.set_textBoxValue(this.get_displayValue());
}
}
},__isEmptyMessage:function(){
return this.isEmpty()&&this.get_emptyMessage();
},resetWidthInPixels:function(){
if($telerik.isIE&&this._textBoxElement.clientWidth>0&&(this._textBoxElement.parentNode.tagName.toLowerCase()=="td"||(this._textBoxElement.parentNode.parentNode.tagName.toLowerCase()=="td"&&this._textBoxElement.parentNode.parentNode.className=="rcInputCell")||(this._textBoxElement.parentNode.tagName.toLowerCase()=="span"&&this._textBoxElement.parentNode.parentNode.className!="rcInputCell"&&this._textBoxElement.currentStyle["width"].indexOf("%")!=-1))){
var _2=this._textBoxElement.value;
var _3;
var _4;
var _5="";
if(_2!=""){
this._textBoxElement.value="";
this._textBoxElement.style.cssText=this._textBoxElement.style.cssText;
}
_3=parseInt(this._textBoxElement.currentStyle["paddingLeft"])+parseInt(this._textBoxElement.currentStyle["paddingRight"]);
_4=this._textBoxElement.clientWidth-_3;
this._textBoxElement.style.width=_4+"px";
if(this._textBoxElement.parentNode.tagName.toLowerCase()=="td"){
this._textBoxElement.parentNode.style.paddingRight="0px";
}else{
if(this._textBoxElement.parentNode.parentNode.tagName.toLowerCase()=="td"&&this._textBoxElement.parentNode.parentNode.className=="rcInputCell"){
this._textBoxElement.parentNode.parentNode.style.paddingRight="0px";
}
}
if(_2!=""){
this._textBoxElement.value=_2;
}
var _6=this._originalTextBoxCssText.split(";");
for(var i=0;i<_6.length;i++){
var _8=_6[i].split(":");
if(_8.length==2){
var _9=""+_8[0].toLowerCase();
if(_9!="width"){
_5+=_6[i]+";";
}else{
_5+="width:"+_4+"px;";
}
}
}
this._originalTextBoxCssText=_5;
}
},updateCssClass:function(){
if(this._enabled&&(!this.__isEmptyMessage())&&(!this.isNegative())){
this._textBoxElement.style.cssText=this._originalTextBoxCssText+this.updateCssText(this.get_styles()["EnabledStyle"][0]);
this._textBoxElement.className=this.get_styles()["EnabledStyle"][1];
}
if(this._enabled&&(!this.__isEmptyMessage())&&this.isNegative()){
this._textBoxElement.style.cssText=this._originalTextBoxCssText+this.updateCssText(this.get_styles()["NegativeStyle"][0]);
this._textBoxElement.className=this.get_styles()["NegativeStyle"][1];
}
if(this._enabled&&this.__isEmptyMessage()){
this._textBoxElement.style.cssText=this._originalTextBoxCssText+this.updateCssText(this.get_styles()["EmptyMessageStyle"][0]);
this._textBoxElement.className=this.get_styles()["EmptyMessageStyle"][1];
}
if(this._hovered){
this._textBoxElement.style.cssText=this._originalTextBoxCssText+this.updateCssText(this.get_styles()["HoveredStyle"][0]);
this._textBoxElement.className=this.get_styles()["HoveredStyle"][1];
}
if(this._focused){
this._textBoxElement.style.cssText=this._originalTextBoxCssText+this.updateCssText(this.get_styles()["FocusedStyle"][0]);
this._textBoxElement.className=this.get_styles()["FocusedStyle"][1];
}
if(this._invalid){
this._textBoxElement.style.cssText=this._originalTextBoxCssText+this.updateCssText(this.get_styles()["InvalidStyle"][0]);
this._textBoxElement.className=this.get_styles()["InvalidStyle"][1];
}
if(this._textBoxElement.readOnly){
this._textBoxElement.style.cssText=this._originalTextBoxCssText+this.updateCssText(this.get_styles()["ReadOnlyStyle"][0]);
this._textBoxElement.className=this.get_styles()["ReadOnlyStyle"][1];
}
if(!this._enabled){
this._textBoxElement.style.cssText=this._originalTextBoxCssText+this.updateCssText(this.get_styles()["DisabledStyle"][0]);
this._textBoxElement.className=this.get_styles()["DisabledStyle"][1];
}
},updateCssText:function(_a){
var _b=_a.split(";");
var i;
var _d="";
for(i=0;i<_b.length;i++){
var _e=_b[i].split(":");
if(_e.length==2){
var _f=""+_e[0].toLowerCase();
if(_f!="width"&&_f!="height"){
_d+=_b[i]+";";
}
}
}
return _d;
},selectText:function(_10,end){
this._selectionStart=_10;
this._selectionEnd=end;
this._applySelection();
},selectAllText:function(){
if(this._textBoxElement.value.length>0){
this.selectText(0,this._textBoxElement.value.length);
return true;
}
return false;
},GetValue:function(){
return this.get_value();
},SetValue:function(_12){
this.set_value(_12);
},GetDisplayValue:function(){
return this.get_displayValue();
},GetEditValue:function(){
return this.get_editValue();
},SetCaretPosition:function(_13){
this.set_caretPosition(_13);
},GetWrapperElement:function(){
return this.get_wrapperElement();
},GetTextBoxValue:function(){
return this.get_textBoxValue();
},SetTextBoxValue:function(_14){
this.set_textBoxValue(_14);
},get_value:function(){
return this._hiddenElement.value;
},set_value:function(_15){
var _16=new Telerik.Web.UI.InputValueChangingEventArgs(_15,this._initialValue);
this.raise_valueChanging(_16);
if(_16.get_cancel()==true){
this._SetValue(this._initialValue);
return false;
}
if(_16.get_newValue()){
_15=_16.get_newValue();
}
var _17=this._setHiddenValue(_15);
if(_17==false){
_15="";
}
this._triggerDomEvent("change",this._getValidationField());
this.raise_valueChanged(_15,this._initialValue);
if(typeof (_17)=="undefined"||_17==true){
this.set_textBoxValue(this.get_editValue());
this.updateDisplayValue();
this.updateCssClass();
}
},get_displayValue:function(){
return this._hiddenElement.value;
},get_editValue:function(){
return this._hiddenElement.value;
},set_caretPosition:function(_18){
this._selectionStart=_18;
this._selectionEnd=_18;
this._applySelection();
},get_caretPosition:function(){
this._calculateSelection();
if(this._selectionStart!=this._selectionEnd){
return new Array(this._selectionStart,this._selectionEnd);
}else{
return this._selectionStart;
}
},raisePostBackEvent:function(){
eval(this._postBackEventReferenceScript);
},get_wrapperElement:function(){
return $get(this._wrapperElementID);
},get_textBoxValue:function(){
return this._textBoxElement.value;
},set_textBoxValue:function(_19){
if(this._textBoxElement.value!=_19){
this._textBoxElement.value=_19;
}
},get_autoPostBack:function(){
return this._autoPostBack;
},set_autoPostBack:function(_1a){
if(this._autoPostBack!==_1a){
this._autoPostBack=_1a;
this.raisePropertyChanged("autoPostBack");
}
},get_emptyMessage:function(){
return this._emptyMessage;
},set_emptyMessage:function(_1b){
if(this._emptyMessage!==_1b){
this._emptyMessage=_1b;
this._isEmptyMessage=(_1b!="");
this.updateClientState();
this.raisePropertyChanged("emptyMessage");
}
},get_selectionOnFocus:function(){
return this._selectionOnFocus;
},set_selectionOnFocus:function(_1c){
if(this._selectionOnFocus!==_1c){
this._selectionOnFocus=_1c;
this.raisePropertyChanged("selectionOnFocus");
}
},get_showButton:function(){
return this._showButton;
},set_showButton:function(_1d){
if(this._showButton!==_1d){
this._showButton=_1d;
this.raisePropertyChanged("showButton");
}
},get_invalidStyleDuration:function(){
return this._invalidStyleDuration;
},set_invalidStyleDuration:function(_1e){
if(this._invalidStyleDuration!==_1e){
this._invalidStyleDuration=_1e;
this.raisePropertyChanged("invalidStyleDuration");
}
},get_enabled:function(){
return this._enabled;
},set_enabled:function(_1f){
if(this._enabled!==_1f){
this._enabled=_1f;
this.raisePropertyChanged("enabled");
}
},get_styles:function(){
return this._styles;
},set_styles:function(_20){
if(this._styles!==_20){
this._styles=_20;
this.raisePropertyChanged("styles");
}
},saveClientState:function(_21){
var _22=["enabled","emptyMessage"];
if(_21){
for(prop in _21){
_22[_22.length]=_21[prop];
}
}
var _23={};
for(var i=0;i<_22.length;i++){
_23[_22[i]]=this["get_"+_22[i]]();
}
return Sys.Serialization.JavaScriptSerializer.serialize(_23);
},_updatePercentageHeight:function(){
var _25=$get(this._wrapperElementID);
if(_25.style.height.indexOf("%")>-1){
if(_25.offsetHeight!=0){
this._textBoxElement.style.height=_25.offsetHeight+"px";
this._originalTextBoxCssText+="height:"+this._textBoxElement.style.height+";";
}else{
var obj=this;
window.setTimeout(function(){
obj._textBoxElement.style.height=_25.offsetHeight+"px";
obj._originalTextBoxCssText+="height:"+obj._textBoxElement.style.height+";";
},0);
}
}
},_initializeHiddenElement:function(id){
this._hiddenElement=$get(id);
},_initializeValidationField:function(id){
},_initializeButtons:function(){
this._onButtonClickDelegate=Function.createDelegate(this,this._onButtonClickHandler);
this.Button=null;
var _29=$get(this._wrapperElementID);
var _2a=_29.getElementsByTagName("a");
for(i=0;i<_2a.length;i++){
if(_2a[i].parentNode.className.indexOf("riBtn")!=(-1)){
this.Button=_2a[i];
$addHandler(this.Button,"click",this._onButtonClickDelegate);
}
}
},_attachEventHandlers:function(){
this._onTextBoxKeyUpDelegate=Function.createDelegate(this,this._onTextBoxKeyUpHandler);
this._onTextBoxKeyPressDelegate=Function.createDelegate(this,this._onTextBoxKeyPressHandler);
this._onTextBoxBlurDelegate=Function.createDelegate(this,this._onTextBoxBlurHandler);
this._onTextBoxFocusDelegate=Function.createDelegate(this,this._onTextBoxFocusHandler);
this._onTextBoxKeyDownDelegate=Function.createDelegate(this,this._onTextBoxKeyDownHandler);
$addHandler(this._textBoxElement,"keydown",this._onTextBoxKeyDownDelegate);
$addHandler(this._textBoxElement,"keypress",this._onTextBoxKeyPressDelegate);
$addHandler(this._textBoxElement,"keyup",this._onTextBoxKeyUpDelegate);
$addHandler(this._textBoxElement,"blur",this._onTextBoxBlurDelegate);
$addHandler(this._textBoxElement,"focus",this._onTextBoxFocusDelegate);
if($telerik.isIE){
this._onTextBoxPasteDelegate=Function.createDelegate(this,this._onTextBoxPasteHandler);
$addHandler(this._textBoxElement,"paste",this._onTextBoxPasteDelegate);
}else{
this._onTextBoxInputDelegate=Function.createDelegate(this,this._onTextBoxInputHandler);
$addHandler(this._textBoxElement,"input",this._onTextBoxInputDelegate);
}
this._attachMouseEventHandlers();
},_onTextBoxPasteHandler:function(e){
if(this.isMultiLine()){
if(!e){
var e=window.event;
}
if(e.preventDefault){
e.preventDefault();
}
var _2c=this._textBoxElement.document.selection.createRange();
var _2d=this._maxLength-this._textBoxElement.value.length+_2c.text.length;
var _2e=window.clipboardData.getData("Text").substr(0,_2d);
_2c.text=_2e;
}
},_onTextBoxInputHandler:function(e){
if(this.isMultiLine()){
this._textBoxElement.value=this._textBoxElement.value.substr(0,this._maxLength);
}
},_attachMouseEventHandlers:function(){
if($telerik.isSafari){
this._onTextBoxMouseUpDelegate=Function.createDelegate(this,this._onTextBoxMouseUpHandler);
$addHandler(this._textBoxElement,"mouseup",this._onTextBoxMouseUpDelegate);
}
this._onTextBoxMouseOutDelegate=Function.createDelegate(this,this._onTextBoxMouseOutHandler);
this._onTextBoxMouseOverDelegate=Function.createDelegate(this,this._onTextBoxMouseOverHandler);
this._onTextBoxMouseWheelDelegate=Function.createDelegate(this,this._onTextBoxMouseWheelHandler);
this._onTextBoxDragDropDelegate=Function.createDelegate(this,this._onTextBoxDragDropHandler);
$addHandler(this._textBoxElement,"mouseout",this._onTextBoxMouseOutDelegate);
$addHandler(this._textBoxElement,"mouseover",this._onTextBoxMouseOverDelegate);
if(Sys.Browser.agent!=Sys.Browser.InternetExplorer){
$addHandler(this._textBoxElement,"DOMMouseScroll",this._onTextBoxMouseWheelDelegate);
$addHandler(this._textBoxElement,"dragdrop",this._onTextBoxDragDropDelegate);
}else{
$addHandler(this._textBoxElement,"mousewheel",this._onTextBoxMouseWheelDelegate);
$addHandler(this._textBoxElement,"drop",this._onTextBoxDragDropDelegate);
}
},_onTextBoxMouseUpHandler:function(e){
this._updateSelectionOnFocus();
e.preventDefault();
e.stopPropagation();
},_onTextBoxKeyPressHandler:function(e){
var _32=new Telerik.Web.UI.InputKeyPressEventArgs(e,e.charCode,String.fromCharCode(e.charCode));
this.raise_keyPress(_32);
if(_32.get_cancel()){
e.stopPropagation();
e.preventDefault();
return false;
}
if((e.charCode==13)&&!this.isMultiLine()){
this._updateHiddenValueOnKeyPress(e);
if(this.get_autoPostBack()){
this._isEnterPressed=true;
this.raisePostBackEvent();
if(Sys.Browser.agent==Sys.Browser.InternetExplorer){
e.stopPropagation();
e.preventDefault();
}
}
return true;
}
},_onTextBoxKeyUpHandler:function(e){
this._updateHiddenValueOnKeyPress(e);
},_onTextBoxBlurHandler:function(e){
if(!this._isInFocus){
e.preventDefault();
e.stopPropagation();
return false;
}
this._isInFocus=false;
this._focused=false;
var _35=this.get_textBoxValue();
if(this._initialValue!=_35){
this.set_value(_35);
}else{
this.updateDisplayValue();
this.updateCssClass();
}
this.raise_blur(Sys.EventArgs.Empty);
this._triggerDomEvent("focus",this._getValidationField());
},_onTextBoxFocusHandler:function(e){
if(!this.isReadOnly()){
this._updateStateOnFocus();
this._triggerDomEvent("focus",this._getValidationField());
}
},_updateStateOnFocus:function(){
if(this._isDroped){
this._updateHiddenValue();
this._isDroped=false;
}
this._isInFocus=true;
this._focused=true;
this.updateDisplayValue();
this.updateCssClass();
if(!$telerik.isSafari){
this._updateSelectionOnFocus();
}
this.raise_focus(Sys.EventArgs.Empty);
},_onTextBoxMouseOutHandler:function(e){
this._hovered=false;
this.updateCssClass();
this.raise_mouseOut(Sys.EventArgs.Empty);
},_onTextBoxMouseOverHandler:function(e){
this._hovered=true;
this.updateCssClass();
this.raise_mouseOver(Sys.EventArgs.Empty);
},_onTextBoxKeyDownHandler:function(e){
},_onTextBoxMouseWheelHandler:function(e){
var _3b;
if(this._focused){
if(e.rawEvent.wheelDelta){
_3b=e.rawEvent.wheelDelta/120;
if(window.opera){
_3b=-_3b;
}
}else{
if(e.detail){
_3b=-e.rawEvent.detail/3;
}else{
if(e.rawEvent&&e.rawEvent.detail){
_3b=-e.rawEvent.detail/3;
}
}
}
if(_3b>0){
this._handleWheel(false);
}else{
this._handleWheel(true);
}
return true;
}
return false;
},_onButtonClickHandler:function(e){
var _3d=new Telerik.Web.UI.InputButtonClickEventArgs(Telerik.Web.UI.InputButtonType.Button);
this.raise_buttonClick(_3d);
},_onTextBoxDragDropHandler:function(e){
this._isDroped=true;
},_getValidationField:function(){
return this._hiddenElement;
},_calculateSelection:function(){
if((Sys.Browser.agent==Sys.Browser.Opera)||!document.selection){
this._selectionEnd=this._textBoxElement.selectionEnd;
this._selectionStart=this._textBoxElement.selectionStart;
return;
}
var s1=document.selection.createRange();
if(s1.parentElement()!=this._textBoxElement){
return;
}
var s=s1.duplicate();
s.move("character",-this._textBoxElement.value.length);
s.setEndPoint("EndToStart",s1);
var _41=s.text.length;
var _42=s.text.length+s1.text.length;
this._selectionEnd=Math.max(_41,_42);
this._selectionStart=Math.min(_41,_42);
},_SetValue:function(_43){
var _44=this._setHiddenValue(_43);
if(typeof (_44)=="undefined"||_44==true){
this.set_textBoxValue(this.get_editValue());
}
},_triggerDomEvent:function(_45,_46){
if(!_45||_45==""||!_46){
return;
}
if(_46.fireEvent&&document.createEventObject){
var _47=document.createEventObject();
_46.fireEvent(String.format("on{0}",_45),_47);
}else{
if(_46.dispatchEvent){
var _48=true;
var _47=document.createEvent("HTMLEvents");
_47.initEvent(_45,_48,true);
_46.dispatchEvent(_47);
}
}
},_updateSelectionOnFocus:function(){
if(!this.get_textBoxValue()){
this.set_caretPosition(0);
}
switch(this.get_selectionOnFocus()){
case Telerik.Web.UI.SelectionOnFocus.None:
break;
case Telerik.Web.UI.SelectionOnFocus.CaretToBeginning:
this.set_caretPosition(0);
break;
case Telerik.Web.UI.SelectionOnFocus.CaretToEnd:
if(this._textBoxElement.value.length>0){
if($telerik.isIE&&this.isMultiLine()){
var _49=0;
var _4a=0;
for(var j=0;j<this._textBoxElement.value.length;j++){
if(this._textBoxElement.value.charCodeAt(j)==10){
_49++;
}else{
if(this._textBoxElement.value.charCodeAt(j)==13){
_4a++;
}
}
}
this.set_caretPosition(this._textBoxElement.value.length-Math.max(_49,_4a));
}else{
this.set_caretPosition(this._textBoxElement.value.length);
}
}
break;
case Telerik.Web.UI.SelectionOnFocus.SelectAll:
this.selectAllText();
break;
default:
this.set_caretPosition(0);
break;
}
},_applySelection:function(){
if((Sys.Browser.agent==Sys.Browser.Opera)||!document.selection){
this._textBoxElement.selectionStart=this._selectionStart;
this._textBoxElement.selectionEnd=this._selectionEnd;
return;
}
this._textBoxElement.select();
sel=document.selection.createRange();
sel.collapse();
sel.moveStart("character",this._selectionStart);
sel.collapse();
sel.moveEnd("character",this._selectionEnd-this._selectionStart);
sel.select();
},_clearHiddenValue:function(){
this._hiddenElement.value="";
},_handleWheel:function(_4c){
},_setHiddenValue:function(_4d){
if(this._hiddenElement.value!=_4d.toString()){
this._hiddenElement.value=_4d;
}
this._setValidationField(_4d);
return true;
},_setValidationField:function(_4e){
},_updateHiddenValueOnKeyPress:function(){
this._updateHiddenValue();
},_updateHiddenValue:function(){
return this._setHiddenValue(this._textBoxElement.value);
},_escapeNewLineChars:function(_4f,_50){
_4f=escape(_4f);
var i;
for(i=0;i<_4f.length;i++){
if(_4f.indexOf("%0D%0A")>-1){
_4f=_4f.replace("%0D%0A",_50);
}else{
if(_4f.indexOf("%0A")>-1){
_4f=_4f.replace("%0A",_50);
}else{
if(_4f.indexOf("%0D")>-1){
_4f=_4f.replace("%0D",_50);
}
}
}
}
return unescape(_4f);
},_isNormalChar:function(e){
if(($telerik.isFirefox&&e.rawEvent.keyCode)||($telerik.isOpera&&e.rawEvent.which==0)||($telerik.isSafari&&(e.charCode<Sys.UI.Key.space||e.charCode>60000))){
return false;
}
return true;
},add_blur:function(_53){
this.get_events().addHandler("blur",_53);
},remove_blur:function(_54){
this.get_events().removeHandler("blur",_54);
},raise_blur:function(_55){
this.raiseEvent("blur",_55);
},add_mouseOut:function(_56){
this.get_events().addHandler("mouseOut",_56);
},remove_mouseOut:function(_57){
this.get_events().removeHandler("mouseOut",_57);
},raise_mouseOut:function(_58){
this.raiseEvent("mouseOut",_58);
},add_valueChanged:function(_59){
this.get_events().addHandler("valueChanged",_59);
},remove_valueChanged:function(_5a){
this.get_events().removeHandler("valueChanged",_5a);
},raise_valueChanged:function(_5b,_5c){
if(_5b.toString()==_5c.toString()){
return false;
}
this._initialValue=this.get_value();
var _5d=new Telerik.Web.UI.InputValueChangedEventArgs(_5b,_5c);
this.raiseEvent("valueChanged",_5d);
var _5e=!_5d.get_cancel();
if(this.get_autoPostBack()&&_5e&&!this._isEnterPressed){
this.raisePostBackEvent();
}
},add_error:function(_5f){
this.get_events().addHandler("error",_5f);
},remove_error:function(_60){
this.get_events().removeHandler("error",_60);
},raise_error:function(_61){
if(this.InEventRaise){
return;
}
this.InEventRaise=true;
this.raiseEvent("error",_61);
if(!_61.get_cancel()){
this._invalid=true;
this._errorHandlingCanceled=false;
this.updateCssClass();
var _62=this;
var _63=function(){
_62._invalid=false;
_62.updateCssClass();
};
setTimeout(_63,this.get_invalidStyleDuration());
}else{
this._errorHandlingCanceled=true;
}
this.InEventRaise=false;
},add_load:function(_64){
this.get_events().addHandler("load",_64);
},remove_load:function(_65){
this.get_events().removeHandler("load",_65);
},raise_load:function(_66){
this.raiseEvent("load",_66);
},add_mouseOver:function(_67){
this.get_events().addHandler("mouseOver",_67);
},remove_mouseOver:function(_68){
this.get_events().removeHandler("mouseOver",_68);
},raise_mouseOver:function(_69){
this.raiseEvent("mouseOver",_69);
},add_focus:function(_6a){
this.get_events().addHandler("focus",_6a);
},remove_focus:function(_6b){
this.get_events().removeHandler("focus",_6b);
},raise_focus:function(_6c){
this.raiseEvent("focus",_6c);
},add_disable:function(_6d){
this.get_events().addHandler("disable",_6d);
},remove_disable:function(_6e){
this.get_events().removeHandler("disable",_6e);
},raise_disable:function(_6f){
this.raiseEvent("disable",_6f);
},add_enable:function(_70){
this.get_events().addHandler("enable",_70);
},remove_enable:function(_71){
this.get_events().removeHandler("enable",_71);
},raise_enable:function(_72){
this.raiseEvent("enable",_72);
},add_keyPress:function(_73){
this.get_events().addHandler("keyPress",_73);
},remove_keyPress:function(_74){
this.get_events().removeHandler("keyPress",_74);
},raise_keyPress:function(_75){
this.raiseEvent("keyPress",_75);
},add_enumerationChanged:function(_76){
this.get_events().addHandler("enumerationChanged",_76);
},remove_enumerationChanged:function(_77){
this.get_events().removeHandler("enumerationChanged",_77);
},raise_enumerationChanged:function(_78){
this.raiseEvent("enumerationChanged",_78);
},add_moveUp:function(_79){
this.get_events().addHandler("moveUp",_79);
},remove_moveUp:function(_7a){
this.get_events().removeHandler("moveUp",_7a);
},raise_moveUp:function(_7b){
this.raiseEvent("moveUp",_7b);
},add_moveDown:function(_7c){
this.get_events().addHandler("moveDown",_7c);
},remove_moveDown:function(_7d){
this.get_events().removeHandler("moveDown",_7d);
},raise_moveDown:function(_7e){
this.raiseEvent("moveDown",_7e);
},add_buttonClick:function(_7f){
this.get_events().addHandler("buttonClick",_7f);
},remove_buttonClick:function(_80){
this.get_events().removeHandler("buttonClick",_80);
},raise_buttonClick:function(_81){
this.raiseEvent("buttonClick",_81);
},add_valueChanging:function(_82){
this.get_events().addHandler("valueChanging",_82);
},remove_valueChanging:function(_83){
this.get_events().removeHandler("valueChanging",_83);
},raise_valueChanging:function(_84){
this.raiseEvent("valueChanging",_84);
}};
Telerik.Web.UI.RadInputControl.registerClass("Telerik.Web.UI.RadInputControl",Telerik.Web.UI.RadWebControl);
if(typeof (ValidatorSetFocus)=="function"){
ValidatorSetFocus=function(val,_86){
var _87;
if(typeof (val.controlhookup)=="string"){
var _88;
if((typeof (_86)!="undefined")&&(_86!=null)){
if((typeof (_86.srcElement)!="undefined")&&(_86.srcElement!=null)){
_88=_86.srcElement;
}else{
_88=_86.target;
}
}
if((typeof (_88)!="undefined")&&(_88!=null)&&(typeof (_88.id)=="string")&&(_88.id==val.controlhookup)){
_87=_88;
}
}
if((typeof (_87)=="undefined")||(_87==null)){
_87=document.getElementById(val.controltovalidate);
}
var _89=false;
if((_87.style)&&(typeof (_87.style.visibility)!="undefined")&&(_87.style.visibility=="hidden")&&(typeof (_87.style.width)!="undefined")&&(document.getElementById(_87.id+"_text"))&&(_87.tagName.toLowerCase()=="input")){
_89=true;
}
if((typeof (_87)!="undefined")&&(_87!=null)&&(_87.tagName.toLowerCase()!="table"||(typeof (_86)=="undefined")||(_86==null))&&((_87.tagName.toLowerCase()!="input")||(_87.type.toLowerCase()!="hidden"))&&(typeof (_87.disabled)=="undefined"||_87.disabled==null||_87.disabled==false)&&(typeof (_87.visible)=="undefined"||_87.visible==null||_87.visible!=false)&&(IsInVisibleContainer(_87)||_89)){
if(_87.tagName.toLowerCase()=="table"&&(typeof (__nonMSDOMBrowser)=="undefined"||__nonMSDOMBrowser)){
var _8a=_87.getElementsByTagName("input");
var _8b=_8a[_8a.length-1];
if(_8b!=null){
_87=_8b;
}
}
if(typeof (_87.focus)!="undefined"&&_87.focus!=null){
if(_89){
document.getElementById(_87.id+"_text").focus();
}else{
_87.focus();
}
Page_InvalidControlToBeFocused=_87;
}
}
};
}
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.InputErrorReason=function(){
};
Telerik.Web.UI.InputErrorReason.prototype={ParseError:1,OutOfRange:2};
Telerik.Web.UI.InputErrorReason.registerEnum("Telerik.Web.UI.InputErrorReason",false);
Telerik.Web.UI.SelectionOnFocus=function(){
};
Telerik.Web.UI.SelectionOnFocus.prototype={None:0,CaretToBeginning:1,CaretToEnd:2,SelectAll:3};
Telerik.Web.UI.SelectionOnFocus.registerEnum("Telerik.Web.UI.SelectionOnFocus",false);
Telerik.Web.UI.InputButtonType=function(){
};
Telerik.Web.UI.InputButtonType.prototype={Button:1,MoveUpButton:2,MoveDownButton:3};
Telerik.Web.UI.InputButtonType.registerEnum("Telerik.Web.UI.InputButtonType",false);
Telerik.Web.UI.DisplayFormatPosition=function(){
};
Telerik.Web.UI.DisplayFormatPosition.prototype={Left:1,Right:2};
Telerik.Web.UI.DisplayFormatPosition.registerEnum("Telerik.Web.UI.DisplayFormatPosition",false);
Telerik.Web.UI.InputSettingValidateOnEvent=function(){
};
Telerik.Web.UI.InputSettingValidateOnEvent.prototype={Blur:0,Submit:1,All:2};
Telerik.Web.UI.InputSettingValidateOnEvent.registerEnum("Telerik.Web.UI.InputSettingValidateOnEvent",false);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.InputValueChangedEventArgs=function(_8c,_8d){
Telerik.Web.UI.InputValueChangedEventArgs.initializeBase(this);
this._newValue=_8c;
this._oldValue=_8d;
};
Telerik.Web.UI.InputValueChangedEventArgs.prototype={get_oldValue:function(){
return this._oldValue;
},get_newValue:function(){
return this._newValue;
}};
Telerik.Web.UI.InputValueChangedEventArgs.registerClass("Telerik.Web.UI.InputValueChangedEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.InputValueChangingEventArgs=function(_8e,_8f){
Telerik.Web.UI.InputValueChangingEventArgs.initializeBase(this,[_8e,_8f]);
};
Telerik.Web.UI.InputValueChangingEventArgs.prototype={set_newValue:function(_90){
if(this._newValue!==_90){
this._newValue=_90;
}
}};
Telerik.Web.UI.InputValueChangingEventArgs.registerClass("Telerik.Web.UI.InputValueChangingEventArgs",Telerik.Web.UI.InputValueChangedEventArgs);
Telerik.Web.UI.MaskedTextBoxEventArgs=function(_91,_92,_93){
Telerik.Web.UI.MaskedTextBoxEventArgs.initializeBase(this);
this._newValue=_91;
this._oldValue=_92;
this._chunk=_93;
};
Telerik.Web.UI.MaskedTextBoxEventArgs.prototype={get_oldValue:function(){
return this._oldValue;
},get_newValue:function(){
return this._newValue;
},get_currentPart:function(){
return this._chunk;
}};
Telerik.Web.UI.MaskedTextBoxEventArgs.registerClass("Telerik.Web.UI.MaskedTextBoxEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.InputKeyPressEventArgs=function(_94,_95,_96){
Telerik.Web.UI.InputKeyPressEventArgs.initializeBase(this);
this._domEvent=_94;
this._keyCode=_95;
this._keyCharacter=_96;
};
Telerik.Web.UI.InputKeyPressEventArgs.prototype={get_domEvent:function(){
return this._domEvent;
},get_keyCode:function(){
return this._keyCode;
},get_keyCharacter:function(){
return this._keyCharacter;
}};
Telerik.Web.UI.InputKeyPressEventArgs.registerClass("Telerik.Web.UI.InputKeyPressEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.InputButtonClickEventArgs=function(_97){
Telerik.Web.UI.InputButtonClickEventArgs.initializeBase(this);
this._buttonType=_97;
};
Telerik.Web.UI.InputButtonClickEventArgs.prototype={get_buttonType:function(){
return this._buttonType;
}};
Telerik.Web.UI.InputButtonClickEventArgs.registerClass("Telerik.Web.UI.InputButtonClickEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.InputErrorEventArgs=function(_98,_99){
Telerik.Web.UI.InputErrorEventArgs.initializeBase(this);
this._reason=_98;
this._inputText=_99;
};
Telerik.Web.UI.InputErrorEventArgs.prototype={get_reason:function(){
return this._reason;
},get_inputText:function(){
return this._inputText;
}};
Telerik.Web.UI.InputErrorEventArgs.registerClass("Telerik.Web.UI.InputErrorEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.NumericInputErrorEventArgs=function(_9a,_9b,_9c,_9d){
Telerik.Web.UI.NumericInputErrorEventArgs.initializeBase(this,[_9a,_9b]);
this._keyCode=_9c;
this._keyCharacter=_9d;
};
Telerik.Web.UI.NumericInputErrorEventArgs.prototype={get_reason:function(){
return this._reason;
},get_inputText:function(){
return this._inputText;
},get_keyCode:function(){
return this._keyCode;
},get_keyCharacter:function(){
return this._keyCharacter;
}};
Telerik.Web.UI.NumericInputErrorEventArgs.registerClass("Telerik.Web.UI.NumericInputErrorEventArgs",Telerik.Web.UI.InputErrorEventArgs);
Telerik.Web.UI.InputManagerKeyPressEventArgs=function(_9e,_9f,_a0,_a1){
Telerik.Web.UI.InputManagerKeyPressEventArgs.initializeBase(this,[_9e,_9f,_a0]);
this._targetInput=_a1;
};
Telerik.Web.UI.InputManagerKeyPressEventArgs.prototype={get_targetInput:function(){
return this._targetInput;
}};
Telerik.Web.UI.InputManagerKeyPressEventArgs.registerClass("Telerik.Web.UI.InputManagerKeyPressEventArgs",Telerik.Web.UI.InputKeyPressEventArgs);
Telerik.Web.UI.InputManagerEventArgs=function(_a2,_a3){
Telerik.Web.UI.InputManagerEventArgs.initializeBase(this);
this._targetInput=_a2;
this._domEvent=_a3;
};
Telerik.Web.UI.InputManagerEventArgs.prototype={get_targetInput:function(){
return this._targetInput;
},get_domEvent:function(){
return this._domEvent;
}};
Telerik.Web.UI.InputManagerEventArgs.registerClass("Telerik.Web.UI.InputManagerEventArgs",Sys.EventArgs);
Telerik.Web.UI.InputManagerErrorEventArgs=function(_a4,_a5,_a6){
Telerik.Web.UI.InputManagerErrorEventArgs.initializeBase(this,[_a4,_a5]);
this._targetInput=_a6;
};
Telerik.Web.UI.InputManagerErrorEventArgs.prototype={get_targetInput:function(){
return this._targetInput;
},set_inputText:function(_a7){
this._inputText=_a7;
}};
Telerik.Web.UI.InputManagerErrorEventArgs.registerClass("Telerik.Web.UI.InputManagerErrorEventArgs",Telerik.Web.UI.InputErrorEventArgs);
Telerik.Web.UI.NumericInputManagerErrorEventArgs=function(_a8,_a9,_aa,_ab,_ac){
Telerik.Web.UI.NumericInputManagerErrorEventArgs.initializeBase(this,[_a8,_a9,_aa,_ab]);
this._targetInput=_ac;
};
Telerik.Web.UI.NumericInputManagerErrorEventArgs.prototype={get_targetInput:function(){
return this._targetInput;
}};
Telerik.Web.UI.NumericInputManagerErrorEventArgs.registerClass("Telerik.Web.UI.NumericInputManagerErrorEventArgs",Telerik.Web.UI.NumericInputErrorEventArgs);
Telerik.Web.UI.InputManagerValidatingEventArgs=function(_ad){
Telerik.Web.UI.InputManagerValidatingEventArgs.initializeBase(this);
this._input=_ad;
this._isValid=true;
};
Telerik.Web.UI.InputManagerValidatingEventArgs.prototype={get_input:function(){
return this._input;
},get_isValid:function(){
return this._isValid;
},set_isValid:function(_ae){
this._isValid=_ae;
}};
Telerik.Web.UI.InputManagerValidatingEventArgs.registerClass("Telerik.Web.UI.InputManagerValidatingEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.RadTextBox=function(_af){
Telerik.Web.UI.RadTextBox.initializeBase(this,[_af]);
this._maxLength=0;
};
Telerik.Web.UI.RadTextBox.prototype={initialize:function(){
Telerik.Web.UI.RadTextBox.callBaseMethod(this,"initialize");
if((!$telerik.isFirefox)&&(this._textBoxElement)&&(this._textBoxElement.type=="password")){
var obj=this;
setTimeout(function(){
obj._SetValue("");
obj.updateDisplayValue();
},0);
}
if(this._textBoxElement&&this._textBoxElement.nodeName&&(this._textBoxElement.nodeName.toUpperCase()=="TEXTAREA")){
this.updateDisplayValue();
}
},dispose:function(){
Telerik.Web.UI.RadTextBox.callBaseMethod(this,"dispose");
},_onTextBoxKeyPressHandler:function(e){
Telerik.Web.UI.RadTextBox.callBaseMethod(this,"_onTextBoxKeyPressHandler",[e]);
var _b2=this._escapeNewLineChars(this._textBoxElement.value,"");
if((this.get_maxLength()>0)&&(_b2.length>=this.get_maxLength())&&(this._isNormalChar(e))){
e.stopPropagation();
e.preventDefault();
return false;
}
},get_maxLength:function(){
return this._maxLength;
},set_maxLength:function(_b3){
if(this._maxLength!==_b3){
this._maxLength=_b3;
this.raisePropertyChanged("maxLength");
}
}};
Telerik.Web.UI.RadTextBox.registerClass("Telerik.Web.UI.RadTextBox",Telerik.Web.UI.RadInputControl);

