You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
21 KiB
2 lines
21 KiB
Type.registerNamespace("AjaxControlToolkit");AjaxControlToolkit.BoxSide=function(){};AjaxControlToolkit.BoxSide.prototype={Top:0,Right:1,Bottom:2,Left:3};AjaxControlToolkit.BoxSide.registerEnum("AjaxControlToolkit.BoxSide",false);AjaxControlToolkit._CommonToolkitScripts=function(){};AjaxControlToolkit._CommonToolkitScripts.prototype={_borderStyleNames:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"],_borderWidthNames:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],_paddingWidthNames:["paddingTop","paddingRight","paddingBottom","paddingLeft"],_marginWidthNames:["marginTop","marginRight","marginBottom","marginLeft"],getCurrentStyle:function(b,c,e){var d="undefined",a=null;if(b){if(b.currentStyle)a=b.currentStyle[c];else if(document.defaultView&&document.defaultView.getComputedStyle){var f=document.defaultView.getComputedStyle(b,null);if(f)a=f[c]}if(!a&&b.style.getPropertyValue)a=b.style.getPropertyValue(c);else if(!a&&b.style.getAttribute)a=b.style.getAttribute(c)}if(!a||a==""||typeof a===d)if(typeof e!=d)a=e;else a=null;return a},getInheritedBackgroundColor:function(b){var d="backgroundColor",c="#FFFFFF";if(!b)return c;var a=this.getCurrentStyle(b,d);try{while(!a||a==""||a=="transparent"||a=="rgba(0, 0, 0, 0)"){b=b.parentNode;if(!b)a=c;else a=this.getCurrentStyle(b,d)}}catch(e){a=c}return a},getLocation:function(a){return Sys.UI.DomElement.getLocation(a)},setLocation:function(b,a){Sys.UI.DomElement.setLocation(b,a.x,a.y)},getContentSize:function(a){if(!a)throw Error.argumentNull("element");var d=this.getSize(a),c=this.getBorderBox(a),b=this.getPaddingBox(a);return {width:d.width-c.horizontal-b.horizontal,height:d.height-c.vertical-b.vertical}},getSize:function(a){if(!a)throw Error.argumentNull("element");return {width:a.offsetWidth,height:a.offsetHeight}},setContentSize:function(a,b){var d="border-box",c=this;if(!a)throw Error.argumentNull("element");if(!b)throw Error.argumentNull("size");if(c.getCurrentStyle(a,"MozBoxSizing")==d||c.getCurrentStyle(a,"BoxSizing")==d){var f=c.getBorderBox(a),e=c.getPaddingBox(a);b={width:b.width+f.horizontal+e.horizontal,height:b.height+f.vertical+e.vertical}}a.style.width=b.width.toString()+"px";a.style.height=b.height.toString()+"px"},setSize:function(a,b){if(!a)throw Error.argumentNull("element");if(!b)throw Error.argumentNull("size");var d=this.getBorderBox(a),c=this.getPaddingBox(a),e={width:b.width-d.horizontal-c.horizontal,height:b.height-d.vertical-c.vertical};this.setContentSize(a,e)},getBounds:function(a){return Sys.UI.DomElement.getBounds(a)},setBounds:function(a,b){if(!a)throw Error.argumentNull("element");if(!b)throw Error.argumentNull("bounds");this.setSize(a,b);$common.setLocation(a,b)},getClientBounds:function(){var b,a;if(document.compatMode=="CSS1Compat"){b=document.documentElement.clientWidth;a=document.documentElement.clientHeight}else{b=document.body.clientWidth;a=document.body.clientHeight}return new Sys.UI.Bounds(0,0,b,a)},getMarginBox:function(b){var c=this;if(!b)throw Error.argumentNull("element");var a={top:c.getMargin(b,AjaxControlToolkit.BoxSide.Top),right:c.getMargin(b,AjaxControlToolkit.BoxSide.Right),bottom:c.getMargin(b,AjaxControlToolkit.BoxSide.Bottom),left:c.getMargin(b,AjaxControlToolkit.BoxSide.Left)};a.horizontal=a.left+a.right;a.vertical=a.top+a.bottom;return a},getBorderBox:function(b){var c=this;if(!b)throw Error.argumentNull("element");var a={top:c.getBorderWidth(b,AjaxControlToolkit.BoxSide.Top),right:c.getBorderWidth(b,AjaxControlToolkit.BoxSide.Right),bottom:c.getBorderWidth(b,AjaxControlToolkit.BoxSide.Bottom),left:c.getBorderWidth(b,AjaxControlToolkit.BoxSide.Left)};a.horizontal=a.left+a.right;a.vertical=a.top+a.bottom;return a},getPaddingBox:function(b){var c=this;if(!b)throw Error.argumentNull("element");var a={top:c.getPadding(b,AjaxControlToolkit.BoxSide.Top),right:c.getPadding(b,AjaxControlToolkit.BoxSide.Right),bottom:c.getPadding(b,AjaxControlToolkit.BoxSide.Bottom),left:c.getPadding(b,AjaxControlToolkit.BoxSide.Left)};a.horizontal=a.left+a.right;a.vertical=a.top+a.bottom;return a},isBorderVisible:function(b,a){if(!b)throw Error.argumentNull("element");if(a<AjaxControlToolkit.BoxSide.Top||a>AjaxControlToolkit.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,a,"AjaxControlToolkit.BoxSide"));var d=this._borderStyleNames[a],c=this.getCurrentStyle(b,d);return c!="none"},getMargin:function(b,a){if(!b)throw Error.argumentNull("element");if(a<AjaxControlToolkit.BoxSide.Top||a>AjaxControlToolkit.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,a,"AjaxControlToolkit.BoxSide"));var d=this._marginWidthNames[a],c=this.getCurrentStyle(b,d);try{return this.parsePadding(c)}catch(e){return 0}},getBorderWidth:function(c,a){var b=this;if(!c)throw Error.argumentNull("element");if(a<AjaxControlToolkit.BoxSide.Top||a>AjaxControlToolkit.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,a,"AjaxControlToolkit.BoxSide"));if(!b.isBorderVisible(c,a))return 0;var e=b._borderWidthNames[a],d=b.getCurrentStyle(c,e);return b.parseBorderWidth(d)},getPadding:function(b,a){if(!b)throw Error.argumentNull("element");if(a<AjaxControlToolkit.BoxSide.Top||a>AjaxControlToolkit.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,a,"AjaxControlToolkit.BoxSide"));var d=this._paddingWidthNames[a],c=this.getCurrentStyle(b,d);return this.parsePadding(c)},parseBorderWidth:function(d){var h="thick",g="medium",f="thin",e=this;if(!e._borderThicknesses){var c={},a=document.createElement("div");a.style.visibility="hidden";a.style.position="absolute";a.style.fontSize="1px";document.body.appendChild(a);var b=document.createElement("div");b.style.height="0px";b.style.overflow="hidden";a.appendChild(b);var i=a.offsetHeight;b.style.borderTop="solid black";b.style.borderTopWidth=f;c[f]=a.offsetHeight-i;b.style.borderTopWidth=g;c[g]=a.offsetHeight-i;b.style.borderTopWidth=h;c[h]=a.offsetHeight-i;a.removeChild(b);document.body.removeChild(a);e._borderThicknesses=c}if(d){switch(d){case f:case g:case h:return e._borderThicknesses[d];case "inherit":return 0}var j=e.parseUnit(d);Sys.Debug.assert(j.type=="px",String.format(AjaxControlToolkit.Resources.Common_InvalidBorderWidthUnit,j.type));return j.size}return 0},parsePadding:function(a){if(a){if(a=="inherit")return 0;var b=this.parseUnit(a);Sys.Debug.assert(b.type=="px",String.format(AjaxControlToolkit.Resources.Common_InvalidPaddingUnit,b.type));return b.size}return 0},parseUnit:function(a){if(!a)throw Error.argumentNull("value");a=a.trim().toLowerCase();for(var g=a.length,c=-1,f=0;f<g;f++){var b=a.substr(f,1);if((b<"0"||b>"9")&&b!="-"&&b!="."&&b!=",")break;c=f}if(c==-1)throw Error.create(AjaxControlToolkit.Resources.Common_UnitHasNoDigits);var e,d;if(c<g-1)e=a.substring(c+1).trim();else e="px";d=parseFloat(a.substr(0,c+1));if(e=="px")d=Math.floor(d);return {size:d,type:e}},getElementOpacity:function(a){if(!a)throw Error.argumentNull("element");var b=false,c;if(a.filters){var e=a.filters;if(e.length!==0){var d=e["DXImageTransform.Microsoft.Alpha"];if(d){c=d.opacity/100;b=true}}}else{c=this.getCurrentStyle(a,"opacity",1);b=true}if(b===false)return 1;return parseFloat(c)},setElementOpacity:function(a,b){if(!a)throw Error.argumentNull("element");if(a.filters){var e=a.filters,c=true;if(e.length!==0){var d=e["DXImageTransform.Microsoft.Alpha"];if(d){c=false;d.opacity=b*100}}if(c)a.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+b*100+")"}else a.style.opacity=b},getVisible:function(a){return a&&"none"!=$common.getCurrentStyle(a,"display")&&"hidden"!=$common.getCurrentStyle(a,"visibility")},setVisible:function(a,b){if(a&&b!=$common.getVisible(a)){if(b)if(a.style.removeAttribute)a.style.removeAttribute("display");else a.style.removeProperty("display");else a.style.display="none";a.style.visibility=b?"visible":"hidden"}},resolveFunction:function(value){if(value)if(value instanceof Function)return value;else if(String.isInstanceOfType(value)&&value.length>0){var func;if((func=window[value])instanceof Function)return func;else if((func=eval(value))instanceof Function)return func}return null},addCssClasses:function(c,b){for(var a=0;a<b.length;a++)Sys.UI.DomElement.addCssClass(c,b[a])},removeCssClasses:function(c,b){for(var a=0;a<b.length;a++)Sys.UI.DomElement.removeCssClass(c,b[a])},setStyle:function(a,b){$common.applyProperties(a.style,b)},removeHandlers:function(c,a){for(var b in a)$removeHandler(c,b,a[b])},overlaps:function(a,b){return a.x<b.x+b.width&&b.x<a.x+a.width&&a.y<b.y+b.height&&b.y<a.y+a.height},containsPoint:function(a,b,c){return b>=a.x&&b<a.x+a.width&&c>=a.y&&c<a.y+a.height},isKeyDigit:function(a){return 48<=a&&a<=57},isKeyNavigation:function(a){return Sys.UI.Key.left<=a&&a<=Sys.UI.Key.down},padLeft:function(c,b,d,a){return $common._pad(c,b||2,d||" ","l",a||false)},padRight:function(c,b,d,a){return $common._pad(c,b||2,d||" ","r",a||false)},_pad:function(c,b,h,e,g){c=c.toString();var f=c.length,d=new Sys.StringBuilder;e=="r"&&d.append(c);while(f<b){d.append(h);f++}e=="l"&&d.append(c);var a=d.toString();if(g&&a.length>b)if(e=="l")a=a.substr(a.length-b,b);else a=a.substr(0,b);return a},__DOMEvents:{focusin:{eventGroup:"UIEvents",init:function(a){a.initUIEvent("focusin",true,false,window,1)}},focusout:{eventGroup:"UIEvents",init:function(a){a.initUIEvent("focusout",true,false,window,1)}},activate:{eventGroup:"UIEvents",init:function(a){a.initUIEvent("activate",true,true,window,1)}},focus:{eventGroup:"UIEvents",init:function(a){a.initUIEvent("focus",false,false,window,1)}},blur:{eventGroup:"UIEvents",init:function(a){a.initUIEvent("blur",false,false,window,1)}},click:{eventGroup:"MouseEvents",init:function(c,a){var b=false;c.initMouseEvent("click",true,true,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||b,a.altKey||b,a.shiftKey||b,a.metaKey||b,a.button||0,a.relatedTarget||null)}},dblclick:{eventGroup:"MouseEvents",init:function(c,a){var b=false;c.initMouseEvent("click",true,true,window,2,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||b,a.altKey||b,a.shiftKey||b,a.metaKey||b,a.button||0,a.relatedTarget||null)}},mousedown:{eventGroup:"MouseEvents",init:function(c,a){var b=false;c.initMouseEvent("mousedown",true,true,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||b,a.altKey||b,a.shiftKey||b,a.metaKey||b,a.button||0,a.relatedTarget||null)}},mouseup:{eventGroup:"MouseEvents",init:function(c,a){var b=false;c.initMouseEvent("mouseup",true,true,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||b,a.altKey||b,a.shiftKey||b,a.metaKey||b,a.button||0,a.relatedTarget||null)}},mouseover:{eventGroup:"MouseEvents",init:function(c,a){var b=false;c.initMouseEvent("mouseover",true,true,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||b,a.altKey||b,a.shiftKey||b,a.metaKey||b,a.button||0,a.relatedTarget||null)}},mousemove:{eventGroup:"MouseEvents",init:function(c,a){var b=false;c.initMouseEvent("mousemove",true,true,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||b,a.altKey||b,a.shiftKey||b,a.metaKey||b,a.button||0,a.relatedTarget||null)}},mouseout:{eventGroup:"MouseEvents",init:function(c,a){var b=false;c.initMouseEvent("mousemove",true,true,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||b,a.altKey||b,a.shiftKey||b,a.metaKey||b,a.button||0,a.relatedTarget||null)}},load:{eventGroup:"HTMLEvents",init:function(a){a.initEvent("load",false,false)}},unload:{eventGroup:"HTMLEvents",init:function(a){a.initEvent("unload",false,false)}},select:{eventGroup:"HTMLEvents",init:function(a){a.initEvent("select",true,false)}},change:{eventGroup:"HTMLEvents",init:function(a){a.initEvent("change",true,false)}},submit:{eventGroup:"HTMLEvents",init:function(a){a.initEvent("submit",true,true)}},reset:{eventGroup:"HTMLEvents",init:function(a){a.initEvent("reset",true,false)}},resize:{eventGroup:"HTMLEvents",init:function(a){a.initEvent("resize",true,false)}},scroll:{eventGroup:"HTMLEvents",init:function(a){a.initEvent("scroll",true,false)}}},tryFireRawEvent:function(a,b){try{if(a.fireEvent){a.fireEvent("on"+b.type,b);return true}else if(a.dispatchEvent){a.dispatchEvent(b);return true}}catch(c){}return false},tryFireEvent:function(e,d,c){try{if(document.createEventObject){var a=document.createEventObject();$common.applyProperties(a,c||{});e.fireEvent("on"+d,a);return true}else if(document.createEvent){var b=$common.__DOMEvents[d];if(b){var a=document.createEvent(b.eventGroup);b.init(a,c||{});e.dispatchEvent(a);return true}}}catch(f){}return false},wrapElement:function(a,b,c){var d=a.parentNode;d.replaceChild(b,a);(c||b).appendChild(a)},unwrapElement:function(b,a){var c=a.parentNode;if(c!=null){$common.removeElement(b);c.replaceChild(b,a)}},removeElement:function(a){var b=a.parentNode;b!=null&&b.removeChild(a)},applyProperties:function(d,c){for(var b in c){var a=c[b];if(a!=null&&Object.getType(a)===Object){var e=d[b];$common.applyProperties(e,a)}else d[b]=a}},createElementFromTemplate:function(a,j,e){var c=null,b="undefined";if(typeof a.nameTable!=b){var g=a.nameTable;if(String.isInstanceOfType(g))g=e[g];if(g!=c)e=g}var l=c;if(typeof a.name!==b)l=a.name;var d=document.createElement(a.nodeName);if(typeof a.name!==b&&e)e[a.name]=d;if(typeof a.parent!==b&&j==c){var h=a.parent;if(String.isInstanceOfType(h))h=e[h];if(h!=c)j=h}typeof a.properties!==b&&a.properties!=c&&$common.applyProperties(d,a.properties);typeof a.cssClasses!==b&&a.cssClasses!=c&&$common.addCssClasses(d,a.cssClasses);typeof a.events!==b&&a.events!=c&&$addHandlers(d,a.events);typeof a.visible!==b&&a.visible!=c&&this.setVisible(d,a.visible);j&&j.appendChild(d);typeof a.opacity!==b&&a.opacity!=c&&$common.setElementOpacity(d,a.opacity);if(typeof a.children!==b&&a.children!=c)for(var k=0;k<a.children.length;k++){var m=a.children[k];$common.createElementFromTemplate(m,d,e)}var i=d;if(typeof a.contentPresenter!==b&&a.contentPresenter!=c)i=e[i];if(typeof a.content!==b&&a.content!=c){var f=a.content;if(String.isInstanceOfType(f))f=e[f];if(f.parentNode)$common.wrapElement(f,d,i);else i.appendChild(f)}return d},prepareHiddenElementForATDeviceUpdate:function(){var b="hiddenInputToUpdateATBuffer_CommonToolkitScripts",a=document.getElementById(b);if(!a){var a=document.createElement("input");a.setAttribute("type","hidden");a.setAttribute("value","1");a.setAttribute("id",b);a.setAttribute("name",b);document.forms[0]&&document.forms[0].appendChild(a)}},updateFormToRefreshATDeviceBuffer:function(){var b="value",a=document.getElementById("hiddenInputToUpdateATBuffer_CommonToolkitScripts");if(a)if(a.getAttribute(b)=="1")a.setAttribute(b,"0");else a.setAttribute(b,"1")},appendElementToFormOrBody:function(a){if(document.forms&&document.forms[0])document.forms[0].appendChild(a);else document.body.appendChild(a)}};if(document.documentElement.getBoundingClientRect)Sys.UI.DomElement.getLocation=function(b){if(b.self||b.nodeType===9||b===document.documentElement||b.parentNode===b.ownerDocument.documentElement)return new Sys.UI.Point(0,0);var f=b.getBoundingClientRect();if(!f)return new Sys.UI.Point(0,0);var k,e=b.ownerDocument.documentElement,c=Math.round(f.left)+e.scrollLeft,d=Math.round(f.top)+e.scrollTop;if(Sys.Browser.agent===Sys.Browser.InternetExplorer){try{var g=b.ownerDocument.parentWindow.frameElement||null;if(g){var h=g.frameBorder==="0"||g.frameBorder==="no"?2:0;c+=h;d+=h}}catch(l){}if(Sys.Browser.version===7&&!document.documentMode){var i=document.body,j=i.getBoundingClientRect(),a=(j.right-j.left)/i.clientWidth;a=Math.round(a*100);a=(a-a%5)/100;if(!isNaN(a)&&a!==1){c=Math.round(c/a);d=Math.round(d/a)}}if((document.documentMode||0)<8){c-=e.clientLeft;d-=e.clientTop}}return new Sys.UI.Point(c,d)};else if(Sys.Browser.agent===Sys.Browser.Safari)Sys.UI.DomElement.getLocation=function(c){var i="absolute",d=null;if(c.window&&c.window===c||c.nodeType===9)return new Sys.UI.Point(0,0);for(var e=0,f=0,l=d,h=d,b,a=c;a;l=a,h=b,a=a.offsetParent){b=Sys.UI.DomElement._getCurrentStyle(a);var g=a.tagName?a.tagName.toUpperCase():d;if((a.offsetLeft||a.offsetTop)&&(g!=="BODY"||(!h||h.position!==i))){e+=a.offsetLeft;f+=a.offsetTop}if(l&&Sys.Browser.version>=3){e+=parseInt(b.borderLeftWidth);f+=parseInt(b.borderTopWidth)}}b=Sys.UI.DomElement._getCurrentStyle(c);var j=b?b.position:d;if(!j||j!==i)for(a=c.parentNode;a;a=a.parentNode){g=a.tagName?a.tagName.toUpperCase():d;if(g!=="BODY"&&g!=="HTML"&&(a.scrollLeft||a.scrollTop)){e-=a.scrollLeft||0;f-=a.scrollTop||0}b=Sys.UI.DomElement._getCurrentStyle(a);var k=b?b.position:d;if(k&&k===i)break}return new Sys.UI.Point(e,f)};else Sys.UI.DomElement.getLocation=function(e){var i="absolute",d=null;if(e.window&&e.window===e||e.nodeType===9)return new Sys.UI.Point(0,0);for(var f=0,g=0,k=d,h=d,b=d,a=e;a;k=a,h=b,a=a.offsetParent){var c=a.tagName?a.tagName.toUpperCase():d;b=Sys.UI.DomElement._getCurrentStyle(a);if((a.offsetLeft||a.offsetTop)&&!(c==="BODY"&&(!h||h.position!==i))){f+=a.offsetLeft;g+=a.offsetTop}if(k!==d&&b){if(c!=="TABLE"&&c!=="TD"&&c!=="HTML"){f+=parseInt(b.borderLeftWidth)||0;g+=parseInt(b.borderTopWidth)||0}if(c==="TABLE"&&(b.position==="relative"||b.position===i)){f+=parseInt(b.marginLeft)||0;g+=parseInt(b.marginTop)||0}}}b=Sys.UI.DomElement._getCurrentStyle(e);var j=b?b.position:d;if(!j||j!==i)for(a=e.parentNode;a;a=a.parentNode){c=a.tagName?a.tagName.toUpperCase():d;if(c!=="BODY"&&c!=="HTML"&&(a.scrollLeft||a.scrollTop)){f-=a.scrollLeft||0;g-=a.scrollTop||0;b=Sys.UI.DomElement._getCurrentStyle(a);if(b){f+=parseInt(b.borderLeftWidth)||0;g+=parseInt(b.borderTopWidth)||0}}}return new Sys.UI.Point(f,g)};var CommonToolkitScripts=AjaxControlToolkit.CommonToolkitScripts=new AjaxControlToolkit._CommonToolkitScripts,$common=CommonToolkitScripts;Sys.UI.DomElement.getVisible=$common.getVisible;Sys.UI.DomElement.setVisible=$common.setVisible;Sys.UI.Control.overlaps=$common.overlaps;AjaxControlToolkit._DomUtility=function(){};AjaxControlToolkit._DomUtility.prototype={isDescendant:function(c,b){for(var a=b.parentNode;a!=null;a=a.parentNode)if(a==c)return true;return false},isDescendantOrSelf:function(b,a){if(b===a)return true;return AjaxControlToolkit.DomUtility.isDescendant(b,a)},isAncestor:function(a,b){return AjaxControlToolkit.DomUtility.isDescendant(b,a)},isAncestorOrSelf:function(a,b){if(a===b)return true;return AjaxControlToolkit.DomUtility.isDescendant(b,a)},isSibling:function(d,c){for(var b=d.parentNode,a=0;a<b.childNodes.length;a++)if(b.childNodes[a]==c)return true;return false}};AjaxControlToolkit._DomUtility.registerClass("AjaxControlToolkit._DomUtility");AjaxControlToolkit.DomUtility=new AjaxControlToolkit._DomUtility;AjaxControlToolkit.TextBoxWrapper=function(b){var a=this;AjaxControlToolkit.TextBoxWrapper.initializeBase(a,[b]);a._current=b.value;a._watermark=null;a._isWatermarked=false};AjaxControlToolkit.TextBoxWrapper.prototype={dispose:function(){this.get_element().AjaxControlToolkitTextBoxWrapper=null;AjaxControlToolkit.TextBoxWrapper.callBaseMethod(this,"dispose")},get_Current:function(){this._current=this.get_element().value;return this._current},set_Current:function(a){this._current=a;this._updateElement()},get_Value:function(){if(this.get_IsWatermarked())return "";else return this.get_Current()},set_Value:function(b){var a=this;a.set_Current(b);if(!b||0==b.length)null!=a._watermark&&a.set_IsWatermarked(true);else a.set_IsWatermarked(false)},get_Watermark:function(){return this._watermark},set_Watermark:function(a){this._watermark=a;this._updateElement()},get_IsWatermarked:function(){return this._isWatermarked},set_IsWatermarked:function(b){var a=this;if(a._isWatermarked!=b){a._isWatermarked=b;a._updateElement();a._raiseWatermarkChanged()}},_updateElement:function(){var a=this,b=a.get_element();if(a._isWatermarked){if(b.value!=a._watermark)b.value=a._watermark}else if(b.value!=a._current)b.value=a._current},add_WatermarkChanged:function(a){this.get_events().addHandler("WatermarkChanged",a)},remove_WatermarkChanged:function(a){this.get_events().removeHandler("WatermarkChanged",a)},_raiseWatermarkChanged:function(){var a=this.get_events().getHandler("WatermarkChanged");a&&a(this,Sys.EventArgs.Empty)}};AjaxControlToolkit.TextBoxWrapper.get_Wrapper=function(a){if(null==a.AjaxControlToolkitTextBoxWrapper)a.AjaxControlToolkitTextBoxWrapper=new AjaxControlToolkit.TextBoxWrapper(a);return a.AjaxControlToolkitTextBoxWrapper};AjaxControlToolkit.TextBoxWrapper.registerClass("AjaxControlToolkit.TextBoxWrapper",Sys.UI.Behavior);AjaxControlToolkit.TextBoxWrapper.validatorGetValue=function(b){var a=$get(b);if(a&&a.AjaxControlToolkitTextBoxWrapper)return a.AjaxControlToolkitTextBoxWrapper.get_Value();return AjaxControlToolkit.TextBoxWrapper._originalValidatorGetValue(b)};if(typeof ValidatorGetValue=="function"){AjaxControlToolkit.TextBoxWrapper._originalValidatorGetValue=ValidatorGetValue;ValidatorGetValue=AjaxControlToolkit.TextBoxWrapper.validatorGetValue}if(Sys.CultureInfo.prototype._getAbbrMonthIndex){Sys.CultureInfo.prototype._getAbbrMonthIndex=function(b){var a=this;if(!a._upperAbbrMonths)a._upperAbbrMonths=a._toUpperArray(a.dateTimeFormat.AbbreviatedMonthNames);return Array.indexOf(a._upperAbbrMonths,a._toUpper(b))};Sys.CultureInfo.CurrentCulture._getAbbrMonthIndex=Sys.CultureInfo.prototype._getAbbrMonthIndex;Sys.CultureInfo.InvariantCulture._getAbbrMonthIndex=Sys.CultureInfo.prototype._getAbbrMonthIndex};
|
|
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded(); |