/* * * 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 i=function(){function t(n,t,i,r){this._propertyChangeHandler=null,this._backColor="",this._foreColor="",this._imageUrl="",this._imageWidth="16px",this._imageHeight="16px",this._indent="0px",this._fontFamily="",this._fontSize="",this._fontStyle="",this._fontWeight="",this._textDecoration="",this._propertyChangeHandler=null,n!==undefined&&this.SetBackColor(n),t!==undefined&&this.SetForeColor(t),i!==undefined&&this.SetFontFamily(i),r!==undefined&&this.SetFontSize(r)}return t.prototype.GetBackColor=function(){return this._backColor},t.prototype.SetBackColor=function(t){t=n.Utility.CheckColor(t),t!==this._backColor&&(this._backColor=t,this.OnPropertyChanged("BackColor"))},t.prototype.GetForeColor=function(){return this._foreColor},t.prototype.SetForeColor=function(t){t=n.Utility.CheckColor(t),t!==this._foreColor&&(this._foreColor=t,this.OnPropertyChanged("ForeColor"))},t.prototype.GetImageUrl=function(){return this._imageUrl},t.prototype.SetImageUrl=function(t){t=n.Utility.CheckImageUrl(t),t!==this._imageUrl&&(this._imageUrl=t,this.OnPropertyChanged("ImageUrl"))},t.prototype.GetImageSize=function(){return new n.Size(n.Utility.GetCSSLength(this._imageWidth),n.Utility.GetCSSLength(this._imageHeight))},t.prototype.SetImageSize=function(t,i){t=n.Utility.CheckCSSLength(t),i=n.Utility.CheckCSSLength(i),(t!==this._imageWidth||i!==this._imageHeight)&&(this._imageWidth=t,this._imageHeight=i,this.OnPropertyChanged("ImageSize"))},t.prototype.GetIndent=function(){return n.Utility.GetCSSLength(this._indent)},t.prototype.SetIndent=function(t){t=n.Utility.CheckCSSLength(t),t!==this._indent&&(this._indent=t,this.OnPropertyChanged("Indent"))},t.prototype.GetFontFamily=function(){return this._fontFamily},t.prototype.SetFontFamily=function(t){t=n.Utility.CheckString(t),t!==this._fontFamily&&(this._fontFamily=t,this.OnPropertyChanged("FontFamily"))},t.prototype.GetFontSize=function(){return this._fontSize},t.prototype.SetFontSize=function(t){t=n.Utility.CheckFontSizeValue(t),t!==this._fontSize&&(this._fontSize=t,this.OnPropertyChanged("FontSize"))},t.prototype.GetFontStyle=function(){return this._fontStyle},t.prototype.SetFontStyle=function(t){t=n.Utility.CheckEnum(n.FontStyle,t),t!==this._fontStyle&&(this._fontStyle=t,this.OnPropertyChanged("FontStyle"))},t.prototype.GetFontWeight=function(){return this._fontWeight},t.prototype.SetFontWeight=function(t){t=n.Utility.CheckEnum(n.FontWeight,t),t!==this._fontWeight&&(this._fontWeight=t,this.OnPropertyChanged("FontWeight"))},t.prototype.GetTextDecoration=function(){return n.Utility.GetMultipleStringEnum(this._textDecoration)},t.prototype.SetTextDecoration=function(t){t=n.Utility.CheckMultipleStringEnum(n.TextDecoration,t),t!==this._textDecoration&&(this._textDecoration=t,this.OnPropertyChanged("TextDecoration"))},t.prototype.SetPropertyChangedHandler=function(n){this._propertyChangeHandler=n},t.prototype.OnPropertyChanged=function(t){var i=n.Utility.CheckEventHandler(this._propertyChangeHandler);i!==null&&i.call(this,t)},t}(),t;n.ItemTemplate=i,t=function(n){function t(){n.call(this),this._owner=null}return __extends(t,n),t.prototype.SetOwner=function(n){var r,t,i;this._owner=n,r=this._owner;if(r!==null)for(t=0;t-1)return f}return-1},i.prototype.FindStringInternal=function(n,t,i){var r,u,f;if(this._items.GetCount()>0){if(i<0||i>this._items.length-1)throw"startIndex out of range";else if(n<0)throw"findTargetColumnIndex out of range";for(r=i;rn){f=u._subItems[n].GetValue();if(f.toLowerCase().startWith(t.toLowerCase()))return r}}}return-1},i.prototype.FindStringExact=function(t,i,r){var u,f;t=n.Utility.CheckInt(t,0),i=n.Utility.CheckString(i);if(r!==undefined)return r=n.Utility.CheckInt(r,0),this.FindStringExactInternal(t,i,r);for(u=0;u-1)return f}return-1},i.prototype.FindStringExactInternal=function(n,t,i){var r,u,f;if(this._items.GetCount()>0){if(i<0||i>this._items.length-1)throw"startIndex out of range";else if(n<0)throw"findTargetColumnIndex out of range";for(r=i;rn){f=u._subItems[n]._value;if(f===t)return r}}}return-1},i.prototype.GetSelected=function(n){return this._data.IsRowSelect(n)},i.prototype.SetSelected=function(t,i){return t=n.Utility.CheckInt(t,0,this._items.GetCount()),i=n.Utility.CheckBool(i),i?(this._command.SetFocusedRow(t),this._command.DoSelection(t,null,!1)):(this._command.SetFocusedRow(-1),this._command.DoUnSelection(t)),this},i.prototype.GetSelectedIndices=function(){return this._data.GetSelectRows()},i.prototype.GetSelectedItems=function(){for(var t=[],i=this._data.GetSelectRows(),n=0;n0?n[0]:-1},i.prototype.SetSelectedIndex=function(t){return t=n.Utility.CheckInt(t,-1,this._data._rowCount-1),t===-1?this.ClearSelected():this.SetSelected(t,!0),this},i.prototype.GetSelectedItem=function(){var n=this.GetSelectedIndex();return n<0?null:this._items.GetItem(n)},i.prototype.SetSelectedItem=function(n){var t=this._items.IndexOf(n);t<0?this.ClearSelected():this.SetSelected(t,!0)},i.prototype.GetCheckedIndices=function(){return this._data.GetCheckRows()},i.prototype.GetCheckedItems=function(){for(var t=[],i=this.GetCheckedIndices(),n=0;n=0&&t0&&(n=u[0]))),r="",f="",n<0||(i=this._list._items[n],i!==null&&(t=i._subItems[this._data._textSubItemIndex],t!==undefined&&t!==null&&(r=t.GetValue()),t=i._subItems[this._data._descriptionSubItemIndex],t!==undefined&&t!==null&&(f=t.GetValue()))),this.SetStatusBarText(f),this._list.SetText(r)},t.prototype.SetStatusBarText=function(t){var i=this._render._statusBar.rows.item(0).cells.item(0);(t===null||t==="")&&(t=String.fromCharCode(8204)),n.Utility.ClearChildren(i),i.appendChild(n.Utility.CreateTextNode(t))},t.prototype.UnSelectAllRow=function(){for(var t=this._data.GetSelectRows(),n=0;nt&&ut?f>t&&f=0&&nthis._render._dataContainer.clientWidth?(this.ShowOverflowTip(s,u,t),l=!0):this.CloseOverflowTip()):this.CloseOverflowTip()),l},t.prototype.GetVerticalScrollBarWidth=function(){return this._render._dataContainer.scrollWidth-this._render._dataContainer.clientWidth},t.prototype.ShowOverflowTip=function(t,i,r){var f=this,u;this._overflowTip===undefined&&(this._overflowTip=new n.ToolTip,this._overflowTip.SetShowTime(2e3),this._overflowTip.SetMouseDownHandler(function(n){var t=f._overflowTip.Tag;f.DoSelection(t,n,!0)})),this._overflowTip.SynFont(i),this._overflowTip.SetColorScheme(this._data.GetRealControlEffect()),u=n.Utility.GetElementPosition(i),this._overflowTip.Tag=r,this._overflowTip.Show(t,u.Left,u.Top)},t.prototype.CloseOverflowTip=function(){this._overflowTip!==undefined&&this._overflowTip.Close()},t.prototype.HeaderMouseDown=function(t){this._data._isComboList&&n.Utility.PreventDefault(t),this._render._headerDataArea.style.cursor!==""&&n.Utility.GetMouseButton(t)===n.MouseButton.Left&&(this.StartResize(t),n.Utility.PreventDefault(t))},t.prototype.MouseWheel=function(t){var i=!1,u=Math.abs(t.wheelDelta/120),r;this._render.GetRealVerticalScrollBarWidth()>0&&(t.wheelDelta>0?this._render._dataContainer.scrollTop==0&&(i=!0):(r=this._render._dataContainer.scrollTop+this._render._dataContainer.clientHeight,rr&&(this._data.IsLoadComplete()!==!1||this._data._filtering||this.LoadDataFromServer());if(!this._data._isBigTabelMode)return;f-t>0?t-n<0&&(this._totalScrollCount=100):f-t<0?t+u+n>r&&(this._totalScrollCount=100,this.DoScrollDown()):(t+u+n>r&&this._data._scrollTopIndex+this._data._viewCount0&&(this._scrollInterval=setTimeout(function(){u.DoScrollDown()},100))},t.prototype.DoScrollUp=function(){var u=this,i,r;this._scrollInterval!==undefined&&this._scrollInterval!==null&&(clearTimeout(this._scrollInterval),this._scrollInterval=null),i=5,this._totalScrollCount-=i;var t=this._data._scrollTopIndex,n=t-i,f=this._render._dataContainer.scrollTop;n=Math.min(n,this._data._rowCount-this._data._viewCount),n=Math.max(0,n),t!==n&&(this._data._scrollTopIndex=n,r=this.ScrollViewUp(t,n),this._render._dataContainer.scrollTop=f+r,this._render.AdjustLayout("column")),this._totalScrollCount>0&&(this._scrollInterval=setTimeout(function(){u.DoScrollUp()},100))},t.prototype.ScrollViewDown=function(n,t){for(var u=0,i,r=n+this._data._viewCount;r=t;i--)this._data._items[i].GetVisible()!==!1&&(this._render._htmlTable.rows.item(i).style.display=""),u+=this._render._htmlTable.rows.item(i).clientHeight;for(r=t+this._data._viewCount;ru)break}for(t===i&&t++,n=t;n=0;t--){r+=this._render._htmlTable.rows.item(t).clientHeight;if(r>u)break}for(t===i&&t--,n=t;n>=0;n--)if(this._data._items[n]._enabled&&this._data._items[n].GetVisible())break;return n=Math.max(0,n)},t.prototype.SelectNextPage=function(t){var i=this.GetNextPageTopIndex();i!==-1&&(this.SetFocusedRow(i),this._data._selectionMode!==n.ListSelectionMode.MultiSimple&&this.DoSelection(i,t,!0))},t.prototype.SelectPreivousPage=function(t){var i=this.GetPreviousPageTopIndex();i!==-1&&(this.SetFocusedRow(i),this._data._selectionMode!==n.ListSelectionMode.MultiSimple&&this.DoSelection(i,t,!0))},t.prototype.SelectFirst=function(t){var i=this.GetFirstSelectableItem();i!==-1&&(this.SetFocusedRow(i),this._data._selectionMode!==n.ListSelectionMode.MultiSimple&&this.DoSelection(i,t,!0))},t.prototype.SelectLast=function(t){var i=this.GetLastSelectableItem();i!==-1&&(this.SetFocusedRow(i),this._data._selectionMode!==n.ListSelectionMode.MultiSimple&&this.DoSelection(i,t,!0))},t.prototype.SelectNext=function(t){var i=this.GetNextSelectableItem();i!==-1&&(this.SetFocusedRow(i),this._data._selectionMode!==n.ListSelectionMode.MultiSimple&&this.DoSelection(i,t,!0))},t.prototype.SelectPrevious=function(t){var i=this.GetPreviousSelectableItem();i!==-1&&(this.SetFocusedRow(i),this._data._selectionMode!==n.ListSelectionMode.MultiSimple&&this.DoSelection(i,t,!0))},t.prototype.GetFirstSelectableItem=function(){for(var n=0;n=0;n--)if(this._data._items[n].GetVisible()!==!1&&this._data._items[n]._enabled!==!1)return n;return-1},t.prototype.GetNextSelectableItem=function(n){n==null&&(n=this._data._focusedRowIndex);for(var t=n+1;t=0;t--)if(this._data._items[t].GetVisible()!==!1&&this._data._items[t]._enabled!==!1)return t;return-1},t.prototype.Search=function(n,t,i){var u=n,o=0,r,e,f;t!==undefined&&t!==null&&(o=t);if(u!==undefined&&u!==null&&u!==""){for(e="",r=o;r0)for(e=this._data._firstVisibleColumn,n=this._render._templateRow.cells.item(e),this._render._cantControlCellWidth&&(n=n.firstChild),f=n.firstChild.rows.item(0).cells.item(0),f.getAttribute("checkbox")==="true"?f.style.display=o?"":"none":(s=this._render.CreateTemplateCellCheckBox(),n.firstChild.rows.item(0).insertBefore(s,n.firstChild.rows.item(0).firstChild)),t=0;t=0&&this._data._showItemImage)for(n=0;n=0&&this._data._showItemImage)for(n=0;n=0)for(r=e;r=0)for(n=0;ni||(i++,i!==this._data._firstVisibleColumn&&this.OnFirstVisibleColumnChanged(i,this._data._firstVisibleColumn)),this.RebindData(),this.UpdateScrollBars(),this._render.AdjustLayout("column"),this._list.SetSelectedIndices(r)},t.prototype.InsertColumn=function(n){var e,f,r,u,s,i,h,c,t,o;this.SetFocusedRow(-1),this.DoSelection(-1,null,!1),this.UnCheckAllRow(!1),this.HoverCell(-1),this._data._columnCount++,f=this._render._headerDataArea.rows.item(0).cells,e=f.length>0?f.item(0).cloneNode(!0):this._render.CreateHeaderCell(),this._render.InitHeaderCell(e,n),this._render._headerDataArea.rows.item(0).insertBefore(e,f.item(n)),r=this._render._headerRowForMeasture.cells,u=r.length>0?r.item(0).cloneNode(!0):this._render.CreateHeaderCell(!0),this._render.InitHeaderCell(u,n,!0),this._render._headerRowForMeasture.insertBefore(u,r.item(n)),s=this._render._htmlTable;if(!this._render._createFromTable)for(i=0;it||t--,t!==i&&this.OnFirstVisibleColumnChanged(t,i),this.SyncColumnStyle(n),this.RebindData(),this.UpdateScrollBars(),this._render.AdjustLayout("column")},t.prototype.RemoveColumn=function(n){var i,t;for(this.SetFocusedRow(-1),this.DoSelection(-1,null,!1),this.UnCheckAllRow(!1),this.HoverCell(-1),this._data._columnCount--,this._render._headerDataArea.rows.item(0).removeChild(this._render._headerDataArea.rows.item(0).cells.item(n)),i=this._render._htmlTable,t=0;t=0&&n=0&&tf?o=1:eu)if(n>0)if(this._render._htmlTable.rows.item(this._data._visibleItemIndexCol.GetAt(n-1)).offsetTop0&&(this._trySetTopIndexCounter=5,this.DelayScroll(r[0],!0),this.SetFocusedRow(r[0],!1))),this._data._loadDataDynamically=n.LoadDataDynamically!==undefined?n.LoadDataDynamically:!0,n.RecordsPerRequest!==undefined&&(this._data._recordsPerRequest=n.RecordsPerRequest),this._data._isComboList||i._items.SetIsReadOnly(!0),this._data._loadDataDynamically&&i._items.SetIsReadOnly(!0),i._columns.SetIsReadOnly(!0),n.ClientEvents!==undefined&&(n.ClientEvents.ItemCheck!==undefined&&this._list.OnItemCheck(n.ClientEvents.ItemCheck),n.ClientEvents.SelectedIndexChanged!==undefined&&this._list.OnSelectedIndexChanged(n.ClientEvents.SelectedIndexChanged))},t.prototype.DelayScroll=function(n,t){var i=this;setTimeout(function(){if(t)i.ScrollRowIntoView(n);else var r=i.SetTopIndex(n);r?i._trySetTopIndexCounter=0:i._trySetTopIndexCounter>0&&(i.DelayScroll(n,t),i._trySetTopIndexCounter--)},100)},t.prototype.UpdateDefaultListColumnWithServerData=function(n){var t=this._list;n.AutoWidth!==undefined&&t._defaultColumn.SetAutoWidth(n.AutoWidth),n.DataDisplayType!==undefined&&t._defaultColumn.SetDataDisplayType(n.DataDisplayType),n.SortOrder!==undefined&&t._defaultColumn.SetSortOrder(n.SortOrder),n.Visible!==undefined&&t._defaultColumn.SetVisible(n.Visible),n.Width!==undefined&&t._defaultColumn.SetWidth(n.Width),n.Header!==undefined&&this.UpdateListColumnHeaderWithServerData(n.Header,t._defaultColumn._header),n.DefaultSubItemContentHAlign!==undefined&&t._defaultColumn.SetDefaultSubItemContentHAlign(n.DefaultSubItemContentHAlign),n.DefaultSubItemContentVAlign!==undefined&&t._defaultColumn.SetDefaultSubItemContentVAlign(n.DefaultSubItemContentVAlign)},t.prototype.UpdateListHeaderPaneWithServerData=function(n){var i=this._list;n.AutoHeight!==undefined&&i._listHeaderPane.SetAutoHeight(n.AutoHeight),n.BackColor!==undefined&&i._listHeaderPane.SetBackColor(n.BackColor),n.Height!==undefined&&i._listHeaderPane.SetHeight(n.Height),n.Visible!==undefined&&i._listHeaderPane.SetVisible(n.Visible),n.Font!==undefined&&t.UpdateObjectFontWithServerData(n.Font,i._listHeaderPane)},t.prototype.UpdateListColumnWithServerData=function(t){for(var r,i,u=0;u=0){for(this.SuspendSyncRowIndex(),this.BeginAddListItem(),u=i.length>0&&i[0]instanceof n.ListItem?i:t.BuildListItemWithServerData(i,this._data._imageList,this._data._defaultImageIndex),r=0;r0){this._list._data.SuspendSelectedChangedEvent(),this._suspendFocusRowCounter.Suspend();try{for(var t=0;t0){this._list._data.SuspendCheckedEvent();try{for(var t=0;t0){var i=new n.ListColumn;this._columns.Add(i),this._columnCount=1}this._rowCount=this._items.GetCount(),this._sortColumnIndex=0,this._sortOrder=null,this._showItemImage=!1,this._defaultImageUrl="",this._defaultImageWidth="16px",this._defaultImageHeight="16px",this._statusBarHeight="",this._preFocusedRowIndex=-1,this._lastPreFocusedRowIndex=-1,this._focusedRowIndex=-1,this._hoverRowIndex=-1,this._hoverCellIndex=-1,this._resizeThreshold=5,this._horizontalScrollOffset=0,this._verticalScrollOffset=0,this._selectRows=new n.UniqueSortedList,this._checkedRows=new n.UniqueSortedList,this._rowsRuler={},this._headerStyleName=this._ID+"_HeaderStyle",this._statusBarStyleName=this._ID+"_StatusBarStyle",this._defaultCellStyleName=this._ID+"_DC",this._defaultCellTextStyleName=this._ID+"_DCText",this._defaultHeaderCellStyleName=this._ID+"_DHC",this._defaultHeaderCellTextStyleName=this._ID+"_DHCText",this._borderContainerStyleName=this._ID+"_BorderContainer",this._borderContainerTextStyleName=this._ID+"_BorderContainerText",this._defaultBorder="solid 1px #808080",this._viewCount=5e3,this._isBigTabelMode=!1,this._scrollTopIndex=0,this._firstVisibleColumn=this.GetFirstVisibleColumn(),this._headerContetnAreaAttributeName="headerContentcell",this._headerSortIndicateAttributeName="headersortindicatecell",this._itemImageCellAttributeName="itemimageCell",this._measureRowAttributeName="measurerow",this._styleElementId=this._ID+"_Style",this._hoverColumnIndex=-1,this._JQueryUIHeaderStyleName="ui-widget-header",this._JQueryUIDefaultStatusStyleName="ui-state-default",this._JQueryUIHoverStatusStyleName="ui-state-hover",this._JQueryUIContentStyleName="ui-widget-content",this._JQueryUIHightlightStyleName="ui-state-highlight",this._JQueryUIBorderCornerStyleName="ui-corner-all",this._JQueryUIActiveStateStyleName="ui-state-active",this._selectedChangeSuspendCounter=0,this._checkedChangeSuspendCounter=0,this._isComboList=!1,this._isComboDropDownList=!1,this._forceHoverRow=!1}return t.GetNotExistImage=function(){return n.Utility.BaseImageUrl+"NotExistImage.gif"},t.prototype.GetCallBackID=function(){return this._callBackID!==null?this._callBackID:this._ID},t.prototype.SetCallBackID=function(n){this._callBackID=n},t.prototype.GetBorderLineWidth=function(t){switch(t){case n.LineStyle.Dotted:case n.LineStyle.Dashed:case n.LineStyle.Solid:return 1;case n.LineStyle.Double:case n.LineStyle.Groove:case n.LineStyle.Ridge:case n.LineStyle.Inset:case n.LineStyle.Outset:return 3;default:return 0}},t.prototype.GetIsSortMode=function(){return this._sortColumnIndex!==-1&&this._columns[this._sortColumnIndex].GetSortOrder()!==n.SortOrder.None},t.prototype.IsLoadComplete=function(){return!this._loadDataDynamically||this._items.GetCount()>=this._totalItemsCount},t.prototype.GenerateUniqueID=function(){return t.TotalListCount++,"GcListBox"+t.TotalListCount},t.prototype.GetSorIndicateText=function(t){if(t===n.SortOrder.Ascending)return n.Utility.IsIE?"5":String.fromCharCode(9650);else if(t===n.SortOrder.Descending)return n.Utility.IsIE?"6":String.fromCharCode(9660);return n.Utility.IsIE?"5":String.fromCharCode(9650)},t.prototype.SelectRow=function(n){this._selectRows.Add(n)},t.prototype.IsColumnSorted=function(t){return this._sortColumnIndex===t&&this._columns[t].GetSortOrder()!==n.SortOrder.None?!0:!1},t.prototype.GetColumnWidth=function(n){if(n>=0&&n=0&&n=0&&t0)return this._itemTemplates[n%this._itemTemplates.length]._indent;return""},t.prototype.GetFirstVisibleItemIndex=function(){for(var n=0;n=0;n--)if(this._items[n].GetVisible()!==!1)return n;return-1},t.prototype.GetTotalVisibleCount=function(){for(var t=0,n=0;n0)for(r=0;r0&&n.Utility.AddClass(t,this._data.GetItemTemplateStyleName(i%this._itemTemplatesRule.length)),this._debugMode&&t.setAttribute("id",this._ID+"_ListItem_"+i)},t.prototype.InitRowVisible=function(n,t){var i=this._data._items[t].GetVisible();n.style.display=i?"":"none",i?this._data._visibleItemIndexCol.Add(t):this._data._visibleItemIndexCol.Remove(t)},t.prototype.InitCell=function(t,i,r){t.className=this._data._defaultCellStyleName+" "+this._data._defaultCellTextStyleName+" "+this._data.GetColumnStyleName(r),this.InitCellContent(t,i,r),this.InitCellAlignment(t,i,r),this._debugMode&&r!==this._data._firstVisibleColumn&&t.setAttribute("id",this._ID+"_col"+r+"content_"+i),t.style.paddingRight=n.ListData.ItemPaddingRight+"px",t.style.paddingLeft=n.ListData.ItemPaddingLeft+"px"},t.prototype.InitCellAlignment=function(t,i,r){var e=this._data._items[i]._subItems[r],f,u;r===this._data._firstVisibleColumn&&(this._cantControlCellWidth&&(t=t.firstChild),t=t.firstChild.rows.item(0).cells.item(t.firstChild.rows.item(0).cells.length-1)),f=n.HorizontalAlignment.NotSet,e!==undefined&&e!==null&&(f=e._contentHAlign),f===n.HorizontalAlignment.NotSet&&(f=this._data._columns[r].GetDefaultSubItemContentHAlign()),t.align!=f&&(t.align=f),u=n.VerticalAlignment.NotSet,e!==undefined&&e!==null&&(u=e._contentVAlign),u===n.VerticalAlignment.NotSet&&(u=this._data._columns[r].GetDefaultSubItemContentVAlign()),t.vAlign!=u&&(t.vAlign=u)},t.prototype.InitCellContent=function(t,i,r){var o,u,f,s,e;r===this._data._firstVisibleColumn?this.InitFirstVisibleCellContent(t,i,r):(o=this._data._columns[r].GetDataDisplayType(),o=o.toLowerCase(),u=t,this._cantControlCellWidth&&(u=t.firstChild,u.className=this._data.GetColumnStyleName(r)),this._createFromTable||n.Utility.ClearChildren(u),o===n.DataDisplayType.Text?(f=this._data.GetCellText(i,r),this._createFromTable&&!this._cantControlCellWidth?n.Utility.Trim(f).length===0&&(f=String.fromCharCode(8204),u.appendChild(n.Utility.CreateTextNode(f))):(n.Utility.Trim(f).length===0&&(f=String.fromCharCode(8204)),u.appendChild(n.Utility.CreateTextNode(f))),this._data._items[i]._enabled?this._data.IsRowSelect(i)||(u.style.color=""):u.style.color="gray"):(s=n.Utility.CreateElement("img"),u.appendChild(s),e=this._data.GetCellText(i,r),(e===""||e===undefined||e===null)&&(e=n.ListData.GetNotExistImage()),s.src=e,this.InitCellImageSize(s,i,r)))},t.prototype.InitCellImageSize=function(n,t,i){var r=this._data._items[t]._subItems[i],f="",u;r!==undefined&&r!==null&&(f=r._imageWidth),f===""&&(f=this._data._columns[i].GetDefaultSubItemImageSize().Width.toString()),n.style.width=parseInt(f,10)+"px",u="",r!==undefined&&r!==null&&(u=r._imageHeight),u===""&&(u=this._data._columns[i].GetDefaultSubItemImageSize().Height.toString()),n.style.height=parseInt(u,10)+"px",n.style.verticalAlign="middle"},t.prototype.InitFirstVisibleCellContent=function(t,i,r){var p,y,f,h,b,e,a,k,v,o,d;this._cantControlCellWidth&&(t=t.firstChild,this._data._itemHeight!=="0px"&&(t.style.height="100%"));var nt=this._data._columns[r].GetDataDisplayType(),g=this._data._items[i],l=t.firstChild.rows.item(0).cells;t.firstChild.style.paddingLeft=this._data.GetItemIndent(i);if(this._data._showItemImage){p=0,this._data._checkBoxes&&(p=1),l.item(0).getAttribute("checkbox")==="true"&&(p=1);var w=l.item(p),u=this._data._items[i]._imageUrl,c=this._data._items[i].GetImageSize().Width+"px",s=this._data._items[i].GetImageSize().Height+"px";u===null&&this._data._itemTemplates.GetCount()>0?(y=this._data._itemTemplates[i%this._data._itemTemplates.GetCount()],u=y.GetImageUrl(),(u===""||u===null)&&(u=this._data._defaultImageUrl),c=this._data._items[i]._imageWidth,c=c===null?y.GetImageSize().Width+"px":parseInt(c,10)+"px",s=this._data._items[i]._imageHeight,s=s===null?y.GetImageSize().Height+"px":parseInt(s,10)+"px"):u=this._data._items[i].GetImageUrl(),u===null&&(u=""),(u===""||u===undefined||u===null)&&(u=n.ListData.GetNotExistImage()),f=w,this._cantControlCellWidth&&(f.style.width=this._data._imageWidth,f.style.minWidth=this._data._imageWidth,f.style.maxWidth=this._data._imageWidth,f=f.firstChild),h=f.firstChild,h.src=u,h.style.visibility=u==n.ListData.GetNotExistImage()?"hidden":"",h.style.width=c,h.style.height=s,f.style.width=this._data._imageWidth,f.style.minWidth=this._data._imageWidth,f.style.maxWidth=this._data._imageWidth,w.align=this._data._imageAlign,this._debugMode&&w.firstChild.setAttribute("id",this._ID+"_Image_"+i)}b=l.item(l.length-1),e=b,this._cantControlCellWidth&&(t.className=this._data.GetColumnStyleName(r)),n.Utility.IsQuriksMode&&(t.firstChild.className=this._data._borderContainerTextStyleName+" "+n.Utility.DefaultControlStyle+t.className,n.Utility.RemoveClass(t.firstChild,this._data._defaultCellStyleName)),n.Utility.ClearChildren(e),nt===n.DataDisplayType.Text?(a=this._data.GetCellText(i,r),n.Utility.Trim(a).length===0&&(a=String.fromCharCode(8204)),e.appendChild(n.Utility.CreateTextNode(a)),k=this._data._items[i]._enabled,e.style.color=k?"":"gray",n.Utility.webkit&&(n.Utility.RemoveClass(e,this._data.GetItemTemplateStyleStartName(),!0),n.Utility.AddClass(e,this._data.GetItemTemplateStyleFirstVisibleColumn(i%this._itemTemplatesRule.length)))):(v=n.Utility.CreateElement("img"),e.appendChild(v),u=this._data.GetCellText(i,r),(u===""||u===undefined||u===null)&&(u=n.ListData.GetNotExistImage()),v.src=u,this.InitCellImageSize(v,i,r)),this._debugMode&&b.setAttribute("id",this._ID+"_Content_"+i),this._data._checkBoxes&&(o=l.item(0),g.GetChecked()&&(o.firstChild.checked="true"),d=this._data._items[i]._enabled,d?o.firstChild.removeAttribute("disabled"):o.firstChild.disabled="disabled",o.style.paddingRight="3px",this._debugMode&&o.firstChild.setAttribute("id",this._ID+"_CheckBox_"+i))},t.CreateClassStyle=function(i){var r="."+i,e,o,u,f;if(t.StyleCache[r])return t.StyleCache[r];e=document.getElementById("ListStyle_Cache");if(e&&!t._cacheInitialized){o=e.sheet||e.styleSheet;if(o){u=o.cssRules||o.rules;if(u.length>0)for(f=0;f0?this._layoutInterval=setTimeout(function(){t.RealLayout()},500):(this._layoutInterval=null,this._layoutReason=""),this._hasLayout=!0,this._onLayoutComplete&&this._onLayoutComplete.call(window)},t.prototype.OnLayoutComplete=function(n){this._onLayoutComplete=n},t.prototype.AdjustFocusRectange=function(){var s=this,t=this._focusRectange,e=this._data._focusedRowIndex,r,f,o;if(n.Utility.chrome){t.style.display="none";return}if(this._data._firstVisibleColumn==-1)return;if(e<0||this._data._isComboList||!this._list._command._focused)this._data.GetTotalVisibleCount()==0&&this._list._command._focused?(t.style.display="",o=Math.max(this._htmlTable.clientWidth-2,0),t.style.width=o+"px",t.style.top="0px",t.style.height="20px",t.style.borderColor="gray",t.style.pointerEvents!==undefined&&(t.style.pointerEvents="none")):t.style.display="none";else{var i=this._htmlTable.rows.item(e),u=i.cells.item(this._data._firstVisibleColumn),h=u.offsetWidth-u.clientWidth;t.style.display="",r=i.clientWidth,r=Math.max(r,i.offsetWidth),t.style.width=r-h-2+"px",f=u.clientHeight,n.Utility.IsIE9OrBelow&&(f+=2),t.style.height=f-2+"px",t.style.top=i.offsetTop+"px",setTimeout(function(){t.style.borderColor=s._data.IsRowSelect(e)?"white":"gray"},0),t.style.pointerEvents!==undefined&&(t.style.pointerEvents="none")}},t.prototype.AdjustHeight=function(){var t=0,n;this._data._listHeaderPane._visible&&(t=this._header.clientHeight),this._dataContainer.style.top=t+"px",n=1,this._data._statusBar&&(n=this._statusBar.clientHeight+1),this._dataContainer.style.bottom=n+"px"},t.prototype.AdjustWidth=function(){var h,s,l,i,t,c,o,r,e,f,u;if(this._data._items.GetCount()===0)for(h=0;h