1Type.registerNamespace("Ev1.Controls");Ev1.Controls.TextBox=function(n,t,i){if(typeof jQuery=="undefined")throw"Ev1.Controls.TextBox requires that jQuery be included in the page.";this.$=window.jQuery;this.$element=this.$(n);this.$element.data("Ev1.Controls.TextBox",this);this.$textBox=this.$element.find(".LH1TextBoxText");this.textBox=this.$textBox.get(0);this.$helpText=this.$element.find(".LH1TextBoxHelpText");this._height=null;this._enabled=!0;this._readonly=!1;this._text=null;this._helpText=null;this._inputFilter=null;this._textChanged=null;this._filterOnKeyDown=null;this._keyDown=null;this._paste=null;this.$textBox.change(this._getChangeHandler());this.$textBox.focus(this._getFocusHandler());this.$textBox.blur(this._getBlurHandler());this.$textBox.keydown(this._getKeyDownHandler());this.$textBox.keypress(this._getKeyPressHandler());this.textBox.oninput=this._getOnInputHandler();this.textBox.onpaste=this._getOnPasteHandler();this.textBox.oncut=this._getOnCutHandler();this._onClientKeyDown=t;this._onClientBlur=i;this._setHelpTextDisplayState()};Ev1.Controls.TextBox.prototype={height:function(n){return typeof n=="undefined"?this.$textBox.height():typeof n=="number"&&this._height!==n&&n!=0?(this._height=n,this.$textBox.height(n),this):this},width:function(n){return typeof n=="undefined"?this.$textBox.outerWidth():(typeof n=="number"&&n!=0&&this.$textBox.outerWidth(n),this)},enabled:function(n){return typeof n=="undefined"?this.$textBox.is(":enabled"):typeof n=="boolean"&&this._enabled!==n&&!this._readonly?(this._enabled=n,this.$textBox.prop("disabled",!n),this.$element.prop("disabled",!n),n?(this.$textBox.removeClass("LH1TextBoxDisabledText"),this.$textBox.addClass("LH1TextBoxEnabledText")):(this.$textBox.removeClass("LH1TextBoxEnabledText"),this.$textBox.addClass("LH1TextBoxDisabledText")),this._setHelpTextDisplayState(),this):this},readonly:function(n){return typeof n=="undefined"?this.$textBox.is("[readonly]"):typeof n=="boolean"&&this._readonly!==n&&this._enabled?(this._readonly=n,this.$textBox.attr("readonly",n),n?(this.$textBox.removeClass("LH1TextBoxEnabledText"),this.$textBox.addClass("LH1TextBoxReadOnlyText")):(this.$textBox.removeClass("LH1TextBoxReadOnlyText"),this.$textBox.addClass("LH1TextBoxEnabledText")),this._setHelpTextDisplayState(),this):this},text:function(n){if(typeof n=="undefined")return this.$textBox.val();var t=this._applyMaxLength(n,!1);return this._text=t,this.$textBox.val(t),this._setHelpTextDisplayState(),this._onTextChanged(t),this},helptext:function(n){return typeof n=="undefined"?this.$helpText.text():(this._helpText=n,this.$helpText.text(n),this)},inputFilter:function(n,t,i){if(typeof n=="undefined")return this._inputFilter;if(n==="Date")this._filterOnKeyDown=this._getDateFieldNoParseFilter();else if(n==="Zip")this._filterOnKeyDown=this._getZipFilter();else if(n==="Money")this._filterOnKeyDown=this._getMoneyFilter(!1);else if(n==="MoneyNoLimit")this._filterOnKeyDown=this._getMoneyFilter(!0);else if(n==="Int")this._filterOnKeyDown=this._getIntFilter();else if(n==="AccountNumber")this._filterOnKeyDown=this._getAccountNumberFilter();else if(n==="AutoTab"&&t&&i){var r=this.$("#"+t);this._filterOnKeyDown=this._getAutoTabIntFilter(r,i)}return this},selectionStart:function(){var u=this.text(),t=u.length-1,i,n,r;return typeof this.textBox.selectionStart!="undefined"?t=this.textBox.selectionStart:typeof document.selection!="undefined"&&(this.textBox.focus(),i=document.selection.createRange(),i!=null&&(n=this.textBox.createTextRange(),r=n.duplicate(),n.moveToBookmark(i.getBookmark()),r.setEndPoint("EndToStart",n),t=r.text.length)),t},selectionEnd:function(){var u=this.text(),t=u.length-1,i,n,r;return typeof this.textBox.selectionEnd!="undefined"?t=this.textBox.selectionEnd:typeof document.selection!="undefined"&&(this.textBox.focus(),i=document.selection.createRange(),i!=null&&(n=this.textBox.createTextRange(),r=n.duplicate(),n.moveToBookmark(i.getBookmark()),r.setEndPoint("EndToEnd",n),t=r.text.length)),t},keyDown:function(n){return typeof n!="undefined"&&(this._keyDown=n),this},paste:function(n){return typeof n!="undefined"&&(this._paste=n),this},textChanged:function(n){typeof n!="undefined"&&(this._textChanged=n)},getJQueryObject:function(){return this.$textBox},triggerEvent:function(n){this.$textBox.trigger(n)},show:function(){this.$element.css("display","inline-block")},hide:function(){this.$element.css("display","none")},clear:function(){this.text("")},maxLength:function(n){var t=typeof n,i;return t==="undefined"?(i=parseInt(this.$textBox.attr("maxlength"),10),isNaN(i)?null:i):((t==="number"||t==="string")&&n>0?this.$textBox.attr("maxlength",n):this.$textBox.removeAttr("maxlength"),this)},tabIndex:function(n){if(typeof n=="undefined")return this.$textBox.prop("tabindex");var t=parseInt(n,10);return isNaN(t)||this.$textBox.prop("tabindex",n),this},autocomplete:function(n){return typeof n=="undefined"?this.$textBox.prop("autocomplete"):(this.$textBox.prop("autocomplete",n),this)},placeholder:function(n){if(typeof n=="undefined")return this.$textBox.attr("placeholder");n===null?this.$textBox.removeAttr("placeholder"):this.$textBox.attr("placeholder",n)},ariaDescribedby:function(n){return typeof n=="undefined"?this.$textBox.attr("aria-describedby"):(n===null?this.$textBox.removeAttr("aria-describedby"):this.$textBox.attr("aria-describedby",n),this)},addAriaDescribedBy:function(n){var t=this.ariaDescribedby(),i=this._addControlId(t,
1n);this.ariaDescribedby(i)},removeAriaDescribedBy:function(n){var t=this.ariaDescribedby(),i=this._removeControlId(t,n);this.ariaDescribedby(i)},ariaLabel:function(n){return typeof n=="undefined"?this.$textBox.attr("aria-label"):(this.$textBox.attr("aria-label",n),this)},ariaInvalid:function(n){return typeof n=="undefined"?this.$textBox.attr("aria-invalid"):(typeof n=="boolean"&&this.$textBox.attr("aria-invalid",n),this)},ariaRequired:function(n){return typeof n=="undefined"?this.$textBox.attr("aria-required"):(typeof n=="boolean"&&this.$textBox.attr("aria-required",n),this)},_getOnInputHandler:function(){var n=this;return function(t){return n._onTextChanged(t.target.value)}},_getChangeHandler:function(){return this._getBlurHandler()},_getFocusHandler:function(){var n=this;return function(){n.$helpText.hide()}},_getBlurHandler:function(){var n=this;return function(t){n._setHelpTextDisplayState();n._evalClientEvent(n._onClientBlur,t)}},_onTextChanged:function(n){typeof this._textChanged=="function"&&this._textChanged(n)},_onKeyDown:function(n){var t=this._onFilter(n);return t||typeof this._keyDown!="function"||this._keyDown(n),t},_onFilter:function(n){var t=!1;return typeof this._filterOnKeyDown=="function"&&(t=this._filterOnKeyDown(n)),t},_getKeyDownHandler:function(){var n=this;return function(t){var i=t.which,r;n._isDeletionKeyCode(i)&&(r=n._getNewText(i,"",!0),n._evalKeyEvent(r,t));n._evalClientEvent(n._onClientKeyDown,t)}},_getKeyPressHandler:function(){var n=this;return function(t){var i=t.which,r;i==0||i==8||i==27||t.ctrlKey||t.altKey||t.metaKey||(r=n._getNewText(i,String.fromCharCode(i)),n._evalKeyEvent(r,t))}},_evalKeyEvent:function(n,t){var i={newText:n.newText,textChanged:n.textChanged,event:t};this._onKeyDown(i)?t.preventDefault():n.textChanged&&this._onTextChanged(n.newText)},_onPaste:function(n){typeof this._paste=="function"&&this._paste(n)},_getOnPasteHandler:function(){var n=this;return function(t){return n._handleCutPaste(n._getNewText(-1,n._getClipboardText(t),!1,!1),t,function(t){n._onPaste(t)})}},_getOnCutHandler:function(){var n=this;return function(t){return n._handleCutPaste(n._getNewText(-1,""),t)}},_handleCutPaste:function(n,t,i){var r={newText:n.newText,textChanged:n.textChanged,event:t},u=this._onFilter(r);return u?t&&typeof t.preventDefault=="function"&&t.preventDefault():(typeof i=="function"&&i(r),r.textChanged&&this._onTextChanged(r.newText)),!u},_setHelpTextDisplayState:function(){!this.enabled()||this.readonly()||this.text()!=""||this.$textBox.is(":focus")?this.$helpText.hide():this.$helpText.show()},_evalClientEvent:function(n,t){var i=!0;return typeof n=="string"&&n.trim()!==""&&(i=new Function("e","event",n).call(this.textBox,t,t),typeof i!="boolean"&&(i=!0)),i},_getClipboardText:function(n){var t="";return n&&n.clipboardData?t=n.clipboardData.getData("text/plain"):window.clipboardData&&(t=window.clipboardData.getData("Text")),t},_getNewText:function(n,t,i,r){r=typeof r!="undefined"?r:!0;var o=this.text(),s=this.selectionStart(),h=this.selectionEnd(),f=o.slice(0,s),e=o.slice(h,o.length),u;return i?n==8&&s==h?u=f.slice(0,f.length-1)+e:n==46&&s==h?u=f+e.slice(1,e.length):(this._isDeletionKeyCode(n)&&(t=""),u=f+t+e):u=f+t+e,u=this._applyMaxLength(u,r),{newText:u,textChanged:o!=u}},_applyMaxLength:function(n,t){if(typeof n!="undefined"&&n!=null){var i=this.maxLength()||0;if(i>0&&n.length>i)return t?this.text():n.substring(0,i)}return n},_intRegex:/^[0-9]{0,10}$/,_floatRegex:/^[0-9]{0,6}\.?[0-9]{0,2}$/,_floatNoMaxRegex:/^[0-9]*\.?[0-9]{0,2}$/,_zipRegex:/^[0-9]{0,5}$/,_zipRegexLong:/^[0-9]{5}\x2D[0-9]{0,4}$/,_accountNumberRegex:/^[a-z0-9]{1,17}$/i,_getDateFieldNoParseFilter:function(){return function(n){var t=!1;return _isOperationKeyCode(n.keyCode)||_isDateKeyCode(n.keyCode)||(t=!0),t}},_getZipFilter:function(){var n=this;return function(t){var i=!1;return n._isOperationKeyCode(t.keyCode)||n._zipRegex.test(t.newText)||n._zipRegexLong.test(t.newText)||(i=!0),i}},_getMoneyFilter:function(n){var t=this;return function(i){var u=!1,r=i.newText,f;return t._isOperationKeyCode(i.keyCode)||(r.substr(0,1)=="$"&&(r=r.substr(1)),r.replace(/,/g,""),f=t._floatRegex,n&&(f=t._floatNoMaxRegex),(!f.test(r)||r.split(".").length>2||r.indexOf("..")!=-1)&&(u=!0)),(r.split(".").length>2||r.indexOf("..")!=-1)&&(u=!0),u}},_getIntFilter:function(){var n=this;return function(t){var i=!1;return n._isOperationKeyCode(t.keyCode)||n._intRegex.test(t.newText)||(i=!0),i}},_getAccountNumberFilter:function(){var n=this;return function(t){var i=!1;return n._isOperationKeyCode(t.keyCode)||n._accountNumberRegex.test(t.newText)||(i=!0),i}},_addControlId:function(n,t){var i=n?n.split(" "):[];return $.inArray(t,i)===-1?(i.push(t),i.join(" ")):n},_removeControlId:function(n,t){var i=n?n.split(" "):[],r=$.inArray(t,i);return r===-1?n:(i.splice(r,1),i.join(" "))},_getAutoTabIntFilter:function(n,t){var i=this;return function(r){var s=i.$textBox,u=n,l=n.find("input:visible"),h,e,o,f,c;return l.length&&(u=l),h=t,e=!1,i._isOperationKeyCode(r.keyCode)||(i._intRegex.test(r.newText)?(o=r.newText,o.length>h?(s.blur(),u.focus(),u.select(),u.val(r.character),f=u.get(0),f&&(typeof f.setSelectionRange=="function"?f.setSelectionRange(u.val().length,u.val().length):typeof f.createTextRange=="function"&&(c=f.createTextRange(),c.move("character",u.val().length),c.select(),f.focu
1s())),e=!0):o.length==h&&(e=!0,s.val(o),s.blur(),u.focus(),u.select())):e=!0),e}},_isOperationKeyCode:function(n){return n>=35&&n<=40||n==9||n==8||n==46||n==16},_isNumberKeyCode:function(n){return n>=48&&n<=57},_isDateKeyCode:function(n){return this._isNumberKeyCode(n)||n==47},_isDeletionKeyCode:function(n){return n==8||n==46}};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.