Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadInputComponent=function(){
Telerik.Web.UI.RadInputComponent.initializeBase(this);
this._inputs=new Array();
this._radInputExtender=null;
this._emptyMessage="";
this._emptyMessageCss="RadInputMgr_Default RadInput_Empty_Default";
this._readOnlyCss="RadInputMgr_Default RadInput_Read_Default";
this._invalidCss="RadInputMgr_Default RadInput_Error_Default";
this._hoveredCss="RadInputMgr_Default RadInput_Hover_Default";
this._enabledCss="RadInputMgr_Default RadInput_Enabled_Default";
this._focusedCss="RadInputMgr_Default RadInput_Focused_Default";
this._disabledCss="RadInputMgr_Default RadInput_Disabled_Default";
this._selectionOnFocus=Telerik.Web.UI.SelectionOnFocus.CaretToEnd;
this._targetControlIDs=null;
this._initializeOnClient=false;
this._isRequired=false;
this._validationGroup="";
this._validateOnEvent=2;
this._location="";
this._method="";
this._onTextBoxKeyPressDelegate=null;
this._onTextBoxBlurDelegate=null;
this._onTextBoxFocusDelegate=null;
this._onTextBoxMouseOutDelegate=null;
this._onTextBoxMouseOverDelegate=null;
};
Telerik.Web.UI.RadInputComponent.prototype={initialize:function(){
Telerik.Web.UI.RadInputComponent.callBaseMethod(this,"initialize");
var i;
var id=this.get_targetControlIDs();
for(i=0;i<id.length;i++){
this._inputs[id[i]]={"_focused":false,"_hovered":false,"_invalid":false};
this._updateValueOnInitialize(id[i]);
this._updateCssClassOnInitialize(id[i]);
if(this.get_initializeOnClient()){
this._attachEventHandlers(id[i]);
}
}
},dispose:function(){
Telerik.Web.UI.RadInputComponent.callBaseMethod(this,"dispose");
if(!this.get_initializeOnClient()){
return;
}
var i;
var _4=this.get_targetControlIDs();
for(i=0;i<_4.length;i++){
if(this._onTextBoxKeyPressDelegate&&$get(_4[i])){
$removeHandler($get(_4[i]),"keypress",this._onTextBoxKeyPressDelegate);
}
if(this._onTextBoxBlurDelegate&&$get(_4[i])){
$removeHandler($get(_4[i]),"blur",this._onTextBoxBlurDelegate);
}
if(this._onTextBoxFocusDelegate&&$get(_4[i])){
$removeHandler($get(_4[i]),"focus",this._onTextBoxFocusDelegate);
}
if(this._onTextBoxMouseOutDelegate&&$get(_4[i])){
$removeHandler($get(_4[i]),"mouseout",this._onTextBoxMouseOutDelegate);
}
if(this._onTextBoxMouseOverDelegate&&$get(_4[i])){
$removeHandler($get(_4[i]),"mouseover",this._onTextBoxMouseOverDelegate);
}
}
for(i=0;i<_4.length;i++){
if($get(_4[i])){
$get(_4[i])._events=null;
}
}
},addTargetInput:function(id){
if(!id){
return false;
}
var i;
var _7=this.get_targetControlIDs();
for(i=0;i<_7.length;i++){
if(_7[i]==id){
return false;
}
}
this.get_targetControlIDs()[_7.length]=id;
this._inputs[id]={"_focused":false,"_hovered":false,"_invalid":false};
this.get_targetInput(id).updateValue();
this.get_targetInput(id).updateCssClass();
this._attachEventHandlers(id);
return true;
},isValid:function(_8){
var _9=true;
var _a=[];
if(typeof (_8)=="undefined"){
if(this.get_validateOnEvent()==1||this.get_validateOnEvent()==2){
var _b=this.get_targetControlIDs();
for(var i=0;i<_b.length;i++){
var id=_b[i];
var _e=this.get_targetInput(id);
if(!_e){
continue;
}
var _f=$get(_e._id);
if(!_f){
continue;
}
_e.updateValue();
var _10=new Telerik.Web.UI.InputManagerValidatingEventArgs(_e);
_e._owner.raise_validating(_10);
if(_10.get_cancel()){
_e._validationCanceled=true;
_e._owner._inputs[id]._invalid=false;
var _11=_e._owner._inputs[id]._originalValue;
if(typeof (_11)=="undefined"){
_11="";
}
if(!_10.get_isValid()){
_a[_a.length]=_e._id;
_e._owner._inputs[id]._invalid=true;
_e.updateCssClass();
}
continue;
}
_e._validationCanceled=false;
if(_e._owner.get_location()!=""&&_e._owner.get_method()!=""){
var _12=new Object();
_12.id=_e._id;
_12.value=_e.get_value();
$telerik.$.ajax({async:false,type:"POST",url:_e._owner.get_location()+"/"+_e._owner.get_method(),data:Sys.Serialization.JavaScriptSerializer.serialize(_12),contentType:"application/json; charset=utf-8",dataType:"json",success:function(_13){
if(typeof (_13)=="boolean"){
_e._owner._inputs[id]._invalid=!_13;
_e.updateCssClass();
_9=_13;
}
}});
if(!_9){
_a[_a.length]=_e._id;
}
}
if(_e._owner._inputs[id]._invalid){
_9=false;
}
if(_e._owner.get_isRequired()){
_e._owner._inputs[id]._invalid=_e.isEmpty();
_e.updateCssClass();
_9=!_e.isEmpty();
if(!_9){
_a[_a.length]=_e._id;
}
}
}
}
}else{
var id=_8;
var _e=this.get_targetInput(id);
if(_e){
var _f=$get(_e._id);
if(_f){
_e.updateValue();
var _10=new Telerik.Web.UI.InputManagerValidatingEventArgs(_e);
_e._owner.raise_validating(_10);
if(!_10.get_cancel()){
if(_e._owner.get_location()!=""&&_e._owner.get_method()!=""){
var _12=new Object();
_12.id=_e._id;
_12.value=_e.get_value();
$telerik.$.ajax({async:false,type:"POST",url:_e._owner.get_location()+"/"+_e._owner.get_method(),data:Sys.Serialization.JavaScriptSerializer.serialize(_12),contentType:"application/json; charset=utf-8",dataType:"json",success:function(_14){
if(typeof (_14)=="boolean"){
_e._owner._inputs[id]._invalid=!_14;
_e.updateCssClass();
_9=_14;
}
}});
return _9;
}
if(_e._owner._inputs[id]._invalid){
_9=false;
}
if(_e._owner.get_isRequired()){
_e._owner._inputs[id]._invalid=_e.isEmpty();
_e.updateCssClass();
_9=!_e.isEmpty();
}
_e._owner._inputs[id]._validationCanceled=false;
}else{
_e._owner._inputs[id]._validationCanceled=true;
_e._owner._inputs[id]._invalid=false;
var _11=_e._owner._inputs[id]._originalValue;
if(typeof (_11)=="undefined"){
_11="";
}
if(!_10.get_isValid()){
_a[_a.length]=_e._id;
_e._owner._inputs[id]._invalid=true;
_e.updateCssClass();
}
}
}
}
}
if(_a.length>0){
_9=false;
}
return _9;
},_attachEventHandlers:function(id){
var _16=$get(id);
if(!_16){
return;
}
if(this._onTextBoxKeyPressDelegate==null){
this._onTextBoxKeyPressDelegate=Function.createDelegate(this,this._onTextBoxKeyPressHandler);
}
if(this._onTextBoxBlurDelegate==null){
this._onTextBoxBlurDelegate=Function.createDelegate(this,this._onTextBoxBlurHandler);
}
if(this._onTextBoxFocusDelegate==null){
this._onTextBoxFocusDelegate=Function.createDelegate(this,this._onTextBoxFocusHandler);
}
if(this._onTextBoxMouseOutDelegate==null){
this._onTextBoxMouseOutDelegate=Function.createDelegate(this,this._onTextBoxMouseOutHandler);
}
if(this._onTextBoxMouseOverDelegate==null){
this._onTextBoxMouseOverDelegate=Function.createDelegate(this,this._onTextBoxMouseOverHandler);
}
$addHandler(_16,"keypress",this._onTextBoxKeyPressDelegate);
$addHandler(_16,"blur",this._onTextBoxBlurDelegate);
$addHandler(_16,"focus",this._onTextBoxFocusDelegate);
$addHandler(_16,"mouseout",this._onTextBoxMouseOutDelegate);
$addHandler(_16,"mouseover",this._onTextBoxMouseOverDelegate);
},_onTextBoxKeyPressHandler:function(e){
var id=Telerik.Web.UI.RadInputManager.getTarget(e);
if(!id){
return;
}
if(e.rawEvent){
e=e.rawEvent;
}
if(e.altKey||e.ctrlKey){
return true;
}
var _19=$telerik.isIE?e.keyCode:e.which;
if(!_19||_19==8||_19==9){
return true;
}
var _1a=String.fromCharCode(_19);
var _1b=new Telerik.Web.UI.InputManagerKeyPressEventArgs(e,_19,_1a,this.get_targetInput(id));
this.raise_keyPress(_1b);
if(_1b.get_cancel()){
if(e.preventDefault){
e.preventDefault();
}
e.returnValue=false;
return false;
}
return true;
},_onTextBoxBlurHandler:function(e){
var id=Telerik.Web.UI.RadInputManager.getTarget(e);
if(!id){
return;
}
this.raise_blur(new Telerik.Web.UI.InputManagerEventArgs(this.get_targetInput(id),e));
this._inputs[id]._focused=false;
if(this.get_validateOnEvent()==0||this.get_validateOnEvent()==2){
this.isValid(id);
}
var _1e=this.get_targetInput(id);
if(!_1e._owner._inputs[id]._validationCanceled){
_1e.updateValue();
_1e.updateCssClass();
}
},_onTextBoxFocusHandler:function(e){
var id=Telerik.Web.UI.RadInputManager.getTarget(e);
if(!id){
return;
}
this.raise_focus(new Telerik.Web.UI.InputManagerEventArgs(this.get_targetInput(id),e));
this._inputs[id]._focused=true;
this.get_targetInput(id).updateValue();
this.get_targetInput(id).updateCssClass();
this.get_targetInput(id)._updateSelectionOnFocus();
},_onTextBoxMouseOutHandler:function(e){
var id=Telerik.Web.UI.RadInputManager.getTarget(e);
if(!id){
return;
}
this._inputs[id]._hovered=false;
this.get_targetInput(id).updateCssClass();
},_onTextBoxMouseOverHandler:function(e){
var id=Telerik.Web.UI.RadInputManager.getTarget(e);
if(!id){
return;
}
this._inputs[id]._hovered=true;
this.get_targetInput(id).updateCssClass();
},_updateValueOnInitialize:function(id){
if(this.get_initializeOnClient()){
this.get_targetInput(id).updateValue();
}
},_updateCssClassOnInitialize:function(id){
if(this.get_initializeOnClient()){
this.get_targetInput(id).updateCssClass();
}
},get_targetInput:function(id){
var ids=this.get_targetControlIDs();
for(i=0;i<ids.length;i++){
if(ids[i]==id){
return true;
}
}
return false;
},get_targetControlIDs:function(){
return this._targetControlIDs;
},set_targetControlIDs:function(_29){
if(this._targetControlIDs!==_29){
this._targetControlIDs=_29;
this.raisePropertyChanged("targetControlIDs");
}
},get_emptyMessage:function(){
return this._emptyMessage;
},set_emptyMessage:function(_2a){
if(this._emptyMessage!==_2a){
this._emptyMessage=_2a;
this.raisePropertyChanged("emptyMessage");
}
},set_selectionOnFocus:function(_2b){
if(this._selectionOnFocus!==_2b){
this._selectionOnFocus=_2b;
this.raisePropertyChanged("selectionOnFocus");
}
},get_emptyMessageCss:function(){
return this._emptyMessageCss;
},set_emptyMessageCss:function(_2c){
if(this._emptyMessageCss!==_2c){
this._emptyMessageCss=_2c;
this.raisePropertyChanged("emptyMessageCss");
}
},get_initializeOnClient:function(){
return this._initializeOnClient;
},set_initializeOnClient:function(_2d){
if(this._initializeOnClient!==_2d){
this._initializeOnClient=_2d;
this.raisePropertyChanged("initializeOnClient");
}
},get_focusedCss:function(){
return this._focusedCss;
},set_focusedCss:function(_2e){
if(this._focusedCss!==_2e){
this._focusedCss=_2e;
this.raisePropertyChanged("focusedCss");
}
},get_disabledCss:function(){
return this._disabledCss;
},set_disabledCss:function(_2f){
if(this._disabledCss!==_2f){
this._disabledCss=_2f;
this.raisePropertyChanged("disabledCss");
}
},get_readOnlyCss:function(){
return this._readOnlyCss;
},set_readOnlyCss:function(_30){
if(this._readOnlyCss!==_30){
this._readOnlyCss=_30;
this.raisePropertyChanged("readOnlyCss");
}
},get_invalidCss:function(){
return this._invalidCss;
},set_invalidCss:function(_31){
if(this._invalidCss!==_31){
this._invalidCss=_31;
this.raisePropertyChanged("invalidCss");
}
},get_hoveredCss:function(){
return this._hoveredCss;
},set_hoveredCss:function(_32){
if(this._hoveredCss!==_32){
this._hoveredCss=_32;
this.raisePropertyChanged("hoveredCss");
}
},get_enabledCss:function(){
return this._enabledCss;
},set_enabledCss:function(_33){
if(this._enabledCss!==_33){
this._enabledCss=_33;
this.raisePropertyChanged("enabledCss");
}
},get_targetControlID:function(){
return this._targetControlID;
},set_targetControlID:function(_34){
if(this._targetControlID!==_34){
this._targetControlID=_34;
this.raisePropertyChanged("targetControlID");
}
},get_selectionOnFocus:function(){
return this._selectionOnFocus;
},set_selectionOnFocus:function(_35){
if(this._selectionOnFocus!==_35){
this._selectionOnFocus=_35;
this.raisePropertyChanged("selectionOnFocus");
}
},get_isRequired:function(){
return this._isRequired;
},set_isRequired:function(_36){
if(this._isRequired!==_36){
this._isRequired=_36;
this.raisePropertyChanged("isRequired");
}
},get_validationGroup:function(){
return this._validationGroup;
},set_validationGroup:function(_37){
if(this._validationGroup!==_37){
this._validationGroup=_37;
this.raisePropertyChanged("validationGroup");
}
},get_validateOnEvent:function(){
return this._validateOnEvent;
},set_validateOnEvent:function(_38){
if(this._validateOnEvent!==_38){
this._validateOnEvent=_38;
this.raisePropertyChanged("validateOnEvent");
}
},get_location:function(){
return this._location;
},set_location:function(_39){
if(this._location!==_39){
this._location=_39;
this.raisePropertyChanged("location");
}
},get_method:function(){
return this._method;
},set_method:function(_3a){
if(this._method!==_3a){
this._method=_3a;
this.raisePropertyChanged("method");
}
},raiseEvent:function(_3b,_3c){
var _3d=this.get_events().getHandler(_3b);
if(_3d){
if(!_3c){
_3c=Sys.EventArgs.Empty;
}
_3d(this,_3c);
}
},add_blur:function(_3e){
this.get_events().addHandler("blur",_3e);
},remove_blur:function(_3f){
this.get_events().removeHandler("blur",_3f);
},raise_blur:function(_40){
this.raiseEvent("blur",_40);
},add_focus:function(_41){
this.get_events().addHandler("focus",_41);
},remove_focus:function(_42){
this.get_events().removeHandler("focus",_42);
},raise_focus:function(_43){
this.raiseEvent("focus",_43);
},add_keyPress:function(_44){
this.get_events().addHandler("keyPress",_44);
},remove_keyPress:function(_45){
this.get_events().removeHandler("keyPress",_45);
},raise_keyPress:function(_46){
this.raiseEvent("keyPress",_46);
},add_error:function(_47){
this.get_events().addHandler("error",_47);
},remove_error:function(_48){
this.get_events().removeHandler("error",_48);
},raise_error:function(_49){
this.raiseEvent("error",_49);
},add_validating:function(_4a){
this.get_events().addHandler("validating",_4a);
},remove_validating:function(_4b){
this.get_events().removeHandler("validating",_4b);
},raise_validating:function(_4c){
this.raiseEvent("validating",_4c);
}};
Telerik.Web.UI.RadInputComponent.registerClass("Telerik.Web.UI.RadInputComponent",Sys.Component);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadInputExtender=function(_4d,id){
this._owner=_4d;
this._id=id;
this._selectionStart=0;
this._selectionEnd=0;
};
Telerik.Web.UI.RadInputExtender.prototype={isEmpty:function(){
var _4f=$get(this._id);
if((_4f.value)&&(_4f.value==this._owner.get_emptyMessage())){
return true;
}else{
if(!_4f.value){
return true;
}
}
return false;
},get_id:function(){
return this._id;
},get_owner:function(){
return this._owner;
},get_value:function(){
var _50=$get(this._id);
if(this._owner._inputs[this._id]._focused){
return this.parseValue(_50.value);
}else{
if(this.isEmpty()){
return "";
}else{
return this.parseValue(_50.value);
}
}
},set_value:function(_51){
var _52=$get(this._id);
if(this._owner._inputs[this._id]._focused){
_52.value=this.formatEditValue(_51);
}else{
_52.value=this.formatDisplayValue(_51);
}
this.updateValue();
this.updateCssClass();
},updateCssClass:function(){
var _53=$get(this._id);
var css=_53.className;
if((!this._isEmptyMessage())&&(!this.isNegative())){
css=this._owner.get_enabledCss();
}
if((!this._isEmptyMessage())&&this.isNegative()){
css=this._owner.get_negativeCss();
}
if(this._isEmptyMessage()){
css=this._owner.get_emptyMessageCss();
}
if(this._owner._inputs[this._id]._hovered){
css=this._owner.get_hoveredCss();
}
if(this._owner._inputs[this._id]._focused){
css=this._owner.get_focusedCss();
}
if(this._owner._inputs[this._id]._invalid){
css=this._owner.get_invalidCss();
}
if(_53.readOnly){
css=this._owner.get_readOnlyCss();
}
if(_53.disabled){
css=this._owner.get_disabledCss();
}
_53.className=css;
},updateValue:function(){
var _55=$get(this._id);
if(this._owner._inputs[this._id]._focused){
_55.value=this.formatEditValue(this.parseValue(_55.value));
}else{
if(this.isEmpty()&&this._owner.get_emptyMessage()){
_55.value=this._owner.get_emptyMessage();
}else{
_55.value=this.formatDisplayValue(this.parseValue(_55.value));
}
}
},_isEmptyMessage:function(){
return this.isEmpty()&&this._owner.get_emptyMessage();
},formatEditValue:function(_56){
if(!_56){
return "";
}
return _56;
},formatDisplayValue:function(_57){
if(!_57){
return "";
}
return _57;
},parseValue:function(_58){
var _59=$get(this._id);
if((_59.value)&&(_59.value==this._owner.get_emptyMessage())){
return "";
}else{
if(!_59.value){
return "";
}
}
return _58;
},focus:function(){
$get(this._id).focus();
},blur:function(){
$get(this._id).blur();
},clear:function(){
this.set_value("");
},isNegative:function(){
return false;
},_updateSelectionOnFocus:function(){
var _5a=$get(this._id);
switch(this._owner.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(_5a.value.length>0){
this.set_caretPosition(_5a.value.length);
}
break;
case Telerik.Web.UI.SelectionOnFocus.SelectAll:
this.selectAllText();
break;
default:
this.set_caretPosition(0);
break;
}
},set_caretPosition:function(_5b){
this._selectionStart=_5b;
this._selectionEnd=_5b;
this._applySelection();
},selectAllText:function(){
var _5c=$get(this._id);
if(_5c.value.length>0){
this.selectText(0,_5c.value.length);
return true;
}
return false;
},selectText:function(_5d,end){
this._selectionStart=_5d;
this._selectionEnd=end;
this._applySelection();
},_applySelection:function(){
var _5f=$get(this._id);
if((Sys.Browser.agent==Sys.Browser.Opera)||!document.selection){
_5f.selectionStart=this._selectionStart;
_5f.selectionEnd=this._selectionEnd;
return;
}
_5f.select();
sel=document.selection.createRange();
sel.collapse();
sel.moveStart("character",this._selectionStart);
sel.collapse();
sel.moveEnd("character",this._selectionEnd-this._selectionStart);
sel.select();
},_calculateSelection:function(){
var _60=$get(this._id);
if((Sys.Browser.agent==Sys.Browser.Opera)||!document.selection){
this._selectionEnd=_60.selectionEnd;
this._selectionStart=_60.selectionStart;
return;
}
var s1=document.selection.createRange();
if(s1.parentElement()!=_60){
return;
}
var s=s1.duplicate();
s.move("character",-_60.value.length);
s.setEndPoint("EndToStart",s1);
var _63=s.text.length;
var _64=s.text.length+s1.text.length;
this._selectionEnd=Math.max(_63,_64);
this._selectionStart=Math.min(_63,_64);
},_beforeSubmit:function(){
this._owner._inputs[this._id]._focused=false;
this.updateValue();
var _65=$get(this._id);
_65.value=this.get_value();
}};
Telerik.Web.UI.RadInputExtender.registerClass("Telerik.Web.UI.RadInputExtender",null);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadInputManager=function(_66){
Telerik.Web.UI.RadInputManager.initializeBase(this,[_66]);
this._behaviors=[];
};
Telerik.Web.UI.RadInputManager.prototype={initialize:function(){
Telerik.Web.UI.RadInputManager.callBaseMethod(this,"initialize");
if((typeof (WebForm_OnSubmit)=="function")&&!Telerik.Web.UI.RadInputManager._originalWebForm_OnSubmit){
Telerik.Web.UI.RadInputManager._originalWebForm_OnSubmit=WebForm_OnSubmit;
WebForm_OnSubmit=Telerik.Web.UI.RadInputManager.WebForm_OnSubmit;
}
},dispose:function(){
if(Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack()){
var i;
var _68=this._getSettings();
for(i in _68){
if(_68[i]!=null){
_68[i].dispose();
}
}
}
Telerik.Web.UI.RadInputManager.callBaseMethod(this,"dispose");
},get_targetInput:function(id){
var _6a=Telerik.Web.UI.RadInputManager.getInputComponent(id);
if(!_6a){
return null;
}
return _6a.get_targetInput(id);
},_getSettings:function(){
var _6b=null;
var i;
for(i=0;i<this.get_behaviors().length;i++){
if(_6b==null){
_6b=new Array();
}
_6b[this.get_behaviors()[i]]=$find(this.get_behaviors()[i]);
}
return _6b;
},get_inputSettings:function(_6d){
if(typeof (_6d)=="string"){
return $find(this.get_id()+"_"+_6d);
}else{
if(!_6d){
return this._getSettings();
}else{
var _6e=_6d;
var _6f=null;
var i;
var j=0;
var _72=this._getSettings();
for(i in _72){
if(_6e.isInstanceOfType(_72[i])){
if(_6f==null){
_6f=new Array();
}
_6f[j]=_72[i];
j++;
}
}
return _6f;
}
}
},get_regExpTextBoxSettings:function(){
return this.get_inputSettings(Telerik.Web.UI.RadRegExpTextBoxComponent);
},get_textBoxSettings:function(){
return this.get_inputSettings(Telerik.Web.UI.RadTextBoxComponent);
},get_numericTextBoxSettings:function(){
return this.get_inputSettings(Telerik.Web.UI.RadNumericTextBoxComponent);
},get_dateInputSettings:function(){
return this.get_inputSettings(Telerik.Web.UI.RadDateInputComponent);
},_onSubmit:function(){
var i;
for(i in this._getSettings()){
if(this._getSettings()[i]){
this._beforeSubmit(this._getSettings()[i]);
}
}
},_beforeSubmit:function(com){
var ids=com.get_targetControlIDs();
for(i=0;i<ids.length;i++){
com.get_targetInput(ids[i])._beforeSubmit();
}
},get_behaviors:function(){
return this._behaviors;
},set_behaviors:function(_76){
if(this._behaviors!==_76){
this._behaviors=_76;
this.raisePropertyChanged("behaviors");
}
}};
Telerik.Web.UI.RadInputManager.registerClass("Telerik.Web.UI.RadInputManager",Sys.UI.Control);
Telerik.Web.UI.RadInputManager.WebForm_OnSubmit=function(){
var _77=Telerik.Web.UI.RadInputManager._originalWebForm_OnSubmit();
if(_77){
var _78=Sys.Application.getComponents();
for(var i=0;i<_78.length;i++){
var _7a=_78[i];
if(Telerik.Web.UI.RadInputManager.isInstanceOfType(_7a)){
_7a._onSubmit();
}
}
}
return _77;
};
Telerik.Web.UI.RadInputManager.ClientValidationFunction=function(_7b,_7c){
var _7d=true;
var j=0;
var _7f=Sys.Application.getComponents();
var _80=(_7b.validationGroup)?_7b.validationGroup:"";
for(var i=0;i<_7f.length;i++){
var _82=_7f[i];
if((Telerik.Web.UI.RadInputComponent.isInstanceOfType(_82)&&!(Telerik.Web.UI.RadInputManager.isInstanceOfType(_82)))&&(_80==_82.get_validationGroup())){
if(_7b.id.indexOf(_82.get_id())==-1){
continue;
}
if(!_82.isValid()){
_7d=false;
}
}
}
_7c.IsValid=_7d;
};
Telerik.Web.UI.RadInputManager.getInputComponent=function(e){
var id=null;
if(typeof (e)=="string"){
id=e;
}else{
id=Telerik.Web.UI.RadInputManager.getTarget(e);
}
if(!id){
return null;
}
var _85=Sys.Application.getComponents();
for(var i=0;i<_85.length;i++){
var _87=_85[i];
if(Telerik.Web.UI.RadInputComponent.isInstanceOfType(_87)){
if(_87._inputs[id]){
return _87;
}
}
}
return null;
};
Telerik.Web.UI.RadInputManager.getTarget=function(e){
if(e.target){
return e.target.id;
}else{
return e.srcElement.id;
}
};
window.$radIE=Telerik.Web.UI.InputEvents={blur:function(e){
var _8a=Telerik.Web.UI.RadInputManager.getInputComponent(e);
if(_8a){
_8a._onTextBoxBlurHandler(e);
}
},focus:function(e){
var _8c=Telerik.Web.UI.RadInputManager.getInputComponent(e);
if(_8c){
_8c._onTextBoxFocusHandler(e);
}
},mouseOver:function(e){
var _8e=Telerik.Web.UI.RadInputManager.getInputComponent(e);
if(_8e){
_8e._onTextBoxMouseOverHandler(e);
}
},mouseOut:function(e){
var _90=Telerik.Web.UI.RadInputManager.getInputComponent(e);
if(_90){
_90._onTextBoxMouseOutHandler(e);
}
},keyPress:function(e){
var _92=Telerik.Web.UI.RadInputManager.getInputComponent(e);
if(_92){
_92._onTextBoxKeyPressHandler(e);
}
}};
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadTextBoxComponent=function(){
Telerik.Web.UI.RadTextBoxComponent.initializeBase(this);
};
Telerik.Web.UI.RadTextBoxComponent.prototype={initialize:function(){
Telerik.Web.UI.RadTextBoxComponent.callBaseMethod(this,"initialize");
},dispose:function(){
Telerik.Web.UI.RadTextBoxComponent.callBaseMethod(this,"dispose");
},get_targetInput:function(id){
if(!Telerik.Web.UI.RadTextBoxComponent.callBaseMethod(this,"get_targetInput",[id])){
return null;
}
this._radInputExtender=new Telerik.Web.UI.RadTextBoxExtender(this,id);
return this._radInputExtender;
}};
Telerik.Web.UI.RadTextBoxComponent.registerClass("Telerik.Web.UI.RadTextBoxComponent",Telerik.Web.UI.RadInputComponent);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadTextBoxExtender=function(_94,id){
Telerik.Web.UI.RadTextBoxExtender.initializeBase(this,[_94,id]);
};
Telerik.Web.UI.RadTextBoxExtender.prototype={dispose:function(){
Telerik.Web.UI.RadTextBoxExtender.callBaseMethod(this,"dispose");
},_beforeSubmit:function(){
Telerik.Web.UI.RadTextBoxExtender.callBaseMethod(this,"_beforeSubmit");
return true;
}};
Telerik.Web.UI.RadTextBoxExtender.registerClass("Telerik.Web.UI.RadTextBoxExtender",Telerik.Web.UI.RadInputExtender);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadNumericTextBoxComponent=function(){
Telerik.Web.UI.RadNumericTextBoxComponent.initializeBase(this);
this._maxValue=70368744177664;
this._minValue=-70368744177664;
this._negativeCss="RadInputMgr_Default RadInput_Negative_Default";
this._numberFormat=null;
this.__currentNumberFormat=null;
this._invalidStyleDuration=100;
};
Telerik.Web.UI.RadNumericTextBoxComponent.prototype={initialize:function(){
this._compileRegEx();
Telerik.Web.UI.RadNumericTextBoxComponent.callBaseMethod(this,"initialize");
},dispose:function(){
Telerik.Web.UI.RadNumericTextBoxComponent.callBaseMethod(this,"dispose");
},get_targetInput:function(id){
if(!Telerik.Web.UI.RadNumericTextBoxComponent.callBaseMethod(this,"get_targetInput",[id])){
return null;
}
this._radInputExtender=new Telerik.Web.UI.RadNumericTextBoxExtender(this,id);
return this._radInputExtender;
},_onTextBoxKeyPressHandler:function(e){
if(!Telerik.Web.UI.RadNumericTextBoxComponent.callBaseMethod(this,"_onTextBoxKeyPressHandler",[e])){
return;
}
var id=Telerik.Web.UI.RadInputManager.getTarget(e);
if(!id){
return;
}
this.get_targetInput(id)._onTextBoxKeyPressHandler(e);
},_compileRegEx:function(){
var _99=this.get_numberFormat().DecimalSeparator=="."?"\\.":this.get_numberFormat().DecimalSeparator;
var _9a=this.get_numberFormat().GroupSeparator=="."?"\\.":this.get_numberFormat().GroupSeparator;
this._acceptRegExp=new RegExp("[0-9"+_99+this.get_numberFormat().NegativeSign+"]{1}");
this._rejectRegExp=new RegExp("[^0-9"+_99+this.get_numberFormat().NegativeSign+"]{1}","g");
this._acceptParseExactRegExp=new RegExp("[0-9"+_99+_9a+"]{1}","g");
this._rejectParseExactRegExp=new RegExp("[^0-9"+_99+"]{1}","g");
this._decimalReplaceRegExp=new RegExp(_99,"g");
},get_maxValue:function(){
return this._maxValue;
},set_maxValue:function(_9b){
if(this._maxValue!=_9b){
this._maxValue=_9b;
this.raisePropertyChanged("maxValue");
}
},get_minValue:function(){
return this._minValue;
},set_minValue:function(_9c){
if(this._minValue!=_9c){
this._minValue=_9c;
this.raisePropertyChanged("minValue");
}
},get_negativeCss:function(){
return this._negativeCss;
},set_negativeCss:function(_9d){
if(this._negativeCss!==_9d){
this._negativeCss=_9d;
this.raisePropertyChanged("negativeCss");
}
},get_invalidStyleDuration:function(){
return this._invalidStyleDuration;
},set_invalidStyleDuration:function(_9e){
if(this._invalidStyleDuration!==_9e){
this._invalidStyleDuration=_9e;
this.raisePropertyChanged("invalidStyleDuration");
}
},get__currentNumberFormat:function(){
return this.__currentNumberFormat;
},set__currentNumberFormat:function(_9f){
this.__currentNumberFormat=_9f;
},get_numberFormat:function(){
return this._numberFormat;
},set_numberFormat:function(_a0){
this._numberFormat=_a0;
}};
Telerik.Web.UI.RadNumericTextBoxComponent.registerClass("Telerik.Web.UI.RadNumericTextBoxComponent",Telerik.Web.UI.RadInputComponent);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadNumericTextBoxExtender=function(_a1,id){
Telerik.Web.UI.RadNumericTextBoxExtender.initializeBase(this,[_a1,id]);
};
Telerik.Web.UI.RadNumericTextBoxExtender.prototype={dispose:function(){
Telerik.Web.UI.RadNumericTextBoxExtender.callBaseMethod(this,"dispose");
},formatDisplayValue:function(_a3){
if(!_a3){
return "";
}
var _a3=NumberFormat.Parse(_a3,this._owner._rejectRegExp,this._owner.get_numberFormat().DecimalSeparator,this._owner.get_numberFormat().NegativeSign);
if(isNaN(_a3)){
return "";
}
if(!this._valueInRange(_a3)){
var _a4=new Telerik.Web.UI.NumericInputManagerErrorEventArgs(Telerik.Web.UI.InputErrorReason.OutOfRange,_a3,null,null,this);
this._owner.raise_error(_a4);
if(!_a4.get_cancel()){
this.raise_error(_a4);
}
}
_a3=Math.max(this._owner.get_minValue(),_a3);
_a3=Math.min(this._owner.get_maxValue(),_a3);
return NumberFormat.Format(_a3,this._owner);
},formatEditValue:function(_a5){
if(!_a5){
return "";
}
_a5=NumberFormat.ParseExact(_a5,this._owner._acceptParseExactRegExp,this._owner.get_numberFormat().NegativePattern,this._owner.get_numberFormat().PositivePattern,this._owner._rejectParseExactRegExp,this._owner.get_numberFormat().DecimalSeparator,this._owner.get_numberFormat().NegativeSign);
if(isNaN(_a5)){
return "";
}
_a5=_a5.toString().replace(".",this._owner.get_numberFormat().DecimalSeparator);
return _a5.replace("-",this._owner.get_numberFormat().NegativeSign);
},_valueInRange:function(_a6){
return !(_a6<this._owner.get_minValue()||_a6>this._owner.get_maxValue());
},set_value:function(_a7){
_a7=Math.max(this._owner.get_minValue(),_a7);
_a7=Math.min(this._owner.get_maxValue(),_a7);
Telerik.Web.UI.RadNumericTextBoxExtender.callBaseMethod(this,"set_value",[_a7]);
},_beforeSubmit:function(){
this._owner._inputs[this._id]._focused=false;
this.updateValue();
var _a8=$get(this._id);
var _a9=this.get_value();
if(!_a9){
_a8.value="";
}else{
_a9=_a9.toString().replace(".",this._owner.get__currentNumberFormat().DecimalSeparator);
_a8.value=_a9.replace("-",this._owner.get__currentNumberFormat().NegativeSign);
}
return true;
},isNegative:function(){
return this.get_value()<0;
},_onTextBoxKeyPressHandler:function(e){
if(e.rawEvent){
e=e.rawEvent;
}
var _ab=$get(this._id);
if(e.altKey||e.ctrlKey){
return true;
}
var _ac=$telerik.isIE?e.keyCode:e.which;
if(!_ac||_ac==8||_ac==9){
return true;
}
var _ad=_ab.value;
var _ae=String.fromCharCode(_ac);
if(!_ae.match(this._owner._acceptRegExp)){
var _af=new Telerik.Web.UI.NumericInputManagerErrorEventArgs(Telerik.Web.UI.InputErrorReason.ParseError,_ab.value,_ac,_ae,this);
this._owner.raise_error(_af);
if(!_af.get_cancel()){
this.raise_error();
}
if(e.preventDefault){
e.preventDefault();
}
e.returnValue=false;
return false;
}
if(_ae==this._owner.get_numberFormat().NegativeSign){
this._calculateSelection();
var _b0=(this._selectionStart!=0);
_b0=_b0||(_ad.indexOf(this._owner.get_numberFormat().NegativeSign)==0&&(this._selectionStart==0&&this._selectionEnd==0));
if(_b0){
var _af=new Telerik.Web.UI.NumericInputManagerErrorEventArgs(Telerik.Web.UI.InputErrorReason.ParseError,_ab.value,_ac,_ae,this);
this._owner.raise_error(_af);
if(!_af.get_cancel()){
this.raise_error();
}
if(e.preventDefault){
e.preventDefault();
}
e.returnValue=false;
return false;
}
}
if(_ae==this._owner.get_numberFormat().DecimalSeparator){
this._calculateSelection();
var _b1=_ad.substr(0,this._selectionStart);
var _b2=_ad.substr(this._selectionStart,this._selectionEnd-this._selectionStart);
var _b3=_ad.substr(this._selectionEnd,_ad.length-1);
if(_b1.match(this._owner._decimalReplaceRegExp)){
this._selectionStart--;
this._selectionEnd--;
}else{
if(_b2.match(this._owner._decimalReplaceRegExp)){
this._selectionEnd--;
}
}
if(_b2.length==_ad.length){
_ab.value="";
}else{
_ab.value=((_b1+this._owner.get_numberFormat().DecimalSeparator+_b3).replace(this._owner._decimalReplaceRegExp,""));
}
}
},get_value:function(){
var _b4=Telerik.Web.UI.RadNumericTextBoxExtender.callBaseMethod(this,"get_value");
_b4=NumberFormat.ParseExact(_b4,this._owner._acceptParseExactRegExp,this._owner.get_numberFormat().NegativePattern,this._owner.get_numberFormat().PositivePattern,this._owner._rejectParseExactRegExp,this._owner.get_numberFormat().DecimalSeparator,this._owner.get_numberFormat().NegativeSign);
if(isNaN(_b4)){
return "";
}
return _b4;
},raise_error:function(_b5){
if(this.InEventRaise){
return;
}
this.InEventRaise=true;
this._owner._inputs[this._id]._invalid=true;
this._errorHandlingCanceled=false;
this.updateCssClass();
var _b6=this;
var _b7=function(){
_b6._owner._inputs[_b6._id]._invalid=false;
_b6.updateCssClass();
};
setTimeout(_b7,this._owner.get_invalidStyleDuration());
this.InEventRaise=false;
}};
Telerik.Web.UI.RadNumericTextBoxExtender.registerClass("Telerik.Web.UI.RadNumericTextBoxExtender",Telerik.Web.UI.RadInputExtender);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadDateInputComponent=function(){
Telerik.Web.UI.RadDateInputComponent.initializeBase(this);
this._dateFormatInfo=null;
this._minDate=new Date(1980,0,1);
this._maxDate=new Date(2099,11,31);
this._dateFormat=null;
this._displayDateFormat=null;
this.__currentCultureFormat=null;
};
Telerik.Web.UI.RadDateInputComponent.prototype={initialize:function(){
Telerik.Web.UI.RadDateInputComponent.callBaseMethod(this,"initialize");
},dispose:function(){
Telerik.Web.UI.RadDateInputComponent.callBaseMethod(this,"dispose");
},_onTextBoxFocusHandler:function(e){
var id=Telerik.Web.UI.RadInputManager.getTarget(e);
if(!id){
return;
}
this._inputs[id]._invalid=false;
Telerik.Web.UI.RadDateInputComponent.callBaseMethod(this,"_onTextBoxFocusHandler",[e]);
},get_targetInput:function(id){
if(!Telerik.Web.UI.RadDateInputComponent.callBaseMethod(this,"get_targetInput",[id])){
return null;
}
this._radInputExtender=new Telerik.Web.UI.RadDateInputExtender(this,id);
return this._radInputExtender;
},_cloneDate:function(_bb){
var _bc=null;
if(!_bb){
return null;
}
if(typeof (_bb.setFullYear)=="function"){
_bc=[];
_bc[_bc.length]=_bb.getFullYear();
_bc[_bc.length]=_bb.getMonth()+1;
_bc[_bc.length]=_bb.getDate();
_bc[_bc.length]=_bb.getHours();
_bc[_bc.length]=_bb.getMinutes();
_bc[_bc.length]=_bb.getSeconds();
_bc[_bc.length]=_bb.getMilliseconds();
}else{
if(typeof (_bb)=="string"){
_bc=_bb.split(/-/);
}
}
if(_bc!=null){
var _bd=new Date();
_bd.setDate(1);
_bd.setFullYear(_bc[0]);
_bd.setMonth(_bc[1]-1);
_bd.setDate(_bc[2]);
_bd.setHours(_bc[3]);
_bd.setMinutes(_bc[4]);
_bd.setSeconds(_bc[5]);
_bd.setMilliseconds(0);
return _bd;
}
return null;
},get_dateFormatInfo:function(){
return this._dateFormatInfo;
},set_dateFormatInfo:function(_be){
this._dateFormatInfo=new Telerik.Web.UI.DateParsing.DateTimeFormatInfo(_be);
},get_maxDate:function(){
return this._maxDate;
},set_maxDate:function(_bf){
var _c0=this._cloneDate(_bf);
if(this._maxDate.toString()!=_c0.toString()){
this._maxDate=_c0;
this.raisePropertyChanged("maxDate");
}
},get_minDate:function(){
return this._minDate;
},set_minDate:function(_c1){
var _c2=this._cloneDate(_c1);
if(this._minDate.toString()!=_c2.toString()){
this._minDate=_c2;
this.raisePropertyChanged("minDate");
}
},get_displayDateFormat:function(){
return this._displayDateFormat;
},set_displayDateFormat:function(_c3){
if(this._displayDateFormat!=_c3){
this._displayDateFormat=_c3;
this.raisePropertyChanged("displayDateFormat");
}
},get__currentCultureFormat:function(){
return this.__currentCultureFormat;
},set__currentCultureFormat:function(_c4){
if(this.__currentCultureFormat!=_c4){
this.__currentCultureFormat=_c4;
this.raisePropertyChanged("_currentCultureFormat");
}
},get_dateFormat:function(){
return this._dateFormat;
},set_dateFormat:function(_c5){
if(this._dateFormat!=_c5){
this._dateFormat=_c5;
this.raisePropertyChanged("dateFormat");
}
}};
Telerik.Web.UI.RadDateInputComponent.registerClass("Telerik.Web.UI.RadDateInputComponent",Telerik.Web.UI.RadInputComponent);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadDateInputExtender=function(_c6,id){
Telerik.Web.UI.RadDateInputExtender.initializeBase(this,[_c6,id]);
};
Telerik.Web.UI.RadDateInputExtender.prototype={dispose:function(){
Telerik.Web.UI.RadDateInputExtender.callBaseMethod(this,"dispose");
},formatEditValue:function(_c8){
if(!_c8){
return "";
}
var _c9=this.parseDate(_c8);
if(_c9==null){
return _c8;
}
return this._owner.get_dateFormatInfo().FormatDate(_c9,this._owner.get_dateFormat());
},formatDisplayValue:function(_ca){
if(!_ca){
return "";
}
var _cb=this.parseDate(_ca);
if(_cb==null){
var _cc=new Telerik.Web.UI.InputManagerErrorEventArgs(Telerik.Web.UI.InputErrorReason.ParseError,_ca,this);
this._owner.raise_error(_cc);
if(!_cc.get_cancel()){
this.raise_error(_cc);
}
if(_ca!=_cc.get_inputText()){
_ca=_cc.get_inputText();
_cb=this.parseDate(_cc.get_inputText());
}
if(_cb==null){
return _ca;
}
}
if(!this._dateInRange(_cb)){
var _cc=new Telerik.Web.UI.InputManagerErrorEventArgs(Telerik.Web.UI.InputErrorReason.OutOfRange,_ca,this);
this._owner.raise_error(_cc);
}
_cb=(_cb>this._owner.get_maxDate())?this._owner.get_maxDate():_cb;
_cb=(_cb<this._owner.get_minDate())?this._owner.get_minDate():_cb;
return this._owner.get_dateFormatInfo().FormatDate(_cb,this._owner.get_displayDateFormat());
},_onTextBoxFocusHandler:function(e){
var id=Telerik.Web.UI.RadInputManager.getTarget(e);
if(!id){
return;
}
this._inputs[id]._invalid=false;
Telerik.Web.UI.RadDateInputComponent.callBaseMethod(this,"_onTextBoxFocusHandler",[e]);
},parseDate:function(_cf,_d0){
try{
var _d1=new Telerik.Web.UI.DateParsing.DateTimeLexer(this._owner.get_dateFormatInfo());
var _d2=_d1.GetTokens(_cf);
var _d3=new Telerik.Web.UI.DateParsing.DateTimeParser(this._owner.get_dateFormatInfo().TimeInputOnly);
var _d4=_d3.Parse(_d2);
_d0=this._getParsingBaseDate(_d0);
var _d5=_d4.Evaluate(_d0,this._owner.get_dateFormatInfo());
return _d5;
}
catch(parseError){
if(parseError.isDateParseException){
return null;
}else{
throw parseError;
}
}
},get_selectedDate:function(){
return this.parseDate(this.get_value());
},set_selectedDate:function(_d6){
var _d7;
if(!_d6){
_d7="";
}else{
_d6=(_d6>this._owner.get_maxDate())?this._owner.get_maxDate():_d6;
_d6=(_d6<this._owner.get_minDate())?this._owner.get_minDate():_d6;
_d7=this._owner.get_dateFormatInfo().FormatDate(_d6,this._owner.get_displayDateFormat());
}
this.set_value(_d7);
},_getParsingBaseDate:function(_d8){
var _d9=_d8;
if(_d9==null){
_d9=new Date();
}
_d9.setHours(0,0,0,0);
if(this._compareDates(_d9,this._owner.get_minDate())<0){
_d9=this._owner.get_minDate();
}else{
if(this._compareDates(_d9,this._owner.get_maxDate())>0){
_d9=this._owner.get_maxDate();
}
}
return _d9;
},_compareDates:function(_da,_db){
return _da-_db;
},_dateInRange:function(_dc){
return (this._compareDates(_dc,this._owner.get_minDate())>=0)&&(this._compareDates(_dc,this._owner.get_maxDate())<=0);
},raise_error:function(_dd){
this._owner._inputs[this._id]._invalid=true;
this.updateCssClass();
},_beforeSubmit:function(){
this._owner._inputs[this._id]._focused=false;
this.updateValue();
var _de=$get(this._id);
var _df=this.get_value();
var _e0=this.parseDate(_df);
if(_e0==null){
_de.value="";
}else{
var _e1=new Telerik.Web.UI.DateParsing.DateTimeFormatInfo(this._owner.get_dateFormatInfo()._data);
var _e2=this._owner.get__currentCultureFormat();
_e1.AMDesignator=_e2.AMDesignator;
_e1.PMDesignator=_e2.PMDesignator;
_de.value=_e1.FormatDate(_e0,_e2.pattern);
}
return true;
}};
Telerik.Web.UI.RadDateInputExtender.registerClass("Telerik.Web.UI.RadDateInputExtender",Telerik.Web.UI.RadInputExtender);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadRegExpTextBoxComponent=function(){
Telerik.Web.UI.RadRegExpTextBoxComponent.initializeBase(this);
this._errorMessage="ErrorMessage";
this._validationExpression=null;
};
Telerik.Web.UI.RadRegExpTextBoxComponent.prototype={initialize:function(){
Telerik.Web.UI.RadRegExpTextBoxComponent.callBaseMethod(this,"initialize");
},dispose:function(){
Telerik.Web.UI.RadRegExpTextBoxComponent.callBaseMethod(this,"dispose");
},isValid:function(_e3){
var _e4=true;
var _e5=[];
if(typeof (_e3)!="undefined"){
_e4=Telerik.Web.UI.RadRegExpTextBoxComponent.callBaseMethod(this,"isValid",[_e3]);
var _e6=this.get_targetInput(_e3);
if(!_e4||_e6._owner._inputs[_e3]._validationCanceled){
_e6._owner._inputs[_e3]._invalid=false;
_e6.updateCssClass();
return _e4;
}
_e4=_e6.isValid();
}else{
var ids=this.get_targetControlIDs();
for(var i=0;i<ids.length;i++){
var id=ids[i];
var _e6=this.get_targetInput(id);
if(!_e6){
continue;
}
var _ea=$get(_e6._id);
if(!_ea){
continue;
}
_e4=Telerik.Web.UI.RadRegExpTextBoxComponent.callBaseMethod(this,"isValid",[id]);
if(!_e4||_e6._owner._inputs[id]._validationCanceled){
_e6._owner._inputs[id]._invalid=false;
_e6.updateCssClass();
continue;
}
if(!_e6.isValid()){
_e4=false;
_e5[_e5.length]=_e6._id;
}
}
}
if(_e5.length>0){
_e4=false;
}
return _e4;
},_onTextBoxFocusHandler:function(e){
var id=Telerik.Web.UI.RadInputManager.getTarget(e);
if(!id){
return;
}
this._inputs[id]._invalid=false;
Telerik.Web.UI.RadRegExpTextBoxComponent.callBaseMethod(this,"_onTextBoxFocusHandler",[e]);
},get_targetInput:function(id){
if(!Telerik.Web.UI.RadRegExpTextBoxComponent.callBaseMethod(this,"get_targetInput",[id])){
return null;
}
this._radInputExtender=new Telerik.Web.UI.RadRegExpTextBoxExtender(this,id);
return this._radInputExtender;
},_updateValueOnInitialize:function(id){
this.get_targetInput(id).updateValue();
},_updateCssClassOnInitialize:function(id){
this.get_targetInput(id).updateCssClass();
},get_errorMessage:function(){
return this._errorMessage;
},set_errorMessage:function(_f0){
if(this._errorMessage!=_f0){
this._errorMessage=_f0;
this.raisePropertyChanged("errorMessage");
}
},get_isRequiredFields:function(){
return this._isRequiredFields;
},set_isRequiredFields:function(_f1){
if(this._isRequiredFields!=_f1){
this._isRequiredFields=_f1;
this.raisePropertyChanged("isRequiredFields");
}
},get_validationExpression:function(){
return this._validationExpression;
},set_validationExpression:function(_f2){
if(this._validationExpression!=_f2){
this._validationExpression=_f2;
this.raisePropertyChanged("validationExpression");
}
}};
Telerik.Web.UI.RadRegExpTextBoxComponent.registerClass("Telerik.Web.UI.RadRegExpTextBoxComponent",Telerik.Web.UI.RadInputComponent);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadRegExpTextBoxExtender=function(_f3,id){
Telerik.Web.UI.RadRegExpTextBoxExtender.initializeBase(this,[_f3,id]);
};
Telerik.Web.UI.RadRegExpTextBoxExtender.prototype={dispose:function(){
Telerik.Web.UI.RadRegExpTextBoxExtender.callBaseMethod(this,"dispose");
},parseValue:function(_f5){
var _f6=$get(this._id);
if((_f6.value)&&(_f6.value==this._owner.get_emptyMessage())){
return "";
}
if((_f6.value)&&(_f6.value==this._owner.get_errorMessage())&&(this._owner._inputs[this._id]._originalValue)){
return this._owner._inputs[this._id]._originalValue;
}else{
if((_f6.value)&&(_f6.value==this._owner.get_errorMessage())){
return "";
}else{
if(!_f6.value){
return "";
}
}
}
return _f5;
},formatDisplayValue:function(_f7){
if(!_f7){
return "";
}
var _f8=this.acceptRegExp(_f7);
if(_f8==null){
var _f9=new Telerik.Web.UI.InputManagerErrorEventArgs(Telerik.Web.UI.InputErrorReason.ParseError,_f7,this);
this._owner.raise_error(_f9);
if(!_f9.get_cancel()){
this.raise_error(_f9);
}
if(_f7!=_f9.get_inputText()){
_f7=_f9.get_inputText();
_f8=this.acceptRegExp(_f9.get_inputText());
}
if(_f8==null){
if(this._owner.get_errorMessage()&&!_f9.get_cancel()){
this._owner._inputs[this._id]._originalValue=_f7;
_f7=this._owner.get_errorMessage();
}
return _f7;
}
}
return _f8;
},acceptRegExp:function(_fa){
var _fb=new RegExp("^"+this._owner.get_validationExpression()+"$");
if(_fa.match(_fb)){
return _fa;
}
return null;
},isValid:function(){
var _fc=this.get_value();
if(!this.get_value()&&!this._owner.get_isRequired()){
return true;
}
var _fd=this.acceptRegExp(_fc);
return (_fd!=null);
},raise_error:function(_fe){
this._owner._inputs[this._id]._invalid=true;
this.updateCssClass();
}};
Telerik.Web.UI.RadRegExpTextBoxExtender.registerClass("Telerik.Web.UI.RadRegExpTextBoxExtender",Telerik.Web.UI.RadInputExtender);

