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.raise_disable(Sys.EventArgs.Empty);
},enable:function(){
this.set_enabled(true);
this._textBoxElement.disabled="";
this.updateCssClass();
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.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");
}
},_updatePercentageHeight:function(){
var _21=$get(this._wrapperElementID);
if(_21.style.height.indexOf("%")>-1){
if(_21.offsetHeight!=0){
this._textBoxElement.style.height=_21.offsetHeight+"px";
this._originalTextBoxCssText+="height:"+this._textBoxElement.style.height+";";
}else{
var obj=this;
window.setTimeout(function(){
obj._textBoxElement.style.height=_21.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 _25=$get(this._wrapperElementID);
var _26=_25.getElementsByTagName("a");
for(i=0;i<_26.length;i++){
if(_26[i].parentNode.className.indexOf("riBtn")!=(-1)){
this.Button=_26[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 _28=this._textBoxElement.document.selection.createRange();
var _29=this._maxLength-this._textBoxElement.value.length+_28.text.length;
var _2a=window.clipboardData.getData("Text").substr(0,_29);
_28.text=_2a;
}
},_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 _2e=new Telerik.Web.UI.InputKeyPressEventArgs(e,e.charCode,String.fromCharCode(e.charCode));
this.raise_keyPress(_2e);
if(_2e.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 _31=this.get_textBoxValue();
if(this._initialValue!=_31){
this.set_value(_31);
}else{
this.updateDisplayValue();
this.updateCssClass();
}
this.raise_blur(Sys.EventArgs.Empty);
this._triggerDomEvent("focus",this._getValidationField());
},_onTextBoxFocusHandler:function(e){
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 _37;
if(this._focused){
if(e.rawEvent.wheelDelta){
_37=e.rawEvent.wheelDelta/120;
if(window.opera){
_37=-_37;
}
}else{
if(e.detail){
_37=-e.rawEvent.detail/3;
}else{
if(e.rawEvent&&e.rawEvent.detail){
_37=-e.rawEvent.detail/3;
}
}
}
if(_37>0){
this._handleWheel(false);
}else{
this._handleWheel(true);
}
return true;
}
return false;
},_onButtonClickHandler:function(e){
var _39=new Telerik.Web.UI.InputButtonClickEventArgs(Telerik.Web.UI.InputButtonType.Button);
this.raise_buttonClick(_39);
},_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 _3d=s.text.length;
var _3e=s.text.length+s1.text.length;
this._selectionEnd=Math.max(_3d,_3e);
this._selectionStart=Math.min(_3d,_3e);
},_SetValue:function(_3f){
var _40=this._setHiddenValue(_3f);
if(typeof (_40)=="undefined"||_40==true){
this.set_textBoxValue(this.get_editValue());
}
},_triggerDomEvent:function(_41,_42){
if(!_41||_41==""||!_42){
return;
}
if(_42.fireEvent&&document.createEventObject){
var _43=document.createEventObject();
_42.fireEvent(String.format("on{0}",_41),_43);
}else{
if(_42.dispatchEvent){
var _44=true;
var _43=document.createEvent("HTMLEvents");
_43.initEvent(_41,_44,true);
_42.dispatchEvent(_43);
}
}
},_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 _45=0;
var _46=0;
for(var j=0;j<this._textBoxElement.value.length;j++){
if(this._textBoxElement.value.charCodeAt(j)==10){
_45++;
}else{
if(this._textBoxElement.value.charCodeAt(j)==13){
_46++;
}
}
}
this.set_caretPosition(this._textBoxElement.value.length-Math.max(_45,_46));
}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(_48){
},_setHiddenValue:function(_49){
if(this._hiddenElement.value!=_49.toString()){
this._hiddenElement.value=_49;
}
this._setValidationField(_49);
return true;
},_setValidationField:function(_4a){
},_updateHiddenValueOnKeyPress:function(){
this._updateHiddenValue();
},_updateHiddenValue:function(){
return this._setHiddenValue(this._textBoxElement.value);
},_escapeNewLineChars:function(_4b,_4c){
_4b=escape(_4b);
var i;
for(i=0;i<_4b.length;i++){
if(_4b.indexOf("%0D%0A")>-1){
_4b=_4b.replace("%0D%0A",_4c);
}else{
if(_4b.indexOf("%0A")>-1){
_4b=_4b.replace("%0A",_4c);
}else{
if(_4b.indexOf("%0D")>-1){
_4b=_4b.replace("%0D",_4c);
}
}
}
}
return unescape(_4b);
},_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(_4f){
this.get_events().addHandler("blur",_4f);
},remove_blur:function(_50){
this.get_events().removeHandler("blur",_50);
},raise_blur:function(_51){
this.raiseEvent("blur",_51);
},add_mouseOut:function(_52){
this.get_events().addHandler("mouseOut",_52);
},remove_mouseOut:function(_53){
this.get_events().removeHandler("mouseOut",_53);
},raise_mouseOut:function(_54){
this.raiseEvent("mouseOut",_54);
},add_valueChanged:function(_55){
this.get_events().addHandler("valueChanged",_55);
},remove_valueChanged:function(_56){
this.get_events().removeHandler("valueChanged",_56);
},raise_valueChanged:function(_57,_58){
if(_57.toString()==_58.toString()){
return false;
}
this._initialValue=this.get_value();
var _59=new Telerik.Web.UI.InputValueChangedEventArgs(_57,_58);
this.raiseEvent("valueChanged",_59);
var _5a=!_59.get_cancel();
if(this.get_autoPostBack()&&_5a&&!this._isEnterPressed){
this.raisePostBackEvent();
}
},add_error:function(_5b){
this.get_events().addHandler("error",_5b);
},remove_error:function(_5c){
this.get_events().removeHandler("error",_5c);
},raise_error:function(_5d){
if(this.InEventRaise){
return;
}
this.InEventRaise=true;
this.raiseEvent("error",_5d);
if(!_5d.get_cancel()){
this._invalid=true;
this._errorHandlingCanceled=false;
this.updateCssClass();
var _5e=this;
var _5f=function(){
_5e._invalid=false;
_5e.updateCssClass();
};
setTimeout(_5f,this.get_invalidStyleDuration());
}else{
this._errorHandlingCanceled=true;
}
this.InEventRaise=false;
},add_load:function(_60){
this.get_events().addHandler("load",_60);
},remove_load:function(_61){
this.get_events().removeHandler("load",_61);
},raise_load:function(_62){
this.raiseEvent("load",_62);
},add_mouseOver:function(_63){
this.get_events().addHandler("mouseOver",_63);
},remove_mouseOver:function(_64){
this.get_events().removeHandler("mouseOver",_64);
},raise_mouseOver:function(_65){
this.raiseEvent("mouseOver",_65);
},add_focus:function(_66){
this.get_events().addHandler("focus",_66);
},remove_focus:function(_67){
this.get_events().removeHandler("focus",_67);
},raise_focus:function(_68){
this.raiseEvent("focus",_68);
},add_disable:function(_69){
this.get_events().addHandler("disable",_69);
},remove_disable:function(_6a){
this.get_events().removeHandler("disable",_6a);
},raise_disable:function(_6b){
this.raiseEvent("disable",_6b);
},add_enable:function(_6c){
this.get_events().addHandler("enable",_6c);
},remove_enable:function(_6d){
this.get_events().removeHandler("enable",_6d);
},raise_enable:function(_6e){
this.raiseEvent("enable",_6e);
},add_keyPress:function(_6f){
this.get_events().addHandler("keyPress",_6f);
},remove_keyPress:function(_70){
this.get_events().removeHandler("keyPress",_70);
},raise_keyPress:function(_71){
this.raiseEvent("keyPress",_71);
},add_enumerationChanged:function(_72){
this.get_events().addHandler("enumerationChanged",_72);
},remove_enumerationChanged:function(_73){
this.get_events().removeHandler("enumerationChanged",_73);
},raise_enumerationChanged:function(_74){
this.raiseEvent("enumerationChanged",_74);
},add_moveUp:function(_75){
this.get_events().addHandler("moveUp",_75);
},remove_moveUp:function(_76){
this.get_events().removeHandler("moveUp",_76);
},raise_moveUp:function(_77){
this.raiseEvent("moveUp",_77);
},add_moveDown:function(_78){
this.get_events().addHandler("moveDown",_78);
},remove_moveDown:function(_79){
this.get_events().removeHandler("moveDown",_79);
},raise_moveDown:function(_7a){
this.raiseEvent("moveDown",_7a);
},add_buttonClick:function(_7b){
this.get_events().addHandler("buttonClick",_7b);
},remove_buttonClick:function(_7c){
this.get_events().removeHandler("buttonClick",_7c);
},raise_buttonClick:function(_7d){
this.raiseEvent("buttonClick",_7d);
},add_valueChanging:function(_7e){
this.get_events().addHandler("valueChanging",_7e);
},remove_valueChanging:function(_7f){
this.get_events().removeHandler("valueChanging",_7f);
},raise_valueChanging:function(_80){
this.raiseEvent("valueChanging",_80);
}};
Telerik.Web.UI.RadInputControl.registerClass("Telerik.Web.UI.RadInputControl",Telerik.Web.UI.RadWebControl);
if(typeof (ValidatorSetFocus)=="function"){
ValidatorSetFocus=function(val,_82){
var _83;
if(typeof (val.controlhookup)=="string"){
var _84;
if((typeof (_82)!="undefined")&&(_82!=null)){
if((typeof (_82.srcElement)!="undefined")&&(_82.srcElement!=null)){
_84=_82.srcElement;
}else{
_84=_82.target;
}
}
if((typeof (_84)!="undefined")&&(_84!=null)&&(typeof (_84.id)=="string")&&(_84.id==val.controlhookup)){
_83=_84;
}
}
if((typeof (_83)=="undefined")||(_83==null)){
_83=document.getElementById(val.controltovalidate);
}
var _85=false;
if((_83.style)&&(typeof (_83.style.visibility)!="undefined")&&(_83.style.visibility=="hidden")&&(typeof (_83.style.width)!="undefined")&&(document.getElementById(_83.id+"_text"))&&(_83.tagName.toLowerCase()=="input")){
_85=true;
}
if((typeof (_83)!="undefined")&&(_83!=null)&&(_83.tagName.toLowerCase()!="table"||(typeof (_82)=="undefined")||(_82==null))&&((_83.tagName.toLowerCase()!="input")||(_83.type.toLowerCase()!="hidden"))&&(typeof (_83.disabled)=="undefined"||_83.disabled==null||_83.disabled==false)&&(typeof (_83.visible)=="undefined"||_83.visible==null||_83.visible!=false)&&(IsInVisibleContainer(_83)||_85)){
if(_83.tagName.toLowerCase()=="table"&&(typeof (__nonMSDOMBrowser)=="undefined"||__nonMSDOMBrowser)){
var _86=_83.getElementsByTagName("input");
var _87=_86[_86.length-1];
if(_87!=null){
_83=_87;
}
}
if(typeof (_83.focus)!="undefined"&&_83.focus!=null){
if(_85){
document.getElementById(_83.id+"_text").focus();
}else{
_83.focus();
}
Page_InvalidControlToBeFocused=_83;
}
}
};
}
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);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.InputValueChangedEventArgs=function(_88,_89){
Telerik.Web.UI.InputValueChangedEventArgs.initializeBase(this);
this._newValue=_88;
this._oldValue=_89;
};
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(_8a,_8b){
Telerik.Web.UI.InputValueChangingEventArgs.initializeBase(this,[_8a,_8b]);
};
Telerik.Web.UI.InputValueChangingEventArgs.prototype={set_newValue:function(_8c){
if(this._newValue!==_8c){
this._newValue=_8c;
}
}};
Telerik.Web.UI.InputValueChangingEventArgs.registerClass("Telerik.Web.UI.InputValueChangingEventArgs",Telerik.Web.UI.InputValueChangedEventArgs);
Telerik.Web.UI.MaskedTextBoxEventArgs=function(_8d,_8e,_8f){
Telerik.Web.UI.MaskedTextBoxEventArgs.initializeBase(this);
this._newValue=_8d;
this._oldValue=_8e;
this._chunk=_8f;
};
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(_90,_91,_92){
Telerik.Web.UI.InputKeyPressEventArgs.initializeBase(this);
this._domEvent=_90;
this._keyCode=_91;
this._keyCharacter=_92;
};
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(_93){
Telerik.Web.UI.InputButtonClickEventArgs.initializeBase(this);
this._buttonType=_93;
};
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(_94,_95){
Telerik.Web.UI.InputErrorEventArgs.initializeBase(this);
this._reason=_94;
this._inputText=_95;
};
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(_96,_97,_98,_99){
Telerik.Web.UI.NumericInputErrorEventArgs.initializeBase(this,[_96,_97]);
this._keyCode=_98;
this._keyCharacter=_99;
};
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(_9a,_9b,_9c,_9d){
Telerik.Web.UI.InputManagerKeyPressEventArgs.initializeBase(this,[_9a,_9b,_9c]);
this._targetInput=_9d;
};
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(_9e,_9f){
Telerik.Web.UI.InputManagerEventArgs.initializeBase(this);
this._targetInput=_9e;
this._domEvent=_9f;
};
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(_a0,_a1,_a2){
Telerik.Web.UI.InputManagerErrorEventArgs.initializeBase(this,[_a0,_a1]);
this._targetInput=_a2;
};
Telerik.Web.UI.InputManagerErrorEventArgs.prototype={get_targetInput:function(){
return this._targetInput;
},set_inputText:function(_a3){
this._inputText=_a3;
}};
Telerik.Web.UI.InputManagerErrorEventArgs.registerClass("Telerik.Web.UI.InputManagerErrorEventArgs",Telerik.Web.UI.InputErrorEventArgs);
Telerik.Web.UI.NumericInputManagerErrorEventArgs=function(_a4,_a5,_a6,_a7,_a8){
Telerik.Web.UI.NumericInputManagerErrorEventArgs.initializeBase(this,[_a4,_a5,_a6,_a7]);
this._targetInput=_a8;
};
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.RadTextBox=function(_a9){
Telerik.Web.UI.RadTextBox.initializeBase(this,[_a9]);
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 _ac=this._escapeNewLineChars(this._textBoxElement.value,"");
if((this.get_maxLength()>0)&&(_ac.length>=this.get_maxLength())&&(this._isNormalChar(e))){
e.stopPropagation();
e.preventDefault();
return false;
}
},get_maxLength:function(){
return this._maxLength;
},set_maxLength:function(_ad){
if(this._maxLength!==_ad){
this._maxLength=_ad;
this.raisePropertyChanged("maxLength");
}
}};
Telerik.Web.UI.RadTextBox.registerClass("Telerik.Web.UI.RadTextBox",Telerik.Web.UI.RadInputControl);

