/* * * GrapeCity InputMan Library 1.0.0 * http://grapecity.com/ * * Copyright(c) GrapeCity, Inc. All rights reserved. * **/ var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},GCIM;(function(n){var t=function(t){function i(i,r){var u,f;this._owner=r,this._containerID=i+"_DropDownContainer",u=n.Utility.CreateElement("div"),u.id=this._containerID,f=i+"_DropDownCalculator",t.call(this,u,f)}return __extends(i,t),i.prototype._endInit=function(){this.Align=n.RelativePosition.Left,this.CreateOKButton(),this._render._isDropDownCalculator=!0,this.SetAutoSize(!0);var i=this._owner._getDropDownPos(this._getCSSWidth(),this._getCSSHeight(),this.GetAlign());this.Left=i.Left,this.Top=i.Top,this.IsShow=!1,this.IsMouseOver=!1,this.SetEnablejQueryTheme(this._owner.GetEnablejQueryTheme()),this.AddEventHandler(),t.prototype._endInit.call(this)},i.prototype.CreateOKButton=function(){var t=n.Utility.CreateElement("input"),r,i;this._render._okBtn=t,t.id=this._getId()+"_Btn_OK",t.value="OK",t.type="button",t.setAttribute("isOKButton",!0),t.style.padding="0px",t.style.color="windowtext",t.style.webkitAppearance="none",t.style.overflow="hidden",t.style.font="inherit",t.style.cursor="inherit",this._render._allBtns.push(t),r=this._render._outTable.insertRow(-1),i=r.insertCell(-1),i.colSpan=6,i.align="center",i.appendChild(this._render._okBtn),this._render._othertLineBtns.push(i)},i.prototype.AddEventHandler=function(){var t=this,o=function(n){t.IsMouseOver=!0,t._lastOverButton=n.srcElement||n.target},c=function(n){t.IsMouseOver=!1,t._lastOverButton=null},e=function(){n.Utility.IsPad()||t._owner.SetInnerFocus()},u,r;this._onClickOKBtn=function(){if(t.LastOperation=="ClickNumericButton")t.onButtonClick(19);var i=t.GetText(),r=i;r=n.Utility.FilterText("-.0123456789",r);if(r.length==i.length)if(t._owner!=null)if(!t._owner.GetReadOnly()){parseFloat(i)==0&&(t._owner._format.Fields.IsPositive=!0);if(n.Utility.IsPad())try{t._owner.SetValueForIpad(parseFloat(i))}catch(u){}else t._owner.SetUnCheckedValue(i)}f(),t._owner.SetMemoryNumber(t.MemoryNumber),t._owner.CloseDropDown(),n.Utility.ValidateControl(t._owner._getId())};var s=function(){t.ActiveButtonBackColor=t._render._okBtn.style.backgroundColor,t.GetFlatStyle()===n.FlatStyle.Flat?t._render._okBtn.style.backgroundColor="gray":t.GetFlatStyle()===n.InternalFlatStyle.JQueryUI&&(t._render._okBtn.className="ui-button ui-state-default ui-corner-all ui-state-hover")},f=function(){t.GetFlatStyle()===n.FlatStyle.Flat?t._render._okBtn.style.backgroundColor=t.ActiveButtonBackColor:t.GetFlatStyle()===n.InternalFlatStyle.JQueryUI&&(t._render._okBtn.className="ui-button ui-state-default ui-corner-all")},h=function(){n.Utility.IsPad()||t._owner.SetInnerFocus()},i=this._render._outDivContainer;for(n.Utility.AttachEvent(i,"mouseover",o),n.Utility.AttachEvent(i,"mouseout",c),n.Utility.AttachEvent(i,"focus",e),n.Utility.AttachEvent(i,"click",h),u=0;u