/* * * 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){this._owner=r,this._dropDownContainerID=i+"_DropDownContainer";var f=i+"_DropDownCalendar",u=n.Utility.CreateElement("div");u.id=this._dropDownContainerID,u.style.background="white",this._setContainerDirectly(u),t.call(this,u,f)}return __extends(i,t),i.prototype._beginInit=function(){t.prototype._beginInit.call(this),this.IsShow=!1,this.IsMouseOver=!1,this.Align=n.RelativePosition.Left},i.prototype._endInit=function(){if(!this._owner)return;var n=this._owner._getDropDownPos(this.GetWidth(),this.GetHeight(),this.GetAlign());this.Left=n.Left,this.Top=n.Top,this.SuspendLayout(),this._initDefault(),this._syncDataToCalendar(),this._initEventHandler(),t.prototype._endInit.call(this)},i.prototype._createCalendarRender=function(){return new n.DropDownCalendarRender(this)},i.prototype._createCalendarUIProcess=function(){return new n.DropDownCalendarUIProcess(this)},i.prototype._initDefault=function(){this.SetAutoSize(!0)},i.prototype._initEventHandler=function(){var t=this,i;this.DocumentMouseMoveHandler=function(n){var i=n.srcElement||n.target;t.IsMouseOver=t._getContainer().contains(i),!t.IsMouseOver&&t.IsShow&&t.SetInnerFocus()},n.Utility.chrome&&(this.DocumentMouseDownHandler=function(n){var i,r,f,u;if(!t._owner)return;i=n.srcElement||n.target,t.IsMouseOver=t._getContainer().contains(i),r=!1,t.UIProcess._popupHolidayStylesMenuShown&&(f=t.Render.CalendarSectionDom.HolidayStylesMenuDom,u=f.HolidayStylesMenuContainer,r=u.contains(i)),t.IsMouseOver||t._owner._topLevelElement.contains(i)||r||t._owner.CloseDropDown()}),this.onFocus=function(){if(!t._owner)return;t._owner.SetInnerFocus()},i=this._getContainer(),n.Utility.AttachEvent(i,"focus",this.onFocus),n.Utility.AttachEvent(document,"mousemove",this.DocumentMouseMoveHandler,!1),n.Utility.chrome&&n.Utility.AttachEvent(document,"mousedown",this.DocumentMouseDownHandler,!1)},i.prototype._syncDataToCalendar=function(){var t=this._owner.GetValue(),n=t;n===null&&(n=new Date),this.SetFocusDate(n),this.SetSelectedDate(t),this.SetEnablejQueryTheme(this._owner.GetEnablejQueryTheme())},i.prototype._dispose=function(){t.prototype._dispose.call(this),n.Utility.DetachEvent(document,"mousemove",this.DocumentMouseMoveHandler),n.Utility.chrome&&n.Utility.DetachEvent(document,"mousedown",this.DocumentMouseDownHandler)},i.prototype.SetInnerFocus=function(t){!n.Utility.IsPad()&&this._owner&&this._owner.SetInnerFocus(null,t)},i.prototype.SetSelectedDate=function(n){return n>this.GetMaxDate()?n=this.GetMaxDate():nf&&(r=f),i=new Date(o,e,r)}}return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i},i.prototype.syncDateToEditor=function(n,t,i){var f="",u=i.GetHolidaysStyleType(n),r;u!=""&&(r=u.toString().split(","),f=r[0]),i.IsAllowSelection(f,n)?t.SetValue(n):t.SetValue(null),t.SetInnerFocus(!0)},i.prototype.getEditorValue=function(){var n=this.getControl();return n!=null?n._owner.GetValue():null},i.prototype._ExcuteShortcutAction=function(i){var f=!0,u=this.Control._getShortcutObj(),r;u!=null&&(r=u._uiProcess._data.GetKeyActionsByEvent(this,i),r.KeyAction!=null&&(f=!1));if(f)switch(i.keyCode){case n.Key.F2:this.Control.Data.SelectedDate=null,this.Control.Data.Selections.Clear(),this.Control.FireEvent(this.Control._specialClientEvents.SelectedDateChanged),this.Control.UpdateControl(n.CalendarUpdateType.SelectionType);break;case n.Key.F8:this.Control.UIProcess.onClickToday();break}else t.prototype._ExcuteShortcutAction.call(this,i)},i.prototype.onClickToday=function(){var i,n,r;t.prototype.onClickToday.call(this),i=this.getControl(),i!=null&&(n=this._getData(),r=this.getSyncDateToEditor(n),this.syncDateToEditor(r,i,n))},i}(n.CalendarUIProcess);n.DropDownCalendarUIProcess=t})(GCIM||(GCIM={})) if(typeof(Sys)!='undefined' && typeof(Sys.Application) != 'undefined'){Sys.Application.notifyScriptLoaded();};