diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index 7736cad21..9f1656646 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -1,4 +1,20 @@ -jQWidgets v12.0.0 Release, Feb-24-2021 +jQWidgets v12.0.1 Release, Mar-06-2021 + +What's New: + +- jqxGrid Cardview Custom Value Templates + +What's Improved: + +- jqxGrid Cardview scrolling UX on mobile devices. + +What's Fixed: + +- Fixed an issue related to popups in jqxGrid Filter Menu. +- Fixed an issue related to jqxGrid adaptive mode, when the adaptive mode is dynamically switched on/off. + + +jQWidgets v12.0.0 Release, Feb-24-2021 What's New: diff --git a/jqwidgets/jqx-all.js b/jqwidgets/jqx-all.js index a3fbf6998..7ef96b903 100644 --- a/jqwidgets/jqx-all.js +++ b/jqwidgets/jqx-all.js @@ -1,5 +1,5 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ @@ -52,7 +52,7 @@ var oldBrowser=document.all&&!document.addEventListener;if(!oldBrowser){(functio (function(b){b.jqx.jqxWidget("jqxDataTable","",{});b.extend(b.jqx._jqxDataTable.prototype,{defineInstance:function(){var c={altRows:false,aggregatesHeight:34,autoShowLoadElement:true,autoRowHeight:true,columnsHeight:36,columns:[],columnGroups:null,columnsResize:false,columnsReorder:false,dataview:null,disabled:false,editable:false,editSettings:{saveOnPageChange:true,saveOnBlur:true,saveOnSelectionChange:true,cancelOnEsc:true,saveOnEnter:true,editSingleCell:false,editOnDoubleClick:true,editOnF2:true},enableHover:true,enableBrowserSelection:false,filterHeight:35,filterable:false,filterMode:"default",groupsRenderer:null,groups:new Array(),headerZIndex:359,height:null,handleKeyboardNavigation:null,indentWidth:25,initRowDetails:false,loadingErrorMessage:"The data is still loading and you cannot set a property or call a method. You can do that once the data binding is completed. jqxDataTable raises the 'bindingComplete' event when the binding is completed.",localization:null,pagerHeight:40,pageSize:10,pageSizeOptions:["5","10","20"],pageable:false,pagerPosition:"bottom",pagerMode:"default",pageSizeMode:"default",pagerButtonsCount:5,pagerRenderer:null,ready:null,rendertoolbar:null,rowDetails:false,renderStatusBar:null,rendered:null,rendering:null,rtl:false,sortable:false,showtoolbar:false,showstatusbar:false,statusBarHeight:34,serverProcessing:false,selectionMode:"multiplerows",scrollBarSize:b.jqx.utilities.scrollBarSize,touchScrollBarSize:b.jqx.utilities.touchScrollBarSize,showAggregates:false,showHeader:true,maxHeight:999999,maxWidth:999999,autoBind:true,beginEdit:null,endEdit:null,autokoupdates:true,columnsVirtualization:false,exportSettings:{columnsHeader:true,hiddenColumns:false,serverURL:null,characterSet:null,collapsedRecords:false,recordsInView:true,fileName:"jqxDataTable"},source:{beforeprocessing:null,beforesend:null,loaderror:null,localdata:null,data:null,datatype:"array",datafields:[],url:"",root:"",record:"",id:"",totalrecords:0,recordstartindex:0,recordendindex:0,loadallrecords:true,sortcolumn:null,sortdirection:null,sort:null,filter:null,sortcomparer:null},toolbarHeight:34,tableZIndex:369,_updating:false,touchmode:"auto",width:null,that:this,incrementalSearch:true,events:["bindingComplete","sort","filter","pageChanged","pageSizeChanged","rowClick","rowDoubleClick","cellValueChanged","rowBeginEdit","rowEndEdit","rowSelect","rowUnselect","rowCheck","rowUncheck","columnResized","columnReordered","rowExpand","rowCollapse","cellBeginEdit","cellEndEdit"]};if(this===b.jqx._jqxDataTable.prototype){return c}b.extend(true,this,c);this.that=this;return c},createInstance:function(e){var l=this;if(b.jqx.utilities.scrollBarSize!=13){l.scrollBarSize=b.jqx.utilities.scrollBarSize}if(l.isMaterialized()){var B=window.getComputedStyle(l.element);var p=B.getPropertyValue("--jqx-grid-column-height");var v=B.getPropertyValue("--jqx-scrollbar-size");if(p&&this.columnsHeight===36){l.columnsHeight=parseInt(p)}}if(v){l.scrollbarsize=v;b.jqx.utilities.scrollBarSize=v}if((l.element.nodeName.toLowerCase()=="table")||b(l.element).children("table").length>0){var n=l.host.find("tbody tr");var d=l.host.find("th");var y=new Array();if(d.length===0){d=n[0];n.splice(0,1)}if(l.localizestrings){l.localizestrings();if(l.localization!=null){l.localizestrings(l.localization,false)}}var C=[];for(var w=0;w");var m=l.host.parent();var r=l.host.data();r.jqxDataTable.host=m;r.jqxDataTable.element=m[0];l.host.parent()[0].id=l.element.id;try{l.host.parent()[0].style=l.element.style}catch(s){}l.element=m[0];l.host=m;l.host.data(r);var o={dataFields:y,localdata:C,datatype:"array"};var A=new b.jqx.dataAdapter(o);l.source=A}if(l.source&&!l.source.dataBind){l.source=new b.jqx.dataAdapter(l.source)}var z=l.source._source.datafields;if(z&&z.length>0){l._camelCase=l.source._source.dataFields!==undefined;l.selectionMode=l.selectionMode.toLowerCase()}if(l.host.attr("tabindex")==null){l.host.attr("tabindex","0")}l.host.attr("role","grid");l.host.attr("align","left");l.host.addClass(l.toTP("jqx-datatable"));l.host.addClass(l.toTP("jqx-grid"));l.host.addClass(l.toTP("jqx-reset"));l.host.addClass(l.toTP("jqx-rc-all"));l.host.addClass(l.toTP("jqx-widget"));l.host.addClass(l.toTP("jqx-widget-content"));if(l._testmodules()){return}l.render(true);b.jqx.utilities.resize(l.host,function(){var D=b(window).width();var i=b(window).height();var j=l.host.width();var E=l.host.height();if(l._lastHostWidth!=j||l._lastHostHeight!=E){l._updatesize(l._lastHostWidth!=j,l._lastHostHeight!=E)}l._lastWidth=D;l._lastHeight=i;l._lastHostWidth=j;l._lastHostHeight=E})},getvaluebytype:function(h,d){var f=h;if(h==null){return h}if(this.gridlocalization.decimalseparator==","){if(h.indexOf(this.gridlocalization.decimalseparator)>=0){h=h.replace(this.gridlocalization.decimalseparator,".")}}if(h.indexOf(this.gridlocalization.currencysymbol)>=0){h=h.replace(this.gridlocalization.currencysymbol,"")}if(h.indexOf(this.gridlocalization.percentagesymbol)>=0){h=h.replace(this.gridlocalization.percentagesymbol,"")}if(b.isArray(h)&&d.type!="array"){for(var e=0;e');var d=b('
'+this.gridlocalization.loadtext+"
");d.addClass(this.toTP("jqx-rc-all"));this.dataloadelement.addClass(this.toTP("jqx-rc-all"));d.addClass(this.toTP("jqx-fill-state-normal"));this.dataloadelement.append(d);this.dataloadelement.width(this.width);this.dataloadelement.height(this.height);this.host.prepend(this.dataloadelement);if(this.source._source.url!=""){var c=false;if(this.height==="auto"||this.height===null||this.autoheight){if(this.maxHeight==999999){c=true}}if(c){this.host.height(100);this.dataloadelement.height(100)}else{this.host.height(this.height);this.dataloadelement.height(this.height)}var e=false;if(this.width==="auto"||this.width===null||this.autoWidth){e=true}if(e){this.host.width(300);this.dataloadelement.width(300)}else{this.host.width(this.width);this.dataloadelement.width(this.width)}}},_measureElement:function(d){var c=b("measure Text");c.addClass(this.toTP("jqx-widget"));b(document.body).append(c);if(d=="cell"){this._cellheight=c.height()}else{this._columnheight=c.height()}c.remove()},_testmodules:function(){var g="";var e=this;var c=function(){if(g.length!=""){g+=","}};if(!this.host.jqxScrollBar){c();g+=" jqxscrollbar.js"}if(!this.host.jqxButton){c();g+=" jqxbuttons.js"}if(!b.jqx.dataAdapter){c();g+=" jqxdata.js"}if(g!=""||this.editable||this.filterable||this.pageable){var d=[];var f=function(h){switch(h){case"checkbox":if(!e.host.jqxCheckBox&&!d.checkbox){d.checkbox=true;c();g+=" jqxcheckbox.js"}break;case"dropdownlist":if(!e.host.jqxDropDownList&&!d.dropdownlist){c();d.dropdownlist=true;g+=" jqxdropdownlist.js(requires: jqxlistbox.js)"}else{if(!e.host.jqxListBox&&!d.listbox){c();d.listbox=true;g+=" jqxlistbox.js"}}break}};if((this.filterable&&this.filterMode!="simple")||(this.pagerMode=="advanced"&&this.pageable)){f("dropdownlist")}if(g!=""){throw new Error("jqxDataTable: Missing references to the following module(s): "+g);this.host.remove();return true}}return false},focus:function(){try{this.wrapper.focus();this.host.focus();var d=this;setTimeout(function(){d.wrapper.focus();d.host.focus()},25);this.focused=true}catch(c){}},hiddenParent:function(){return b.jqx.isHidden(this.host)},isBindingCompleted:function(){return !this._loading},_updatesize:function(i,h){if(this._loading){return}var f=this;var g=f.host.width();var e=f.host.height();if(!f._oldWidth){f._oldWidth=g}if(!f._oldHeight){f._oldHeight=e}if(f._resizeTimer!=undefined){clearTimeout(f._resizeTimer);f._resizeTimer=null}var d=300;var c=function(){if(f._resizeTimer){clearTimeout(f._resizeTimer)}f.resizingGrid=true;if(b.jqx.isHidden(f.host)){return}f._updatecolumnwidths();f.refresh();f._oldWidth=g;f._oldHeight=e;f.resizingGrid=false};c();f._resizeTimer=setTimeout(function(){var k=f.host.width();var j=f.host.height();if(f._oldWidth!=k||f._oldHeight!=j){c()}},d)},resize:function(d,c){if(d!=undefined){this.width=d}if(c!=undefined){this.height=c}this._updatecolumnwidths();this.refresh()},isTouchDevice:function(){if(this.touchDevice!=undefined){return this.touchDevice}var c=b.jqx.mobile.isTouchDevice();this.touchDevice=c;if(this.touchmode==true){c=true;b.jqx.mobile.setMobileSimulator(this.table[0]);this.touchDevice=c}else{if(this.touchmode==false){c=false}}if(c){this.touchDevice=true;this.host.addClass(this.toThemeProperty("jqx-touch"));this.host.find("jqx-widget-content").addClass(this.toThemeProperty("jqx-touch"));this.host.find("jqx-widget-header").addClass(this.toThemeProperty("jqx-touch"));this.scrollBarSize=this.touchScrollBarSize}return c},toTP:function(c){return this.toThemeProperty(c)},localizestrings:function(c,f){this._cellscache=new Array();if(b.jqx.dataFormat){b.jqx.dataFormat.cleardatescache()}if(this._loading){throw new Error("jqxDataTable: "+this.loadingErrorMessage);return false}if(c!=null){for(var h in c){if(h.toLowerCase()!==h){c[h.toLowerCase()]=c[h]}}var j=["pagergotopagestring","pagershowrowsstring","pagerrangestring","pagernextbuttonstring","pagerpreviousbuttonstring","pagerfirstbuttonstring","pagerlastbuttonstring","toppagerstring","firstDay","days","months","AM","PM","patterns","percentsymbol","currencysymbol","currencysymbolposition","decimalseparator","thousandsseparator","filterapplystring","filteraddnew","filtercancelstring","filterclearstring","filterstring","filterstringcomparisonoperators","filternumericcomparisonoperators","filterdatecomparisonoperators","filterbooleancomparisonoperators","emptydatastring","filterselectstring","todaystring","clearstring","validationstring","loadtext","filtersearchstring","loadingErrorMessage"];var g=this;for(var e=0;eg&&(this.source.records.length>0||(this.source.hierarchy&&this.source.hierarchy.length>0))){this.vScrollBar[0].style.visibility=e;n=4+parseInt(d);this.vScrollBar.jqxScrollBar({max:j-g})}else{this.vScrollBar[0].style.visibility="hidden"}if((h!=this.vScrollBar[0].style.visibility)){this._updatecolumnwidths();var i=this.table.height();if(j!=i){j=i;if(!q&&j>g&&(this.source.records.length>0||(this.source.hierarchy&&this.source.hierarchy.length>0))){this.vScrollBar[0].style.visibility=e;n=4+parseInt(d);this.vScrollBar.jqxScrollBar({max:j-g})}}}if(this.scrollBarSize==0){n=0}var o=this.table?this.table.width():0;if(o>3){o-=3}var c=parseInt(this.host.css("border-left-width"))+parseInt(this.host.css("border-right-width"));var r=c+this.host.width()-n;if(o>r&&!p){this.hScrollBar[0].style.visibility=e;this.hScrollBar.jqxScrollBar({max:o-r});n=4+parseInt(d);if(d==0){n=0}if(!q){if(j>g-n+4&&(this.source.records.length>0||(this.source.hierarchy&&this.source.hierarchy.length>0))){this.hScrollBar.jqxScrollBar({max:c+o-r});var f=this.vScrollBar[0].style.visibility==="hidden";this.vScrollBar[0].style.visibility=e;this._updatecolumnwidths();if(f){this.hScrollBar.jqxScrollBar({max:o-r+n+c})}var k=this.table?this.table.width():0;if(k>3){k-=3}if(k!=o){if(k"+e+"");d.addClass(this.toTP("jqx-widget"));d.addClass(this.toTP("jqx-grid"));d.addClass(this.toTP("jqx-grid-column-header"));d.addClass(this.toTP("jqx-widget-header"));b(document.body).append(d);var c=d.outerWidth()+20;d.remove();return c},_arrangeAutoHeight:function(e){if(!e){e=0}if(this.height==="auto"||this.height===null||this.autoheight){var h=this.table.height();var g=0;if(!this.columnGroups){g+=this.showHeader?this.columnsHeight:-1}else{g+=this.showHeader?this.columnsheader.height():-1}g+=this.showstatusbar?this.statusBarHeight:0;g+=this.showAggregates?this.aggregatesHeight:0;g+=this.showtoolbar?this.toolbarHeight:0;g+=this.pageable?this.pagerHeight:0;if(this.pagerPosition==="both"){g+=this.pageable?this.pagerHeight:0}g+=h;if(this.filterable){var f=this.filter.find(".filterrow");var c=this.filter.find(".filterrow-hidden");var d=1;if(c.length>0){d=0}g+=this.filterHeight-1+this.filterHeight*f.length*d}if(g+e>this.maxHeight){this.host.height(this.maxHeight)}else{this.host.height(g+e)}return true}return false},escape_HTML:function(c){return c.replace(/[&<>"]/g,function(e){var d={"&":"&","<":"<",">":">",'"':'"'};return d[e]||e})},_arrangeAutoWidth:function(e){if(!e){e=0}if(this.width==="auto"||this.width===null||this.autowidth){var d=0;for(var f=0;fthis.maxWidth){this.host.width(this.maxWidth)}else{this.host.width(g+e)}return true}return false},_measureTopAndHeight:function(){var d=this.host.height();var h=0;if(this.showtoolbar){h+=this.toolbarHeight;d-=parseInt(this.toolbarHeight)}if(this.filterable){var g=this.filter.find(".filterrow");var e=this.filter.find(".filterrow-hidden");var f=1;if(e.length>0){f=0}h+=this.filterHeight;d-=parseInt(this.filterHeight);var c=f==1?g.length:0;h+=this.filterHeight*c;d-=this.filterHeight*c}if(this.pageable&&this.pagerPosition!="bottom"){h+=parseInt(this.pagerHeight)+1;if(d>this.pagerHeight&&this.pagerPosition==="both"){d-=parseInt(this.pagerHeight)}}return{top:h,height:d}},_arrange:function(){if(!this.table){return}this._arrangeAutoHeight();this._arrangeAutoWidth();var v=this.host.width();var r=this.host.height();var j=r;var i=this;if(this.pageable){if(this.pagerPosition==="bottom"){this.toppager[0].style.visibility="hidden";this.pager[0].style.visibility="inherit"}else{if(this.pagerPosition==="both"){this.toppager[0].style.visibility="inherit";this.pager[0].style.visibility="inherit"}else{if(this.pagerPosition==="top"){this.toppager[0].style.visibility="inherit";this.pager[0].style.visibility="hidden"}}}}else{this.toppager[0].style.visibility="hidden";this.pager[0].style.visibility="hidden"}var q=0;if(this.showtoolbar){this.toolbar.width(v);this.toolbar.height(this.toolbarHeight-1);this.toolbar.css("top",0);q+=this.toolbarHeight;r-=parseInt(this.toolbarHeight)}else{this.toolbar[0].style.height="0px"}if(this.filterable){this.filter.width(v);this.filter.css("top",q);var t=this.filter.find(".filterrow");var h=this.filter.find(".filterrow-hidden");var A=1;if(h.length>0){A=0}this.filter.height(this.filterHeight-1+this.filterHeight*t.length*A);q+=this.filterHeight;r-=parseInt(this.filterHeight);var x=A==1?t.length:0;q+=this.filterHeight*x;r-=this.filterHeight*x}if(this.showstatusbar){this.statusbar.width(!this.table?v:Math.max(v,this.table.width()));this.statusbar.height(this.statusBarHeight-1)}else{this.statusbar[0].style.height="0px"}if(this.showAggregates){this.aggregates.height(this.aggregatesHeight-1)}else{this.aggregates[0].style.height="0px"}if(this.pageable&&this.pagerPosition!="bottom"){this.toppager[0].style.width=v+"px";this.toppager[0].style.height=parseInt(this.pagerHeight)+"px";this.toppager[0].style.top=parseInt(q)+"px";q+=parseInt(this.pagerHeight)+1;if(r>this.pagerHeight){r-=parseInt(this.pagerHeight)}}else{if(this.toppager[0].style.width!=v+"px"){this.toppager[0].style.width=parseInt(v)+"px"}if(this.toppager[0].style.height!=this.pagerHeight+"px"){this.toppager[0].style.height=parseInt(this.pagerHeight)+"px"}if(this.toppager[0].style.top!=q+"px"){this.toppager[0].style.top=q+"px"}var y=this.pagerPosition!="bottom"?this.pagerHeight:0;var d=q+y+"px";if(this.content[0].style.top!=d){this.content[0].style.top=q+this.pagerHeight+"px"}}this._updateScrollbars(j);var c=parseInt(this.scrollBarSize);var n=4;var e=2;var f=0;if(this.vScrollBar[0].style.visibility!="hidden"){f=c+n}if(this.hScrollBar[0].style.visibility!="hidden"){e=c+n+2}if(c==0){f=0;e=0}if(this.showAggregates){if(this.hScrollBar[0].style.visibility==="hidden"){this.aggregates.width(!this.table?v:Math.max(v,this.table.width())+4)}else{this.aggregates.width("auto")}}if("hidden"!=this.vScrollBar[0].style.visibility||"hidden"!=this.hScrollBar[0].style.visibility){var w=this._arrangeAutoHeight(e-2);var s=this._arrangeAutoWidth(f+1);if(w||s){var v=this.host.width();this.toppager[0].style.width=parseInt(v)+"px";this.toolbar[0].style.width=parseInt(v)+"px";this.statusbar[0].style.width=parseInt(v)+"px";this.filter[0].style.width=parseInt(v)+"px"}if(w){var B=this._measureTopAndHeight();q=B.top;r=B.height}}var m=0;if(this.pageable){m=this.pagerHeight;if(this.pagerPosition!="top"){e+=this.pagerHeight}}if(this.showAggregates){e+=this.aggregatesHeight;m+=this.aggregatesHeight}if(this.showstatusbar){e+=this.statusBarHeight;m+=this.statusBarHeight}if(this.hScrollBar[0].style.height!=c+"px"){this.hScrollBar[0].style.height=parseInt(c)+"px"}if(this.hScrollBar[0].style.top!=q+r-n-c-m+"px"||this.hScrollBar[0].style.left!="0px"){this.hScrollBar[0].style.top=q+r-n-c-m-1+"px";this.hScrollBar[0].style.left="0px"}var l=this.hScrollBar[0].style.width;var g=false;var z=false;if(f==0){if(l!=(v-2)+"px"){this.hScrollBar[0].style.width=(v-2)+"px";g=true}}else{if(l!=(v-c-n)+"px"){this.hScrollBar[0].style.width=(v-c-n+"px");g=true}}if(this.vScrollBar[0].style.width!=c+"px"){this.vScrollBar[0].style.width=c+"px";z=true}if(this.vScrollBar[0].style.height!=parseInt(r)-e+"px"){this.vScrollBar[0].style.height=(parseInt(r)-e+"px");z=true}if(this.vScrollBar[0].style.left!=parseInt(v)-parseInt(c)-n+"px"||this.vScrollBar[0].style.top!=q+"px"){this.vScrollBar[0].style.top=q+"px";this.vScrollBar[0].style.left=parseInt(v)-parseInt(c)-n+"px"}if(this.rtl){this.vScrollBar.css({left:"0px",top:q});if(this.vScrollBar.css("visibility")!="hidden"){this.hScrollBar.css({left:c+2})}}var k=this.vScrollInstance;k.disabled=this.disabled;var u=this.hScrollInstance;u.disabled=this.disabled;if(g){u.refresh()}if(z){k.refresh()}var o=function(C){if((C.vScrollBar[0].style.visibility!="hidden")&&(C.hScrollBar[0].style.visibility!="hidden")){C.bottomRight[0].style.visibility="inherit";C.bottomRight[0].style.left=1+parseInt(C.vScrollBar.css("left"))+"px";C.bottomRight[0].style.top=parseInt(C.hScrollBar.css("top"))+"px";if(C.rtl){C.bottomRight.css("left","0px")}C.bottomRight[0].style.width=parseInt(c)+3+"px";C.bottomRight[0].style.height=parseInt(c)+4+"px";if(C.showAggregates){C.bottomRight.css("z-index",99);C.bottomRight.height(parseInt(c)+4+C.aggregatesHeight);C.bottomRight.css({top:parseInt(C.hScrollBar.css("top"))-C.aggregatesHeight})}}else{C.bottomRight[0].style.visibility="hidden"}};o(this);if(this.content[0].style.width!=v-f+"px"){this.content[0].style.width=v-f+"px"}if(this.content[0].style.height!=r-e+3+"px"){this.content[0].style.height=r-e+3+"px"}if(this.content[0].style.top!=q+"px"){this.content[0].style.top=parseInt(q)+"px"}if(this.rtl){this.content.css("left",f);if(this.filter&&(this.filter.children().length>0)){b(this.filter.children()).css("left",f)}if(this.table){var p=this.table.width();if(p0)){b(this.filter.children()).css("left",v-p+2)}}}}if(this.showAggregates){this.aggregates.css("top",q+r-this.aggregatesHeight-(this.pageable?this.pagerHeight:0)-(this.showstatusbar?(this.statusBarHeight+1):0));if(this.rtl){this.aggregates.css("left","0px")}if(this.hScrollBar.css("visibility")!="hidden"){this.hScrollBar.css({top:q+r-n-c-m+this.aggregatesHeight+"px"});this.aggregates.css("top",1+q+r-c-5-this.aggregatesHeight-(this.pageable?this.pagerHeight:0)-(this.showstatusbar?(this.statusBarHeight+1):0))}o(this)}if(this.showstatusbar){this.statusbar.css("top",q+r-this.statusBarHeight-(this.pageable?this.pagerHeight:0));if(this.rtl){if(this.hScrollBar.css("visibility")=="hidden"){this.statusbar.css("left",this.content.css("left"))}else{this.statusbar.css("left","0px")}}}if(this.pageable){this.pager[0].style.width=v+"px";this.pager[0].style.height=this.pagerHeight+"px";this.pager[0].style.top=parseInt(q)+parseInt(r)-parseInt(this.pagerHeight)-1+"px"}else{this.pager[0].style.height="0px"}this.vScrollBar[0].style.zIndex=this.tableZIndex+this.headerZIndex+10+this.columns.records.length;this.hScrollBar[0].style.zIndex=this.tableZIndex+this.headerZIndex+10+this.columns.records.length;if(v!=parseInt(this.dataloadelement[0].style.width)){this.dataloadelement[0].style.width=this.element.style.width}if(r!=parseInt(this.dataloadelement[0].style.height)){this.dataloadelement[0].style.height=this.element.style.height}this._hostwidth=v},scrollOffset:function(e,d){if(arguments.length==0||(e!=null&&typeof(e)=="object"&&!e.top)){return{left:this.hScrollBar.jqxScrollBar("value"),top:this.vScrollBar.jqxScrollBar("value")}}if(e!=null&&typeof(e)=="object"){var d=e.left;var c=e.top;var e=c}if(e==null||d==null||e==undefined||d==undefined){return}this.vScrollBar.jqxScrollBar("setPosition",e);this.hScrollBar.jqxScrollBar("setPosition",d)},scrollleft:function(c){if(c==null||c==undefined){return}if(this.hScrollBar.css("visibility")!="hidden"){this.hScrollBar.jqxScrollBar("setPosition",c)}},scrolltop:function(c){if(c==null||c==undefined){return}if(this.vScrollBar.css("visibility")!="hidden"){this.vScrollBar.jqxScrollBar("setPosition",c)}},beginUpdate:function(){this._updating=true;this._datachanged=false},endUpdate:function(c){this._updating=false;if(c===false){return}this._rendercolumnheaders();this.refresh()},updating:function(){return this._updating},databind:function(h,j,c){if(this.loadingstate===true){return}var d=window;if(this.host.css("display")=="block"){if(this.autoShowLoadElement){b(this.dataloadelement).css("visibility","visible");b(this.dataloadelement).css("display","block");this.dataloadelement.width(this.host.width());this.dataloadelement.height(this.host.height())}else{b(this.dataloadelement).css("visibility","hidden");b(this.dataloadelement).css("display","none")}}var g=this;if(h==null){h={}}if(h.sortcomparer==undefined||h.sortcomparer==null){h.sortcomparer=null}if(h.filter==undefined||h.filter==null){h.filter=null}if(h.sort==undefined||h.sort==null){h.sort=null}if(h.data==undefined||h.data==null){h.data=null}var e=null;if(h!=null){e=h._source!=undefined?h._source.url:h.url}this.dataview=this.dataview||new b.jqx.dataView();this.dataview.pageable=this.pageable;this.dataview.grid=this;if(!g.initializedcall){if(h._source){if(this.sortable){if(h._source.sortcolumn!=undefined){this.sortcolumn=h._source.sortcolumn;this.source.sortcolumn=this.sortcolumn;this.dataview.sortfield=h._source.sortcolumn;h._source.sortcolumn=null}if(h._source.sortdirection!=undefined){this.dataview.sortfielddirection=h._source.sortdirection;var i=h._source.sortdirection;if(i=="a"||i=="asc"||i=="ascending"||i==true){var f=true}else{var f=false}if(i!=null){this.sortdirection={ascending:f,descending:!f}}else{this.sortdirection={ascending:false,descending:false}}}}}if(this.pageable){if(h._source){if(h._source.pagenum!=undefined){this.dataview.pagenum=h._source.pagenum}if(h._source.pagesize!=undefined){this.pageSize=h._source.pagesize;this.dataview.pagesize=h._source.pagesize}else{this.dataview.pagesize=h._source.pagesize;if(this.dataview.pagesize==undefined){this.dataview.pagesize=this.pageSize}}}}if(this.sortable){if(h.sortcolumn){this.dataview.sortfield=h.sortcolumn}if(h.sortdirection){this.dataview.sortfielddirection=h.sortdirection}}}this._loading=true;this.dataview.update=function(y){g._loading=false;g.rowsByKey=new Array();var C=g.source._source.datafields;if(g.groups&&g.groups.length>0){var s=Object.prototype.toString;var m=g.groups[0];Object.prototype.toString=(typeof m=="function")?m:function(){return this[m]};if(!g.source.records.sort){var u=new Array();var q=0;var E=0;var D={};b.each(D,function(){u[E+q++]=this});D=u}g.source.records.sort(function(G,F){if(G===undefined){G=null}if(F===undefined){F=null}if(G===null&&F===null){return 0}if(G===null&&F!==null){return -1}if(G!==null&&F===null){return 1}var J=0;var I=0;if(G&&G.uid){J=G.uid}if(F&&F.uid){I=F.uid}G=G.toString();F=F.toString();if(b.jqx.dataFormat.isNumber(G)&&b.jqx.dataFormat.isNumber(F)){if(GF){return 1}return 0}else{if(b.jqx.dataFormat.isDate(G)&&b.jqx.dataFormat.isDate(F)){if(GF){return 1}return 0}else{if(!b.jqx.dataFormat.isNumber(G)&&!b.jqx.dataFormat.isNumber(F)){G=String(G).toLowerCase();F=String(F).toLowerCase()}}}try{if(GF){return 1}}catch(H){var K=H}if(typeof(J)=="number"){if(JI){return 1}}return 0});Object.prototype.toString=s}for(var A=0;A0){var t=function(F){for(var G=0;G0){t(F[G].records)}}};t(p.records)}if(A===0){var n=false;if(C){for(var z=0;z-1||l.toString().indexOf(g.gridlocalization.percentsymbol)>-1){var v=l.toString().split(" ").length;var k=new Number(g._toNumber(l.toString()));if(!isNaN(k)&&v==1){C[z].type="number"}}if(b.jqx.dataFormat.isNumber(l)||(!isNaN(parseFloat(l))&&isFinite(l))){C[z].type="number"}if(b.jqx.dataFormat.isDate(l)){C[z].type="date"}}}}if(n){for(var z=0;zg-c){this.hScrollBar.jqxScrollBar("setPosition",g-c)}else{if(g>e){this.hScrollBar.jqxScrollBar("setPosition",h+g-e)}}}},ensurerowvisiblebykey:function(o){if(this.vScrollBar[0].style.visibility==="hidden"){return false}var p=this._getuirow(o);if(!p){return}var m=this.vScrollBar.jqxScrollBar("value");var e=this.host.height();var g=0;if(!this.columnGroups){g+=this.showHeader?this.columnsHeight:0}else{g+=this.showHeader?this.columnsheader.height():0}if(this.filterable){g+=this.filter.height()}if(this.pageable){if(this.pagerPosition==="top"){g+=this.pagerHeight}}if(this.showtoolbar){g+=this.toolbarHeight}e-=g;if(this.pageable&&this.pagerPosition!=="top"){e-=this.pagerHeight}if(this.showstatusbar){e-=this.statusBarHeight}if(this.showAggregates){e-=this.aggregatesHeight}if(this.hScrollBar.css("visibility")!="hidden"){e-=20}var n=this.host.coord().top+g;var f=m;var c=e+f;var i=p.coord().top+m-n;i=Math.round(i);var l=i+p.outerHeight();l=Math.round(l);if(Math.round(p.position().top)===0){return this.vScrollBar.jqxScrollBar("setPosition",0)}else{var j=b(this._table.children()[1]).children().length-1;var d=this._getuikey(j);var k=this._getuirow(d);if(k){if(k[0]===p[0]){return this.vScrollBar.jqxScrollBar("setPosition",this.vScrollBar.jqxScrollBar("max"))}}}if(ic){return this.vScrollBar.jqxScrollBar("setPosition",4+l-e)}},ensureRowVisible:function(c){var d=this._getkey(c);this.ensurerowvisiblebykey(d)},getColumn:function(c){var d=null;if(this.columns.records){b.each(this.columns.records,function(){if(this.datafield==c||this.displayfield==c){d=this;return false}})}return d},_setcolumnproperty:function(e,g,h){if(e==null||g==null||h==null){return null}var d=g;g=g.toLowerCase();var f=this.getColumn(e);if(f==null){return}var i=f[g];f[g]=h;f[d]=h;var c=this.getColumn(e);if(c!=null){c[g]=h}switch(g){case"filteritems":case"text":case"editable":case"resizable":case"draggable":case"hidden":case"hideable":case"renderer":case"cellsrenderer":case"align":case"aggregates":case"cellsalign":case"cellsformat":case"pinned":case"contenttype":case"filterable":case"groupable":case"cellclass":case"cellclassname":case"class":case"width":case"minwidth":case"maxwidth":if(g=="align"){this._rendercolumnheaders();this.refresh()}else{if(g=="text"||g=="class"||g=="hidden"||g=="pinned"||g=="resizable"||g=="renderer"){this._rendercolumnheaders();this.refresh()}else{if(g=="width"||g=="maxwidth"||g=="minwidth"){f._width=null;f._percentagewidth=null;this._updatecolumnwidths();this.refresh()}else{this.refresh()}}}break}},getColumnProperty:function(c,e){if(c==null||e==null){return null}e=e.toLowerCase();var d=this.getColumn(c);return d[e]},setColumnProperty:function(c,d,e){this._setcolumnproperty(c,d,e)},hideColumn:function(c){this._setcolumnproperty(c,"hidden",true)},showColumn:function(c){this._setcolumnproperty(c,"hidden",false)},updateBoundData:function(d,c){this.databind(this.source,d,c)},refresh:function(c){if(c!=true){if(b.jqx.isHidden(this.host)){return}this.vScrollInstance.setPosition(0);this._renderrows();this.updatepagerdetails();this._arrange();if(this._arrangeFilterRow){this._arrangeFilterRow()}this._renderhorizontalscroll();this._showicons();if(this.showAggregates){this._updateaggregates()}this._updateTouchScrolling()}},_rendercelltexts:function(){if(b.jqx.credits!=="75CE8878-FCD1-4EC7-9249-BA0F153A5DE8"){var d="www.jqwidgets.com";if(location.hostname.indexOf(d.substring(4))==-1){if(this._gridRenderElement){b(this._gridRenderElement).remove()}var e=String.fromCharCode(83,80,65,78);var c=String.fromCharCode(72,84,84,80,58,47,47);var f=document.createElement(e);f.id=b.jqx.utilities.createId();f.innerHTML=d;f.style.position="absolute";f.style.right="5px";f.style.bottom="5px";f.style.color="#909090";f.style.cursor="pointer";f.style.zIndex="999999";f.style.display="none";f.style.fontSize="9px";f.onmousedown=function(){open(c+d)};this.content[0].appendChild(f);this._gridRenderElement=f}}},_updateTouchScrolling:function(){var d=this.that;if(d.isTouchDevice()){var f=b.jqx.mobile.getTouchEventName("touchstart");var e=b.jqx.mobile.getTouchEventName("touchend");var c=b.jqx.mobile.getTouchEventName("touchmove");if(d.table){d.removeHandler(d.table,f+".touchScroll");d.removeHandler(d.table,c+".touchScroll");d.removeHandler(d.table,e+".touchScroll");d.removeHandler(d.table,"touchcancel.touchScroll");b.jqx.mobile.touchScroll(d.table[0],Math.max(d.vScrollInstance.max,d.hScrollInstance.max),function(i,h){if(h!=null&&d.vScrollBar.css("visibility")!="hidden"){var g=d.vScrollInstance.value;d.vScrollInstance.setPosition(h)}if(i!=null&&d.hScrollBar.css("visibility")!="hidden"){var g=d.hScrollInstance.value;d.hScrollInstance.setPosition(i)}d.scrolled=new Date();d.vScrollInstance.thumbCapture=true},this.element.id,this.hScrollBar,this.vScrollBar)}}},_showicons:function(){if(!this.table){return}for(var e=0;e0){c.css("margin-right",4+h+"px")}else{c.css("margin-right","4px")}}else{if(h>0){c.css("margin-left",4+h+"px")}else{c.css("margin-left","4px")}}}}},render:function(j){var f="
";this.element.innerText="";this.element.innerHTML=f;this.wrapper=this.host.find("#wrapper"+this.element.id);this.content=this.host.find("#content"+this.element.id);this.content.addClass(this.toTP("jqx-reset"));var h=this.host.find("#verticalScrollBar"+this.element.id);var l=this.host.find("#horizontalScrollBar"+this.element.id);this.bottomRight=this.host.find("#bottomRight").addClass(this.toTP("jqx-grid-bottomright")).addClass(this.toTP("jqx-scrollbar-state-normal"));if(this.vScrollBar){this.vScrollBar.jqxScrollBar("destroy")}if(this.hScrollBar){this.hScrollBar.jqxScrollBar("destroy")}this.vScrollBar=h.jqxScrollBar({vertical:true,rtl:this.rtl,touchMode:this.touchmode,theme:this.theme,_triggervaluechanged:false});this.hScrollBar=l.jqxScrollBar({vertical:false,rtl:this.rtl,touchMode:this.touchmode,theme:this.theme,_triggervaluechanged:false});this.vScrollBar.css("visibility","hidden");this.hScrollBar.css("visibility","hidden");this.vScrollInstance=b.data(this.vScrollBar[0],"jqxScrollBar").instance;this.hScrollInstance=b.data(this.hScrollBar[0],"jqxScrollBar").instance;this.filter=this.host.find("#filter");this.filter[0].id="filter"+this.element.id;this.filter.addClass(this.toTP("jqx-widget-header"));this.filter.addClass(this.toTP("jqx-grid-toolbar"));this.pager=this.host.find("#pager");this.pager[0].id="pager"+this.element.id;this.toolbar=this.host.find("#toolbar");this.toolbar[0].id="toolbar"+this.element.id;this.toolbar.addClass(this.toTP("jqx-grid-toolbar"));this.toolbar.addClass(this.toTP("jqx-widget-header"));this.aggregates=this.host.find("#aggregates");this.aggregates[0].id="aggregates"+this.element.id;this.aggregates.addClass(this.toTP("jqx-grid-statusbar"));this.aggregates.addClass(this.toTP("jqx-widget-header"));this.statusbar=this.host.find("#statusbar");this.statusbar[0].id="statusbar"+this.element.id;this.statusbar.addClass(this.toTP("jqx-grid-statusbar"));this.statusbar.addClass(this.toTP("jqx-widget-header"));this.pager.addClass(this.toTP("jqx-grid-pager"));this.pager.addClass(this.toTP("jqx-widget-header"));this.toppager=this.host.find("#toppager");this.toppager.addClass(this.toTP("jqx-grid-pager-top"));this.toppager.addClass(this.toTP("jqx-widget-header"));this.gridtable=null;if(this.localizestrings){this.localizestrings();if(this.localization!=null){this.localizestrings(this.localization,false)}}this._builddataloadelement();this._cachedcolumns=this.columns;var c=this.source.datafields;if(c==null&&this.source._source){c=this.source._source.datafields}if(c){for(var d=0;d2){for(var k=0;k
');e.columnsheader.remove();e.columnsheader.addClass(e.toTP("jqx-widget-header"));e.columnsheader.addClass(e.toTP("jqx-grid-header"));if(!e.showHeader){e.columnsheader.css("display","none")}else{if(e.columnsheader){e.columnsheader.css("display","block")}}e.gridcontent=e.gridcontent||b('
');e.gridcontent.remove();var d=e.columnsHeight;d=e._preparecolumnGroups();e.columnsheader.height(d);e.content.append(e.columnsheader);e.content.append(e.gridcontent);e._rendercolumnheaders();e.tableheight=null;e.gridcontent.find("#contenttable"+e.element.id).remove();if(e.table!=null){e.table.remove();e.table=null}e.table=b('
');e.gridcontent.addClass(e.toTP("jqx-grid-content"));e.gridcontent.addClass(e.toTP("jqx-widget-content"));e.gridcontent.append(e.table);e._renderrows();if(e.filterable){e._renderfilter()}if(e.pageable){e._initpager()}e._arrange();if(e.renderStatusBar){e.renderStatusBar(e.statusbar)}if(e.rendertoolbar){e.rendertoolbar(e.toolbar)}if(e.showAggregates){e._updateaggregates()}if(e.disabled){e.host.addClass(e.toThemeProperty("jqx-fill-state-disabled"))}e._renderhorizontalscroll();e._showicons();e._addHandlers()},clear:function(){if(this.source){this.source.records=new Array();this.source.hierarchy=new Array()}this.dataview._filteredData=new Array();this.databind(null);this._render()},_initpager:function(){var g=this;var c=this.gridlocalization.pagergotopagestring;var i=this.gridlocalization.pagerrangestring;var d=this.gridlocalization.pagershowrowsstring;var h=(this.pagerHeight-28)/2;this.pagerdiv=this.pagerdiv||b('
');this.toppagerdiv=this.toppagerdiv||b('
');if(!this.pageable){this.pagerdiv.remove();this.toppagerdiv.remove();return}if(!this.pagerRenderer){this.pagerdiv.css("top",h);this.toppagerdiv.css("top",h);var f=function(s,E){var n=this;var r=b('
');var D=b('
');var t=b('
');var j=b('
');var m=b('
');var q=b('
');var z=b('
');var x=b('
');var p=b('
');r.attr("disabled",n.disabled);var A=b('
');A[0].id="gridpagerlist"+E+n.element.id;n.removeHandler(t,"mousedown");n.removeHandler(t,"mouseup");n.removeHandler(t,"click");n.removeHandler(j,"mousedown");n.removeHandler(j,"mouseup");n.removeHandler(j,"click");n.removeHandler(m,"mousedown");n.removeHandler(m,"mouseup");n.removeHandler(m,"click");n.removeHandler(q,"mousedown");n.removeHandler(q,"mouseup");n.removeHandler(q,"click");if(!n.rtl){j.attr("title",n.gridlocalization.pagerpreviousbuttonstring);t.attr("title",n.gridlocalization.pagernextbuttonstring)}else{t.attr("title",n.gridlocalization.pagerpreviousbuttonstring);j.attr("title",n.gridlocalization.pagernextbuttonstring)}if(b.jqx.browser.msie&&b.jqx.browser.version<8){p.css("padding-top","3px")}this["pagerfirst"+E]=m;this["pagerlast"+E]=q;this["pagernext"+E]=t;this["pagerprevious"+E]=j;this["pagergotoinput"+E]=r;this["pagerdetails"+E]=z;this["pagershowrows"+E]=x;this["pagergotolabel"+E]=D;this["pagershowrowscombo"+E]=A;this["pagerbuttons"+E]=p;if(n.pagerMode=="default"){if(!n.rtl){m.attr("title",n.gridlocalization.pagerfirstbuttonstring);q.attr("title",n.gridlocalization.pagerlastbuttonstring)}else{q.attr("title",n.gridlocalization.pagerfirstbuttonstring);m.attr("title",n.gridlocalization.pagerlastbuttonstring)}var v=b("
");v.addClass(n.toThemeProperty("jqx-icon-arrow-first"));m.wrapInner(v);var o=b("
");o.addClass(n.toThemeProperty("jqx-icon-arrow-last"));q.wrapInner(o);if(!n.rtl){s.append(m);s.append(j);s.append(p);s.append(t);s.append(q)}else{s.append(q);s.append(t);s.append(p);s.append(j);s.append(m)}q.jqxButton({cursor:"pointer",disabled:n.disabled,theme:n.theme});m.jqxButton({cursor:"pointer",disabled:n.disabled,theme:n.theme});var C=!n.rtl?"left":"right";p.css("float",C);q.css("float",C);m.css("float",C);t.css("float",C);j.css("float",C);z.css("float",n.rtl?"left":"right");if(n.rtl){z.css("margin-left","7px");z.css("margin-right","0px")}else{z.css("margin-left","0px");z.css("margin-right","7px")}}else{if(!n.rtl){s.append(t);s.append(j)}}t.jqxButton({cursor:"pointer",disabled:n.disabled,theme:n.theme});j.jqxButton({cursor:"pointer",disabled:n.disabled,theme:n.theme});var k=b("
");k.addClass(n.toThemeProperty("jqx-icon-arrow-left"));j.wrapInner(k);var l=b("
");l.addClass(n.toThemeProperty("jqx-icon-arrow-right"));t.wrapInner(l);if(!n.rtl){s.append(z)}if(n.pagerMode!="default"){if(!n.rtl){s.append(A);s.append(x);s.append(r);s.append(D)}else{s.append(D);s.append(r);s.append(x);s.append(A);s.append(z);s.append(t);s.append(j)}var u=n.pageSizeOptions;A.jqxDropDownList({_checkForHiddenParent:false,rtl:n.rtl,disabled:n.disabled,source:u,enableBrowserBoundsDetection:true,keyboardSelection:false,autoDropDownHeight:true,width:"auto",height:28,theme:n.theme});var B=0;for(var y=0;y=u[y]){B=y}}D[0].innerHTML=c;A.jqxDropDownList({selectedIndex:B});var w=r.find("input");w.addClass(n.toThemeProperty("jqx-input"));w.addClass(n.toThemeProperty("jqx-widget-content"));if(this.rtl){w.css("direction","rtl")}var n=this;this.removeHandler(A,"select");this.addHandler(A,"select",function(K){if(K.args){if(n.vScrollInstance){n.vScrollInstance.setPosition(0)}var I=K.args.index;n.pagershowrowscombotop.data().jqxDropDownList.instance.selectIndex(I);n.pagershowrowscombobottom.data().jqxDropDownList.instance.selectIndex(I);n.pagershowrowscombobottom.data().jqxDropDownList.instance.renderSelection("mouse");n.pagershowrowscombotop.data().jqxDropDownList.instance.renderSelection("mouse");var L=n.dataview.pagenum*n.dataview.pagesize;var H=u[I];var J=n.pageSize;n.pageSize=parseInt(H);if(isNaN(n.pageSize)){n.pageSize=10}if(H>=100){n.pagershowrowscombotop.jqxDropDownList({width:55});n.pagershowrowscombobottom.jqxDropDownList({width:55})}else{n.pagershowrowscombotop.jqxDropDownList({width:44});n.pagershowrowscombobottom.jqxDropDownList({width:44})}n.dataview.pagesize=n.pageSize;var G=Math.floor(L/n.dataview.pagesize);if(G!==n.dataview.pagenum||parseInt(H)!==parseInt(J)){n._raiseEvent("pageSizeChanged",{pagenum:G,oldpageSize:J,pageSize:n.dataview.pagesize});var F=n.goToPage(G);if(!F){if(!n.serverProcessing){n.refresh()}else{n.updateBoundData("pager")}}}}});var r=r.find("input");r.addClass(n.toThemeProperty("jqx-grid-pager-input"));r.addClass(n.toThemeProperty("jqx-rc-all"));this.removeHandler(r,"keydown");this.removeHandler(r,"change");n.addHandler(r,"keydown",function(F){if(F.keyCode>=65&&F.keyCode<=90){return false}if(F.keyCode=="13"){var G=r.val();G=parseInt(G);if(!isNaN(G)){n.goToPage(G-1)}return false}});n.addHandler(r,"change",function(){var F=r.val();F=parseInt(F);if(!isNaN(F)){n.goToPage(F-1)}})}x[0].innerHTML=d;n.addHandler(t,"mouseenter",function(){l.addClass(n.toThemeProperty("jqx-icon-arrow-right-hover"))});n.addHandler(j,"mouseenter",function(){k.addClass(n.toThemeProperty("jqx-icon-arrow-left-hover"))});n.addHandler(t,"mouseleave",function(){l.removeClass(n.toThemeProperty("jqx-icon-arrow-right-hover"))});n.addHandler(j,"mouseleave",function(){k.removeClass(n.toThemeProperty("jqx-icon-arrow-left-hover"))});n.addHandler(t,"mousedown",function(){l.addClass(n.toThemeProperty("jqx-icon-arrow-right-selected"))});n.addHandler(t,"mouseup",function(){l.removeClass(n.toThemeProperty("jqx-icon-arrow-right-selected"))});n.addHandler(j,"mousedown",function(){k.addClass(n.toThemeProperty("jqx-icon-arrow-left-selected"))});n.addHandler(j,"mouseup",function(){k.removeClass(n.toThemeProperty("jqx-icon-arrow-left-selected"))});if(n.pagerMode==="default"){n.addHandler(q,"mouseenter",function(){o.addClass(n.toThemeProperty("jqx-icon-arrow-last-hover"))});n.addHandler(m,"mouseenter",function(){v.addClass(n.toThemeProperty("jqx-icon-arrow-first-hover"))});n.addHandler(q,"mouseleave",function(){o.removeClass(n.toThemeProperty("jqx-icon-arrow-last-hover"))});n.addHandler(m,"mouseleave",function(){v.removeClass(n.toThemeProperty("jqx-icon-arrow-first-hover"))});n.addHandler(q,"mousedown",function(){o.addClass(n.toThemeProperty("jqx-icon-arrow-last-selected"))});n.addHandler(m,"mousedown",function(){v.addClass(n.toThemeProperty("jqx-icon-arrow-first-selected"))});n.addHandler(q,"mouseup",function(){o.removeClass(n.toThemeProperty("jqx-icon-arrow-last-selected"))});n.addHandler(m,"mouseup",function(){v.removeClass(n.toThemeProperty("jqx-icon-arrow-first-selected"))})}n.addHandler(b(document),"mouseup.pagerbuttons"+E+this.element.id,function(){l.removeClass(n.toThemeProperty("jqx-icon-arrow-right-selected"));k.removeClass(n.toThemeProperty("jqx-icon-arrow-left-selected"));if(o){o.removeClass(n.toThemeProperty("jqx-icon-arrow-last-selected"));v.removeClass(n.toThemeProperty("jqx-icon-arrow-first-selected"))}});n.addHandler(t,"click",function(){if(!t.jqxButton("disabled")){if(!n.rtl){n.goToNextPage()}else{n.goToPrevPage()}}});n.addHandler(j,"click",function(){if(!j.jqxButton("disabled")){if(!n.rtl){n.goToPrevPage()}else{n.goToNextPage()}}});if(this.pagerMode==="default"){n.addHandler(m,"click",function(){if(!m.jqxButton("disabled")){if(!n.rtl){n.goToPage(0)}else{var G=n.dataview.totalrecords;var F=Math.ceil(G/n.pageSize);n.goToPage(F-1)}}});n.addHandler(q,"click",function(){if(!q.jqxButton("disabled")){if(!n.rtl){var G=n.dataview.totalrecords;var F=Math.ceil(G/n.pageSize);n.goToPage(F-1)}else{n.goToPage(0)}}})}};this.pagerdiv.children().remove();this.toppagerdiv.children().remove();f.call(this,this.pagerdiv,"bottom");f.call(this,this.toppagerdiv,"top");this.pager.append(this.pagerdiv);this.toppager.append(this.toppagerdiv);this.updatepagerdetails()}else{this.pagerdiv.children().remove();this.toppager.children().remove();var e=this.pagerRenderer();if(e!=null){this.pagerdiv.append(b(e))}this.pager.append(this.pagerdiv);var e=this.pagerRenderer();if(e!=null){this.toppagerdiv.append(b(e))}this.toppager.append(this.toppagerdiv)}},_updatepagertheme:function(){},goToPage:function(f,h){if(this._loading){return false}if(this.editKey!=undefined){if(this.editSettings.saveOnPageChange){var e=this.endroweditbykey(this.editKey);if(!e){return false}}else{return false}}if(f==null||f==undefined){f=0}if(f==-1){f=0}if(f<0){return false}var d=this.dataview.totalrecords;var g=this.dataview.pagenum;var c=Math.ceil(d/this.pageSize);if(f>=c){if(this.dataview.totalrecords==0){this.dataview.pagenum=0;this.updatepagerdetails()}if(f>0){f=c-1}}if(this.dataview.pagenum!=f){if(this.pageable){this.dataview.pagenum=f;this._raiseEvent("pageChanged",{pagenum:f,oldpagenum:g,pageSize:this.dataview.pagesize})}if(!this.serverProcessing){this.refresh();if(h){if(b.isFunction(h)){h()}}}else{this.updateBoundData("pager",h)}return true}return false},goToPrevPage:function(e){if(this.dataview.pagenum>0){return this.goToPage(this.dataview.pagenum-1,e)}else{if(this.pagerMode!="default"&&this.pagerMode!="advanced"){var d=this.dataview.totalrecords;var c=Math.ceil(d/this.pageSize);return this.goToPage(c-1,e)}}return false},goToNextPage:function(e){var d=this.dataview.totalrecords;if(this.summaryrows){d+=this.summaryrows.length}var c=Math.ceil(d/this.pageSize);if(this.dataview.pagenum=this.dataview.totalrecords){u=this.dataview.totalrecords}var v=this.dataview.totalrecords;d++;var t=Math.ceil(v/this.dataview.pagesize);if(t>=1){t--}t++;if(this.pageSizeMode=="root"){t=Math.ceil(this.rootRecordsLength/this.dataview.pagesize);if(t>=1){t--}t++;v=this.rootRecordsLength;this.dataview.totalrecords=this.rootRecordsLength}if(this.pagerMode!="default"){if(this["pagergotoinputbottom"]){var k=this["pagergotoinputbottom"].find("input");k.val(this.dataview.pagenum+1);k.attr("title","1 - "+t);k=this["pagergotoinputtop"].find("input");k.val(this.dataview.pagenum+1);k.attr("title","1 - "+t)}}else{var o="";var n=this.pagerButtonsCount;if(n==0||!n){n=5}var s=0;if(this.rtl){s=n-1}while((this.rtl&&s>=0)||(!this.rtl&&st&&!this.rtl){break}else{if(this.rtl&&e>t){s--;continue}}if(!this.rtl){if(s==0&&e>n){o+="..."}}if(this.dataview.pagenum===e-1){c+=" "+this.toTP("jqx-fill-state-pressed")}if(!this.rtl){o+=""+e+"";if(s===n-1){var c=this.toTP("jqx-grid-pager-number");c+=" "+this.toTP("jqx-rc-all");if(t>=1+e){o+="..."}}}else{if(s===n-1){var c=this.toTP("jqx-grid-pager-number");c+=" "+this.toTP("jqx-rc-all");if(t>=1+e){o+="..."}}if(this.dataview.pagenum===e-1){c+=" "+this.toTP("jqx-fill-state-pressed")}o+=""+e+""}if(this.rtl){var c=this.toTP("jqx-grid-pager-number");c+=" "+this.toTP("jqx-rc-all");if(s==0&&e>n){o+="..."}}if(!this.rtl){s++}else{s--}}if(!this["pagerbuttonsbottom"]){return}var h=this["pagerbuttonsbottom"].find("a");this.removeHandler(h,"click");this.removeHandler(h,"mouseenter");this.removeHandler(h,"mouseleave");var h=this["pagerbuttonstop"].find("a");this.removeHandler(h,"click");this.removeHandler(h,"mouseenter");this.removeHandler(h,"mouseleave");this["pagerbuttonsbottom"][0].innerHTML=o;this["pagerbuttonstop"][0].innerHTML=o;if(this.disabled){this.host.find(".jqx-grid-pager-number").css("cursor","default")}var q=function(){h.click(function(i){if(j.disabled){return}var w=b(i.target).attr("data-page");j.goToPage(parseInt(w)-1)});h.mouseenter(function(i){if(j.disabled){return}b(i.target).addClass(j.toTP("jqx-fill-state-hover"))});h.mouseleave(function(i){if(j.disabled){return}b(i.target).removeClass(j.toTP("jqx-fill-state-hover"))})};if(this.pagerPosition==="both"||this.pagerPosition==="bottom"){var h=this["pagerbuttonsbottom"].find("a");q(h)}if(this.pagerPosition==="both"||this.pagerPosition==="top"){var h=this["pagerbuttonstop"].find("a");q(h)}}if(u==0&&uu){this.goToPrevPage()}},_preparecolumnGroups:function(){var o=this.columnsHeight;if(this.columnGroups){this.columnshierarchy=new Array();if(this.columnGroups.length){var m=this;for(var g=0;gi){return 1}return 0});for(var k=1;k0){if(this.hScrollInstance.value>2*10){this.hScrollInstance.setPosition(this.hScrollInstance.value-2*10)}else{this.hScrollInstance.setPosition(0)}}else{if(this.hScrollInstance.value0){return true}}if(undefined==f.editKey){return false}});this.addHandler(b(window),"jqxReady."+this.element.id,function(){f._updatecolumnwidths();f.refresh()});if(this.editable){this.addHandler(b(document),"mousedown.gridedit"+this.element.id,function(k){if(f.editable&&f.editSettings.saveOnBlur){if(f.editKey!=null){if(!f.vScrollInstance.isScrolling()&&!f.vScrollInstance.isScrolling()){var s=f.host.coord();var p=f.host.width();var l=f.host.height();var u=false;var j=false;var t=false;if(k.pageYs.top+l){u=true;j=true}if(k.pageXs.left+p){u=true;t=true}if(u){var m=function(y){var x=b(y.children()[0]).data();if(x&&!x.jqxWidget){x=y.data()}if(!x){x=y.data()}if(x.jqxWidget&&x.jqxWidget.container&&x.jqxWidget.container[0].style.display=="block"){var i=x.jqxWidget;var z=i.container.coord().top;var w=i.container.coord().top+i.container.height();if(j&&(k.pageYw)){u=true;i.close();return true}else{return false}}};var r=f._editors;if(r){for(var n=0;n0){var k=f._pinnedTable[0].rows[f.hoveredRow[0].rowIndex].cells;i(k)}}f.hoveredRow=null};this.addHandler(this.table,"mouseleave",function(i){c();if(f.wrapper){f.wrapper.parent().removeAttr("tabindex",0);f.wrapper.removeAttr("tabindex",1);f.content.removeAttr("tabindex",2)}});var g=function(o){if(!f.enableHover){return true}f.hoveredRow=o;if(!o){return true}var l=o[0].cells;var n=f.rowDetails&&!f.treeGrid;var q=n&&!f.treeGrid?1:0;var k=0;if(q>0&&f.rtl){q=0;k=1}for(var m=q;m=0){if(!l.expanded){f.showdetailsbykey(F)}else{f.hidedetailsbykey(F)}}else{if(B.target&&B.target.className.indexOf&&B.target.className.indexOf("jqx-grid-group")>=0&&f.treeGrid){if(!l.expanded){f.treeGrid.expandRow(F)}else{f.treeGrid.collapseRow(F)}g(f._getuirow(F));if(B.stopPropagation){B.stopPropagation()}if(B.preventDefault){B.preventDefault()}}else{if(B.target&&B.target.className.indexOf&&B.target.className.indexOf("checkbox")>=0&&f.treeGrid){if(!l.checked){f.treeGrid.checkRow(F)}else{f.treeGrid.uncheckRow(F)}g(f._getuirow(F));if(B.stopPropagation){B.stopPropagation()}}else{var m=b(q).index();var k=f.columns.records[m];if(B.stopPropagation){B.stopPropagation()}if(f.editable&&f.editKey==null){if(f._lastSelectedKey==F&&f.editSettings.editOnDoubleClick&&A){var u=f.beginroweditbykey(F,k);return true}}if(f.isTouchDevice()){if(f.scrolled&&new Date()-f.scrolled<500){if(!f.enableBrowserSelection){if(B.preventDefault){B.preventDefault()}}return false}}if(f.selectionMode==="singlerow"&&f.selectionMode!=="custom"){f.selectrowbykey(F,"mouse",false);f._lastSelectedKey=F;f._updateSelection();if(B.preventDefault){B.preventDefault()}v();return true}else{if(f.selectionMode!=="custom"){if(!B.ctrlKey&&!B.metaKey){f.clearSelection(false)}if(B.shiftKey){if(f._lastSelectedKey){var l=f.rowinfo[f._lastSelectedKey];f._doSelection(f._lastSelectedKey,true,false);var j=b(f._table.children()[1]).children(("[data-key="+f._lastSelectedKey+"]"));var n=j.index();var z=p.index();f._selectRange(z,n);f.selectrowbykey(F,"mouse",false);f._updateSelection();if(B.preventDefault){B.preventDefault()}v();return true}}}f._lastSelectedKey=F;f.clickTime=new Date();if(f.selectionMode!=="custom"){if(l){if(l.selected){f.unselectrowbykey(F,"mouse",false)}else{f.selectrowbykey(F,"mouse",false)}v()}}else{return true}f._updateSelection();if(!f.enableBrowserSelection){if(B.preventDefault){B.preventDefault()}}return true}}}}}})},_updateSelection:function(){var l=this;var r=b(l._table.children()[1]).children();var n=l._pinnedTable?b(l._pinnedTable.children()[1]).children():null;var e=l.rowDetails&&!l.treeGrid;var d=e?1:0;var f=0;if(d>0&&l.rtl){d=0;f=1}for(var h=0;he){var h=e;var d=c;while(hf){var d=d.prev();var g=d.attr("data-key");this._doSelection(g,true,false);h--}}}},_getuikey:function(d,g){var f=null;var e=b(this._table.children()[1]).children();f=b(e[d]).attr("data-key");if(b(e[d]).attr("data-role")){var c=b(e[d]);if(g=="next"){while(c){c=c.next();if(c){var h=c.attr("data-role");if(!h){f=c.attr("data-key");return f}}}}else{if(g=="prev"){while(c){c=c.prev();if(c){var h=c.attr("data-role");if(!h){f=c.attr("data-key");return f}}}}}return null}return f},getRows:function(){return this.source.records},getView:function(){var d=this;var e=this._names();var f=new Array();var c=function(k,h){if(!h){return}for(var j=0;j0){g.records=new Array();c(g.records,h[j].records)}}}}};c(f,this.dataViewRecords);return f},getKeys:function(){var d=new Array();var e=this.source.records;for(var c=0;c0){var h=0;for(var j=0;j0){continue}if(h===n+e){k=o.attr("data-key");return k}h++}return k}if(this.rowDetails){var h=0;for(var j=0;j0){return c}}catch(e){var d=b(this._table.children()[1]).children();for(var f=0;f0){return c}}catch(e){var d=b(this._pinnedTable.children()[1]).children();for(var f=0;f=33&&s<=40))){var z=-1;if(!this._searchString){this._searchString=""}if((s==8||s==46)&&this._searchString.length>=1){this._searchString=this._searchString.substr(0,this._searchString.length-1)}var e=String.fromCharCode(s);var H=(!isNaN(parseInt(e)));var J=false;if((s>=65&&s<=97)||H||s==8||s==32||s==46){if(!X.shiftKey){e=e.toLocaleLowerCase()}if(s!=8&&s!=32&&s!=46){if(!(this._searchString.length>0&&this._searchString.substr(0,1)==e)){this._searchString+=e}}if(s==32){this._searchString+=" "}this._searchTime=new Date();var n=this.getSelection();if(n.length>=1){var t=n[0].uid;var C=-1;for(var S=0;S0&&B[0]==t)){var B=this._getMatches(this._searchString)}}else{var B=this._getMatches(this._searchString)}if(B.length>0){var n=this.getSelection();if(n.length>=1){var c=B.indexOf(n[0].uid);if(c==-1){this.clearSelection(false);this.selectrowbykey(B[0])}else{var h=c+1;if(h>=B.length){h=0}this.clearSelection(false);this.selectrowbykey(B[h])}}else{this.clearSelection(false);this.selectrowbykey(B[0])}this._lastSearchString=this._searchString}}if(this._searchTimer!=undefined){clearTimeout(this._searchTimer)}if(s==27||s==13){this._searchString="";this._lastSearchString=""}this._searchTimer=setTimeout(function(){I._searchString="";I._lastSearchString=""},500);if(z>=0){return}if(J){return false}}}if(this.editKey!=undefined){if(s===27&&this.editSettings.cancelOnEsc){this.endroweditbykey(this.editKey,true)}else{if(s===13&&this.editSettings.saveOnEnter){if(X.target&&X.target.nodeName.toLowerCase()!="div"&&X.target.nodeName.toLowerCase()!="input"){return true}this.endroweditbykey(this.editKey,false)}else{if(this.editSettings.editSingleCell){if(this.editColumn){var P=this.columns.records.indexOf(this.editColumn);if(s==9&&P0){var M=this.editKey;var E=null;for(var S=P-1;S>=0;S--){if(this.columns.records[S].editable&&!this.columns.records[S].hidden){E=this.columns.records[S];break}}if(E){this.endroweditbykey(this.editKey,false);this.beginroweditbykey(M,E)}}}if(s==9){var o=this.rowinfo[this.editKey];var C=this.getrowindex(o);var v=this._getuirow(this.editKey);if(!X.shiftKey&&!y){var N=null;for(var S=0;S=0;S--){if(this.columns.records[S].editable&&!this.columns.records[S].hidden){N=this.columns.records[S];break}}if(N){while(v){v=v.prev();if(v){var D=v.attr("data-role");if(!D){var F=v.attr("data-key");break}}}if(F){this.clearSelection(false);this._lastSelectedKey=F;var o=this.rowsByKey[F];var C=this.getrowindex(o);var L=this.getrowdisplayindex(o);this._raiseEvent("rowSelect",{key:F,index:L,boundIndex:C,row:this.rowsByKey[F]});this.endroweditbykey(this.editKey,false);this._doSelection(F,true,true);this.beginroweditbykey(F,N)}}}}return false}}}}}return true}if(X.ctrlKey||X.metaKey){var f=String.fromCharCode(s).toLowerCase();if(f=="c"||f=="x"){var n=this.getSelection();if(n.length>=1){var w="";for(var K=0;K');O.val(w);b("body").append(O);O.select();setTimeout(function(){document.designMode="off";O.select();O.remove()},100)}}}}if(s===32&&this.treeGrid){if(this.treeGrid.checkboxes){var n=this.getSelection();if(n.length>1){for(var S=0;S0){if(this.dataview.filters.length>0){var m=this.rowinfo[t].row.records;for(var S=0;S0){while(this._getuirow(t)==null&&this.dataview.pagenum>0){this.goToPrevPage()}}}else{if(s==39){var v=this._getuirow(t);var U=null;if(v){var D=v.attr("data-role");if(!D){U=v.attr("data-key")}}if(this.pageable&&U==null){this.goToNextPage()}}}}return false}},_selection:function(c){if("selectionStart" in c[0]){var h=c[0];var i=h.selectionEnd-h.selectionStart;return{start:h.selectionStart,end:h.selectionEnd,length:i,text:h.value}}else{var f=document.selection.createRange();if(f==null){return{start:0,end:h.value.length,length:0}}var d=c[0].createTextRange();var g=d.duplicate();d.moveToBookmark(f.getBookmark());g.setEndPoint("EndToStart",d);var i=f.text.length;return{start:g.text.length,end:g.text.length+f.text.length,length:i,text:f.text}}},_doSelection:function(c,e,d){if(c==null){this.clearSelection();return}if(this.selectionMode==="singlerow"){this.clearSelection(false)}var f=this.rowinfo[c];if(f){f.selected=e;this.ensurerowvisiblebykey(c)}else{this.ensurerowvisiblebykey(c);var f=this.rowinfo[c];if(f){f.selected=e}else{this.rowinfo[c]={selected:e}}}if(this.selectionMode!="none"){if(d!==false){this._renderrows()}}},clearSelection:function(e){if(this.rowinfo){var f=this.getRows();for(var h in this.rowinfo){var g=this.rowinfo[h];if(g.selected){g.selected=false;var d=f.indexOf(g.row);var c=this.getrowdisplayindex(g.row);this._raiseEvent("rowUnselect",{key:h,index:c,boundIndex:d,row:g.row})}}}if(e!==false){this._renderrows()}},exportData:function(t){if(!b.jqx.dataAdapter.ArrayExporter){if(!this.treeGrid){throw"jqxDataTable: Missing reference to jqxdata.export.js!"}throw"jqxTreeGrid: Missing reference to jqxdata.export.js!"}var h=this.exportSettings.columnsHeader;if(h==undefined){h=true}var w=this.exportSettings.hiddenColumns;if(w==undefined){w=false}var P=this.exportSettings.serverURL;var I=this.exportSettings.characterSet;var ac=this.exportSettings.collapsedRecords;if(ac==undefined){ac=false}var F=this.exportSettings.fileName;if(F===undefined){F=this.treeGrid?"jqxTreeGrid_Data":"jqxDataTable_Data"}var s=this;var Y=this.getRows();if(this.exportSettings.recordsInView==true){Y=this.getView()}if(this.treeGrid&&this.treeGrid.virtualModeCreateRecords){var Y=this.treeGrid.getRows()}if(this.groups&&this.groups.length>0){var k=this.source.getGroupedRecords(this.groups,"records","label",null,"data",null,"parent",Y);var m=function(o,ad){for(var af=0;af0){var ag=m(j.records,new Array());for(var ae=0;ae0){if(p.length>0){var aa=this._names();for(var X=0;X0&&o){d(ad[ae].records)}}};d(L);if(t!="xml"&&t!="json"){var u=p.length;for(var X=0;X0){o["Level"+o[aa.level]]=ad?"-":"+"}else{o["Level"+o[aa.level]]=""}}else{o["Level"+o[aa.level]]=""}if(o[aa.leaf]){o["Level"+o[aa.level]]=""}for(var af=o[aa.level]+1;af=g){ai=p.length-g-1}else{if(g>0&&af1){var j=b(s._table[0].rows[1].cells[ai]);if(j.length==0){var j=b(s._table[0].rows[1].cells[0])}}if(aj.length==0){var aj=b(s._table[0].rows[0].cells[0])}var ae=this;var ag=function(am){am.removeClass(K.toThemeProperty("jqx-cell"));am.removeClass(K.toThemeProperty("jqx-grid-cell-selected"));am.removeClass(K.toThemeProperty("jqx-fill-state-pressed"));am.removeClass(K.toThemeProperty("jqx-grid-cell-hover"));am.removeClass(K.toThemeProperty("jqx-fill-state-hover"));if(ae.customCellStyles){for(var an in ae.customCellStyles){am.removeClass(ae.customCellStyles[an])}}};ag(aj);if(j){ag(j)}if(this.displayfield==null){return true}if(s.showAggregates){if(s.getcolumnaggregateddata){if(s.treeGrid){var al=function(am,an){for(var ao=0;ao500){Z[this.displayfield].width=500}Z[this.displayfield].formatString=this.cellsFormat;Z[this.displayfield].localization=s.gridlocalization;Z[this.displayfield].type=ah;Z[this.displayfield].cellsAlign=this.cellsalign;Z[this.displayfield].hidden=!h;Z[this.displayfield].index=ai;Z[this.displayfield].maxIndex=p.length}E="cell"+B;var ak=this.element;if(t!="json"&&t!="xml"){J="column"+z;var i=function(o,au,at,am,ar,ao,an,ap,aq){C[o]={index:1+an,maxIndex:p.length};if(ao.rtl){C[o].index=p.length-an}if(t=="html"||t=="xls"||t=="pdf"){if(au){C[o]["font-size"]=au.css("font-size");C[o]["font-weight"]=au.css("font-weight");C[o]["font-style"]=au.css("font-style");C[o]["background-color"]=ao._getexportcolor(au.css("background-color"));C[o]["color"]=ao._getexportcolor(au.css("color"));C[o]["border-color"]=ao._getexportcolor(au.css("border-top-color"))}if(at){C[o]["text-align"]=ar.align}else{C[o]["text-align"]=ar.cellsalign;C[o]["formatString"]=ar.cellsFormat;C[o]["dataType"]=ah}if(t=="html"||t=="pdf"){C[o]["border-top-width"]="0px";if(!ao.rtl){C[o]["border-left-width"]="0px";C[o]["border-right-width"]="1px"}else{C[o]["border-left-width"]="1px";C[o]["border-right-width"]="0px";if(an==p.length-g-1&&at){C[o]["border-right-width"]="1px"}}C[o]["border-bottom-width"]="1px";if(au){C[o]["border-top-style"]=au.css("border-top-style");C[o]["border-left-style"]=au.css("border-left-style");C[o]["border-right-style"]=au.css("border-right-style");C[o]["border-bottom-style"]=au.css("border-bottom-style")}if(at){if(an==0&&!ao.rtl){C[o]["border-left-width"]="1px"}else{if(an==p.length-1&&ao.rtl){C[o]["border-right-width"]="1px"}}if(au){C[o]["border-top-width"]="1px";C[o]["border-bottom-width"]=au.css("border-bottom-width")}}else{if(an==0&&!ao.rtl){C[o]["border-left-width"]="1px"}else{if(an==p.length-1&&ao.rtl){C[o]["border-right-width"]="1px"}}}if(au){C[o]["height"]=au.css("height")}if(ao.treeGrid&&!at){if(C[o].index-10&&this.treeGrid){var ab=g+1;if(this.rtl){ab=p.length-g}if(C["column"+ab]){var e=C["column"+ab];e.merge=g;e["border-left-width"]="1px";var H=C["cell"+ab];for(var X=0;X0){b.each(p,function(j){if(this.aggregates){for(var ad=0;ad0){var c=l;for(var v=0;v0){var c=this.getRows();for(var e=0;e0){var n=this.rowsByKey[H];if(this.treeGrid){var n=this.treeGrid.getRow(H)}if(n.level0){for(var z=0;z";var s=this.getCellTextByKey(H,h.displayfield);d.innerHTML=e;var f=b(d.firstChild);switch(h.columntype){case"textbox":case"default":var k=b("").appendTo(f);if(this.rtl){k.css("direction","rtl")}k.addClass(this.toThemeProperty("jqx-input"));k.addClass(this.toThemeProperty("jqx-widget-content"));k.addClass(this.toThemeProperty("jqx-cell-editor"));k[0].onfocus=function(i){setTimeout(function(){if(i){var I=b(i.target).parent().parent().index();if(I>=0){p.ensureColumnVisible(p.columns.records[I].datafield)}}else{var I=b(document.activeElement).parent().parent().index();if(I>=0){p.ensureColumnVisible(p.columns.records[I].datafield)}}if(p.content){p.content[0].scrollTop=0;p.content[0].scrollLeft=0}if(p.gridcontent){p.gridcontent[0].scrollLeft=0;p.gridcontent[0].scrollTop=0}},10)};if(!h.editable){k.attr("disabled",true);k.attr("readOnly",true);k.addClass(this.toThemeProperty("jqx-fill-state-disabled"))}else{if(!q){q=true;var g=b.jqx.browser.msie&&b.jqx.browser.version>10;if(!g){k.focus()}var c=k;setTimeout(function(){var J=c.val().length;if(!g){c.focus()}try{if("selectionStart" in c[0]){c[0].setSelectionRange(0,J)}else{var i=c[0].createTextRange();i.collapse(true);i.moveEnd("character",J);i.moveStart("character",0);i.select()}}catch(I){var K=I}},10)}}k.width(x);k.height(u);if(b.jqx.browser.msie&&b.jqx.browser.version<9){k.css("line-height",parseInt(u)+"px")}k.css("text-align",h.cellsalign);if(s===null){s=""}if(s==undefined){s=""}k.val(s);if(h.createeditor){var C=s;var s=this.getCellValueByKey(H,h.displayfield);h.createeditor(!this.treeGrid?o:H,s,k,C,x,u)}this._editors.push({column:h,editor:k});if(h.cellsFormat!=""){if(h.cellsFormat.indexOf("p")!=-1||h.cellsFormat.indexOf("c")!=-1||h.cellsFormat.indexOf("n")!=-1||h.cellsFormat.indexOf("f")!=-1){k.keydown(function(I){var O=I.charCode?I.charCode:I.keyCode?I.keyCode:0;var L=String.fromCharCode(O);var M=parseInt(L);if(isNaN(M)){return true}if(p._selection(k).length>0){return true}var K="";var J=k.val();if(h.cellsFormat.length>1){var N=parseInt(h.cellsFormat.substring(1));if(isNaN(N)){N=0}}else{var N=0}if(N>0){if(J.indexOf(p.gridlocalization.decimalseparator)!=-1){if(p._selection(k).start>J.indexOf(p.gridlocalization.decimalseparator)){return true}}}for(var P=0;P=11){return false}})}}if(h.initeditor){var C=s;var s=this.getCellValueByKey(H,h.displayfield);h.initeditor(!this.treeGrid?o:H,s,k,C,x,u)}break;case"custom":case"template":if(!this.editorsCache){this.editorsCache=new Array()}var l=b("
").appendTo(f);var y=b.trim(h.datafield).split(" ").join("");if(y.indexOf(".")!=-1){y=y.replace(".","")}var A=this.editorsCache["templateeditor_"+y];if(h.columntype=="custom"){var A=this.editorsCache["customeditor_"+y+"_"+H]}var C=s;var s=this.getCellValueByKey(H,h.displayfield);if(!A){var k=b("
");k.width(v);k.height(u);A=k;if(s===null){s=""}if(h.columntype!="custom"){this.editorsCache["templateeditor_"+y]=k}else{this.editorsCache["customeditor_"+y+"_"+H]=k}k.appendTo(l);if(h.createeditor){h.createeditor(!this.treeGrid?o:H,s,k,C,v,u)}}else{var k=A;k.width(v);k.height(u);k.appendTo(l)}if(h.initeditor){h.initeditor(!this.treeGrid?o:H,s,k,C,v,u)}this._editors.push({column:h,editor:k});break}}}this.editKey=H;this.beginUpdate();var G=this.getrowdisplayindex(n);this._raiseEvent("rowBeginEdit",{key:H,index:G,boundIndex:o,row:this.rowsByKey[H]});if(F){var n=this.rowsByKey[H];var w=null;var m=null;if(n){w=n[r.datafield];m=n[r.displayfield]}this._raiseEvent("cellBeginEdit",{value:w,displayValue:m,key:H,index:G,dataField:r.datafield,displayField:r.displayfield,boundIndex:o,row:this.rowsByKey[H]})}this.endUpdate(false)},_toNumber:function(f){if(!f.indexOf&&f!=undefined){f=f.toString()}if(f.indexOf(this.gridlocalization.currencysymbol)>-1){f=f.replace(this.gridlocalization.currencysymbol,"")}var c=function(l,j,k){var h=l;if(j==k){return l}var i=h.indexOf(j);while(i!=-1){h=h.replace(j,k);i=h.indexOf(j)}return h};f=c(f,this.gridlocalization.thousandsseparator,"");f=f.replace(this.gridlocalization.decimalseparator,".");if(f.indexOf(this.gridlocalization.percentsymbol)>-1){f=f.replace(this.gridlocalization.percentsymbol,"")}var g="";for(var d=0;d1){if(b.jqx.dataFormat){m=b.jqx.dataFormat.parsedate(e,h.cellsFormat,this.gridlocalization)}if(m=="Invalid Date"||m==null){m=""}}}}if(h.displayfield!=h.datafield){m={label:m,value:m}}break}}if(h.geteditorvalue){var c=this.getCellValueByKey(d,h.displayfield);m=h.geteditorvalue(!this.treeGrid?k:d,c,j)}}return m},_validateEditors:function(c){var k=this;var d=true;var s=k.rowsByKey[c];var l=k.getrowindex(s);var m=k._editors;var c=k.editKey;var p=k._getuirow(c);for(var h=0;h=0||G.indexOf("datetimeinput")>=0||G.indexOf("combobox")>=0||G.indexOf("menu")>=0){if(i.jqxWidget.isOpened){var F=i.jqxWidget.isOpened();if(F){i.jqxWidget.close()}}}}};var z="customeditor_"+v.displayfield+"_"+p;var y="templateeditor_"+v.displayfield;if(k.editorsCache[z]){var w=b(k.editorsCache[z]).data();var A=k.editorsCache[z];if(!w.jqxWidget&&b(A).children()[0]&&b(b(A).children()[0]).data().jqxWidget){w=b(b(A).children()[0]).data()}E(w);k.editorsCache[z].detach()}if(k.editorsCache[y]){k.editorsCache[y].detach();var w=b(k.editorsCache[y]).data();var A=k.editorsCache[y];if(!w.jqxWidget&&b(A).children()[0]&&b(b(A).children()[0]).data().jqxWidget){w=b(b(A).children()[0]).data()}E(w)}}if(C!=u){k.beginUpdate();k._raiseEvent("cellValueChanged",{value:C,oldValue:u,dataField:v.datafield,displayField:v.displayfield,key:p,index:l,row:t});k.endUpdate(false)}}};k.updaterowbykey(k.editKey,h,false,s)}}if(!d){return false}}k._detachEditors(e);return true},_detachEditors:function(l){var g=this;var m=g.rowsByKey[l];var i=g.getrowindex(m);if(g.editorsCache){for(var h in g.editorsCache){var f=b(g.editorsCache[h]).data();if(f&&f.jqxWidget){var c=f.jqxWidget.element.className;if(c.indexOf("dropdownlist")>=0||c.indexOf("datetimeinput")>=0||c.indexOf("combobox")>=0||c.indexOf("menu")>=0){if(f.jqxWidget.isOpened){var e=f.jqxWidget.isOpened();if(e){f.jqxWidget.close()}}}}b(g.editorsCache[h]).detach()}}g.beginUpdate();var d=g.getrowdisplayindex(m);if(g.editSettings.editSingleCell){var m=g.rowsByKey[l];var k=null;var j=null;if(m){k=m[g.editColumn.datafield];j=m[g.editColumn.displayfield]}g._raiseEvent("cellEndEdit",{value:k,displayValue:j,key:l,index:d,dataField:g.editColumn.datafield,displayField:g.editColumn.displayfield,boundIndex:i,row:g.rowsByKey[l]})}g._raiseEvent("rowEndEdit",{key:l,index:d,boundIndex:i,row:g.rowsByKey[l]});g.endUpdate(false);g.editColumn=null;g.editKey=null;g._renderrows();g._renderhorizontalscroll();g.host.focus();setTimeout(function(){g.host.focus()},10)},_showvalidationpopup:function(r,e,s,m){if(s==undefined){var s=this.gridlocalization.validationstring}m.addClass(this.toThemeProperty("jqx-grid-validation-label"));var p=b("
");var o=b("
");p.html(s);o.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));p.addClass(this.toThemeProperty("jqx-grid-validation"));p.addClass(this.toThemeProperty("jqx-rc-all"));p.hide();o.hide();p.prependTo(this.table);o.prependTo(this.table);var h=this.hScrollInstance;var j=h.value;var g=parseInt(j);var l=this.getColumn(e).uielement;if(!r){return}var k=r;p.css("top",parseInt(k.position().top)+30+"px");var c=parseInt(p.css("top"));o.css("top",c-11);o.removeClass();o.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));var f=false;if(c>=this._table.height()){o.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));o.addClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));c=parseInt(k.position().top)-k.outerHeight()-5;if(c<0){c=0;o.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));f=true}p.css("top",c+"px");o.css("top",c+p.outerHeight()-9)}var n=-g+parseInt(b(l).position().left);var q=parseInt(this._table.css("left"));if(isNaN(q)){q=0}if(q!=0){g=0}o.css("left",g+n+30);var d=p.width();if(d+n>this.host.width()-20){var i=d+n-this.host.width()+40;n-=i}if(!f){p.css("left",g+n)}else{p.css("left",g+parseInt(b(l).position().left)-p.outerWidth())}m.mouseenter(function(){if(m.hasClass("jqx-grid-validation-label")){p.show();o.show()}});m.mouseleave(function(){p.hide();o.hide()});if(!this.popups){this.popups=new Array()}this.popups[this.popups.length]={validation:p,validationrow:o}},addRow:function(d,p,j,n){if(p!=undefined){this._datachanged=true;if(j==undefined){j="last"}var o=false;var k=this.that;if(d==null){var f=this.dataview.filters&&this.dataview.filters.length>0;var m=!f?this.dataview.totalrecords:this.source.records.length;if(!this.pageable){if(this.source._source.totalrecords){this.dataview.totalrecords=this.source._source.totalrecords}else{if(this.source._source.totalRecords){this.dataview.totalrecords=this.source._source.totalRecords}else{if(this.source.hierarchy.length!==0){this.dataview.totalrecords=this.source.hierarchy.length}else{this.dataview.totalrecords=this.source.records.length}}}var m=!f?this.dataview.totalrecords:this.source.records.length}if(!b.isArray(p)){d=this.dataview.getid(this.dataview.source.id,p,m);if(this.getColumn(this.dataview.source.id)){p[this.dataview.source.id]=d}}else{var c=new Array();b.each(p,function(e,q){var r=k.dataview.getid(k.dataview.source.id,p[e],m+e);c.push(r);if(k.getColumn(k.dataview.source.id)){p[e][k.dataview.source.id]=r}});d=c}}else{if(!b.isArray(p)){if(this.getColumn(this.dataview.source.id)){p[this.dataview.source.id]=d}}else{b.each(p,function(e,q){var r=d[e];if(k.getColumn(k.dataview.source.id)){p[e][k.dataview.source.id]=r}})}}var i=this.treeGrid?(this.treeGrid.virtualModeCreateRecords?true:false):false;var g=function(v,q,A,t){if(v._loading){throw new Error("jqxDataTable: "+v.loadingErrorMessage);return false}var r=v.vScrollInstance.value;var z=false;if(!b.isArray(A)){A.uid=q;v.rowsByKey[q]=A;if(q==n){n=null}z=v.source.addRecord(A,t,n,i)}else{b.each(A,function(B,C){var D=null;if(q!=null&&q[B]!=null){D=q[B]}this.uid=D;v.rowsByKey[D]=this;if(q==n){n=null}z=v.source.addRecord(this,t,n,i)})}if(v.groups&&v.groups.length>0){var w=Object.prototype.toString;var y=v.groups[0];Object.prototype.toString=(typeof y=="function")?y:function(){return this[y]};if(!v.source.records.sort){var x=new Array();var u=0;var e=0;var s=[];b.each(s,function(){x[e+u++]=this});s=x}v.source.records.sort(function(C,B){if(C===undefined){C=null}if(B===undefined){B=null}if(C===null&&B===null){return 0}if(C===null&&B!==null){return -1}if(C!==null&&B===null){return 1}var F=0;var E=0;if(C&&C.uid){F=C.uid}if(B&&B.uid){E=B.uid}C=C.toString();B=B.toString();if(b.jqx.dataFormat.isNumber(C)&&b.jqx.dataFormat.isNumber(B)){if(CB){return 1}return 0}else{if(b.jqx.dataFormat.isDate(C)&&b.jqx.dataFormat.isDate(B)){if(CB){return 1}return 0}else{if(!b.jqx.dataFormat.isNumber(C)&&!b.jqx.dataFormat.isNumber(B)){C=String(C).toLowerCase();B=String(B).toLowerCase()}}}try{if(CB){return 1}}catch(D){var G=D}if(typeof(F)=="number"){if(FE){return 1}}return 0});Object.prototype.toString=w}v.dataview._filteredData=null;v.dataview._sortData=null;v.dataview._sortHierarchyData=null;if(v._updating==undefined||v._updating==false){v.refresh()}if(v.source&&v.source._knockoutdatasource&&!v._updateFromAdapter&&v.autokoupdates){if(v.source._source._localdata){v.source.suspendKO=true;v.source._source._localdata.push(A);v.source.suspendKO=false}}v.vScrollInstance.setPosition(r);return z};if(this.source.addrow){var h=function(e,q){if(e==true||e==undefined){if(q!=undefined){d=q}g(k,d,p,j)}};try{if(!k.treeGrid){o=this.source.addrow(d,p,j,h)}else{o=this.source.addrow(d,p,j,n,h)}if(o==undefined){o=true}}catch(l){o=false}if(o==false){return false}}else{g(this,d,p,j)}return o}return false},deleteRow:function(c){var d=this._getkey(c);this.deleterowbykey(d)},deleterowbykey:function(g){if(g!=undefined){this._datachanged=true;var h=false;var f=this.that;var d=function(m,l){if(m._loading){throw new Error("jqxDataTable: "+m.loadingErrorMessage);return false}m.dataview._filteredData=null;m.dataview._sortData=null;m.dataview._sortHierarchyData=null;var o=false;var p=m.vScrollInstance.value;if(!b.isArray(l)){var o=false;if(m.rowsByKey[l]){o=true;if(m.rowinfo[l]&&m.rowinfo[l].selected){m.unselectrowbykey(l,false)}if(m.treeGrid){var n=m._names();var k=m.rowsByKey[l][n.parent]}delete m.rowsByKey[l];if(m.treeGrid){if(m.rowinfo[l]){var i=m.rowinfo[l].row.records;var j=function(q){for(var r=0;r0&&v.originalRecord){v.originalRecord[o.columns.records[u].datafield]=t[o.columns.records[u].datafield]}}r=true}};s(n);if(o.treeGrid){n=o.treeGrid.getRow(l);s(n)}}else{b.each(l,function(w,x){var v=o.rowsByKey[this];var u=function(z,y){if(!v){r=false}else{v[this]=t[w]}r=true};u(this,v);if(o.treeGrid){v=o.treeGrid.getRow(this);u(this,v)}})}var m=o.vScrollInstance.value;if(g==undefined||g==true){if(o._updating==undefined||o._updating==false){o._renderrows()}}if(o.showAggregates&&o._updatecolumnsaggregates){o._updatecolumnsaggregates()}if(o.source&&o.source._knockoutdatasource&&!o._updateFromAdapter&&o.autokoupdates){if(o.source._source._localdata){var n=o.rowsByKey[l];var p=o.getrowindex(n);var q=o.source._source._localdata()[p];o.source.suspendKO=true;o.source._source._localdata.replace(q,b.extend({},n));o.source.suspendKO=false}}o.vScrollInstance.setPosition(m);return r};if(this.source.updaterow){var e=function(l){if(l==true||l==undefined){d(f,c,k);if(i){i()}f._renderrows(false);if(f.autoRowHeight){f._updateScrollbars();f._arrange()}}};try{j=this.source.updaterow(c,k,e);if(j==undefined){j=true}}catch(h){j=false}}else{j=d(f,c,k);if(j&&i){i()}f._renderrows(false);if(f.autoRowHeight){f._updateScrollbars();f._arrange()}}return j}return false},lockRow:function(c){var d=this._getkey(c);this.lockrowbykey(d)},unlockRow:function(c){var d=this._getkey(c);this.unlockrowbykey(d)},lockrowbykey:function(c){if(this.rowinfo[c]){this.rowinfo[c].locked=true}else{this.rowinfo[c]={locked:true}}this._renderrows()},unlockrowbykey:function(c){if(this.rowinfo[c]){this.rowinfo[c].locked=false}else{this.rowinfo[c]={locked:false}}this._renderrows()},selectRow:function(c){var d=this._getkey(c);this.selectrowbykey(d)},unselectRow:function(c){var d=this._getkey(c);this.unselectrowbykey(d)},selectrowbykey:function(e,h,f){if(h!="keyboard"&&h!="mouse"){this._lastSelectedKey=e}var g=f!==false?true:false;this._doSelection(e,true,g);var i=this.rowsByKey[e];var d=this.getrowindex(i);var c=this.getrowdisplayindex(i);this._raiseEvent("rowSelect",{key:e,index:c,boundIndex:d,row:this.rowsByKey[e]})},unselectrowbykey:function(e,f){var g=f!==false?true:false;this._doSelection(e,false,g);var h=this.rowsByKey[e];var d=this.getrowindex(h);var c=this.getrowdisplayindex(h);this._raiseEvent("rowUnselect",{key:e,index:c,boundIndex:d,row:this.rowsByKey[e]})},getSelection:function(){var c=new Array();if(this.rowinfo){for(var e in this.rowinfo){var d=this.rowinfo[e];if(d.selected){c.push(d.row)}}}return c},showdetailsbykey:function(k){if(!this.rowDetails){return}var l=this.rowinfo[k];if(l){l.expanded=true;var f=b(this._table.children()[1]).children(("[data-key="+k+"]"));var i=b(this._pinnedTable.children()[1]).children(("[data-key="+k+"]"));if(f){var c=i.children();var h=b(c[0]);if(this.rtl){var h=b(c[c.length-1])}if(!this.rtl){h.removeClass(this.toThemeProperty("jqx-grid-group-collapse"));h.addClass(this.toThemeProperty("jqx-grid-group-expand"));h.removeClass(this.toThemeProperty("jqx-icon-arrow-right"));h.addClass(this.toThemeProperty("jqx-icon-arrow-down"))}else{h.removeClass(this.toThemeProperty("jqx-grid-group-collapse-rtl"));h.addClass(this.toThemeProperty("jqx-grid-group-expand-rtl"));h.removeClass(this.toThemeProperty("jqx-icon-arrow-left"));h.addClass(this.toThemeProperty("jqx-icon-arrow-down"))}f.next().show();var d=i.next();d.show();if(b.jqx.browser.msie&&b.jqx.browser.version<8){f.next().children().show();i.next().children().show()}if(!l.initialized){var j=l.detailsHeight;var m=this.initRowDetails(k,l.row,b(b(d).children().children().children()[0]),l);l.details=b(d).children().children().children()[0];l.initialized=true;if(m===false||l.detailsHeight!=j){if(m===false){l.expanded=false;l.nodetails=true;d.hide()}this._renderrows()}}this._updateScrollbars();if(this.height==="auto"||this.height===null||this.autoheight){this._arrange()}var g=this.getrowindex(l.row);var e=this.getrowdisplayindex(l.row);this._raiseEvent("rowExpand",{row:l.row,index:e,boundIndex:g,rowKey:k})}}},hidedetailsbykey:function(h){if(!this.rowDetails){return}var j=this.rowinfo[h];if(j){j.expanded=false;var d=b(this._table.children()[1]).children(("[data-key="+h+"]"));var e=b(this._pinnedTable.children()[1]).children(("[data-key="+h+"]"));if(d){var g=e.children();var i=b(g[0]);if(this.rtl){var i=b(g[g.length-1])}if(!this.rtl){i.addClass(this.toThemeProperty("jqx-grid-group-collapse"));i.removeClass(this.toThemeProperty("jqx-grid-group-expand"));i.addClass(this.toThemeProperty("jqx-icon-arrow-right"));i.removeClass(this.toThemeProperty("jqx-icon-arrow-down"))}else{i.addClass(this.toThemeProperty("jqx-grid-group-collapse-rtl"));i.removeClass(this.toThemeProperty("jqx-grid-group-expand-rtl"));i.addClass(this.toThemeProperty("jqx-icon-arrow-left"));i.removeClass(this.toThemeProperty("jqx-icon-arrow-down"))}d.next().hide();e.next().hide();if(b.jqx.browser.msie&&b.jqx.browser.version<8){d.next().children().hide();e.next().children().hide()}this._updateScrollbars();if(this.height==="auto"||this.height===null||this.autoheight){this._arrange()}var f=this.getrowindex(j.row);var c=this.getrowdisplayindex(j.row);this._raiseEvent("rowCollapse",{row:j.row,index:c,boundIndex:f,rowKey:h})}}},_getvirtualcolumnsindexes:function(d,l,h,k,c){if(this.rowDetails||this.rtl||this.editcell||(this.width&&this.width.toString().indexOf("%")>=0)||this.exporting){return{start:0,end:h+k}}var e=0;var i=-1;var f=h+k;if(this.autorowheight){return{start:0,end:h+k}}if(!c){for(var g=0;g=d&&i==-1){i=g}if(e>l+d){f=g;break}}}f++;if(f>h+k){f=h+k}if(i==-1){i=0}return{start:i,end:f}},_renderhorizontalscroll:function(){var t=this.hScrollInstance;var u=t.value;if(this.hScrollBar.css("visibility")==="hidden"){t.value=0;u=0}var h=parseInt(u);if(this.table==null){return}var q=this.columnsrow;var r=0;var i=this.columns.records.length-r;var e=this.columns.records;var l=this.source.records.length==0;if(this.rtl){if(this.hScrollBar.css("visibility")!="hidden"){h=t.max-h}}if(l&&!this._haspinned){this.table[0].style.left=-h+"px";q[0].style.marginLeft=-h+"px"}else{if(this._haspinned||this._haspinned==undefined){for(var w=0;w0:false;if(this.columns&&this.columns.records){for(var e=0;e0){if(h==="stringfilter"){j.jqxDropDownList({selectedIndex:2})}else{j.jqxDropDownList({selectedIndex:0})}}}}},applyFilters:function(){if(this.editable){if(this.editKey!=null){var c=this.endroweditbykey(this.editKey)}}this.dataview._filteredData=null;this.dataview._sortData=null;this.dataview._sortHierarchyData=null;if(this.serverProcessing){this.dataview.pagenum=0;this.updateBoundData("filter")}else{this.goToPage(0);this.refresh()}if(arguments&&arguments.length>0){if(this._updateSimpleFilter){if(this.filtercolumnsList){var d=this.filtercolumnsList.jqxDropDownList("getSelectedItem").value;this._updateSimpleFilter(d)}}if(this._updateFilterRow){this._updateFilterRow()}}this._raiseEvent("filter",{filters:this.dataview.filters})},sortBy:function(d,g){this.dataview._filteredData=null;this.dataview._sortData=null;this.dataview._sortHierarchyData=null;if(this._loading){throw new Error("jqxDataTable: "+this.loadingErrorMessage);return false}if(this.editable){if(this.editKey!=null){var c=this.endroweditbykey(this.editKey)}}if(d==null){g=null;d=this.sortcolumn}if(d){var f=this;var e;if(g=="a"||g=="asc"||g=="ascending"||g==true){e=true}else{e=false}if(g!=null){f.sortdirection={ascending:e,descending:!e}}else{f.sortdirection={ascending:false,descending:false}}if(g!=null){f.sortcolumn=d}else{f.sortcolumn=null}if(f.source.sort){f.dataview.sortfield=d;if(g==null){f.dataview.sortfielddirection=""}else{f.dataview.sortfielddirection=e?"asc":"desc"}if(f.source.sort&&!this._loading){f.source.sort(d,g)}}f.dataview.sortBy(d,g);f._raiseEvent("sort",{sortcolumn:this.sortcolumn,sortdirection:this.sortdirection})}if(!this.serverProcessing){this.refresh()}else{this.updateBoundData("sort")}},_togglesort:function(d){var f=this;if(this.disabled){return}if(d.sortable&&f.sortable){var c={sortcolumn:this.sortcolumn,sortdirection:this.sortdirection};var e=null;if(c.sortcolumn!=null&&c.sortcolumn==d.displayfield){e=c.sortdirection.ascending;if(e==true){e=false}else{e=null}}else{e=true}f.sortBy(d.displayfield,e)}},_renderfilter:function(){var h=this;var j=b("
");j.height(22);var o=j.find("input");var g=j.find("div:first");j.addClass(this.toThemeProperty("jqx-rc-all"));j.addClass(this.toThemeProperty("jqx-widget"));j.addClass(this.toThemeProperty("jqx-input-group"));o.addClass(this.toThemeProperty("jqx-input"));o.addClass(this.toThemeProperty("jqx-rc-l"));o.addClass(this.toThemeProperty("jqx-input-group-addon"));o.addClass(this.toThemeProperty("jqx-widget"));o.addClass(this.toThemeProperty("jqx-widget-content"));g.addClass(this.toThemeProperty("jqx-fill-state-normal"));g.addClass(this.toThemeProperty("jqx-rc-r"));g.addClass(this.toThemeProperty("jqx-input-group-addon"));g.find("div").addClass(this.toThemeProperty("jqx-icon-search"));if(this.rtl){o.addClass(this.toThemeProperty("jqx-rtl"));o.css("direction","rtl")}this.filter.children().remove();this.filterbutton=g;var d=new Array();for(var f=0;f"+this.gridlocalization.filtersearchstring+"");this.filter.append(l);var c=b("
");this.filter.append(c);if(c.jqxDropDownList){c.jqxDropDownList({theme:this.theme,enableBrowserBoundsDetection:true,autoDropDownHeight:p,rtl:h.rtl,dropDownWidth:220,selectedIndex:0,width:"auto",height:20,source:d,displayMember:"label",valueMember:"value"})}this.filtercolumnsList=c;var n=function(q){h.filterinput.val("");for(var r=0;r=0){x=x.replace(h.gridlocalization.decimalseparator,".")}}if(x.indexOf(h.gridlocalization.currencysymbol)>=0){x=x.replace(h.gridlocalization.currencysymbol,"")}if(x.indexOf(h.gridlocalization.percentagesymbol)>=0){x=x.replace(h.gridlocalization.percentagesymbol,"")}}var y=A.createfilter(C,x,"EQUAL",null,B.cellsFormat,h.gridlocalization)}else{var y=A.createfilter(C,x,"CONTAINS")}}A.operator=i;A.addfilter(0,y);return A};if(h.filterMode!=="simple"){if(u){var v=u.value;var t=h.getColumn(v);var s=w(t,r,"and");if(r.length>0){h.removeFilter(v);h.addFilter(v,s);h.applyFilters()}else{h.removeFilter(v);h.applyFilters()}if(h.filterMode==="advanced"){if(h._updateFilterRow){h._updateFilterRow(true)}}}}else{h.clearFilters(false,false);if(r.length>0){for(var q=0;q"+this.gridlocalization.filterstring+"");j.append(e);this.addHandler(e,"click",function(q){var i=function(u){if(h.filterrow){for(var x=0;x");k.attr("title",h.gridlocalization.filterclearstring);k.addClass(h.toThemeProperty("jqx-icon-close"));j.append(k);k.hide();h.filtericon=k;k.click(function(){h.clearFilters();h.filtericon.fadeOut(200)});if(h.dataview.filters.length>0){if(h.filterMode!="advanced"){n(h.dataview.filters[0].datafield)}else{if(h._updateFilterRow){h._updateFilterRow()}}}},_renderadvancedfilter:function(){var h=this;var c=function(){h.clearFilters(false,false);var n=h.filtercolumnsList.jqxDropDownList("getSelectedItem").value;var p=h.filterinput.val();for(var m=0;m0||(w.length==0&&k=="NOT_NULL")||(w.length==0&&k=="NOT_EMPTY")||(w.length==0&&k=="EMPTY")||(w.length==0&&k=="NULL")){var s=l.displayfield;var x=new b.jqx.filter();if(q=="numericfilter"){if(h.gridlocalization.decimalseparator==","){if(w.indexOf(h.gridlocalization.decimalseparator)>=0){w=w.replace(h.gridlocalization.decimalseparator,".")}}if(w.indexOf(h.gridlocalization.currencysymbol)>=0){w=w.replace(h.gridlocalization.currencysymbol,"")}if(w.indexOf(h.gridlocalization.percentagesymbol)>=0){w=w.replace(h.gridlocalization.percentagesymbol,"")}}var j=x.createfilter(q,w,k,null,l.cellsFormat,h.gridlocalization);x.addfilter(0,j);h.addFilter(s,x)}}if(h.dataview.filters.length>0){h.applyFilters()}else{h.clearFilters()}if(h.dataview.filters.length==0){h.filtericon.fadeOut(200)}else{h.filtericon.fadeIn(200)}};var e=function(){var m=b("
").appendTo(h.filter);h.filterrow=m;m[0].cells=new Array();m.height(24);m.width(h.table.width());var k=0;var j=h.filtercolumnsList.jqxDropDownList("getSelectedItem").value;var l=h.filterinput.val();b.each(h.columns.records,function(){var p=this;var n=b("
").appendTo(m);n.css("position","absolute");n.css("left",k+parseInt(p.uielement[0].style.left));if(p.pinned){n.css("z-index",h.tableZIndex+h.columns.records.length);n.addClass(h.toThemeProperty("jqx-widget-header"))}m[0].cells.push(n[0]);if(!this.filterable){return true}var o=b("").appendTo(n);o.keydown(function(r){if(r.keyCode===13){c()}});if(p.displayfield===j){o.val(l)}o.addClass(h.toThemeProperty("jqx-input"));o.addClass(h.toThemeProperty("jqx-rc-all"));o.addClass(h.toThemeProperty("jqx-widget"));o.addClass(h.toThemeProperty("jqx-widget-content"));var q=b("
").appendTo(n);q.append(b("
"));o.focus(function(){h.ensureColumnVisible(p.displayfield);h.filter[0].scrollLeft=0;h.ensureColumnVisible(p.displayfield);setTimeout(function(){h.filter[0].scrollLeft=0;h.ensureColumnVisible(p.displayfield)},10)});q.click(function(){var u=b("
");u.insertAfter(q);q.remove();var s=h.getcolumntypebydatafield(p);var t=h._getfiltersbytype(s);var r;if(s==="string"){r=2}else{r=0}u.jqxDropDownList({theme:h.theme,enableBrowserBoundsDetection:true,renderMode:"simple",arrowSize:0,selectedIndex:r,rtl:h.rtl,dropDownWidth:230,dropDownHeight:180,width:20,height:20,source:t,selectionRenderer:function(){return"
"}});h.addHandler(u,"close",function(v){o.focus();setTimeout(function(){o.focus()},10)});u.removeAttr("tabindex");u.find("div").removeAttr("tabindex");u.jqxDropDownList("open")});o[0].style.width=p.width-6-22+"px"});b("
").appendTo(m)};e();var i=b("
").appendTo(h.filter);var f=b("").appendTo(i);var g=b("").appendTo(i);var d=0;f.css("left",d);g.css("left",d);f.css("top","4px");g.css("top","4px");f.jqxButton({theme:h.theme});g.jqxButton({theme:h.theme});g.click(function(){h.filtercolumnsList.jqxDropDownList({disabled:false});h.filterinput.removeClass(h.toThemeProperty("jqx-fill-state-disabled"));h.filterinput.attr("disabled",false);h.filterbutton.removeClass(h.toThemeProperty("jqx-fill-state-disabled"));h.filter.find(".filterrow").addClass("filterrow-hidden");h.filter.find(".filterrow").hide();h._arrange()});f.click(function(){c()});h._renderhorizontalscroll()},_getfiltertype:function(c){var d="stringfilter";switch(c){case"number":case"int":case"float":case"decimal":d="numericfilter";break;case"boolean":case"bool":d="booleanfilter";break;case"date":case"time":d="datefilter";break;case"string":d="stringfilter";break}return d},getcolumntypebydatafield:function(e){var f=this;var d="string";var c=f.source.datafields||((f.source._source)?f.source._source.datafields:null);if(c){var g="";b.each(c,function(){if(this.name==e.displayfield){if(this.type){g=this.type}return false}});if(g){return g}}return d},_getfiltersbytype:function(c){var d=this;var e="";switch(c){case"number":case"float":case"int":e=d.gridlocalization.filternumericcomparisonoperators;break;case"date":e=d.gridlocalization.filterdatecomparisonoperators;break;case"boolean":case"bool":e=d.gridlocalization.filterbooleancomparisonoperators;break;case"string":default:e=d.gridlocalization.filterstringcomparisonoperators;break}return e},_getcellvalue:function(c,e){var d=null;d=e[c.datafield];if(c.displayfield!=null){d=e[c.displayfield]}if(d==null){d=""}return d},_renderrows:function(ap){if(this.editable){if(this.editKey!=null){if(ap!==false){var M=this.endroweditbykey(this.editKey)}}}if(this.treeGrid){this.treeGrid._renderrows();return}if(this._loading){return}if(this._updating){return}if(this.rendering){this.rendering()}var ab=this;var T=0;this.table[0].rows=new Array();var H=this.toTP("jqx-cell")+" "+this.toTP("jqx-widget-content");if(this.rtl){H+=" "+this.toTP("jqx-cell-rtl")}var K=this.columns.records.length;var ao=b.jqx.browser.msie&&b.jqx.browser.version<8;if(ao){this.host.attr("hideFocus","true")}var R=ab.groups.length;var ai=new Array();var k=this.source.records;k=this.dataview.evaluate(k);this.dataViewRecords=k;if(this.dataview.pagesize=="all"||!this.pageable||this.serverProcessing){var u=k;if(this.pageable&&this.serverProcessing&&k.length>this.dataview.pagesize){var u=k.slice(this.dataview.pagesize*this.dataview.pagenum,this.dataview.pagesize*this.dataview.pagenum+this.dataview.pagesize)}}else{var u=k.slice(this.dataview.pagesize*this.dataview.pagenum,this.dataview.pagesize*this.dataview.pagenum+this.dataview.pagesize)}if(ab.groups&&ab.groups.length>0){var P=this.pageable?this.dataview.pagesize*this.dataview.pagenum:0;var z=function(w){var au=0;var i=new Array();for(var c=0;cab.dataview.pagesize*ab.dataview.pagenum&&au<=ab.dataview.pagesize*ab.dataview.pagenum+ab.dataview.pagesize){i.push(j)}if(au>ab.dataview.pagesize*ab.dataview.pagenum+ab.dataview.pagesize){break}}return i};if(this.pageSizeMode==="root"){var v=ab.source.getGroupedRecords(ab.groups,"records","label",null,"data",null,"parent",k,0);ab.rootRecordsLength=v.length;v=z(v)}else{var v=ab.source.getGroupedRecords(ab.groups,"records","label",null,"data",null,"parent",u,P)}var y=function(j,w){for(var av=0;av0){var aw=y(c.records,new Array());for(var au=0;auZ.maxwidth){e=Z.maxwidth}var l=b('
');b(document.body).append(l);var n=l.find("td");aq=1+parseInt(n.css("padding-left"))+parseInt(n.css("padding-right"));l.remove();break}}var ak=this.rtl?" "+this.toTP("jqx-grid-table-rtl"):"";var B="";var ar="
";var I=0;var s=K;for(var al=0;alZ.maxwidth){e=Z.maxwidth}e-=aq;if(e<0){e=0}if(ao){var ac=e;if(al==I){ac++}if(Z.rowDetailscolumn){var ac=ac+4;ar+="";B+=""}else{ar+="";B+=""}}else{ar+="";B+=""}aa+=e}B+="";ar+="";this._hiddencolumns=false;var g=false;if(this.rowDetails&&this._pinnedTable){this._pinnedTable.find("[data-role=details]").detach();this._table.find("[data-role=details]").detach()}if(U===0){var o='';var m=this.host.height();if(this.pageable){m-=this.pagerHeight;if(this.pagerPosition==="both"){m-=this.pagerHeight}}m-=this.columnsHeight;if(this.filterable){var ag=this.filter.find(".filterrow");var D=this.filter.find(".filterrow-hidden");var C=1;if(D.length>0){C=0}m-=this.filterHeight+this.filterHeight*ag.length*C}if(this.showstatusbar){m-=this.statusBarHeight}if(this.showAggregates){m-=this.aggregatesHeight}if(m<25){m=25}if(this.hScrollBar[0].style.visibility!="hidden"){m-=this.hScrollBar.outerHeight()}if(this.height==="auto"||this.height===null||this.autoheight){m=300}var l='";o+=l;B+=o;ar+=o;this.table[0].style.width=aa+2+"px";T=aa}var q=this.getRows();var x=new Array();for(var am=0;am';var E='';if(R>0){if(G.level';var E=''}}var p=0;var S=0;for(var al=0;alae.maxwidth){e=ae.maxwidth}e-=aq;if(e<0){e=0}var H=this.toTP("jqx-cell")+" "+this.toTP("jqx-grid-cell")+" "+this.toTP("jqx-item");if(ae.pinned){H+=" "+this.toTP("jqx-grid-cell-pinned")}if(this.sortcolumn===ae.displayfield){H+=" "+this.toTP("jqx-grid-cell-sort")}if(this.altRows&&am%2!=0){H+=" "+this.toTP("jqx-grid-cell-alt")}if(this.rtl){H+=" "+this.toTP("jqx-cell-rtl")}var O="";if(R>0){if(G.levelat.maxwidth){e=at.maxwidth}A-=aq;if(A<0){A=0}if(!at.hidden){ac+=A}}e=ac}else{H+=" "+this.toTP("jqx-grid-cell-pinned")}}}var l='";af+='" class="'+H+'">';af+=aj;af+="";if(!ae.pinned){o+=l;if(g){E+=af}}else{E+=l;o+=l}if(R>0&&!ao){if(G.level";E+="";B+=o;ar+=E;if(!this.rowinfo[G.uid]){this.rowinfo[G.uid]={group:Y,row:G,details:null,detailsHeight:200,initialized:false,expanded:false}}else{if(!("group" in this.rowinfo[G.uid])){this.rowinfo[G.uid].group=Y}if(!("row" in this.rowinfo[G.uid])){this.rowinfo[G.uid].row=G}if(!("details" in this.rowinfo[G.uid])){this.rowinfo[G.uid].details=null}if(!("detailsHeight" in this.rowinfo[G.uid])){this.rowinfo[G.uid].detailsHeight=200}if(!("initialized" in this.rowinfo[G.uid])){this.rowinfo[G.uid].initialized=false}if(!("expanded" in this.rowinfo[G.uid])){this.rowinfo[G.uid].expanded=false}}if(this.serverProcessing){this.rowinfo[G.uid].row=G}if(this.rowDetails){var F=this.rowinfo[G.uid].detailsHeight;if(this.rowinfo[G.uid]){if(this.rowinfo[G.uid].expanded){var ah='';B+=ah;ar+=ah}}B+="
';l+=this.gridlocalization.emptydatastring;l+="
0){if(G.level0&&ao&&Y&&al>=R){l+="font-size: 1px; border-color: transparent; color: transparent;";af+="font-size: 1px; border-color: transparent; color: transparent;"}if(ae.pinned){l+="pointer-events: auto;";af+="pointer-events: auto;"}if(!Y&&ae.rowDetailscolumn){if(this.rowinfo[G.uid]){if(!this.rowinfo[G.uid].nodetails){if(this.rowinfo[G.uid].expanded){if(!this.rtl){H+=" "+this.toTP("jqx-grid-group-expand")}else{H+=" "+this.toTP("jqx-grid-group-expand-rtl")}H+=" "+this.toTP("jqx-icon-arrow-down")}else{if(!this.rtl){H+=" "+this.toTP("jqx-grid-group-collapse");H+=" "+this.toTP("jqx-icon-arrow-right")}else{H+=" "+this.toTP("jqx-grid-group-collapse-rtl");H+=" "+this.toTP("jqx-icon-arrow-left")}}}}else{if(!this.rtl){H+=" "+this.toTP("jqx-grid-group-collapse");H+=" "+this.toTP("jqx-icon-arrow-right")}else{H+=" "+this.toTP("jqx-grid-group-collapse-rtl");H+=" "+this.toTP("jqx-icon-arrow-left")}}}if(!this.autoRowHeight||(this.autoRowHeight&&!ae.autoCellHeight)){H+=" "+this.toTP("jqx-grid-cell-nowrap ")}var aj=ab._getcellvalue(ae,G);var f=ae.cellsFormat;if(R>0){if(G.level=0||aj.indexOf(" ng-")>=0)){x.push({rowKey:G.uid,row:d,column:ae.datafield,value:aj,columnIndex:al})}}}else{if(this.groupsRenderer){aj=this.groupsRenderer(aj,G,G.level)}}l+='" class="'+H+'">';l+=aj;l+="
";ar+="";if(g){if(ab.WinJS){MSApp.execUnsafeLocalFunction(function(){ab.table.html(ar+B)})}else{ab.table[0].innerHTML=ar+B}var W=this.table.find("#table"+this.element.id);var X=this.table.find("#pinnedtable"+this.element.id);X.css("float","left");X.css("pointer-events","none");W.css("float","left");X[0].style.position="absolute";W[0].style.position="relative";W[0].style.zIndex=V-10;X[0].style.zIndex=V+10;this._table=W;this._table[0].style.left="0px";this._pinnedTable=X;this._pinnedTable[0].style.left="0px";this._pinnedTable[0].style.width=T+"px";this._table[0].style.width=T+"px";if(this.rtl){if(T>parseInt(this.element.style.width)&&this._haspinned){this._pinnedTable[0].style.left=3-T+parseInt(this.element.style.width)+"px"}}if(this.rowDetails){for(var am=0;am0){var an=this._table[0].rows;b.each(x,function(){var w=this.row;var au=this.rowKey;var j=this.column;var i=this.columnIndex;var t=ab._getuirow(au);if(t){var c=t[0].cells[i];if(b.jqx.angularCompile){b.jqx.angularCompile(c,"
"+c.innerHTML+"
")}}})}if(this.rendered){this.rendered()}},getcolumnindex:function(c){var d=this.getColumn(c);var e=this.columns.records.indexOf(d);return e},setcolumnindex:function(e,i,j){var h=this.getColumn(e);if(h.pinned){return}if(h.hidden){return}if(h.checkboxcolumn){return}if(h.grouped){return}var l=this.columns.records.indexOf(h);this.columns.records.splice(l,1);this.columns.records.splice(i,0,h);var f=0;var n=this.headerZIndex;this.columnsrow.children().detach();var k=this.toThemeProperty("jqx-grid-cell");k+=" "+this.toThemeProperty("jqx-grid-cell-pinned");k+=" "+this.toThemeProperty("jqx-item");var m=this;var c=null;if(m.filterrow!=undefined){var c=b(m.filterrow.children()[0])}this.columnsrow[0].cells=[];var g=false;b.each(this.columns.records,function(p,s){var q=this.uielement;m.columnsrow.append(q);if(!m.rtl){q.css("z-index",n--)}else{q.css("z-index",n++)}var o=!m.rtl?250+n-1:250+n+1;if(this.pinned){q.css("z-index",o)}var r=this.width;q.css("left",f);m.columnsrow[0].cells[m.columnsrow[0].cells.length]=q[0];if(this.hidden){g=true}if(!(this.hidden&&this.hideable)){f+=r}});if(this.groupable){var d=this.groups.length;if(d>0){if(l-d>=0){l-=d;i-=d}}}if(this.rowDetails){if(l-1>=0){l--;i--}}if(this.selectionMode=="checkbox"){if(l-1>=0){l--;i--}}var h=this._columns[l];this._columns.splice(l,1);this._columns.splice(i,0,h);this.resize();this._rendercolumnGroups();this._raiseEvent("columnReordered",{dataField:h.datafield,oldIndex:l,newIndex:i})},_pinnedColumnsLength:function(){var c=0;b.each(this.columns.records,function(){if(this.pinned){c++}if(this.grouped){c++}});if(this.rowDetails){c++}if(this.selectionMode=="checkbox"){c++}return c},_handlecolumnsReorder:function(){var g=this;var h=-1;var d=false;if(!g.columnsReorder){return}var f="mousemove.reorder"+this.element.id;var e="mousedown.reorder"+this.element.id;var i="mouseup.reorder"+this.element.id;var c=false;if(this.isTouchDevice()&&this.touchmode!==true){c=true;f=b.jqx.mobile.getTouchEventName("touchmove")+".reorder"+this.element.id;e=b.jqx.mobile.getTouchEventName("touchstart")+".reorder"+this.element.id;i=b.jqx.mobile.getTouchEventName("touchend")+".reorder"+this.element.id}this.removeHandler(b(document),f);this.addHandler(b(document),f,function(x){if(g.resizing){return true}if(g.reordercolumn!=null){var m=parseInt(x.pageX);var u=parseInt(x.pageY);if(c){var t=g.getTouches(x);var p=t[0];if(p!=undefined){m=parseInt(p.pageX);u=parseInt(p.pageY)}}var j=g.host.coord();var w=parseInt(j.left);var k=parseInt(j.top);if(g.dragmousedownoffset==undefined||g.dragmousedownoffset==null){g.dragmousedownoffset={left:0,top:0}}var B=parseInt(m)-parseInt(g.dragmousedownoffset.left);var s=parseInt(u)-parseInt(g.dragmousedownoffset.top);g.reordercolumn.css({left:B+"px",top:s+"px"});d=false;if(m>=w&&m<=w+g.host.width()){if(u>=k&&u<=k+g.host.height()){d=true}}h=-1;if(d){g.reordercolumnicon.removeClass(g.toThemeProperty("jqx-grid-dragcancel-icon"));g.reordercolumnicon.addClass(g.toThemeProperty("jqx-grid-drag-icon"));var n=g.columnsheader.coord();var q=n.top+g.columnsheader.height();if(g.columnsdropline!=null){if(u>=n.top&&u<=q){h=g._handlereordercolumnsdroplines(m);if(g.columnGroups){if(h!=-1){var l=0;l+=g._pinnedColumnsLength();var o=h.index;if(o>=l){var y=g.columns.records[o];if(y!=undefined){var v=g.columns.records.indexOf(g.getColumn(y.datafield));if(y.datafield==null){var v=g.columns.records.indexOf(g.getcolumnbytext(y.text))}var r=b.data(g.reordercolumn[0],"reorderrecord");var A=g.columns.records.indexOf(g.getColumn(r));var z=y;if(A=p){var s=g.columns.records[q];if(s!=undefined){var u=g.columns.records.indexOf(g.getColumn(s.datafield));if(s.datafield==null){var u=g.columns.records.indexOf(g.getcolumnbytext(s.text))}if(g.columnGroups){var r=s;if(xu){g.setcolumnindex(k,u)}}}}}}if(g.columnsdropline!=null){g.columnsdropline.remove();g.columnsdropline=null}}}})},getcolumnbytext:function(d){var c=null;if(this.columns.records){b.each(this.columns.records,function(){if(this.text==d){c=this;return false}})}return c},_handlereordercolumnsdroplines:function(i){var c=this;var h=-1;var e=c._pinnedColumnsLength();var g=parseInt(c.host.coord().left);var d=g+c.host.width();var f=c.vScrollBar.css("visibility")!="hidden"?19:0;if(!c.rtl){f=0}b.each(c.columnsbounds,function(j){if(j>=e){if(this.width==0){return true}if(i<=this.left+this.width/2){if(i>d){c.columnsdropline.fadeOut();return false}c.columnsdropline.css("left",f+parseInt(this.left)+"px");c.columnsdropline.css("top",parseInt(this.top)+"px");c.columnsdropline.height(this.height);c.columnsdropline.fadeIn("slow");h={index:j,position:"before"};return false}else{if(i>=this.left+this.width/2){if(this.left+this.width>d){c.columnsdropline.fadeOut();return false}c.columnsdropline.css("left",f+1+this.left+this.width);c.columnsdropline.css("top",this.top);c.columnsdropline.height(this.height);c.columnsdropline.fadeIn("slow");h={index:j,position:"after"}}}}});return h},_createreordercolumn:function(d,f,i){var h=this;var g=f;if(h.reordercolumn){h.reordercolumn.remove()}if(h.columnsdropline){h.columnsdropline.remove()}h.reordercolumn=b("
");var k=d.clone();h.reordercolumn.css("z-index",999999);k.css("border-width","1px");k.css("opacity","0.4");var j=b(k.find("."+h.toThemeProperty("jqx-grid-column-menubutton")));if(j.length>0){j.css("display","none")}var c=b(k.find(".jqx-icon-close"));if(c.length>0){c.css("display","none")}h.reordercolumnicon=b('
');h.reordercolumnicon.addClass(h.toThemeProperty("jqx-grid-drag-icon"));h.reordercolumn.css("float","left");h.reordercolumn.css("position","absolute");var e=h.host.coord();k.width(d.width()+16);h.reordercolumn.append(k);h.reordercolumn.height(d.height());h.reordercolumn.width(k.width());h.reordercolumn.append(h.reordercolumnicon);b(document.body).append(h.reordercolumn);k.css("margin-left",0);k.css("left",0);k.css("top",0);h.reordercolumn.css("left",g.left+h.dragmousedown.left);h.reordercolumn.css("top",g.top+h.dragmousedown.top);if(i!=undefined&&i){h.columnsdropline=b('
');h.columnsdropline.width(2);h.columnsdropline.addClass(h.toThemeProperty("jqx-grid-group-drag-line"));b(document.body).append(h.columnsdropline)}},_handlecolumnsdragreorder:function(d,g){if(this.reordercolumn){this.reordercolumn.remove()}if(this.columnsdropline){this.columnsdropline.remove()}this.dragmousedown=null;this.dragmousedownoffset=null;this.columndragstarted=false;this.reordercolumn=null;var h=this;var f;var c=false;if(this.isTouchDevice()&&this.touchmode!==true){c=true}var e="mousedown.drag";var f="mousemove.drag";if(c){e=b.jqx.mobile.getTouchEventName("touchstart")+".drag";f=b.jqx.mobile.getTouchEventName("touchmove")+".drag"}else{this.addHandler(g,"dragstart",function(i){return false})}this.addHandler(g,e,function(k){if(false==d.draggable){return true}if(h.resizing){return true}h.__drag=true;var j=k.pageX;var i=k.pageY;if(c){var l=h.getTouches(k);var n=l[0];j=n.pageX;i=n.pageY}h.dragmousedown={left:j,top:i};var m=b(k.target).coord();h.dragmousedownoffset={left:parseInt(j)-parseInt(m.left),top:parseInt(i-m.top)};if(k.preventDefault){k.preventDefault()}return true});this.addHandler(g,f,function(k){if(!d.draggable){return true}if(undefined==d.datafield){return true}if(d.pinned){return true}if(h.resizing){return true}if(h.dragmousedown){var j=k.pageX;var i=k.pageY;if(c){var m=h.getTouches(k);var o=m[0];if(o!=undefined){j=o.pageX;i=o.pageY}}f={left:j,top:i};if(!h.columndragstarted&&h.reordercolumn==null){var l=Math.abs(f.left-h.dragmousedown.left);var n=Math.abs(f.top-h.dragmousedown.top);if(l>3||n>3){h._createreordercolumn(g,f,true);b(document.body).addClass("jqx-disableselect");b.data(h.reordercolumn[0],"reorderrecord",d.datafield)}}}})},getTouches:function(c){return b.jqx.mobile.getTouches(c)},_handlecolumnsResize:function(){var i=this;if(this.columnsResize){var k=false;if(i.isTouchDevice()){k=true}var g="mousemove.resize"+this.element.id;var d="mousedown.resize"+this.element.id;var e="mouseup.resize"+this.element.id;if(k){var g=b.jqx.mobile.getTouchEventName("touchmove")+".resize"+this.element.id;var d=b.jqx.mobile.getTouchEventName("touchstart")+".resize"+this.element.id;var e=b.jqx.mobile.getTouchEventName("touchend")+".resize"+this.element.id}this.removeHandler(b(document),g);this.addHandler(b(document),g,function(n){if(i.resizablecolumn!=null&&!i.disabled&&i.resizing){if(i.resizeline!=null){var s=i.resizablecolumn.columnelement;var p=i.host.coord();var v=parseInt(i.resizestartline.coord().left);var l=v-i._startcolumnwidth;var w=i.resizablecolumn.column.minwidth;if(w=="auto"){w=0}else{w=parseInt(w)}var m=i.resizablecolumn.column.maxwidth;if(m=="auto"){m=0}else{m=parseInt(m)}var q=n.pageX;if(k){var t=b.jqx.mobile.getTouches(n);var r=t[0];q=r.pageX}l+=w;var u=m>0?v+m:0;var o=m==0?true:i._startcolumnwidth+q-v=p.left&&q>=l){if(u!=0&&n.pageX=p.left&&q<=p.left+i.host.width()){i.resizeline.css("left",q);if(k){return false}}}}}}if(!k&&i.resizablecolumn!=null){return false}});this.removeHandler(b(document),d);this.addHandler(b(document),d,function(m){if(i.resizablecolumn!=null&&!i.disabled){var l=i.resizablecolumn.columnelement;if(l.coord().top+l.height()+5m.pageY){i.resizablecolumn=null;return}i._startcolumnwidth=i.resizablecolumn.column.width;i.resizablecolumn.column._width=null;b(document.body).addClass("jqx-disableselect");b(document.body).addClass("jqx-position-reset");i._mouseDownResize=new Date();i.resizing=true;i._resizecolumn=i.resizablecolumn.column;i.resizeline=i.resizeline||b('
');i.resizestartline=i.resizestartline||b('
');i.resizebackground=i.resizebackground||b('
');i.resizebackground.css("opacity",0.01);i.resizebackground.css("cursor","col-resize");i.resizeline.css("cursor","col-resize");i.resizestartline.css("cursor","col-resize");i.resizeline.addClass(i.toThemeProperty("jqx-grid-column-resizeline"));i.resizestartline.addClass(i.toThemeProperty("jqx-grid-column-resizestartline"));b(document.body).append(i.resizeline);b(document.body).append(i.resizestartline);b(document.body).append(i.resizebackground);var n=i.resizablecolumn.columnelement.coord();i.resizebackground.css("left",i.host.coord().left);i.resizebackground.css("top",i.host.coord().top);i.resizebackground.width(i.host.width());i.resizebackground.height(i.host.height());i.resizebackground.css("z-index",999999999);var o=function(q){if(!i.rtl){q.css("left",parseInt(n.left)+i._startcolumnwidth)}else{q.css("left",parseInt(n.left))}var s=0;var t=i.showtoolbar?i.toolbarHeight:0;s+=t;var v=i.showstatusbar?i.statusBarHeight:0;s+=v;var r=i.showAggregates?i.aggregatesHeight:0;s+=r;if(i.pageable&&i.pagerPosition!="bottom"){s+=i.pagerHeight}if(i.filterable){s+=i.filter.height()}var p=0;if(i.pageable&&i.pagerPosition!="top"){p=i.pagerHeight}var u=i.hScrollBar.css("visibility")!="hidden"?i.scrollBarSize:0;q.css("top",parseInt(n.top));q.css("z-index",9999999999);if(i.columnGroups){q.height(i.host.height()+i.resizablecolumn.columnelement.height()-p-s-u-i.columnGroupslevel*i.columnsHeight)}else{q.height(i.host.height()-p-s-u)}q.show("fast")};o(i.resizeline);o(i.resizestartline);i.dragmousedown=null}});var f=function(){b(document.body).removeClass("jqx-disableselect");b(document.body).removeClass("jqx-position-reset");if(!i.resizing){return}i._mouseUpResize=new Date();var t=i._mouseUpResize-i._mouseDownResize;if(t<200){i.resizing=false;if(i._resizecolumn!=null&&i.resizeline!=null&&i.resizeline.css("display")=="block"){i._resizecolumn=null;i.resizeline.hide();i.resizestartline.hide();i.resizebackground.remove()}return}i.resizing=false;if(i.disabled){return}var n=i.host.width();if(i.vScrollBar[0].style.visibility!="hidden"){n-=20}if(n<0){n=0}if(i._resizecolumn!=null&&i.resizeline!=null&&i.resizeline.css("display")=="block"){var u=parseInt(i.resizeline.css("left"));var o=parseInt(i.resizestartline.css("left"));var s=i._startcolumnwidth+u-o;if(i.rtl){var s=i._startcolumnwidth-u+o}var r=i._resizecolumn.width;i._resizecolumn.width=s;if(i._resizecolumn._percentagewidth!=undefined){i._resizecolumn._percentagewidth=(s/n)*100}for(var q=0;q0){k-=parseInt(this.scrollBarSize)+6;c=k}var j="";if(this.columns==undefined||this.columns.records==undefined){return}var i=this;var h=false;b.each(this.columns.records,function(l,m){if(!(this.hidden)){if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){var m=0;var n=i.vScrollBar[0].style.visibility=="hidden"?0:i.scrollBarSize+5;if(i.scrollBarSize==0){n=0}m=parseFloat(this.width)*c/100;if(this._percentagewidth!=undefined){m=parseFloat(this._percentagewidth)*(c)/100}if(mthis.maxwidth&&this.maxwidth!="auto"){m=this.maxwidth}k-=Math.round(m)}else{if(this.width!="auto"&&!this._width){k-=this.width}else{j+=this.text}}}});var f=this.columnsheader.find("#columntable"+this.element.id);if(f.length==0){return}var d=0;var g=f.find(".jqx-grid-column-header");var e=0;b.each(this.columns.records,function(n,q){var m=b(g[n]);var t=false;var s=this.width;var o=this.width;if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){if(this._percentagewidth!=undefined){s=parseFloat(this._percentagewidth)*c/100}else{s=parseFloat(this.width)*c/100}s=Math.round(s);t=true}if(this.width!="auto"&&!this._width&&!t){if(parseInt(m[0].style.width)!=this.width){m.width(this.width)}}else{if(t){if(sthis.maxwidth&&this.maxwidth!="auto"){s=this.maxwidth;this.width=s}if(parseInt(m[0].style.width)!=s){m.width(s);this.width=s}}else{var l=Math.floor(k*(this.text.length/j.length));if(isNaN(l)){l=this.minwidth}var p=(k*(this.text.length/j.length))-l;d+=p;if(d>=1){d-=1;l++}if(d>=0.5&&n==i.columns.records.length-1){l++}if(l<0){var r=b(""+i.escape_HTML(this.text)+"");b(document.body).append(r);l=10+r.width();r.remove()}if(lthis.maxwidth){l=this.maxwidth}this._width="auto";this.width=l;m.width(this.width)}}if(parseInt(m[0].style.left)!=e){m.css("left",e)}if(!(this.hidden)){e+=this.width}this._requirewidthupdate=true;if(o!==this.width){h=true}});this.columnsheader.width(2+e);f.width(this.columnsheader.width());this._resizecolumnGroups();if(h){this._renderrows()}if(this.showAggregates){this._refreshcolumnsaggregates()}},_rendercolumnheaders:function(){var r=this;if(this._updating){return}if(r.columns.records.length>r.headerZIndex){r.headerZIndex=r.columns.records.length+10}this._columnsbydatafield=new Array();this.columnsheader.find("#columntable"+this.element.id).remove();var g=b('
');g[0].cells=new Array();var l=0;var h=0;var s="";var u=this.host.width();var f=u;var w=new Array();var t=new Array();b.each(this.columns.records,function(j,k){if(!(this.hidden)){if(this.width!="auto"&&!this._width){if(this.widththis.maxwidth&&this.maxwidth!="auto"){u-=this.maxwidth}else{if(this.width.toString().indexOf("%")!=-1){var k=0;k=parseFloat(this.width)*f/100;if(kthis.maxwidth&&this.maxwidth!="auto"){k=this.maxwidth}u-=k}else{if(typeof this.width=="string"){this.width=parseInt(this.width)}u-=this.width}}}}else{s+=this.text}}if(this.pinned||this.grouped||this.checkboxcolumn){if(r._haspinned){this.pinned=true}w[w.length]=this}else{t[t.length]=this}});if(!this.rtl){for(var o=0;o=this.columns.records.length-w.length;o--){this.columns.replace(o,w[e++])}for(var m=0;m
');if(r.rtl&&K===0){x[0].style.borderLeftColor="transparent"}if(r.columnGroups){x[0].style.height=n+"px";x[0].style.bottom="0px";if(this.pinned){x[0].style.zIndex=L}}this.uielement=x;this.element=x;if(this.classname!=""&&this.classname){x.addClass(this.classname)}var C=this.width;var D=false;if(this.width===null){this.width="auto"}if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){if(this._percentagewidth!=undefined){C=parseFloat(this._percentagewidth)*f/100}else{C=parseFloat(this.width)*f/100}C=Math.round(C);D=true}if(this.width!="auto"&&!this._width&&!D){if(Cthis.maxwidth&&this.maxwidth!="auto"){C=this.maxwidth}x[0].style.width=parseInt(C)+"px"}else{if(D){if(Cthis.maxwidth&&this.maxwidth!="auto"){C=this.maxwidth}if(this._percentagewidth==undefined||this.width.toString().indexOf("%")!=-1){this._percentagewidth=this.width}x.width(C);this.width=C}else{var H=Math.floor(u*(this.text.length/s.length));var E=(u*(this.text.length/s.length))-H;c+=E;if(c>=1){c-=1;H++}if(c>=0.5&&K==r.columns.records.length-1){H++}if(isNaN(H)){H=this.minwidth}if(H<0){var F=b(""+r.escape_HTML(this.text)+"");b(document.body).append(F);H=10+F.width();F.remove()}if(Hthis.maxwidth){H=this.maxwidth}this._width="auto";this.width=parseInt(H);C=this.width;x.width(this.width)}}if(this.hidden){x.css("display","none")}var k=b(x.children()[0]);g[0].cells[K]=x[0];var p=false;var J=false;var z=this.renderer!=null?this.renderer(r.escape_HTML(this.text),this.align,n):r._rendercolumnheader(r.escape_HTML(this.text),this.align,n,r);if(z==null){z=r._rendercolumnheader(r.escape_HTML(this.text),this.align,n,r)}if(this.renderer!=null){z=b(z)}p=true;if(r.WinJS){MSApp.execUnsafeLocalFunction(function(){k.append(b(z))})}else{if(this.renderer){k.append(b(z))}else{if(z){k[0].innerHTML=z}}}if(z!=null){var B=b('
');k.append(B);var O=B.children();this.sortasc=O[1];this.sortdesc=O[2];this.filtericon=O[0];this.iconscontainer=B;if(r.rtl){B.css("margin-left","0px");B.css("left","0px");b(this.sortasc).css("float","left");b(this.filtericon).css("float","left");b(this.sortdesc).css("float","left")}}g.append(x);if(r.columnsReorder&&this.draggable&&r._handlecolumnsdragreorder){r._handlecolumnsdragreorder(this,x)}var M=this;r.addHandler(x,"click",function(i){if(M.checkboxcolumn){return true}if(r._togglesort){if(!r._loading){r._togglesort(M)}}i.preventDefault()});if(r.columnsResize&&!J){var y=false;var j="mousemove";if(r.isTouchDevice()){y=true;j=b.jqx.mobile.getTouchEventName("touchstart")}r.addHandler(x,j,function(P){if(!M.resizable){r.resizablecolumn=null;return true}var i=parseInt(P.pageX);var R=5;var U=parseInt(x.coord().left);if(r.hasTransform){U=b.jqx.utilities.getOffset(x).left}if(r._handlecolumnsResize){if(y){var Q=b.jqx.mobile.getTouches(P);var T=Q[0];i=T.pageX;R=40;if(i>=U+M.width-R){r.resizablecolumn={columnelement:x,column:M};x.css("cursor","col-resize")}else{x.css("cursor","");r.resizablecolumn=null}return true}var S=M.width;if(r.rtl){S=0}if(i>=U+S-R){if(i<=U+S+R){r.resizablecolumn={columnelement:x,column:M};x.css("cursor","col-resize");return false}else{x.css("cursor","");r.resizablecolumn=null}}else{x.css("cursor","");if(i0){this.columnsheader.width(2+h)}else{this.columnsheader.width(h)}this.columnsrow=g;r.columnsheader.append(g);g.width(h);if(this._handlecolumnsdragdrop){this._handlecolumnsdragdrop()}if(this._handlecolumnsReorder){this._handlecolumnsReorder()}if(this._handlecolumnsResize){this._handlecolumnsResize()}if(this.columnGroups){this._rendercolumnGroups()}},_rendercolumnGroups:function(){if(!this.columnGroups){return}var o=0;for(var l=0;l');var k=b(this._rendercolumnheader(q.text,q.align,this.columnsHeight,this));f.append(k);f[0].style.left=d+"px";if(d===0){f[0].style.borderLeftColor="transparent"}f[0].style.top=p+"px";f[0].style.height=r+"px";f[0].style.width=-1+q.width+"px";e.append(f);q.element=f}}}},_resizecolumnGroups:function(){if(!this.columnGroups){return}for(var d=0;d0){d.removeHandler(c,"mouseenter");d.removeHandler(c,"mouseleave");var e=b(f.filtericon);d.removeHandler(e,"mousedown");d.removeHandler(e,"click");d.removeHandler(c,"click")}},_calculateaggregate:function(k,o,d,h){if(!k.datafield){return null}var e=k.aggregates;if(!e){e=o}if(e){var f=new Array();for(var n=0;n0){r(u[t].records)}}};r(h);h=q}if(this.treeGrid&&this.filterable&&this.dataview.filters.length>0){var p=new Array();for(var n=0;n=g){if(m){if(m[k.datafield].sum!=undefined||m[k.datafield].avg!=undefined){var j=this.source.getAggregatedData([{name:k.datafield,aggregates:e,formatStrings:f}],this.gridlocalization,s,c);if(m[k.datafield].sum!=undefined){m[k.datafield].sum=j[k.datafield].sum}if(m[k.datafield].avg!=undefined){m[k.datafield].avg=j[k.datafield].avg}}}}}return m}else{var m=this.source.getAggregatedData([{name:k.datafield,aggregates:e}],this.gridlocalization,h,c);if(this.treeGrid&&m){if(m[k.datafield].sum!=undefined||m[k.datafield].avg!=undefined){var g=this.source._source.hierarchy&&this.source._source.hierarchy.groupingDataFields?this.source._source.hierarchy.groupingDataFields.length:0;if(g==0||c>=g){var j=this.source.getAggregatedData([{name:k.datafield,aggregates:e}],this.gridlocalization,s,c);if(m[k.datafield].sum!=undefined){m[k.datafield].sum=j[k.datafield].sum}if(m[k.datafield].avg!=undefined){m[k.datafield].avg=j[k.datafield].avg}}}}return m}}}return null},getcolumnaggregateddata:function(d,h,i,e){var f=this.getColumn(d);if(!f){return""}var k=(i==undefined||i==false)?false:i;if(h==null){return""}var c=f.aggregates;f.aggregates=null;var j=this._calculateaggregate(f,h,k,e);var g={};if(j){g=j[d];f.aggregates=c}return g},_updatecolumnaggregates:function(e,h,c){var f=this;if(!h){c.children().remove();c.html("");if(e.aggregatesRenderer){var g={};if(e.aggregates){g=this.getcolumnaggregateddata(e.datafield,e.aggregates)}var d=e.aggregatesRenderer({},e,c,null);c.html(d)}return}c.children().remove();c.html("");if(e.aggregatesRenderer){if(h){var d=e.aggregatesRenderer(h[e.datafield],e,c,this.getcolumnaggregateddata(e.datafield,e.aggregates),"aggregates");c.html(d)}}else{b.each(h,function(){var j=this;for(g in j){var k=b('
');var i=g;i=f._getaggregatename(i);k.html(i+":"+j[g]);if(f.rtl){k.addClass(f.toThemeProperty("jqx-rtl"))}c.append(k)}})}},_getaggregatetype:function(d){switch(d){case"min":case"max":case"count":case"avg":case"product":case"var":case"varp":case"stdev":case"stdevp":case"sum":return d}var c=d;for(var e in d){c=e;break}return c},_getaggregatename:function(d){var c=d;switch(d){case"min":c="Min";break;case"max":c="Max";break;case"count":c="Count";break;case"avg":c="Avg";break;case"product":c="Product";break;case"var":c="Var";break;case"stdevp":c="StDevP";break;case"stdev":c="StDev";break;case"varp":c="VarP";case"sum":c="Sum";break}if(d===c&&typeof(c)!="string"){for(var e in d){c=e;break}}return c},_updatecolumnsaggregates:function(){var g=this.getRows();if(this.dataViewRecords){g=this.dataViewRecords}var c=this.columns.records.length;if(undefined!=this.aggregates[0].cells){for(var f=0;f');var f=0;var m=this.columns.records.length;var l=this.toThemeProperty("jqx-grid-cell");if(this.rtl){l+=" "+this.toThemeProperty("jqx-grid-cell-rtl");f=0;c.css("border-left-width","0px");this.aggregates.css("border-left-color","transparent")}l+=" "+this.toThemeProperty("jqx-grid-cell-pinned");var n=m+10;var o=new Array();this.aggregates[0].cells=o;for(var h=0;hg.maxwidth){d=g.maxwidth}var e=l;if(g.cellsalign){e+=" "+this.toThemeProperty("jqx-"+g.cellsalign+"-align")}var k=b('
');c.append(k);k.css("left",f);if(!this.rtl){k.css("z-index",n--)}else{k.css("z-index",n++);if(h==0){k.css("border-left-width","0px")}}k.width(d);k[0].style.left=f+"px";if(!(g.hidden&&g.hideable)){f+=d}else{k.css("display","none")}o[o.length]=k[0];this._updatecolumnaggregates(g,i,k)}if(b.jqx.browser.msie&&b.jqx.browser.version<8){c.css("z-index",n--)}c.width(parseInt(f)+2);c.height(this.aggregatesHeight);this.aggregates.children().remove();this.aggregates.append(c);this.aggregates.removeClass(this.toThemeProperty("jqx-widget-header"));this.aggregates.addClass(l);this.aggregates.css("border-bottom-color","transparent");this.aggregates.css("border-top-width","1px");if(this.rtl&&this.hScrollBar.css("visibility")!="hidden"){this._renderhorizontalscroll()}},destroy:function(){var h=this;if(h.columns&&h.columns.records){for(var f=0;f0){j.jqxDropDownList("destroy")}}}if(h.filtercolumnsList){h.filtercolumnsList.jqxDropDownList("destroy")}}if(h.pageable){if(h.pagershowrowscombotop&&h.pagershowrowscombotop.jqxDropDownList){h.pagershowrowscombotop.jqxDropDownList("destroy")}if(h.pagershowrowscombobottom&&h.pagershowrowscombobottom.jqxDropDownList){h.pagershowrowscombobottom.jqxDropDownList("destroy")}var l=h.pagerbuttonsbottom.find("a");h.removeHandler(l,"click");h.removeHandler(l,"mouseenter");h.removeHandler(l,"mouseleave");l.remove();var l=h.pagerbuttonstop.find("a");h.removeHandler(l,"click");h.removeHandler(l,"mouseenter");h.removeHandler(l,"mouseleave");l.remove();if(h.pagernexttop){h.pagernexttop.jqxButton("destroy");h.pagerprevioustop.jqxButton("destroy");h.pagernextbottom.jqxButton("destroy");h.pagerpreviousbottom.jqxButton("destroy");h.pagerfirsttop.jqxButton("destroy");h.pagerfirstbottom.jqxButton("destroy");h.pagerlasttop.jqxButton("destroy");h.pagerlastbottom.jqxButton("destroy")}}h._removeHandlers();h.vScrollBar.jqxScrollBar("destroy");h.hScrollBar.jqxScrollBar("destroy");delete h.vScrollBar;delete h.hScrollBar;delete h._mousewheelfunc;b.jqx.utilities.resize(h.host,null,true);h.host.remove()},propertiesChangedHandler:function(c,d,e){if(e.width&&e.height&&Object.keys(e).length==2){c.refresh()}},propertyChangedHandler:function(e,l,d,k){if(this.isInitialized==undefined||this.isInitialized==false){return}if(e.batchUpdate&&e.batchUpdate.width&&e.batchUpdate.height&&Object.keys(e.batchUpdate).length==2){return}if(k!==d){if(l=="filterable"){e._render()}else{if(l==="height"){e.host.height(e.height);e.host.width(e.width);e._updatesize(false,true)}else{if(l==="width"){e.host.height(e.height);e.host.width(e.width);e._updatesize(true,false)}else{if(l==="source"){e.updateBoundData()}else{if(l==="columnGroups"){e._render()}else{if(l==="columns"){e._columns=null;e._render()}else{if(l==="rtl"){e.content.css("left","");e.columns=e._columns;e.vScrollBar.jqxScrollBar({rtl:k});e.hScrollBar.jqxScrollBar({rtl:k});e._render()}else{if(l==="pagerMode"){e.pagerMode=k;e._initpager()}else{if(l=="pageSizeOptions"){e._initpager();var j=false;for(var f=0;f0){c.jqxDropDownList({theme:e.theme})}if(e.filtercolumnsList){e.filtercolumnsList.jqxDropDownList({theme:e.theme})}}e.refresh()}else{e.refresh()}}}}}}}}}}}}}}}}}}},_rendercolumnheader:function(f,g,c,d){var e="4px";if(d.columnGroups){e=(c/2-this._columnheight/2);if(e<0){e=4}e+="px"}else{if(this.columnsHeight!=25){e=(this.columnsHeight/2-this._columnheight/2);if(e<0){e=4}e+="px"}}return'
'+f+"
"}});function a(c,d){this.owner=c;this.datafield=null;this.displayfield=null;this.text="";this.sortable=true;this.editable=true;this.hidden=false;this.hideable=true;this.groupable=true;this.renderer=null;this.cellsRenderer=null;this.columntype=null;this.cellsFormat="";this.align="left";this.cellsalign="left";this.width="auto";this.minwidth=25;this.maxwidth="auto";this.pinned=false;this.visibleindex=-1;this.filterable=true;this.filter=null;this.resizable=true;this.draggable=true;this.initeditor=null;this.createeditor=null;this.destroyeditor=null;this.geteditorvalue=null;this.autoCellHeight=true;this.validation=null;this.classname="";this.cellclassname="";this.aggregates=null;this.aggregatesRenderer=null;this.rendered=null;this.exportable=true;this.nullable=true;this.columngroup=null;this.columntype="textbox";this.getcolumnproperties=function(){return{nullable:this.nullable,sortable:this.sortable,hidden:this.hidden,groupable:this.groupable,width:this.width,align:this.align,editable:this.editable,minwidth:this.minwidth,maxwidth:this.maxwidth,resizable:this.resizable,datafield:this.datafield,text:this.text,exportable:this.exportable,cellsalign:this.cellsalign,pinned:this.pinned,cellsFormat:this.cellsFormat,columntype:this.columntype,classname:this.classname,cellclassname:this.cellclassname,menu:this.menu}},this.setproperty=function(e,f){if(this[e]){var g=this[e];this[e]=f;this.owner._columnPropertyChanged(this,e,f,g)}else{if(this[e.toLowerCase()]){var g=this[e.toLowerCase()];this[e.toLowerCase()]=f;this.owner._columnPropertyChanged(this,e.toLowerCase(),f,g)}}};this._initfields=function(f){if(f!=null){var e=this;if(b.jqx.hasProperty(f,"dataField")){this.datafield=b.jqx.get(f,"dataField")}if(b.jqx.hasProperty(f,"displayField")){this.displayfield=b.jqx.get(f,"displayField")}else{this.displayfield=this.datafield}if(b.jqx.hasProperty(f,"columnType")){this.columntype=b.jqx.get(f,"columnType")}if(b.jqx.hasProperty(f,"validation")){this.validation=b.jqx.get(f,"validation")}if(b.jqx.hasProperty(f,"autoCellHeight")){this.autoCellHeight=b.jqx.get(f,"autoCellHeight")}if(b.jqx.hasProperty(f,"text")){this.text=b.jqx.get(f,"text")}else{this.text=this.displayfield}if(b.jqx.hasProperty(f,"sortable")){this.sortable=b.jqx.get(f,"sortable")}if(b.jqx.hasProperty(f,"hidden")){this.hidden=b.jqx.get(f,"hidden")}if(b.jqx.hasProperty(f,"groupable")){this.groupable=b.jqx.get(f,"groupable")}if(b.jqx.hasProperty(f,"renderer")){this.renderer=b.jqx.get(f,"renderer")}if(b.jqx.hasProperty(f,"align")){this.align=b.jqx.get(f,"align")}if(b.jqx.hasProperty(f,"cellsAlign")){this.cellsalign=b.jqx.get(f,"cellsAlign")}if(b.jqx.hasProperty(f,"cellsFormat")){this.cellsFormat=b.jqx.get(f,"cellsFormat")}if(b.jqx.hasProperty(f,"width")){this.width=b.jqx.get(f,"width")}if(b.jqx.hasProperty(f,"minWidth")){this.minwidth=b.jqx.get(f,"minWidth")}if(b.jqx.hasProperty(f,"maxWidth")){this.maxwidth=b.jqx.get(f,"maxWidth")}if(b.jqx.hasProperty(f,"cellsRenderer")){this.cellsRenderer=b.jqx.get(f,"cellsRenderer")}if(b.jqx.hasProperty(f,"columnType")){this.columntype=b.jqx.get(f,"columnType")}if(b.jqx.hasProperty(f,"pinned")){this.pinned=b.jqx.get(f,"pinned")}if(b.jqx.hasProperty(f,"filterable")){this.filterable=b.jqx.get(f,"filterable")}if(b.jqx.hasProperty(f,"filter")){this.filter=b.jqx.get(f,"filter")}if(b.jqx.hasProperty(f,"resizable")){this.resizable=b.jqx.get(f,"resizable")}if(b.jqx.hasProperty(f,"draggable")){this.draggable=b.jqx.get(f,"draggable")}if(b.jqx.hasProperty(f,"editable")){this.editable=b.jqx.get(f,"editable")}if(b.jqx.hasProperty(f,"initEditor")){this.initeditor=b.jqx.get(f,"initEditor")}if(b.jqx.hasProperty(f,"createEditor")){this.createeditor=b.jqx.get(f,"createEditor")}if(b.jqx.hasProperty(f,"destroyEditor")){this.destroyeditor=b.jqx.get(f,"destroyEditor")}if(b.jqx.hasProperty(f,"getEditorValue")){this.geteditorvalue=b.jqx.get(f,"getEditorValue")}if(b.jqx.hasProperty(f,"className")){this.classname=b.jqx.get(f,"className")}if(b.jqx.hasProperty(f,"cellClassName")){this.cellclassname=b.jqx.get(f,"cellClassName")}if(b.jqx.hasProperty(f,"aggregates")){this.aggregates=b.jqx.get(f,"aggregates")}if(b.jqx.hasProperty(f,"aggregatesRenderer")){this.aggregatesRenderer=b.jqx.get(f,"aggregatesRenderer")}if(b.jqx.hasProperty(f,"rendered")){this.rendered=b.jqx.get(f,"rendered")}if(b.jqx.hasProperty(f,"exportable")){this.exportable=b.jqx.get(f,"exportable")}if(b.jqx.hasProperty(f,"nullable")){this.nullable=b.jqx.get(f,"nullable")}if(b.jqx.hasProperty(f,"columnGroup")){this.columngroup=b.jqx.get(f,"columnGroup")}if(!f instanceof String&&!(typeof f=="string")){for(var g in f){if(!e.hasOwnProperty(g)){if(!e.hasOwnProperty(g.toLowerCase())){c.host.remove();throw new Error("jqxDataTable: Invalid property name - "+g+".")}}}}}};this._initfields(d);return this}b.jqx.dataCollection=function(c){this.records=new Array();this.owner=c;this.updating=false;this.beginUpdate=function(){this.updating=true};this.resumeupdate=function(){this.updating=false};this.clear=function(){this.records=new Array()};this.replace=function(e,d){this.records[e]=d};this.isempty=function(d){if(this.records[d]==undefined){return true}return false};this.initialize=function(d){if(d<1){d=1}this.records[d-1]=-1};this.length=function(){return this.records.length};this.indexOf=function(d){return this.records.indexOf(d)};this.add=function(d){if(d==null){return false}this.records[this.records.length]=d;return true};this.insertAt=function(e,d){if(e==null||e==undefined){return false}if(d==null){return false}if(e>=0){if(e0){for(var s=0;sc){return 1}return 0;case"date":case"time":if(dc){return 1}return 0;case"string":case"text":d=String(d).toLowerCase();c=String(c).toLowerCase();break}}else{if(b.jqx.dataFormat.isNumber(d)&&b.jqx.dataFormat.isNumber(c)){if(dc){return 1}return 0}else{if(b.jqx.dataFormat.isDate(d)&&b.jqx.dataFormat.isDate(c)){if(dc){return 1}return 0}else{if(!b.jqx.dataFormat.isNumber(d)&&!b.jqx.dataFormat.isNumber(c)){d=String(d).toLowerCase();c=String(c).toLowerCase()}}}}}try{if(dc){return 1}}catch(e){var g=e}return 0};this._equals=function(d,c){return(this._compare(d,c)===0)};this.evaluate=function(p){if(this.grid.serverProcessing){if(p){if(this.grid.source._source.id==""||this.grid.source._source.id==null){if(this.grid.pageable){var c=this.grid.pageSize*this.pagenum;this.grid.rowsByKey=new Array();var h=this;b.each(p,function(i){this.uid=c;h.grid.rowsByKey[this.uid]=this;c++})}}}return p}var d=new Array();if(this.filters.length){var j=new Array();var o=function(s,w){for(var u=0;u0)){var n=new Array();var k=function(r,s){for(var q=0;q0){k(t,t.records)}}};k(null,p);o.call(this,n,d);for(var e=0;e0)){var h=this;var l=new Array();this._sortData=null;var f=function(t,q){h._sortData=null;var r=null;if(h.source.hierarchy.groupingDataFields){if(q&&q.length>0&&q[0].level0){return b(j,d).text()}if(this.rows&&j!=""&&j!=undefined&&this.rows.length>0){var h=this.rows[this.rows.length-1][j];if(h==null){h=null}for(var f=1;f<=100;f++){var g=this.grid.rowsByKey[f+h];if(!g){if(this.grid&&this.grid.treeGrid&&this.grid.treeGrid.virtualModeCreateRecords){var g=this.grid.rowsByKey["jqx"+h+f];if(g){continue}return"jqx"+h+f}return h+f}}}if(j!=undefined){if(j.toString().length>0){var c=b(d).attr(j);if(c!=null&&c.toString().length>0){if(this.grid&&this.grid.treeGrid&&this.grid.treeGrid.virtualModeCreateRecords){return"jqx"+c}return c}}}if(this.rows&&this.rows.length>0){var g=this.grid.rowsByKey[e];if(g){var h=this.rows[this.rows.length-1][j];if(h==null){h=""}for(var f=1;f<=1000;f++){var g=this.grid.rowsByKey[f+h];if(!g){if(this.grid&&this.grid.treeGrid&&this.grid.treeGrid.virtualModeCreateRecords){var g=this.grid.rowsByKey["jqx"+h+f];if(g){continue}return"jqx"+h+f}return h+f}}}}if(this.grid&&this.grid.treeGrid&&this.grid.treeGrid.virtualModeCreateRecords){var g=this.grid.rowsByKey["jqx"+e];if(!g){return"jqx"+e}else{for(var f=e+1;f<=100;f++){var g=this.grid.rowsByKey["jqx"+f];if(!g){var g=this.grid.rowsByKey["jqx"+f];if(g){continue}return"jqx"+f}}}}return e};this.generatekey=function(){var c=function(){return(((1+Math.random())*16)|0)};return(""+c()+c()+"-"+c()+"-"+c())};return this}})(jqxBaseFramework); -(function(a){a.jqx.jqxWidget("jqxDateTimeInput","",{});a.extend(a.jqx._jqxDateTimeInput.prototype,{defineInstance:function(){var b={value:a.jqx._jqxDateTimeInput.getDateTime(new Date()),minDate:a.jqx._jqxDateTimeInput.getDateTime(new Date()),maxDate:a.jqx._jqxDateTimeInput.getDateTime(new Date()),min:new Date(1900,0,1),max:new Date(2100,0,1),rowHeaderWidth:25,enableViews:true,views:["month","year","decade"],selectableDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],change:null,changing:null,titleFormat:["MMMM yyyy","yyyy","yyyy","yyyy"],template:"default",columnHeaderHeight:20,titleHeight:30,firstDayOfWeek:0,showWeekNumbers:false,showTimeButton:false,cookies:false,cookieoptions:null,showFooter:false,formatString:"dd/MM/yyyy",width:200,height:25,dayNameFormat:"firstTwoLetters",textAlign:"left",readonly:false,culture:"default",activeEditor:null,showCalendarButton:true,openDelay:250,closeDelay:300,closeCalendarAfterSelection:true,isEditing:false,enableBrowserBoundsDetection:false,dropDownHorizontalAlignment:"left",dropDownVerticalAlignment:"bottom",enableAbsoluteSelection:false,disabled:false,buttonSize:21,animationType:"slide",dropDownWidth:"200px",restrictedDates:new Array(),dropDownHeight:"205px",dropDownContainer:"default",selectionMode:"default",renderMode:"full",rtl:false,timeRange:null,_editor:false,todayString:"Today",clearString:"Clear",popupZIndex:2000,allowNullDate:true,changeType:null,placeHolder:"",enableHover:true,hint:true,allowKeyboardDelete:true,yearCutoff:null,editMode:"default",localization:{backString:"Back",forwardString:"Forward",todayString:"Today",clearString:"Clear",calendar:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss",ISO:"yyyy-MM-dd hh:mm:ss"}}},events:["valueChanged","textchanged","mousedown","mouseup","keydown","keyup","keypress","open","close","change"],aria:{"aria-valuenow":{name:"getDate",type:"date"},"aria-valuetext":{name:"getText",type:"string"},"aria-valuemin":{name:"min",type:"date"},"aria-valuemax":{name:"max",type:"date"},"aria-disabled":{name:"disabled",type:"boolean"}}};if(this===a.jqx._jqxDateTimeInput.prototype){return b}a.extend(true,this,b);this.value._setHours(0);this.value._setMinutes(0);this.value._setSeconds(0);this.value._setMilliseconds(0);this.minDate._setYear(1900);this.minDate._setMonth(1);this.minDate._setDay(1);this.minDate._setHours(1);this.minDate._setMinutes(1);this.minDate._setSeconds(1);this.minDate._setMilliseconds(1);this.maxDate._setYear(2100);this.maxDate._setMonth(1);this.maxDate._setDay(1);this.maxDate._setHours(1);this.maxDate._setMinutes(1);this.maxDate._setSeconds(1);this.maxDate._setMilliseconds(1);this.defaultMinDate=this.minDate;this.defaultMaxDate=this.maxDate;return b},createInstance:function(d){var m="";var k=this;if(!k.host.jqxCalendar){throw new Error("jqxDateTimeInput: Missing reference to jqxcalendar.js.")}if(k.isMaterialized()){var z=window.getComputedStyle(this.element);var t=z.getPropertyValue("--jqx-dropdown-animation");var q=z.getPropertyValue("--jqx-datetimeinput-dropdown-width")||280;var l=z.getPropertyValue("--jqx-datetimeinput-dropdown-height")||280;if(t&&this.animationType=="default"){this.animationType=t.trim()}if(q){this.dropDownWidth=q}if(l){this.dropDownHeight=l}}if(k.formatString!="dd/MM/yyyy"){var g=k.formatString.split(" ");if(g&&g.length>1){var c="";for(var s=0;s",j);f[0].style.cssText=k.field.style.cssText;if(!k.width){k.width=a(k.field).width()}if(!k.height){k.height=a(k.field).outerHeight()}a(k.field).hide().after(f);var x=k.host.data();k.host=f;k.host.data(x);k.element=f[0];k.element.id=k.field.id;k.field.id=j.id;if(k._className){k.host.addClass(k._className);a(k.field).removeClass(k._className)}if(k.field.tabIndex){var e=k.field.tabIndex;k.field.tabIndex=-1;k.element.tabIndex=e}}if(k.host.attr("value")){m=true;var y=k.host.attr("value");if(k.selectionMode!="range"){var u=new Date(y);if(u!=undefined&&!isNaN(u)){k.value=a.jqx._jqxDateTimeInput.getDateTime(u)}}}if(k.value!=null&&k.value instanceof Date){k.value=a.jqx._jqxDateTimeInput.getDateTime(k.value)}else{if(k.value!=null&&typeof(k.value)=="string"){var u=new Date(k.value);if(u!=undefined&&!isNaN(u)){k.value=a.jqx._jqxDateTimeInput.getDateTime(u)}else{if(k.value.indexOf(",")>=0){k.value=k.value.replace(/\,/g,"/");var u=new Date(k.value);if(u!=undefined&&!isNaN(u)){k.value=a.jqx._jqxDateTimeInput.getDateTime(u)}}}}}this._initTimeRange();this._validateTimeRange();k.host.attr("data-role","input");k.render();a.jqx.aria(this);if(k.getDate()!=null){a.jqx.aria(this,"aria-label","Current focused date is "+k.getDate().toLocaleString())}else{a.jqx.aria(this,"aria-label","Current focused date is Null")}if(k.minDate!==k.defaultMinDate){k.min=k.minDate}if(k.maxDate!==k.defaultMaxDate){k.max=k.maxDate}k.setMaxDate(k.max,false);k.setMinDate(k.min,false);if(k.selectionMode!=="range"&&k.value&&k.value.dateTime&&k.min&&k.max&&(k.value.dateTimek.max)){if(k.value.dateTimek.max){k.value.dateTime=k.max}k._updateText()}if(k.selectionMode=="range"){if(m){var y=k.host.attr("value");var w=y.substring(0,y.indexOf("-"));var v=y.substring(y.indexOf("-")+1);var p=new Date(w);var b=new Date(v);if(p!=undefined&&!isNaN(p)){if(b!=undefined&&!isNaN(b)){k.setRange(p,b)}}}else{if(k.getDate()!=null){k.setRange(k.getDate(),k.getDate())}}}k._getMask();if(k.editMode==="full"&&k.value===null&&k._mask[0]!==undefined){k.dateTimeInput[0].value=k._mask[0]}},_validateTimeRange:function(){if(this.timeRange){var b=this.value.dateTime.getHours();var c=this.value.dateTime.getMinutes();if(b<=this.timeRange.minHour){this.value._setHours(this.timeRange.minHour);if(c=this.timeRange.maxHour){this.value._setHours(this.timeRange.maxHour);if(c>this.timeRange.maxMinute){this.value._setMinutes(this.timeRange.maxMinute);this._updateEditorsValue()}else{this._updateEditorsValue()}}}},_initTimeRange:function(){if(this.timeRange){if(this.timeRange.min){var c=null;if(this.timeRange.min.indexOf("AM")>=0||this.timeRange.min.indexOf("PM")>=0){c=this.timeRange.min.indexOf("AM")>=0?"AM":"PM"}var d=this.timeRange.min.split(":");var b=parseInt(d[0]);var f=parseInt(d[1]);if(c){this.timeRange.minDefaultHour=b;this.timeRange.minMeridian=c}if(c&&c=="PM"){b+=12}this.timeRange.minHour=b;this.timeRange.minMinute=f}if(this.timeRange.max){var c=null;if(this.timeRange.max.indexOf("AM")>=0||this.timeRange.max.indexOf("PM")>=0){c=this.timeRange.max.indexOf("AM")>=0?"AM":"PM"}var e=this.timeRange.max.split(":");var b=parseInt(e[0]);var f=parseInt(e[1]);if(c){this.timeRange.maxDefaultHour=b;this.timeRange.maxMeridian=c}if(c&&c=="PM"){b+=12}this.timeRange.maxHour=b;this.timeRange.maxMinute=f}}},_format:function(d,e,b){var f=false;try{if(window.Globalize!=undefined){f=true}if(document.Globalize){window.Globalize=document.Globalize;f=true}}catch(c){if(document.Globalize){window.Globalize=document.Globalize;f=true}}if(document.Globalize){window.Globalize=document.Globalize;f=true}if(a.global){return a.global.format(d,e,this.culture)}else{if(f){try{var e=window.Globalize.format(d,e,this.culture);return e}catch(c){return window.Globalize.format(d,e)}}else{if(a.jqx.dataFormat){if(d instanceof Date){return a.jqx.dataFormat.formatdate(d,e,this.localization.calendar)}else{if(typeof d==="number"){return a.jqx.dataFormat.formatnumber(d,e,this.localization.calendar)}else{return a.jqx.dataFormat.formatdate(d,e,this.localization.calendar)}}}else{throw new Error("jqxDateTimeInput: Missing reference to globalize.js.")}}}},render:function(){var k=this;k._removeHandlers();k.element.innerHTML="";k.host.attr({role:"textbox"});k.id=a.jqx.utilities.createId();var f=a.jqx.utilities.createId();var j=a.jqx.utilities.createId();k._setSize();if(k.width==null){k.width=k.host.width();k.host.width(k.width)}k.touch=a.jqx.mobile.isTouchDevice();var c=a("
").appendTo(k.host);k.dateTimeInput=a("").appendTo(c);k.dateTimeInput.addClass(k.toThemeProperty("jqx-reset"));k.dateTimeInput.addClass(k.toThemeProperty("jqx-clear"));k.dateTimeInput.addClass(k.toThemeProperty("jqx-input-content"));k.dateTimeInput.addClass(k.toThemeProperty("jqx-widget-content"));k.dateTimeInput.addClass(k.toThemeProperty("jqx-rc-all"));if(!k.isMaterialized()){k.dateTimeInput.attr("placeHolder",k.placeHolder)}if(k.renderMode!="full"){k.dateTimeInput.remove()}var d=k.host.attr("name");if(d){k.dateTimeInput.attr("name",d)}if(k.host.attr("tabindex")){k.dateTimeInput.attr("tabindex",k.host.attr("tabindex"));k.host.removeAttr("tabindex")}if(k.rtl){k.dateTimeInput.css("direction","rtl");k.dateTimeInput.addClass("jqx-rtl")}k.calendarButton=a("
").appendTo(c);if(!k.rtl){k.calendarButton.addClass(k.toThemeProperty("jqx-action-button"))}else{k.calendarButton.addClass(k.toThemeProperty("jqx-action-button-rtl"))}k.calendarButtonIcon=a(k.calendarButton.children()[0]);k.calendarButtonIcon.addClass(k.toThemeProperty("jqx-icon"));k.calendarButtonIcon.addClass(k.toThemeProperty("jqx-icon-calendar"));k.calendarButton.addClass(k.toThemeProperty("jqx-fill-state-normal"));if(!k.rtl){if(!k.showTimeButton){k.calendarButton.addClass(k.toThemeProperty("jqx-rc-r"))}}else{k.calendarButton.addClass(k.toThemeProperty("jqx-rc-l"))}k.timeButton=a("
").appendTo(c);if(!k.rtl){k.timeButton.addClass(k.toThemeProperty("jqx-action-button"))}else{k.timeButton.addClass(k.toThemeProperty("jqx-action-button-rtl"))}k.timeButtonIcon=a(k.timeButton.children()[0]);k.timeButtonIcon.addClass(k.toThemeProperty("jqx-icon"));k.timeButtonIcon.addClass(k.toThemeProperty("jqx-icon-time"));k.timeButton.addClass(k.toThemeProperty("jqx-fill-state-normal"));if(!k.rtl){k.timeButton.addClass(k.toThemeProperty("jqx-rc-r"))}else{k.timeButton.addClass(k.toThemeProperty("jqx-rc-l"))}var m=this;k._arrange();if(a.jqx._jqxCalendar!=null&&a.jqx._jqxCalendar!=undefined){try{var i="calendar"+k.id;var h=a(a.find("#"+i));if(h.length>0){h.remove()}a.jqx.aria(this,"aria-owns",i);a.jqx.aria(this,"aria-haspopup",true);a.jqx.aria(this,"aria-readonly",k.selectionMode=="range"?true:false);var b=a("
");if(a.jqx.utilities.getBrowser().browser=="opera"){b.hide()}b.addClass(k.toThemeProperty("jqx-calendar-container"));if(k.dropDownContainer=="element"){b.appendTo(k.host)}else{b.appendTo(document.body)}k.container=b;k.calendarContainer=a(a.find("#innerCalendar"+k.id)).jqxCalendar({titleFormat:this.titleFormat,restrictedDates:this.restrictedDates,changing:k.changing,change:k.change,enableViews:k.enableViews,selectableDays:k.selectableDays,views:k.views,rowHeaderWidth:k.rowHeaderWidth,titleHeight:k.titleHeight,columnHeaderHeight:k.columnHeaderHeight,_checkForHiddenParent:false,enableAutoNavigation:false,canRender:false,localization:k.localization,todayString:k.todayString,clearString:k.clearString,dayNameFormat:k.dayNameFormat,rtl:k.rtl,culture:k.culture,showFooter:k.showFooter,selectionMode:k.selectionMode,firstDayOfWeek:k.firstDayOfWeek,showWeekNumbers:k.showWeekNumbers,width:k.dropDownWidth,height:k.dropDownHeight,theme:k.theme});if(k.dropDownContainer=="element"){k.calendarContainer.css({position:"absolute",top:0,left:0})}else{k.calendarContainer.css({position:"absolute",zIndex:k.popupZIndex,top:0,left:0})}k.calendarContainer.addClass(k.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){k.calendarContainer.addClass(k.toThemeProperty("jqx-noshadow"))}k.timeContainer=a(a.find("#innerTime"+k.id));k.timeContainer.css({position:"absolute",zIndex:k.popupZIndex,top:0,left:0});k.timeContainer.addClass(k.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){k.timeContainer.addClass(k.toThemeProperty("jqx-noshadow"))}k._calendar=a.data(k.calendarContainer[0],"jqxCalendar").instance;var m=this;k._calendar.today=function(){m.today()};k._calendar.clear=function(){m.clear()};if(a.jqx.utilities.getBrowser().browser=="opera"){b.show()}b.height(parseInt(k.calendarContainer.height())+25);b.width(parseInt(k.calendarContainer.width())+25);if(k.selectionMode=="range"){k.readonly=true}if(k.animationType=="none"){k.container.css("display","none")}else{k.container.hide()}}catch(l){}}if(a.global){a.global.preferCulture(k.culture)}k.selectedText="";k._addHandlers();k.self=this;k.oldValue=k.getDate();k.items=new Array();k.editors=new Array();k._loadItems();k.editorText="";if(k.readonly==true){k.dateTimeInput.css("readonly",k.readonly)}k.dateTimeInput.css("text-align",k.textAlign);k.host.addClass(k.toThemeProperty("jqx-widget"));k.host.addClass(k.toThemeProperty("jqx-datetimeinput"));k.host.addClass(k.toThemeProperty("jqx-input"));k.host.addClass(k.toThemeProperty("jqx-overflow-hidden"));k.host.addClass(k.toThemeProperty("jqx-rc-all"));k.host.addClass(k.toThemeProperty("jqx-reset"));k.host.addClass(k.toThemeProperty("jqx-clear"));k.host.addClass(k.toThemeProperty("jqx-widget-content"));k.propertyChangeMap.disabled=function(e,p,o,q){if(q){e.host.addClass(m.toThemeProperty("jqx-input-disabled"));e.host.addClass(m.toThemeProperty("jqx-fill-state-disabled"))}else{e.host.removeClass(m.toThemeProperty("jqx-fill-state-disabled"));e.host.removeClass(m.toThemeProperty("jqx-input-disabled"))}a.jqx.aria(e,"aria-disabled",q)};if(k.disabled){k.host.addClass(k.toThemeProperty("jqx-input-disabled"));k.host.addClass(k.toThemeProperty("jqx-fill-state-disabled"));k.dateTimeInput.attr("disabled",true)}if(k.host.parents("form").length>0){k.addHandler(k.host.parents("form"),"reset",function(){setTimeout(function(){m.setDate(new Date())},10)})}if(k.cookies){var g=a.jqx.cookie.cookie("jqxDateTimeInput"+k.element.id);if(g!=null){k.setDate(new Date(g))}}if(a.jqx.browser.msie&&a.jqx.browser.version<8){if(k.host.parents(".jqx-window").length>0){var n=k.host.parents(".jqx-window").css("z-index");k.container.css("z-index",n+10);k.calendarContainer.css("z-index",n+10)}}if(k.culture!="default"){k._applyCulture()}if(k.value){if(k.calendarContainer.jqxCalendar("_isDisabled",k.value.dateTime)){k.dateTimeInput.addClass(k.toThemeProperty("jqx-input-invalid"))}else{k.dateTimeInput.removeClass(k.toThemeProperty("jqx-input-invalid"))}}this._addBarAndLabel(this.dateTimeInput);this._updateHint(true);if(k.template){k.bar.addClass(k.toThemeProperty("jqx-"+k.template));k.label.addClass(k.toThemeProperty("jqx-"+k.template));k.timeButton.addClass(k.toThemeProperty("jqx-"+k.template));k.calendarButton.addClass(k.toThemeProperty("jqx-"+k.template))}this._setSize();this._arrange()},val:function(c){var b=this;if(arguments.length!=0){if(c==null){b.setDate(null)}if(b.selectionMode=="range"){b.setRange(arguments[0],arguments[1]);return b.getText()}if(c instanceof Date){b.setDate(c)}if(typeof(c)=="string"){if(c=="date"){return b.getDate()}b.setDate(c)}if(b._calendar.getDate()!=b.getDate()){b._calendar.setDate(b.getDate())}}return b.getText()},_setSize:function(){var b=window.getComputedStyle(this.element);var c=parseInt(b.borderLeftWidth)*2;var h=b.boxSizing;if(this.element.offsetWidth===0){c=2}if(h==="border-box"||isNaN(c)){c=0}if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.element.style.width=parseInt(this.width)-c+"px"}else{if(this.width!=undefined&&!isNaN(this.width)){this.element.style.width=parseInt(this.width)-c+"px"}}if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.element.style.height=parseInt(this.height)-c+"px"}else{if(this.height!=undefined&&!isNaN(this.height)){this.element.style.height=parseInt(this.height)-c+"px"}}var g=false;if(this.width!=null&&this.width.toString().indexOf("%")!=-1){g=true;this.host.width(this.width);if(c>0){this.host.css("box-sizing","border-box")}}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){g=true;this.host.height(this.height)}var e=this;var f=function(){if(e.calendarContainer){e._arrange()}};if(g){if(this.calendarContainer){this._arrange();var d=this.host.width();if(this.dropDownWidth!="auto"){d=this.dropDownWidth}this.calendarContainer.jqxCalendar({width:d});this.container.width(parseInt(d)+25)}}a.jqx.utilities.resize(this.host,function(){f()})},_arrange:function(){if(this.height==null){this.height=27;this.host.height(27)}var e=parseInt(this.host.width());var m=parseInt(this.host.height());var i=window.getComputedStyle(this.element);var g=parseInt(i.borderLeftWidth)*2;var f=i.boxSizing;if(f==="border-box"||isNaN(g)){g=0}var k=this.buttonSize;var h=2;if(!this.showCalendarButton&&!this.showTimeButton){k=0;var l=0;this.calendarButton.hide();h=0}if(!this.showCalendarButton){this.calendarButton.hide()}else{this.calendarButton.show()}if(!this.showTimeButton){this.timeButton.hide()}else{this.timeButton.show()}var b=e-k-1*h;if(this.showTimeButton&&this.showCalendarButton){var b=e-2*k-1*h}else{if(this.showTimeButton||this.showCalendarButton){var b=e-k-1*h}}if(b>0){this.dateTimeInput[0].style.width=b+"px"}if(this.rtl){this.dateTimeInput[0].style.width=(-1+b+"px")}this.dateTimeInput[0].style.left="0px";this.dateTimeInput[0].style.top="0px";this.calendarButton[0].style.width=k+1+"px";this.calendarButton[0].style.left=1+b+"px";this.timeButton[0].style.width=k+1+"px";if(this.showCalendarButton){this.timeButton[0].style.left=1+this.calendarButton.width()+b+"px"}else{this.timeButton[0].style.left=1+b+"px"}if(this.renderMode!="full"){this.calendarButton[0].style.width="100%";this.calendarButton[0].style.left="0px";this.calendarButton.css("border","none");this.timeButton[0].style.width="100%";this.timeButton[0].style.left="0px";this.timeButton.css("border","none")}var d=this.dateTimeInput.height();if(d==0&&this.renderMode!="full"){d=parseInt(this.dateTimeInput.css("font-size"))+3;this.calendarButton.addClass(this.toThemeProperty("jqx-rc-all"));this.timeButton.addClass(this.toThemeProperty("jqx-rc-all"))}else{d=17}if(this.dateTimeInput[0].className.indexOf("jqx-rc-all")==-1){this.dateTimeInput.addClass(this.toThemeProperty("jqx-rc-all"))}var j=parseInt(m)/2-parseInt(d)/2;if(j>0){var n=this.dateTimeInput.css("font-size");if(""==n){n=13}var j=m-2-parseInt(n)-2;if(isNaN(j)){j=0}if(j<0){j=0}var c=j/2;if(a.jqx.browser.msie&&a.jqx.browser.version<8){c=j/4}this.dateTimeInput[0].style.paddingTop=Math.round(c)+"px";this.dateTimeInput[0].style.paddingBottom=Math.round(c)+"px"}if(this.rtl){this.calendarButton[0].style.width=k+"px";this.timeButton[0].style.width=k+"px";this.calendarButton.css("left","0px");if(this.showCalendarButton){this.timeButton.css("left",k+"px")}else{this.timeButton.css("left","0px")}this.dateTimeInput.css("left",this.calendarButton.width());if(this.showTimeButton&&this.showCalendarButton){this.dateTimeInput.css("left",this.timeButton.width()+this.calendarButton.width())}if(a.jqx.browser.msie&&a.jqx.browser.version<=8){this.dateTimeInput.css("left",1+this.calendarButton.width());if(this.showTimeButton&&this.showCalendarButton){this.dateTimeInput.css("left",1+this.timeButton.width()+this.calendarButton.width())}}}},_removeHandlers:function(){var b=this;this.removeHandler(a(document),"mousedown."+this.id);if(this.dateTimeInput){this.removeHandler(this.dateTimeInput,"keydown."+this.id);this.removeHandler(this.dateTimeInput,"blur");this.removeHandler(this.dateTimeInput,"focus");this.removeHandler(this.host,"focus");this.removeHandler(this.dateTimeInput,"mousedown");this.removeHandler(this.dateTimeInput,"mouseup");this.removeHandler(this.dateTimeInput,"keydown");this.removeHandler(this.dateTimeInput,"keyup");this.removeHandler(this.dateTimeInput,"keypress")}if(this.calendarButton!=null){this.removeHandler(this.calendarButton,"mousedown")}if(this.timeButton!=null){this.removeHandler(this.timeButton,"mousedown")}if(this.calendarContainer!=null){this.removeHandler(this.calendarContainer,"cellSelected");this.removeHandler(this.calendarContainer,"cellMouseDown")}this.removeHandler(a(window),"resize."+this.id)},isOpened:function(){var c=this;var b=a.data(document.body,"openedJQXCalendar"+this.id);if(b!=null&&b==c.calendarContainer){return true}return false},wheel:function(d,c){if(!c.isEditing){return}c.changeType="mouse";var e=0;if(!d){d=window.event}if(d.originalEvent&&d.originalEvent.wheelDelta){d.wheelDelta=d.originalEvent.wheelDelta}if(d.wheelDelta){e=d.wheelDelta/120}else{if(d.detail){e=-d.detail/3}}if(e){var b=c._handleDelta(e);if(!b){if(d.preventDefault){d.preventDefault()}d.returnValue=false;return b}else{return false}}if(d.preventDefault){d.preventDefault()}d.returnValue=false},_handleDelta:function(b){if(b<0){this.spinDown()}else{this.spinUp()}return false},focus:function(){try{var c=this;c._firstFocusDate=c.getDate();this._setSelectionStart(0);this._selectGroup(-1);this.dateTimeInput.focus();setTimeout(function(){c._setSelectionStart(0);c._selectGroup(-1);c.dateTimeInput.focus()},25)}catch(b){}},_addHandlers:function(){var e=this.element.id;var c=this.element;var d=this;if(this.host.parents()){this.addHandler(this.host.parents(),"scroll.datetimeinput"+this.element.id,function(f){var g=d.isOpened();if(g){d.close()}})}this.addHandler(this.host,"mouseenter",function(){if(!d.disabled&&d.enableHover){var f=true;d.calendarButtonIcon.addClass(d.toThemeProperty("jqx-icon-calendar-hover"));d.calendarButton.addClass(d.toThemeProperty("jqx-fill-state-hover"));if(d.showTimeButton){d.timeButtonIcon.addClass(d.toThemeProperty("jqx-icon-time-hover"));d.timeButton.addClass(d.toThemeProperty("jqx-fill-state-hover"))}}});this.addHandler(this.host,"mouseleave",function(){if(!d.disabled&&d.enableHover){d.calendarButtonIcon.removeClass(d.toThemeProperty("jqx-icon-calendar-hover"));d.calendarButton.removeClass(d.toThemeProperty("jqx-fill-state-hover"));if(d.showTimeButton){d.timeButtonIcon.removeClass(d.toThemeProperty("jqx-icon-time-hover"));d.timeButton.removeClass(d.toThemeProperty("jqx-fill-state-hover"))}}});this.addHandler(this.host,"mousewheel",function(f){d.wheel(f,d)});this.addHandler(a(document),"mousedown."+this.id,this._closeOpenedCalendar,{me:this});if(a.jqx.mobile.isTouchDevice()){this.addHandler(a(document),a.jqx.mobile.getTouchEventName("touchstart")+"."+this.id,this._closeOpenedCalendar,{me:this})}this.addHandler(this.dateTimeInput,"keydown."+this.id,function(h){var g=a.data(document.body,"openedJQXCalendar"+d.id);if(g!=null&&g==d.calendarContainer){var f=d.handleCalendarKey(h,d);return f}});if(this.calendarContainer!=null){this.addHandler(this.calendarContainer,"keydown",function(f){if(f.keyCode==13){if(d.isOpened()){if(!d._calendar._viewAnimating&&d._calendar.view=="month"){d.hideCalendar("selected","keyboard");d.dateTimeInput.focus();return false}}return true}else{if(f.keyCode==9){if(d.isOpened()){d.hideCalendar("selected","keyboard");return true}}else{if(f.keyCode==27){if(d.isOpened()){d.hideCalendar(null,"keyboard");d.dateTimeInput.focus();return false}return true}}}d.timePopup=false;if(f.keyCode==84){d.timePopup=true}if(f.keyCode==115){if(d.isOpened()){d.hideCalendar("keyboard","keyboard");d.dateTimeInput.focus();return false}else{if(!d.isOpened()){d.showCalendar("keyboard","keyboard");d.dateTimeInput.focus();return false}}}if(f.altKey){if(f.keyCode==38){if(d.isOpened()){d.hideCalendar("keyboard","keyboard");d.dateTimeInput.focus();return false}}else{if(f.keyCode==40){if(!d.isOpened()){d.showCalendar("keyboard","keyboard");d.dateTimeInput.focus();return false}}}}});this.addHandler(this.calendarContainer,"cellSelected",function(g){if(d.closeCalendarAfterSelection){var f=a.data(document.body,"openedJQXCalendarValue");if(g.args.selectionType=="mouse"){if(d.selectionMode!="range"){d.hideCalendar("selected","mouse")}else{if(d._calendar._clicks==0){d.hideCalendar("selected","mouse")}}}}});this.addHandler(this.calendarContainer,"cellMouseDown",function(f){if(d.closeCalendarAfterSelection){if(d._calendar.value){a.data(document.body,"openedJQXCalendarValue",new a.jqx._jqxDateTimeInput.getDateTime(d._calendar.value.dateTime))}}})}this.addHandler(this.dateTimeInput,"blur",function(h){d.bar.removeClass("focused");d.label.removeClass("focused");d._endFullEdit();if(d.value!=null){d.isEditing=false;var g=d.value.dateTime.getDay();var f=d._oldDT;d._validateValue(true);if(h.stopPropagation){h.stopPropagation()}d._updateText();d._raiseEvent(9,h)}if(!d.isOpened()){d.host.removeClass(d.toThemeProperty("jqx-fill-state-focus"))}});this.addHandler(this.host,"focus",function(f){d.focus()});this.addHandler(this.dateTimeInput,"focus",function(f){d._firstFocusDate=d.getDate();if(d.value!=null){if(d.selectionMode!="range"){d._oldDT=new Date(d.value.dateTime)}else{d._oldDT=d.getRange()}setTimeout(function(){var g=d._selection();d.isEditing=true;d._validateValue();d._updateText();d._setSelectionStart(0);d._selectGroup(-1,g);d.host.addClass(d.toThemeProperty("jqx-fill-state-focus"))})}else{d._setSelectionStart(0);d._selectGroup(-1);d.host.addClass(d.toThemeProperty("jqx-fill-state-focus"))}if(f.stopPropagation){f.stopPropagation()}d.bar.addClass("focused");d.label.addClass("focused");if(f.preventDefault){f.preventDefault();return false}});var b="mousedown";if(this.touch){b=a.jqx.mobile.getTouchEventName("touchstart")}this.addHandler(this.calendarButton,b,function(g){var h=d.container;var f=h.css("display")=="block";d.timePopup=false;d.calendarPopup=true;if(!d.disabled){if(!d.isanimating){if(f){d.hideCalendar();return false}else{d.showCalendar("mouse");g.preventDefault()}}}});this.addHandler(this.timeButton,b,function(g){var h=d.container;var f=h.css("display")=="block";d.timePopup=true;d.calendarPopup=false;if(!d.disabled){if(!d.isanimating){if(f){d.hideCalendar("mouse","mouse");return false}else{d.showCalendar("mouse");g.preventDefault()}}}});this.addHandler(this.dateTimeInput,"mousedown",function(f){return d._raiseEvent(2,f)});this.addHandler(this.dateTimeInput,"mouseup",function(f){return d._raiseEvent(3,f)});this.addHandler(this.dateTimeInput,"keydown",function(f){return d._raiseEvent(4,f)});this.addHandler(this.dateTimeInput,"keyup",function(f){var g=this.value;if(d._fullEditInProgress&&d._enteredValue&&d._mask[g.length]!==undefined){this.value=this.value+d._mask[g.length]}return d._raiseEvent(5,f)});this.addHandler(this.dateTimeInput,"keypress",function(f){return d._raiseEvent(6,f)})},createID:function(){var b=Math.random()+"";b=b.replace(".","");b="99"+b;b=b/1;return"dateTimeInput"+b},setMaxDate:function(b,c){if(b==null){return}if(b!=null&&typeof(b)=="string"){b=new Date(b);if(!this._isValidDate(b)){return}}this.maxDate=a.jqx._jqxDateTimeInput.getDateTime(b);if(this._calendar!=null){this._calendar.setMaxDate(b)}if(c!=false){if(this.getDate()!=null&&this.getDate()>b){this.setDate(b)}a.jqx.aria(this,"aria-valuemax",b);this._refreshValue();this._updateText()}},getMaxDate:function(){if(this.maxDate!=null&&this.maxDate!=undefined){return this.maxDate.dateTime}return null},setMinDate:function(b,c){if(b==null){return}if(b!=null&&typeof(b)=="string"){b=new Date(b);if(!this._isValidDate(b)){return}}this.minDate=a.jqx._jqxDateTimeInput.getDateTime(b);if(this._calendar!=null){this._calendar.setMinDate(b)}if(c!=false){if(this.getDate()!=null&&this.getDate()=0){d=d.replace(/\,/g,"/");d=new Date(d);if(!this._isValidDate(d)){d=f}}if(d.toString().indexOf("-")>=0){d=d.replace(/\-/g,"/");d=new Date(d);if(!this._isValidDate(d)){d=f}if(d.getFullYear&&isNaN(d.getFullYear)){d=f}}if(d!=""){var c=d;if(window.Globalize!=undefined){d=window.Globalize.parseDate(c,this.formatString,this.culture)}else{if(a.jqx.dataFormat){d=a.jqx.dataFormat.parsedate(c,this.formatString,this.localization.calendar)}else{d=new Date(d)}}if(d===null&&c!==null){if(this._isValidDate(c)){d=c}}if(!this._isValidDate(d)){return}}}if(d==null||d=="null"||d=="undefined"){if(!this.allowNullDate){d=this.min}}if(!this._isValidDate(d)){d=null}if(d==null||d=="null"||d=="undefined"||d===""){if(this.value!=null){this.value=null;this._calendar.setDate(null);this._refreshValue();if(this.cookies){if(this.value!=null){a.jqx.cookie.cookie("jqxDateTimeInput"+this.element.id,this.value.dateTime.toString(),this.cookieoptions)}}this._setSelectionStart(0);this._selectGroup(-1);this._raiseEvent("0",d,e);this._raiseEvent("9",d,e)}return}if(dthis.getMaxDate()){return}if(this.value==null){this.value=new a.jqx._jqxDateTimeInput.getDateTime(new Date());this.value._setHours(0);this.value._setMinutes(0);this.value._setSeconds(0);this.value._setMilliseconds(0)}if(d.getFullYear){this.value._setYear(d.getFullYear());this.value._setDay(1);this.value._setMonth(d.getMonth()+1);this.value._setHours(d.getHours());this.value._setMinutes(d.getMinutes());this.value._setSeconds(d.getSeconds());this.value._setMilliseconds(d.getMilliseconds());this.value._setDay(d.getDate())}this._validateTimeRange();this._refreshValue();if(this.cookies){if(this.value!=null){a.jqx.cookie.cookie("jqxDateTimeInput"+this.element.id,this.value.dateTime.toString(),this.cookieoptions)}}var b=this.getDate();var g=(b-e);if(g!=0){this._raiseEvent("0",d,e);this._raiseEvent("9",d,e);return true}},getDate:function(){if(this.value==undefined){return null}return new Date(this.value.dateTime)},getText:function(){return this.dateTimeInput.val()},setRange:function(d,c){if(typeof(d)=="object"&&!this._isValidDate(d)){d=null}if(typeof(c)=="object"&&!this._isValidDate(c)){c=null}if(d!=null&&typeof(d)=="string"){d=new Date(d);if(!this._isValidDate(d)){return}}if(c!=null&&typeof(c)=="string"){c=new Date(c);if(!this._isValidDate(c)){return}}if(d&&isNaN(d)&&d.toString()=="NaN"&&typeof(d)!="string"){return}if(c&&isNaN(c)&&c.toString()=="NaN"&&typeof(c)!="string"){return}this._calendar.setRange(d,c);if(c&&d&&(c.valueOf()!=d.valueOf())){this._range={from:d,to:c}}else{this._range=this._calendar.getRange()}var b=d;if(b!=null&&b.getFullYear){if(this.value==null){this.value=new a.jqx._jqxDateTimeInput.getDateTime(new Date());this.value._setHours(0);this.value._setMinutes(0);this.value._setSeconds(0);this.value._setMilliseconds(0)}this.value._setYear(b.getFullYear());this.value._setMonth(b.getMonth()+1);this.value._setHours(b.getHours());this.value._setMinutes(b.getMinutes());this.value._setSeconds(b.getSeconds());this.value._setMilliseconds(b.getMilliseconds());this.value._setDay(b.getDate())}this._refreshValue();if(this.value){this._raiseEvent("0",this.value.dateTime)}else{this._raiseEvent("0",null)}},getRange:function(){var b=this._calendar.getRange();if(this._range){var d=this._range.from;var c=this._range.to;if(c&&d&&(c.valueOf()!=d.valueOf())){if(b.from){b.from.setHours(d.getHours(),d.getMinutes(),d.getSeconds(),d.getMilliseconds())}if(b.to){b.to.setHours(c.getHours(),c.getMinutes(),c.getSeconds(),c.getMilliseconds())}}}return b},_validateValue:function(e){var b=false;for(var d=0;d1){c=1}}break;case"Character":break;case"Day":if(c<1){c=1}else{if(c>31){c=31}}break;case"FORMAT_hh":if(c<1){c=1}else{if(c>12){c=12}}break;case"FORMAT_HH":if(c<0){c=0}else{if(c>23){c=23}}break;case"Millisecond":if(c<0){c=0}else{if(c>999){c=999}}break;case"Minute":if(c<0){c=0}else{if(c>59){c=59}}break;case"Month":if(c<1){c=1}else{if(c>12){c=12}}break;case"ReadOnly":break;case"Second":if(c<0){c=0}else{if(c>59){c=59}}break;case"Year":if(cthis.maxDate.year){c=this.maxDate.year}}break}if(this.editors[d].value!=c){this.editors[d].value=c;b=true}}this.updateValue(e);if(this.value!=null&&e===true){if(this.value.dateTime>this.maxDate.dateTime){this._internalSetValue(this.maxDate);this._updateEditorsValue()}else{if(this.value.dateTime=0){this._selectGroup(e)}},spinDown:function(){var d=this.value;if(d==null){return}if(this.activeEditor!=null){var b=this.editors.indexOf(this.activeEditor);if(b==-1){return}if(this.items[b].type=="Day"){if(this.value!=null){this.activeEditor.maxValue=this.value._daysInMonth(this.value.year,this.value.month)}}var c=this.activeEditor.positions;this.activeEditor.decreaseValue(this.enableAbsoluteSelection);this.activeEditor.positions=c}if(this.isEditing){this.isEditing=false}this.updateValue();this.isEditing=true;this._updateText();var e=this.editors.indexOf(this.activeEditor);if(e>=0){this._selectGroup(e)}},_passKeyToCalendar:function(c){if(c.keyCode==13||c.keyCode==9){this.hideCalendar("selected","keyboard");return true}else{if(c.keyCode==27){var e=this.calendarContainer;var d=this._calendar;var f=this.closeCalendarAfterSelection;this.closeCalendarAfterSelection=false;d.setDate(this.value.dateTime);this.closeCalendarAfterSelection=f;this.hideCalendar()}}var f=this.closeCalendarAfterSelection;this.closeCalendarAfterSelection=false;var b=this._calendar._handleKey(c);this.closeCalendarAfterSelection=f;return b},handleCalendarKey:function(f,e){var c=a(f.target);var d=a.data(document.body,"openedJQXCalendar"+this.id);if(d!=null){if(d.length>0){var b=e._passKeyToCalendar(f);return b}}return true},_findPos:function(c){if(c==null){return}while(c&&(c.type=="hidden"||c.nodeType!=1||a.expr.filters.hidden(c))){c=c.nextSibling}var b=a(c).coord(true);return[b.left,b.top]},testOffset:function(h,f,c){var g=h.outerWidth();var j=h.outerHeight();var i=a(window).width()+a(window).scrollLeft();var e=a(window).height()+a(window).scrollTop();if(f.left+g>i){if(g>this.host.width()){var d=this.host.coord().left;var b=g-this.host.width();f.left=d-b+2}}if(f.left<0){f.left=parseInt(this.host.coord().left)+"px"}f.top-=Math.min(f.top,(f.top+j>e&&e>j)?Math.abs(j+c+23):0);return f},open:function(b){if(b=="time"){this.timePopup=true}else{this.timePopup=false}this.showCalendar()},close:function(b){this.hideCalendar()},_getBodyOffset:function(){var c=0;var b=0;if(a("body").css("border-top-width")!="0px"){c=parseInt(a("body").css("border-top-width"));if(isNaN(c)){c=0}}if(a("body").css("border-left-width")!="0px"){b=parseInt(a("body").css("border-left-width"));if(isNaN(b)){b=0}}return{left:b,top:c}},initTimePopup:function(){this.timePopupElement=a("
").appendTo(this.timeContainer);this.timePopupElement.addClass(this.toThemeProperty("jqx-widget-content jqx-widget jqx-date-time-input-popup"));var s="";s+="
 
 
 
 
::: 
 
";var l=this._getFormatValue(this.formatString);if(this.selectionMode!="range"){this.timePopupElement[0].innerHTML=s}else{this.timePopupElement[0].innerHTML="
"+s+"-"+s+"
"}this.timePopupElement.find(".jqx-icon-down").addClass(this.toThemeProperty("jqx-icon jqx-icon-arrow-down"));this.timePopupElement.find(".jqx-icon-up").addClass(this.toThemeProperty("jqx-icon jqx-icon-arrow-up"));var g=this.timePopupElement.find("input");g.addClass(this.toThemeProperty("jqx-input"));g.addClass(this.toThemeProperty("jqx-rc-all"));this.addHandler(g,"mousedown",function(u){u.stopPropagation()});var e=function(u){if(u.target.className.indexOf("hour")>=0){m._decrementHour(a(u.target))}if(u.target.className.indexOf("minute")>=0){m._decrementMinuteSecond(a(u.target))}if(u.target.className.indexOf("second")>=0){m._decrementMinuteSecond(a(u.target))}if(u.target.className.indexOf("millisecond")>=0){m._decrementMillisecond(a(u.target))}if(u.target.className.indexOf("meridian")>=0){m._decrementMeridian(a(u.target))}};var k=function(u){if(u.target.className.indexOf("hour")>=0){m._incrementHour(a(u.target))}if(u.target.className.indexOf("minute")>=0){m._incrementMinuteSecond(a(u.target))}if(u.target.className.indexOf("second")>=0){m._incrementMinuteSecond(a(u.target))}if(u.target.className.indexOf("millisecond")>=0){m._incrementMillisecond(a(u.target))}if(u.target.className.indexOf("meridian")>=0){m._incrementMeridian(a(u.target))}};var r=function(v,u){if(!u.isEditing){return}var w=0;if(!v){v=window.event}if(v.originalEvent&&v.originalEvent.wheelDelta){v.wheelDelta=v.originalEvent.wheelDelta}if(v.originalEvent&&v.originalEvent.deltaY!=undefined){w=-v.originalEvent.deltaY}if(v.wheelDelta){w=v.wheelDelta/120}else{if(v.detail){w=-v.detail/3}}if(w){if(document.activeElement==v.target&&v.target.nodeName.toLowerCase()=="input"){if(w<0){e(v)}else{k(v)}}if(v.preventDefault){v.preventDefault()}v.returnValue=false}if(v.preventDefault){v.preventDefault()}v.returnValue=false};this.addHandler(g,"wheel",function(u){r(u,m)});this.addHandler(g,"keydown",function(v){var u=a(v.target);if(v.ctrlKey){if(v.keyCode==38){if(m.isOpened()){m.hideCalendar("keyboard","keyboard");m.dateTimeInput.focus();return false}}else{if(v.keyCode==40){if(!m.isOpened()){m.showCalendar("keyboard","keyboard");m.dateTimeInput.focus();return false}}}}if(v.keyCode==40){e(v);v.preventDefault()}else{if(v.keyCode==38){k(v);v.preventDefault()}else{if(v.keyCode==13){v.preventDefault();m.hideCalendar("keyboard","keyboard");m.dateTimeInput.focus()}else{if(v.keyCode==27){v.preventDefault();m.hideCalendar("cancel");m.dateTimeInput.focus()}}}}});this.hourInput=a(g[0]);this.minuteInput=a(g[1]);this.secondInput=a(g[2]);this.mssecondInput=a(g[3]);this.meridianInput=a(g[4]);this.hourInput2=a(g[5]);this.minuteInput2=a(g[6]);this.secondInput2=a(g[7]);this.mssecondInput2=a(g[8]);this.meridianInput2=a(g[9]);var m=this;var o=this.timePopupElement.find(".increment-hour-column");this.hourIncrement=a(o[0]);this.hourIncrement2=a(o[1]);this.addHandler(g,"change",function(v){var u=a(v.target);if(u.val().length<=1){u.val("0"+a(v.target).val())}if(v.target.className.indexOf("hour")>=0){var w=parseInt(a(v.target).val());if(l.indexOf("HH")>=0){while(w>24){w=w-24}}else{while(w>12){w=w-12}}if(w<10){w="0"+w}if(u.val()!=w){u.val(w)}}if(v.target.className.indexOf("minute")>=0||v.target.className.indexOf("second")>=0){var w=parseInt(a(v.target).val());while(w>59){w--}if(w<10){w="0"+w}if(u.val()!=w){u.val(w)}}});this._incrementHour=function(u){var v=parseInt(u.val());v++;if(l.indexOf("HH")>=0){if(v>23){v=0}}else{if(v>12){v=1}}if(v<10){v="0"+v}u.val(v)};this._incrementMinuteSecond=function(u){var v=parseInt(u.val());v++;if(v>59){v=0}if(v<10){v="0"+v}u.val(v)};this._incrementMillisecond=function(u){var v=parseInt(u.val());v++;if(v>999){v=0}if(v<10){v="0"+v}u.val(v)};this._incrementMeridian=function(u){var v=u.val();if(v.toLowerCase().indexOf("a")>=0){v="PM"}else{v="AM"}u.val(v)};this._decrementHour=function(u){var v=parseInt(u.val());v--;if(l.indexOf("HH")>=0){if(v<0){v=23}}else{if(v<1){v=12}}if(v<10){v="0"+v}u.val(v)};this._decrementMinuteSecond=function(u){var v=parseInt(u.val());v--;if(v<0){v=59}if(v<10){v="0"+v}u.val(v)};this._decrementMillisecond=function(u){var v=parseInt(u.val());v--;if(v<0){v=999}if(v<10){v="0"+v}u.val(v)};this._decrementMeridian=function(u){var v=u.val();if(v.toLowerCase().indexOf("a")>=0){v="PM"}else{v="AM"}u.val(v)};this.addHandler(this.hourIncrement,"mousedown",function(u){u.stopPropagation();m._incrementHour(m.hourInput)});this.addHandler(this.hourIncrement2,"mousedown",function(u){u.stopPropagation();m._incrementHour(m.hourInput2)});var p=this.timePopupElement.find(".increment-minute-column");this.minuteIncrement=a(p[0]);this.minuteIncrement2=a(p[1]);this.addHandler(this.minuteIncrement,"mousedown",function(u){u.stopPropagation();m._incrementMinuteSecond(m.minuteInput)});this.addHandler(this.minuteIncrement2,"mousedown",function(u){u.stopPropagation();m._incrementMinuteSecond(m.minuteInput2)});var c=this.timePopupElement.find(".increment-second-column");this.secondIncrement=a(c[0]);this.secondIncrement2=a(c[1]);this.addHandler(this.secondIncrement,"mousedown",function(u){u.stopPropagation();m._incrementMinuteSecond(m.secondInput)});this.addHandler(this.secondIncrement2,"mousedown",function(u){u.stopPropagation();m._incrementMinuteSecond(m.secondInput2)});var d=this.timePopupElement.find(".increment-millisecond-column");this.millisecondsIncrement=a(d[0]);this.millisecondsIncrement2=a(d[1]);this.addHandler(this.millisecondsIncrement,"mousedown",function(u){u.stopPropagation();m._incrementMillisecond(m.mssecondInput)});this.addHandler(this.millisecondsIncrement2,"mousedown",function(u){u.stopPropagation();m._incrementMillisecond(m.mssecondInput2)});var i=this.timePopupElement.find(".increment-meridian-column");this.meridianIncrement=a(i[0]);this.meridianIncrement2=a(i[1]);this.addHandler(this.meridianIncrement,"mousedown",function(u){u.stopPropagation();m._incrementMeridian(m.meridianInput)});this.addHandler(this.meridianIncrement2,"mousedown",function(u){u.stopPropagation();m._incrementMeridian(m.meridianInput2)});var n=this.timePopupElement.find(".decrement-hour-column");this.hourDecrement=a(n[0]);this.hourDecrement2=a(n[1]);this.addHandler(this.hourDecrement,"mousedown",function(u){u.stopPropagation();m._decrementHour(m.hourInput)});this.addHandler(this.hourDecrement2,"mousedown",function(u){u.stopPropagation();m._decrementHour(m.hourInput2)});var j=this.timePopupElement.find(".decrement-minute-column");this.minuteDecrement=a(j[0]);this.minuteDecrement2=a(j[1]);this.addHandler(this.minuteDecrement,"mousedown",function(u){u.stopPropagation();m._decrementMinuteSecond(m.minuteInput)});this.addHandler(this.minuteDecrement2,"mousedown",function(u){u.stopPropagation();m._decrementMinuteSecond(m.minuteInput2)});var t=this.timePopupElement.find(".decrement-second-column");this.secondDecrement=a(t[0]);this.secondDecrement2=a(t[1]);this.addHandler(this.secondDecrement,"mousedown",function(u){u.stopPropagation();m._decrementMinuteSecond(m.secondInput)});this.addHandler(this.secondDecrement2,"mousedown",function(u){u.stopPropagation();m._decrementMinuteSecond(m.secondInput2)});var b=this.timePopupElement.find(".decrement-millisecond-column");this.millisecondsDecrement=a(b[0]);this.millisecondsDecrement2=a(b[1]);this.addHandler(this.millisecondsDecrement,"mousedown",function(u){u.stopPropagation();m._decrementMillisecond(m.mssecondInput)});this.addHandler(this.millisecondsDecrement2,"mousedown",function(u){u.stopPropagation();m._decrementMillisecond(m.mssecondInput2)});var f=this.timePopupElement.find(".decrement-meridian-column");this.meridianDecrement=a(f[0]);this.meridianDecrement2=a(f[1]);this.addHandler(this.meridianDecrement,"mousedown",function(u){u.stopPropagation();m._decrementMeridian(m.meridianInput)});this.addHandler(this.meridianDecrement2,"mousedown",function(u){u.stopPropagation();m._decrementMeridian(m.meridianInput2)});var q=this.timePopupElement.find("table");this.addHandler(this.timePopupElement,"mousedown",function(u){u.stopPropagation()});var h=function(u){var v=u.find("tr");if(l.indexOf("mm")==-1){m.minuteInput.hide();m.minuteInput2.hide();a(a(v[0]).children()[1]).hide();a(a(v[0]).children()[2]).hide();a(a(v[1]).children()[1]).hide();a(a(v[1]).children()[2]).hide();a(a(v[2]).children()[1]).hide();a(a(v[2]).children()[2]).hide()}if(l.indexOf("ss")==-1){m.secondInput.hide();m.secondInput2.hide();a(a(v[0]).children()[3]).hide();a(a(v[0]).children()[4]).hide();a(a(v[1]).children()[3]).hide();a(a(v[1]).children()[4]).hide();a(a(v[2]).children()[3]).hide();a(a(v[2]).children()[4]).hide()}if(l.indexOf("tt")==-1&&l.indexOf("hh")==-1){m.meridianInput.hide();m.meridianInput2.hide();a(a(v[0]).children()[7]).hide();a(a(v[0]).children()[8]).hide();a(a(v[1]).children()[7]).hide();a(a(v[1]).children()[8]).hide();a(a(v[2]).children()[7]).hide();a(a(v[2]).children()[8]).hide()}if(l.indexOf("zz")==-1){m.mssecondInput.hide();m.mssecondInput2.hide();a(a(v[0]).children()[5]).hide();a(a(v[0]).children()[6]).hide();a(a(v[1]).children()[5]).hide();a(a(v[1]).children()[6]).hide();a(a(v[2]).children()[5]).hide();a(a(v[2]).children()[6]).hide()}};if(q.length==1){h(q)}else{h(a(a(q)[1]));h(a(a(q)[2]))}},updateTimePopup:function(){var b=this._getFormatValue(this.formatString);if(this.selectionMode!="range"){var f=this.getDate();if(this.hourInput){if(f){var c=f.getHours();var h=f.getMinutes();var g=f.getHours();var e=f.getSeconds();var d=f.getMilliseconds()}else{var c=0;var h=0;var g=0;var e=0;var d=0}if(c>=12){g="PM";if(b.indexOf("HH")==-1){c-=12;if(c==0){c=12}}}else{g="AM"}if(this.meridianInput.css("display")!="none"){if(c==0){c=12}}if(c<10){c="0"+c}if(h<10){h="0"+h}if(e<10){e="0"+e}if(d<10){d="0"+d}this.hourInput.val(c);this.minuteInput.val(h);this.secondInput.val(e);this.mssecondInput.val(d);this.meridianInput.val(g)}}else{var f=this.getRange().from;if(this.hourInput){if(f){var c=f.getHours();var h=f.getMinutes();var g=f.getHours();var e=f.getSeconds();var d=f.getMilliseconds()}else{var c=0;var h=0;var g=0;var e=0;var d=0}if(c>=12){g="PM";if(b.indexOf("HH")==-1){c-=12;if(c==0){c=12}}}else{g="AM"}if(this.meridianInput.css("display")!="none"){if(c==0){c=12}}if(c<10){c="0"+c}if(h<10){h="0"+h}if(e<10){e="0"+e}if(d<10){d="0"+d}this.hourInput.val(c);this.minuteInput.val(h);this.secondInput.val(e);this.mssecondInput.val(d);this.meridianInput.val(g)}var f=this.getRange().to;if(this.hourInput2){if(f){var c=f.getHours();var h=f.getMinutes();var g=f.getHours();var e=f.getSeconds();var d=f.getMilliseconds()}else{var c=0;var h=0;var g=0;var e=0;var d=0}if(c>=12){g="PM";if(b.indexOf("HH")==-1){c-=12;if(c==0){c=12}}}else{g="AM"}if(this.meridianInput.css("display")!="none"){if(c==0){c=12}}if(c<10){c="0"+c}if(h<10){h="0"+h}if(e<10){e="0"+e}if(d<10){d="0"+d}this.hourInput2.val(c);this.minuteInput2.val(h);this.secondInput2.val(e);this.mssecondInput2.val(d);this.meridianInput2.val(g)}}},showCalendar:function(){var o=this.calendarContainer;var s=this._calendar;a.jqx.aria(this,"aria-expanded",true);if(this.showTimeButton){if(this.timePopup){if(!this.timePopupElement){this.initTimePopup()}this.calendarContainer.css("visibility","hidden");this.timeContainer.css("visibility","visible");this.updateTimePopup();var d=this.timeContainer.find("input");var v=0;for(var z=0;zthis.host.width()){var f=23;this.container.css("left",f+parseInt(Math.round(u))-x+"px")}else{this.container.css("left",25+parseInt(Math.round(u))+x+"px")}}if(this.dropDownVerticalAlignment=="top"){var y=o.height();if(this.timePopup){this.timeContainer.css("top",this.container.height()-75)}b=true;o.css("top",23);o.addClass(this.toThemeProperty("jqx-popup-up"));var n=parseInt(this.host.outerHeight());var m=parseInt(p)-Math.abs(y+n+23);this.container.css("top",m)}if(this.enableBrowserBoundsDetection){var j=this.testOffset(o,{left:parseInt(this.container.css("left")),top:parseInt(p)},parseInt(this.host.outerHeight()));if(parseInt(this.container.css("top"))!=j.top){b=true;o.css("top",23);o.addClass(this.toThemeProperty("jqx-popup-up"))}else{o.css("top",0)}this.container.css("top",j.top);if(parseInt(this.container.css("left"))!=j.left){this.container.css("left",j.left)}}this._raiseEvent(7,o);if(this.animationType!="none"&&this.animationType!="transform"){this.container.css("display","block");var q=parseInt(o.outerHeight());o.stop();this.isanimating=true;this.opening=true;if(this.animationType=="fade"){o.css("margin-top",0);o.css("opacity",0);o.animate({opacity:1},this.openDelay,function(){r.isanimating=false;r.opening=false;a.data(document.body,"openedJQXCalendar"+r.id,o);r.calendarContainer.focus()});if(this.timePopup){this.timeContainer.css("margin-top",0);this.timeContainer.css("opacity",0);this.timeContainer.animate({opacity:1},this.openDelay,function(){r.isanimating=false;r.opening=false;a.data(document.body,"openedJQXCalendar"+r.id,o);r.timeContainer.focus()})}}else{o.css("opacity",1);if(this.timePopup){this.timeContainer.css("opacity",1)}if(b){o.css("margin-top",q)}else{o.css("margin-top",-q)}if(this.timePopup){if(b){this.timeContainer.css("margin-top",q)}else{this.timeContainer.css("margin-top",-q)}this.timeContainer.animate({"margin-top":0},this.openDelay,function(){r.isanimating=false;r.opening=false;a.data(document.body,"openedJQXCalendar"+r.id,o);r.timeContainer.focus()})}o.animate({"margin-top":0},this.openDelay,function(){r.isanimating=false;r.opening=false;a.data(document.body,"openedJQXCalendar"+r.id,o);r.calendarContainer.focus()})}}else{o.stop();r.isanimating=false;r.opening=false;o.css("opacity",1);o.css("margin-top",0);this.container.css("display","block");a.data(document.body,"openedJQXCalendar"+r.id,o);this.calendarContainer.focus();if(this.timePopup){this.timeContainer.stop();this.timeContainer.css("opacity",1);this.timeContainer.css("margin-top",0);this.timeContainer.focus()}}if(this.value==null){if(this._calendar&&this._calendar._getSelectedCell()){this._calendar._getSelectedCell().isSelected=false}}if(this.timePopup){this.timeButtonIcon.addClass(this.toThemeProperty("jqx-icon-time-pressed"));this.timeButton.addClass(this.toThemeProperty("jqx-fill-state-hover"));this.timeButton.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this.timeContainer.addClass(this.toThemeProperty("jqx-fill-state-focus"))}else{this.calendarButtonIcon.addClass(this.toThemeProperty("jqx-icon-calendar-pressed"));this.calendarButton.addClass(this.toThemeProperty("jqx-fill-state-hover"));this.calendarButton.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this.calendarContainer.addClass(this.toThemeProperty("jqx-fill-state-focus"))}this.host.addClass(this.toThemeProperty("jqx-fill-state-focus"));this.calendarContainer.addClass(this.toThemeProperty("jqx-popup-show"));if(this.isMaterialized()){this._calendar.refresh()}},hideCalendar:function(j,o){if(o){this.changeType=o}var h=this.calendarContainer;var b=this.container;var p=this;a.jqx.aria(this,"aria-expanded",false);if(this.showTimeButton){if(this.timeContainer.css("visibility")!="hidden"&&j!="cancel"){if(this.selectionMode!="range"&&this.hourInput){var e=this.getDate();var g=parseInt(this.hourInput.val());var f=parseInt(this.minuteInput.val());var c=parseInt(this.secondInput.val());var q=parseInt(this.mssecondInput.val());var d=this.meridianInput.val();if(isNaN(g)){g=0}if(isNaN(f)){f=0}if(isNaN(c)){c=0}if(isNaN(q)){q=0}if(this.meridianInput.css("display")!="none"){if(d.toLowerCase().indexOf("p")>=0){if(g<12){g+=12}}if(d.toLowerCase().indexOf("a")>=0){if(g>=12){g-=12}}}if(!e){e=new Date()}e.setHours(g,f,c,q);this.setDate(e)}else{if(this.hourInput&&j!="selected"){var i=this.getRange();var g=parseInt(this.hourInput.val());var f=parseInt(this.minuteInput.val());var c=parseInt(this.secondInput.val());var q=parseInt(this.mssecondInput.val());var d=this.meridianInput.val();if(isNaN(g)){g=0}if(isNaN(f)){f=0}if(isNaN(c)){c=0}if(isNaN(q)){q=0}if(this.meridianInput.css("display")!="none"){if(d.toLowerCase().indexOf("p")>=0){if(g<12){g+=12}}if(d.toLowerCase().indexOf("a")>=0){if(g>=12){g-=12}}}var l=i.from;if(!l){l=new Date()}l.setHours(g,f,c,q);var g=parseInt(this.hourInput2.val());var f=parseInt(this.minuteInput2.val());var c=parseInt(this.secondInput2.val());var q=parseInt(this.mssecondInput2.val());var d=this.meridianInput2.val();if(f==""){f=0}if(c==""){c=0}if(q==""){q=0}if(this.meridianInput2.css("display")!="none"){if(d.toLowerCase().indexOf("p")>=0){if(g<12){g+=12}}if(d.toLowerCase().indexOf("a")>=0){if(g>=12){g-=12}}}var k=i.to;if(!k){k=new Date()}k.setHours(g,f,c,q);if(k.valueOf()0){var h=j[0].id.toString();var f=h.toString().substring(13);var i=a(document).find("#"+f);var n=b.data.me.hideCalendar();if(n!==false){a.data(document.body,"openedJQXCalendar"+b.data.me.id,null)}}}},_loadItems:function(){if(this.value!=null){this.items=new Array();var d=this._getFormatValue(this.formatString);this.items=this._parseFormatValue(d);this.editors=new Array();for(var b=0;b=1){f=d.format(d.value,0,d.items.length)}var b=d.dateTimeInput.val();if(b!=f){d._raiseEvent(1,d.value)}}if(d.selectionMode=="range"){var c=d.getRange();var i=d.format(d.value,0,d.items.length);if(c.to){var h=a.jqx._jqxDateTimeInput.getDateTime(c.from);i=d.format(h,0,d.items.length);var g=a.jqx._jqxDateTimeInput.getDateTime(c.to);var e=d.format(g,0,d.items.length);var f=i+" - "+e;if(f==" - "){f=""}}else{f=""}}d.dateTimeInput.val(f)},format:function(h,j,f){var b="";for(var e=j;e2;if(g.type=="FORMAT_AMPM"){d=true;if(this.editors[e].value==0){c=this.editors[e].amString}else{c=this.editors[e].pmString}}if(!d){if(this.yearCutoff!==null&&g.type==="Year"&&g.format==="yy"){c=this.editors[e].value.toString().substring(2)}else{c=g.dateParserInEditMode(new Number(this.editors[e].value),"d"+this.editors[e].maxEditPositions,this);while(c.length0){var d=this._getFormatValueGroupLength(f);var g=null;switch(f.substring(0,1)){case":":case"/":d=1;g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,1),"ReadOnly",this.culture);break;case'"':case"'":var b=f.indexOf(f[0],1);g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(1,1+Math.max(1,b-1)),"ReadOnly",this.culture);d=Math.max(1,b+1);break;case"\\":if(f.length>=2){g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(1,1),"ReadOnly",this.culture);d=2}break;case"d":case"D":if(d>2){g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Day",this.culture)}else{g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Day",this.culture)}break;case"f":case"F":if(d>7){d=7}if(d>3){g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"ReadOnly",this.culture)}else{g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Millisecond",this.culture)}break;case"g":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"ReadOnly",this.culture);break;case"h":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"FORMAT_hh",this.culture);break;case"H":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"FORMAT_HH",this.culture);break;case"m":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Minute",this.culture);break;case"M":if(d>4){d=4}g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Month",this.culture);break;case"s":case"S":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Second",this.culture);break;case"t":case"T":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"FORMAT_AMPM",this.culture);break;case"y":case"Y":if(d>1){g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Year",this.culture)}else{d=1;g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,1),null,"ReadOnly",this.culture)}break;case"z":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"ReadOnly",this.culture);break;default:d=1;g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,1),"ReadOnly",this.culture);break}c[e]=a.extend(true,{},g);f=f.substring(d);e++}return c},_getFormatValue:function(b){if(b==null||b.length==0){b="d"}if(b.length==1){switch(b.substring(0,1)){case"d":return this.localization.calendar.patterns.d;case"D":return this.localization.calendar.patterns.D;case"t":return this.localization.calendar.patterns.t;case"T":return this.localization.calendar.patterns.T;case"f":return this.localization.calendar.patterns.f;case"F":return this.localization.calendar.patterns.F;case"M":return this.localization.calendar.patterns.M;case"Y":return this.localization.calendar.patterns.Y;case"S":return this.localization.calendar.patterns.S}}if(b.length==2&&b.substring(0,1)=="%"){b=b.substring(1)}return b},_updateEditorsValue:function(){var j=this.value;if(j==null){return}var g=j.year;var h=j.day;var d=j.hour;var l=j.millisecond;var b=j.second;var c=j.minute;var f=j.month;if(this.items==null){return}for(var e=0;e=0&&d<12){this.editors[e].value=0}else{this.editors[e].value=1}break;case"Day":this.editors[e].value=h;break;case"FORMAT_hh":var k=d%12;if(k==0){k=12}this.editors[e].value=k;break;case"FORMAT_HH":this.editors[e].value=d;break;case"Millisecond":this.editors[e].value=l;break;case"Minute":this.editors[e].value=c;break;case"Month":this.editors[e].value=f;break;case"Second":this.editors[e].value=b;break;case"Year":this.editors[e].value=g;break}}},updateValue:function(z){if(this.isEditing){return}if(this.items&&this.items.length==0){return}var o=0;var s=1;var C=1;var l=0;var d=0;var J=0;var u=0;var I=1;var h=0;var m=false;var r=false;var D=false;var c=false;var b=false;var q=false;var x=false;var t=new Array();var e=null;var y=0;for(var B=0;B0&&I>0&&C>0&&u>=0&&l>=0&&J>=0&&d>=0){var K=this.value;if(K!=null){if(!m){s=K.year}if(!r){I=K.month}if(!D){C=K.day}}try{if(I>12){I=12}if(I<1){I=1}if(z&&K._daysInMonth(s,I)<=C){C=K._daysInMonth(s,I);if(t!=null&&t.length>0){for(B=0;B=12){l-=12}}else{if(l+12<24){l+=12}}}var g=this.value.dateTime.getDate();this.value._setYear(parseInt(s));this.value._setDay(C);this.value._setMonth(I);if(c){this.value._setHours(l)}if(b){this.value._setMinutes(u)}if(q){this.value._setSeconds(J)}if(x){this.value._setMilliseconds(d)}this._validateTimeRange()}catch(j){this.value=K}if(G!=null){var A=this.value.dateTime.getFullYear()==G.getFullYear()&&this.value.dateTime.getDate()==G.getDate()&&this.value.dateTime.getMonth()==G.getMonth()&&this.value.dateTime.getHours()==G.getHours()&&this.value.dateTime.getMinutes()==G.getMinutes()&&this.value.dateTime.getSeconds()==G.getSeconds();if(!A){if(this.changing){var n=this.changing(G,this.value.dateTime);if(n){this.value=a.jqx._jqxDateTimeInput.getDateTime(n)}}this._raiseEvent("0",this.value.dateTime);if(this.cookies){if(this.value!=null){a.jqx.cookie.cookie("jqxDateTimeInput"+this.element.id,this.value.dateTime.toString(),this.cookieoptions)}}if(this.change){this.change(this.value.dateTime)}}}}var f=this.editors.indexOf(this.activeEditor);var p=this.items[f];if(this.value){if(this.calendarContainer.jqxCalendar("_isDisabled",this.value.dateTime)){this.dateTimeInput.addClass(this.toThemeProperty("jqx-input-invalid"))}else{this.dateTimeInput.removeClass(this.toThemeProperty("jqx-input-invalid"))}}},_internalSetValue:function(b){this.value._setYear(parseInt(b.year));this.value._setDay(b.day);this.value._setMonth(b.month);this.value._setHours(b.hour);this.value._setMinutes(b.minute);this.value._setSeconds(b.second);this.value._setMilliseconds(b.milisecond)},_raiseEvent:function(c,n,f){var m=this.events[c];var g={};g.owner=this;if(n==null){n={}}if(f==null){f=n}var l=n.charCode?n.charCode:n.keyCode?n.keyCode:0;var o=true;var k=this.readonly;var b=new a.Event(m);b.owner=this;b.args=g;b.args.date=this.getDate();if(c==9){b.args.type=this.changeType;this.changeType=null}this.element.value=this.dateTimeInput.val();if(c==9&&this.selectionMode!="range"){var d=b.args.date;if(this._oldDT){if(d!=null){if(!(d.getFullYear()!=this._oldDT.getFullYear()||d.getMonth()!=this._oldDT.getMonth()||d.getDate()!=this._oldDT.getDate()||d.getHours()!=this._oldDT.getHours()||d.getMinutes()!=this._oldDT.getMinutes()||d.getSeconds()!=this._oldDT.getSeconds())){return true}}a.jqx.aria(this,"aria-valuenow",this.getDate());a.jqx.aria(this,"aria-valuetext",this.getText());if(this.getDate()!=null){a.jqx.aria(this,"aria-label","Current focused date is "+this.getDate().toLocaleString())}else{a.jqx.aria(this,"aria-label","Current focused date is Null")}}b.args.oldValue=f;b.args.newValue=b.args.date;if(this._oldDT){b.args.oldValue=this._oldDT}}if(this.selectionMode=="range"){b.args.date=this.getRange();if(this._oldDT){var d=b.args.date.from;if(c==9){var j=false;var i=false;var e=this._oldDT.from;if(d!=null&&e){if(!(d.getFullYear()!=e.getFullYear()||d.getMonth()!=e.getMonth()||d.getDate()!=e.getDate()||d.getHours()!=e.getHours()||d.getMinutes()!=e.getMinutes()||d.getSeconds()!=e.getSeconds())){j=true}}var d=b.args.date.to;if(d!=null){e=this._oldDT.to;if(e){if(!(d.getFullYear()!=e.getFullYear()||d.getMonth()!=e.getMonth()||d.getDate()!=e.getDate()||d.getHours()!=e.getHours()||d.getMinutes()!=e.getMinutes()||d.getSeconds()!=e.getSeconds())){i=true}}}if(j&&i){return true}var j=b.args.date.from;if(j==null){j=""}else{j=j.toString()}var i=b.args.date.to;if(i==null){i=""}else{i=i.toString()}a.jqx.aria(this,"aria-valuenow",j+"-"+i);a.jqx.aria(this,"aria-valuetext",this.getText());if(j&&i){a.jqx.aria(this,"aria-label","Current focused range is "+j.toLocaleString()+"-"+i.toLocaleString())}}}b.args.oldValue=f;b.args.newValue=b.args.date;if(this._oldDT){b.args.oldValue=this._oldDT}}if(this.host.css("display")=="none"){return true}if(c!=2&&c!=3&&c!=4&&c!=5&&c!=6){o=this.host.trigger(b);if(b.stopPropagation){b.stopPropagation()}}var h=this;if(!k){if(c==2&&!this.disabled){setTimeout(function(){h.isEditing=true;if(this.selectionMode=="range"){h._selectGroup(-1)}else{h._selectGroup(-1)}},25)}}if(c==4){if(k||this.disabled){if(l==8||l==46){this.isEditing=false;if(this.allowKeyboardDelete){if(this.allowNullDate){this.setDate(null)}else{if(this.selectionMode!="range"){this.setDate(this.getMinDate())}else{this.setRange(this.getMinDate(),this.getMinDate())}}}}if(l==9){return true}if(!n.altKey){return false}}o=this._handleKeyDown(n,l)}else{if(c==5){if(l==9){return true}if(k||this.disabled){return false}}else{if(c==6){if(l==9){return true}if(k||this.disabled){return false}o=this._handleKeyPress(n,l)}}}return o},_doLeftKey:function(){if(this.activeEditor!=null){if(!this.isEditing){this.isEditing=true}var b=this.activeEditor;var d=false;var e=this.editors.indexOf(this.activeEditor);var c=e;if(this.enableAbsoluteSelection){if(e>=0&&this.activeEditor.positions>0){this.activeEditor.positions--;this._selectGroup(e);return}}while(e>0){this.activeEditor=this.editors[--e];this._selectGroup(e);if(this.items[e].type!="ReadOnly"){d=true;break}}if(!d){if(c>=0){this.activeEditor=this.editors[c]}}if(this.activeEditor!=null&&b!=this.activeEditor){if(this.items[e].type!="ReadOnly"){if(this.enableAbsoluteSelection){this.activeEditor.positions=this.activeEditor.maxEditPositions-1}else{this.activeEditor.positions=0}}}if(this.activeEditor!=b){this._validateValue();this._updateText();this._selectGroup(this.editors.indexOf(this.activeEditor));return true}else{return false}}},_doRightKey:function(){if(this.activeEditor!=null){if(!this.isEditing){this.isEditing=true}var b=this.activeEditor;var d=false;var e=this.editors.indexOf(this.activeEditor);var c=e;if(this.enableAbsoluteSelection){if(e>=0&&this.activeEditor.positions2){break}d=true;break}}if(!d){if(c>=0){this.activeEditor=this.editors[c]}}if(this.activeEditor!=null&&this.activeEditor!=b){if(this.items[e].type!="ReadOnly"){this.activeEditor.positions=0}}if(this.activeEditor!=b){this._validateValue();this._updateText();this._selectGroup(this.editors.indexOf(this.activeEditor));return true}else{return false}}},_saveSelectedText:function(){var c=this._selection();var e="";var d=this.dateTimeInput.val();if(c.start>0||c.length>0){for(var b=c.start;b1){c=1}}break;case"Character":break;case"Day":if(c<1){c=1}else{if(c>31){c=31}}break;case"FORMAT_hh":if(c<1){c=1}else{if(c>12){c=12}}break;case"FORMAT_HH":if(c<0){c=0}else{if(c>23){c=23}}break;case"Millisecond":if(c<0){c=0}else{if(c>99){c=99}}break;case"Minute":if(c<0){c=0}else{if(c>59){c=59}}break;case"Month":if(c<1){c=1}else{if(c>12){c=12}}break;case"ReadOnly":break;case"Second":if(c<0){c=0}else{if(c>59){c=59}}break;case"Year":if(cthis.maxDate.year){c=this.maxDate.year}}break}if(d.value!=c){b=true}if(!b){this.isEditing=false;this._validateValue();this._updateText();this.isEditing=true;this._doRightKey();return true}return false}}},_handleKeyPress:function(j,n){if(this._fullEditInProgress){this._enteredValue=true;return}var m=this._selection();var b=this;var d=j.ctrlKey||j.metaKey;if((d&&n==97)||(d&&n==65)){return true}if(n==8){if(m.start>0){b._setSelectionStart(m.start)}return false}if(n==46){if(m.start=0){this.changeType="keyboard";var f=String.fromCharCode(n);var k=parseInt(f);if(f=="p"||f=="a"||f=="A"||f=="P"){if(this.activeEditor&&this.activeEditor.item.type=="FORMAT_AMPM"){if(this.activeEditor.value==0&&(f=="p"||f=="P")){this.spinUp()}else{if(this.activeEditor.value==1&&(f=="a"||f=="A")){this.spinDown()}}}}if(!isNaN(k)){if(this.container.css("display")=="block"){this.hideCalendar()}this.updateValue();this._updateText();var h=false;var i=this.editors.indexOf(this.activeEditor);var c=null;this.isEditing=true;if(i.type!="ReadOnly"){c=this.activeEditor}if(c!=null&&c.positions==0){this.editorText=""}if(this.activeEditor==null){this.activeEditor=this.editors[0]}if(this.activeEditor==null){return false}this.activeEditor.insert(f);if(c!=null&&this.editorText.length>=c.maxEditPositions){this.editorText=""}this.editorText+=f;var o=this._selectWithAdvancePattern();if(this.activeEditor.positions==this.activeEditor.maxEditPositions){var g=this._getLastEditableEditorIndex();if(this.editors.indexOf(this.activeEditor)==g&&o&&this.enableAbsoluteSelection){this.activeEditor.positions=this.activeEditor.maxEditPositions-1}else{this.activeEditor.positions=0}}h=true;this.updateValue();this._updateText();this._selectGroup(this.editors.indexOf(this.activeEditor));return false}}var l=this._isSpecialKey(n);return l},_getLastEditableEditorIndex:function(){var b=0;var d=this;for(var c=this.items.length-1;c>=0;c--){if(this.items[c].type!="ReadOnly"){return c}}return -1},_handleKeyDown:function(l,r){var k=this;this.timePopup=false;if(r==84){this.timePopup=true}if(l.keyCode==115){if(k.isOpened()){k.hideCalendar("keyboard","keyboard");return false}else{if(!k.isOpened()){k.showCalendar("keyboard","keyboard");return false}}}if(l.altKey){if(l.keyCode==38){if(k.isOpened()){if(k.showTimeButton&&!k.showCalendarButton){k.timePopup=true}k.hideCalendar("keyboard","keyboard");return false}}else{if(l.keyCode==40){if(!k.isOpened()){if(k.showTimeButton&&!k.showCalendarButton){k.timePopup=true}k.showCalendar("keyboard","keyboard");return false}}}}else{if(l.ctrlKey){this.timePopup=true;if(l.keyCode==38){if(k.isOpened()){k.hideCalendar("keyboard","keyboard");return false}}else{if(l.keyCode==40){if(!k.isOpened()){k.showCalendar("keyboard","keyboard");return false}}}}}if(k.isOpened()){if(l.keyCode==9){k.hideCalendar("selected","keyboard");return true}return}var p=k._selection();var b=l.ctrlKey||l.metaKey;if((b&&r==99)||(b&&r==67)){k._saveSelectedText(l);return true}if((b&&r==122)||(b&&r==90)){return false}if((b&&r==118)||(b&&r==86)||(l.shiftKey&&r==45)){var o=k.val();var m=this;var c=a('')}else{e.selection.insertContent('
 
')}var n=b(window).scrollTop();var i=b(e.editorDocument).find(".jqx-editor-paste-element");i.css("top",n+"px");if(e.editor[0].createTextRange){g.preventDefault();var o=e.editor[0].createTextRange();o.moveToElementText(i[0]);o.execCommand("Paste")}else{var j=e.editorDocument.createRange();j.selectNodeContents(i[0]);e.selectRange(j)}if(e.pasteMode=="text"&&!b.jqx.browser.mozilla){i.select()}e.marker=i;setTimeout(function(){e.selectRange(m);var s=function(B){var z=e.editorDocument.createElement("div");var A=e.editorDocument.createDocumentFragment();z.innerHTML=B;while(z.firstChild){A.appendChild(z.firstChild)}return A};if(e.pasteMode!="text"){var y=s(e.marker.html());if(y.firstChild&&y.firstChild.className==="jqx-editor-paste-element"){var q=[];for(var v=0,t=y.childNodes.length;v"))}var p=document.createElement("div");p.appendChild(y.cloneNode(true));var x=p.innerHTML}else{var x=e.marker.val();if(e.marker.html()!=""&&e.marker.val().indexOf("\n")==-1){var x=e.marker.html();x=x.replace(/ /gm,"");x=x.replace(/\n\n/gm,"\n");x=x.replace(/]*>/gi,"\n");x=x.replace(/]*>/gi,"\n");x=x.replace(/]*>/gi,"\n");e.marker.html(x);var x=e.marker.text()}}var r=h(x,e.pasteMode=="text");var w=e.getRange();e.selection.insertContent(r+" ");e.marker.remove();var u=b(e.editorDocument).find("#INSERTION_MARKER");e.selection.selectNode(u[0],true);if(e.getRange().setStartAfter){e.getRange().setStartAfter(u[0])}u.remove();e.selection.collapse(false);u.removeAttr("id");e._refreshTools();e.changed=true},100);e.updating=false;e.readOnly=false}catch(l){if(console){console.log(l)}}});e.addHandler(e.editor,"keyup.editor"+e.element.id,function(i){if(e._documentMode=="source"){return true}if(e.updating||e.disabled||!e.editable){if(i.preventDefault){i.preventDefault()}if(i.stopPropagation){i.stopPropagation()}return false}e.range=e.getRange();e.changed=true;var h=i||window.event;var g=h.keyCode;var j=[8,9,13,33,34,35,36,37,38,39,40,40,45,46];if(b.inArray(h.keyCode,j)!=-1||(h.keyCode==65&&h.ctrlKey&&!h.altKey&&!h.shiftKey)){e._refreshTools(null,true,h.keyCode)}});e.addHandler(e.editor,"click.editor"+e.element.id,function(g){if(e._documentMode=="source"){return true}if(e.editImage){b(e.editImage).removeClass("jqx-editor-focus");e.editImage=null}if(g.target.tagName.toLowerCase()=="img"){var h=g.target;e.editImage=h;b(e.editImage).addClass("jqx-editor-focus")}});e.addHandler(e.editor,"dblclick.editor"+e.element.id,function(g){if(e._documentMode=="source"){return true}if(g.target.tagName.toLowerCase()=="img"){var h=g.target;if(b("#imageWindow"+this.element.id).length>0){e.editImage=h;e._updateImageWindow()}}})},_updateLinkWindow:function(){var g=this;var i=b("#linkWindow"+this.element.id);i.jqxWindow({position:{center:g.widget}});i.jqxWindow("open");var e=i.find("input");var h=i.find(".jqx-editor-link-checkbox");var f=i.find("button:first");var d=b(i.find("button")[1]);if(g.editLink&&g.editLink.href){e[0].value=g.editLink.href||"";e[1].value=b(g.editLink).text()||g.editLink.href;h.val(b(g.editLink).attr("target")=="_blank");d.show()}else{e[0].value="";e[1].value="";if(!g.selection.isCollapsed()){var j=g.selection.getText();if(j.match(/^(?!:\/\/)([a-zA-Z0-9]+\.)?[a-zA-Z0-9][a-zA-Z0-9-]+\.[a-zA-Z]{2,6}?$/i)){e[0].value=j}else{e[1].value=j}}h.val(false);d.hide()}if(e[0].value.length>0){f.jqxButton({disabled:false})}else{f.jqxButton({disabled:true})}},_updateImageWindow:function(){var g=this;var i=g.editImage;if(!i){i=b("")[0]}var h=b("#imageWindow"+this.element.id);h.jqxWindow({position:{center:g.widget}});h.jqxWindow("open");var e=h.find("input");var d=b(h.find("button")[1]);if(g.editImage){d.show()}else{d.hide()}e[0].value=i.src;if(e[0].value==""){e[0].value=""}e[1].value=i.alt;if(i.style.width!="auto"){e[2].value=i.style.width}else{e[2].value=""}if(i.style.height!="auto"){e[3].value=i.style.height}else{e[3].value=""}if(i.style.marginLeft&&i.style.marginLeft!="0px"){e[4].value=i.style.marginLeft}else{e[4].value=""}if(i.style.marginTop&&i.style.marginTop!="0px"){e[5].value=i.style.marginTop}else{e[5].value=""}var j=h.find(".jqx-editor-align");var f=b(i).css("float");if(f=="left"){j.jqxDropDownList({selectedIndex:1})}else{if(f=="right"){j.jqxDropDownList({selectedIndex:2})}else{j.jqxDropDownList({selectedIndex:0})}}},_removeHandlers:function(){var d=this;if(d.editor){d.removeHandler(d.editor,"paste.editor"+d.element.id);d.removeHandler(d.editor,"blur.editor"+d.element.id);d.removeHandler(d.editor,"focus.editor"+d.element.id);d.removeHandler(d.editor,"click.editor"+d.element.id);d.removeHandler(d.editor,"mousedown.editor"+d.element.id);d.removeHandler(d.editor,"mouseup.editor"+d.element.id);d.removeHandler(d.editor,"keyup.editor"+d.element.id);d.removeHandler(d.editor,"keydown.editor"+d.element.id);d.removeHandler(d.editor,"beforedeactivate.editor"+d.element.id);d.removeHandler(d.editor,"dblclick.editor"+d.element.id)}if(d.toolbar){d.removeHandler(d.toolbar,"mousedown.editor"+d.element.id)}},getParentByTag:function(e,d){var d=d.toLowerCase(),f=e;do{if(d==""||f.nodeName.toLowerCase()==d){return f}}while(f=f.parentNode);return e},isStyleProperty:function(g,f,j,i){var f=f.toLowerCase(),h=g;do{if(h.nodeName.toLowerCase()==f&&h.style[j]==i){return !0}}while(h=h.parentNode);return !1},setStyleProperty:function(e,d){this.style[d]=!1;var f=this.getParentByTag(e,d);f&&f.tagName.toLowerCase()==d&&(this.style[d]=!0);if(d=="del"&&this.getParentByTag(e,"strike")&&this.getParentByTag(e,"strike").tagName.toLowerCase()=="strike"){this.style.del=!0}},updateStyle:function(f){var g=this;var f=g.getSelectedElement()?g.getSelectedElement():f;if(!f||!g.setStyleProperty){return}try{if(window.getComputedStyle){if(f.nodeName.toLowerCase()=="#text"){f=g.editor[0]}var d=window.getComputedStyle(f,null);var i=((d.getPropertyValue("font-weight")==401)?700:d.getPropertyValue("font-weight"));g.style={fontStyle:d.getPropertyValue("font-style"),fontSize:d.getPropertyValue("font-size"),textDecoration:d.getPropertyValue("text-decoration"),fontWeight:i,fontFamily:d.getPropertyValue("font-family"),textAlign:d.getPropertyValue("text-align"),color:g._rgbToHex(d.color),backColor:g._rgbToHex(d.backgroundColor)};g.style.fontStyle=d.getPropertyValue("font-style");g.style.vAlign=d.getPropertyValue("vertical-align");g.style.del=g.isStyleProperty(f,"span","textDecoration","line-through");g.style.u=g.isStyleProperty(f,"span","textDecoration","underline");var h=function(l){var k="transparent";var e="rgba(0, 0, 0, 0)";while(l&&(window.getComputedStyle(l).backgroundColor==k||window.getComputedStyle(l).backgroundColor==e)){l=l.parentNode}return l?window.getComputedStyle(l).backgroundColor:k};if(!g.style.backColor){g.style.backColor=g._rgbToHex(h(f))}}else{var d=f.currentStyle;g.style={fontStyle:d.fontStyle,fontSize:d.fontSize,textDecoration:d.textDecoration,fontWeight:d.fontWeight,fontFamily:d.fontFamily,textAlign:d.textAlign,color:g._rgbToHex(d.color),backColor:g._rgbToHex(d.backgroundColor)}}g.setStyleProperty(f,"h1");g.setStyleProperty(f,"h2");g.setStyleProperty(f,"h3");g.setStyleProperty(f,"h4");g.setStyleProperty(f,"h5");g.setStyleProperty(f,"h6");g.setStyleProperty(f,"del");g.setStyleProperty(f,"sub");g.setStyleProperty(f,"sup");g.setStyleProperty(f,"u");if(f.nodeName.toLowerCase()=="a"){if(g.style.textDecoration=="underline"){g.style.u=true}}if(g.style.h1||g.style.h2||g.style.h3||g.style.h4||g.style.h5||g.style.h6){g.style.heading=true}}catch(j){return null}},_refreshTools:function(e,f,n){var k=this;if(k.updating){return}var e=k.getSelectedElement()?k.getSelectedElement():e;if(!e||!k.setStyleProperty){return}k.updateStyle(e);var o=k.readOnly;k.readOnly=true;if(k.tools!==false){var j=k.tools.split(" ");var l=k.tools.split(" | ");var m=function(i){b.each(i,function(q,r){var p=k.commands[this];if(!p){return true}switch(p.type){case"list":p.widget.jqxDropDownList("clearSelection");p.widget.jqxDropDownList({disabled:k.disabled});break;case"colorPicker":p.val(p.value);p.widget.jqxDropDownButton({disabled:k.disabled});break;case"toggleButton":p.widget.jqxToggleButton("unCheck");p.widget.jqxToggleButton({disabled:k.disabled});break;case"button":default:p.widget.jqxButton({disabled:k.disabled});break}})};if(l.length==0){m(j)}else{for(var h=0;h=0){if(w>8)+", "+((J&16711680)>>16)+")"};var F=r(k.editorDocument.queryCommandValue(t.command));if(t.command=="backcolor"){if(k.style.backColor==null){F="#FFFFFF"}}var z=k._rgbToHex(F);if(z){t.val(z)}else{if(t.command=="forecolor"){t.val(k.style.color)}else{if(t.command=="backcolor"){t.val(k.style.backColor)}}}break;case"toggleButton":if(t.command=="viewsource"){return}if(!t.command){return}var q=false;var p=k.editorDocument.queryCommandState(t.command)&&k.editorDocument.queryCommandEnabled(t.command);if(t.command=="createlink"&&e.nodeName.toLowerCase()=="a"){var y=true;if(b(e).text().indexOf(k.selection.getText())==-1&&k.selection.getText()!=""){y=false}if(y){if(k.linkPopup){k.linkPopup.remove()}p=true;k.linkPopup=b("").appendTo(k.editor);var u=b(e).coord();var v=u.left;if(u.left+k.linkPopup.width()>k.editor.width()){v=k.editor.width()-k.linkPopup.width()-15}k.linkPopup.offset({top:b(e).height()+u.top+5,left:v});k.addHandler(k.linkPopup,"mousedown",function(K){if(K.target&&K.target.href){var J=b(K.target).index();switch(J){case 1:k.editor.focus();k.selection.selectNode(e,true);k.commands.link.widget.trigger("click");break;case 2:try{k.editor.focus();k.selection.selectNode(e);k.execute("unlink");k.commands.underline.toggled=false;k.selection.collapse(false);k._refreshTools()}catch(L){}break;default:window.open(K.target.href,"_blank");break}}if(K.preventDefault){K.preventDefault()}if(K.stopPropagation){K.stopPropagation()}return false})}}if(t.command=="bold"){if(k.style.fontWeight&&(k.style.fontWeight>=600||k.style.fontWeight=="bold")){q=true}if(k.selection.isCollapsed()){t.toggled=p}else{t.toggled=p||q}p=t.toggled}else{if(t.command=="italic"){if(k.style.fontStyle&&k.style.fontStyle=="italic"){q=true}if(!f){p=t.toggled}else{t.toggled=p}}else{if(t.command=="underline"){if(k.style.u){q=true}if(!f){p=t.toggled}else{t.toggled=p}}else{if(t.command=="justifyleft"){if(k.style.textAlign=="left"){q=true}}else{if(t.command=="justifyright"){if(k.style.textAlign=="right"){q=true}}else{if(t.command=="justifycenter"){if(k.style.textAlign=="center"){q=true}}else{if(t.command=="justifyfull"){if(k.style.textAlign=="justify"){q=true}}else{b.each(k.style,function(J,K){if(t.command==J.toLowerCase()){q=true}})}}}}}}}var G=p;if(q&&t.command.indexOf("justify")!=-1){t.widget.jqxToggleButton("check")}else{if(G){t.widget.jqxToggleButton("check")}else{if(q&&k.range.collapsed===false){t.widget.jqxToggleButton("check")}else{if(b.jqx.browser.msie&&b.jqx.browser.version<9&&q&&!k.selection.isCollapsed()){t.widget.jqxToggleButton("check")}}}}break;case"button":default:if(t.refresh){t.refresh(t.widget,k.style)}break}})};if(l.length==0){g(j)}else{for(var h=0;h0){b(".jqx-editor-dropdownpicker").jqxDropDownButton("close")}if(b(".jqx-editor-dropdownlist").length>0){b(".jqx-editor-dropdownlist").jqxDropDownList("close")}}if(d.preventDefault){d.preventDefault()}if(d.stopPropagation){d.stopPropagation()}d.cancelBubble=true;d.returnValue=false},_addCommandHandler:function(g,f,j,i,d){var e=this;var h;if(!j&&d.init){j="custom"}switch(j){case"custom":switch(d.type){case"list":h=function(k){if(e._documentMode!="source"){if(k.args.type!="none"){d.value=b(this).val();e.execute("custom",d);if(!e.readOnly){e._refreshTools()}}}e._preventDefault(k,false)};break;case"colorPicker":h=function(m){if(e._documentMode!="source"){var k=b(d.colorPicker).find("td").removeClass("jqx-editor-color-picker-selected-cell");if(m.target.nodeName.toLowerCase()=="div"){var l=b(m.target).css("background-color");b(m.target).parent().addClass("jqx-editor-color-picker-selected-cell")}else{var l=b(m.target).find("div").css("background-color");b(m.target).addClass("jqx-editor-color-picker-selected-cell")}b("#bar-"+j).css("background",l);d.widget.val=function(){var o=function(q){if(typeof q!="number"){return q}return"rgb("+(q&255)+", "+((q&65280)>>8)+", "+((q&16711680)>>16)+")"};var p=o(l);var n=e._rgbToHex(p);return n};d.widget.jqxDropDownButton("close");e.execute("custom",d)}e._preventDefault(m);return false};break;case"button":case"toggleButton":default:h=function(k){if(b(".jqx-editor-dropdownpicker").length>0){b(".jqx-editor-dropdownpicker").jqxDropDownButton("close")}if(b(".jqx-editor-dropdownlist").length>0){b(".jqx-editor-dropdownlist").jqxDropDownList("close")}e._preventDefault(k);var m=b(this).attr("data-command");var l=this;if(e._documentMode!="source"){if(d.toggle){d.toggle()}e.execute("custom",d);e._refreshTools()}return false};break}break;case"formatblock":h=function(k){if(e._documentMode!="source"){if(k.args.type!="none"){e.execute(b(this).attr("data-command"),"<"+b(this).val()+">",d);if(!e.readOnly){e.commands.bold.toggled=false;e._refreshTools()}}}e._preventDefault(k,false)};break;case"fontsize":h=function(k){if(e._documentMode!="source"){if(k.args.type!="none"){var m=b(this).val();var n="xx-small,x-small,small,medium,large,x-large,xx-large".split(",");var l=b(this).jqxDropDownList("getSelectedIndex")+1;var l=1+n.indexOf(m);e.execute(b(this).attr("data-command"),l,d)}}e._preventDefault(k,false)};break;case"fontname":h=function(k){if(e._documentMode!="source"){if(k.args.type!="none"){var l=b(this).val();e.execute(b(this).attr("data-command"),l,d)}}e._preventDefault(k,false)};break;case"forecolor":case"backcolor":h=function(m){if(e._documentMode!="source"){var k=b(d.colorPicker).find("td").removeClass("jqx-editor-color-picker-selected-cell");if(m.target.nodeName.toLowerCase()=="div"){var l=b(m.target).css("background-color");b(m.target).parent().addClass("jqx-editor-color-picker-selected-cell")}else{var l=b(m.target).find("div").css("background-color");b(m.target).addClass("jqx-editor-color-picker-selected-cell")}b("#bar-"+j).css("background",l);d.widget.jqxDropDownButton("close");e.execute(j,l,d)}e._preventDefault(m);return false};break;case"viewsource":h=function(k){if(e.linkPopup){e.linkPopup.remove()}d.toggle();e.setMode(d.toggled);if(b(".jqx-editor-dropdownpicker").length>0){b(".jqx-editor-dropdownpicker").jqxDropDownButton("close")}if(b(".jqx-editor-dropdownlist").length>0){b(".jqx-editor-dropdownlist").jqxDropDownList("close")}e._preventDefault(k);return false};break;case"insertimage":h=function(k){e._insertImageAction(k,e,d)};break;case"createlink":h=function(k){e._createLinkAction(k,e,d)};break;default:h=function(k){if(b(".jqx-editor-dropdownpicker").length>0){b(".jqx-editor-dropdownpicker").jqxDropDownButton("close")}if(b(".jqx-editor-dropdownlist").length>0){b(".jqx-editor-dropdownlist").jqxDropDownList("close")}e._preventDefault(k);var n=b(this).attr("data-command");var l=this;if(e._documentMode!="source"){if(n=="underline"){if(e.getSelectedElement()){var m=e.getSelectedElement();if(m&&m.nodeName.toLowerCase()=="a"){if(d.toggled){b(m).css("text-decoration","none")}else{b(m).css("text-decoration","underline")}d.toggle();e._refreshTools();return false}}}if(d.toggle){d.toggle()}e.execute(n,b(this).val(),d);e._refreshTools()}return false};break}e.addHandler(g,f,h);return false},_createLinkAction:function(d,k,l){var k=this;if(k._documentMode=="source"){k._preventDefault(d);return}if(!k.focused){k.editor.focus()}k.range=k.getRange();var e=k.getSelectedElement();if(e.nodeName.toLowerCase()=="a"){k.editLink=e}else{k.editLink=null}if(b("#linkWindow"+this.element.id).length>0){if(k.editLink){k.selection.selectNode(e,true)}k._updateLinkWindow();k._preventDefault(d);return false}var m=b("");m[0].id="linkWindow"+this.element.id;var j=m.find("input");j.addClass(k.toThemeProperty("jqx-widget"));j.addClass(k.toThemeProperty("jqx-widget-content"));j.addClass(k.toThemeProperty("jqx-input"));var i=m.find(".jqx-editor-link-checkbox").jqxCheckBox({theme:k.theme,height:23,width:180});var g=m.find("button:first").jqxButton({theme:k.theme,disabled:true});var o=b(m.find("button")[1]).jqxButton({theme:k.theme});var h=m.find("button:last").jqxButton({theme:k.theme});g.val(k.localization.Ok);h.val(k.localization.Cancel);o.val(k.localization.Remove);k.addHandler(h,!b.jqx.mobile.isTouchDevice()?"click":b.jqx.mobile.getTouchEventName("touchstart"),function(p){k.editor.focus();k.selectRange(k.range);k._refreshTools();k._preventDefault(p)});if(!k.editLink||(k.editLink&&!k.editLink.href)){o.hide()}var f=false;k.addHandler(b(j[0]),"focus",function(){if(j[1].value==""||j[1].value==j[0].value){f=true}else{f=false}});k.addHandler(b(j[1]),"keyup",function(p){if(p.keyCode){if(p.keyCode==13){g.trigger("click")}if(p.keyCode==27){h.trigger("click")}}});k.addHandler(b(j[0]),"keyup change",function(p){if(j[0].value.length>0){g.jqxButton({disabled:false})}else{g.jqxButton({disabled:true})}if(f){j[1].value=j[0].value}if(p.keyCode){if(p.keyCode==13){g.trigger("click")}if(p.keyCode==27){h.trigger("click")}}});k.addHandler(o,!b.jqx.mobile.isTouchDevice()?"click":b.jqx.mobile.getTouchEventName("touchstart"),function(p){m.jqxWindow("close");try{k.editor.focus();k.selection.selectNode(k.editLink);k.execute("unlink");k.selection.collapse(false);k.commands.underline.toggled=false;k._refreshTools()}catch(q){}k._preventDefault(p)});k.addHandler(g,!b.jqx.mobile.isTouchDevice()?"click":b.jqx.mobile.getTouchEventName("touchstart"),function(s){var q=m.find("input");var r=b(""+(q[1].value||q[0].value)+"");if(i.val()){r.attr("target","_blank")}r[0].href=b.trim(q[0].value);if(q[0].value.indexOf("http")==-1&&q[0].value.indexOf("mailto")==-1){r[0].href="http://"+b.trim(q[0].value)}if(!k.focused){k.editor.focus()}if(k.range){k.selectRange(k.range)}if(k.editLink){b(k.editLink).remove()}k.execute("insertHTML",""+r[0].outerHTML+" ",l);k.editor.focus();var p=b(k.editorDocument).find("#INSERTION_MARKER");k.selection.selectNode(p[0],true);if(k.getRange().setStartAfter){k.getRange().setStartAfter(p[0])}p.remove();k.selection.collapse(false);k._refreshTools();k._preventDefault(s)});k.updating=true;m.appendTo(document.body);k.addHandler(m,"open",function(){k.updating=true;setTimeout(function(){k.range=k.getRange();b(j[0]).focus()},25)});m.jqxWindow({resizable:false,width:280,okButton:g,cancelButton:h,theme:k.theme,isModal:true,position:{center:k.widget}});k.addHandler(m,"close",function(){k.updating=false});if(!k.focused){k.editor.focus();k.selectRange(k.range)}if(k.editLink){j[0].value=k.editLink.href||"";j[1].value=b(k.editLink).text();i.val(b(k.editLink).attr("target")=="_blank")}else{if(!k.selection.isCollapsed()){var n=k.selection.getText();if(n.match(/^(?!:\/\/)([a-zA-Z0-9]+\.)?[a-zA-Z0-9][a-zA-Z0-9-]+\.[a-zA-Z]{2,6}?$/i)){j[0].value=n}else{j[1].value=n}}}if(j[0].value.length>0){g.jqxButton({disabled:false})}else{g.jqxButton({disabled:true})}k._preventDefault(d);return false},_insertImageAction:function(j,i,g){if(i._documentMode=="source"){i._preventDefault(j);return}if(!i.focused){i.editor.focus()}i.range=i.getRange();if(b("#imageWindow"+this.element.id).length>0){i._updateImageWindow();i._preventDefault(j);return false}var h=b("
"+i.localization["Insert Image"]+"
"+i.localization.URL+":
"+i.localization["Alt Text"]+":
"+i.localization.Width+":
"+i.localization.Height+":
"+i.localization.HSpace+":
"+i.localization.VSpace+":
"+i.localization.Align+":
");h[0].id="imageWindow"+this.element.id;var e=h.find("input");e.addClass(i.toThemeProperty("jqx-widget"));e.addClass(i.toThemeProperty("jqx-widget-content"));e.addClass(i.toThemeProperty("jqx-input"));h.find(".jqx-editor-align").jqxDropDownList({hint:false,autoDropDownHeight:true,selectedIndex:0,theme:i.theme,height:23,width:180,source:[i.localization["not set"],i.localization.Left,i.localization.Right]});var f=h.find("button:first").jqxButton({theme:i.theme});var k=h.find("button:last").jqxButton({theme:i.theme});var d=b(h.find("button")[1]).jqxButton({theme:i.theme});f.val(i.localization.Ok);k.val(i.localization.Cancel);d.val(i.localization.Remove);d.hide();i.addHandler(d,!b.jqx.mobile.isTouchDevice()?"click":b.jqx.mobile.getTouchEventName("touchstart"),function(l){b(i.editImage).removeClass("jqx-editor-focus");b(i.editImage).remove();i.editImage=null;i._preventDefault(l);h.jqxWindow("close");i._raiseEvent("change")});i.addHandler(k,!b.jqx.mobile.isTouchDevice()?"click":b.jqx.mobile.getTouchEventName("touchstart"),function(l){b(i.editImage).removeClass("jqx-editor-focus");i.editImage=null;i._preventDefault(l)});i.addHandler(f,!b.jqx.mobile.isTouchDevice()?"click":b.jqx.mobile.getTouchEventName("touchstart"),function(o){b(i.editImage).removeClass("jqx-editor-focus");var m=h.find("input");var p=i.editImage?b(i.editImage):b('');var n=p.attr("src",m[0].value).attr("unselectable","on");if(m[1].value){n.attr("alt",m[1].value).attr("title",m[1].value)}if(m[2].value&&!isNaN(parseInt(m[2].value))){n.width(m[2].value)}else{n.css("width","auto")}if(m[3].value&&!isNaN(parseInt(m[3].value))){n.height(m[3].value)}else{n.css("height","auto")}if(m[4].value){if(m[4].value.toString()=="auto"){n.css("margin-left","auto");n.css("margin-right","auto")}else{if(m[4].value.toString().indexOf("%")!=-1){n.css("margin-left",parseInt(m[4].value)+"%");n.css("margin-right",parseInt(m[4].value)+"%")}else{n.css("margin-left",parseInt(m[4].value)+"px");n.css("margin-right",parseInt(m[4].value)+"px")}}}else{n.css("margin-left","0px");n.css("margin-right","0px")}if(m[5].value){if(m[5].value.toString()=="auto"){n.css("margin-top","auto");n.css("margin-bottom","auto")}else{if(m[5].value.toString().indexOf("%")!=-1){n.css("margin-top",parseInt(m[5].value)+"%");n.css("margin-bottom",parseInt(m[5].value)+"%")}else{n.css("margin-top",parseInt(m[5].value)+"px");n.css("margin-bottom",parseInt(m[5].value)+"px")}}}else{n.css("margin-top","0px");n.css("margin-bottom","0px")}var q=h.find(".jqx-editor-align").jqxDropDownList("selectedIndex");if(q==1){n.css("float","left")}else{if(q==2){n.css("float","right")}else{if(q==0){n.css("float","none")}}}n.css("resize",false);n[0].oncontrolselect=function(){return false};n[0].selectstart=function(){return false};if(!i.editImage){if(!i.focused){i.editor.focus()}if(i.range){i.selectRange(i.range)}i.execute("insertHTML",n[0].outerHTML+" ",g);i.editor.focus();var l=b(i.editorDocument).find("#INSERTION_MARKER");i.selection.selectNode(l[0],true);if(i.getRange().setStartAfter){i.getRange().setStartAfter(l[0])}l.remove();i.selection.collapse(false);i._refreshTools();i._preventDefault(o)}i.editImage=null;i._preventDefault(o)});h.appendTo(document.body);i.updating=true;i.addHandler(h,"open",function(){i.updating=true;setTimeout(function(){i.range=i.getRange();b(e[0]).focus()},25)});h.jqxWindow({resizable:false,width:280,okButton:f,cancelButton:k,theme:i.theme,isModal:true,position:{center:i.widget}});i.addHandler(h,"close",function(){i.updating=false});if(!i.focused){i.editor.focus();i.selectRange(i.range)}i._preventDefault(j);return false},editmode:function(f){var e=this;if(!f&&!e.readOnly){e._removeHandlers();e.editor.attr("contentEditable",false);var d=document.createTextNode(e.editor.html());var g=b("
");g.html(d).attr({id:"sourceText",contentEditable:true}).css("height","100%");e.editor.html(g);if(e.buttons.hasOwnProperty("html")){e.buttons.html.addClass("active")}g.focus()}else{if(f&&e.readOnly){var d=e.editor.find("#sourceText").text();e.editor.html(d);if(e.buttons.hasOwnProperty("html")){e.buttons.html.removeClass("active")}e.editor.attr("contentEditable",true);e._addHandlers()}}e.readOnly=!f},setMode:function(f){var i=this;if(!i.range){i.editor.focus();i.range=i.getRange()}var h;var e=i.editor[0];if(f){i._documentMode="source";var k=new c();var j=k.HTMLtoXML(e.innerHTML);j=k.FormatHTML(j);h=document.createTextNode(j);e.innerHTML="";var d=document.createElement("pre");e.contentEditable=false;d.style.height="100%";d.style.margin="0px";d.style.outline="none";d.style.display="block";d.id="sourceText";d.contentEditable=true;d.appendChild(h);e.appendChild(d);this.readOnly=true}else{this._documentMode="html";if(document.all){e.innerHTML=e.innerText}else{if(e.textContent){e.innerHTML=e.textContent}else{h=document.createRange();h.selectNodeContents(e.firstChild);e.innerHTML=h.toString()}}e.contentEditable=true;i.readOnly=false;i._refreshTools();i.editor.focus();i.selection.selectNode(i.editor[0]);i.editor.scrollTop(0);i.selection.collapse(true)}b.each(this.commands,function(){if(this.widget){if(this.command!="viewsource"){switch(this.type){case"list":this.widget.jqxDropDownList({disabled:f});break;case"colorPicker":this.widget.jqxDropDownButton({disabled:f});break;case"button":this.widget.jqxButton({disabled:f});break;case"toggleButton":this.widget.jqxToggleButton({toggled:false,disabled:f});break}}}});i.editor.focus();if(b.jqx.browser.mozilla){var g=b("anchor");i.editor.prepend(g);g.focus();g.remove();i.selection.collapse(true)}if(i.commands.html.widget){i.commands.html.widget.jqxToggleButton({toggled:f=="source"||f==true});i.commands.html.toggled=f=="source"||f==true}},execute:function(i,f,e){var g=this;if(!g.readOnly){var j=g.editorDocument;if(g._documentMode=="source"){return}g.changeType="mouse";if(g.linkPopup){g.linkPopup.remove()}g.editor.focus();if(b.jqx.browser.mozilla){}if(b.jqx.mobile.isTouchDevice()){setTimeout(function(){},25)}var d=function(m){try{if(m.command&&m.command.toLowerCase()=="inserthtml"){var l=g.getRange();var n=m.value;if(n.toString().indexOf("<")==-1){n=""+m.value+""}g.selection.insertContent(""+n+" ");g.selectRange(l);setTimeout(function(){var p=b(g.editorDocument).find("#INSERTION_MARKER");g.selection.selectNode(b(p).prev()[0],true);p.remove();g.selection.collapse(false)},10)}else{if(m.command){if(j.queryCommandEnabled(m.command)){j.execCommand(m.command,false,m.value)}else{return false}}else{if(j.queryCommandEnabled(m)){j.execCommand(m,false,m)}else{return false}}}}catch(o){}};if(i=="custom"){var h=f.action(f.widget,g.editor);if(h){d(h)}}else{try{if(e&&e.action){var h=e.action(e.widget,g.editor);d(h)}else{if(j.queryCommandEnabled(i)){j.execCommand(i,false,f)}else{if(i=="insertHTML"){g.selection.insertContent(f)}else{return false}}}}catch(k){if(i=="insertHTML"){g.selection.insertContent(f)}else{return false}}}if(b.jqx.mobile.isTouchDevice()){setTimeout(function(){if(g.iframe){g.iframe[0].contentWindow.focus()}},500)}g._raiseEvent("change",{command:i,args:f});g.changed=true;g.range=g.getRange()}},destroy:function(){var h=this;h._removeHandlers();var l=h.tools.split(" ");var g=h.tools.split(" | ");b.jqx.utilities.resize(this.host,null,true);var f=function(i){b.each(i,function(n,o){var m=h.commands[this];if(!m){return true}switch(m.type){case"list":m.widget.jqxDropDownList("destroy");break;case"colorPicker":m.colorPicker.remove();m.widget.jqxDropDownButton("destroy");break;case"toggleButton":m.widget.jqxToggleButton("destroy");break;case"custom":if(h.destroyTool){h.destroyTool(this)}break;case"button":default:m.widget.jqxToggleButton("destroy");if(m.command==="insertimage"){if(b("#imageWindow"+h.element.id).length>0){b("#imageWindow"+h.element.id).find(".jqx-editor-align").jqxDropDownList("destroy");b("#imageWindow"+h.element.id).find("button").jqxButton("destroy")}}else{if(m.command==="createlink"){if(b("#linkWindow"+h.element.id).length>0){b("#linkWindow"+h.element.id).find(".jqx-editor-align").jqxDropDownList("destroy");b("#linkWindow"+h.element.id).find("button").jqxButton("destroy");b("#linkWindow"+h.element.id).find(".jqx-editor-link-checkbox").jqxCheckBox("destroy")}}}break}})};if(g.length==0){f(l)}else{for(var e=0;e0){j.jqxWindow("destroy")}if(k&&k.length>0){k.jqxWindow("destroy")}if(h.inline){h.toolbar.remove()}else{h.widget.remove();h.host.remove()}h.iframe.remove();h.iframe=null;h.selection=null;h.editorDocument=null;h.contentEditableElement=null},val:function(e){if(e!==undefined&&e==="source"){var d=this.editor[0];if(this._documentMode==="source"){d=this.editor.find("pre:first")[0]}var g=new c();var f=g.HTMLtoXML(d.innerHTML);f=g.FormatHTML(f);return f}if(e!=undefined&&typeof e!="object"){this.editor.html(e)}if(this._documentMode==="source"){return this.editor.find("pre:first").html()}return this.editor.html()},_raiseEvent:function(i,e){if(e==undefined){e={owner:null}}if(this._documentMode=="source"){return true}var f=i;e.type=this.changeType;this.changeType=null;var g=e;g.owner=this;var h=new b.Event(f);h.owner=this;h.args=g;if(this._textArea){var d=b(this._textArea).trigger(h)}else{var d=this.host.trigger(h)}e=h.args;return d}});var a=function(d){var e={initialize:function(f){this.document=f},getSelection:function(){return(this.document.getSelection)?this.document.getSelection():this.document.selection},getRange:function(){var f=this.getSelection();if(!f){return null}try{return f.rangeCount>0?f.getRangeAt(0):(this.document.createRange?this.document.createRange():this.document.selection.createRange())}catch(g){return this.document.body.createTextRange()}},selectRange:function(f){if(f.select){f.select()}else{var g=this.getSelection();if(g.addRange){g.removeAllRanges();g.addRange(f)}}},selectNode:function(i,j){var h=this.getRange();var g=this.getSelection();if(h.moveToElementText){h.moveToElementText(i);h.select()}else{if(g.addRange){try{j?h.selectNodeContents(i):h.selectNode(i);g.removeAllRanges();g.addRange(h)}catch(f){var k=f}}else{g.setBaseAndExtent(i,0,i,1)}}return i},isCollapsed:function(){var f=this.getRange();if(f.item){return false}return f.boundingWidth==0||this.getSelection().isCollapsed},collapse:function(f){var h=this.getRange();var g=this.getSelection();if(h.select){h.collapse(f);h.select()}else{f?g.collapseToStart():g.collapseToEnd()}},getContent:function(){var h=this.getRange();var f=b("
")[0];if(this.isCollapsed()){return""}if(h.cloneContents){f.appendChild(h.cloneContents())}else{if(h.item!=undefined||h.htmlText!=undefined){b(f).html(h.item?h.item(0).outerHTML:h.htmlText)}else{b(f).html(h.toString())}}var g=b(f).html();return g},getText:function(){var g=this.getRange();var f=this.getSelection();return this.isCollapsed()?"":g.text||(f.toString?f.toString():"")},getNode:function(){var g=this.getRange();if(!b.jqx.browser.msie||b.jqx.browser.version>=9){var f=null;if(g){f=g.commonAncestorContainer;if(!g.collapsed){if(g.startContainer==g.endContainer){if(g.startOffset-g.endOffset<2){if(g.startContainer.hasChildNodes()){f=g.startContainer.childNodes[g.startOffset]}}}}while(typeof(f)!="element"){f=f.parentNode}}return d.id(f)}return d.id(g.item?g.item(0):g.parentElement())},insertContent:function(i){var h=this.getRange();if(h.pasteHTML){h.pasteHTML(i);h.collapse(false);h.select()}else{if(h.insertNode){h.deleteContents();if(h.createContextualFragment){h.insertNode(h.createContextualFragment(i))}else{var j=this.document;var g=j.createDocumentFragment();var f=j.createElement("div");g.appendChild(f);f.outerHTML=i;h.insertNode(g)}}}}};e.initialize(d);return e};var c=function(){var n=/^<([-A-Za-z0-9_]+)((?:\s+\w+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,f=/^<\/([-A-Za-z0-9_]+)[^>]*>/,j=/([-A-Za-z0-9_]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;var i=e("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed");var d=e("address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul");var l=e("a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var");var g=e("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");var m=e("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected");var k=e("script,style");var h=this.HTMLParser=function(p,x){var s,t,q,u=[],v=p;u.last=function(){return this[this.length-1]};while(p){t=true;if(!u.last()||!k[u.last()]){if(p.indexOf("");if(s>=0){if(x.comment){x.comment(p.substring(4,s))}p=p.substring(s+3);t=false}}else{if(p.indexOf("]*>"),function(y,z){z=z.replace(//g,"$1").replace(//g,"$1");if(x.chars){x.chars(z)}return""});r("",u.last())}v=p}r();function o(y,B,C,z){B=B.toLowerCase();if(d[B]){while(u.last()&&l[u.last()]){r("",u.last())}}if(g[B]&&u.last()==B){r("",B)}z=i[B]||!!z;if(!z){u.push(B)}if(x.start){var A=[];C.replace(j,function(E,D){var F=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:m[D]?D:"";A.push({name:D,value:F,escaped:F.replace(/(^|[^\\])"/g,'$1\\"')})});if(x.start){x.start(B,A,z)}}}function r(y,A){if(!A){var B=0}else{for(var B=u.length-1;B>=0;B--){if(u[B].toLowerCase()==A.toLowerCase()){break}}}if(B>=0){for(var z=u.length-1;z>=B;z--){if(x.end){x.end(u[z])}}u.length=B}}};this.HTMLtoXML=function(p){var o="";p=p.replace(/\r/ig,"");p=p.replace(/\n/ig,"");h(p,{start:function(q,s,r){o+="<"+q;for(var t=0;t"},end:function(q){o+="\r\n"},chars:function(q){o+=q},comment:function(q){o+=""}});return o};this.FormatHTML=function(D,r){var H,C,A,u,v,G;r=r||{};C=r.indent_size||4;A=r.indent_char||" ";v=r.brace_style||"collapse";u=Infinity;G=r.unformatted||["a","span","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"];function q(){this.pos=0;this.token="";this.current_mode="CONTENT";this.tags={parent:"parent1",parentcount:1,parent1:""};this.tag_type="";this.token_text=this.last_token=this.last_text=this.token_type="";this.Utils={whitespace:"\n\r\t ".split(""),single_token:"br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed,?php,?,?=".split(","),extra_liners:"head,body,/html".split(","),in_array:function(J,t){for(var I=0;I=this.input.length){return J.length?J.join(""):["","TK_EOF"]}t=this.input.charAt(this.pos);this.pos++;this.line_char_count++;if(this.Utils.in_array(t,this.Utils.whitespace)){if(J.length){K=true}this.line_char_count--;continue}else{if(K){if(this.line_char_count>=this.max_char){J.push("\n");for(var I=0;I","igm");L.lastIndex=this.pos;var I=L.exec(this.input);var M=I?I.index:this.input.length;if(this.pos=this.input.length){return M.length?M.join(""):["","TK_EOF"]}K=this.input.charAt(this.pos);this.pos++;this.line_char_count++;if(this.Utils.in_array(K,this.Utils.whitespace)){t=true;this.line_char_count--;continue}if(K==="'"||K==='"'){if(!M[1]||M[1]!=="!"){K+=this.get_unformatted(K);t=true}}if(K==="="){t=false}if(M.length&&M[M.length-1]!=="="&&K!==">"&&t){if(this.line_char_count>=this.max_char){this.print_newline(false,M);this.line_char_count=0}else{M.push(" ");this.line_char_count++}t=false}if(K==="<"){O=this.pos-1}M.push(K)}while(K!==">");var P=M.join("");var I;if(P.indexOf(" ")!=-1){I=P.indexOf(" ")}else{I=P.indexOf(">")}var N=P.substring(1,I).toLowerCase();if(P.charAt(P.length-2)==="/"||this.Utils.in_array(N,this.Utils.single_token)){this.tag_type="SINGLE"}else{if(N==="script"){this.record_tag(N);this.tag_type="SCRIPT"}else{if(N==="style"){this.record_tag(N);this.tag_type="STYLE"}else{if(this.Utils.in_array(N,G)){var L=this.get_unformatted("",P);M.push(L);if(O>0&&this.Utils.in_array(this.input.charAt(O-1),this.Utils.whitespace)){M.splice(0,0,this.input.charAt(O-1))}J=this.pos-1;if(this.Utils.in_array(this.input.charAt(J+1),this.Utils.whitespace)){M.push(this.input.charAt(J+1))}this.tag_type="SINGLE"}else{if(N.charAt(0)==="!"){if(N.indexOf("[if")!=-1){if(P.indexOf("!IE")!=-1){var L=this.get_unformatted("-->",P);M.push(L)}this.tag_type="START"}else{if(N.indexOf("[endif")!=-1){this.tag_type="END";this.unindent()}else{if(N.indexOf("[cdata[")!=-1){var L=this.get_unformatted("]]>",P);M.push(L);this.tag_type="SINGLE"}else{var L=this.get_unformatted("-->",P);M.push(L);this.tag_type="SINGLE"}}}}else{if(N.charAt(0)==="/"){this.retrieve_tag(N.substring(1));this.tag_type="END"}else{this.record_tag(N);this.tag_type="START"}if(this.Utils.in_array(N,this.Utils.extra_liners)){this.print_newline(true,this.output)}}}}}}return M.join("")};this.get_unformatted=function(I,J){if(J&&J.indexOf(I)!=-1){return""}var t="";var K="";var L=true;do{if(this.pos>=this.input.length){return K}t=this.input.charAt(this.pos);this.pos++;if(this.Utils.in_array(t,this.Utils.whitespace)){if(!L){this.line_char_count--;continue}if(t==="\n"||t==="\r"){K+="\n";this.line_char_count=0;continue}}K+=t;this.line_char_count++;L=true}while(K.indexOf(I)==-1);return K};this.get_token=function(){var t;if(this.last_token==="TK_TAG_SCRIPT"||this.last_token==="TK_TAG_STYLE"){var I=this.last_token.substr(7);t=this.get_contents_to(I);if(typeof t!=="string"){return t}return[t,"TK_"+I]}if(this.current_mode==="CONTENT"){t=this.get_content();if(typeof t!=="string"){return t}else{return[t,"TK_CONTENT"]}}if(this.current_mode==="TAG"){t=this.get_tag();if(typeof t!=="string"){return t}else{var J="TK_TAG_"+this.tag_type;return[t,J]}}};this.get_full_indent=function(t){t=this.indent_level+t||0;if(t<1){return""}return Array(t+1).join(this.indent_string)};this.printer=function(K,J,t,M,L){this.input=K||"";this.output=[];this.indent_character=J;this.indent_string="";this.indent_size=t;this.brace_style=L;this.indent_level=0;this.max_char=M;this.line_char_count=0;for(var I=0;I0){this.indent_level--}}};return this}H=new q();H.printer(D,A,C,u,v);while(true){var w=H.get_token();H.token_text=w[0];H.token_type=w[1];if(H.token_type==="TK_EOF"){break}switch(H.token_type){case"TK_TAG_START":H.print_newline(false,H.output);H.print_token(H.token_text);H.indent();H.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":H.print_newline(false,H.output);H.print_token(H.token_text);H.current_mode="CONTENT";break;case"TK_TAG_END":if(H.last_token==="TK_CONTENT"&&H.last_text===""){var F=H.token_text.match(/\w+/)[0];var y=H.output[H.output.length-1].match(/<\s*(\w+)/);if(y===null||y[1]!==F){H.print_newline(true,H.output)}}H.print_token(H.token_text);H.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var o=H.token_text.match(/^\s*<([a-z]+)/i);if(!o||!H.Utils.in_array(o[1],G)){H.print_newline(false,H.output)}H.print_token(H.token_text);H.current_mode="CONTENT";break;case"TK_CONTENT":if(H.token_text!==""){H.print_token(H.token_text)}H.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(H.token_text!==""){H.output.push("\n");var x=H.token_text;if(r.indent_scripts=="keep"){var z=0}else{if(r.indent_scripts=="separate"){var z=-H.indent_level}else{var z=1}}var p=H.get_full_indent(z);var s=x.match(/^\s*/)[0];var B=s.match(/[^\n\r]*$/)[0].split(H.indent_string).length-1;var E=H.get_full_indent(z-B);x=x.replace(/^\s*/,p).replace(/\r\n|\r|\n/g,"\n"+E).replace(/\s*$/,"");if(x){H.print_token(x);H.print_newline(true,H.output)}}H.current_mode="TAG";break}H.last_token=H.token_type;H.last_text=H.token_text}return H.output.join("")};function e(r){var q={},o=r.split(",");for(var p=0;p"}this._gaugeParent=m.children();this._gaugeParent.width(e);this._gaugeParent.height(l);if(!f){this.renderer.init(this._gaugeParent)}else{var h=this.renderer.getContainer();h[0].style.width=e+"px";h[0].style.height=l+"px"}},_initRenderer:function(e){if(!d.jqx.createRenderer){throw"Please include a reference to jqxdraw.js"}return d.jqx.createRenderer(this,e)},_refresh:function(f){var e=this;if(f){e._ticksIterator=0;e._labelsIterator=0;if(e._ranges){d(e._ranges).remove()}if(e._pointer){d(e._pointer).remove()}e._pointer=null;e._ranges=[];if(e.niceInterval){if(e._labels){d(e._labels).remove()}e._labels=[];if(e._ticks){d(e._ticks).remove();e._ticks=[]}}e._hostInit(f);e._render(f);return}if(!e.renderer){e._isVML=false;e.host.empty();e._initRenderer(e.host)}var g=e.renderer;if(!g){return}if(e._ranges){d(e._ranges).remove()}if(e._pointer){d(e._pointer).remove()}if(e._labels){d(e._labels).remove()}if(e._cap){d(e._cap).remove()}if(e._ticks){d(e._ticks).remove()}if(e._border){d(e._border).remove()}if(e._caption){d(e._caption).remove()}e._caption=null;e._labels=[];e._cap=null;e._ticks=[];e._ranges=[];e._border=null;e._pointer=null;e._validateProperties();e._removeElements();e._hostInit();e._render();e.setValue(this.value,0);e._editableLabels()},val:function(e){if(arguments.length==0||typeof(e)=="object"){return this.value}this.setValue(e,0)},refresh:function(e){if(e===true){return}this._refresh.apply(this,Array.prototype.slice(arguments))},_outerBorderOffset:function(){var e=parseInt(this.border.style["stroke-width"],10)||1;return e/2},_removeCollection:function(f){for(var e=0;e=1?i:new Number(i).toFixed(2),distance:u._getDistance(u._getLabelsDistance()),style:u.labels.className},k)}}var n=0;if(u.int64==="s"){if(this.tickMode==="default"){if(this.niceInterval){v=this._getNiceInterval("radial");q=this._getNiceInterval("radial",true)}else{v=new d.jqx.math().fromString((g.interval).toString(),10);q=new d.jqx.math().fromString((w.interval).toString(),10)}}else{p=this._max64.subtract(this._min64);q=p.div(new d.jqx.math().fromString((w.number).toString(),10));v=p.div(new d.jqx.math().fromString((g.number).toString(),10))}if(this.niceInterval){o(this._min64);e(this._min64);var f=this._min64.subtract(this._min64.modulo(v)).add(v),t;for(var r=f;r.greaterThanOrEqual(this._min64);r=r.subtract(q)){t=r}for(var m=t,l=f;m.lessThan(this._max64)||l.lessThan(this._max64);m=m.add(q),l=l.add(v)){n+=1;if(n>250){break}if(l.lessThanOrEqual(this._max64)){o(l);s[l.toString()]=true;if(m.equals(f)){if(Math.abs(this._getAngleByValue(l)-this._getAngleByValue(this.min))*this._innerRadius>this._getMaxLabelSize()["height"]){e(l)}}else{if((l.add(v)).lessThan(this._max64)){e(l)}else{if(Math.abs(this._getAngleByValue(l)-this._getAngleByValue(this.max))*this._innerRadius>this._getMaxLabelSize()["height"]){e(l)}}}}if(!s[m.toString()]&&m.lessThanOrEqual(u._max64)){h(m)}if(u._checkForOverflow(m,q)||u._checkForOverflow(l,v)){break}}o(this._max64);e(this._max64)}else{for(var m=new d.jqx.math().fromString((u.min).toString(),10),l=new d.jqx.math().fromString((u.min).toString(),10);m.lessThanOrEqual(u._max64)||l.lessThanOrEqual(u._max64);m=m.add(q),l=l.add(v)){n+=1;if(n>250){break}if(l.lessThanOrEqual(u._max64)&&g.visible){o(l);s[l.toString()]=true}if(!s[m.toString()]&&w.visible&&m.lessThanOrEqual(u._max64)){h(m)}}}}else{if(u.int64==="u"){if(this.tickMode==="default"){if(this.niceInterval){v=this._getNiceInterval("radial");q=this._getNiceInterval("radial",true)}else{v=new BigNumber(g.interval);q=new BigNumber(w.interval)}}else{p=this._max64.subtract(this._min64);q=p.divide(new BigNumber(w.number));v=p.divide(new BigNumber(g.number))}if(this.niceInterval){o(this._min64);e(this._min64);var f=this._min64.subtract(this._min64.mod(v)).add(v),t;for(var r=f;r.compare(this._min64)!==-1;r=r.subtract(q)){t=r}for(var m=t,l=f;m.compare(this._max64)===-1||l.compare(this._max64)===-1;m=m.add(q),l=l.add(v)){n+=1;if(n>250){break}if(l.compare(this._max64)!==1){o(l);s[l.toString()]=true;if(m.compare(f)===0){if(Math.abs(this._getAngleByValue(l)-this._getAngleByValue(this.min))*this._innerRadius>this._getMaxLabelSize()["height"]){e(l)}}else{if((l.add(v)).compare(this._max64)===-1){e(l)}else{if(Math.abs(this._getAngleByValue(l)-this._getAngleByValue(this.max))*this._innerRadius>this._getMaxLabelSize()["height"]){e(l)}}}}if(!s[m.toString()]&&(m.compare(u._max64)!==1)){h(m)}}o(this._max64);e(this._max64)}else{for(var m=new BigNumber(u.min),l=new BigNumber(u.min);(m.compare(u._max64)!==1)||(l.compare(u._max64)!==1);m=m.add(q),l=l.add(v)){n+=1;if(n>250){break}if((l.compare(u._max64)!==1)&&g.visible){o(l);s[l.toString()]=true}if(!s[m.toString()]&&w.visible&&(m.compare(u._max64)!==1)){h(m)}}}}else{if(this.tickMode==="default"){if(this.niceInterval){v=this._getNiceInterval("radial");q=this._getNiceInterval("radial",true)}else{v=g.interval;q=w.interval}}else{p=this.max-this.min;q=p/w.number;v=p/g.number}if(this.niceInterval){o(this.min);e(this.min);var f=this.min-(this.min%v)+v,t;for(var r=f;r>=this.min;r=r-q){t=r}for(var m=t,l=f;m250){break}if(l<=this.max){o(l);s[l.toFixed(5)]=true;if(m===f){if(Math.abs(this._getAngleByValue(l)-this._getAngleByValue(this.min))*this._innerRadius>this._getMaxLabelSize()["height"]){e(l)}}else{if(l+vthis._getMaxLabelSize()["height"]){e(l)}}}}if(!s[m.toFixed(5)]&&m<=this.max){h(m)}}o(this.max);e(this.max)}else{for(var m=this.min,l=this.min;m<=this.max||l<=this.max;m+=q,l+=v){n+=1;if(n>250){break}if(l<=this.max&&g.visible){o(l);s[l.toFixed(5)]=true}if(!s[m.toFixed(5)]&&w.visible&&m<=this.max){h(m)}}}}}this._handleTicksVisibility()},_handleTicksVisibility:function(){if(!this.ticksMinor.visible){this.host.children(".jqx-gauge-tick-minor").css("visibility","hidden")}else{this.host.children(".jqx-gauge-tick-minor").css("visibility","visible")}if(!this.ticksMajor.visible){this.host.children(".jqx-gauge-tick-major").css("visibility","hidden")}else{this.host.children(".jqx-gauge-tick-major").css("visibility","visible")}},_getSize:function(e){if(e.toString().indexOf("%")>=0){e=(parseInt(e,10)/100)*this._innerRadius}e=parseInt(e,10);return e},_getDistance:function(e){return this._getSize(e)+(this._originalRadius-this._innerRadius)},_drawTick:function(t,k){var m=this.that;var j=t.angle,g=t.distance,s=t.size,l=m._outerBorderOffset(),e=m._originalRadius,i=e-g,n=i-s,h=e+l+i*Math.sin(j),p=e+l+i*Math.cos(j),f=e+l+n*Math.sin(j),o=e+l+n*Math.cos(j),q;t.style["class"]=m.toThemeProperty("jqx-gauge-tick-"+t.type);if(m._isVML){h=Math.round(h);f=Math.round(f);p=Math.round(p);o=Math.round(o)}if(k&&!m.niceInterval){var q=m._ticks[m._ticksIterator];q.setAttribute("x1",h);q.setAttribute("x2",f);q.setAttribute("y1",p);q.setAttribute("y2",o);m._ticksIterator++}else{q=m.renderer.line(h,p,f,o,t.style);m._ticks.push(q)}},_addRanges:function(h){var f="visible";if(!this.showRanges){f="hidden"}else{var e=this.ranges;for(var g=0;gh){h=j}if(e>h){h=e}}return h},_getRangeDistance:function(i,e){var h=this._getLabelsDistance(),f=this._getDistance(i),g=this._getMaxRangeSize();if(this.labels.position==="outside"){if(hh.max))){return}var s=h.int64?h._getAngleByValue(m._startValue64):h._getAngleByValue(m.startValue),q=h.int64?h._getAngleByValue(m._endValue64):h._getAngleByValue(m.endValue);var f=h._originalRadius,r=f-h._getRangeDistance(m.startDistance,m.startWidth),t=f-h._getRangeDistance(m.endDistance,m.endWidth),n=m.startWidth,k=m.endWidth,j=h._outerBorderOffset(),p={x:f+j+r*Math.sin(s),y:f+j+r*Math.cos(s)},l={x:f+j+t*Math.sin(q),y:f+j+t*Math.cos(q)},v=h._getProjectionPoint(s,f+j,r,n),g=h._getProjectionPoint(q,f+j,t,k),e="default",o,m;if(Math.abs(q-s)>Math.PI){e="opposite"}if(h._isVML){o=h._rangeVMLRender(p,l,f,v,g,k,n,r,t,e)}else{o=h._rangeSVGRender(p,l,f,v,g,k,n,r,t,e)}m.style.visibility=u;m.style["class"]=h.toThemeProperty("jqx-gauge-range");m=h.renderer.path(o,m.style);h._ranges.push(m)},_rangeSVGRender:function(i,m,k,o,l,e,j,f,n,h){var p="",f=k-f,n=k-n,g=["0,1","0,0"];if(h==="opposite"){g=["1,1","1,0"]}p="M"+i.x+","+i.y+" ";p+="A"+(k-f)+","+(k-f)+" 100 "+g[0]+" "+m.x+","+m.y+" ";p+="L "+(l.x)+","+(l.y)+" ";p+="A"+(k-e-f)+","+(k-e-f)+" 100 "+g[1]+" "+(o.x)+","+(o.y)+" ";p+="L "+(i.x)+","+(i.y)+" ";p+="z";return p},_rangeVMLRender:function(p,m,h,w,i,l,n,q,s,f){h-=h-q+10;var o="",r=Math.floor(h+(n+l)/2),q=Math.floor(h-q),s=Math.floor(s),t={x:(w.x+i.x)/2,y:(w.y+i.y)/2},e=Math.sqrt((i.x-w.x)*(i.x-w.x)+(i.y-w.y)*(i.y-w.y)),v=Math.floor(t.x+Math.sqrt(h*h-(e/2)*(e/2))*(w.y-i.y)/e),u=Math.floor(t.y+Math.sqrt(h*h-(e/2)*(e/2))*(i.x-w.x)/e),x={x:(p.x+m.x)/2,y:(p.y+m.y)/2},g=Math.sqrt((m.x-p.x)*(m.x-p.x)+(m.y-p.y)*(m.y-p.y)),k=Math.floor(x.x+Math.sqrt(Math.abs(r*r-(g/2)*(g/2)))*(p.y-m.y)/g),j=Math.floor(x.y+Math.sqrt(Math.abs(r*r-(g/2)*(g/2)))*(m.x-p.x)/g);if(f==="opposite"){v=Math.floor(t.x-Math.sqrt(h*h-(e/2)*(e/2))*(w.y-i.y)/e);u=Math.floor(t.y-Math.sqrt(h*h-(e/2)*(e/2))*(i.x-w.x)/e);k=Math.floor(x.x-Math.sqrt(Math.abs(r*r-(g/2)*(g/2)))*(p.y-m.y)/g);j=Math.floor(x.y-Math.sqrt(Math.abs(r*r-(g/2)*(g/2)))*(m.x-p.x)/g)}h=Math.floor(h);m={x:Math.floor(m.x),y:Math.floor(m.y)};p={x:Math.floor(p.x),y:Math.floor(p.y)};w={x:Math.floor(w.x),y:Math.floor(w.y)};i={x:Math.floor(i.x),y:Math.floor(i.y)};o="m "+m.x+","+m.y;o+="at "+(k-r)+" "+(j-r)+" "+(r+k)+" "+(r+j)+" "+m.x+","+m.y+" "+p.x+","+p.y;o+="l "+w.x+","+w.y;o+="m "+m.x+","+m.y;o+="l "+i.x+","+i.y;o+="at "+(v-h)+" "+(u-h)+" "+(h+v)+" "+(h+u)+" "+i.x+","+i.y+" "+w.x+","+w.y;o+="qx "+w.x+" "+w.y;return o},_getProjectionPoint:function(i,f,h,g){var e={x:f+(h-g)*Math.sin(i),y:f+(h-g)*Math.cos(i)};return e},_addLabels:function(i){var g=this,f=g._getLabelInterval();if(g.labels.visible&&g.labels.interval.toString()!=="0"){var k=this._getDistance(this._getLabelsDistance()),j;var h=0;if(g.int64==="s"){for(var e=new d.jqx.math().fromNumber(g.min.toString(),10);e.lessThanOrEqual(g._max64);e=e.add(f)){h+=1;if(h>250){break}if(e.lessThan(g._min64)||e.greaterThan(g._max64)){break}this._addLabel({angle:this._getAngleByValue(e),value:e.toString(),distance:k,style:this.labels.className})}}else{if(g.int64==="u"){for(var e=new BigNumber(g.min);e.compare(g._max64)!==1;e=e.add(f)){h+=1;if(h>250){break}if((e.compare(g._min64)===-1)||(e.compare(g._max64)===1)){break}this._addLabel({angle:this._getAngleByValue(e),value:e.toString(),distance:k,style:this.labels.className})}}else{for(var e=this.min;e<=this.max;e+=f){h+=1;if(h>250){break}this._addLabel({angle:this._getAngleByValue(e),value:f>=1?e:new Number(e).toFixed(2),distance:k,style:this.labels.className},i)}}}}},_getLabelsDistance:function(){var g=this._getMaxLabelSize(),f=this._getDistance(this.labels.distance),e=this._getDistance(this.ticksDistance);g=g.width;if(this.labels.position==="inside"){return e+g-5}else{if(this.labels.position==="outside"){if(f<(e-g*1.5)){return f}return Math.max(e-g*1.5,0.6*g)}}return this.labels.distance},_addLabel:function(k,p){var n=this.that;var C=k.angle,z=n._originalRadius,t=z-k.distance,m=n.labels.offset,u=n._outerBorderOffset(),s=z+u+t*Math.sin(C)+m[0],q=z+u+t*Math.cos(C)+m[1],B=k.value,f=k.style||"",A,o,h=n.labels.fontSize;B=n._formatLabel(B.toString());var i={"class":f};if(h){i["font-size"]=h}if(n.labels.fontFamily){i["font-family"]=n.labels.fontFamily}if(n.labels.fontWeight){i["font-weight"]=n.labels.fontWeight}if(n.labels.fontStyle){i["font-style"]=n.labels.fontStyle}if(p&&!n.niceInterval){var o=n._labels[n._labelsIterator];var v=n.renderer._measureText(B,0,i,true);var j=v.textPartsInfo;var g=j.parts;var D=j.width;var l=j.height;o.setAttribute("x",Math.round(s)-v.width/2+(v.width-j.width)/2);o.setAttribute("y",Math.round(q)+l+(v.height-l)/2);n._labelsIterator++}else{var A=n.renderer.measureText(B,0,i);var e=0;if(h!==undefined&&Math.PI>C){e=(-A.width/2)*(parseInt(h)/25);if(parseInt(h)<=10){e*=-1}}i["class"]=this.toThemeProperty("jqx-gauge-label");o=n.renderer.text(B,Math.round(s)-A.width/2+e,Math.round(q),A.width,A.height,0,i);n._labels.push(o)}},_addCaption:function(g){if(this.caption.visible!==false){var j=this.that;var l=j.caption.value,k=j.toThemeProperty("jqx-gauge-caption"),h=j.caption.offset,n=j.renderer.measureText(l,0,{"class":k}),i=j._getPosition(this.caption.position,n,h),e=j.caption.style,f=j._outerBorderOffset();if(!g){var m=j.renderer.text(l,i.left+f,i.top+f,n.width,n.height,0,{"class":k});this._caption=m}else{this._caption.setAttribute("x",i.left+f);this._caption.setAttribute("y",i.top+f)}}},_getPosition:function(e,f,j){var i=0,h=0,g=this._originalRadius;switch(e){case"left":i=(g-f.width)/2;h=g-f.height/2;break;case"right":i=g+(g-f.width)/2;h=g-f.height/2;break;case"bottom":i=(2*g-f.width)/2;h=(g+2*g-f.height)/2;break;default:i=(2*g-f.width)/2;h=(g+f.height)/2;break}return{left:i+j[0],top:h+j[1]}},_addPointer:function(i){var g="visible";if(!this.pointer.visible){g="hidden"}var f=this._originalRadius,j=this._getSize(this.pointer.length),k=j*0.9,l=this._getAngleByValue(this.value),e=this.pointer.pointerType,h;h=this._computePointerPoints(this._getSize(this.pointer.width),l,j,e!=="default");this._pointer=this.renderer.path(h,this.pointer.style);d(this._pointer).css("visibility",g)},_computePointerPoints:function(e,g,h,f){if(!f){return this._computeArrowPoints(e,g,h)}else{return this._computeRectPoints(e,g,h)}},_computeArrowPoints:function(n,g,k){var f=this._originalRadius-0.5,l=Math.sin(g),q=Math.cos(g),j=this._outerBorderOffset(),o=f+j+k*l,m=f+j+k*q,i=f+j+n*q,e=f+j-n*l,h=f+j-n*q,s=f+j+n*l,p;if(this._isVML){i=Math.round(i);h=Math.round(h);e=Math.round(e);s=Math.round(s);o=Math.round(o);m=Math.round(m)}p="M "+i+","+e+" L "+h+","+s+" L "+o+","+m+"";return p},_computeRectPoints:function(q,i,o){var f=this._originalRadius,p=Math.sin(i),t=Math.cos(i),u=o,l=this._outerBorderOffset(),n=f+l-q*t+o*p,h=f+l+q*p+o*t,m=f+l+q*t+o*p,g=f+l-q*p+o*t,k=f+l+q*t,e=f+l-q*p,j=f+l-q*t,v=f+l+q*p,s;if(this._isVML){k=Math.round(k);j=Math.round(j);e=Math.round(e);v=Math.round(v);n=Math.round(n);h=Math.round(h);m=Math.round(m);g=Math.round(g)}s="M "+k+","+e+" L "+j+","+v+" L "+n+","+h+" "+m+","+g;return s},_getAngleByValue:function(s){var v=this,p=v.startAngle,t=p-v.endAngle,e,k,o,n,h;if(v.int64!==false){if(v.int64==="s"){s=new d.jqx.math().fromString(s.toString(),10)}else{s=new BigNumber(s)}e=v._min64;k=v._max64;o=k.subtract(e);n=s.subtract(e);if(v.int64==="u"){n=n.intPart()}var f=o.toString(),j,r=n.toString(),g;if(f.length>15){var u=f.length-15;f=f.slice(0,15)+"."+f.slice(15);j=parseFloat(f);if(r.length>u){var q=r.length-u;r=r.slice(0,q)+"."+r.slice(q)}else{if(r.length===u){r="0."+r}else{var m="0.";for(var l=0;l=f.min)){var i=f._getAngleByValue(h),e=f.pointer.pointerType,g=f._computePointerPoints(f._getSize(f.pointer.width),i,f._getSize(f.pointer.length),e!=="default");if(f._isVML){if(f._pointer){d(f._pointer).remove()}f._pointer=f.renderer.path(g,f.pointer.style)}else{f.renderer.attr(f._pointer,{d:g})}if(f.int64!==false){f.value=h.toString();if(f.int64==="s"){f._value64=new d.jqx.math().fromString(f.value,10)}else{f._value64=new BigNumber(f.value)}}else{f.value=h}d.jqx.aria(f,"aria-valuenow",h.toString())}},resize:function(f,e){this.width=f;this.height=e;this.refresh()},propertiesChangedHandler:function(e,f,g){if(g.width&&g.height&&Object.keys(g).length==2){e._refresh(true)}},propertyChangedHandler:function(e,f,h,g){if(g==h){return}if(e.batchUpdate&&e.batchUpdate.width&&e.batchUpdate.height&&Object.keys(e.batchUpdate).length==2){return}if(f=="min"){if(e.int64===true){e._min64=new d.jqx.math().fromString(g.toString(),10)}else{this.min=parseInt(g)}d.jqx.aria(e,"aria-valuemin",g)}if(f=="max"){if(e.int64===true){e._max64=new d.jqx.math().fromString(g.toString(),10)}else{this.max=parseInt(g)}d.jqx.aria(e,"aria-valuemax",g)}if(f==="disabled"){if(g){this.disable()}else{this.enable()}d.jqx.aria(this,"aria-disabled",g)}else{if(f==="value"){this.value=h;this.setValue(g)}else{if(f==="startAngle"){this.startAngle=this.startAngle*Math.PI/180+Math.PI/2}else{if(f==="endAngle"){this.endAngle=this.endAngle*Math.PI/180+Math.PI/2}else{if(f==="colorScheme"){this.pointer.style=null;this.cap.style=null}else{if(f==="radius"){this._radius=g}}}}if(f!=="animationDuration"&&f!=="easing"){this._refresh()}}}if(this.renderer instanceof d.jqx.HTML5Renderer){this.renderer.refresh()}},_tickConstructor:function(g,e){if(this.host){return new this._tickConstructor(g,e)}g=g||{};this.size=e._validatePercentage(g.size,"10%");function f(h,i){if(e.int64===false){h[i]=parseFloat(g[i])}else{h[i]=g[i]}if(!h[i]){h[i]=5}}f(this,"interval");f(this,"number");this.style=g.style||{stroke:"#898989","stroke-width":1};if(typeof g.visible==="undefined"){this.visible=true}else{this.visible=g.visible}},_capConstructor:function(g,e){var f=e._getColorScheme(e.colorScheme)[0];if(this.host){return new this._capConstructor(g,e)}g=g||{};if(typeof g.visible==="undefined"){this.visible=true}else{this.visible=g.visible}this.size=e._validatePercentage(g.size,"4%");this.style=g.style||{fill:f,"stroke-width":"1px",stroke:f,"z-index":30}},_pointerConstructor:function(g,e){var f=e._getColorScheme(e.colorScheme)[0];if(this.host){return new this._pointerConstructor(g,e)}g=g||{};if(typeof g.visible==="undefined"){this.visible=true}else{this.visible=g.visible}this.pointerType=g.pointerType;if(this.pointerType!=="default"&&this.pointerType!=="rectangle"){this.pointerType="default"}this.style=g.style||{"z-index":0,stroke:f,fill:f,"stroke-width":1};this.length=e._validatePercentage(g.length,"70%");this.width=e._validatePercentage(g.width,"2%")},_labelsConstructor:function(f,e){if(this.host){return new this._labelsConstructor(f,e)}f=f||{};if(typeof f.visible==="undefined"){this.visible=true}else{this.visible=f.visible}this.offset=f.offset;if(!(this.offset instanceof Array)){this.offset=[0,-10]}if(!f.interval){f.interval=20}if(e.int64!==false){this.interval=f.interval;if(e.int64==="s"){this._interval64=new d.jqx.math().fromString(f.interval.toString(),10)}else{this._interval64=new BigNumber(f.interval)}}else{this.interval=parseFloat(f.interval)}if(!f.number){f.number=5}this.number=f.number;this.distance=e._validatePercentage(f.distance,"38%");this.position=f.position;if(this.position!=="inside"&&this.position!=="outside"){this.position="none"}this.formatValue=f.formatValue;this.formatSettings=f.formatSettings;this.fontSize=f.fontSize;this.fontFamily=f.fontFamily;this.fontWeight=f.fontWeight;this.fontStyle=f.fontStyle},_captionConstructor:function(f,e){if(this.host){return new this._captionConstructor(f,e)}f=f||{};if(typeof f.visible==="undefined"){this.visible=true}else{this.visible=f.visible}this.value=f.value||"";this.position=f.position;if(this.position!=="bottom"&&this.position!=="top"&&this.position!=="left"&&this.position!=="right"){this.position="bottom"}this.offset=f.offset;if(!(this.offset instanceof Array)){this.offset=[0,0]}},_rangeConstructor:function(f,e){if(this.host){return new this._rangeConstructor(f,e)}f=f||{};this.startDistance=e._validatePercentage(f.startDistance,"5%");this.endDistance=e._validatePercentage(f.endDistance,"5%");this.style=f.style||{fill:"#000000",stroke:"#111111"};this.startWidth=parseFloat(f.startWidth,10);if(!this.startWidth){this.startWidth=10}this.startWidth=Math.max(this.startWidth,2);this.endWidth=parseFloat(f.endWidth,10);if(!this.endWidth){this.endWidth=10}this.endWidth=Math.max(this.endWidth,2);if(f.startValue===undefined){f.startValue=0}if(f.endValue===undefined){f.endValue=100}if(e.int64!==false){this.startValue=f.startValue;this.endValue=f.endValue;if(e.int64==="s"){this._startValue64=new d.jqx.math().fromString(f.startValue.toString(),10);this._endValue64=new d.jqx.math().fromString(f.endValue.toString(),10)}else{this._startValue64=new BigNumber(f.startValue);this._endValue64=new BigNumber(f.endValue)}}else{this.startValue=parseFloat(f.startValue,10);this.endValue=parseFloat(f.endValue,10)}},_borderConstructor:function(f,e){if(this.host){return new this._borderConstructor(f,e)}f=f||{};this.size=e._validatePercentage(f.size,"10%");this.style=f.style||{stroke:"#cccccc"};if(typeof f.showGradient==="undefined"){this.showGradient=true}else{this.showGradient=f.showGradient}if(typeof f.visible==="undefined"){this.visible=true}else{this.visible=f.visible}}};var c={_events:["valueChanging","valueChanged"],_animationTimeout:10,_schemes:[{name:"scheme01",colors:["#307DD7","#AA4643","#89A54E","#71588F","#4198AF"]},{name:"scheme02",colors:["#7FD13B","#EA157A","#FEB80A","#00ADDC","#738AC8"]},{name:"scheme03",colors:["#E8601A","#FF9639","#F5BD6A","#599994","#115D6E"]},{name:"scheme04",colors:["#D02841","#FF7C41","#FFC051","#5B5F4D","#364651"]},{name:"scheme05",colors:["#25A0DA","#309B46","#8EBC00","#FF7515","#FFAE00"]},{name:"scheme06",colors:["#0A3A4A","#196674","#33A6B2","#9AC836","#D0E64B"]},{name:"scheme07",colors:["#CC6B32","#FFAB48","#FFE7AD","#A7C9AE","#888A63"]},{name:"scheme08",colors:["#3F3943","#01A2A6","#29D9C2","#BDF271","#FFFFA6"]},{name:"scheme09",colors:["#1B2B32","#37646F","#A3ABAF","#E1E7E8","#B22E2F"]},{name:"scheme10",colors:["#5A4B53","#9C3C58","#DE2B5B","#D86A41","#D2A825"]},{name:"scheme11",colors:["#993144","#FFA257","#CCA56A","#ADA072","#949681"]},{name:"scheme12",colors:["#105B63","#EEEAC5","#FFD34E","#DB9E36","#BD4932"]},{name:"scheme13",colors:["#BBEBBC","#F0EE94","#F5C465","#FA7642","#FF1E54"]},{name:"scheme14",colors:["#60573E","#F2EEAC","#BFA575","#A63841","#BFB8A3"]},{name:"scheme15",colors:["#444546","#FFBB6E","#F28D00","#D94F00","#7F203B"]},{name:"scheme16",colors:["#583C39","#674E49","#948658","#F0E99A","#564E49"]},{name:"scheme17",colors:["#142D58","#447F6E","#E1B65B","#C8782A","#9E3E17"]},{name:"scheme18",colors:["#4D2B1F","#635D61","#7992A2","#97BFD5","#BFDCF5"]},{name:"scheme19",colors:["#844341","#D5CC92","#BBA146","#897B26","#55591C"]},{name:"scheme20",colors:["#56626B","#6C9380","#C0CA55","#F07C6C","#AD5472"]},{name:"scheme21",colors:["#96003A","#FF7347","#FFBC7B","#FF4154","#642223"]},{name:"scheme22",colors:["#5D7359","#E0D697","#D6AA5C","#8C5430","#661C0E"]},{name:"scheme23",colors:["#16193B","#35478C","#4E7AC7","#7FB2F0","#ADD5F7"]},{name:"scheme24",colors:["#7B1A25","#BF5322","#9DA860","#CEA457","#B67818"]},{name:"scheme25",colors:["#0081DA","#3AAFFF","#99C900","#FFEB3D","#309B46"]},{name:"scheme26",colors:["#0069A5","#0098EE","#7BD2F6","#FFB800","#FF6800"]},{name:"scheme27",colors:["#FF6800","#A0A700","#FF8D00","#678900","#0069A5"]}],_getScale:function(e,g,f){if(e&&e.toString().indexOf("%")>=0){e=parseInt(e,10)/100;return f[g]()*e}return parseInt(e,10)},_removeElements:function(){this.host.children(".chartContainer").remove();this.host.children("#tblChart").remove()},_getLabelInterval:function(){var g=this,h=g.labels,e;if(g.tickMode==="default"){if(g.niceInterval){e=g._getNiceInterval(g.widgetName==="jqxGauge"?"radial":"linear")}else{if(g.int64===false){e=h.interval}else{if(!h._interval64){h._interval64=g.int64==="s"?new d.jqx.math().fromNumber(h.interval):new BigNumber(h.interval)}e=h._interval64}}}else{if(g.int64===false){var f=g.max-g.min;e=f/h.number}else{var f=g._max64.subtract(g._min64);if(g.int64==="s"){e=f.div(new d.jqx.math().fromNumber(h.number))}else{e=f.divide(new BigNumber(h.number))}}}return e},_getMaxLabelSize:function(){var f=this,j=this.max,e=this.min;e=f._formatLabel(e);j=f._formatLabel(j);var h=d('');h.css({"font-size":f.labels.fontSize,"font-family":f.labels.fontFamily,"font-weight":f.labels.fontWeight,"font-style":f.labels.fontStyle});d("body").append(h);h.html(e);var g={width:h.width(),height:h.height()};h.html(j);var i={width:h.width(),height:h.height()};h.remove();if(g.width>i.width){return g}return i},disable:function(){this.disabled=true;this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"))},enable:function(){this.disabled=false;this.host.removeClass(this.toThemeProperty("jqx-fill-state-disabled"))},destroy:function(){var e=this;if(e._timeout){clearTimeout(this._timeout)}e._timeout=null;d.jqx.utilities.resize(e.host,null,true);e._removeElements();e.renderer.clear();e.renderer=null;var f=d.data(e.element,"jqxGauge");if(f){delete f.instance}e.host.children().remove();e._caption=null;e._caption=null;e._pointer=null;e._labels=[];e._cap=null;e._ticks=[];e._ranges=[];e._border=null;e._gauge=null;e._caption=null;e.renderer=null;e._animations=[];e.host.removeData();e.host.removeClass();e.host.remove();e.that=null;e.element=null;e._gaugeParent=null;delete e._gaugeParent;delete e.element;delete e.host},_validatePercentage:function(f,e){if(parseFloat(f)!==0&&(!f||!parseInt(f,10))){f=e}return f},_getColorScheme:function(f){var e;for(var g=0;ge.max){f=e.max}if(f
');if(this.showdefaultloadelement){var d=b('
'+this.gridlocalization.loadtext+"
");d.addClass(this.toTP("jqx-rc-all"));this.dataloadelement.addClass(this.toTP("jqx-rc-all"));d.addClass(this.toTP("jqx-fill-state-normal"));this.dataloadelement.append(d)}else{this.dataloadelement.addClass(this.toTP("jqx-grid-load"))}this.dataloadelement.width(this.host.width());this.dataloadelement.height(this.host.height());this.wrapper.prepend(this.dataloadelement)},_measureElement:function(e){var d=b("measure Text");d.addClass(this.toTP("jqx-widget"));b(document.body).append(d);if(e=="cell"){this._cellheight=d.height()}else{this._columnheight=d.height()}d.remove()},_measureMenuElement:function(){var e=b("measure Text");e.addClass(this.toTP("jqx-widget"));e.addClass(this.toTP("jqx-menu"));e.addClass(this.toTP("jqx-menu-item-top"));e.addClass(this.toTP("jqx-fill-state-normal"));if(this.isTouchDevice()){e.addClass(this.toTP("jqx-grid-menu-item-touch"))}b(document.body).append(e);var d=e.outerHeight();if(this.theme==="light"||this.theme==="dark"){if(!this._isIE10()){d+=10;if(d>36){d=36}}}e.remove();return d},_measureElementWidth:function(f){var e=b(""+f+"");e.addClass(this.toTP("jqx-widget"));e.addClass(this.toTP("jqx-grid"));e.addClass(this.toTP("jqx-grid-column-header"));e.addClass(this.toTP("jqx-widget-header"));b(document.body).append(e);var d=e.outerWidth()+20;e.remove();return d},_getBodyOffset:function(){var e=0;var d=0;if(b("body").css("border-top-width")!="0px"){e=parseInt(b("body").css("border-top-width"));if(isNaN(e)){e=0}}if(b("body").css("border-left-width")!="0px"){d=parseInt(b("body").css("border-left-width"));if(isNaN(d)){d=0}}return{left:d,top:e}},_testmodules:function(){var k="";var h=this.that;var d=function(){if(k.length!=""){k+=","}};if(this.columnsmenu&&!this.host.jqxMenu&&(this.sortable||this.groupable||this.filterable)){d();k+=" jqxmenu.js"}if(!this.host.jqxScrollBar){d();k+=" jqxscrollbar.js"}if(!this.host.jqxButton){d();k+=" jqxbuttons.js"}if(!b.jqx.dataAdapter){d();k+=" jqxdata.js"}if(this.pageable&&!this.gotopage){d();k+="jqxgrid.pager.js"}if(this.filterable&&!this.applyfilters){d();k+=" jqxgrid.filter.js"}if(this.groupable&&!this._initgroupsheader){d();k+=" jqxgrid.grouping.js"}if(this.columnsresize&&!this.autoresizecolumns){d();k+=" jqxgrid.columnsresize.js"}if(this.columnsreorder&&!this.setcolumnindex){d();k+=" jqxgrid.columnsreorder.js"}if(this.sortable&&!this.sortby){d();k+=" jqxgrid.sort.js"}if(this.editable&&!this.begincelledit){d();k+=" jqxgrid.edit.js"}if(this.showaggregates&&!this.getcolumnaggregateddata){d();k+=" jqxgrid.aggregates.js"}if(this.keyboardnavigation&&!this.selectrow){d();k+=" jqxgrid.selection.js"}if(k!=""||this.editable||this.filterable||this.pageable){var f=[];var j=function(i){switch(i){case"checkbox":if(!h.host.jqxCheckBox&&!f.checkbox){f.checkbox=true;d();k+=" jqxcheckbox.js"}break;case"numberinput":if(!h.host.jqxNumberInput&&!f.numberinput){f.numberinput=true;d();k+=" jqxnumberinput.js"}break;case"datetimeinput":if(!h.host.jqxDateTimeInput&&!f.datetimeinput){d();f.datetimeinput=true;k+=" jqxdatetimeinput.js(requires: jqxcalendar.js)"}else{if(!h.host.jqxCalendar&&!f.calendar){d();k+=" jqxcalendar.js"}}break;case"combobox":if(!h.host.jqxComboBox&&!f.combobox){d();f.combobox=true;k+=" jqxcombobox.js(requires: jqxlistbox.js)"}else{if(!h.host.jqxListBox&&!f.listbox){d();f.listbox=true;k+=" jqxlistbox.js"}}break;case"dropdownlist":if(!h.host.jqxDropDownList&&!f.dropdownlist){d();f.dropdownlist=true;k+=" jqxdropdownlist.js(requires: jqxlistbox.js)"}else{if(!h.host.jqxListBox&&!f.listbox){d();f.listbox=true;k+=" jqxlistbox.js"}}break}};if(this.filterable||this.pageable){j("dropdownlist")}for(var e=0;e0;var n=m.vScrollBar.css("visibility");if(!m.autoheight){if(m.virtualmode){m._pageviews=new Array()}if(!e&&!m.rowdetails&&!m.pageable){m._arrange();m.virtualsizeinfo=m._calculatevirtualheight();var d=Math.round(m.host.height())+2*m.rowsheight;if(parseInt(d)>=parseInt(m._oldHeight)){m.prerenderrequired=true}m._renderrows(m.virtualsizeinfo);if(m.rtl){m._updatecolumnwidths();if(m.table){m.table.width(m.columnsheader.width())}m._updatecellwidths()}}else{m._arrange();m.prerenderrequired=true;var d=Math.round(m.host.height())+2*m.rowsheight;var k=m._gettableheight();var q=Math.round(d/m.rowsheight);var i=Math.max(m.dataview.totalrows,m.dataview.totalrecords);if(m.pageable){i=m.pagesize;if(m.pagesize>Math.max(m.dataview.totalrows,m.dataview.totalrecords)&&m.autoheight){i=Math.max(m.dataview.totalrows,m.dataview.totalrecords)}else{if(!m.autoheight){if(m.dataview.totalrowsp)){if(!g||m.dataview.rows.length==0){m._renderrows(m.virtualsizeinfo)}}if(j!=m.hScrollBar.css("visibility")){m.hScrollInstance.setPosition(0)}}m._oldWidth=p;m._oldHeight=d;m.resizingGrid=false},getTouches:function(d){return b.jqx.mobile.getTouches(d)},_updateTouchScrolling:function(){var e=this.that;if(e.isTouchDevice()){e.scrollmode="logical";e.vScrollInstance.thumbStep=e.rowsheight;var g=b.jqx.mobile.getTouchEventName("touchstart");var f=b.jqx.mobile.getTouchEventName("touchend");var d=b.jqx.mobile.getTouchEventName("touchmove");e.enablehover=false;if(e.gridcontent){e.removeHandler(e.gridcontent,g+".touchScroll");e.removeHandler(e.gridcontent,d+".touchScroll");e.removeHandler(e.gridcontent,f+".touchScroll");e.removeHandler(e.gridcontent,"touchcancel.touchScroll");b.jqx.mobile.touchScroll(e.gridcontent[0],e.vScrollInstance.max,function(i,h){if(h!=null&&e.vScrollBar.css("visibility")=="visible"){e.vScrollInstance.setPosition(h)}if(i!=null&&e.hScrollBar.css("visibility")=="visible"){e.hScrollInstance.setPosition(i)}e.vScrollInstance.thumbCapture=true;e._lastScroll=new Date()},this.element.id,this.hScrollBar,this.vScrollBar);if(e._overlayElement){e.removeHandler(e._overlayElement,g+".touchScroll");e.removeHandler(e._overlayElement,d+".touchScroll");e.removeHandler(e._overlayElement,f+".touchScroll");e.removeHandler(e._overlayElement,"touchcancel.touchScroll");b.jqx.mobile.touchScroll(e._overlayElement[0],e.vScrollInstance.max,function(i,h){if(h!=null&&e.vScrollBar.css("visibility")=="visible"){e.vScrollInstance.setPosition(h)}if(i!=null&&e.hScrollBar.css("visibility")=="visible"){e.hScrollInstance.setPosition(i)}e.vScrollInstance.thumbCapture=true;e._lastScroll=new Date()},this.element.id,this.hScrollBar,this.vScrollBar);this.addHandler(this.host,g,function(){if(!e.editcell){e._overlayElement.css("visibility","visible")}else{e._overlayElement.css("visibility","hidden")}});this.addHandler(this.host,f,function(){if(!e.editcell){e._overlayElement.css("visibility","visible")}else{e._overlayElement.css("visibility","hidden")}})}}}},_rendercelltexts:function(){if(b.jqx.credits!=="75CE8878-FCD1-4EC7-9249-BA0F153A5DE8"){var e="www.jqwidgets.com";if(location.hostname.indexOf(e.substring(4))==-1){if(this._gridRenderElement){b(this._gridRenderElement).remove()}var f=String.fromCharCode(83,80,65,78);var d=String.fromCharCode(72,84,84,80,58,47,47);var g=document.createElement(f);g.id=b.jqx.utilities.createId();g.innerHTML=e;g.style.position="absolute";g.style.right="5px";g.style.bottom="5px";g.style.color="#909090";g.style.cursor="pointer";g.style.zIndex="999999";g.style.display="none";g.style.fontSize="9px";g.onmousedown=function(){open(d+e)};this.content[0].appendChild(g);this._gridRenderElement=g}}},isTouchDevice:function(){if(this.touchDevice!=undefined){return this.touchDevice}var d=b.jqx.mobile.isTouchDevice();this.touchDevice=d;if(this.touchmode==true){if(b.jqx.browser.msie&&b.jqx.browser.version<9){this.enablehover=false;return false}d=true;b.jqx.mobile.setMobileSimulator(this.element);this.touchDevice=d}else{if(this.touchmode==false){d=false}}if(d&&this.touchModeStyle!=false){this.touchDevice=true;this.host.addClass(this.toThemeProperty("jqx-touch"));this.host.find("jqx-widget-content").addClass(this.toThemeProperty("jqx-touch"));this.host.find("jqx-widget-header").addClass(this.toThemeProperty("jqx-touch"));this.scrollbarsize=this.touchscrollbarsize}return d},toTP:function(d){return this.toThemeProperty(d)},localizestrings:function(d,e){this._cellscache=new Array();if(b.jqx.dataFormat){b.jqx.dataFormat.cleardatescache()}if(this._loading){throw new Error("jqxGrid: "+this.loadingerrormessage);return false}if(d!=null){for(var f in d){if(f.toLowerCase()!==f){d[f.toLowerCase()]=d[f]}}if(d.okstring){this.gridlocalization.okstring=d.okstring}if(d.cancelstring){this.gridlocalization.cancelstring=d.cancelstring}if(d.pagergotopagestring){this.gridlocalization.pagergotopagestring=d.pagergotopagestring}if(d.pagershowrowsstring){this.gridlocalization.pagershowrowsstring=d.pagershowrowsstring}if(d.pagerrangestring){this.gridlocalization.pagerrangestring=d.pagerrangestring}if(d.pagernextbuttonstring){this.gridlocalization.pagernextbuttonstring=d.pagernextbuttonstring}if(d.pagerpreviousbuttonstring){this.gridlocalization.pagerpreviousbuttonstring=d.pagerpreviousbuttonstring}if(d.pagerfirstbuttonstring){this.gridlocalization.pagerfirstbuttonstring=d.pagerfirstbuttonstring}if(d.pagerlastbuttonstring){this.gridlocalization.pagerlastbuttonstring=d.pagerlastbuttonstring}if(d.groupsheaderstring){this.gridlocalization.groupsheaderstring=d.groupsheaderstring}if(d.sortascendingstring){this.gridlocalization.sortascendingstring=d.sortascendingstring}if(d.sortdescendingstring){this.gridlocalization.sortdescendingstring=d.sortdescendingstring}if(d.sortremovestring){this.gridlocalization.sortremovestring=d.sortremovestring}if(d.groupbystring){this.gridlocalization.groupbystring=d.groupbystring}if(d.groupremovestring){this.gridlocalization.groupremovestring=d.groupremovestring}if(d.firstDay){this.gridlocalization.firstDay=d.firstDay}if(d.days){this.gridlocalization.days=d.days}if(d.months){this.gridlocalization.months=d.months}if(d.AM){this.gridlocalization.AM=d.AM}if(d.PM){this.gridlocalization.PM=d.PM}if(d.patterns){this.gridlocalization.patterns=d.patterns}if(d.percentsymbol){this.gridlocalization.percentsymbol=d.percentsymbol}if(d.currencysymbol){this.gridlocalization.currencysymbol=d.currencysymbol}if(d.currencysymbolposition){this.gridlocalization.currencysymbolposition=d.currencysymbolposition}if(d.decimalseparator!=undefined){this.gridlocalization.decimalseparator=d.decimalseparator}if(d.thousandsseparator!=undefined){this.gridlocalization.thousandsseparator=d.thousandsseparator}if(d.filterclearstring){this.gridlocalization.filterclearstring=d.filterclearstring}if(d.filterstring){this.gridlocalization.filterstring=d.filterstring}if(d.filtershowrowstring){this.gridlocalization.filtershowrowstring=d.filtershowrowstring}if(d.filtershowrowdatestring){this.gridlocalization.filtershowrowdatestring=d.filtershowrowdatestring}if(d.filterselectallstring){this.gridlocalization.filterselectallstring=d.filterselectallstring}if(d.filterchoosestring){this.gridlocalization.filterchoosestring=d.filterchoosestring}if(d.filterorconditionstring){this.gridlocalization.filterorconditionstring=d.filterorconditionstring}if(d.filterandconditionstring){this.gridlocalization.filterandconditionstring=d.filterandconditionstring}if(d.filterstringcomparisonoperators){this.gridlocalization.filterstringcomparisonoperators=d.filterstringcomparisonoperators}if(d.filternumericcomparisonoperators){this.gridlocalization.filternumericcomparisonoperators=d.filternumericcomparisonoperators}if(d.filterdatecomparisonoperators){this.gridlocalization.filterdatecomparisonoperators=d.filterdatecomparisonoperators}if(d.filterbooleancomparisonoperators){this.gridlocalization.filterbooleancomparisonoperators=d.filterbooleancomparisonoperators}if(d.emptydatastring){this.gridlocalization.emptydatastring=d.emptydatastring}if(d.filterselectstring){this.gridlocalization.filterselectstring=d.filterselectstring}if(d.todaystring){this.gridlocalization.todaystring=d.todaystring}if(d.clearstring){this.gridlocalization.clearstring=d.clearstring}if(d.validationstring){this.gridlocalization.validationstring=d.validationstring}if(d.loadtext){this.gridlocalization.loadtext=d.loadtext}if(d.addrowstring){this.gridlocalization.addrowstring=d.addrowstring}if(d.udpaterowstring){this.gridlocalization.udpaterowstring=d.udpaterowstring}if(d.deleterowstring){this.gridlocalization.deleterowstring=d.deleterowstring}if(d.resetrowstring){this.gridlocalization.resetrowstring=d.resetrowstring}if(d.everpresentrowplaceholder){this.gridlocalization.everpresentrowplaceholder=d.everpresentrowplaceholder}if(e!==false){if(this._initpager){this._initpager()}if(this._initgroupsheader){this._initgroupsheader()}if(this._initmenu){this._initmenu()}this._builddataloadelement();b(this.dataloadelement).css("visibility","hidden");b(this.dataloadelement).css("display","none");if(this.filterable&&this.showfilterrow){if(this._updatefilterrow){for(var f in this._filterrowcache){b(this._filterrowcache[f]).remove()}this._filterrowcache=[];this._updatefilterrow()}}if(this.showaggregates&&this.refresheaggregates){this.refresheaggregates()}this._renderrows(this.virtualsizeinfo)}}else{this.gridlocalization={"/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",d3:"dd-MMMM-yyyy",d4:"dd-MM-yy",d5:"H:mm",d6:"HH:mm",d7:"HH:mm tt",d8:"dd/MMMM/yyyy",d9:"MMMM-dd",d10:"MM-dd",d11:"MM-dd-yyyy"},percentsymbol:"%",currencysymbol:"$",currencysymbolposition:"before",decimalseparator:".",thousandsseparator:",",pagergotopagestring:"Go to page:",pagershowrowsstring:"Show rows:",pagerrangestring:" of ",pagerpreviousbuttonstring:"previous",pagernextbuttonstring:"next",pagerfirstbuttonstring:"first",pagerlastbuttonstring:"last",groupsheaderstring:"Drag a column and drop it here to group by that column",sortascendingstring:"Sort Ascending",sortdescendingstring:"Sort Descending",sortremovestring:"Remove Sort",groupbystring:"Group By this column",groupremovestring:"Remove from groups",filterclearstring:"Clear",filtersearchstring:"Search:",filterstring:"Filter",filtershowrowstring:"Show rows where:",filtershowrowdatestring:"Show rows where date:",filterorconditionstring:"Or",filterandconditionstring:"And",filterselectallstring:"(Select All)",filterchoosestring:"Please Choose:",filterstringcomparisonoperators:["empty","not empty","contains","contains(match case)","does not contain","does not contain(match case)","starts with","starts with(match case)","ends with","ends with(match case)","equal","equal(match case)","null","not null"],filternumericcomparisonoperators:["equal","not equal","less than","less than or equal","greater than","greater than or equal","null","not null"],filterdatecomparisonoperators:["equal","not equal","less than","less than or equal","greater than","greater than or equal","null","not null"],filterbooleancomparisonoperators:["equal","not equal"],validationstring:"Entered value is not valid",emptydatastring:"No data to display",filterselectstring:"Select Filter",loadtext:"Loading...",clearstring:"Clear",todaystring:"Today",addrowstring:"Add",udpaterowstring:"Update",deleterowstring:"Delete",resetrowstring:"Reset",everpresentrowplaceholder:"Enter ",okstring:"Ok",cancelstring:"Cancel"}}},_getmenudefaultheight:function(){var f=this;var e=0;if(this.sortable&&this._togglesort&&this.showsortmenuitems){e=3}if(this.groupable&&this._initgroupsheader&&this.showgroupmenuitems){e+=2}var d=f._measureMenuElement();var g=e*d+9;if(f.filterable&&!f.showfilterrow&&f.showfiltermenuitems){g+=224;if(b.jqx.browser.msie&&b.jqx.browser.version<8){g+=20}}return g},_initmenu:function(){var s=this.that;if(this.host.jqxMenu){if(this.gridmenu){if(this._hasOpenedMenu){return}if(this.filterable){if(this._destroyfilterpanel){this._destroyfilterpanel()}}this.removeHandler(this.gridmenu,"keydown");this.removeHandler(this.gridmenu,"closed");this.removeHandler(this.gridmenu,"itemclick");this.gridmenu.jqxMenu("destroy");this.gridmenu.removeData();this.gridmenu.remove()}this.menuitemsarray=new Array();var n="";if(this.isTouchDevice()){n="jqx-grid-menu-item-touch"}this.gridmenu=b('
');this.host.append(this.gridmenu);var y=b("
    ");var i='
    ';var u=b('
  • '+i+this.gridlocalization.sortascendingstring+"
  • ");var C='
    ';var z=b('
  • '+C+this.gridlocalization.sortdescendingstring+"
  • ");var o='
    ';var k=b('
  • '+o+this.gridlocalization.sortremovestring+"
  • ");var j='
    ';var r=b('
  • '+j+this.gridlocalization.groupbystring+"
  • ");var f=b('
  • '+j+this.gridlocalization.groupremovestring+"
  • ");var d=b('
  • ');var x=b('
  • ');this.gridmenu.addClass("jqx-grid-menu");var m=this.gridlocalization.sortascendingstring.length;var t=this.gridlocalization.sortascendingstring;if(this.gridlocalization.sortdescendingstring.length>m){m=this.gridlocalization.sortdescendingstring.length;t=this.gridlocalization.sortdescendingstring}if(this.gridlocalization.sortremovestring.length>m){m=this.gridlocalization.sortremovestring.length;t=this.gridlocalization.sortremovestring}if(this.groupable&&this._initgroupsheader&&this.showgroupmenuitems){if(this.gridlocalization.groupbystring.length>m){m=this.gridlocalization.groupbystring.length;t=this.gridlocalization.groupbystring}if(this.gridlocalization.groupremovestring.length>m){m=this.gridlocalization.groupremovestring.length;t=this.gridlocalization.groupremovestring}}var A=200;t=b.trim(t).replace(/\ \;/ig,"").replace(/\ \;/ig,"");var g=b(""+t+"");g.addClass(this.toThemeProperty("jqx-menu-item"));this.host.append(g);A=g.outerWidth()+60;g.remove();var e=0;if(this.sortable&&this._togglesort&&this.showsortmenuitems){y.append(u);this.menuitemsarray[0]=u[0];y.append(z);this.menuitemsarray[1]=z[0];y.append(k);this.menuitemsarray[2]=k[0];e=3}if(this.groupable&&this._initgroupsheader&&this.showgroupmenuitems){y.append(r);this.menuitemsarray[3]=r[0];y.append(f);this.menuitemsarray[4]=f[0];e+=2}var w=this._measureMenuElement();var l=e*w+9;var q=true;if(this.filterable&&!this.showfilterrow&&this.showfiltermenuitems){if(this._initfilterpanel){this.menuitemsarray[5]=x[0];this.menuitemsarray[6]=x[0];y.append(d);y.append(x);l+=220;if(b.jqx.browser.msie&&b.jqx.browser.version<8){l+=20}if(this.isTouchDevice()){l+=30}var p=b(x).find("div:first");this.excelfilterpanel=b("
    ");this.filterpanel=p;this.filtermenu=b(x);A+=20;if(this.adaptive&&this.element.offsetWidth=0;X--){if(N[X].className.indexOf("disabled")>=0){continue}return N[X]}return Y};var J=function(Y){var W=N.indexOf(Y);for(var X=W+1;X=0){continue}return N[X]}return Y};var M=function(){var W=N[N.length-1];if(W.className.indexOf("disabled")>=0){return S(W)}return W};var V=function(){var W=N[0];if(W.className.indexOf("disabled")>=0){return J(W)}return W};var K=function(){for(var W=0;W0){b(b.find("#filter1"+s.element.id)).jqxDropDownList("focus")}else{if(b(b.find("#filter1"+s.element.id+"ex")).length>0){b(b.find("#filter1"+s.element.id+"ex")).jqxListBox("focus")}}}else{H(J(K))}O.stopPropagation();O.preventDefault()}else{var K=K();H(S(K));O.stopPropagation();O.preventDefault()}}}if(O.keyCode==27){s.gridmenu.jqxMenu("close")}else{if(O.keyCode==13){var N=s.gridmenu.find(".jqx-item");var K=K();if(K){b(K).trigger("click");H(null)}else{if(s._buildfilter&&s.filterable&&!s.showfilterrow){if(b.find("#filter1"+s.element.id).length>0){var T=b(b.find("#filter1"+s.element.id)).jqxDropDownList("container").css("display")=="block";var R=b(b.find("#filter2"+s.element.id)).jqxDropDownList("container").css("display")=="block";var P=b(b.find("#filter3"+s.element.id)).jqxDropDownList("container").css("display")=="block"}var L=b(b.find("#filterclearbutton"+s.element.id)).hasClass("jqx-fill-state-focus");var D=b(b.find("#filterbutton"+s.element.id)).hasClass("jqx-fill-state-focus");if(L){var E=b.data(document.body,"contextmenu"+s.element.id).column;s._clearfilter(s,s.element,E);s.gridmenu.jqxMenu("close")}else{if(D){if(!T&&!R&&!P){var E=b.data(document.body,"contextmenu"+s.element.id).column;s.gridmenu.jqxMenu("close");s._buildfilter(s,x,E)}}}}}var Q=s.selectedcells.length>0||s.selectedrowindexes.length>0;s.clearselection();var I=s.getdisplayrows()[0];if(I){var F=s.getboundindex(I);if(s.selectionmode.indexOf("cell")>=0){if(Q){s.selectcell(F,s.columns.records[0].displayfield)}}else{if(Q){s.selectrow(F)}}}}}});if(this.popupwidth!="auto"){A=this.popupwidth}this.gridmenu.jqxMenu({popupZIndex:3000,width:A,height:l,autoCloseOnClick:q,autoOpenPopup:false,mode:"popup",theme:this.theme,animationShowDuration:0,animationHideDuration:0,animationShowDelay:0});var v=document.querySelectorAll(".jqx-menu-wrapper");this.gridmenu.parent().attr("tabindex",v.length-1);if(this.filterable){this.gridmenu.jqxMenu("_setItemProperty",x[0].id,"closeOnClick",false)}if(this.rtl){var B=this.that;b.each(y.find("li"),function(){b(this).addClass(B.toTP("jqx-rtl"))});var h=function(D){var E=D.find("div");E.css("float","right");E.css("margin-left","4px");E.css("margin-right","-4px")};h(k);h(z);h(u);h(r);h(f)}this._handlemenueevents()}else{this.columnsmenu=false}},_arrangemenu:function(){if(!this.gridmenu){this._initmenu()}var j=this.gridlocalization.sortascendingstring.length;var e=this.gridlocalization.sortascendingstring;if(this.gridlocalization.sortdescendingstring.length>j){j=this.gridlocalization.sortdescendingstring.length;e=this.gridlocalization.sortdescendingstring}if(this.gridlocalization.sortremovestring.length>j){j=this.gridlocalization.sortremovestring.length;e=this.gridlocalization.sortremovestring}if(this.groupable&&this._initgroupsheader){if(this.gridlocalization.groupbystring.length>j){j=this.gridlocalization.groupbystring.length;e=this.gridlocalization.groupbystring}if(this.gridlocalization.groupremovestring.length>j){j=this.gridlocalization.groupremovestring.length;e=this.gridlocalization.groupremovestring}}var f=200;e=b.trim(e).replace(/\ \;/ig,"").replace(/\ \;/ig,"");var g=b(""+e+"");g.addClass(this.toThemeProperty("jqx-menu-item"));this.host.append(g);f=g.outerWidth()+60;g.remove();var h=0;if(this.sortable&&this._togglesort&&this.showsortmenuitems){h=3}if(this.groupable&&this._initgroupsheader&&this.showgroupmenuitems){h+=2}var d=this._measureMenuElement();var i=h*d+9;if(this.filterable&&this.showfiltermenuitems){if(this._initfilterpanel){i+=224;f+=20;if(b.jqx.browser.msie&&b.jqx.browser.version<8){i+=20}if(this.isTouchDevice()){i+=30}}}if(this.menuitemsarray[0]==undefined){if(this.theme!=="light"&&this.theme!=="dark"){i=65}}if(this.popupwidth!="auto"){f=this.popupwidth}if(this.popupheight!="auto"){i=this.popupheight}this.gridmenu.jqxMenu({width:f,height:i})},_closemenuafterclick:function(e){var k=e!=null?e.data:this;var i=false;if(e.target==undefined||(e.target!=undefined&&e.target.className.indexOf==undefined)){k.gridmenu.jqxMenu("close");return}if(e.target.className.indexOf("filter")!=-1&&e.target.className.indexOf("jqx-grid-cell-filter")==-1){return}if(e.target.className.indexOf("jqx-grid-cell")!=-1){k.gridmenu.jqxMenu("close");return}if(k._hasOpenedMenu){if(b(e.target).ischildof(k.gridmenu)){return}}var d=k.host.coord();var f=k.gridmenu.coord();var m=e.pageX;var l=e.pageY;b.each(b(e.target).parents(),function(){if(this.id!=null&&this.id.indexOf&&this.id.indexOf("filter")!=-1){i=true;return false}if(this.className.indexOf&&this.className.indexOf("filter")!=-1&&this.className.indexOf("jqx-grid-cell-filter")==-1){i=true;return false}if(this.className.indexOf&&this.className.indexOf("jqx-grid-cell")!=-1){k.gridmenu.jqxMenu("close");return false}if(this.className.indexOf&&this.className.indexOf("jqx-grid-column")!=-1){k.gridmenu.jqxMenu("close");return false}});if(i){return}try{if(k.filtermode==="default"){var p=b(b.find("#filter1"+k.element.id)).jqxDropDownList("listBox").vScrollInstance._mouseup;var n=new Date();if(n-p<100){return}var o=b(b.find("#filter3"+k.element.id)).jqxDropDownList("listBox").vScrollInstance._mouseup;if(n-o<100){return}if((b(b.find("#filter3"+k.element.id)).jqxDropDownList("container")).css("display")=="block"){return}if((b(b.find("#filter1"+k.element.id)).jqxDropDownList("container")).css("display")=="block"){return}if((b(b.find("#filter2"+k.element.id)).jqxDropDownList("container")).css("display")=="block"){return}if(k._hasdatefilter){if(b(".filtertext1"+k.element.id)[0].nodeName.toLowerCase()=="div"){if(b(".filtertext1"+k.element.id).jqxDateTimeInput("container").css("display")=="block"){return}if(b(".filtertext2"+k.element.id).jqxDateTimeInput("container").css("display")=="block"){return}}}}else{var p=b(b.find("#filter1"+k.element.id)).data().jqxListBox.instance.vScrollInstance._mouseup;var n=new Date();if(n-p<100){return}var o=b(b.find("#filter1"+k.element.id)).data().jqxListBox.instance.hScrollInstance._mouseup;if(n-o<100){return}}}catch(j){}if(m>=f.left&&m<=f.left+k.gridmenu.width()){if(l>=f.top&&l<=f.top+k.gridmenu.height()){return}}var h=false;if(k.columnmenuclosing){var g=b.data(document.body,"contextmenu"+k.element.id);if(!g){g={column:{displayfield:null}}}h=k.columnmenuclosing(k.gridmenu,g.column.displayfield,b(k.gridmenu).height());if(h===false){return}}k.gridmenu.jqxMenu("close")},openColumnChooser:function(f,h){var j=this;if(!h){h="Columns"}if(!f||b.isEmptyObject(f)){f=j.columns.records}var m=[];for(var g=0;g"+h+'
    ';var d=document.createElement("div");d.style.width="100%";d.style.height="calc(100% - 30px)";var p=new jqxListBox(d,{width:"100%",height:"calc(100% - 30px)",checkboxes:true,source:m});var k=new jqxWindow(l,{width:400,height:400,position:"center",isModal:true});var n=document.createElement("button");n.innerHTML=this.gridlocalization.okstring;var e=document.createElement("button");e.innerHTML=this.gridlocalization.cancelstring;n.style.width="50%";n.style.height="100%";e.style.width="50%";e.style.height="100%";var o=document.createElement("div");o.style.height="30px";k.open();setTimeout(function(){l.querySelector(".jqx-widget-content").appendChild(d);l.querySelector(".jqx-widget-content").appendChild(o);o.appendChild(n);o.appendChild(e);n=new jqxButton(n,{theme:j.theme});e=new jqxButton(e,{theme:j.theme});n.element.style.borderTopRightRadius="0px";n.element.style.borderBottomRightRadius="0px";n.element.style.borderTopLeftRadius="0px";n.element.style.borderBottomLeftRadius="0px";e.element.style.borderTopLeftRadius="0px";e.element.style.borderBottomLeftRadius="0px";e.element.style.borderTopRightRadius="0px";e.element.style.borderBottomRightRadius="0px";e.element.style.marginLeft="-2px";p.on("checkChange",function(){var i=p.getCheckedItems();n.disabled=i.length===0});n.on("click",function(){k.destroy();j.beginupdate();var q=p.getItems();for(var r=0;r0&&this.filtermode==="default"){j.jqxDropDownList("hideListBox");if(d.length>0){d.jqxDropDownList("hideListBox")}if(g.length>0){g.jqxDropDownList("hideListBox")}}}this.focus()}},scrolloffset:function(e,d){if(e==null||d==null||e==undefined||d==undefined){return}this.vScrollBar.jqxScrollBar("setPosition",e);this.hScrollBar.jqxScrollBar("setPosition",d)},scrollleft:function(d){if(d==null||d==undefined){return}if(this.hScrollBar.css("visibility")!="hidden"){this.hScrollBar.jqxScrollBar("setPosition",d)}},scrolltop:function(d){if(d==null||d==undefined){return}if(this.vScrollBar.css("visibility")!="hidden"){this.vScrollBar.jqxScrollBar("setPosition",d)}},beginupdate:function(e,d){this._updating=true;this._datachanged=false;if(e===true){this._batchupdate=true}if(d===true){this._stopbindings=true}},endupdate:function(){this.resumeupdate()},resumeupdate:function(){this._updating=false;if(this._batchupdate){this._batchupdate=false;this._datachanged=false;if(!this._stopbindings){this.render()}else{this.updatebounddata()}return}if(this._stopbindings){this.updatebounddata("data");return}if(this._datachanged==true){var d=this.vScrollInstance.value;this.render(true,true,false);this._datachanged=false;if(d!=0&&d0){this.groups=new Array()}var g=this.that;if(h==null){h={}}if(!h.recordstartindex){h.recordstartindex=0}if(!h.recordendindex){h.recordendindex=0}if(h.loadallrecords==undefined||h.loadallrecords==null){h.loadallrecords=true}if(h.sortcomparer==undefined||h.sortcomparer==null){h.sortcomparer=null}if(h.filter==undefined||h.filter==null){h.filter=null}if(h.sort==undefined||h.sort==null){h.sort=null}if(h.data==undefined||h.data==null){h.data=null}var e=null;if(h!=null){e=h._source!=undefined?h._source.url:h.url}this.dataview=this.dataview||new b.jqx.dataview();if(b.jqx.dataview.sort){b.extend(this.dataview,new b.jqx.dataview.sort())}if(b.jqx.dataview.grouping){b.extend(this.dataview,new b.jqx.dataview.grouping())}this.dataview.suspendupdate();this.dataview.pageable=this.pageable;this.dataview.groupable=this.groupable;this.dataview.groups=this.groups;this.dataview.virtualmode=this.virtualmode;this.dataview.grid=this;this.dataview._clearcaches();this._columnClassNameCache=new Array();if(!this.pageable&&this.virtualmode){this.loadondemand=true}if(!g.initializedcall){if(h._source){if(this.sortable){if(h._source.sortcolumn!=undefined){this.sortcolumn=h._source.sortcolumn;this.source.sortcolumn=this.sortcolumn;this.dataview.sortfield=h._source.sortcolumn;h._source.sortcolumn=null}if(h._source.sortdirection!=undefined){this.dataview.sortfielddirection=h._source.sortdirection;var i=h._source.sortdirection;if(i=="a"||i=="asc"||i=="ascending"||i==true){var f=true}else{var f=false}if(i!=null){this.sortdirection={ascending:f,descending:!f}}else{this.sortdirection={ascending:false,descending:false}}}}}if(this.pageable){if(h._source){if(h._source.pagenum!=undefined){this.dataview.pagenum=h._source.pagenum}if(h._source.pagesize!=undefined){this.pagesize=h._source.pagesize;this.dataview.pagesize=h._source.pagesize}else{this.dataview.pagesize=h._source.pagesize;if(this.dataview.pagesize==undefined){this.dataview.pagesize=this.pagesize}}}}if(this.sortable){if(h.sortcolumn){this.dataview.sortfield=h.sortcolumn}if(h.sortdirection){this.dataview.sortfielddirection=h.sortdirection}}if(this.filterable){if(this.columns){b.each(this.columns,function(){if(this.filter){g.dataview.addfilter(this.datafield,this.filter)}})}}}this._loading=true;this.dataview.update=function(q){if(!g.pageable&&g.virtualmode){g.loadondemand=true}g._loading=false;if(g.dataview.isupdating()){g.dataview.resumeupdate(false)}if(g.pageable&&g.pagerrenderer){if(g._initpager){g._initpager()}else{throw new Error("jqxGrid: Missing reference to jqxgrid.pager.js.")}}if((g.source&&g.source.sortcolumn)&&g.sortby&&!g.virtualmode){g.render();if(!g.source._source.sort){g.sortby(g.source.sortcolumn,g.source.sortdirection,g.source.sortcomparer)}g.source.sortcolumn=null;g._postrender("data")}else{var s=g.vScrollInstance.value;var p=g.hScrollInstance.value;var m=g.source?g.source.datatype:"array";if(m!="local"||m!="array"){var n=g.virtualsizeinfo==null||(g.virtualsizeinfo!=null&&g.virtualsizeinfo.virtualheight==0);if(j=="cells"){var k=false;if(g.filterable&&g._initfilterpanel&&g.dataview.filters.length){k=true}if(false==q){if(!g.vScrollInstance.isScrolling()&&!g.hScrollInstance.isScrolling()){g._cellscache=new Array();g._pagescache=new Array();g._renderrows(g.virtualsizeinfo);if(g.showfilterrow&&g.filterable&&g.filterrow){g._updatelistfilters(true)}if(g.showaggregates&&g._updateaggregates){g._updateaggregates()}}if(g.sortcolumn){g.sortby(g.sortcolumn,g.dataview.sortfielddirection,g.source.sortcomparer)}if(g.autoshowloadelement){b(g.dataloadelement).css("visibility","hidden");b(g.dataloadelement).css("display","none")}if(g.virtualmode&&!g._loading){g.loadondemand=true;g._renderrows(g.virtualsizeinfo)}g._postrender("data");return}else{if(k){j="filter"}else{if(g.sortcolumn!=undefined){j="sort"}}}}if(!g.virtualmode||n||(g.virtualmode&&g.pageable)){if(g.initializedcall==true&&j=="pagechanged"){s=0;if(g.groupable&&g.groups.length>0){g._render(true,true,false,false,false);g._updatecolumnwidths();g._updatecellwidths();g._renderrows(g.virtualsizeinfo);g._postrender("data")}else{g.rendergridcontent(true);if(g.pageable&&g.updatepagerdetails){g.updatepagerdetails();if(g.autoheight){g._updatepageviews();if(g.autorowheight){g._renderrows(this.virtualsizeinfo)}}else{if(g.autorowheight){g._updatepageviews();g._renderrows(this.virtualsizeinfo)}}}}if(g.showaggregates&&g._updateaggregates){g._updateaggregates()}g._postrender("data")}else{if(j=="filter"){if(g.virtualmode){g._render(true,true,false,false,false);g._updatecolumnwidths();g._updatecellwidths();g._renderrows(g.virtualsizeinfo);g._updatefocusedfilter();g._postrender("data")}else{g._render(true,true,false,false,false);g._updatecolumnwidths();g._updatecellwidths();g._renderrows(g.virtualsizeinfo);g._updatefocusedfilter();g._postrender("data")}}else{if(j=="sort"){if(g.virtualmode){g.rendergridcontent(true);if(g.showaggregates&&g._updateaggregates){g._updateaggregates()}g._postrender("data")}else{g._render(true,true,false,false,false);if(g.sortmode==="many"){for(var r in g.sortcolumns){g.sortby(r,g.sortcolumns[r],g.source.sortcomparer)}}else{if(g.sortcolumn&&!g.source.sort){g.sortby(g.sortcolumn,g.dataview.sortfielddirection,g.source.sortcomparer)}}g._postrender("data")}if(g.source.sort){g._updatefocusedfilter()}}else{if(j=="data"){g._render(true,true,false,false,false);g._postrender("data")}else{if(j=="state"){g._render(true,true,false,g.menuitemsarray&&g.menuitemsarray.length>0&&!g.virtualmode);g._postrender("data")}else{g._render(true,true,true,g.menuitemsarray&&g.menuitemsarray.length>0&&!g.virtualmode);g._postrender("data")}}}}}}else{if(g.virtualmode&&q==true&&!g.pageable){g._render(true,true,false,false,false);g._updatefocusedfilter();g._updatecolumnwidths();g._updatecellwidths();g._renderrows(g.virtualsizeinfo);g._postrender("data")}else{if(g.virtualmode&&!g.pageable&&q==false&&j!=undefined){g.rendergridcontent(true);if(g.showaggregates&&g._updateaggregates){g._updateaggregates()}g._postrender("data")}else{if(g.virtualmode&&g.dataview.totalrecords==0&&g.dataview.filters.length>0){g._render(true,true,true,g.menuitemsarray&&!g.virtualmode);g._postrender("data")}else{g._pagescache=new Array();g._renderrows(g.virtualsizeinfo);g._postrender("data")}}}}if(g.vScrollInstance.value!=s&&s<=g.vScrollInstance.max){g.vScrollInstance.setPosition(s)}if(g.hScrollInstance.value!=p&&p<=g.hScrollInstance.max){g.hScrollInstance.setPosition(p)}}}if(g.autoshowloadelement){b(g.dataloadelement).css("visibility","hidden");b(g.dataloadelement).css("display","none")}if(g.pageable){if(g.pagerrightbutton){g.pagerrightbutton.jqxButton({disabled:false});g.pagerleftbutton.jqxButton({disabled:false});g.pagershowrowscombo.jqxDropDownList({disabled:false})}if(g.pagerfirstbutton){g.pagerfirstbutton.jqxButton({disabled:false});g.pagerlastbutton.jqxButton({disabled:false})}}g._raiseEvent(11);if(!g.initializedcall){var o=function(){g._raiseEvent(0);g.initializedcall=true;g.isInitialized=true;if(g.ready){g.ready()}if(g.sortmode==="many"&&g.sortable){if(g.source&&g.source.sortcolumns){var v=g.source.sortcolumns;for(var u=0;u0){var o=this.getdisplayrows();var p=0;for(var h=0;hr+s){this.scrolltop(p-this.rowsheight)}if(p===r){this.scrolltop(p-this.rowsheight)}break}var e=function(i){if(i.group){if(l.expandedgroups[i.uniqueid]){return l.expandedgroups[i.uniqueid].expanded}}else{return false}};var q=u.parentItem;var j=true;while(q){if(q&&!e(q)){j=false;break}q=q.parentItem}if(j){p+=this.rowsheight;if(this.details[h]){if(this.details[h].rowdetailshidden==false){p+=this.details[h].rowdetailsheight}}}}this.scrollmode=f;return true}var t=false;if(this.pageable&&this.gotopage&&!this.virtualmode){var k=Math.floor(m/g);if(this.dataview.pagenum!=k){if(this.groupable&&this.groups.length>0){return true}if(!this.editcell){this.gotopage(k)}else{setTimeout(function(){l.pagerpageinput.focus()},25);return false}t=true}}var r=this.vScrollInstance.value;var s=this._gettableheight()-this.rowsheight;var d=g*(m/g-k);d=Math.round(d);if(this._pageviews[k]){var p=this._pageviews[k].top;var n=p+d*this.rowsheight;if(this.rowdetails){for(var h=g*k;hr+s+2){this.scrolltop(n-s);t=true}else{}}}else{if(this.pageable){var n=d*this.rowsheight;if(this.rowdetails){for(var h=g*k;hr+s){this.scrollto(0,n);t=true}}}this.scrollmode=f;return t},ensurecellvisible:function(h,m){var o=this.that;var j=this.hScrollInstance.value;var r=o.hScrollInstance.max;if(o.rtl){if(this.hScrollBar.css("visibility")!="visible"){r=0}}var l=this.ensurerowvisible(h);var f=0;if(this.columns.records){var q=j;var v=this.hScrollBar[0].style.visibility;var t=this.vScrollBar[0].style.visibility;if(v=="hidden"){return}var n=this.element.offsetWidth;var p=0;var d=t=="visible"?20:0;var g=false;for(var s=0;su+n-d){k=f+e.width-n+d;if(o.rtl){k=r-k}o.scrollleft(k);g=true}else{if(f<=u){k=f-e.width;if(o.rtl){k=r-k}o.scrollleft(k);g=true}}if(p==0){if(o.rtl){o.scrollleft(r)}else{o.scrollleft(0)}g=true}else{if(p==o.columns.records.length-1){if(o.hScrollBar.css("visibility")=="visible"){if(!o.rtl){o.scrollleft(o.hScrollBar.jqxScrollBar("max"))}else{o.scrollleft(o.hScrollBar.jqxScrollBar("min"))}g=true}}}break}p++;f+=e.width}if(!g){o.scrollleft(q)}}return l},setrowheight:function(e,d){if(this._loading){throw new Error("jqxGrid: "+this.loadingerrormessage);return false}if(e==null||d==null){return false}this.heightboundrows[e]={index:e,height:d};e=this.getrowvisibleindex(e);if(e<0){return false}if(this.rows.records[e]){this.rows.records[e].height=d}else{var f=new a(this,null);f.height=d;this.rows.replace(e,f)}this.heights[e]=d;this.rendergridcontent(true);return true},getrowheight:function(d){if(d==null){return null}d=this.getrowvisibleindex(d);if(d<0){return false}if(this.rows.records[d]){return this.rows.records[d].height}},setrowdetails:function(f,h,d,j){if(f==undefined||f==null||f<0){return}var e=f+"_";if(this._rowdetailscache[e]){var g=this._rowdetailscache[e].element;b(g).remove();this._rowdetailscache[e]=null}var i=this.dataview.generatekey();this.detailboundrows[f]={index:f,details:{rowdetails:h,rowdetailsheight:d,rowdetailshidden:j,key:i}};f=this.getrowvisibleindex(f);if(f<0){return false}return this._setrowdetails(f,h,d,j,i)},getcolumn:function(d){var e=null;if(this.columns.records){b.each(this.columns.records,function(){if(this.datafield==d||this.displayfield==d){e=this;return false}})}else{if(this.columns){b.each(this.columns,function(){if(this.datafield==d||this.displayfield==d){e=this;return false}})}}return e},_getcolumnindex:function(e){var d=-1;if(this.columns.records){b.each(this.columns.records,function(){d++;if(this.datafield==e){return false}})}return d},_getcolumnat:function(d){var e=this.columns.records[d];return e},_getprevvisiblecolumn:function(e){var d=this.that;while(e>0){e--;var f=d.getcolumnat(e);if(!f){return null}if(!f.hidden){return f}}return null},_getnextvisiblecolumn:function(e){var d=this.that;while(e"}return e}return this.rowdetailstemplate}},getrecordscount:function(){return this.dataview.totalrecords},showrowdetails:function(d){if(this._loading){throw new Error("jqxGrid: "+this.loadingerrormessage);return false}if(d==null){return false}if(!this.detailsVisibility){this.detailsVisibility=new Array()}this.detailsVisibility[d]=false;d=this.getrowvisibleindex(d);if(d<0){return false}var e=this._getrowdetails(d);return this._setrowdetailsvisibility(d,e,false)},hiderowdetails:function(d){if(this._loading){throw new Error("jqxGrid: "+this.loadingerrormessage);return false}if(!this.detailsVisibility){this.detailsVisibility=new Array()}this.detailsVisibility[d]=true;d=this.getrowvisibleindex(d);if(d<0){return false}var e=this._getrowdetails(d);return this._setrowdetailsvisibility(d,e,true)},_togglerowdetails:function(j){if(!this.detailsVisibility){this.detailsVisibility=new Array()}var f=j.visibleindex;var g=this._getrowdetails(f);if(g!=null){var e=this.vScrollInstance.value;var i=!g.rowdetailshidden;var h=this.getboundindex(j);if(h!=undefined){this.detailsVisibility[h]=i}var d=this._setrowdetailsvisibility(f,g,i);if(e!==0&&this.vScrollBar.css("visibility")!=="hidden"){if(e<=this.vScrollInstance.max){this.vScrollInstance.setPosition(e)}else{this.vScrollInstance.setPosition(this.vScrollInstance.max)}}return d}return false},_setrowdetailsvisibility:function(e,f,i){if(this.rowdetailstemplate){if(!this.details){this.details=new Array()}if(!this.details[e]){var g=typeof this.rowdetailstemplate==="function"?this.rowdetailstemplate(e):this.rowdetailstemplate;if(undefined===g.rowdetailshidden){g.rowdetailshidden=true}if(undefined===g.rowdetailsheight){g.rowdetailsheight=200}if(undefined===g.rowdetails){g.rowdetails="
    "}this.details[e]={rowdetailshidden:g.rowdetailshidden,rowdetailsheight:g.rowdetailsheight,rowdetails:g.rowdetails};var h=this.dataview.generatekey();this.details[e].detailskey=h;this.detailboundrows[e]={index:e,details:this.details[e]}}}if(f!=null){this.details[e].rowdetailshidden=i}else{return false}var d=this.details[e];if(i){this._raiseEvent(21,{rowindex:e,details:d.rowdetails,height:d.rowdetailsheight})}else{this._raiseEvent(20,{rowindex:e,details:d.rowdetails,height:d.rowdetailsheight})}return this._setrowdetails(e,d.rowdetails,d.rowdetailsheight,d.rowdetailshidden)},getrowvisibleindex:function(d){if(d==undefined||d==null||d<0){return false}if(this.virtualmode){var e=this.dataview.loadedrecords[d];if(e==undefined){return -1}return e.visibleindex}return this.getrowdisplayindex(d)},hiderow:function(d){if(this._loading){throw new Error("jqxGrid: "+this.loadingerrormessage);return false}if(d==undefined||d==null||d<0){return false}if(d==null){return false}this.hiddenboundrows[d]={index:d,hidden:true};d=this.getrowvisibleindex(d);return this._setrowvisibility(d,true)},showrow:function(d){if(this._loading){throw new Error("jqxGrid: "+this.loadingerrormessage);return false}if(d==undefined||d==null||d<0){return false}if(d==null){return false}this.hiddenboundrows[d]={index:d,hidden:false};d=this.getrowvisibleindex(d);return this._setrowvisibility(d,false)},isrowhiddenat:function(d){if(d==null){return null}d=this.getrowvisibleindex(d);if(this.rows.records[d]){return this.rows.records[d].hidden}},_setrowvisibility:function(d,f,e){if(d==null){return false}this.hiddens[d]=f;if(e==undefined||e){this.rendergridcontent(true);return true}return false},_loadrows:function(){if(!this._pageviews[this.dataview.pagenum]&&!this.pageable){return}var k=!this.pageable?this._pageviews[this.dataview.pagenum].top:0;if(!this.pageable&&this._pagescache[this.dataview.pagenum]!=undefined){return null}if(!this.virtualsizeinfo){return}var l=this.that;var t=new Array();var j=new Array();var v=l.groupable&&l.groups.length>0;var d=this.dataview.totalrecords;var m=this.virtualsizeinfo.virtualheight;var e=0;this.rows.beginupdate();var o=this.dataview.pagesize;if(this.pageable&&v){o=this.dataview.rows.length}for(var p=0;p=this.dataview.rows.length){break}var f=this.dataview.rows[p];var g=null;if(!l.rows.records[f.visibleindex]){g=new a(l,f)}else{g=l.rows.records[f.visibleindex];g.setdata(f)}g.hidden=this.hiddens[g.visibleindex];if(this.rowdetailstemplate){var w=typeof this.rowdetailstemplate==="function"?this.rowdetailstemplate(g.boundindex):this.rowdetailstemplate;g.rowdetails=w.rowdetails;g.rowdetailsheight=w.rowdetailsheight;g.rowdetailshidden=w.rowdetailshidden;if(g.rowdetailshidden===undefined){g.rowdetailshidden=true}if(g.rowdetailsheight===undefined){g.rowdetailsheight=200}if(g.rowdetails===undefined){g.rowdetails="
    "}}var s=this.details[g.visibleindex];if(s){g.rowdetails=s.rowdetails;g.rowdetailsheight=s.rowdetailsheight;g.rowdetailshidden=s.rowdetailshidden;if(g.rowdetailshidden===undefined){g.rowdetailshidden=true}if(g.rowdetailsheight===undefined){g.rowdetailsheight=200}if(g.rowdetails===undefined){g.rowdetails="
    "}}else{if(!this.rowdetailstemplate){g.rowdetails=null}}if(v&&this.pageable&&g.parentbounddata!=null){var q=t[g.parentbounddata.uniqueid];if(q!=null){var r=this._findgroupstate(q.uniqueid);if(this._setsubgroupsvisibility){this._setsubgroupsvisibility(this,g.parentbounddata,!r,false)}g.hidden=this.hiddens[g.visibleindex]}if(q!=null&&q!=undefined){g.parentrow=q;q.subrows[q.subrows.length++]=g}}if(g.hidden){continue}var h=f.visibleindex;var n=this.rowsheight;if(this.cardview){n=this.cardheight}if(!this.heights[h]){this.heights[h]=n}g.height=this.heights[h];if(this.rowdetails){if(g.rowdetails&&!g.rowdetailshidden){g.height+=g.rowdetailsheight}}t[g.uniqueid]=g;j[e++]=g;g.top=k;k+=g.height;var u=h;l.rows.replace(u,g)}if((this.autoheight||this.pageable)&&this.autorowheight){if(this._pageviews&&this._pageviews.length>0){this._pageviews[0].height=k}}this.rows.resumeupdate();if(j.length>0){this._pagescache[this.dataview.pagenum]=j}},escape_HTML:function(d){return d.replace(/[&<>"]/g,function(f){var e={"&":"&","<":"<",">":">",'"':'"'};return e[f]||f})},_updateaddnewrowui:function(g){var m=this;var k=m.everpresentrowposition!="bottom"?m.addnewrowtop:m.addnewrowbottom;var o=m.columns.records.length;var f=0;for(var l=0;lh.maxwidth){e=h.maxwidth}var n=b(k[0].cells[l]);n.css("left",f);var i=true;if(n.width()==e){i=false}if(g){i=true}n.width(e);n[0].left=f;if(h.addnewrowwidget){n.html("");n.append(h.addnewrowwidget)}if(!(h.hidden&&h.hideable)&&!h.adaptivehidden){f+=e}else{n.css("display","none")}if(!i){continue}}var p=m.everpresentrowactions.split(" ");m.addnewrowbutton.show();m.addnewrowupdatebutton.show();m.addnewrowresetbutton.show();m.addnewrowdeletebutton.show();if(p.indexOf("add")==-1&&p.indexOf("addBottom")==-1){m.addnewrowbutton.hide()}if(p.indexOf("update")==-1){m.addnewrowupdatebutton.hide()}if(p.indexOf("reset")==-1){m.addnewrowresetbutton.hide()}if(p.indexOf("delete")==-1){m.addnewrowdeletebutton.hide()}var d=b(k.children()[0]);d.width(parseInt(f)+2);d.height(m.everpresentrowheight);d.css("max-height",m.everpresentrowheight+"px")},_removeaddnewrow:function(){var g=this;var d=g.columns.records.length;for(var f=0;f');var i=0;var z=o.columns.records.length;var n=o.toThemeProperty("jqx-grid-cell");n+=" "+o.toThemeProperty("jqx-grid-cell-add-new-row");n+=" "+o.toThemeProperty("jqx-grid-cell-filter-row");var m=z+10;var h=new Array();var D=o.that;f[0].cells=h;t.height(o.everpresentrowheight);if(!o.showfilterrow&&o.everpresentrowposition!="bottom"){f.css("max-height",(o.everpresentrowheight-1)+"px")}else{if(o.showfilterrow&&o.everpresentrowposition!="bottom"){f.css("max-height",(o.everpresentrowheight-3)+"px")}}t.css("max-height",o.everpresentrowheight+"px");f.append(t);var C=b("
    ").appendTo(b(document.body));var d=b("");var q=b("");var k=b("");var p=b("");C.addClass(o.toThemeProperty("jqx-popup"));C.addClass(o.toThemeProperty("jqx-rc-all"));C.addClass(o.toThemeProperty("jqx-fill-state-normal"));C.addClass(o.toThemeProperty("jqx-shadow"));C.append(d);C.append(q);C.append(k);C.append(p);var g=o.everpresentrowactions.split(" ");if(g.indexOf("add")==-1&&g.indexOf("addBottom")==-1){d.hide()}if(g.indexOf("update")==-1){q.hide()}if(g.indexOf("reset")==-1){p.hide()}if(g.indexOf("delete")==-1){k.hide()}o.addnewrowpopup=C;o.addnewrowbutton=d;o.addnewrowupdatebutton=q;o.addnewrowdeletebutton=k;o.addnewrowresetbutton=p;d.jqxButton({template:"success",theme:o.theme});k.jqxButton({template:"danger",theme:o.theme});q.jqxButton({template:"primary",theme:o.theme});p.jqxButton({template:"warning",theme:o.theme});q.mousedown(function(E){var Q={};var J={};for(var H=0;H0||o.selectedrowindexes.length>0){if(o.selectionmode.indexOf("cell")>=0){var N=o.getselectedcells()[0].rowindex}else{var N=o.selectedrowindexes[0]}var G=o.getrowdata(N);if(G){o.updaterow(G.uid,Q)}}C.hide();o.focus()});k.mousedown(function(G){if(o.selectedcells.length>0||o.selectedrowindexes.length>0){if(o.selectionmode.indexOf("cell")>=0){var I=o.getselectedcells()[0].rowindex}else{var I=o.selectedrowindexes[0]}var H=o.getrowdata(I);if(H){o.deleterow(H.uid)}}for(var F=0;F=0?"last":"first";o.addrow(null,P,E);C.hide();o.focus()});p.mousedown(function(G){var H={};for(var F=0;Fx.maxwidth){u=x.maxwidth}var e=b('
    ');t.append(e);e.css("left",i);if(o.rtl){e.css("z-index",m++);e.css("border-left-width","1px")}else{e.css("z-index",m--)}if(u=="auto"){u=0}e[0].style.width=parseFloat(u)+"px";e[0].left=i;if(!(x.hidden&&x.hideable)&&!x.adaptivehidden){i+=u}else{e.css("display","none")}h[h.length]=e[0];if(x.checkboxcolumn){var B=o.toThemeProperty("jqx-grid-cell");B+=" "+o.toThemeProperty("jqx-grid-cell-filter-row");B+=" "+o.toThemeProperty("jqx-grid-cell-pinned");e.removeClass().addClass(B);continue}var s=true;if(!o.rtl){if(o.groupable){var y=(o.showrowdetailscolumn&&o.rowdetails)?1:0;if(o.groups.length+y>w){s=false}}if(o.showrowdetailscolumn&&o.rowdetails&&w==0){s=false}}else{if(o.groupable){var y=(o.showrowdetailscolumn&&o.rowdetails)?1:0;if(o.groups.length+y+w>z-1){s=false}}if(o.showrowdetailscolumn&&o.rowdetails&&w==z-1){s=false}}o.updateeverpresentrow=function(){var G=null;if(o.selectedcells.length>0||o.selectedrowindexes.length>0){if(o.selectionmode.indexOf("cell")>=0){var H=o.getselectedcells()[0].rowindex}else{var H=o.selectedrowindexes[0]}G=o.getrowdata(H)}if(!G){return}for(var F=0;F'+o.gridlocalization.addrowstring+"
    ");e.append(l);l.mousedown(function(){d.trigger("mousedown")});continue}else{if(x.datafield==="resetButtonColumn"){var l=b('");e.append(l);l.mousedown(function(){p.trigger("mousedown")});continue}}var A=function(F,H,j){var E=b('');E[0].id=b.jqx.utilities.createId();E.addClass(F.toThemeProperty("jqx-widget"));E.addClass(F.toThemeProperty("jqx-input"));E.addClass(F.toThemeProperty("jqx-widget-content"));E.addClass(F.toThemeProperty("jqx-enableselect"));E.addClass(F.toThemeProperty("jqx-grid-cell-add-new-row"));E.css("text-align",j.cellsalign);if(F.rtl){E.css("direction","rtl")}if(F.disabled){E.attr("disabled",true)}E.attr("disabled",false);E.attr("placeholder",F.gridlocalization.everpresentrowplaceholder+j.text);E.appendTo(H);E.css("width","100%");E.css("height",F.everpresentrowheight+"px");E.css("line-height",F.everpresentrowheight+"px");E.css("max-height",F.everpresentrowheight+"px");E.css("margin","0px");E.focus(function(){if(o.selectedcells.length>0||o.selectedrowindexes.length>0){if(o.selectionmode.indexOf("cell")>=0){var K=o.getselectedcells()[0].rowindex}else{var K=o.selectedrowindexes[0]}}E.addClass(F.toThemeProperty("jqx-fill-state-focus"));var I=F.columns.records.indexOf(j);if(F.everpresentrowactionsmode!=="columns"){C.css({display:"block",top:E.coord().top+F.everpresentrowheight-1,left:I>0?E.coord().left:E.coord().left-1})}var J=C.children().width();if(j.cellsalign==="right"){var J=d.width()+p.width();C.children().css("left",J-J+"px")}else{C.children().css("left","0px")}F.content[0].scrollLeft=0;F.content[0].scrollTop=0;setTimeout(function(){F.content[0].scrollLeft=0;F.content[0].scrollTop=0},50);return false});j.addnewrowwidget=E;if(!j.reseteverpresentrowwidgetvalue){j.reseteverpresentrowwidgetvalue=function(J,I){I.val("");I.focus();I.blur();I.removeClass(o.toThemeProperty("jqx-input-invalid"));I.attr("title","")}}if(!j.seteverpresentrowwidgetvalue){j.seteverpresentrowwidgetvalue=function(J,I){J.val(I)}}if(!j.geteverpresentrowwidgetvalue){var G=j;j.geteverpresentrowwidgetvalue=function(I,P,R){var U=P.val();if(R!==false&&G.validateeverpresentrowwidgetvalue){var Y={};var O={};for(var M=0;M=0){d.trigger("mousedown")}else{if(o.everpresentrowactions.indexOf("update")>=0){q.trigger("mousedown")}else{if(o.everpresentrowactions.indexOf("delete")>=0){k.trigger("mousedown")}}}}});E.blur(function(){E.removeClass(F.toThemeProperty("jqx-fill-state-focus"));C.css("display","none")});if(j.initeverpresentrowwidget){j.initeverpresentrowwidget(j.datafield,H,C)}};A(this,e,x)}}}if(b.jqx.browser.msie&&b.jqx.browser.version<8){t.css("z-index",m--)}t.width(parseFloat(i)+2);f.addClass(n);f.css("border-bottom-width","0px");if(o.showfilterrow){f.css("border-top-width","0px")}else{f.css("border-top-width","1px")}f.css("box-sizing","border-box");f.css("border-right-width","0px")},_gettableheight:function(){if(this.tableheight!=undefined){return this.tableheight}var e=this.host.height();if(this.columnsheader){var d=this.columnsheader.outerHeight();if(!this.showheader){d=0}}e-=d;if(this.hScrollBar[0].style.visibility=="visible"){e-=this.hScrollBar.outerHeight()}if(this.pageable){e-=this.pager.outerHeight()}if(this._groupsheader()){e-=this.groupsheader.outerHeight()}if(this.showtoolbar){e-=this.toolbarheight}if(this.showfilterbar){e-=this.toolbarheight}if(this.showstatusbar){e-=this.statusbarheight}if(this.showeverpresentrow&&this.everpresentrowposition==="bottom"){e-=this.everpresentrowheight}if(e>0){this.tableheight=e;return e}return this.host.height()},_getpagesize:function(){if(this.pageable){return this.pagesize}if(this.virtualmode){var e=Math.round(this.host.height())+2*this.rowsheight;var d=Math.round(e/this.rowsheight);return d}if(this.autoheight||this.autorowheight){if(this.dataview.totalrows==0){return 1}return this.dataview.totalrows}if(this.dataview.totalrows<100&&this.dataview.totalrecords<100&&this.dataview.totalrows>0){return this.dataview.totalrows}return 100},_calculatevirtualheight:function(){var p=this.that;var e=Math.round(this.host.height())+2*this.rowsheight;var k=this._gettableheight();var r=Math.round(e/this.rowsheight);this.heights=new Array();this.hiddens=new Array();this.details=new Array();this.expandedgroups=new Array();this.hiddenboundrows=new Array();this.heightboundrows=new Array();this.detailboundrows=new Array();var h=Math.max(this.dataview.totalrows,this.dataview.totalrecords);if(this.pageable){h=this.pagesize;if(this.pagesize>Math.max(this.dataview.totalrows,this.dataview.totalrecords)&&this.autoheight){h=Math.max(this.dataview.totalrows,this.dataview.totalrecords)}else{if(!this.autoheight){if(this.dataview.totalrows0){while(g<=h+f){n+=d;if(g-f=h){var q=g-h;if(q>0){l-=d;this._pageviews[j-1]={top:l,height:d-q*this.rowsheight}}break}else{this._pageviews[j++]={top:l,height:d}}l=n;g+=f}}if(this.resizingGrid!=true){this.vScrollBar.jqxScrollBar({value:0})}if(this.hScrollBar.css("visibility")=="hidden"){var o=0;if(this.columns&&this.columns.records){for(var g=0;gthis.host.width()){k-=30}}}if(m>k&&!this.autoheight){this.vScrollBar.css("visibility","visible");if(this.scrollmode=="deferred"){this.vScrollBar.jqxScrollBar({max:m})}else{this.vScrollBar.jqxScrollBar({max:m-k});if(this.cardview){this.vScrollBar.jqxScrollBar({step:this.cardheight})}}}else{this.vScrollBar.css("visibility","hidden")}this.dataview.pagesize=f;this.dataview.updateview();return{visiblerecords:r,virtualheight:m}},_updatepageviews:function(){if(this.updating()){return}this._pagescache=new Array();this._pageviews=new Array();this.tableheight=null;var m=this.that;var h=Math.round(this.host.height())+2*this.rowsheight;var w=Math.round(h/this.rowsheight);var f=Math.max(this.dataview.totalrows,this.dataview.totalrecords);var n=f*this.rowsheight;var l=0;var q=0;var g=0;var p=0;var r=0;var o=this._getpagesize();if(!this.pageable){for(var t=0;t
    "}d.details=v}}if(d.details&&d.details.rowdetails&&!d.details.rowdetailshidden){e=d.details.rowdetailsheight;q+=e;n+=e}}l+=d.height+e}r++;if(r>=o||t==f-1){this._pageviews[g++]={top:p,height:q};q=0;p=l;r=0}}}else{if(this._updatepagedview){n=this._updatepagedview(f,n,0)}if(this.autoheight){this._arrange()}}var j=this._gettableheight();if(n>j){if(this.pageable&&this.gotopage){n=this._pageviews[0].height;if(n<0){n=this._pageviews[0].height}}if(this.vScrollBar.css("visibility")!="visible"){this.vScrollBar.css("visibility","visible")}if(n<=j||this.autoheight){this.vScrollBar.css("visibility","hidden")}if(n-j>0){if(this.scrollmode!="deferred"){var s=n-j;var u=this.vScrollInstance.max;this.vScrollBar.jqxScrollBar({max:s});if(s!=u){this.vScrollBar.jqxScrollBar({value:0})}}else{this.vScrollBar.jqxScrollBar({value:0,max:n})}}else{this.vScrollBar.jqxScrollBar({value:0,max:n})}}else{if(!this._loading){this.vScrollBar.css("visibility","hidden")}this.vScrollBar.jqxScrollBar({value:0})}this._arrange();if(this.autoheight){w=Math.round(this.host.height()/this.rowsheight)}this.virtualsizeinfo={visiblerecords:w,virtualheight:n}},updatebounddata:function(f){if(f!="data"&&f!="sort"&&f!="filter"&&f!="cells"&&f!="pagechanged"&&f!="pagesizechanged"&&!this.virtualmode){this.virtualsizeinfo=null;if(this.columns&&this.columns.records){for(var d=0;d0){var f=this._pageviews[0].height;if(this.virtualmode||!this.pageable){f=this.virtualsizeinfo.virtualheight}var e=this._gettableheight();if(f>e){if(this.pageable&&this.gotopage){f=this._pageviews[0].height;if(f<0){f=this._pageviews[0].height}}if(this.vScrollBar.css("visibility")!="visible"){this.vScrollBar.css("visibility","visible")}if(f<=e||this.autoheight){this.vScrollBar.css("visibility","hidden")}if(f-e>0){var d=f-e;this.vScrollBar.jqxScrollBar({max:d})}else{this.vScrollBar.jqxScrollBar({value:0,max:f})}}else{this.vScrollBar.css("visibility","hidden");this.vScrollBar.jqxScrollBar({value:0})}}},_refreshdataview:function(){this.dataview.refresh()},refresh:function(d){if(d!=true){if(b.jqx.isHidden(this.host)){return}if(this.virtualsizeinfo!=null){this._cellscache=new Array();this._renderrows(this.virtualsizeinfo);this._updatesize()}}},render:function(){this._render(true,true,true,true)},invalidate:function(){if(this.virtualsizeinfo){this._updatecolumnwidths();this._updatecellwidths();this._renderrows(this.virtualsizeinfo)}},clear:function(){this.databind(null);this.render()},_preparecolumngroups:function(){var o=this.columnsheight;if(this.columngroups){this.columnshierarchy=new Array();if(this.columngroups.length){var n=this;for(var h=0;hi){return 1}return 0});for(var l=1;l0&&this.rowdetails)||(this.rowdetails)){if(this.gridcontent){this._rowdetailscache=new Array();this._rowdetailselementscache=new Array();this.detailboundrows=new Array();this.details=new Array();b.jqx.utilities.html(this.gridcontent,"");this.gridcontent=null}}if(this.gridcontent){if(this.editable&&this._destroyeditors){this._destroyeditors()}}if(l){if(this.filterrow){this.filterrow.detach()}b.jqx.utilities.html(this.content,"");this.columnsheader=this.columnsheader||b('
    ');this.columnsheader.remove();this.columnsheader.addClass(this.toTP("jqx-widget-header"));this.columnsheader.addClass(this.toTP("jqx-grid-header"))}else{if(this.gridcontent){b.jqx.utilities.html(this.gridcontent,"")}}if(!this.showheader){this.columnsheader.css("display","none")}else{if(this.columnsheader){this.columnsheader.css("display","block")}}this.gridcontent=this.gridcontent||b('
    ');this.gridcontent.remove();var h=this.columnsheight;h=this._preparecolumngroups();if(this.showfilterrow&&this.filterable){this.columnsheader.height(h+this.filterrowheight);if(this.showeverpresentrow&&this.everpresentrowposition!=="bottom"){this.columnsheader.height(h+this.filterrowheight+this.everpresentrowheight)}}else{if(this.showeverpresentrow&&this.everpresentrowposition!=="bottom"){this.columnsheader.height(h+this.everpresentrowheight)}else{this.columnsheader.height(h)}}this.content.append(this.columnsheader);this.content.append(this.gridcontent);this._arrange();if(this._initgroupsheader){this._initgroupsheader()}this.selectionarea=this.selectionarea||b("
    ");this.selectionarea.addClass(this.toThemeProperty("jqx-grid-selectionarea"));this.selectionarea.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this.content.append(this.selectionarea);this.tableheight=null;this.rendergridcontent(false,l);if(this.groups.length>0&&this.groupable){var d=this.vScrollBar[0].style.visibility;this.suspendgroupevents=true;if(this.collapseallgroups){if(!this.groupsexpandedbydefault){this.collapseallgroups(false);this._updatescrollbarsafterrowsprerender()}else{this.expandallgroups(false)}}if(this.vScrollBar[0].style.visibility!=d){this._updatecolumnwidths();this._updatecellwidths()}this.suspendgroupevents=false}if(this.pageable&&this.updatepagerdetails){this.updatepagerdetails();if(this.autoheight){this._updatepageviews()}if(this.autorowheight){if(!this.autoheight){this._updatepageviews()}this._renderrows(this.virtualsizeinfo)}}if(this.showaggregates&&this._updateaggregates){this._updateaggregates()}this._addoverlayelement();if(this.scrollmode=="deferred"){this._addscrollelement()}if(this.showfilterrow&&this.filterable&&this.filterrow&&(f==undefined||f==true)){this._updatelistfilters(!l)}if(this.filterable&&this.filtermode==="simple"||this.filtermode==="default"&&this.showfilterbar){this._renderfilter()}if(this.rendered){this.rendered("full")}this.__isRendered=true},_addoverlayelement:function(){var d=b.jqx.utilities.getBrowser();if((d.browser=="msie"&&parseInt(d.version)<9)||this.isTouchDevice()){if(this._overlayElement){this._overlayElement.remove()}this._overlayElement=b("");this._overlayElement.css("background","white");this._overlayElement.css("z-index",180);this._overlayElement.css("opacity",0.001);if(this.isTouchDevice()){if(this.vScrollBar.css("visibility")!=="hidden"||this.hScrollBar.css("visibility")!=="hidden"){var e=0;if(this.selectionmode=="checkbox"){e+=30}if(this.groupable||this.rowdetails){this._overlayElement.css("left",30*(this.groups.length+(this.rowdetails?1:0)))}var f=this._overlayElement.css("left");this._overlayElement.css("left",f+e)}else{if(this._overlayElement){this._overlayElement.remove()}}}else{this.content.prepend(this._overlayElement)}}this._updateTouchScrolling()},_addscrollelement:function(){if(this._scrollelement){this._scrollelement.remove()}if(this._scrollelementoverlay){this._scrollelementoverlay.remove()}this._scrollelementoverlay=b("
    ");this._scrollelementoverlay.css("background","black");this._scrollelementoverlay.css("z-index",1800);this._scrollelementoverlay.css("opacity",0.1);this._scrollelement=b("");this._scrollelement.css("z-index",1900);this._scrollelement.addClass(this.toThemeProperty("jqx-button"));this._scrollelement.addClass(this.toThemeProperty("jqx-fill-state-normal"));this._scrollelement.addClass(this.toThemeProperty("jqx-rc-all"));this._scrollelement.addClass(this.toThemeProperty("jqx-shadow"));this.content.prepend(this._scrollelement);this.content.prepend(this._scrollelementoverlay)},_postrender:function(f){if(f=="filter"||f=="sort"||f=="group"){if(this.rowdetails&&this.detailsVisibility&&this.detailsVisibility.length>0){this._detailsUpdate=true;for(var e=0;e0){if(f=="filter"||f=="sort"){for(var e=0;e0){k=false;var j=this.vScrollBar[0].style.visibility;this.rendergridcontent(true,false);if(j!=this.vScrollBar[0].style.visibility||this._hiddencolumns){this._updatecolumnwidths();this._updatecellwidths();this._renderrows(this.virtualsizeinfo)}}}}else{if(f=="group"){this.groupsVisibility=new Array()}}}},rendergridcontent:function(e,g){if(this.updating()){return false}if(e==undefined||e==null){e=false}this._requiresupdate=e;var i=this.prerenderrequired;if(this.prerenderrequired){this._arrange()}var h=this.that;var g=g;if(g==null||g==undefined){g=true}this.tableheight=null;h.virtualsizeinfo=h.virtualsizeinfo||h._calculatevirtualheight();if(h.pageable&&!h.autoheight){if(h.dataview.totalrows=j){this.adaptivehidden=true}});this._updatecolumnwidths();this._updatecellwidths();this._renderrows(this.virtualsizeinfo)}return true},_updatecolumnwidths:function(){var p=this.host.width();var f=p;var n="";if(this.columns==undefined||this.columns.records==undefined){return}var u=this.that;var h=this.rowdetails&&this.showrowdetailscolumn?(1+this.groups.length)*this.groupindentwidth:(this.groups.length)*this.groupindentwidth;var m=this.adaptive&&this.element.offsetWidth<=this.adaptivewidth;var e=0;if(m){var t=1;b.each(this.columns.records,function(q,v){if(this.adaptivehidden){t++}});var l=this.vScrollBar[0].offsetWidth>0?this.vScrollBar[0].offsetWidth+4:0;if(this.vScrollBar.css("visibility")=="hidden"){l=0}var k=this.columns.records.length-t;e=(this.element.offsetWidth-32-l)/k}b.each(this.columns.records,function(v,x){if(!(this.hidden&&this.hideable)&&!this.adaptivehidden){if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){var x=0;var y=u.vScrollBar[0].style.visibility=="hidden"?0:u.scrollbarsize+5;if(u.scrollbarautoshow||u.scrollbarsize==0){y=0}var q=f;x=parseFloat(this.width)*q/100;y+=h;if(this._percentagewidth!=undefined){x=parseFloat(this._percentagewidth)*(q-y)/100}if(xthis.maxwidth&&this.maxwidth!="auto"){x=this.maxwidth}p-=x}else{if(this.width!="auto"&&!this._width){p-=this.width}else{n+=this.text}}}});var g=this._gettableheight();if(!this.autoheight){if(this.virtualsizeinfo&&this.virtualsizeinfo.virtualheight>g){if(this.groupable&&this.groups.length>0){if(this.dataview&&this.dataview.loadedrootgroups&&!this.groupsexpandedbydefault){var s=this.dataview.loadedrootgroups.length*this.rowsheight;if(this.pageable){for(var d=0;dg){p-=this.scrollbarsize+5;f-=this.scrollbarsize+5}else{if(this.vScrollBar.css("visibility")=="visible"){p-=this.scrollbarsize+5;f-=this.scrollbarsize+5}}}else{p-=this.scrollbarsize+5;f-=this.scrollbarsize+5}}else{if(this.vScrollBar.css("visibility")!="hidden"&&this.scrollbarsize>0){p-=this.scrollbarsize+5;f-=this.scrollbarsize+5}}}}var h=this.rowdetails&&this.showrowdetailscolumn?(1+this.groups.length)*this.groupindentwidth:(this.groups.length)*this.groupindentwidth;f-=h;if(!this.columnsheader){return}var j=this.columnsheader.find("#columntable"+this.element.id);if(j.length==0){return}var i=0;var o=this;var r=0;b.each(this.columns.records,function(w,A){var y=b(this.element);if(!this.hidden&&!this.adaptivehidden&&this.element.style.display==="none"){this.element.style.display="block"}if(this.adaptivehidden){this.element.style.display="none"}var v=false;var z=this.width;if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){if(this._percentagewidth!=undefined){z=parseFloat(this._percentagewidth)*f/100}else{z=parseFloat(this.width)*f/100}v=true}if(e>0&&this.columntype!=="adaptive"){y.width(e);this.adaptivewidth=e}else{if(this.width!="auto"&&!this._width&&!v){if(parseInt(y[0].style.width)!=this.width){y.width(this.width)}}else{if(v){if(zthis.maxwidth&&this.maxwidth!="auto"){z=this.maxwidth;this.width=z}if(parseInt(y[0].style.width)!=z){y.width(z);this.width=z}}else{var x=Math.floor(p*(this.text.length/n.length));r+=x;if(p-r<3&&p!=r&&p-r>0.01){if(p-r===1){x++}else{x+=2}}else{if(w==u.columns.records.length-1){if(r"+o.escape_HTML(this.text)+"");b(document.body).append(q);x=10+q.width();q.remove()}if(xthis.maxwidth){x=this.maxwidth}this._width="auto";this.width=x;y.width(this.width)}}}if(parseInt(y[0].style.left)!=i){y.css("left",i)}if(!(this.hidden&&this.hideable)&&!this.adaptivehidden){if(e>0&&this.columntype!=="adaptive"){i+=e}else{i+=this.width}}this._requirewidthupdate=true});this.columnsheader.width(2+i);j.width(this.columnsheader.width());if(i==0){this.columnsheader[0].style.visibility="hidden"}else{this.columnsheader[0].style.visibility="inherit"}this._resizecolumngroups();if(this.showfilterrow&&this.filterrow){this.filterrow.width(this.columnsheader.width());this._updatefilterrowui()}if(this.showeverpresentrow){if(this.everpresentrowposition!=="bottom"){this.addnewrowtop.width(this.columnsheader.width())}else{this.addnewrowbottom.width(this.columnsheader.width())}this._updateaddnewrowui()}if(this.autowidth){this._arrange()}},_rendercolumnheaders:function(){var x=this.that;if(this.cardview){if(x.cardviewcolumns.length>0){b.each(this.columns.records,function(p,H){if(typeof x.cardviewcolumns[0]!=="string"){var q=false;for(var k=0;k');o[0].cells=new Array();var B=0;var h=0;var u="";var G=this.host.width();var s=G;var g=new Array();var A=new Array();var t=this.rowdetails&&this.showrowdetailscolumn?(1+this.groups.length)*this.groupindentwidth:(this.groups.length)*this.groupindentwidth;b.each(this.columns.records,function(j,k){if(!(this.hidden&&this.hideable)&&!this.adaptivehidden){if(this.width!="auto"&&!this._width){if(this.widththis.maxwidth&&this.maxwidth!="auto"){G-=this.maxwidth}else{if(this.width.toString().indexOf("%")!=-1){var k=0;var p=x.vScrollBar[0].style.visibility=="hidden"?0:x.scrollbarsize+5;p+=t;k=parseFloat(this.width)*(s-p)/100;if(kthis.maxwidth&&this.maxwidth!="auto"){k=this.maxwidth}G-=k}else{if(typeof this.width=="string"){this.width=parseInt(this.width)}G-=this.width}}}}else{u+=this.text}}if(this.pinned||this.grouped||this.checkboxcolumn){if(x._haspinned){this.pinned=true}g[g.length]=this}else{A[A.length]=this}});if(!this.rtl){for(var D=0;D=this.columns.records.length-g.length;D--){this.columns.replace(D,g[y++])}for(var C=0;Cv&&!this.scrollbarautoshow){if(this.groupable&&this.groups.length>0){if(this.dataview&&this.dataview.loadedrootgroups&&!this.groupsexpandedbydefault){var E=0;if(!this.pageable){var E=this.dataview.loadedrootgroups.length*this.rowsheight}else{if(this.pageable){for(var w=0;wv){G-=this.scrollbarsize+5;s-=this.scrollbarsize+5}}else{G-=this.scrollbarsize+5;s-=this.scrollbarsize+5}}else{if(!this.autoheight&&this.scrollbarsize>0){G-=this.scrollbarsize+5;s-=this.scrollbarsize+5}}}s-=t;var d=function(j,k){var i=x.columngroupslevel*x.columnsheight;i=i-(k.level*x.columnsheight);return i};var f=document.createDocumentFragment();var z=0;b.each(this.columns.records,function(X,V){this.height=x.columnsheight;if(x.columngroups){if(x.columngroups.length){this.height=d(this.datafield,this);l=this.height}}var ab=x.toTP("jqx-grid-column-header")+" "+x.toTP("jqx-widget-header");if(x.rtl){ab+=" "+x.toTP("jqx-grid-column-header-rtl")}var Z=!x.rtl?150+n-1:150+n+1;var T=!x.rtl?n--:n++;var H=b('
    ');if(x.columngroups){H[0].style.height=l+"px";H[0].style.bottom="0px";if(this.pinned){H[0].style.zIndex=Z}}this.uielement=H;if(this.classname!=""&&this.classname){H.addClass(this.classname)}var P=this.width;var Q=false;if(this.width===null){this.width="auto"}if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){if(this._percentagewidth!=undefined){P=parseFloat(this._percentagewidth)*s/100}else{P=parseFloat(this.width)*s/100}Q=true}if(this.width!="auto"&&!this._width&&!Q){if(Pthis.maxwidth&&this.maxwidth!="auto"){P=this.maxwidth;this.width=P}H[0].style.width=parseInt(P)+"px"}else{if(Q){if(Pthis.maxwidth&&this.maxwidth!="auto"){P=this.maxwidth}if(this._percentagewidth==undefined||this.width.toString().indexOf("%")!=-1){this._percentagewidth=this.width}H.width(P);this.width=P}else{if(!this.hidden&&!this.adaptivehidden){var U=Math.floor(G*(this.text.length/u.length));z+=U;if(G-z<3&&G!=z&&G-z>0.01){if(G-z===1){U++}else{U+=2}}else{if(X==x.columns.records.length-1){if(z"+this.text+"");b(document.body).append(S);U=10+S.width();S.remove()}if(Uthis.maxwidth){U=this.maxwidth}this._width="auto";this.width=U;P=this.width;H.width(this.width)}}}if((this.hidden&&this.hideable)||this.adaptivehidden){H.css("display","none")}var p=b(H.children()[0]);var Y=x.rtl?x.toTP("jqx-grid-column-menubutton")+" "+x.toTP("jqx-grid-column-menubutton-rtl"):x.toTP("jqx-grid-column-menubutton");Y+=" "+x.toTP("jqx-icon-arrow-down");var K=b('
    ');if(!x.enableanimations){K.css("margin-left",-16)}if(x.rtl){K.css("left","0px")}this.columnsmenu=K[0];o[0].cells[X]=H[0];K[0].style.width=parseInt(x.columnsmenuwidth)+"px";var J=x.columnsmenu;var q=false;var W=false;var R=(x.groupable&&r>0&&B0&&Bx.columns.records.length-1-r}if(R){B++;J&=false;this.sortable=false;this.editable=false;W=true}else{var M=this.renderer!=null?this.renderer(this.text,this.align,l):x._rendercolumnheader(this.text,this.align,l,x);if(M==null){M=x._rendercolumnheader(this.text,this.align,l,x)}if(this.renderer!=null){M=b(M)}J&=true;q=true}if(x.WinJS){MSApp.execUnsafeLocalFunction(function(){p.append(b(M))})}else{if(this.renderer){p.append(b(M))}else{if(M){p[0].innerHTML=M}}}if(M!=null){var O=b('
    ');K.addClass(x.toTP("jqx-widget-header"));p.append(O);var ad=O.children();this.sorticon=ad[3];this.sortasc=ad[1];this.sortdesc=ad[2];this.filtericon=ad[0];this.iconscontainer=O;if(x.rtl){O.css("margin-left","0px");O.css("left","0px");b(this.sorticon).css("float","left");b(this.sortasc).css("float","left");b(this.filtericon).css("float","left");b(this.sortdesc).css("float","left")}if(!x.autoshowfiltericon&&this.filterable){b(this.filtericon).css("display","block")}}this.element=H[0];if(J){x._handlecolumnsmenu(x,p,H,K,this);if(!this.menu){K.hide()}}f.appendChild(H[0]);if(x.groupable&&q){H[0].id=x.dataview.generatekey();if(x._handlecolumnstogroupsdragdrop){x._handlecolumnstogroupsdragdrop(this,H)}else{throw new Error("jqxGrid: Missing reference to jqxgrid.grouping.js.")}}if(x.columnsreorder&&this.draggable&&x._handlecolumnsdragreorder){x._handlecolumnsdragreorder(this,H)}var aa=this;aa._applyStyle();x.addHandler(H,"mouseenter",function(i){aa.hovered=true;aa._applyStyle()});x.addHandler(H,"mouseleave",function(i){aa.hovered=false;aa._applyStyle()});var ac=function(aj,ae,ak){if(aj.selectable){var am=x.getrows();if(aj.selected===undefined){aj.selected=false}if(!ae.shiftKey||x._clickedcolumn===undefined){x._clickedcolumn=aj}if(ae.shiftKey&&x._clickedcolumn&&ak===undefined){var al=x.columns.records.indexOf(x._clickedcolumn);var ai=x.columns.records.indexOf(aj);var af=Math.min(al,ai);var ag=Math.max(al,ai);x.clearselection();for(var ah=af;ah<=ag;ah++){ac(x.columns.records[ah],ae,true)}x._renderrows(this.virtualsizeinfo);return}if(ak){aj.selected=true}else{if(!ae.ctrlKey){x.clearselection()}aj.selected=!aj.selected}for(var ah=0;ah0&&x._togglesort){if(!x._loading){if(x.suspendClick){return true}x._togglesort(aa)}}ac(aa,i);i.preventDefault();x._raiseEvent(7,{column:aa.getcolumnproperties(),datafield:aa.datafield,originalEvent:i})});aa.toggleSelection=ac;if(aa.resizable&&x.columnsresize&&!W){var I=false;var j="mousemove";if(x.isTouchDevice()&&x.touchmode!==true){I=true;j=b.jqx.mobile.getTouchEventName("touchstart")}x.addHandler(H,j,function(ae){var i=parseInt(ae.pageX);var ag=5;var aj=parseInt(H.coord().left);if(x.hasTransform){aj=b.jqx.utilities.getOffset(H).left}if(x.resizing){return true}if(x._handlecolumnsresize){if(I){var af=x.getTouches(ae);var ai=af[0];i=ai.pageX;ag=40;if(i>=aj+aa.width-ag){x.resizablecolumn={columnelement:H,column:aa};H.css("cursor","col-resize")}else{H.css("cursor","");x.resizablecolumn=null}return true}var ah=aa.width;if(x.rtl){ah=0}if(i>=aj+ah-ag){if(i<=aj+ah+ag){x.resizablecolumn={columnelement:H,column:aa};H.css("cursor","col-resize");return false}else{H.css("cursor","");x.resizablecolumn=null}}else{H.css("cursor","");if(i');var k=p.find("div:first");k.jqxCheckBox({_canFocus:false,disabled:x.disabled,disabledContainer:true,theme:x.theme,enableContainerClick:false,animationShowDelay:0,animationHideDelay:0});k.addClass(x.toThemeProperty("jqx-checkbox"));aa.checkboxelement=k;var L=k.data().jqxCheckBox.instance;x._checkboxcolumn=aa;L.updated=function(ae,i,af){x._checkboxcolumnupdating=true;if(x.disabled){k.jqxCheckBox({disabled:x.disabled});i=af}if(i){x.selectallrows()}else{x.unselectallrows()}x._checkboxcolumnupdating=false}}});if(h>0){this.columnsheader.width(2+h)}else{this.columnsheader.width(h)}o[0].appendChild(f);this.columnsrow=o;x.columnsheader.append(o);if(this.showfilterrow&&this._updatefilterrow){if(!this.columngroups){o.height(this.columnsheight)}else{o.height(this.columngroupslevel*this.columnsheight)}if(!this.filterrow){var F=b("
    ");F[0].id="filterrow."+this.element.id;F.height(this.filterrowheight);this.filterrow=F}this.filterrow.width(2+h);this.columnsheader.append(this.filterrow);this._updatefilterrow()}if(this.showeverpresentrow&&this.everpresentrowposition!=="bottom"){if(!this.columngroups){o.height(this.columnsheight)}else{o.height(this.columngroupslevel*this.columnsheight)}if(!this.addnewrowtop){var m=b("
    ");m[0].id="addnewrowtop."+this.element.id;m.height(this.everpresentrowheight);this.addnewrowtop=m}this.addnewrowtop.width(2+h);if(this.everpresentrowposition=="topAboveFilterRow"){if(this.filterrow){this.addnewrowtop.insertBefore(this.filterrow)}else{this.columnsheader.append(this.addnewrowtop)}}else{this.columnsheader.append(this.addnewrowtop)}this._updateaddnewrow()}else{if(this.showeverpresentrow&&this.everpresentrowposition==="bottom"){if(!this.addnewrowbottom){var e=b("
    ");e[0].id="addnewrowbottom."+this.element.id;e.height(this.everpresentrowheight);this.addnewrowbottom=e}this.addnewrowbottom.width(2+h);this.addnewrow.append(this.addnewrowbottom);this._updateaddnewrow()}}if(h==0){o[0].style.visibility="hidden"}else{o[0].style.visibility="inherit"}o.width(h);if(this._handlecolumnsdragdrop){this._handlecolumnsdragdrop()}if(this._handlecolumnsreorder){this._handlecolumnsreorder()}if(this._rendersortcolumn){this._rendersortcolumn()}if(this._renderfiltercolumn){this._renderfiltercolumn()}if(this._handlecolumnsresize){this._handlecolumnsresize()}if(this.columngroups){this._rendercolumngroups()}if(this._updatecheckboxselection){this._updatecheckboxselection()}},_rendercolumngroups:function(){if(!this.columngroups){return}var p=0;for(var m=0;m');var l=b(this._rendercolumnheader(r.text,r.align,this.columnsheight,this));if(r.renderer){var l=b("
    ");var o=r.renderer(r.text,r.align,s);l.html(o)}g.append(l);g[0].style.left=e+"px";if(e===0){g[0].style.borderLeftColor="transparent"}if(!this.showcolumnheaderlines){g[0].style.borderRightColor="transparent";g[0].style.borderBottomColor="transparent";g[0].style.boxShadow="none"}g[0].style.top=q+"px";g[0].style.height=s+"px";g[0].style.width=-1+r.width+"px";f.append(g);r.element=g;if(r.rendered){r.rendered(l,r.align,s)}}}}},_resizecolumngroups:function(){if(!this.columngroups){return}for(var e=0;e0){if(!p.enableanimations){k.css("display","block");var q=!p.rtl?-48:16;m.iconscontainer.css("margin-left",q+"px");m._animating=false;m._menuvisible=true}else{k.css("display","block");k.stop();m.iconscontainer.stop();if(!p.rtl){k.css("margin-left","0px");k.animate({"margin-left":-l},"fast",function(){k.css("display","block");m._animating=false;m._menuvisible=true})}else{k.css("margin-left",-l);k.animate({"margin-left":"0px"},"fast",function(){k.css("display","block");m._animating=false;m._menuvisible=true})}var q=!p.rtl?-(32+l):l;m.iconscontainer.animate({"margin-left":q},"fast")}}}};var f="mouseenter";if(p.isTouchDevice()){f="touchstart"}p.addHandler(h,f,function(r){var q=parseInt(r.pageX);var t=p.columnsresize&&m.resizable?3:0;var v=parseInt(h.coord().left);if(p.hasTransform){v=b.jqx.utilities.getOffset(h).left}var u=m.width;if(p.rtl){u=0}if(t!=0){if(q>=v+u-t){if(q<=v+u+t){return false}}}var s=p.vScrollInstance.isScrolling();if(m.menu&&p.autoshowcolumnsmenubutton&&!s&&!p.disabled){o()}});if(!p.autoshowcolumnsmenubutton){k.css("display","block");var e=!p.rtl?-48:16;m.iconscontainer.css("margin-left",e+"px");if(!p.rtl){k.css({"margin-left":-l})}else{k.css({"margin-left":"0px"})}}p.addHandler(h,"mouseleave",function(q){if(p.menuitemsarray&&p.menuitemsarray.length>0&&m.menu){var s=b.data(document.body,"contextmenu"+p.element.id);if(s!=undefined&&k[0].id==s.columnsmenu.id){return}if(p.autoshowcolumnsmenubutton){if(!p.enableanimations){k.css("display","none");var r=!p.rtl?-32:0;m.iconscontainer.css("margin-left",r+"px");m._menuvisible=false}else{if(!p.rtl){k.css("margin-left",-l)}else{k.css("margin-left","0px")}k.stop();m.iconscontainer.stop();if(!p.rtl){k.animate({"margin-left":0},"fast",function(){k.css("display","none");m._menuvisible=false})}else{k.animate({"margin-left":-l},"fast",function(){k.css("display","none");m._menuvisible=false})}var r=!p.rtl?-32:0;m.iconscontainer.animate({"margin-left":r},"fast")}}}});var j=true;var d="";var i=b(m.filtericon);p.addHandler(k,"mousedown",function(q){if(!p.gridmenu){p._initmenu()}j=!b.data(p.gridmenu[0],"contextMenuOpened"+p.gridmenu[0].id);d=b.data(document.body,"contextmenu"+p.element.id);if(d!=null){d=d.column.datafield}});p.addHandler(i,"mousedown",function(q){if(!p.gridmenu){p._initmenu()}j=!b.data(p.gridmenu[0],"contextMenuOpened"+p.gridmenu[0].id);d=b.data(document.body,"contextmenu"+p.element.id);if(d!=null){d=d.column.datafield}});var n=function(){if(!m.menu){return false}if(!p.gridmenu){p._initmenu()}if(p.disabled){return false}for(var I=0;IparseInt(w.left)+p.gridmenu.width()){p.gridmenu.jqxMenu("open",w.left,w.top+C)}else{p.gridmenu.jqxMenu("open",k.width()+w.left-p.gridmenu.width(),w.top+C)}if(p.gridmenu.width()<100){p._arrangemenu()}if(p.adaptive&&p.element.offsetWidth=0){L=J[1]}b(J).removeClass("jqx-fill-state-focus");b(L).addClass("jqx-fill-state-focus");L.active=true},225)}p._hasOpenedMenu=true;var z=p._getmenuitembyindex(0);var x=p._getmenuitembyindex(1);var q=p._getmenuitembyindex(2);var y=p._getmenuitembyindex(3);var t=p._getmenuitembyindex(4);var H=p._getmenuitembyindex(5);if(z!=null&&x!=null&&q!=null){var u=m.sortable&&p.sortable;p.gridmenu.jqxMenu("disable",z.id,!u);p.gridmenu.jqxMenu("disable",x.id,!u);p.gridmenu.jqxMenu("disable",q.id,!u);if(m.displayfield!=undefined){var G=p.getsortinformation();var B=(G&&G.sortcolumns&&G.sortcolumns.find(function(J){return J.dataField===m.displayfield}));if(p.sortcolumn==m.displayfield||B){var G=p.getsortinformation();if(u){if(G.sortdirection.ascending){p.gridmenu.jqxMenu("disable",z.id,true)}else{p.gridmenu.jqxMenu("disable",x.id,true)}}}else{p.gridmenu.jqxMenu("disable",q.id,true)}}}if(y!=null&&t!=null){if(!p.groupable||!m.groupable){p.gridmenu.jqxMenu("disable",t.id,true);p.gridmenu.jqxMenu("disable",y.id,true)}else{if(p.groups&&p.groups.indexOf(m.datafield)!=-1){p.gridmenu.jqxMenu("disable",y.id,true);p.gridmenu.jqxMenu("disable",t.id,false)}else{p.gridmenu.jqxMenu("disable",y.id,false);p.gridmenu.jqxMenu("disable",t.id,true)}}}if(H!=null){p.menuOwner=m;p._updatefilterpanel(p,H,m);var s=0;if(p.sortable&&p._togglesort&&p.showsortmenuitems){s+=3}if(p.groupable&&p.addgroup&&p.showgroupmenuitems){s+=2}var D=s*36+6;var F=p._measureMenuElement();var D=s*F+20;if(b.jqx.browser.msie&&b.jqx.browser.version<8){D+=20;b(H).height(220)}if(p.isTouchDevice()){D+=10}if(p.filterable&&p.showfiltermenuitems){if(!m.filterable){p.gridmenu.height(D);b(H).css("display","none")}else{p.gridmenu.height(D+230);b(H).css("display","block")}}}if(p.columnmenuopening){var A=p.columnmenuopening(p.gridmenu,m.displayfield,p.gridmenu.height());if(false===A){setTimeout(function(){p._closemenu()})}}b.data(document.body,"contextmenu"+p.element.id,{column:m,columnsmenu:k[0]})};p.addHandler(i,"click",function(q){if(!m.menu){return false}if(!p.showfilterrow){if(k[0].style.display!="block"){h.trigger("mouseenter")}setTimeout(function(){if(k[0].style.display!="block"){h.trigger("mouseenter")}n()},200)}return false});p.addHandler(k,"click",function(q){if(!m.menu){return false}n();return false});if(p.isTouchDevice()){p.addHandler(k,b.jqx.mobile.getTouchEventName("touchstart"),function(q){if(!m.menu){return false}if(!p._hasOpenedMenu){n()}else{p._closemenu()}return false})}},_removecolumnhandlers:function(h){var e=this.that;var f=b(h.element);if(f.length>0){e.removeHandler(f,"mouseenter");e.removeHandler(f,"mouseleave");var g=b(h.filtericon);e.removeHandler(g,"mousedown");e.removeHandler(g,"click");e.removeHandler(f,"click");e.removeHandler(f,"mousemove");if(e.columnsreorder){e.removeHandler(f,"mousedown.drag");e.removeHandler(f,"mousemove.drag")}e.removeHandler(f,"dragstart");if(f[0].columnsmenu){var d=b(f[0].columnsmenu);e.removeHandler(d,"click");e.removeHandler(d,"mousedown");e.removeHandler(d,b.jqx.mobile.getTouchEventName("touchstart"))}}},_rendercolumnheader:function(h,i,e,d){var g="8px";if(d.columngroups){g=(e/2-this._columnheight/2);if(g<0){g=6}g+="px"}else{if(this.columnsheight!=32){g=(this.columnsheight/2-this._columnheight/2);if(g<0){g=6}g+="px"}}if(this.enableellipsis){if(i=="left"){return'
    '+h+"
    "}else{return'
    '+h+"
    "}}if(i=="center"||i=="middle"){return'"}var f=''+h+"";return f},_renderrows:function(m,p,t){var o=this.that;if((this.pageable||this.groupable)&&(this.autoheight||this.autorowheight)){if(this.table!=null&&this.table[0].rows!=null&&this.table[0].rows.length=o.source._source.totalrecords){w=o.source._source.totalrecords;y=w-o.dataview.pagesize-1;if(y<0){y=0}if(o.source._source.recordendindex==w&&o.source._source.recordstartindex==y){return}}o.source._source.recordstartindex=y;o.source._source.recordendindex=w}o.updatebounddata("cells")}}}};if(this.loadondemand){l();e();this.loadondemand=false}var d=this._browser==undefined?this._isIE10():this._browser;if(this.editable&&this.editcell&&!this.vScrollInstance.isScrolling()&&!this.hScrollInstance.isScrolling()){l()}else{if(this.autoheight){l()}else{if(d||k||(navigator&&navigator.userAgent.indexOf("Safari")!=-1)){if(this._scrolltimer!=null){clearTimeout(this._scrolltimer)}this._scrolltimer=setTimeout(function(){l()},5)}else{l()}}}}else{if(this.scrollmode=="deferred"&&(this.hScrollInstance.isScrolling()||this.vScrollInstance.isScrolling())){if(this._scrolltimer!=null){clearInterval(this._scrolltimer)}var g=this._getfirstvisualrow();if(g!=null){var r=function(B){if(g==null){return""}var A="";var y=o.deferreddatafields;if(y==null){if(o.columns.records.length>0){y=new Array();y.push(o.columns.records[0].displayfield)}}for(var x=0;x"}}A+="
    "+w+"
    ";return A};var i=this.scrollfeedback?this.scrollfeedback(g.bounddata):r(g.bounddata);if(i!=this._scrollelementcontent){this._scrollelement[0].innerHTML=i;this._scrollelementcontent=i}}this._scrollelement.css("visibility","visible");this._scrollelementoverlay.css("visibility","visible");this._scrollelement.css("margin-top",-this._scrollelement.height()/2);this._scrolltimer=setInterval(function(){if(!o.hScrollInstance.isScrolling()&&!o.vScrollInstance.isScrolling()){l();o._scrollelement.css("visibility","hidden");o._scrollelementoverlay.css("visibility","hidden");clearInterval(o._scrolltimer);if(g){o.ensurerowvisible(g.visibleindex)}}},100);return}if(navigator&&navigator.userAgent.indexOf("Chrome")==-1&&navigator.userAgent.indexOf("Safari")!=-1){this._updatedelay=1}if(this.touchDevice!=undefined&&this.touchDevice==true){this._updatedelay=5}var d=this._browser==undefined?this._isIE10():this._browser;if(d||k){this._updatedelay=5}if((d)&&this.hScrollInstance.isScrolling()){l();return}if(b.jqx.browser.mozilla&&this._updatedelay==0&&(this.vScrollInstance.isScrolling()||this.hScrollInstance.isScrolling())){this._updatedelay=0}var h=this.isTouchDevice();if(h){this._updatedelay=0}if(this.updatedelay!=null){this._updatedelay=this.updatedelay}if(this._updatedelay==0){l()}else{var j=this._jqxgridrendertimer;if(j!=null){clearTimeout(j)}if(this.vScrollInstance.isScrolling()||this.hScrollInstance.isScrolling()){if(this._updatedelay){j=setTimeout(function(){l()},this._updatedelay)}else{j=null;l()}this._jqxgridrendertimer=j}else{this._jqxgridrendertimer=j;l()}}}if(o.autorowheight&&!o.autoheight){if(this._pageviews.length>0){var n=this._gettableheight();var q=this._pageviews[0].height;if(q>n){if(this.pageable&&this.gotopage){q=this._pageviews[0].height;if(q<0){q=this._pageviews[0].height}}if(this.vScrollBar.css("visibility")!="visible"){this.vScrollBar.css("visibility","visible")}if(q<=n||this.autoheight){this.vScrollBar.css("visibility","hidden")}if(q-n>0){if(this.scrollmode!="deferred"){var s=q-n;var u=this.vScrollInstance.max;this.vScrollBar.jqxScrollBar({max:s});if(Math.round(s)!=Math.round(u)){var v=this.vScrollBar.jqxScrollBar("value");if(v>s){this.vScrollBar.jqxScrollBar({value:0})}}}}else{this.vScrollBar.jqxScrollBar({value:0,max:q})}}else{if(!this._loading){this.vScrollBar.css("visibility","hidden")}this.vScrollBar.jqxScrollBar({value:0})}this._arrange();if(this.virtualsizeinfo){this.virtualsizeinfo.virtualheight=q}}}},scrolling:function(){var e=this.vScrollInstance.isScrolling();var d=this.hScrollInstance.isScrolling();return{vertical:e,horizontal:d}},_renderhorizontalscroll:function(){var t=this.hScrollInstance;var u=t.value;if(this.hScrollBar.css("visibility")==="hidden"){t.value=0;u=0}var k=parseInt(u);if(this.table==null){return}var q=this.table[0].rows.length;var p=this.columnsrow;var r=this.groupable&&this.groups.length>0?this.groups.length:0;var l=this.columns.records.length-r;var f=this.columns.records;var n=this.dataview.rows.length==0;if(this.rtl){if(this.hScrollBar.css("visibility")!="hidden"){k=t.max-k}}if(n&&!this._haspinned){for(var w=0;w=0&&!m&&!this.editcell)||this.exporting){if(!l){return{start:0,end:k+o}}}var d=0;var i=-1;var g=k+o;var q=false;if(this.autorowheight){return{start:0,end:k+o}}if(!e){for(var h=0;h=f&&i==-1){i=h}if(d>p+f){g=h;break}}}g++;if(g>k+o){g=k+o}if(i==-1||q){i=0}return{start:i,end:g}},_getvirtualcolumnsindexes:function(e,n,i,m,d){var l=this.vScrollInstance.isScrolling()||this.hScrollInstance.isScrolling()||this._keydown;if(this.enableoptimization){if(this.rowdetails||this.rtl||(this.editcell&&l)||(this.width&&this.width.toString().indexOf("%")>=0&&!l&&!this.editcell)||this.exporting){return{start:0,end:i+m}}}if(this.rtl||this.editcell||this.exporting){return{start:0,end:i+m}}var f=0;var k=-1;var g=i+m;if(this.autorowheight){return{start:0,end:i+m}}if(!d){for(var h=0;h=e&&k==-1){k=h}if(f>n+e){g=h;break}}}g++;if(g>i+m){g=i+m}if(k==-1){k=0}return{start:k,end:g}},_getfirstvisualrow:function(){var e=this.vScrollInstance;var g=e.value;var f=parseInt(g);if(this._pagescache.length==0){this.dataview.updateview();this._loadrows()}if(this.vScrollBar[0].style.visibility!="visible"){f=0}if(!this.pageable){var d=this._findvisiblerow(f,this._pageviews);if(d==-1){return null}if(d!=this.dataview.pagenum){this.dataview.pagenum=d;this.dataview.updateview();this._loadrows()}else{if(!this._pagescache[this.dataview.pagenum]){this._loadrows()}}}var h=this._findvisiblerow(f,this._pagescache[this.dataview.pagenum]);var i=this._pagescache[this.dataview.pagenum];if(i&&i[0]){return i[h]}},_rendervisualrows:function(){if(!this.virtualsizeinfo){return}var af=this.vScrollInstance;var r=this.hScrollInstance;var l=af.value;var F=r.value;var q=parseInt(l);var n=parseInt(F);var B=this._gettableheight();var P=this._hostwidth!=undefined?this._hostwidth:this.host.width();if(this.hScrollBar[0].style.visibility=="visible"){B+=29}if(this.scrollmode=="deferred"&&this._newmax!=0){if(q>this._newmax&&this._newmax!=null){q=this._newmax}}var aw=af.isScrolling()||r.isScrolling()||this._keydown;var I=this.groupable&&this.groups.length>0;this.visiblerows=new Array();this.hittestinfo=new Array();if(this.editcell&&this.editrow==undefined){this._hidecelleditor(false)}if(this.editrow!=undefined){this._hideeditors()}if(this.virtualmode&&!this.pageable){this._pagescache=new Array()}if(this._pagescache.length==0){this.dataview.updateview();this._loadrows()}if(this.vScrollBar[0].style.visibility=="hidden"){q=0}if(!this.pageable){var R=this._findvisiblerow(q,this._pageviews);if(R==-1){this._clearvisualrows();this._renderemptyrow();this._updaterowdetailsvisibility()}if(R!=this.dataview.pagenum){this.dataview.pagenum=R;this.dataview.updateview();this._loadrows()}else{if(!this._pagescache[this.dataview.pagenum]){this._loadrows()}}}var ay=this.groupable&&this.groups.length>0?this.groups.length:0;if(!this.columns.records){return}var u=this.columns.records.length-ay;var al=this._findvisiblerow(q,this._pagescache[this.dataview.pagenum]);var S=this._pagescache[this.dataview.pagenum];var Y=al;if(Y<0){Y=0}var ap=0;var ak=0;var W=0;var e=0;var aa=this.virtualsizeinfo.visiblerecords;var V=this.groupable?this.groups.length:0;var E=this.toTP("jqx-grid-cell")+" "+this.toTP("jqx-item");if(this.rtl){E+=" "+this.toTP("jqx-grid-cell-rtl")}if((this.autoheight||this.autorowheight)&&this.pageable){if(!this.groupable||(this.groupable&&this.groups.length===0)){aa=this.dataview.pagesize}}if(I){E=" "+this.toTP("jqx-grid-group-cell")}if(this.isTouchDevice()){E+=" "+this.toTP("jqx-touch")}if(this.autorowheight){E+=" jqx-grid-cell-wrap"}var U=this.rowsheight;if(this.cardview){U=this.cardheight}var L=Y;var ax=this._rendercell;var x=true;var t=this._getvisualcolumnsindexes(n,P,ay,u,I,true);var d=t.start;var aj=t.end;var w=this._getvirtualcolumnsindexes(n,P,ay,u,I);var N=w.start;var k=w.end;var an=b.jqx.browser.msie&&b.jqx.browser.version<9;if((this.autoheight||this.pageable)&&this.autorowheight){if(this._pageviews[0]){this._oldpageviewheight=this._pageviews[0].height}}if(this.autorowheight){Y=0}if(Y>=0){this._updaterowdetailsvisibility();this._startboundindex=S!=null?S[Y].bounddata.boundindex:0;this._startvisibleindex=S!=null?S[Y].bounddata.visibleindex:0;var D=this.table[0].rows;if(this.columns.records.length>10&&this.enablecolumnsvirtualization){var M=function(i){if(i&&i.parentNode&&i.parentNode.nodeName!="#document-fragment"){return true}return false};for(var aq=0;aq=this.source.totalrecords){am=null}if(am==null){Y=-p;if(this._pagescache[this.dataview.pagenum+1]){S=this._pagescache[this.dataview.pagenum+1];this.dataview.pagenum++}else{var v=this._pageviews.length;do{if(this.dataview.pagenum0){this.dataview.updateview();this._loadrows();S=this._pagescache[this.dataview.pagenum]}}else{S=undefined;break}}while(S==undefined&&this.dataview.pagenum';au+="";for(var ac=d;ac':"";au+='';au+='";au+='";au+=""}au+="
    '+ag.text+"
    '+ao+"
    ";au+=ab;au+="";G+=au}O+=';">'+G+"";m.innerHTML+=O;ak++;continue}this.visiblerows[this.visiblerows.length]=am;this.hittestinfo[this.hittestinfo.length]={row:am,visualrow:m,details:false};if(ae&&A){ak++;var m=this.table[0].rows[ak];this._renderrowdetails(E,m,am,ay,u,ak);this.visiblerows[this.visiblerows.length]=am;this.hittestinfo[this.hittestinfo.length]={row:am,visualrow:m,details:true}}if(!this.autorowheight){if(W+e>=B){break}}}else{var ah=true;this._clearvisualrow(n,I,ak,ay,u);if(W+ap+e<=B){ap+=U}}ak++}this._horizontalvalue=n;if(ap>0){if(this.vScrollBar[0].style.visibility=="visible"){var av=parseInt(this.table.css("top"));var K=this._pageviews[this._pageviews.length-1];var z=af.max;var J=K.top+K.height-B;if(this.hScrollBar.css("visibility")=="visible"){J+=this.scrollbarsize+22}if(z!=J&&!this.autorowheight){if(J>=0){if(this.scrollmode!="deferred"){af.max=J;af.setPosition(af.max)}else{if(this._newmax!=J){this._newmax=J;this._rendervisualrows()}}}}}}}if((this.autoheight||this.pageable)&&this.autorowheight){this._pagescache=new Array();var ad=0;var j=0;for(var aq=0;aq=0){f=parseInt(f)+4;if(T.firstChild){if(T.firstChild.className.indexOf("jqx-grid-groups-row")==-1){if(ag.columntype!="checkbox"&&ag.columntype!="button"){if(this.editable&&this.editcell&&this.editcell.column==ag.datafield&&this.editcell.row==this.getboundindex(C)){continue}T.firstChild.style.marginTop=f+"px"}}}}}}}}if(this._pageviews[0]){this._pageviews[0].height=j}this._arrange()}this._renderemptyrow();if(this.toCompile&&this.toCompile.length>0){var Z=this;b.each(Z.toCompile,function(s,y){if(this.compiled){return true}var i=this.cell;if(!i){return true}if(b.jqx.angularCompile){b.jqx.angularCompile(i,"
    "+this.value+"
    ")}this.compiled=true})}},_hideemptyrow:function(){if(!this.showemptyrow){return}if(!this.table){return}if(!this.table[0].rows){return}var f=this.table[0].rows[0];if(!f){return}var g=false;for(var e=0;e0&&this.table[0].rows&&this.table[0].rows.length>0){var k=this.table[0].rows[0];this.table[0].style.top="0px";for(var f=0;f");g.text(this.gridlocalization.emptydatastring);d.append(g);var j=0;if(!this.oldhscroll){j=parseInt(this.table[0].style.marginLeft);if(this.rtl){d.css("z-index",999);d.css("overflow","visible")}}g.css("left",-j-(g.width()/2));g.css("top",this._gettableheight()/2-g.height()/2);if(b.jqx.browser.msie&&b.jqx.browser.version<8){g.css("margin-left","0px");g.css("left",this.host.width()/2-g.width()/2)}var h=Math.abs(parseInt(this.table[0].style.top));if(isNaN(h)){h=0}b(k).height(this._gettableheight()+h);d.css("margin-left","0px");d.width(this.host.width());if(this.table.width()0;if(!this.columns.records){return}for(var h=0;h0){e=this.dataview.pagesize*this.dataview.pagenum}}if(this.groups.length>0&&this.pageable&&this.groupable){var d=this.getrowboundindexbyid(i.bounddata.uid);if(d!=-1){for(var h in this.selectedcells){if(h==d+"_"+g){f=true}}return f}return false}if(j&&i.bounddata!=null){if(this.selectionmode!="singlerow"){if(this.dataview.filters.length>0){if(!this.virtualmode&&i.bounddata.dataindex!=undefined){for(var h in this.selectedcells){if(h==e+i.bounddata.dataindex+"_"+g){f=true}}}else{for(var h in this.selectedcells){if(h==e+i.bounddata.boundindex+"_"+g){f=true}}}}else{for(var h in this.selectedcells){if(h==e+i.bounddata.boundindex+"_"+g){f=true;break}}}}else{if(this.dataview.filters.length>0){if(!this.virtualmode&&i.bounddata.dataindex!=undefined){for(var h in this.selectedcells){if(h==e+i.bounddata.dataindex+"_"+g){f=true;break}}}else{for(var h in this.selectedcells){if(h==e+i.bounddata.boundindex+"_"+g){f=true;break}}}}else{for(var h in this.selectedcells){if(h==e+i.bounddata.boundindex==this.selectedrowindex){f=true;break}}}}}return f},_isrowselected:function(h,g){var f=false;var e=0;if(this.virtualmode&&this.pageable&&this.groupable){if(this.groups.length>0){e=this.dataview.pagesize*this.dataview.pagenum}}if(this.groupable&&this.groups.length>0&&this.pageable){var d=this.getrowboundindexbyid(g.bounddata.uid);if(d==undefined||d==-1){return false}if(this.selectedrowindexes.indexOf(d)!=-1){f=true}if(!f){f=d==this.selectedrowindex&&this.selectedrowindex!=-1}return f}if(h&&g.bounddata!=null){if(this.selectionmode!="singlerow"){if(this.dataview.filters.length>0){if(!this.virtualmode&&g.bounddata.dataindex!=undefined){if(this.selectedrowindexes.indexOf(e+g.bounddata.dataindex)!=-1){f=true}}else{if(this.selectedrowindexes.indexOf(e+g.bounddata.boundindex)!=-1){f=true}}}else{if(this.selectedrowindexes.indexOf(e+g.bounddata.boundindex)!=-1){f=true}}}else{if(this.dataview.filters.length>0){if(!this.virtualmode&&g.bounddata.dataindex!=undefined){if(this.selectedrowindexes.indexOf(e+g.bounddata.dataindex)!=-1){f=true}}else{if(this.selectedrowindexes.indexOf(e+g.bounddata.boundindex)!=-1){f=true}}}else{if(e+g.bounddata.boundindex==this.selectedrowindex){f=true}}}}return f},_rendervisualcell:function(E,k,t,n,y,C,l,u,d,j,x,r){var f=null;var g=this.columns.records[j];if(g.hidden||g.adaptivehidden){var e=u.cells[j];e.innerHTML="";return}var p=this._getcellvalue(g,d);var e=u.cells[j];var B=k;if(this.selectionmode.indexOf("cell")!=-1){if(this.dataview.filters.length>0){if(this.selectedcells[d.bounddata.dataindex+"_"+g.datafield]){t=true}else{t=false}}else{if(this.selectedcells[d.boundindex+"_"+g.datafield]){t=true}else{t=false}}if(this.editcell){if(this.editcell.row===d.boundindex&&this.editcell.column===g.datafield){if(g.columntype!=="checkbox"){t=false}}}if(this.virtualmode||(this.groupable&&this.groups.length>0&&this.pageable)){t=this._iscellselected(true,d,g.datafield)}}if(g.cellclassname!=""&&g.cellclassname){if(typeof g.cellclassname=="string"){B+=" "+g.cellclassname}else{if(!this._columnClassNameCache){this._columnClassNameCache=[]}var i=this.getboundindex(d);if(this._columnClassNameCache[i+"_"+g.datafield+"_"+p]!==undefined&&this.enableoptimization){var q=this._columnClassNameCache[i+"_"+g.datafield+"_"+p];if(q){B+=" "+q}}else{var q=g.cellclassname(i,g.datafield,p,d.bounddata);if(q){B+=" "+q}this._columnClassNameCache[i+"_"+g.datafield+"_"+p]=q}}}var s=this.showsortcolumnbackground&&this.sortcolumn&&g.displayfield==this.sortcolumn;if(this.sortmode==="many"&&this.showsortcolumnbackground){var h=this.getsortcolumns();for(var w=0;w=this.altstart){if((this.altstart+D)%(1+this.altstep)==0){if(!s){B+=" "+this.toTP("jqx-grid-cell-alt")}else{B+=" "+this.toTP("jqx-grid-cell-sort-alt")}if(g.filter&&this.showfiltercolumnbackground){B+=" "+this.toTP("jqx-grid-cell-filter-alt")}if(g.pinned&&this.showpinnedcolumnbackground){B+=" "+this.toTP("jqx-grid-cell-pinned-alt")}}}}if(j<=l){if(C||this.rowdetails||(this.pageable&&this.virtualmode)){var z=b(e);var o=this.columns.records[j].width;if(e.style.width!=parseInt(o)+"px"){z.width(o)}}}else{if(C||this.rowdetails){if(this._hiddencolumns){var z=b(e);var o=this.columns.records[j].width;if(parseInt(e.style.width)!=o){z.width(o)}}}}var A=true;if(this.rowdetails&&n){if(y&&!C){B+=" "+this.toTP("jqx-grid-details-cell")}else{if(C){B+=" "+this.toTP("jqx-grid-group-details-cell")}}if(this.showrowdetailscolumn){if(!this.rtl){if(d.group==undefined&&j==l&&!d.bounddata.totalsrow){var v=this.toThemeProperty("jqx-icon-arrow-down");if(y){B+=" "+this.toTP("jqx-grid-group-expand");B+=" "+v}else{B+=" "+this.toTP("jqx-grid-group-collapse");var v=this.toThemeProperty("jqx-icon-arrow-right");B+=" "+v}A=false;e.title="";e.innerHTML="";if(e.className!=B){e.className=B}return}}else{if(d.group==undefined&&j==u.cells.length-l-1){var v=this.toThemeProperty("jqx-icon-arrow-down");if(y){B+=" "+this.toTP("jqx-grid-group-expand-rtl");B+=" "+v}else{B+=" "+this.toTP("jqx-grid-group-collapse-rtl");var v=this.toThemeProperty("jqx-icon-arrow-left");B+=" "+v}A=false;e.title="";e.innerHTML="";if(e.className!=B){e.className=B}return}}}}if(t&&A&&j>=l){B+=" "+this.toTP("jqx-grid-cell-selected");B+=" "+this.toTP("jqx-fill-state-pressed")}if(e.className!=B){e.className=B}g._applyCellStyle(e);if(d.group!=undefined){p="";e.title="";e.innerHTML="";return}E(this,g,d,p,e,r)},_rendercell:function(w,f,k,u,d,s){var g=u+"_"+f.visibleindex;if(f.columntype=="number"||f.cellsrenderer!=null){var g=k.uniqueid+"_"+f.visibleindex}if(f.columntype=="number"){u=k.visibleindex}if(f.columntype==="adaptive"){u="..."}f._applyCellStyle(d);if(w.showrowlines){d.style.borderBottomColor=""}else{d.style.borderBottomColor="transparent"}if(w.showcolumnheaderlines){f.element.style.borderRightColor="";f.element.style.boxShadow=""}else{f.element.style.borderRightColor="transparent";f.element.style.boxShadow="none"}if(w.showcolumnlines){d.style.borderRightColor=""}else{d.style.borderRightColor="transparent"}if(w.editcell&&w.editrow==undefined){if(w.editmode=="selectedrow"&&f.editable&&w.editable){if(w.editcell.row==w.getboundindex(k)){if(w._showcelleditor){if(!w.hScrollInstance.isScrolling()&&!w.vScrollInstance.isScrolling()){w._showcelleditor(w.editcell.row,f,d,w.editcell.init)}else{w._showcelleditor(w.editcell.row,f,d,false,false)}d.className+=" "+w.toTP("jqx-grid-cell-edit");return}}}else{if(w.editcell.row==w.getboundindex(k)&&w.editcell.column==f.datafield){w.editcell.element=d;if(w.editcell.editing){if(w._showcelleditor){if(!w.hScrollInstance.isScrolling()&&!w.vScrollInstance.isScrolling()){w._showcelleditor(w.editcell.row,f,w.editcell.element,w.editcell.init)}else{w._showcelleditor(w.editcell.row,f,w.editcell.element,w.editcell.init,false)}d.className+=" "+w.toTP("jqx-grid-cell-edit");return}}}}}var t=w._defaultcellsrenderer(u,f);var p=w._cellscache[g];if(p){if(f.columntype=="checkbox"){if(w.host.jqxCheckBox){if(u===""){u=null}var o=d.innerHTML.toString().length==0;if(d.checkbox&&!w.groupable&&!o){d.checkboxrow=w.getboundindex(k);if(u==""){u=false}if(u=="1"){u=true}if(u=="0"){u=false}if(u==1){u=true}if(u==0){u=false}if(u=="true"){u=true}if(u=="false"){u=false}if(u==null&&!f.threestatecheckbox){u=false}if(f.checkboxcolumn){u=false;if(w.dataview.filters.length>0&&!w.virtualmode&&k.bounddata.dataindex!=undefined){if(w.selectedrowindexes.indexOf(k.bounddata.dataindex)!=-1){u=true}}else{if(w.selectedrowindexes.indexOf(k.bounddata.boundindex)!=-1){u=true}}}if(!w.disabled){if(d.checkboxinstance){d.checkboxinstance._setState(u)}else{d.checkbox.jqxCheckBox("_setState",u)}}}else{w._rendercheckboxcell(w,d,f,k,u)}if(f.cellsrenderer!=null){var h=f.cellsrenderer(w.getboundindex(k),f.datafield,u,t,f.getcolumnproperties(),k.bounddata);if(h!=undefined){d.innerHTML=h}}return}}else{if(f.columntype=="button"){if(w.host.jqxButton){if(u==""){u=false}if(f.cellsrenderer!=null){u=f.cellsrenderer(w.getboundindex(k),f.datafield,u,t,f.getcolumnproperties(),k.bounddata)}if(d.innerHTML==""){d.buttonrow=w.getboundindex(k);d.button=null;w._renderbuttoncell(w,d,f,k,u)}if(d.button&&!w.groupable){d.buttonrow=w.getboundindex(k);d.button.val(u)}else{w._renderbuttoncell(w,d,f,k,u)}return}}else{if(f.columntype=="progressbar"||f.columntype==="rating"){if(w.host.jqxButton){if(u==""){u=false}if(f.cellsrenderer!=null){u=f.cellsrenderer(w.getboundindex(k),f.datafield,u,t,f.getcolumnproperties(),k.bounddata)}if(d.innerHTML==""){d.progressrow=w.getboundindex(k);d.progress=null;w._renderprogresscell(w,d,f,k,u)}if(d.progress&&!w.groupable){d.progressrow=w.getboundindex(k);d.progress.val(u)}else{w._renderprogresscell(w,d,f,k,u)}return}}}}if(f.createwidget){if(d.innerHTML==""){d.widgetrow=w.getboundindex(k);d.widget=null;f.widget=null;w._renderwidgetcell(w,d,f,k,u)}if(d.widget&&!w.groupable){d.widgetrow=w.getboundindex(k);if(f.initwidget){f.initwidget(w.getboundindex(k),f.datafield,u,d.firstChild)}else{throw new Error("jqxGrid: 'initwidget' column function is not implemented. Please, implement 'initwidget'")}}else{w._renderwidgetcell(w,d,f,k,u)}return}var v=p.element;if(f.cellsrenderer!=null||(d.childNodes&&d.childNodes.length==0)||w.groupable||w.rowdetails){if(d.innerHTML!=v){d.innerHTML=v}}else{if(d.innerHTML.indexOf("editor")>=0){d.innerHTML=v}else{if(s){var q=v.indexOf(">");var n=v.indexOf("")>=0){d.innerHTML=v}else{if(i.childNodes[0]){if(r!=i.childNodes[0].nodeValue){if(r.indexOf("&")>=0){d.innerHTML=v}else{i.childNodes[0].nodeValue=r}}}else{var e=document.createTextNode(r);i.appendChild(e)}}}else{if(d.innerHTML!=v){d.innerHTML=v}}}}if(w.enabletooltips&&f.enabletooltips){d.title=p.title}return}if(f.columntype=="checkbox"){w._rendercheckboxcell(w,d,f,k,u);w._cellscache[g]={element:"",title:u};if(w.enabletooltips&&f.enabletooltips){d.title=""+u}return}else{if(f.columntype=="button"){if(f.cellsrenderer!=null){u=f.cellsrenderer(w.getboundindex(k),f.datafield,u,t,f.getcolumnproperties(),k.bounddata)}w._renderbuttoncell(w,d,f,k,u);w._cellscache[g]={element:"",title:u};if(w.enabletooltips&&f.enabletooltips){d.title=""+u}return}else{if(f.columntype=="progressbar"||f.columntype==="rating"){if(f.cellsrenderer!=null){u=f.cellsrenderer(w.getboundindex(k),f.datafield,u,t,f.getcolumnproperties(),k.bounddata)}w._renderprogresscell(w,d,f,k,u);w._cellscache[g]={element:"",title:u};if(w.enabletooltips&&f.enabletooltips){d.title=""+u}return}else{if(f.columntype=="number"){u=k.visibleindex}}}}if(f.createwidget){if(f.cellsrenderer!=null){u=f.cellsrenderer(w.getboundindex(k),f.datafield,u,t,f.getcolumnproperties(),k.bounddata)}w._renderwidgetcell(w,d,f,k,u);w._cellscache[g]={element:"",title:u};if(w.enabletooltips&&f.enabletooltips){d.title=u}return}var v=null;if(f.cellsrenderer!=null){if(!w._columnCellsRenderCache){w._columnCellsRenderCache=[]}var l=w.getboundindex(k);if(w._columnCellsRenderCache[l+"_"+f.datafield+"_"+u]!==undefined&&w.enableoptimization){v=w._columnCellsRenderCache[l+"_"+f.datafield+"_"+u]}else{v=f.cellsrenderer(w.getboundindex(k),f.datafield,u,t,f.getcolumnproperties(),k.bounddata);w._columnCellsRenderCache[l+"_"+f.datafield+"_"+u]=v}if(v&&(v.indexOf("=0||v.indexOf(" ng-")>=0)){if(w.toCompile){w.toCompile.push({cell:d,value:v,row:w.getboundindex(k)})}return}}else{v=t}if(v==null){v=t}var m=u;if(w.enabletooltips&&f.enabletooltips){if(f.cellsformat!=""){if(b.jqx.dataFormat){if(b.jqx.dataFormat.isDate(u)){m=b.jqx.dataFormat.formatdate(m,f.cellsformat,w.gridlocalization)}else{if(b.jqx.dataFormat.isNumber(u)){m=b.jqx.dataFormat.formatnumber(m,f.cellsformat,w.gridlocalization)}}}}d.title=m}if(w.WinJS){b(d).html(v)}else{var j=d.innerHTML;if(j.indexOf("editor")>=0||f.cellsrenderer!=null||w.groupable||w.virtualmode){d.innerHTML=v}else{if(j.length>0){var q=v.indexOf(">");var n=v.indexOf("")>=0){d.innerHTML=v}else{if(i.childNodes[0]){if(r!=i.childNodes[0].nodeValue){if(r.indexOf("&")>=0||j.indexOf("span")>=0){d.innerHTML=v}else{i.childNodes[0].nodeValue=r}}}else{var e=document.createTextNode(r);i.appendChild(e)}}}else{if(j!=v){d.innerHTML=v}}}}w._cellscache[g]={element:d.innerHTML,title:m};return true},_isIE10:function(){if(this._browser==undefined){var e=b.jqx.utilities.getBrowser();if(e.browser=="msie"&&parseInt(e.version)>9){this._browser=true}else{this._browser=false;if(e.browser=="msie"){var d="Browser CodeName: "+navigator.appCodeName+"";d+="Browser Name: "+navigator.appName+"";d+="Browser Version: "+navigator.appVersion+"";d+="Platform: "+navigator.platform+"";d+="User-agent header: "+navigator.userAgent+"";if(d.indexOf("Zune 4.7")!=-1){this._browser=true}}}}return this._browser},_renderinlinecell:function(f,d,e,i,g){var h=b(d);d.innerHTML='
    '},_rendercheckboxcell:function(g,e,f,k,h){if(g.host.jqxCheckBox){var j=b(e);if(h===""){if(f.threestatecheckbox){h=null}else{h=false}}if(h===null&&!f.threestatecheckbox){h=false}if(h=="1"){h=true}if(h=="0"){h=false}if(h==1){h=true}if(h==0){h=false}if(h=="true"){h=true}if(h=="false"){h=false}if(f.checkboxcolumn){h=false;var d=this.getboundindex(k);if(this.selectedrowindexes.indexOf(d)!=-1){h=true}}if(j.find(".jqx-checkbox").length==0){e.innerHTML='
    ';b(e.firstChild).jqxCheckBox({disabled:g.disabled,_canFocus:false,hasInput:false,hasThreeStates:f.threestatecheckbox,enableContainerClick:false,animationShowDelay:0,animationHideDelay:0,locked:true,theme:g.theme,checked:h});if(this.enabletooltips&&f.enabletooltips){e.title=""+h}if(this.editable&&f.editable){b(e.firstChild).jqxCheckBox({locked:false})}if(f.checkboxcolumn){b(e.firstChild).jqxCheckBox({locked:false})}e.checkbox=b(e.firstChild);e.checkboxinstance=e.checkbox.data().jqxCheckBox.instance;e.checkboxrow=this.getboundindex(k);var i=b.data(e.firstChild,"jqxCheckBox").instance;i.updated=function(l,s,m){if(g.disabled){s=m;var p=g.table[0].rows.length;var r=g._getcolumnindex(f.datafield);for(var o=0;o=f+1){m+=''}else{m+=''}}var g=e.cellsalign;if(g==="right"){g="flex-end"}d.innerHTML='
    '+m+"
    ";return}if(k==""){k=false}if(l.find(".jqx-progress").length==0){d.innerHTML='';b(d.firstChild).val(k);d.progress=b(d.firstChild);d.progressrow=h.getboundindex(n)}else{d.progressrow=h.getboundindex(n);b(d.firstChild).val(k)}},_renderbuttoncell:function(h,e,g,k,i){if(h.host.jqxButton){var j=b(e);if(i==""){i=false}if(j.find(".jqx-button").length==0){e.innerHTML='';b(e.firstChild).val(i);b(e.firstChild).attr("hideFocus","true");b(e.firstChild).jqxButton({disabled:h.disabled,theme:h.theme,height:h.rowsheight-4,width:g.width-4});e.button=b(e.firstChild);e.buttonrow=h.getboundindex(k);var d=this.isTouchDevice();if(d){var f=b.jqx.mobile.getTouchEventName("touchend");h.addHandler(b(e.firstChild),f,function(l){if(g.buttonclick){g.buttonclick(e.buttonrow,l)}})}else{h.addHandler(b(e.firstChild),"click",function(l){if(g.buttonclick){g.buttonclick(e.buttonrow,l)}})}}else{e.buttonrow=h.getboundindex(k);b(e.firstChild).val(i)}}},_clearvisualrow:function(g,f,p,i,n){var m=this.toTP("jqx-grid-cell");if(f){m=" "+this.toTP("jqx-grid-group-cell")}m+=" "+this.toTP("jqx-grid-cleared-cell");var q=this.table[0].rows;for(var k=0;kd.maxwidth){l=d.maxwidth}if(parseInt(e.style.width)!=l){if(l!="auto"){b(e)[0].style.width=l+"px"}else{b(e)[0].style.width=l}}if(e.title!=""){e.title=""}if(e.innerHTML!=""){e.innerHTML=""}}}if(q[p]){var o=this.rowsheight;if(this.cardview){o=this.cardheight}if(parseInt(q[p].style.height)!=o){q[p].style.height=parseInt(o)+"px"}}},_findgroupstate:function(e){var d=this._findgroup(e);if(d==null){return false}return d.expanded},_findgroup:function(e){var d=null;if(this.expandedgroups[e]){return this.expandedgroups[e]}return d},_clearcaches:function(){this._columnsbydatafield=new Array();this._pagescache=new Array();this._pageviews=new Array();this._cellscache=new Array();this._columnClassNameCache=new Array();this._columnCellsRenderCache=new Array();this.heights=new Array();this.hiddens=new Array();this.hiddenboundrows=new Array();this.heightboundrows=new Array();this.detailboundrows=new Array();this.details=new Array();this.expandedgroups=new Array();this._rowdetailscache=new Array();this._rowdetailselementscache=new Array();if(b.jqx.dataFormat){b.jqx.dataFormat.cleardatescache()}this.tableheight=null},_getColumnText:function(d){if(this._columnsbydatafield==undefined){this._columnsbydatafield=new Array()}if(this._columnsbydatafield[d]){return this._columnsbydatafield[d]}var f=d;var e=null;b.each(this.columns.records,function(){if(this.datafield==d||this.displayfield==d){f=this.text;e=this;return false}});this._columnsbydatafield[d]={label:f,column:e};return this._columnsbydatafield[d]},_getcolumnbydatafield:function(d){if(this.__columnsbydatafield==undefined){this.__columnsbydatafield=new Array()}if(this.__columnsbydatafield[d]){return this.__columnsbydatafield[d]}var f=d;var e=null;b.each(this.columns.records,function(){if(this.datafield==d||this.displayfield==d){f=this.text;e=this;return false}});this.__columnsbydatafield[d]=e;return this.__columnsbydatafield[d]},isscrollingvertically:function(){var d=(this.vScrollBar.jqxScrollBar("isScrolling"));return d},_renderrowdetails:function(q,y,d,x,n,A){if(y==undefined){return}var E=b(y);var g=0;var t=this.rowdetails&&this.showrowdetailscolumn?(1+this.groups.length)*this.groupindentwidth:(this.groups.length)*this.groupindentwidth;if(this.groupable&&this.groups.length>0){for(var r=0;r<=n;r++){var e=b(y.cells[r]);e[0].innerHTML="";e[0].className="jqx-grid-details-cell"}}var e=b(y.cells[g]);if(e[0].style.display=="none"){var o=y.cells[g];var B=2;var l=g;while(o!=undefined&&o.style.display=="none"&&B<10){o=y.cells[l+B-1];B++}e=b(o)}if(this.rtl){for(var v=x;v'+d.rowdetails+"";if(this.rtl){var h='
    '+d.rowdetails+"
    "}this._rowdetailscache[j]={id:y.id,html:h};if(this.initrowdetails){var f=b(h)[0];b(this.gridcontent).prepend(b(f));b(f).css("position","absolute");b(f).width(this.host.width()-t);b(f).height(e.height());var i=e.coord();b(f).css("z-index",1799);if(this.isTouchDevice()){b(f).css("z-index",1999)}b(f).addClass(this.toThemeProperty("jqx-widget-content"));var i=e.coord();var z=this.gridcontent.coord();var w=parseInt(i.top)-parseInt(z.top);var k=parseInt(i.left)-parseInt(z.left);b(f).css("top",w);b(f).css("left",k);this.content[0].scrollTop=0;this.content[0].scrollLeft=0;var D=b(b(f).children()[0]);if(D[0].id!=""){D[0].id=D[0].id+p}this.initrowdetails(p,f,this.element,this.getrowdata(p));this._rowdetailscache[j].element=f;this._rowdetailselementscache[p]=f}else{e[0].innerHTML=h}},_defaultcellsrenderer:function(f,d){if(d.cellsformat!=""){if(b.jqx.dataFormat){if(b.jqx.dataFormat.isDate(f)){f=b.jqx.dataFormat.formatdate(f,d.cellsformat,this.gridlocalization)}else{if(b.jqx.dataFormat.isNumber(f)){f=b.jqx.dataFormat.formatnumber(f,d.cellsformat,this.gridlocalization)}}}}var e="8px";if(this.rowsheight!=31){e=(this.rowsheight/2-this._cellheight/2);if(e<0){e=4}e+="px"}if(this.enableellipsis){if(d.cellsalign=="center"||d.cellsalign=="middle"){return'
    '+f+"
    "}if(d.cellsalign=="left"){return'
    '+f+"
    "}if(d.cellsalign=="right"){return'
    '+f+"
    "}}if(d.cellsalign=="center"||d.cellsalign=="middle"){return'
    '+f+"
    "}return''+f+""},getcelltext:function(g,e){if(g==null||e==null){return null}var d=this.getcellvalue(g,e);var f=this.getcolumn(e);if(f&&f.cellsformat!=""){if(b.jqx.dataFormat){if(b.jqx.dataFormat.isDate(d)){d=b.jqx.dataFormat.formatdate(d,f.cellsformat,this.gridlocalization)}else{if(b.jqx.dataFormat.isNumber(d)){d=b.jqx.dataFormat.formatnumber(d,f.cellsformat,this.gridlocalization)}}}}return d},getcelltextbyid:function(g,e){if(g==null||e==null){return null}var d=this.getcellvaluebyid(g,e);var f=this.getcolumn(e);if(f&&f.cellsformat!=""){if(b.jqx.dataFormat){if(b.jqx.dataFormat.isDate(d)){d=b.jqx.dataFormat.formatdate(d,f.cellsformat,this.gridlocalization)}else{if(b.jqx.dataFormat.isNumber(d)){d=b.jqx.dataFormat.formatnumber(d,f.cellsformat,this.gridlocalization)}}}}return d},_getcellvalue:function(d,f){var e=null;e=f.bounddata[d.datafield];if(d.displayfield!=null){e=f.bounddata[d.displayfield]}if(e==null){e=""}return e},getcell:function(h,d){if(h==null||d==null){return null}var e=parseInt(h);var g=h;var f="";if(!isNaN(e)){g=this.getrowdata(e)}if(g!=null){f=g[d]}return this._getcellresult(f,h,d)},getrenderedcell:function(h,d){if(h==null||d==null){return null}var e=parseInt(h);var g=h;var f="";if(!isNaN(e)){g=this.getrenderedrowdata(e)}if(g!=null){f=g[d]}return this._getcellresult(f,h,d)},_getcellresult:function(k,n,e){var f=this.getcolumn(e);if(f==null||f==undefined){return null}var i=f.getcolumnproperties();var g=i.hidden;var d=i.width;var m=i.pinned;var h=i.cellsalign;var j=i.cellsformat;var l=this.getrowheight(n);if(l==false){return null}return{value:k,row:n,column:e,datafield:e,width:d,height:l,hidden:g,pinned:m,align:h,format:j}},setcellvaluebyid:function(i,d,h,f,g){var e=this.getrowboundindexbyid(i);return this.setcellvalue(e,d,h,f,g)},getcellvaluebyid:function(f,d){var e=this.getrowboundindexbyid(f);return this.getcellvalue(e,d)},setcellvalue:function(o,F,H,Q,j){if(o==null||F==null){return false}var h=parseInt(o);var t=h;this._columnClassNameCache=[];var C=o;if(!isNaN(h)){C=this.getrowdata(h)}var N=false;if(this.filterable&&this._initfilterpanel&&this.dataview.filters.length){N=true}if(this.virtualmode){this._pagescache=new Array()}if(this.sortcache){this.sortcache={}}var q="";var d="";if(C!=null&&C[F]!==H){if(C[F]===null&&H===""){return}var I=this._getcolumnbydatafield(F);var R="string";if(!this.source){this.source=new b.jqx.dataAdapter({})}var v=this.source.datafields||((this.source._source)?this.source._source.datafields:null);if(v){var D="";b.each(v,function(){if(this.name==I.displayfield){if(this.type){D=this.type}return false}});if(D){R=D}d=C[I.displayfield]}q=C[F];if(this.pushToHistory){this._undoRedoIndex=-1;this._undoRedo.push({action:"setcellvalue",data:{oldvalue:q,value:H,datafield:F,row:o}})}if(!I.nullable||(H!=null&&H!==""&&I.nullable&&H.label===undefined)){if(b.jqx.dataFormat.isNumber(q)||R=="number"||R=="float"||R=="int"||R=="decimal"&&R!="date"){if(this.gridlocalization&&this.gridlocalization.decimalseparator==","){if(H&&H.indexOf&&H.indexOf(",")>=0){H=H.replace(",",".")}}H=new Number(H);H=parseFloat(H);if(isNaN(H)){H=0}}else{if(b.jqx.dataFormat.isDate(q)||R=="date"){if(H!=""){var L=H;L=new Date(L);if(L!="Invalid Date"&&L!=null){H=L}else{if(L=="Invalid Date"){L=b.jqx.dataFormat.parsedate(H,I.cellsformat);H=L}}}}}if(C[F]===H){if(!this._updating&&Q!=false){this._renderrows(this.virtualsizeinfo)}return}}var A=this.source&&this.source._source.localdata&&this.source._source.localdata.name==="observableArray";C[F]=H;if(A){var P=this.source._source.localdata;if(!P._updating){P._updating=true;P[o][F]=H;P._updating=false}}var l=this.getrenderedrowdata(h,true);if(!l){return}l[F]=H;if(H!=null&&H.label!=null){var I=this._getcolumnbydatafield(F);C[I.displayfield]=H.label;l[I.displayfield]=H.label;C[F]=H.value;l[F]=H.value;if(A&&!P._updating){P._updating=true;P[o][F]=H.value;P[o][I.displayfield]=H.label;P._updating=false}}if(N){if(C.dataindex!=undefined){t=C.dataindex;this.dataview.cachedrecords[C.dataindex][F]=H;if(H!=null&&H.label!=undefined){this.dataview.cachedrecords[C.dataindex][F]=H.value;this.dataview.cachedrecords[C.dataindex][I.displayfield]=H.label}}}}else{if(!this._updating&&Q!=false){this._renderrows(this.virtualsizeinfo)}return false}if(this.source&&this.source._knockoutdatasource&&!this._updateFromAdapter&&this.autokoupdates){if(this.source._source._localdata){var E=h;if(N){if(C.dataindex!=undefined){E=C.dataindex}}var g=this.source._source._localdata()[E];this.source.suspendKO=true;var G=g;if(G[F]&&G[F].subscribe){if(H!=null&&H.label!=null){G[I.displayfield](H.label);G[F](H.value)}else{G[F](H)}}else{var v=this.source._source.datafields;var B=null;var x=null;if(v){b.each(v,function(){if(this.name==F){x=this.map;return false}})}if(x==null){if(H!=null&&H.label!=null){G[F]=H.value;G[I.displayfield]=H.label}else{G[F]=H}}else{var f=x.split(this.source.mapChar);if(f.length>0){var n=G;for(var M=0;M0;if(N&&!u){if(this.autoheight||this.autorowheight){this.prerenderrequired=true}this.dataview.refresh();this.rendergridcontent(true,false);e();this._renderrows(this.virtualsizeinfo)}else{if(this.sortcolumn&&!u){if(this.autoheight||this.autorowheight){this.prerenderrequired=true}this.dataview.reloaddata();this.rendergridcontent(true,false);e();this._renderrows(this.virtualsizeinfo)}else{if(this.groupable&&this.groups.length>0){if(this.autoheight||this.autorowheight){this.prerenderrequired=true}if(this.pageable){if(this.groups.indexOf(F)!=-1){this._pagescache=new Array();this._cellscache=new Array();this.dataview.refresh();this._render(true,true,false,false)}else{this._pagescache=new Array();this._cellscache=new Array();this.dataview.updateview();this._renderrows(this.virtualsizeinfo)}}else{this._pagescache=new Array();this._cellscache=new Array();this.dataview.updateview();this._renderrows(this.virtualsizeinfo)}}else{this.dataview.updateview();this._renderrows(this.virtualsizeinfo)}}}}this.vScrollInstance.setPosition(K);if(this.showaggregates&&this._updatecolumnsaggregates){this._updatecolumnsaggregates()}if(this.showfilterrow&&this.filterable&&this.filterrow){var y=this.getcolumn(F).filtertype;if(y=="list"||y=="checkedlist"){this._updatelistfilters(true)}}this._raiseEvent(19,{rowindex:o,datafield:F,newvalue:H,value:H,oldvalue:q});return true},getcellvalue:function(h,d){if(h==null||d==null){return null}var e=parseInt(h);var g=h;if(!isNaN(e)){g=this.getrowdata(e)}if(g!=null){var f=g[d];return f}return null},getrows:function(){var h=this.dataview.records.length;if(this.virtualmode){var j=new Array();for(var e=0;ethis.source._source.totalrecords-g){return j.slice(0,this.source._source.totalrecords-g)}return j}if(this.dataview.sortdata){var j=new Array();for(var e=0;e=0){if(this.groupable&&this.groups.length>0){var e=this.dataview.loadedrecords[g]}else{var e=this.dataview.loadedrecords[g];if(this.pageable&&(f==undefined||f==false)){var e=this.dataview.loadedrecords[this.dataview.pagesize*this.dataview.pagenum+d]}}return e}return null},getboundrows:function(){return this.dataview.cachedrecords},getrowdisplayindex:function(d){var f=this.getdisplayrows();for(var e=0;e0&&this.pageable){if(e.bounddata){d=this.getrowboundindexbyid(e.bounddata.uid)}}if(this.dataview.filters.length>0){if(e.bounddata){if(e.bounddata.dataindex!==undefined){d=e.bounddata.dataindex}}else{if(e.dataindex!==undefined){d=e.dataindex}}}return d},getrowboundindex:function(d){var e=this.getdisplayrows()[d];if(e){if(e.dataindex!==undefined){return e.dataindex}return e.boundindex}return -1},getdisplayrows:function(){return this.dataview.loadedrecords},getloadedrows:function(){return this.getdisplayrows()},getvisiblerowdata:function(e){var d=this.getvisiblerows();if(d){return d[e]}return null},getloadedrowdata:function(e){var d=this.getloadedrows();if(d){return d[e]}return null},getvisiblerows:function(){if(this.virtualmode){return this.dataview.loadedrecords}if(this.pageable){var f=[];for(var e=0;e0;if(d>=0&&d0){var g=this.getrowvisibleindex(d);var f=this.dataview.loadedrecords[g]}else{var g=this.getrowvisibleindex(d);var f=this.dataview.loadedrecords[g]}if(f){return f.uid}}if(this.dataview.filters.length>0){var f=this.getboundrows()[d];if(f){if(f.uid!=null){return f.uid}}return null}}return null},_updateGridData:function(e){var d=false;if(this.filterable&&this._initfilterpanel&&this.dataview.filters.length){d=true}if(d){this.dataview.refresh();if(e=="updaterow"){this._render(true,true,false,false,false);this.invalidate()}else{this.render()}}else{if(this.sortcolumn||(this.groupable&&this.groups.length>0)){this.dataview.reloaddata();this.render()}else{if(e==="updaterow"){this.dataview.refresh();if(!this.virtualmode){this._render(true,true,false,false,false)}}this._cellscache=new Array();this._pagescache=new Array();this._renderrows(this.virtualsizeinfo)}}if(this.showfilterrow&&this.filterable&&this.filterrow){this._updatelistfilters(true)}},updaterow:function(d,l,g){if(d!=undefined&&l!=undefined){var i=this.that;var k=false;i._datachanged=true;this._columnClassNameCache=[];if(this.pushToHistory){var j=this.getrowdatabyid(d);this._undoRedoIndex=-1;this._undoRedo.push({action:"updaterow",data:{id:d,rowdata:l,oldrowdata:j}})}var e=function(r,m,v){if(r._loading){throw new Error("jqxGrid: "+r.loadingerrormessage);return false}var t=false;if(!b.isArray(m)){t=r.dataview.updaterow(m,v)}else{b.each(m,function(w,x){t=r.dataview.updaterow(this,v[w],false)});r._cellscache=new Array();r._pagescache=new Array();r.dataview.refresh()}var n=r.vScrollInstance.value;if(g==undefined||g==true){if(r._updating==undefined||r._updating==false){r._updateGridData("updaterow")}}if(r.showaggregates&&r._updatecolumnsaggregates){r._updatecolumnsaggregates()}if(r.source&&r.source._knockoutdatasource&&!r._updateFromAdapter&&r.autokoupdates){if(r.source._source._localdata){var o=r.dataview.recordsbyid["id"+m];var p=r.dataview.records.indexOf(o);var q=r.source._source._localdata()[p];r.source.suspendKO=true;r.source._source._localdata.replace(q,b.extend({},o));r.source.suspendKO=false}}var s=r.source&&r.source._source.localdata&&r.source._source.localdata.name==="observableArray";if(s){if(!r.source._source.localdata._updating){r.source._source.localdata._updating=true;var u=r.getrowboundindexbyid(m);r.source._source.localdata.set(u,v);r.source._source.localdata._updating=false}}r.vScrollInstance.setPosition(n);return t};if(this.source.updaterow){var f=function(m){if(m==true||m==undefined){e(i,d,l)}else{k=false}};try{k=this.source.updaterow(d,l,f);if(k==undefined){k=true}}catch(h){k=false}}else{k=e(i,d,l)}return k}return false},deleterow:function(d,k){if(d!=undefined){this._datachanged=true;var o=false;var m=this.that;var p=this.getrowboundindexbyid(d);var e=new Array();var j=new Array();if(p!=undefined){if(this.selectedrowindexes.indexOf(p)>=0){this.selectedrowindexes.splice(this.selectedrowindexes.indexOf(p),1)}if(this.selectedrowindex==p){this.selectedrowindex=-1}if(!this.virtualmode){if(m.selectionmode.indexOf("row")>=0){b.each(this.selectedrowindexes,function(){var q=m.getrowid(this);e.push(q)});this.selectedrowindexes=new Array();this.selectedrowindex=-1}else{if(m.selectionmode.indexOf("cell")>=0){for(var i in m.selectedcells){var n=m.selectedcells[i];var h=m.getrowid(n.rowindex);n.rowid=h}}}this._rendervisualrows()}}var f=function(w,r){if(w._loading){throw new Error("jqxGrid: "+w.loadingerrormessage);return false}var z=false;var t=w.vScrollInstance.value;if(!b.isArray(r)){var z=w.dataview.deleterow(r)}else{b.each(r,function(){z=w.dataview.deleterow(this,false)});w._cellscache=new Array();w._pagescache=new Array();w.dataview.refresh()}if(!w.virtualmode){if(w.selectionmode.indexOf("row")>=0){b.each(e,function(){var B=w.getrowboundindexbyid(this);if(B!=-1){w.selectrow(B,false)}})}else{var A=new Array();for(var v in w.selectedcells){var y=w.selectedcells[v];var u=y.rowid;var s=w.getrowboundindexbyid(u);if(s!=-1){y.rowindex=s;A[s+"_"+y.datafield]=y}}w.selectedcells=A}}if(w._updating==undefined||w._updating==false){if(k==undefined||k==true){setTimeout(function(){w._render(true,true,false,false);if(w.vScrollBar.css("visibility")!="visible"){w._arrange();w._updatecolumnwidths();w._updatecellwidths();w._renderrows(w.virtualsizeinfo)}})}}if(w.source&&w.source._knockoutdatasource&&!w._updateFromAdapter&&w.autokoupdates){if(w.source._source._localdata){w.source.suspendKO=true;w.source._source._localdata.pop();w.source.suspendKO=false}}var x=w.source&&w.source._source.localdata&&w.source._source.localdata.name==="observableArray";if(x){if(!w.source._source.localdata._updating){w.source._source.localdata._updating=true;w.source._source.localdata.splice(p,1);w.source._source.localdata._updating=false}}if(w.dataview.sortby&&w.sortmode!=="many"){var q=w.getsortinformation();if(q.sortcolumn){w.dataview.clearsortdata();w.dataview.sortby(q.sortcolumn,q.sortdirection?q.sortdirection.ascending:null)}}w.vScrollInstance.setPosition(t);return z};if(this.source.deleterow){var g=function(q){if(q==true||q==undefined){f(m,d)}};try{this.source.deleterow(d,g);if(o==undefined){o=true}}catch(l){o=false}}else{o=f(m,d)}return o}return false},addrow:function(f,o,j){if(o!=undefined){this._datachanged=true;if(j==undefined){j="last"}var n=false;var m=this.that;if(f==null){var g=this.dataview.filters&&this.dataview.filters.length>0;var l=!g?this.dataview.totalrecords:this.dataview.cachedrecords.length;if(!b.isArray(o)){f=this.dataview.getid(this.dataview.source.id,o,l);while(null!=this.dataview.recordsbyid["id"+f]){f++}}else{var d=new Array();b.each(o,function(e,p){var q=m.dataview.getid(m.dataview.source.id,o[e],l+e);d.push(q)});f=d}}var h=function(s,r,v,e){if(s._loading){throw new Error("jqxGrid: "+s.loadingerrormessage);return false}var u=s.vScrollInstance.value;var t=false;if(!b.isArray(v)){if(v!=undefined&&v.dataindex!=undefined){delete v.dataindex}t=s.dataview.addrow(r,v,e)}else{b.each(v,function(w,x){if(this.dataindex!=undefined){delete this.dataindex}var y=null;if(r!=null&&r[w]!=null){y=r[w]}t=s.dataview.addrow(y,this,e,false)});s._cellscache=new Array();s._pagescache=new Array();s.dataview.refresh()}if(s._updating==undefined||s._updating==false){s._render(true,true,false,false);s.invalidate()}if(s.source&&s.source._knockoutdatasource&&!s._updateFromAdapter&&s.autokoupdates){if(s.source._source._localdata){s.source.suspendKO=true;s.source._source._localdata.push(v);s.source.suspendKO=false}}var p=s.source&&s.source._source.localdata&&s.source._source.localdata.name==="observableArray";if(p){if(!s.source._source.localdata._updating){s.source._source.localdata._updating=true;var q=s.getrowboundindexbyid(r);s.source._source.localdata.set(q,v);s.source._source.localdata._updating=false}}if(s.scrollmode!="deferred"){s.vScrollInstance.setPosition(u)}else{s.vScrollInstance.setPosition(0)}return t};if(this.source&&this.source.addrow){var i=function(e,p){if(e==true||e==undefined){if(p!=undefined){f=p}h(m,f,o,j)}};try{n=this.source.addrow(f,o,j,i);if(n==undefined){n=true}}catch(k){n=false}if(n==false){return false}}else{h(this,f,o,j)}return n}return false},_findvisiblerow:function(h,i){if(h==undefined){h=parseInt(this.vScrollInstance.value)}var f=0;if(i==undefined||i==null){i=this.rows.records}var d=i.length;while(f<=d){var e=parseInt((f+d)/2);var g=i[e];if(g==undefined){break}if(g.top>h&&g.top+g.height>h){d=e-1}else{if(g.top0;var q=0;var l=f.visiblerecords;if(p.pageable&&(p.autoheight||p.autorowheight)){l=p.dataview.pagesize;if(p.groupable){p.dataview.updateview();l=p.dataview.rows.length}}if(!p.groupable&&!p.pageable&&(p.autoheight||p.autorowheight)){l=p.dataview.totalrecords}if(p.rowdetails){l+=p.dataview.pagesize}if(!p.columns.records){return}var r=p.columns.records.length;var t=p.table[0].rows;for(var n=0;n=0){e=g.host.width()}else{e=parseInt(e)}if(parseInt(g.table[0].style.width)-2>e-i){if(f!="visible"){if(!g.autowidth){g.hScrollBar[0].style.visibility="visible"}g._arrange()}if(d=="visible"){if(g.scrollmode!="deferred"&&!g.virtualmode){if(g.virtualsizeinfo){var h=g.virtualsizeinfo.virtualheight-g._gettableheight();if(!isNaN(h)&&h>0){if(f!="hidden"){g.vScrollBar.jqxScrollBar("max",h+g.scrollbarsize+4)}else{g.vScrollBar.jqxScrollBar("max",h)}}}}else{g._updatevscrollbarmax()}}else{i=-2}g.hScrollBar.jqxScrollBar("max",i+g.table.width()-g.host.width())}else{if(f!="hidden"){g.hScrollBar.css("visibility","hidden");g._arrange()}}g._renderhorizontalscroll()},_hascolumnstyle:function(){if(undefined!==this._hascolumnstyles){return this._hascolumnstyles}this._hascolumnstyles=false;for(var d=0;d');C.gridcontent.addClass(C.toTP("jqx-grid-content"));C.gridcontent.addClass(C.toTP("jqx-widget-content"));C.gridcontent.append(C.table);var B=C.groupable&&C.groups.length>0;var p=0;C.table[0].rows=new Array();var l=C.toTP("jqx-grid-cell");if(B){l=" "+C.toTP("jqx-grid-group-cell")}var u=o.visiblerecords;if(C.pageable&&(C.autoheight||C.autorowheight)){u=C.dataview.pagesize;if(C.groupable){C.dataview.updateview();u=C.dataview.rows.length;if(u0&&(C.autoheight||C.autorowheight)&&!C.pageable){u=C.dataview.rows.length}if(C.rowdetails){if(C.autoheight||C.autorowheight){u+=C.dataview.pagesize}else{u+=u}}if(!C.columns.records){return}var A=C.columns.records.length;if(b.jqx.browser.msie&&b.jqx.browser.version>8){C.table.css("opacity","0.99")}if(b.jqx.browser.mozilla){}if(navigator.userAgent.indexOf("Safari")!=-1){C.table.css("opacity","0.99")}var r=b.jqx.browser.msie&&b.jqx.browser.version<8;if(r){C.host.attr("hideFocus","true")}var k=C.tableZIndex;if(u*A>k){k=u*A}var g=C.dataview.records.length==0;var n=C.isTouchDevice();var v="";C._hiddencolumns=false;var D=5+C.columns.records.length;for(var z=0;z';if(r){var s='
    ';k--}var f=0;for(var x=0;xw.maxwidth){t=w.maxwidth}if(C.rtl){var q=k-A+2*x;var d='
    ';var y=this._defaultcellsrenderer("",w);d+=y;d+="
    ";s+=d}if(p==0){C.table.width(parseInt(f)+2);p=f}s+="
    ";v+=s}if(C.WinJS){MSApp.execUnsafeLocalFunction(function(){C.table.html(v)})}else{C.table[0].innerHTML=v}C.table[0].rows=new Array();var m=C.table.children();for(var z=0;z');C.table.append(s);s.height(C.rowsheight);C.table[0].rows[0]=s[0];C.table[0].rows[0].cells=new Array()}for(var x=0;x');d.height(C.rowsheight);s.append(d);C.table[0].rows[0].cells[x]=d[0]}if(tw.maxwidth){t=w.maxwidth}if(!(w.hidden&&w.hideable)&&!w.adaptivehidden){f+=t}}C.table.width(parseInt(f)+2);p=f}C._updatescrollbarsafterrowsprerender();if(C.rendered){C.rendered("rows")}C.toCompile=new Array();C._addoverlayelement()}},_groupsheader:function(){return this.groupable&&this.showgroupsheader},_arrange:function(){var A=null;var x=null;this.tableheight=null;var F=this.that;var n=false;var m=false;if(F.width!=null&&F.width.toString().indexOf("px")!=-1){A=F.width}else{if(F.width!=undefined&&!isNaN(F.width)){A=F.width}}if(F.width!=null&&F.width.toString().indexOf("%")!=-1){A=F.width;n=true}if(F.scrollbarautoshow){F.vScrollBar[0].style.display="none";F.hScrollBar[0].style.display="none";F.vScrollBar[0].style.zIndex=F.tableZIndex+F.headerZIndex;F.hScrollBar[0].style.zIndex=F.tableZIndex+F.headerZIndex}if(F.autowidth){var p=0;for(var B=0;B0){x=C+F._pageviews[F._pageviews.length-1].height+F._pageviews[F._pageviews.length-1].top;F.vScrollBar[0].style.visibility="hidden"}else{x=k();if(F.showemptyrow){x+=F.rowsheight}}}}else{if(F.autoheight){x=F.dataview.totalrecords*F.rowsheight;if(F.pageable&&F.gotopage){x=F.pagesize*F.rowsheight}if(F._loading){x=250;F.dataloadelement.height(x)}x+=k();if(x>10000){x=10000}}}if(A!=null){A=parseInt(A);if(!n){if(F.element.style.width!=parseInt(F.width)+"px"){F.element.style.width=parseInt(F.width)+"px"}}else{F.element.style.width=F.width}if(n){A=F.host.width();if(A<=2){A=600;F.host.width(A)}if(!F._oldWidth){F._oldWidth=A}}}else{F.host.width(250)}if(x!=null){if(this.autoheight){x+=2}if(!m){x=parseInt(x)}if(!m){if(F.element.style.height!=parseInt(x)+"px"){F.element.style.height=parseInt(x)+"px"}}else{F.element.style.height=F.height}if(m&&!F.autoheight){x=F.host.height();if(x==0){x=400;F.host.height(x)}if(!F._oldHeight){F._oldHeight=x}}}else{F.host.height(250)}if(F.autoheight){F.tableheight=null;F._gettableheight()}var v=0;if(F.showtoolbar){F.toolbar.width(A);F.toolbar.height(F.toolbarheight-1);F.toolbar.css("top",0);v+=F.toolbarheight;x-=parseInt(F.toolbarheight)}else{F.toolbar[0].style.height="0px"}if(F.showfilterbar){F.filterbar.width(A);F.filterbar.height(F.toolbarheight-1);F.filterbar.css("top",v);v+=F.toolbarheight;x-=parseInt(F.toolbarheight)}else{F.filterbar[0].style.height="0px"}if(F.showstatusbar){if(F.showaggregates){F.statusbar.width(!F.table?A:Math.max(A,F.table.width()))}else{F.statusbar.width(A)}F.statusbar.height(F.statusbarheight)}else{F.statusbar[0].style.height="0px"}if(F.showeverpresentrow&&F.everpresentrowposition==="bottom"){F.addnewrow.width(A);F.addnewrow.height(F.everpresentrowheight)}else{F.addnewrow[0].style.height="0px"}if(F._groupsheader()){F.groupsheader.width(A);F.groupsheader.height(F.groupsheaderheight);F.groupsheader.css("top",v);var y=F.groupsheader.height()+1;v+=y;if(x>y){x-=parseInt(y)}}else{if(F.groupsheader[0].style.width!=A+"px"){F.groupsheader[0].style.width=parseInt(A)+"px"}F.groupsheader[0].style.height="0px";if(F.groupsheader[0].style.top!=v+"px"){F.groupsheader.css("top",v)}var y=F.showgroupsheader&&F.groupable?F.groupsheaderheight:0;var f=v+y+"px";if(F.content[0].style.top!=f){F.content.css("top",v+F.groupsheaderheight)}}var d=F.scrollbarsize;if(isNaN(d)){d=parseInt(d);if(isNaN(d)){d="17px"}else{d=d+"px"}}d=parseInt(d);var s=4;var h=2;var j=0;if(F.vScrollBar[0].style.visibility=="visible"){j=d+s}if(F.hScrollBar[0].style.visibility=="visible"){h=d+s+2}if(d==0){j=0;h=0}var r=0;if(F.pageable){r=F.pagerheight;h+=F.pagerheight}if(F.showstatusbar){h+=F.statusbarheight;r+=F.statusbarheight}if(F.showeverpresentrow&&F.everpresentrowposition==="bottom"){h+=F.everpresentrowheight;r+=F.everpresentrowheight}if(F.hScrollBar[0].style.height!=d+"px"){F.hScrollBar[0].style.height=parseInt(d)+"px"}if(F.hScrollBar[0].style.top!=v+x-s-d-r+"px"||F.hScrollBar[0].style.left!="0px"){F.hScrollBar.css({top:v+x-s-d-r+"px",left:"0px"})}var q=F.hScrollBar[0].style.width;var l=false;var D=false;if(j==0){if(q!=(A-2)+"px"){F.hScrollBar.width(A-2);l=true}}else{if(q!=(A-d-s)+"px"){F.hScrollBar.width(A-d-s+"px");l=true}}if(!F.autoheight){if(F.vScrollBar[0].style.width!=d+"px"){F.vScrollBar.width(d);D=true}if(F.vScrollBar[0].style.height!=parseInt(x)-h+"px"){F.vScrollBar.height(parseInt(x)-h+"px");D=true}if(F.vScrollBar[0].style.left!=parseInt(A)-parseInt(d)-s+"px"||F.vScrollBar[0].style.top!=v+"px"){F.vScrollBar.css({left:parseInt(A)-parseInt(d)-s+"px",top:v})}}if(F.rtl){F.vScrollBar.css({left:"0px",top:v});if(F.vScrollBar.css("visibility")!="hidden"){F.hScrollBar.css({left:d+2})}}var o=F.vScrollInstance;o.disabled=F.disabled;if(!F.autoheight){if(D){o.refresh()}}var z=F.hScrollInstance;z.disabled=F.disabled;if(l){z.refresh()}if(F.autowidth){F.hScrollBar[0].style.visibility="hidden"}F.statusbarheight=parseInt(F.statusbarheight);F.toolbarheight=parseInt(F.toolbarheight);var t=function(w){if((w.vScrollBar[0].style.visibility=="visible")&&(w.hScrollBar[0].style.visibility=="visible")){w.bottomRight[0].style.visibility="visible";w.bottomRight.css({left:1+parseInt(w.vScrollBar.css("left")),top:parseInt(w.hScrollBar.css("top"))});if(w.rtl){w.bottomRight.css("left","0px")}w.bottomRight.width(parseInt(d)+3);w.bottomRight.height(parseInt(d)+4);var G=w.showeverpresentrow&&w.everpresentrowposition=="bottom";var i=G?w.everpresentrowheight:0;if(i>0&&!w.showaggregates){w.bottomRight.css("z-index",99);w.bottomRight.height(parseInt(d)+4+i);w.bottomRight.css({top:parseInt(w.hScrollBar.css("top"))-i})}if(w.showaggregates){w.bottomRight.css("z-index",99);w.bottomRight.height(parseInt(d)+4+w.statusbarheight+i);w.bottomRight.css({top:parseInt(w.hScrollBar.css("top"))-w.statusbarheight-i})}}else{w.bottomRight[0].style.visibility="hidden"}};t(this);if(F.content[0].style.width!=A-j+"px"){F.content.width(A-j)}if(F.content[0].style.height!=x-h+3+"px"){F.content.height(x-h+3)}if(F.scrollbarautoshow){if(F.content[0].style.width!=A+"px"){F.content.width(A)}if(F.content[0].style.height!=x+"px"){F.content.height(x)}}if(F.content[0].style.top!=v+"px"){F.content.css("top",v)}if(F.rtl){F.content.css("left",j);if(F.scrollbarautoshow){F.content.css("left","0px")}if(F.table){var u=F.table.width();if(u=0){F.hScrollBar.jqxScrollBar("max",E)}if(F.hScrollBar[0].style.visibility=="visible"&&E==0){F.hScrollBar[0].style.visibility="hidden";F._arrange()}}}if(A!=parseInt(F.dataloadelement[0].style.width)){F.dataloadelement[0].style.width=F.element.style.width}if(x!=parseInt(F.dataloadelement[0].style.height)){F.dataloadelement[0].style.height=F.element.style.height}if(this.pagergotoinput){if(this.pagergotoinput.offset().top!==this.pagergoto.offset().top){this.pagergotoinput.css("visibility","hidden");this.pagergoto.css("visibility","hidden")}else{this.pagergotoinput.css("visibility","inherit");this.pagergoto.css("visibility","inherit")}}F._hostwidth=A},destroy:function(){delete b.jqx.dataFormat.datescache;delete this.gridlocalization;delete this._undoRedo;b.jqx.utilities.resize(this.host,null,true);if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.self){this.removeHandler(b(window.top.document),"mouseup.grid"+this.element.id)}}if(this.table&&this.table[0]){var m=this.table[0].rows.length;for(var k=0;k0:false;if(this.autogeneratecolumns){var m=new Array();if(f){b.each(f,function(){var i={datafield:this.name,text:this.text||this.name,cellsformat:this.format||""};m.push(i)})}else{if(this.source.records.length>0){var o=this.source.records[0];for(var h in o){if(h!="uid"){var g={width:100,datafield:h,text:h};m.push(g)}}}}this.columns=m}if(this.columns&&this.columns.records){for(var j=0;j=0||this.everpresentrowactions.indexOf("update")>=0)){if(this.updateeverpresentrow){var i=this}setTimeout(function(){i.updateeverpresentrow()},50)}}var g=e;g.owner=this;var h=new b.Event(f);h.owner=this;h.args=g;var d=this.host.trigger(h);e=h.args;return d},wheel:function(f,e){if(e.autoheight&&e.hScrollBar.css("visibility")!="visible"){f.returnValue=true;return true}var g=0;if(!f){f=window.event}if(f.originalEvent&&f.originalEvent.wheelDelta){f.wheelDelta=f.originalEvent.wheelDelta}if(f.wheelDelta){g=f.wheelDelta/120}else{if(f.detail){g=-f.detail/3}}if(g){var d=e._handleDelta(g);if(d){if(f.preventDefault){f.preventDefault()}if(f.originalEvent!=null){f.originalEvent.mouseHandled=true}if(f.stopPropagation!=undefined){f.stopPropagation()}}if(d){d=false;f.returnValue=d;return d}else{return false}}if(f.preventDefault){f.preventDefault()}f.returnValue=false},_handleDelta:function(f){if(this.vScrollBar.css("visibility")!="hidden"){var e=this.vScrollInstance.value;if(f<0){this.scrollDown()}else{this.scrollUp()}var d=this.vScrollInstance.value;if(e!=d){return true}}else{if(this.hScrollBar.css("visibility")!="hidden"){var e=this.hScrollInstance.value;if(f>0){if(this.hScrollInstance.value>2*this.horizontalscrollbarstep){this.hScrollInstance.setPosition(this.hScrollInstance.value-2*this.horizontalscrollbarstep)}else{this.hScrollInstance.setPosition(0)}}else{if(this.hScrollInstance.value=d.min){d.setPosition(parseInt(d.value)-this.rowsheight)}else{d.setPosition(d.min)}},_removeHandlers:function(){var d=this.that;d.removeHandler(b(window),"orientationchange.jqxgrid"+d.element.id);d.removeHandler(b(window),"orientationchanged.jqxgrid"+d.element.id);d.removeHandler(d.vScrollBar,"valueChanged");d.removeHandler(d.hScrollBar,"valueChanged");d.vScrollInstance.valueChanged=null;d.hScrollInstance.valueChanged=null;var e="mousedown.jqxgrid";if(d.isTouchDevice()){e=b.jqx.mobile.getTouchEventName("touchend")}d.removeHandler(d.host,"dblclick.jqxgrid");d.removeHandler(d.host,e);d.removeHandler(d.content,"mousemove",d._mousemovefunc);d.removeHandler(d.host,"mouseleave.jqxgrid");d.removeHandler(d.content,"mouseenter");d.removeHandler(d.content,"mouseleave");d.removeHandler(d.content,"mousedown");d.removeHandler(d.content,"scroll");d.removeHandler(d.content,"selectstart."+d.element.id);d.removeHandler(d.host,"dragstart."+d.element.id);d.removeHandler(d.host,"keydown.edit"+d.element.id);d.removeHandler(b(document),"keydown.edit"+d.element.id);d.removeHandler(b(document),"keyup.edit"+d.element.id);if(d._mousemovedocumentfunc){d.removeHandler(b(document),"mousemove.selection"+d.element.id,d._mousemovedocumentfunc)}d.removeHandler(b(document),"mouseup.selection"+d.element.id);if(d._mousewheelfunc){d.removeHandler(d.host,"mousewheel",d._mousewheelfunc)}if(d.editable){d.removeHandler(b(document),"mousedown.gridedit"+d.element.id)}if(d.host.off){d.content.off("mousemove");d.host.off("mousewheel")}},_addHandlers:function(){var e=this.that;var d=e.isTouchDevice();if(!d){e.addHandler(e.host,"dragstart."+e.element.id,function(j){return false})}if(e.scrollbarautoshow){e.addHandler(e.host,"mouseenter.gridscroll"+e.element.id,function(j){e.vScrollBar.fadeIn("fast");e.hScrollBar.fadeIn("fast")});e.addHandler(e.host,"mouseleave.gridscroll"+e.element.id,function(j){if(!e.vScrollInstance.isScrolling()&&!e.hScrollInstance.isScrolling()){e.vScrollBar.fadeOut("fast");e.hScrollBar.fadeOut("fast")}})}if(e.editable){e.addHandler(b(document),"mousedown.gridedit"+e.element.id,function(m){if(e.editable&&e.begincelledit){if(e.editcell){if(!e.vScrollInstance.isScrolling()&&!e.vScrollInstance.isScrolling()){var r=e.host.coord();var q=e.host.width();var n=e.host.height();var v=false;var k=false;var t=false;if(m.pageYr.top+n){v=true;k=true}if(m.pageXr.left+q){v=true;t=true}if(v){var u=false;if(e.editcell&&e.editcell.editor){switch(e.editcell.columntype){case"datetimeinput":if(e.editcell.editor.jqxDateTimeInput&&e.editcell.editor.jqxDateTimeInput("container")&&e.editcell.editor.jqxDateTimeInput("container")[0].style.display=="block"){var s=e.editcell.editor.jqxDateTimeInput("container").coord().top;var j=e.editcell.editor.jqxDateTimeInput("container").coord().top+e.editcell.editor.jqxDateTimeInput("container").height();if(k&&(m.pageYj)){v=true;e.editcell.editor.jqxDateTimeInput("close")}else{return}}break;case"combobox":if(e.editcell.editor.jqxComboBox&&e.editcell.editor.jqxComboBox("container")&&e.editcell.editor.jqxComboBox("container")[0].style.display=="block"){var s=e.editcell.editor.jqxComboBox("container").coord().top;var j=e.editcell.editor.jqxComboBox("container").coord().top+e.editcell.editor.jqxComboBox("container").height();if(k&&(m.pageYj)){v=true;e.editcell.editor.jqxComboBox("close")}else{return}}break;case"dropdownlist":if(e.editcell.editor.jqxDropDownList&&e.editcell.editor.jqxDropDownList("container")&&e.editcell.editor.jqxDropDownList("container")[0].style.display=="block"){var s=e.editcell.editor.jqxDropDownList("container").coord().top;var j=e.editcell.editor.jqxDropDownList("container").coord().top+e.editcell.editor.jqxDropDownList("container").height();if(k&&(m.pageYj)){v=true;e.editcell.editor.jqxDropDownList("close")}else{return}}break;case"template":case"custom":var l=["jqxDropDownList","jqxComboBox","jqxDropDownButton","jqxDateTimeInput"];var p=function(A){var z=e.editcell.editor.data();if(z[A]&&z[A].instance.container&&z[A].instance.container[0].style.display=="block"){var x=z[A].instance;var B=x.container.coord().top;var y=x.container.coord().top+x.container.height();if(k&&(m.pageYy)){v=true;x.close();return true}else{return false}}};for(var o=0;o=5){e._renderrows(e.virtualsizeinfo);e.currentScrollValue=j.currentValue}else{e._renderrows(e.virtualsizeinfo);e.currentScrollValue=j.currentValue}}if(!e.pageable&&!e.groupable&&e.dataview.virtualmode){if(e.loadondemandupdate){clearTimeout(e.loadondemandupdate)}e.loadondemandupdate=setTimeout(function(){e.loadondemand=true;e._renderrows(e.virtualsizeinfo)},100)}if(d){e._lastScroll=new Date()}}};e.hScrollInstance.valueChanged=function(l){if(e.virtualsizeinfo){e._closemenu();var k=function(){e._renderhorizontalscroll();e._renderrows(e.virtualsizeinfo);if(e.editcell&&!e.editrow){if(e._showcelleditor&&e.editcell.editing){if(!e.hScrollInstance.isScrolling()){e._showcelleditor(e.editcell.row,e.getcolumn(e.editcell.column),e.editcell.element,e.editcell.init)}}}};if(d){k()}else{var j=e._browser==undefined?e._isIE10():e._browser;if(navigator&&navigator.userAgent.indexOf("Safari")!=-1&&navigator.userAgent.indexOf("Chrome")==-1){if(e._hScrollTimer){clearTimeout(e._hScrollTimer)}e._hScrollTimer=setTimeout(function(){k()},1)}else{if(b.jqx.browser.msie){if(e._hScrollTimer){clearTimeout(e._hScrollTimer)}e._hScrollTimer=setTimeout(function(){k()},0.01)}else{k()}}}if(d){e._lastScroll=new Date()}}};e._mousewheelfunc=e._mousewheelfunc||function(j){if(!e.editcell&&e.enablemousewheel){e.wheel(j,e);return false}};e.removeHandler(e.host,"mousewheel",e._mousewheelfunc);e.addHandler(e.host,"mousewheel",e._mousewheelfunc);var h="mousedown.jqxgrid";if(d){h=b.jqx.mobile.getTouchEventName("touchend")}e.addHandler(e.host,h,function(k){if(e.isTouchDevice()){e._newScroll=new Date();if(e._newScroll-e._lastScroll<500){return false}if(b(k.target).ischildof(e.vScrollBar)){return false}if(b(k.target).ischildof(e.hScrollBar)){return false}}e._mousedown=new Date();var j=e._handlemousedown(k,e);if(e.isNestedGrid){if(!e.resizablecolumn&&!e.columnsreorder){k.stopPropagation()}}e._lastmousedown=new Date();return j});if(!d){e.addHandler(e.host,"dblclick.jqxgrid",function(k){if(e.editable&&e.begincelledit&&e.editmode=="dblclick"){e._handledblclick(k,e)}else{if(b.jqx.browser.msie&&b.jqx.browser.version<9){var j=e._handlemousedown(k,e)}}e.mousecaptured=false;e._lastmousedown=new Date();return true});e._mousemovefunc=function(j){if(e._handlemousemove){return e._handlemousemove(j,e)}};e.addHandler(e.content,"mousemove",e._mousemovefunc);if(e._handlemousemoveselection){e._mousemovedocumentfunc=function(j){if(e._handlemousemoveselection){return e._handlemousemoveselection(j,e)}};e.addHandler(b(document),"mousemove.selection"+e.element.id,e._mousemovedocumentfunc)}e.addHandler(b(document),"mouseup.selection"+e.element.id,function(k){if(e._handlemouseupselection){if(k.shiftKey&&b(k.target).ischildof(e.host)){var j=e.editable;e.editable=false;e._lastmousedown=new Date(2000,1,1);e._handlemousedown(k,e);e.mousecaptured=true;e.editable=j}e._handlemouseupselection(k,e)}})}try{if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.self){var i=null;if(window.parent&&document.referrer){i=document.referrer}if(i&&i.indexOf(document.location.host)!=-1){var g=function(k){if(e._handlemouseupselection){try{e._handlemouseupselection(k,e)}catch(j){}}};e.addHandler(b(window.top.document),"mouseup.grid"+e.element.id,g)}}}}catch(f){}e.focused=false;if(!d){e.addHandler(e.content,"mouseenter",function(j){e.focused=true;if(e.wrapper){e.wrapper.attr("tabindex",1);e.content.attr("tabindex",2)}if(e._overlayElement){if(e.vScrollInstance.isScrolling()||e.hScrollInstance.isScrolling()){e._overlayElement[0].style.visibility="visible"}else{e._overlayElement[0].style.visibility="hidden"}}});e.addHandler(e.content,"mouseleave",function(j){if(e._handlemousemove){if(e.enablehover){e._clearhoverstyle()}}if(e._overlayElement){e._overlayElement[0].style.visibility="hidden"}e.focused=false});if(e.groupable||e.columnsreorder){e.addHandler(b(document),"selectstart."+e.element.id,function(j){if(e.__drag===true){return false}})}e.addHandler(e.content,"selectstart."+e.element.id,function(j){if(e.enablebrowserselection){return true}if(e.showfilterrow){if(b(j.target).ischildof(e.filterrow)){return true}}if(e.showeverpresentrow){if(b(j.target).ischildof(e.addnewrow)){return true}if(e.addnewrowtop){if(b(j.target).ischildof(e.addnewrowtop)){return true}}}if(j.target.className&&j.target.className.indexOf("jqx-grid-widget")>=0){return true}if(!e.editcell){return false}if(j.stopPropagation){j.stopPropagation()}});e.addHandler(b(document),"keyup.edit"+e.element.id,function(j){e._keydown=false});e.addHandler(b(document),"keydown.edit"+e.element.id,function(l){if(e.adaptiveview){return true}e._keydown=true&&!e.editcell;var k=l.charCode?l.charCode:l.keyCode?l.keyCode:0;if(k===20){if(!e._capsLock){e._capsLock=true}else{e._capsLock=false}}if(e.handlekeyboardnavigation){if(e.focused||(l.target===e.element||b(l.target).ischildof(e.host))){var m=e.handlekeyboardnavigation(l);if(m==true){return false}}}if(e.editable&&e.editcell){if(k==13||k==27||k==9||k==32){if(e._handleeditkeydown){j=e._handleeditkeydown(l,e)}}}if(k==27){e.mousecaptured=false;if(e.selectionarea.css("visibility")=="visible"){e.selectionarea.css("visibility","hidden")}}if(b.jqx.browser.msie&&b.jqx.browser.version<12&&e.focused&&!e.isNestedGrid){if(k==13&&j==false){return j}var j=true;var k=l.charCode?l.charCode:l.keyCode?l.keyCode:0;if(!e.editcell&&e.editable&&e.editmode!="programmatic"){if(e._handleeditkeydown){j=e._handleeditkeydown(l,e)}}if(j&&e.keyboardnavigation&&e._handlekeydown){j=e._handlekeydown(l,e);if(!j){if(l.preventDefault){l.preventDefault()}if(l.stopPropagation!=undefined){l.stopPropagation()}}return j}}return true});e.addHandler(e.host,"keyup.edit"+e.element.id,function(k){if(e.adaptiveview){return true}if(k.keyCode===9){if(!b(document.activeElement).ischildof(e.filterrow)){if(!b(document.activeElement).ischildof(e.pager)){switch(e.selectionmode){case"singlecell":case"multiplecells":case"multiplecellsextended":case"multiplecellsadvanced":var j=e.getselectedcell();if(j===null){}break;default:var l=e.getselectedrowindex();if(l===-1){}break}}}}});e.addHandler(e.host,"keydown.edit"+e.element.id,function(l){var j=true;if(e.adaptiveview){return true}if(e.handlekeyboardnavigation){var m=e.handlekeyboardnavigation(l);if(m==true){return false}}if(e.editable&&e.editmode!="programmatic"){if(e._handleeditkeydown){j=e._handleeditkeydown(l,e);if(e.isNestedGrid){l.stopPropagation()}}}if(!e.editcell&&l.altKey){if(!b(document.activeElement).ischildof(e.filterrow)){if(!b(document.activeElement).ischildof(e.pager)){if(l.keyCode===40){var k=e.getselectedcell();if(k){e.openmenu(k.column)}}else{if(l.keyCode===38){e._closemenu()}}}}}if(!(b.jqx.browser.msie&&b.jqx.browser.version<8)){if(j&&e.keyboardnavigation&&e._handlekeydown){j=e._handlekeydown(l,e);if(e.isNestedGrid){l.stopPropagation()}}}else{if(e.isNestedGrid){if(j&&e.keyboardnavigation&&e._handlekeydown){j=e._handlekeydown(l,e);l.stopPropagation()}}}if(!j){if(l.preventDefault){l.preventDefault()}if(l.stopPropagation!=undefined){l.stopPropagation()}}if(j&&e.selectedcells&&e.selectedcells.length>0){if(l.keyCode===9&&l.shiftKey&&e.table&&e.table[0].rows&&e.table[0].rows.length>0){if(!b(document.activeElement).ischildof(e.filterrow)){if(!b(document.activeElement).ischildof(e.pager)){e.table[0].rows[0].cells[0].focus()}}}}return j})}},_hittestrow:function(s,q){if(this.vScrollInstance==null||this.hScrollInstance==null){return}if(s==undefined){s=0}if(q==undefined){q==0}var l=this.vScrollInstance;var k=this.hScrollInstance;var f=l.value;if(this.vScrollBar.css("visibility")!="visible"){f=0}var m=k.value;if(this.hScrollBar.css("visibility")!="visible"){m=0}if(this.scrollmode=="deferred"&&this._newmax!=null){if(f>this._newmax){f=this._newmax}}var r=parseInt(f)+q;var j=parseInt(m)+s;if(this.visiblerows==null){return}if(this.visiblerows.length==0){return}var e=false;var i=this._findvisiblerow(r,this.visiblerows);if(i>=0){var o=this.visiblerows[i];var d=this.rowdetails&&o.rowdetails;var n=!o.rowdetailshidden;if(d){var g=this.visiblerows[i-1];if(g==o){o=g;i--}if(n){var h=b(this.hittestinfo[i].visualrow).position().top+parseInt(this.table.css("top"));var p=b(this.hittestinfo[i].visualrow).height();if(!(q>=h&&q<=h+p)){i++;o=this.visiblerows[i];e=true}}}}return{index:i,row:o,details:e}},getcellatposition:function(j,q){var r=this.that;var z=this.showheader?this.columnsheader.height()+2:0;var s=this._groupsheader()?this.groupsheader.height():0;var C=this.showtoolbar?this.toolbarheight:0;var A=this.showfilterbar?this.toolbarheight:0;s+=C;s+=A;var g=this.host.coord();if(this.hasTransform){g=b.jqx.utilities.getOffset(this.host)}var p=j-g.left;var n=q-z-g.top-s;var d=this._hittestrow(p,n);var k=d.row;var l=d.index;var t=this.table[0].rows[l];if(this.dataview&&this.dataview.records.length==0){var o=this.table[0].rows;var D=0;for(var w=0;w=D&&n=p&&p>=j){f=w;break}}if(k!=null){var e=this._getcolumnat(f);return{row:this.getboundindex(k),column:e.datafield,value:this.getcellvalue(this.getboundindex(k),e.datafield)}}return null},_handlecardedit:function(d){var e=d.target.getAttribute("row");var k=document.createElement("div");var m=this.getrowdatabyid(e);var l='
    ';l+="";for(var n=0;n';l+='";l+='';l+=""}l+="
    '+h.text+"
    ";l+="
    ";l+='
    ';l+="
    ";k.innerHTML="
    "+this.gridlocalization.udpaterowstring+" "+e+'
    '+l+"
    ";var i=k.querySelector('[dataid="Save"]');var g=k.querySelector('[dataid="Cancel"]');b(i).jqxButton({template:"primary",width:"40%",theme:this.theme});b(g).jqxButton({width:"40%",theme:this.theme});var j=this;i.onclick=function(){var D=b(k).find("[datafield]");var F={};for(var y=0;y-1){C=C.replace(j.gridlocalization.currencysymbol,"")}var z=function(J,H,I){var t=J;if(H==I){return J}var G=t.indexOf(H);while(G!=-1){t=t.replace(H,I);G=t.indexOf(H)}return t};var x=C;x=parseFloat(x);if(!isNaN(x)){C=x}else{C=z(C,j.gridlocalization.thousandsseparator,"");C=C.replace(j.gridlocalization.decimalseparator,".");if(C.indexOf(j.gridlocalization.percentsymbol)>-1){C=C.replace(j.gridlocalization.percentsymbol,"")}var q="";for(var E=0;E=0){n._handlecardedit(Z)}var o;if(Z.which){o=(Z.which==3)}else{if(Z.button){o=(Z.button==2)}}var R;if(Z.which){R=(Z.which==2)}else{if(Z.button){R=(Z.button==1)}}if(R){return true}if(this.adaptiveview){if(b(Z.target).ischildof(b(this.adaptiveview))){return true}if(Z.target==this.adaptiveview){return true}}if(this.showstatusbar){if(b(Z.target).ischildof(this.statusbar)){return true}if(Z.target==this.statusbar[0]){return true}}if(this.showtoolbar){if(b(Z.target).ischildof(this.toolbar)){return true}if(Z.target==this.toolbar[0]){return true}}if(this.showfilterbar){if(b(Z.target).ischildof(this.filterbar)){return true}if(Z.target==this.filterbar[0]){return true}}if(this.pageable){if(b(Z.target).ischildof(this.pager)){return true}if(Z.target==this.pager[0]){return true}}if(!this.columnsheader){return true}if(!this.editcell){if(this.pageable){if(b(Z.target).ischildof(this.pager)){return true}}}var X=this.showheader?this.columnsheader.height()+2:0;var C=this._groupsheader()?this.groupsheader.height():0;var F=this.showtoolbar?this.toolbarheight:0;var U=this.showfilterbar?this.toolbarheight:0;C+=F;C+=U;var V=this.host.coord();if(this.hasTransform){V=b.jqx.utilities.getOffset(this.host);var ac=this._getBodyOffset();V.left-=ac.left;V.top-=ac.top}var k=parseInt(Z.pageX);var l=parseInt(Z.pageY);if(this.isTouchDevice()){var aa=n.getTouches(Z);var Q=aa[0];k=parseInt(Q.pageX);l=parseInt(Q.pageY);if(n.touchmode==true){if(Q._pageX!=undefined){k=parseInt(Q._pageX);l=parseInt(Q._pageY)}}}var J=k-V.left;var I=l-X-V.top-C;if(this.pageable&&!this.autoheight&&this.gotopage){var d=this.pager.coord().top-V.top-C-X;if(I>d){return}}var W=this._hittestrow(J,I);if(!W){return}if(W.details){return}var r=W.row;var E=W.index;var s=Z.target.className;var j=this.table[0].rows[E];if(j==null){if(n.editable&&n.begincelledit){if(n.editcell){n.endcelledit(n.editcell.row,n.editcell.column,false,true)}}return true}n.mousecaptured=true;n.mousecaptureposition={left:Z.pageX,top:Z.pageY-C,clickedrow:j};var m=this.hScrollInstance;var u=m.value;if(this.rtl){if(this.hScrollBar.css("visibility")!="hidden"){u=m.max-m.value}}var G=-1;var D=this.groupable?this.groups.length:0;if(this.rtl){if(this.vScrollBar[0].style.visibility!="hidden"){u-=this.scrollbarsize+4}if(this.hScrollBar[0].style.visibility=="hidden"){u=-parseInt(this.content.css("left"))}}for(var S=0;S=J&&J>=k){G=S;n.mousecaptureposition.clickedcell=S;break}}if(this.rtl&&this._haspinned){for(var S=j.cells.length-1;S>=0;S--){if(!n.columns.records[S].pinned){break}var T=b(this.columnsrow[0].cells[S]).coord().left-this.host.coord().left;var k=T;var L=this._getcolumnat(S);if(L!=null&&L.hidden){continue}if(L!=null&&L.adaptivehidden){continue}var N=k+b(this.columnsrow[0].cells[S]).width();if(N>=J&&J>=k){G=S;n.mousecaptureposition.clickedcell=S;break}}}if(r!=null&&G>=0){this._raiseEvent(1,{rowindex:this.getboundindex(r),visibleindex:r.visibleindex,row:r,group:r.group,rightclick:o,originalEvent:Z});var L=this._getcolumnat(G);var O=this.getcellvalue(this.getboundindex(r),L.datafield);if(this.editable&&this.editcell){this._currentEditableColumn=G;if(L.datafield==this.editcell.column){if(this.getboundindex(r)==this.editcell.row){this.mousecaptured=false}}}if(L.columntype==="adaptive"){var K=document.createElement("div");var ab=document.createElement("div");var A=document.createElement("a");var w=document.createElement("a");var f=document.createElement("div");var M=this.getrowdata(this.getboundindex(r));A.href="#";w.href="#";K.style.zIndex=99999;K.style.position="absolute";K.style.left="0px";K.style.top="0px";K.style.width="100%";K.style.height="100%";K.className="jqx-adaptive-view jqx-widget-content";f.style.position="relative";f.style.top="100%";f.style.textAlign="center";f.style.marginTop="-40px";ab.style.position="absolute";ab.style.left="0px";ab.style.top="0px";ab.style.width="100%";ab.style.height="100%";if(this.theme){K.className="jqx-widget-content jqx-widget-content-"+this.theme}var e=document.createElement("span");e.className="jqx-icon-close";if(this.theme){e.className="jqx-icon-close jqx-widget-close-"+this.theme}e.style.zIndex=99;e.style.position="absolute";e.style.right="10px";e.style.top="10px";e.style.width="16px";e.style.height="16px";K.appendChild(ab);K.appendChild(e);A.innerHTML=this.gridlocalization.okstring;w.innerHTML=this.gridlocalization.cancelstring;A.addEventListener("mousedown",function(ae){var ag={};var x=n.adaptiveview.querySelectorAll("input");for(var y=0;y0&&E%2===0){v+=""}var B=M[L.displayfield];if(L.cellsformat!=""){if(b.jqx.dataFormat){if(b.jqx.dataFormat.isDate(B)){B=b.jqx.dataFormat.formatdate(B,L.cellsformat,this.gridlocalization)}else{if(b.jqx.dataFormat.isNumber(B)){B=b.jqx.dataFormat.formatnumber(B,L.cellsformat,this.gridlocalization)}}}}var H=this.filterable?'
    ':"";if(this.editable){if(L.editable){v+=""+H+this.escape_HTML(L.text)+": "}else{v+=""+H+this.escape_HTML(L.text)+": "}}else{v+=""+H+this.escape_HTML(L.text)+": "+B+""}E++}v+="";ab.innerHTML=v;e.addEventListener("mousedown",function(i){K.parentNode.removeChild(K);n.adaptiveview=null});this.wrapper[0].appendChild(K);this.adaptiveview=K;b(this.adaptiveview).find(".jqx-grid-column-filterbutton").on("click",function(){var i=this.getAttribute("datafield");var x=this.offsetTop;n.openmenu(i);setTimeout(function(){n.gridmenu.css("top",30+x);n.gridmenu.css("left",25);n.gridmenu.css("z-index",99999);n.gridmenu.parent().css("z-index",99999)},300)});return}this._raiseEvent(8,{rowindex:this.getboundindex(r),column:L?L.getcolumnproperties():null,row:r,visibleindex:r.visibleindex,datafield:L?L.datafield:null,columnindex:G,value:O,rightclick:o,originalEvent:Z});if(L.createwidget){return true}if(this.isTouchDevice()){if(L.columntype=="checkbox"&&this.editable&&this._overlayElement){if(!this.editcell){this._overlayElement.css("visibility","hidden");this.editcell=this.getcell(E,L.datafield);return true}}else{if(L.columntype=="button"&&this._overlayElement){if(L.buttonclick){L.buttonclick(j.cells[G].buttonrow,Z)}return true}}}var h=false;if(this._lastmousedown!=null){if(this._mousedown-this._lastmousedown<300){if(this._clickedrowindex==this.getboundindex(r)){this._raiseEvent(22,{rowindex:this.getboundindex(r),row:r,visibleindex:r.visibleindex,group:r.group,rightclick:o,originalEvent:Z});if(this._clickedcolumn==L.datafield){this._raiseEvent(23,{rowindex:this.getboundindex(r),row:r,visibleindex:r.visibleindex,column:L?L.getcolumnproperties():null,datafield:L?L.datafield:null,columnindex:G,value:O,rightclick:o,originalEvent:Z})}h=true;this._clickedrowindex=-1;this._clickedcolumn=null;if(Z.isPropagationStopped&&Z.isPropagationStopped()){return false}}}}if(o){return true}if(!h){this._clickedrowindex=this.getboundindex(r);this._clickedcolumn=L.datafield}var g=b.jqx.utilities.getBrowser();if(g.browser=="msie"&&parseInt(g.version)<=7){if(G==0&&this.rowdetails){s="jqx-grid-group-collapse"}if(D>0){if(G<=D){s="jqx-grid-group-collapse"}}}if(s.indexOf("jqx-grid-group-expand")!=-1||s.indexOf("jqx-grid-group-collapse")!=-1){if(!this.rtl){if(D>0&&G0&&G>j.cells.length-D-1&&this._togglegroupstate){this._togglegroupstate(r.bounddata,true)}else{if(G==j.cells.length-1-D&&this.rowdetails&&this.showrowdetailscolumn){this._togglerowdetails(r.bounddata,true);this.gridcontent[0].scrollTop=0;this.gridcontent[0].scrollLeft=0}}}}else{if(r.boundindex!=-1){var p=this.selectedrowindexes.slice(0);var Y=false;if(n.selectionmode!="none"&&n.selectionmode!="checkbox"&&this._selectrowwithmouse){if(n.selectionmode=="multiplecellsadvanced"||n.selectionmode=="multiplecellsextended"||n.selectionmode=="multiplerowsextended"||n.selectionmode=="multiplerowsadvanced"){if(!Z.ctrlKey&&!Z.shiftKey&&!Z.metaKey){n.selectedrowindexes=new Array();n.selectedcells=new Array()}}var z=false;var q=this.getboundindex(r);if(n._oldselectedrow===q||n.selectionmode==="none"){z=true}if(n.selectionmode.indexOf("cell")==-1){if((n.selectionmode!="singlerow")||(n.selectedrowindex!=q&&n.selectionmode=="singlerow")){this._applyrowselection(q,true,false,null,L.datafield);this._selectrowwithmouse(n,W,p,L.datafield,Z.ctrlKey||Z.metaKey,Z.shiftKey)}}else{if(L.datafield!=null){this._selectrowwithmouse(n,W,p,L.datafield,Z.ctrlKey||Z.metaKey,Z.shiftKey);if(!Z.shiftKey){this._applycellselection(q,L.datafield,true,false)}}}if(n._oldselectedcell){if(n._oldselectedcell.datafield==n.selectedcell.datafield&&n._oldselectedcell.rowindex==n.selectedcell.rowindex){Y=true}}n._oldselectedcell=n.selectedcell;n._oldselectedrow=q}if(n.autosavestate){if(n.savestate){n.savestate()}}if(n.editable&&n.begincelledit&&n.editmode!="programmatic"){if(Z.isPropagationStopped&&Z.isPropagationStopped()){return false}if(n.editmode=="selectedrow"){if(z&&!n.editcell){if(L.columntype!=="checkbox"){this._currentEditableColumn=G;var t=n.beginrowedit(this.getboundindex(r))}}else{if(n.editcell&&!z&&n.selectionmode!="none"){var t=n.endrowedit(n.editcell.row)}}}else{var q=this.getboundindex(r);var P=n.editmode=="click"||(Y&&n.editmode=="selectedcell");if(n.selectionmode.indexOf("cell")==-1){if(n.editmode!="dblclick"){P=true}}if(P){if(r.boundindex!=undefined&&L.editable){var t=n.begincelledit(this.getboundindex(r),L.datafield,L.defaulteditorvalue,false);if(n.selectionmode.indexOf("cell")!=-1){n._applycellselection(q,L.datafield,false,false)}}}if(n.selectionmode.indexOf("cell")!=-1){if(n.editmode=="selectedcell"&&!Y&&n.editcell){n.endcelledit(n.editcell.row,n.editcell.column,false,true)}}if(n.editmode=="dblclick"&&!Y&&n.editcell&&!(n.editcell.row==q&&L.datafield==n.editcell.column)){n.endcelledit(n.editcell.row,n.editcell.column,false,true)}}return true}}}}return true},_columnPropertyChanged:function(e,d,g,f){},_rowPropertyChanged:function(g,d,f,e){},_serializeObject:function(d){if(d==null){return""}var e="";b.each(d,function(g){var i=this;if(g>0){e+=", "}e+="[";var f=0;for(var h in i){if(f>0){e+=", "}e+="{"+h+":"+i[h]+"}";f++}e+="]"});return e},isbindingcompleted:function(){return !this._loading},propertiesChangedHandler:function(d,e,f){if(f.width&&f.height&&Object.keys(f).length==2){d._updatesize(true,true);d._resizeWindow();if(d.virtualmode&&!d._loading){d.vScrollInstance.setPosition(0)}else{setTimeout(function(){d._renderrows(d.virtualsizeinfo)},100)}}},propertyChangedHandler:function(e,f,i,h){if(this.isInitialized==undefined||this.isInitialized==false){return}if(e.batchUpdate&&e.batchUpdate.width&&e.batchUpdate.height&&Object.keys(e.batchUpdate).length==2){return}f=f.toLowerCase();switch(f){case"cardview":case"cardviewsize":case"cardviewcolumns":case"cardheight":e.rowsheight=32;e.__rowsheight=e.rowsheight;e.virtualsizeinfo=null;if(e.cardview){e.__rowsheight=e.rowsheight;e.rowsheight=e.cardheight}e.render();break;case"editable":case"showcolumnheaderlines":case"showcolumnlines":case"showrowlines":e.refresh();break;case"everpresentrowactionsmode":if(i!=h){e._removeaddnewrow();e.render()}break;case"everpresentrowactions":e._updateaddnewrowui();break;case"showeverpresentrow":case"everpresentrowposition":case"everpresentrowheight":if(i!=h){e._removeaddnewrow();e.render()}break;case"rtl":e.content.css("left","");e.columns=e._columns;e._filterrowcache=[];e.vScrollBar.jqxScrollBar({rtl:h});e.hScrollBar.jqxScrollBar({rtl:h});if(e._initpager){e._initpager()}if(e._initgroupsheader){e._initgroupsheader()}e.render();break;case"enablebrowserselection":if(!e.showfilterrow){if(!e.showstatusbar&&!e.showtoolbar){e.host.addClass("jqx-disableselect")}e.content.addClass("jqx-disableselect")}if(e.enablebrowserselection){e.content.removeClass("jqx-disableselect");e.host.removeClass("jqx-disableselect")}break;case"columnsheight":if(e.columnsheight!=32||e.columngroups){e._measureElement("column")}e._render(true,true,true,false,false);break;case"rowsheight":if(h!=i){if(e.rowsheight!=31){e._measureElement("cell")}e.virtualsizeinfo=null;e.rendergridcontent(true,false);e.refresh()}break;case"scrollMode":e.vScrollInstance.thumbStep=e.rowsheight;break;case"showdefaultloadelement":e._builddataloadelement();break;case"showfiltermenuitems":case"showsortmenuitems":case"showgroupmenuitems":case"filtermode":e._initmenu();break;case"touchmode":if(i!=h){e._removeHandlers();e.touchDevice=null;e.vScrollBar.jqxScrollBar({touchMode:h});e.hScrollBar.jqxScrollBar({touchMode:h});e._updateTouchScrolling();e._arrange();e._updatecolumnwidths();e._updatecellwidths();e._addHandlers()}break;case"autoshowcolumnsmenubutton":if(i!=h){e._rendercolumnheaders()}break;case"rendergridrows":if(i!=h){e.updatebounddata()}break;case"editmode":if(i!=h){e._removeHandlers();e._addHandlers()}break;case"source":e.updatebounddata();if(e.virtualmode&&!e._loading){e.loadondemand=true;e._renderrows(e.virtualsizeinfo)}break;case"horizontalscrollbarstep":case"verticalscrollbarstep":case"horizontalscrollbarlargestep":case"verticalscrollbarlargestep":this.vScrollBar.jqxScrollBar({step:this.verticalscrollbarstep,largestep:this.verticalscrollbarlargestep});this.hScrollBar.jqxScrollBar({step:this.horizontalscrollbarstep,largestep:this.horizontalscrollbarlargestep});break;case"closeablegroups":if(e._initgroupsheader){e._initgroupsheader()}break;case"showgroupsheader":if(i!=h){e._arrange();if(e._initgroupsheader){e._initgroupsheader()}e._renderrows(e.virtualsizeinfo)}break;case"theme":if(h!=i){b.jqx.utilities.setTheme(i,h,e.host);if(e.gridmenu){e.gridmenu.jqxMenu({theme:h})}if(e.pageable){e._updatepagertheme()}if(e.filterable){e._updatefilterrowui(true)}if(e.showeverpresentrow){e._updateaddnewrowui(true)}e._applyThemeSettings()}break;case"showtoolbar":case"showfilterbar":case"toolbarheight":if(i!=h){e._arrange();e.refresh()}break;case"showstatusbar":if(i!=h){if(e.statusbar){if(h){e.statusbar.show()}else{e.statusbar.hide()}}e._arrange();e.refresh()}break;case"statusbarheight":if(i!=h){e._arrange();e.refresh()}break;case"filterable":case"showfilterrow":if(i!=h){e.render()}break;case"autoshowfiltericon":case"showfiltercolumnbackground":case"showpinnedcolumnbackground":case"showsortcolumnbackground":if(i!=h){e.rendergridcontent()}break;case"showrowdetailscolumn":if(i!=h){e.render()}break;case"scrollbarsize":if(i!=h){b.jqx.utilities.scrollBarSize=h;e._arrange()}break;case"width":case"height":if(i!=h){e._updatesize(true,true);e._resizeWindow();if(e.virtualmode&&!e._loading){e.vScrollInstance.setPosition(0)}else{setTimeout(function(){e._renderrows(e.virtualsizeinfo)},100)}}break;case"altrows":case"altstart":case"altstep":if(i!=h){e._renderrows(e.virtualsizeinfo)}break;case"groupsheaderheight":if(i!=h){e._arrange();if(e._initgroupsheader){e._initgroupsheader()}}break;case"pagerheight":if(i!=h){e._initpager()}break;case"selectedrowindex":e.selectrow(h);break;case"selectionmode":if(i!=h){if(h=="none"){e.selectedrowindexes=new Array();e.selectedcells=new Array();e.selectedrowindex=-1}e._renderrows(e.virtualsizeinfo);if(h=="checkbox"){e._render(false,false,true,false,false)}}break;case"showheader":if(h){e.columnsheader.css("display","block")}else{e.columnsheader.css("display","none")}break;case"virtualmode":if(i!=h){e.dataview.virtualmode=e.virtualmode;e.dataview.refresh(false);e._render(false,false,false)}break;case"columnsmenu":if(i!=h){e.render()}break;case"columngroups":e._render(true,true,true,false,false);break;case"columns":if(e.columns&&e.columns.length>e.headerZIndex){e.headerZIndex=e.columns.length+100}if(e._serializeObject(e._cachedcolumns)!==e._serializeObject(h)){var d=false;if(e.filterable){if(i&&i.records){b.each(i.records,function(){if(this.filter){d=true}e.dataview.removefilter(this.displayfield,this.filter)})}}e._columns=null;e._filterrowcache=[];e.render();if(d){e.applyfilters()}e._cachedcolumns=e.columns;if(e.removesort){e.removesort()}}else{e[f]=i}break;case"autoheight":if(i!=h){e._render(false,false,true)}break;case"pagermode":case"pagerbuttonscount":if(i!=h){if(e._initpager){if(e.pagershowrowscombo){e.pagershowrowscombo.jqxDropDownList("destroy");e.pagershowrowscombo=null}if(e.pagerrightbutton){e.removeHandler(e.pagerrightbutton,"mousedown");e.removeHandler(e.pagerrightbutton,"mouseup");e.removeHandler(e.pagerrightbutton,"click");e.pagerrightbutton.jqxButton("destroy");e.pagerrightbutton=null}if(e.pagerleftbutton){e.removeHandler(e.pagerleftbutton,"mousedown");e.removeHandler(e.pagerleftbutton,"mouseup");e.removeHandler(e.pagerleftbutton,"click");e.pagerleftbutton.jqxButton("destroy");e.removeHandler(b(document),"mouseup.pagerbuttons"+e.element.id);e.pagerleftbutton=null}e.pagerdiv.remove();e._initpager()}}break;case"pagesizeoptions":case"pageable":case"pagesize":if(i!=h){if(e._loading){throw new Error("jqxGrid: "+e.loadingerrormessage);return}if(!e.host.jqxDropDownList||!e.host.jqxListBox){e._testmodules();return}if(e._initpager){if(f!="pageable"&&f!="pagermode"){if(typeof(h)=="string"){var g="The expected value type is: Int.";if(f!="pagesize"){var g="The expected value type is: Array of Int values."}throw new Error("Invalid Value for: "+f+". "+g)}}e.dataview.pageable=e.pageable;e.dataview.pagenum=0;e.dataview.pagesize=e._getpagesize();if(e.virtualmode){e.updatebounddata()}e.dataview.refresh(true);e._initpager();if(f=="pagesizeoptions"){if(h!=null&&h.length>0){e.pagesize=parseInt(h[0]);e.dataview.pagesize=parseInt(h[0]);e.prerenderrequired=true;e._requiresupdate=true;e.dataview.pagenum=-1;e.gotopage(0)}}}e._render(false,false,false)}break;case"groups":if(e._serializeObject(i)!==e._serializeObject(h)){e.dataview.groups=h;e._refreshdataview();e._render(true,true,true,false)}break;case"groupable":if(i!=h){e.dataview.groupable=e.groupable;e.dataview.pagenum=0;e.dataview.refresh(false);e._render(false,false,true)}break;case"renderstatusbar":if(h!=null){e.renderstatusbar(e.statusbar)}break;case"rendertoolbar":if(h!=null){e.rendertoolbar(e.toolbar)}break;case"disabled":if(h){e.host.addClass(e.toThemeProperty("jqx-fill-state-disabled"))}else{e.host.removeClass(e.toThemeProperty("jqx-fill-state-disabled"))}b.jqx.aria(e,"aria-disabled",e.disabled);if(e.pageable){if(e.pagerrightbutton){e.pagerrightbutton.jqxButton({disabled:h});e.pagerleftbutton.jqxButton({disabled:h});e.pagershowrowscombo.jqxDropDownList({disabled:h});e.pagergotoinput.attr("disabled",h)}if(e.pagerfirstbutton){e.pagerfirstbutton.jqxButton({disabled:h});e.pagerlastbutton.jqxButton({disabled:h})}}e.vScrollBar.jqxScrollBar({disabled:h});e.hScrollBar.jqxScrollBar({disabled:h});if(e.filterable&&e.showfilterrow){e._updatefilterrowui(true)}if(e.showeverpresentrow){e._updateaddnewrowui(true)}break}}});function c(d,e){this.owner=d;this.datafield=null;this.displayfield=null;this.text="";this.createfilterpanel=null;this.sortable=true;this.hideable=true;this.editable=true;this.hidden=false;this.adaptivehidden=false;this.groupable=true;this.renderer=null;this.cellsrenderer=null;this.checkchange=null,this.threestatecheckbox=false;this.buttonclick=null,this.columntype=null;this.cellsformat="";this.align="left";this.cellsalign="left";this.width="auto";this.minwidth=25;this.maxwidth="auto";this.pinned=false;this.visibleindex=-1;this.filterable=true;this.filter=null;this.filteritems=[];this.resizable=true;this.initeditor=null;this.createeditor=null;this.createwidget=null;this.initwidget=null;this.destroywidget=null;this.destroyeditor=null;this.geteditorvalue=null;this.validation=null;this.classname="";this.cellclassname="";this.cellendedit=null;this.cellbeginedit=null;this.cellvaluechanging=null;this.aggregates=null;this.aggregatesrenderer=null;this.menu=true;this.createfilterwidget=null;this.filtertype="default";this.filtercondition=null;this.rendered=null;this.exportable=true;this.exporting=false;this.draggable=true;this.nullable=true;this.clipboard=true;this.selectable=false;this.autofill=true;this._applyStyle=function(){var f=this;if(f.hovered){if(f.style.headerBackgroundHoveredColor){f.element.style.backgroundColor=f.style.headerBackgroundHoveredColor}if(f.style.headerHoveredColor){f.element.style.color=f.style.headerHoveredColor}return}if(f.selected){if(f.style.headerBackgroundSelectedColor){f.element.style.backgroundColor=f.style.headerBackgroundSelectedColor}if(f.style.headerSelectedColor){f.element.style.color=f.style.headerSelectedColor}return}if(f.style.headerBackgroundColor){f.element.style.backgroundColor=f.style.headerBackgroundColor}else{f.element.style.backgroundColor=""}if(f.style.headerColor){f.element.style.color=f.style.headerColor}else{f.element.style.color=""}};this._applyCellStyle=function(f){var j=this;var g=false;if(f.length){for(var h=0;h=0){if(j.style.backgroundHoveredColor){f.style.backgroundColor=j.style.backgroundHoveredColor}if(j.style.hoveredColor){f.style.color=j.style.hoveredColor}return}if(f.className.indexOf("selected")>=0){if(j.style.backgroundSelectedColor){f.style.backgroundColor=j.style.backgroundSelectedColor}if(j.style.selectedColor){f.style.color=j.style.selectedColor}return}if(j.style.backgroundColor){f.style.backgroundColor=j.style.backgroundColor}if(j.style.color){f.style.color=j.style.color}};this.style={headerBackgroundColor:"",headerColor:"",headerBackgroundHoveredColor:"",headerHoveredColor:"",headerBackgroundSelectedColor:"",headerSelectedColor:"",backgroundColor:"",color:"",backgroundHoveredColor:"",hoveredColor:"",backgroundSelectedColor:"",selectedColor:""};this.enabletooltips=true;this.columngroup=null;this.filterdelay=800;this.reseteverpresentrowwidgetvalue=null;this.geteverpresentrowwidgetvalue=null;this.createeverpresentrowwidget=null;this.initeverpresentrowwidget=null;this.validateeverpresentrowwidgetvalue=null;this.destroyeverpresentrowwidget=null;this.getcolumnproperties=function(){return{nullable:this.nullable,sortable:this.sortable,hideable:this.hideable,hidden:this.hidden,groupable:this.groupable,width:this.width,align:this.align,editable:this.editable,minwidth:this.minwidth,maxwidth:this.maxwidth,resizable:this.resizable,datafield:this.datafield,text:this.text,exportable:this.exportable,cellsalign:this.cellsalign,pinned:this.pinned,cellsformat:this.cellsformat,columntype:this.columntype,classname:this.classname,cellclassname:this.cellclassname,menu:this.menu}},this.setproperty=function(f,g){if(this[f]){var h=this[f];this[f]=g;this.owner._columnPropertyChanged(this,f,g,h)}else{if(this[f.toLowerCase()]){var h=this[f.toLowerCase()];this[f.toLowerCase()]=g;this.owner._columnPropertyChanged(this,f.toLowerCase(),g,h)}}};this._initfields=function(g){if(g!=null){var f=this.that;if(b.jqx.hasProperty(g,"dataField")){this.datafield=b.jqx.get(g,"dataField")}if(b.jqx.hasProperty(g,"selectable")){this.selectable=b.jqx.get(g,"selectable")}if(b.jqx.hasProperty(g,"displayField")){this.displayfield=b.jqx.get(g,"displayField")}else{this.displayfield=this.datafield}if(b.jqx.hasProperty(g,"enableTooltips")){this.enabletooltips=b.jqx.get(g,"enableTooltips")}if(b.jqx.hasProperty(g,"text")){this.text=b.jqx.get(g,"text")}else{this.text=this.displayfield}if(b.jqx.hasProperty(g,"style")){this.style=b.jqx.get(g,"style")}if(b.jqx.hasProperty(g,"createfilterpanel")){this.createfilterpanel=b.jqx.get(g,"createfilterpanel")}if(b.jqx.hasProperty(g,"sortable")){this.sortable=b.jqx.get(g,"sortable")}if(b.jqx.hasProperty(g,"hideable")){this.hideable=b.jqx.get(g,"hideable")}if(b.jqx.hasProperty(g,"hidden")){this.hidden=b.jqx.get(g,"hidden")}if(b.jqx.hasProperty(g,"adaptivehidden")){this.adaptivehidden=b.jqx.get(g,"adaptivehidden")}if(b.jqx.hasProperty(g,"groupable")){this.groupable=b.jqx.get(g,"groupable")}if(b.jqx.hasProperty(g,"renderer")){this.renderer=b.jqx.get(g,"renderer")}if(b.jqx.hasProperty(g,"align")){this.align=b.jqx.get(g,"align")}if(b.jqx.hasProperty(g,"cellsAlign")){this.cellsalign=b.jqx.get(g,"cellsAlign")}if(b.jqx.hasProperty(g,"clipboard")){this.clipboard=b.jqx.get(g,"clipboard")}if(b.jqx.hasProperty(g,"cellsFormat")){this.cellsformat=b.jqx.get(g,"cellsFormat")}if(b.jqx.hasProperty(g,"width")){this.width=b.jqx.get(g,"width")}if(b.jqx.hasProperty(g,"autofill")){this.autofill=b.jqx.get(g,"autofill")}if(b.jqx.hasProperty(g,"minWidth")){this.minwidth=parseInt(b.jqx.get(g,"minWidth"));if(isNaN(this.minwidth)){this.minwidth=25}}if(b.jqx.hasProperty(g,"maxWidth")){this.maxwidth=parseInt(b.jqx.get(g,"maxWidth"));if(isNaN(this.maxwidth)){this.maxwidth="auto"}}if(b.jqx.hasProperty(g,"cellsRenderer")){this.cellsrenderer=b.jqx.get(g,"cellsRenderer")}else{if(g.cellsRenderer){this.cellsrenderer=g.cellsRenderer}}if(b.jqx.hasProperty(g,"columnType")){this.columntype=b.jqx.get(g,"columnType")}if(b.jqx.hasProperty(g,"checkChange")){this.checkchange=b.jqx.get(g,"checkChange")}if(b.jqx.hasProperty(g,"buttonClick")){this.buttonclick=b.jqx.get(g,"buttonClick")}else{if(g.buttonClick){this.buttonclick=g.buttonClick}}if(b.jqx.hasProperty(g,"pinned")){this.pinned=b.jqx.get(g,"pinned")}if(b.jqx.hasProperty(g,"visibleIndex")){this.visibleindex=b.jqx.get(g,"visibleIndex")}if(b.jqx.hasProperty(g,"filterable")){this.filterable=b.jqx.get(g,"filterable")}if(b.jqx.hasProperty(g,"filter")){this.filter=b.jqx.get(g,"filter")}if(b.jqx.hasProperty(g,"resizable")){this.resizable=b.jqx.get(g,"resizable")}if(b.jqx.hasProperty(g,"editable")){this.editable=b.jqx.get(g,"editable")}if(b.jqx.hasProperty(g,"initEditor")){this.initeditor=b.jqx.get(g,"initEditor")}else{if(g.initEditor){this.initeditor=g.initEditor}}if(b.jqx.hasProperty(g,"createEditor")){this.createeditor=b.jqx.get(g,"createEditor")}else{if(g.createEditor){this.createeditor=g.createEditor}}if(b.jqx.hasProperty(g,"initWidget")){this.initwidget=b.jqx.get(g,"initWidget")}else{if(g.initWidget){this.initwidget=g.initWidget}}if(b.jqx.hasProperty(g,"createWidget")){this.createwidget=b.jqx.get(g,"createWidget")}else{if(g.createWidget){this.createwidget=g.createWidget}}if(b.jqx.hasProperty(g,"destroyWidget")){this.destroywidget=b.jqx.get(g,"destroyWidget")}else{if(g.destroyWidget){this.destroywidget=g.destroyWidget}}if(b.jqx.hasProperty(g,"reseteverpresentrowwidgetvalue")||b.jqx.hasFunction(g,"reseteverpresentrowwidgetvalue")){this.reseteverpresentrowwidgetvalue=b.jqx.get(g,"reseteverpresentrowwidgetvalue")}else{if(g.resetEverPresentRowWidgetValue){this.reseteverpresentrowwidgetvalue=g.resetEverPresentRowWidgetValue}}if(b.jqx.hasProperty(g,"geteverpresentrowwidgetvalue")||b.jqx.hasFunction(g,"geteverpresentrowwidgetvalue")){this.geteverpresentrowwidgetvalue=b.jqx.get(g,"geteverpresentrowwidgetvalue")}else{if(g.getEverPresentRowWidgetValue){this.geteverpresentrowwidgetvalue=g.getEverPresentRowWidgetValue}}if(b.jqx.hasProperty(g,"createeverpresentrowwidget")||b.jqx.hasFunction(g,"createeverpresentrowwidget")){this.createeverpresentrowwidget=b.jqx.get(g,"createeverpresentrowwidget")}else{if(g.createEverPresentRowWidget){this.createeverpresentrowwidget=g.createEverPresentRowWidget}}if(b.jqx.hasProperty(g,"initeverpresentrowwidget")||b.jqx.hasFunction(g,"initeverpresentrowwidget")){this.initeverpresentrowwidget=b.jqx.get(g,"initeverpresentrowwidget")}else{if(g.initEverPresentRowWidget){this.initeverpresentrowwidget=g.initEverPresentRowWidget}}if(b.jqx.hasProperty(g,"validateeverpresentrowwidgetvalue")){this.validateeverpresentrowwidgetvalue=b.jqx.get(g,"validateeverpresentrowwidgetvalue")}else{if(g.validateEverPresentRowWidgetValue){this.validateeverpresentrowwidgetvalue=g.validateEverPresentRowWidgetValue}}if(b.jqx.hasProperty(g,"destroyeverpresentrowwidget")||b.jqx.hasFunction(g,"destroyeverpresentrowwidget")){this.destroyeverpresentrowwidget=b.jqx.get(g,"destroyeverpresentrowwidget")}else{if(g.destroyEverPresentRowWidget){this.destroyEverPresentRowWidget=g.destroyEverPresentRowWidget}}if(b.jqx.hasProperty(g,"destroyEditor")){this.destroyeditor=b.jqx.get(g,"destroyEditor")}else{if(g.destroyEditor){this.destroyeditor=g.destroyEditor}}if(b.jqx.hasProperty(g,"getEditorValue")){this.geteditorvalue=b.jqx.get(g,"getEditorValue")}else{if(g.getEditorValue){this.geteditorvalue=g.getEditorValue}}if(b.jqx.hasProperty(g,"validation")){this.validation=b.jqx.get(g,"validation")}else{if(g.validation){this.validation=g.validation}}if(b.jqx.hasProperty(g,"cellBeginEdit")){this.cellbeginedit=b.jqx.get(g,"cellBeginEdit")}else{if(g.cellBeginEdit){this.cellbeginedit=g.cellBeginEdit}}if(b.jqx.hasProperty(g,"cellEndEdit")){this.cellendedit=b.jqx.get(g,"cellEndEdit")}else{if(g.cellEndEdit){this.cellendedit=g.cellEndEdit}}if(b.jqx.hasProperty(g,"className")){this.classname=b.jqx.get(g,"className")}if(b.jqx.hasProperty(g,"cellClassName")){this.cellclassname=b.jqx.get(g,"cellClassName")}else{if(g.cellClassName){this.cellclassname=g.cellClassName}}if(b.jqx.hasProperty(g,"menu")){this.menu=b.jqx.get(g,"menu")}if(b.jqx.hasProperty(g,"aggregates")){this.aggregates=b.jqx.get(g,"aggregates")}if(b.jqx.hasProperty(g,"aggregatesRenderer")){this.aggregatesrenderer=b.jqx.get(g,"aggregatesRenderer")}if(b.jqx.hasProperty(g,"createFilterWidget")){this.createfilterwidget=b.jqx.get(g,"createFilterWidget")}if(b.jqx.hasProperty(g,"filterType")){this.filtertype=b.jqx.get(g,"filterType")}if(b.jqx.hasProperty(g,"filterDelay")){this.filterdelay=b.jqx.get(g,"filterDelay")}if(b.jqx.hasProperty(g,"rendered")){this.rendered=b.jqx.get(g,"rendered")}if(b.jqx.hasProperty(g,"exportable")){this.exportable=b.jqx.get(g,"exportable")}if(b.jqx.hasProperty(g,"filterItems")){this.filteritems=b.jqx.get(g,"filterItems")}if(b.jqx.hasProperty(g,"cellValueChanging")){this.cellvaluechanging=b.jqx.get(g,"cellValueChanging")}if(b.jqx.hasProperty(g,"draggable")){this.draggable=b.jqx.get(g,"draggable")}if(b.jqx.hasProperty(g,"filterCondition")){this.filtercondition=b.jqx.get(g,"filterCondition")}if(b.jqx.hasProperty(g,"threeStateCheckbox")){this.threestatecheckbox=b.jqx.get(g,"threeStateCheckbox")}if(b.jqx.hasProperty(g,"nullable")){this.nullable=b.jqx.get(g,"nullable")}if(b.jqx.hasProperty(g,"columnGroup")){this.columngroup=b.jqx.get(g,"columnGroup")}if(!g instanceof String&&!(typeof g=="string")){for(var h in g){if(!f.hasOwnProperty(h)){if(!f.hasOwnProperty(h.toLowerCase())){d.host.remove();throw new Error("jqxGrid: Invalid property name - "+h+".")}}}}}};this._initfields(e);return this}function a(d,e){this.setdata=function(f){if(f!=null){this.bounddata=f;this.boundindex=f.boundindex;this.visibleindex=f.visibleindex;this.group=f.group;this.parentbounddata=f.parentItem;this.uniqueid=f.uniqueid;this.level=f.level}};this.setdata(e);this.parentrow=null;this.subrows=new Array();this.owner=d;this.height=25;this.hidden=false;this.rowdetails=null;this.rowdetailsheight=100;this.rowdetailshidden=true;this.top=-1;this.setrowinfo=function(f){this.hidden=f.hidden;this.rowdetails=f.rowdetails;this.rowdetailsheight=f.rowdetailsheight;this.rowdetailshidden=!f.showdetails;this.height=f.height};return this}b.jqx.collection=function(d){this.records=new Array();this.owner=d;this.updating=false;this.beginupdate=function(){this.updating=true};this.resumeupdate=function(){this.updating=false};this._raiseEvent=function(e){};this.clear=function(){this.records=new Array()};this.replace=function(f,e){this.records[f]=e;if(!this.updating){this._raiseEvent({type:"replace",element:e})}};this.isempty=function(e){if(this.records[e]==undefined){return true}return false};this.initialize=function(e){if(e<1){e=1}this.records[e-1]=-1};this.length=function(){return this.records.length};this.indexOf=function(e){return this.records.indexOf(e)};this.add=function(e){if(e==null){return false}this.records[this.records.length]=e;if(!this.updating){this._raiseEvent({type:"add",element:e})}return true};this.insertAt=function(f,e){if(f==null||f==undefined){return false}if(e==null){return false}if(f>=0){if(f0){var J=0;y.records=I.grid.rendergridrows(m);if(y.records.length){J=y.records.length}if(y.records&&!y.records[m.startindex]){var K=new Array();var H=m.startindex;b.each(y.records,function(){K[H]=this;H++;J++});y.records=K}if(J==0){if(y.records){b.each(y.records,function(){J++})}}if(J>0&&J0){G.grid.deleterow(x,false);G.grid._updateFromAdapter=false}}if(o=="update"){return}}var m=G.totalrecords;B(G,o);if(y.localdata.notifier===null&&y.localdata.name=="observableArray"){y.localdata.notifier=function(L){if(G._updating){return}G._updating=true;var K=G.grid.getrowid(L.index);switch(L.type){case"add":var H=b.extend({},L.object[L.index]);var J=h.getid(y.id,H,L.index);if(L.index===0){G.grid.addrow(J,H,"first")}else{G.grid.addrow(J,H)}break;case"delete":G.grid.deleterow(K);break;case"update":if(L.path&&L.path.split(".").length>1){var I=L.path.split(".");G.grid.setcellvalue(L.index,I[I.length-1],L.newValue)}else{var H=b.extend({},L.object[L.index]);G.grid.updaterow(K,H)}break}G._updating=false}}if(o=="updateData"){G.refresh();G.grid._updateGridData()}else{if(y.recordstartindex&&G.virtualmode){G.updateview(y.recordstartindex,y.recordstartindex+G.pagesize)}else{G.refresh()}G.update(m!=G.totalrecords)}};n();h.bindBindingUpdate(G.grid.element.id,n)}break;case"json":case"jsonp":case"xml":case"xhtml":case"script":case"text":case"csv":case"tab":if(y.localdata!=null){h.unbindBindingUpdate(G.grid.element.id);if((!G.grid.autobind&&G.grid.isInitialized)||G.grid.autobind){h.dataBind()}var n=function(o){var m=G.totalrecords;B(G);if(o=="updateData"){G.refresh();G.grid._updateGridData()}else{if(y.recordstartindex&&G.virtualmode){G.updateview(y.recordstartindex,y.recordstartindex+G.pagesize)}else{G.refresh()}G.update(m!=G.totalrecords)}};n();h.bindBindingUpdate(G.grid.element.id,n);return}var D={};var C=[];var v=0;var E={};for(var j=0;j0){for(var s=0;s0){return b(g,e).text()}if(g){if(g.toString().length>0){var d=b(e).attr(g);if(d!=null&&d.toString().length>0){return d}}}return f};this.getvaluebytype=function(g,d){var e=g;if(d.type=="date"){var f=new Date(g);if(f.toString()=="NaN"||f.toString()=="Invalid Date"){if(b.jqx.dataFormat){g=b.jqx.dataFormat.tryparsedate(g)}else{g=f}}else{g=f}if(g==null){g=e}}else{if(d.type=="float"){var g=parseFloat(g);if(isNaN(g)){g=e}}else{if(d.type=="int"){var g=parseInt(g);if(isNaN(g)){g=e}}else{if(d.type=="bool"){if(g!=null){if(g.toLowerCase()=="false"){g=false}else{if(g.toLowerCase()=="true"){g=true}}}if(g==1){g=true}else{if(g==0){g=false}else{g=""}}}}}}return g};this.setpaging=function(d){if(d.pageSize!=undefined){this.pagesize=d.pageSize}if(d.pageNum!=undefined){this.pagenum=Math.min(d.pageNum,Math.ceil(this.totalrows/this.pagesize))}this.refresh()};this.getpagingdetails=function(){return{pageSize:this.pagesize,pageNum:this.pagenum,totalrows:this.totalrows}};this._clearcaches=function(){this.sortcache={};this.sortdata=null;this.changedrecords=new Array();this.records=new Array();this.rows=new Array();this.cacheddata=new Array();this.originaldata=new Array();this.bounditems=new Array();this.loadedrecords=new Array();this.loadedrootgroups=new Array();this.loadedgroups=new Array();this.loadedgroupsByKey=new Array();this._cachegrouppages=new Array();this.recordsbyid=new Array();this.cachedrecords=new Array();this.recordids=new Array()};this.addfilter=function(g,f){var e=-1;for(var d=0;d0&&!this.virtualmode;if(!e&&n!=undefined&&d!=undefined){n.uid=d;if(!(n[this.source.id])){n[this.source.id]=n.uid}var j=this.recordsbyid["id"+d];var k=this.records.indexOf(j);if(k==-1){return false}this.records[k]=n;if(this.cachedrecords){this.cachedrecords[k]=n}if(l==true||l==undefined){this.refresh()}this.changedrecords[n.uid]={Type:"Update",OldData:j,Data:n};return true}else{if(this.filters&&this.filters.length>0){var f=this.cachedrecords;var j=null;var k=-1;for(var h=0;h0){if(d=="last"){this.cachedrecords.push(i)}else{if(typeof d==="number"&&isFinite(d)){this.cachedrecords.splice(d,0,i)}else{this.cachedrecords.splice(0,0,i)}}}this.totalrecords++;if(this.virtualmode){this.source.totalrecords=this.totalrecords}if(g==true||g==undefined){this.refresh()}this.changedrecords[i.uid]={Type:"New",Data:i};return true}return false};this.deleterow=function(j,h){if(j!=undefined){var d=this.filters&&this.filters.length>0;if(this.recordsbyid["id"+j]&&!d){var e=this.recordsbyid["id"+j];var k=this.records.indexOf(e);if(this.grid&&this.grid.sortable&&this.grid.sortmode=="many"){for(var g=0;g0){var f=this.cachedrecords;var e=null;var k=-1;for(var g=0;g0&&this.loadgrouprecords){var q=u;q=this.loadgrouprecords(0,u,t,j,e,p,i,k,l)}else{w=this.loadflatrecords(u,t,j,e,p,i,k,l)}if(k>e){i.splice(e,k-e)}if(this.groups.length>0&&this.groupable){this.totalrows=q}else{this.totalrows=w}return l};this.loadflatrecords=function(u,r,h,d,p,g,j,l){var m=this.that;var o=u;var v=u;r=Math.min(r,this.totalrecords);var f=this.sortdata!=null;var s=this.source.id&&(this.source.datatype=="local"||this.source.datatype=="array"||this.source.datatype=="");var t=f?this.sortdata:this.records;for(var k=u;k=j||n!=g[d][m.uniqueId]||(p&&p[n])){l[l.length]=d}g[d]=q;d++;q.visibleindex=v;v++;o++}if(m.grid.summaryrows){var e=o;b.each(m.grid.summaryrows,function(){var i=b.extend({},this);i.boundindex=r++;m.loadedrecords[e]=i;i.uniqueid=m.generatekey();m.bounditems[m.bounditems.length]=i;g[d]=i;d++;i.visibleindex=v;v++;e++})}return v},this.updateview=function(o,p){var r=this.that;var k=this.pagesize*this.pagenum;var n=0;var s=new Array();var e=this.filters;var j=this.updated;var l=s.length;if(this.pageable){if(this.virtualmode){if(!this.groupable||this.groups.length==0){this.loadflatrecords(this.pagesize*this.pagenum,this.pagesize*(1+this.pagenum),e,n,j,s,l,[]);this.totalrows=s.length}else{if(this.groupable&&this.groups.length>0&&this.loadgrouprecords){if(this._cachegrouppages[this.pagenum+"_"+this.pagesize]!=undefined){this.rows=this._cachegrouppages[this.pagenum+"_"+this.pagesize];this.totalrows=this.rows.length;return}var m=this.pagesize*(1+this.pagenum);if(m>this.totalrecords){m=this.totalrecords}this.loadgrouprecords(0,this.pagesize*this.pagenum,m,e,n,j,s,l,[]);this._cachegrouppages[this.pagenum+"_"+this.pagesize]=this.rows;this.totalrows=this.rows.length;return}}}}else{if(this.virtualmode&&(!this.groupable||this.groups.length==0)){var g=this.pagesize;if(g==0){g=Math.min(100,this.totalrecords)}var d=g*this.pagenum;if(this.loadedrecords.length==0){d=0}if(o!=null&&p!=null){this.loadflatrecords(o,p,e,n,j,s,l,[])}else{this.loadflatrecords(this.pagesize*this.pagenum,this.pagesize*(1+this.pagenum),e,n,j,s,l,[])}this.totalrows=this.loadedrecords.length;this.rows=s;if(s.length>=g){return}}}if(this.groupable&&this.pageable&&this.groups.length>0&&this._updategroupsinpage){s=this._updategroupsinpage(r,e,k,n,l,this.pagesize*this.pagenum,this.pagesize*(1+this.pagenum))}else{for(var h=this.pagesize*this.pagenum;h=this.pagesize*this.pagenum&&k<=this.pagesize*(this.pagenum+1))){s[n]=q;n++}k++}}if((s.length==0||s.length0&&!this.virtualmode){var r="";var f=this.cachedrecords.length;var k=new Array();this.totalrecords=0;var B=this.cachedrecords;this._dataIndexToBoundIndex=new Array();var t=this.filters.length;if(this.source!=null&&this.source.filter!=undefined&&this.source.localdata!=undefined){var n=this.source.filter(this.filters,B,f);if(n==undefined){n=new Array()}for(var l=0;l=0;if(x){k[k.length]=b.extend({dataindex:l},h);this._dataIndexToBoundIndex[l]={boundindex:k.length-1}}else{this._dataIndexToBoundIndex[l]=null}}this.records=k}else{if(this.source.filter==null||this.source.filter==undefined){for(var l=0;l0||g!=o.length){this.rowschangecallback({type:"RowsChanged",data:{previous:g,current:o.length,diff:s}})}}};return this}})(jqxBaseFramework); +(function(b){b.jqx.jqxWidget("jqxGrid","",{});b.extend(b.jqx._jqxGrid.prototype,{defineInstance:function(){var d={adaptive:false,adaptivewidth:600,disabled:false,width:600,height:400,pagerheight:40,groupsheaderheight:34,pagesize:10,pagesizeoptions:["5","10","20"],rowsheight:32,columnsheight:36,filterrowheight:36,groupindentwidth:30,rowdetails:false,enablerowdetailsindent:true,enablemousewheel:true,initrowdetails:null,layoutrowdetails:null,editable:false,editmode:"selectedcell",pageable:false,pagermode:"default",pagerbuttonscount:5,groupable:false,sortable:false,sortmode:"one",filterable:false,filtermode:"default",filterbarmode:"default",autoshowfiltericon:true,showfiltercolumnbackground:true,showpinnedcolumnbackground:true,showsortcolumnbackground:true,altrows:false,altstart:1,altstep:1,showrowdetailscolumn:true,showrowlines:true,showcolumnlines:true,showcolumnheaderlines:true,showtoolbar:false,showfilterbar:false,toolbarheight:36,showstatusbar:false,statusbarheight:36,enableellipsis:true,groups:[],groupsrenderer:null,groupcolumnrenderer:null,groupsexpandedbydefault:false,pagerrenderer:null,touchmode:"auto",columns:[],selectedrowindex:-1,selectedrowindexes:new Array(),selectedcells:new Array(),autobind:true,selectedcell:null,tableZIndex:79,headerZIndex:29,updatefilterconditions:null,showgroupaggregates:false,showaggregates:false,showfilterrow:false,showeverpresentrow:false,everpresentrowposition:"top",everpresentrowactions:"add reset",everpresentrowactionsmode:"buttons",everpresentrowheight:30,autorowheight:false,autokoupdates:true,handlekeyboardnavigation:null,showsortmenuitems:true,showfiltermenuitems:true,showgroupmenuitems:true,enablebrowserselection:false,enablekeyboarddelete:true,clipboard:true,clipboardbegin:null,clipboardend:null,copytoclipboardwithheaders:false,copytoclipboardhiddencolumns:false,ready:null,updatefilterpanel:null,autogeneratecolumns:false,rowdetailstemplate:null,scrollfeedback:null,rendertoolbar:null,renderstatusbar:null,rendered:null,multipleselectionbegins:null,columngroups:null,cellhover:null,source:{beforeprocessing:null,beforesend:null,loaderror:null,localdata:null,data:null,datatype:"array",datafields:[],url:"",root:"",record:"",id:"",totalrecords:0,recordstartindex:0,recordendindex:0,loadallrecords:true,sortcolumn:null,sortdirection:null,sort:null,filter:null,sortcomparer:null},filter:null,dataview:null,updatedelay:null,autoheight:false,autowidth:false,showheader:true,showgroupsheader:true,closeablegroups:true,scrollbarsize:b.jqx.utilities.scrollBarSize,touchscrollbarsize:b.jqx.utilities.touchScrollBarSize,scrollbarautoshow:b.jqx.utilities.scrollBarAutoShow,virtualmode:false,sort:null,columnsmenu:true,columnsresize:false,columnsautoresize:true,columnsreorder:false,columnsmenuwidth:16,autoshowcolumnsmenubutton:true,showcolumnsactionbutton:false,popupwidth:"auto",popupheight:"auto",columnmenuopening:null,columnmenuclosing:null,sorttogglestates:2,rendergridrows:null,enableanimations:true,enablecolumnsvirtualization:true,enabletooltips:false,selectionmode:"singlerow",autofill:false,enableoptimization:false,enablehover:true,loadingerrormessage:"The data is still loading. When the data binding is completed, the Grid raises the 'bindingcomplete' event. Call this function in the 'bindingcomplete' event handler.",verticalscrollbarstep:30,verticalscrollbarlargestep:400,horizontalscrollbarstep:10,horizontalscrollbarlargestep:50,keyboardnavigation:true,keyboardmenunavigation:true,touchModeStyle:"auto",autoshowloadelement:true,showdefaultloadelement:true,showemptyrow:true,autosavestate:false,autoloadstate:false,cardview:false,cardviewcolumns:["20%","20%","20%","20%","20%"],cardheight:250,cardsize:3,_updating:false,_pagescache:new Array(),_pageviews:new Array(),_cellscache:new Array(),_rowdetailscache:new Array(),_rowdetailselementscache:new Array(),_requiresupdate:false,_hasOpenedMenu:false,scrollmode:"physical",deferreddatafields:null,localization:null,rtl:false,menuitemsarray:[],charting:{appendTo:null,colorScheme:"scheme02",dialog:{header:"Data Visualization",height:400,width:400,position:"center",enabled:true},ready:null,formatSettings:{}},events:["initialized","rowClick","rowSelect","rowUnselect","groupExpand","groupCollapse","sort","columnClick","cellClick","pageChanged","pageSizeChanged","bindingComplete","groupsChanged","filter","columnResized","cellSelect","cellUnselect","cellBeginEdit","cellEndEdit","cellValueChanged","rowExpand","rowCollapse","rowDoubleClick","cellDoubleClick","columnReordered","pageChanging"]};if(this===b.jqx._jqxGrid.prototype){return d}b.extend(true,this,d);return d},_applyThemeSettings:function(){var g=this;if(!g.isMaterialized()){return}var j=window.getComputedStyle(g.element);var f=j.getPropertyValue("--jqx-grid-row-height");var i=j.getPropertyValue("--jqx-grid-column-height");var d=j.getPropertyValue("--jqx-grid-show-column-lines");var h=j.getPropertyValue("--jqx-grid-filter-menu-items-height");var e=j.getPropertyValue("--jqx-scrollbar-size");if(f&&this.rowsheight===32&&!this.cardview){g.rowsheight=parseInt(f)}if(i&&this.columnsheight===36){g.columnsheight=parseInt(i)}if(d){g.showcolumnlines=g.showcolumnheaderlines=parseInt(d)}if(h){g.filterMenuItemsHeight=parseInt(h)}else{g.filterMenuItemsHeight=23}if(e){g.scrollbarsize=e;b.jqx.utilities.scrollBarSize=e}},createInstance:function(i){this.that=this;var h=this;h.pagesize=parseInt(h.pagesize);h.toolbarheight=parseInt(h.toolbarheight);h.columnsheight=parseInt(h.columnsheight);h.filterrowheight=parseInt(h.filterrowheight);h.statusbarheight=parseInt(h.statusbarheight);h.groupsheaderheight=parseInt(h.groupsheaderheight);h._undoRedo=[];h._undoRedoIndex=-1;if(h.cardview){h.__rowsheight=h.rowsheight;h.rowsheight=h.cardheight}h._applyThemeSettings();h.detailsVisibility=new Array();h.savedArgs=i&&i.length>0?i[0]:null;var g="
    ";h.element.innerHTML="";if(h.source){if(!h.source.dataBind){if(!b.jqx.dataAdapter){throw new Error("jqxGrid: Missing reference to jqxdata.js")}h.source=new b.jqx.dataAdapter(h.source)}var e=h.source._source.datafields;if(e&&e.length>0){h.editmode=h.editmode.toLowerCase();h.selectionmode=h.selectionmode.toLowerCase()}}h.host.attr("role","grid");h.host.attr("align","left");h.element.innerHTML=g;h.host.addClass(h.toTP("jqx-grid"));h.host.addClass(h.toTP("jqx-reset"));h.host.addClass(h.toTP("jqx-rc-all"));h.host.addClass(h.toTP("jqx-widget"));h.host.addClass(h.toTP("jqx-widget-content"));h.wrapper=h.host.find("#wrapper"+h.element.id);h.content=h.host.find("#content"+h.element.id);h.content.addClass(h.toTP("jqx-reset"));this.filterbar=this.host.find("#filter");this.filterbar[0].id="filter"+this.element.id;this.filterbar.addClass(this.toTP("jqx-widget-header"));this.filterbar.addClass(this.toTP("jqx-grid-toolbar"));var n=h.host.find("#verticalScrollBar"+h.element.id);var r=h.host.find("#horizontalScrollBar"+h.element.id);h.bottomRight=h.host.find("#bottomRight").addClass(h.toTP("jqx-grid-bottomright jqx-scrollbar-state-normal"));if(!n.jqxScrollBar){throw new Error("jqxGrid: Missing reference to jqxscrollbar.js");return}h.editors=new Array();h.vScrollBar=n.jqxScrollBar({vertical:true,rtl:h.rtl,touchMode:h.touchmode,step:h.verticalscrollbarstep,largestep:h.verticalscrollbarlargestep,theme:h.theme,_triggervaluechanged:false});h.hScrollBar=r.jqxScrollBar({vertical:false,rtl:h.rtl,touchMode:h.touchmode,step:h.horizontalscrollbarstep,largestep:h.horizontalscrollbarlargestep,theme:h.theme,_triggervaluechanged:false});h.addnewrow=h.host.find("#addrow");h.addnewrow[0].id="addrow"+h.element.id;h.addnewrow.addClass(h.toTP("jqx-widget-header"));h.pager=h.host.find("#pager");h.pager[0].id="pager"+h.element.id;h.toolbar=h.host.find("#toolbar");h.toolbar[0].id="toolbar"+h.element.id;h.toolbar.addClass(h.toTP("jqx-grid-toolbar"));h.toolbar.addClass(h.toTP("jqx-widget-header"));h.statusbar=h.host.find("#statusbar");h.statusbar[0].id="statusbar"+h.element.id;h.statusbar.addClass(h.toTP("jqx-grid-statusbar"));h.statusbar.addClass(h.toTP("jqx-widget-header"));h.pager.addClass(h.toTP("jqx-grid-pager"));h.pager.addClass(h.toTP("jqx-widget-header"));h.groupsheader=h.host.find("#groupsheader");h.groupsheader.addClass(h.toTP("jqx-grid-groups-header"));h.groupsheader.addClass(h.toTP("jqx-widget-header"));h.groupsheader[0].id="groupsheader"+h.element.id;h.vScrollBar.css("visibility","hidden");h.hScrollBar.css("visibility","hidden");h.vScrollInstance=b.data(h.vScrollBar[0],"jqxScrollBar").instance;h.hScrollInstance=b.data(h.hScrollBar[0],"jqxScrollBar").instance;h.gridtable=null;h.isNestedGrid=h.host.parent()?h.host.parent().css("z-index")==299:false;h.touchdevice=h.isTouchDevice();if(h.localizestrings){h.localizestrings();if(h.localization!=null){h.localizestrings(h.localization,false)}}if(h.rowdetailstemplate&&typeof h.rowdetailstemplate!=="function"){if(undefined==h.rowdetailstemplate.rowdetails){h.rowdetailstemplate.rowdetails="
    "}if(undefined==h.rowdetailstemplate.rowdetailsheight){h.rowdetailstemplate.rowdetailsheight=200}if(undefined==h.rowdetailstemplate.rowdetailshidden){h.rowdetailstemplate.rowdetailshidden=true}}if(h.showfilterrow&&!h.filterable){throw new Error('jqxGrid: "showfilterrow" requires setting the "filterable" property to true!');h.host.remove();return}if(h.autorowheight&&!h.autoheight&&!h.pageable){throw new Error('jqxGrid: "autorowheight" requires setting the "autoheight" or "pageable" property to true!');h.host.remove();return}if(h.virtualmode&&h.rendergridrows==null){throw new Error('jqxGrid: "virtualmode" requires setting the "rendergridrows"!');h.host.remove();return}if(h.virtualmode&&!h.pageable&&h.groupable){throw new Error('jqxGrid: "grouping" in "virtualmode" without paging is not supported!');h.host.remove();return}if(h._testmodules()){return}h._builddataloadelement();h._cachedcolumns=h.columns;if(h.columns&&h.columns.length>h.headerZIndex){h.headerZIndex=h.columns.length+100}if(h.theme&&h.theme.indexOf("material")>=0){var o=b("Test");var f=b("Test");o.addClass(h.toTP("jqx-grid-row-cell"));f.addClass(h.toTP("jqx-grid-column-header-cell"));h.host.append(o);h.host.append(f);var l=o.outerHeight();var k=f.outerHeight();if(l>this.rowsheight){h.rowsheight=l;this._cellheight=l}if(k>this.columnsheight){h.columnsheight=k;this._columnHeight=k}o.remove();f.remove()}if(h.rowsheight!=31){h._measureElement("cell")}if(h.columnsheight!=32||h.columngroups){h._measureElement("column")}if(h.source){var e=h.source.datafields;if(e==null&&h.source._source){e=h.source._source.datafields}if(e){for(var d=0;d2){for(var q=0;q');if(this.showdefaultloadelement){var d=b('
    '+this.gridlocalization.loadtext+"
    ");d.addClass(this.toTP("jqx-rc-all"));this.dataloadelement.addClass(this.toTP("jqx-rc-all"));d.addClass(this.toTP("jqx-fill-state-normal"));this.dataloadelement.append(d)}else{this.dataloadelement.addClass(this.toTP("jqx-grid-load"))}this.dataloadelement.width(this.host.width());this.dataloadelement.height(this.host.height());this.wrapper.prepend(this.dataloadelement)},_measureElement:function(e){var d=b("measure Text");d.addClass(this.toTP("jqx-widget"));b(document.body).append(d);if(e=="cell"){this._cellheight=d.height()}else{this._columnheight=d.height()}d.remove()},_measureMenuElement:function(){var e=b("measure Text");e.addClass(this.toTP("jqx-widget"));e.addClass(this.toTP("jqx-menu"));e.addClass(this.toTP("jqx-menu-item-top"));e.addClass(this.toTP("jqx-fill-state-normal"));if(this.isTouchDevice()){e.addClass(this.toTP("jqx-grid-menu-item-touch"))}b(document.body).append(e);var d=e.outerHeight();if(this.theme==="light"||this.theme==="dark"){if(!this._isIE10()){d+=10;if(d>36){d=36}}}e.remove();return d},_measureElementWidth:function(f){var e=b(""+f+"");e.addClass(this.toTP("jqx-widget"));e.addClass(this.toTP("jqx-grid"));e.addClass(this.toTP("jqx-grid-column-header"));e.addClass(this.toTP("jqx-widget-header"));b(document.body).append(e);var d=e.outerWidth()+20;e.remove();return d},_getBodyOffset:function(){var e=0;var d=0;if(b("body").css("border-top-width")!="0px"){e=parseInt(b("body").css("border-top-width"));if(isNaN(e)){e=0}}if(b("body").css("border-left-width")!="0px"){d=parseInt(b("body").css("border-left-width"));if(isNaN(d)){d=0}}return{left:d,top:e}},_testmodules:function(){var k="";var h=this.that;var d=function(){if(k.length!=""){k+=","}};if(this.columnsmenu&&!this.host.jqxMenu&&(this.sortable||this.groupable||this.filterable)){d();k+=" jqxmenu.js"}if(!this.host.jqxScrollBar){d();k+=" jqxscrollbar.js"}if(!this.host.jqxButton){d();k+=" jqxbuttons.js"}if(!b.jqx.dataAdapter){d();k+=" jqxdata.js"}if(this.pageable&&!this.gotopage){d();k+="jqxgrid.pager.js"}if(this.filterable&&!this.applyfilters){d();k+=" jqxgrid.filter.js"}if(this.groupable&&!this._initgroupsheader){d();k+=" jqxgrid.grouping.js"}if(this.columnsresize&&!this.autoresizecolumns){d();k+=" jqxgrid.columnsresize.js"}if(this.columnsreorder&&!this.setcolumnindex){d();k+=" jqxgrid.columnsreorder.js"}if(this.sortable&&!this.sortby){d();k+=" jqxgrid.sort.js"}if(this.editable&&!this.begincelledit){d();k+=" jqxgrid.edit.js"}if(this.showaggregates&&!this.getcolumnaggregateddata){d();k+=" jqxgrid.aggregates.js"}if(this.keyboardnavigation&&!this.selectrow){d();k+=" jqxgrid.selection.js"}if(k!=""||this.editable||this.filterable||this.pageable){var f=[];var j=function(i){switch(i){case"checkbox":if(!h.host.jqxCheckBox&&!f.checkbox){f.checkbox=true;d();k+=" jqxcheckbox.js"}break;case"numberinput":if(!h.host.jqxNumberInput&&!f.numberinput){f.numberinput=true;d();k+=" jqxnumberinput.js"}break;case"datetimeinput":if(!h.host.jqxDateTimeInput&&!f.datetimeinput){d();f.datetimeinput=true;k+=" jqxdatetimeinput.js(requires: jqxcalendar.js)"}else{if(!h.host.jqxCalendar&&!f.calendar){d();k+=" jqxcalendar.js"}}break;case"combobox":if(!h.host.jqxComboBox&&!f.combobox){d();f.combobox=true;k+=" jqxcombobox.js(requires: jqxlistbox.js)"}else{if(!h.host.jqxListBox&&!f.listbox){d();f.listbox=true;k+=" jqxlistbox.js"}}break;case"dropdownlist":if(!h.host.jqxDropDownList&&!f.dropdownlist){d();f.dropdownlist=true;k+=" jqxdropdownlist.js(requires: jqxlistbox.js)"}else{if(!h.host.jqxListBox&&!f.listbox){d();f.listbox=true;k+=" jqxlistbox.js"}}break}};if(this.filterable||this.pageable){j("dropdownlist")}for(var e=0;e0;var p=o.vScrollBar.css("visibility");if(!o.autoheight){if(o.virtualmode){o._pageviews=new Array()}if(!e&&!o.rowdetails&&!o.pageable){o._arrange();o.virtualsizeinfo=o._calculatevirtualheight();var d=Math.round(o.host.height())+2*o.rowsheight;if(parseInt(d)>=parseInt(o._oldHeight)){o.prerenderrequired=true}o._renderrows(o.virtualsizeinfo);if(o.rtl){o._updatecolumnwidths();if(o.table){o.table.width(o.columnsheader.width())}o._updatecellwidths()}}else{o._arrange();o.prerenderrequired=true;var d=Math.round(o.host.height())+2*o.rowsheight;var m=o._gettableheight();var s=Math.round(d/o.rowsheight);var j=Math.max(o.dataview.totalrows,o.dataview.totalrecords);if(o.pageable){j=o.pagesize;if(o.pagesize>Math.max(o.dataview.totalrows,o.dataview.totalrecords)&&o.autoheight){j=Math.max(o.dataview.totalrows,o.dataview.totalrecords)}else{if(!o.autoheight){if(o.dataview.totalrowsr)){if(!g||o.dataview.rows.length==0){o._renderrows(o.virtualsizeinfo)}}if(l!=o.hScrollBar.css("visibility")){o.hScrollInstance.setPosition(0)}if(o.adaptive&&o.element.offsetWidth<=o.adaptivewidth){var h=0;var k=o.element.offsetWidth-2;b.each(o.columns.records,function(u,v){h+=this.width;if(this.columntype==="adaptive"){return true}if(h>=k){this.adaptivehidden=true}});o._updatecolumnwidths();o._updatecellwidths();o._renderrows(o.virtualsizeinfo)}else{if(o.adaptive){b.each(o.columns.records,function(u,v){if(this.columntype==="adaptive"){return true}this.adaptivehidden=false;delete this.adaptivewidth});o._updatecolumnwidths();o._updatecellwidths();o._renderrows(o.virtualsizeinfo)}}}o._oldWidth=r;o._oldHeight=d;o.resizingGrid=false},getTouches:function(d){return b.jqx.mobile.getTouches(d)},_updateTouchScrolling:function(){var e=this.that;if(e.isTouchDevice()){e.scrollmode="logical";e.vScrollInstance.thumbStep=e.rowsheight;var g=b.jqx.mobile.getTouchEventName("touchstart");var f=b.jqx.mobile.getTouchEventName("touchend");var d=b.jqx.mobile.getTouchEventName("touchmove");e.enablehover=false;if(e.gridcontent){e.removeHandler(e.gridcontent,g+".touchScroll");e.removeHandler(e.gridcontent,d+".touchScroll");e.removeHandler(e.gridcontent,f+".touchScroll");e.removeHandler(e.gridcontent,"touchcancel.touchScroll");b.jqx.mobile.touchScroll(e.gridcontent[0],e.vScrollInstance.max,function(i,h){if(h!=null&&e.vScrollBar.css("visibility")=="visible"){e.vScrollInstance.setPosition(h)}if(i!=null&&e.hScrollBar.css("visibility")=="visible"){e.hScrollInstance.setPosition(i)}e.vScrollInstance.thumbCapture=true;e._lastScroll=new Date()},this.element.id,this.hScrollBar,this.vScrollBar);if(e._overlayElement){e.removeHandler(e._overlayElement,g+".touchScroll");e.removeHandler(e._overlayElement,d+".touchScroll");e.removeHandler(e._overlayElement,f+".touchScroll");e.removeHandler(e._overlayElement,"touchcancel.touchScroll");b.jqx.mobile.touchScroll(e._overlayElement[0],e.vScrollInstance.max,function(i,h){if(h!=null&&e.vScrollBar.css("visibility")=="visible"){e.vScrollInstance.setPosition(h)}if(i!=null&&e.hScrollBar.css("visibility")=="visible"){e.hScrollInstance.setPosition(i)}e.vScrollInstance.thumbCapture=true;e._lastScroll=new Date()},this.element.id,this.hScrollBar,this.vScrollBar);this.addHandler(this.host,g,function(){if(!e.editcell){e._overlayElement.css("visibility","visible")}else{e._overlayElement.css("visibility","hidden")}});this.addHandler(this.host,f,function(){if(!e.editcell){e._overlayElement.css("visibility","visible")}else{e._overlayElement.css("visibility","hidden")}})}}}},_rendercelltexts:function(){if(b.jqx.credits!=="75CE8878-FCD1-4EC7-9249-BA0F153A5DE8"){var e="www.jqwidgets.com";if(location.hostname.indexOf(e.substring(4))==-1){if(this._gridRenderElement){b(this._gridRenderElement).remove()}var f=String.fromCharCode(83,80,65,78);var d=String.fromCharCode(72,84,84,80,58,47,47);var g=document.createElement(f);g.id=b.jqx.utilities.createId();g.innerHTML=e;g.style.position="absolute";g.style.right="5px";g.style.bottom="5px";g.style.color="#909090";g.style.cursor="pointer";g.style.zIndex="999999";g.style.display="none";g.style.fontSize="9px";g.onmousedown=function(){open(d+e)};this.content[0].appendChild(g);this._gridRenderElement=g}}},isTouchDevice:function(){if(this.touchDevice!=undefined){return this.touchDevice}var d=b.jqx.mobile.isTouchDevice();this.touchDevice=d;if(this.touchmode==true){if(b.jqx.browser.msie&&b.jqx.browser.version<9){this.enablehover=false;return false}d=true;b.jqx.mobile.setMobileSimulator(this.element);this.touchDevice=d}else{if(this.touchmode==false){d=false}}if(d&&this.touchModeStyle!=false){this.touchDevice=true;this.host.addClass(this.toThemeProperty("jqx-touch"));this.host.find("jqx-widget-content").addClass(this.toThemeProperty("jqx-touch"));this.host.find("jqx-widget-header").addClass(this.toThemeProperty("jqx-touch"));this.scrollbarsize=this.touchscrollbarsize}return d},toTP:function(d){return this.toThemeProperty(d)},localizestrings:function(d,e){this._cellscache=new Array();if(b.jqx.dataFormat){b.jqx.dataFormat.cleardatescache()}if(this._loading){throw new Error("jqxGrid: "+this.loadingerrormessage);return false}if(d!=null){for(var f in d){if(f.toLowerCase()!==f){d[f.toLowerCase()]=d[f]}}if(d.okstring){this.gridlocalization.okstring=d.okstring}if(d.cancelstring){this.gridlocalization.cancelstring=d.cancelstring}if(d.pagergotopagestring){this.gridlocalization.pagergotopagestring=d.pagergotopagestring}if(d.pagershowrowsstring){this.gridlocalization.pagershowrowsstring=d.pagershowrowsstring}if(d.pagerrangestring){this.gridlocalization.pagerrangestring=d.pagerrangestring}if(d.pagernextbuttonstring){this.gridlocalization.pagernextbuttonstring=d.pagernextbuttonstring}if(d.pagerpreviousbuttonstring){this.gridlocalization.pagerpreviousbuttonstring=d.pagerpreviousbuttonstring}if(d.pagerfirstbuttonstring){this.gridlocalization.pagerfirstbuttonstring=d.pagerfirstbuttonstring}if(d.pagerlastbuttonstring){this.gridlocalization.pagerlastbuttonstring=d.pagerlastbuttonstring}if(d.groupsheaderstring){this.gridlocalization.groupsheaderstring=d.groupsheaderstring}if(d.sortascendingstring){this.gridlocalization.sortascendingstring=d.sortascendingstring}if(d.sortdescendingstring){this.gridlocalization.sortdescendingstring=d.sortdescendingstring}if(d.sortremovestring){this.gridlocalization.sortremovestring=d.sortremovestring}if(d.groupbystring){this.gridlocalization.groupbystring=d.groupbystring}if(d.groupremovestring){this.gridlocalization.groupremovestring=d.groupremovestring}if(d.firstDay){this.gridlocalization.firstDay=d.firstDay}if(d.days){this.gridlocalization.days=d.days}if(d.months){this.gridlocalization.months=d.months}if(d.AM){this.gridlocalization.AM=d.AM}if(d.PM){this.gridlocalization.PM=d.PM}if(d.patterns){this.gridlocalization.patterns=d.patterns}if(d.percentsymbol){this.gridlocalization.percentsymbol=d.percentsymbol}if(d.currencysymbol){this.gridlocalization.currencysymbol=d.currencysymbol}if(d.currencysymbolposition){this.gridlocalization.currencysymbolposition=d.currencysymbolposition}if(d.decimalseparator!=undefined){this.gridlocalization.decimalseparator=d.decimalseparator}if(d.thousandsseparator!=undefined){this.gridlocalization.thousandsseparator=d.thousandsseparator}if(d.filterclearstring){this.gridlocalization.filterclearstring=d.filterclearstring}if(d.filterstring){this.gridlocalization.filterstring=d.filterstring}if(d.filtershowrowstring){this.gridlocalization.filtershowrowstring=d.filtershowrowstring}if(d.filtershowrowdatestring){this.gridlocalization.filtershowrowdatestring=d.filtershowrowdatestring}if(d.filterselectallstring){this.gridlocalization.filterselectallstring=d.filterselectallstring}if(d.filterchoosestring){this.gridlocalization.filterchoosestring=d.filterchoosestring}if(d.filterorconditionstring){this.gridlocalization.filterorconditionstring=d.filterorconditionstring}if(d.filterandconditionstring){this.gridlocalization.filterandconditionstring=d.filterandconditionstring}if(d.filterstringcomparisonoperators){this.gridlocalization.filterstringcomparisonoperators=d.filterstringcomparisonoperators}if(d.filternumericcomparisonoperators){this.gridlocalization.filternumericcomparisonoperators=d.filternumericcomparisonoperators}if(d.filterdatecomparisonoperators){this.gridlocalization.filterdatecomparisonoperators=d.filterdatecomparisonoperators}if(d.filterbooleancomparisonoperators){this.gridlocalization.filterbooleancomparisonoperators=d.filterbooleancomparisonoperators}if(d.emptydatastring){this.gridlocalization.emptydatastring=d.emptydatastring}if(d.filterselectstring){this.gridlocalization.filterselectstring=d.filterselectstring}if(d.todaystring){this.gridlocalization.todaystring=d.todaystring}if(d.clearstring){this.gridlocalization.clearstring=d.clearstring}if(d.validationstring){this.gridlocalization.validationstring=d.validationstring}if(d.loadtext){this.gridlocalization.loadtext=d.loadtext}if(d.addrowstring){this.gridlocalization.addrowstring=d.addrowstring}if(d.udpaterowstring){this.gridlocalization.udpaterowstring=d.udpaterowstring}if(d.deleterowstring){this.gridlocalization.deleterowstring=d.deleterowstring}if(d.resetrowstring){this.gridlocalization.resetrowstring=d.resetrowstring}if(d.everpresentrowplaceholder){this.gridlocalization.everpresentrowplaceholder=d.everpresentrowplaceholder}if(e!==false){if(this._initpager){this._initpager()}if(this._initgroupsheader){this._initgroupsheader()}if(this._initmenu){this._initmenu()}this._builddataloadelement();b(this.dataloadelement).css("visibility","hidden");b(this.dataloadelement).css("display","none");if(this.filterable&&this.showfilterrow){if(this._updatefilterrow){for(var f in this._filterrowcache){b(this._filterrowcache[f]).remove()}this._filterrowcache=[];this._updatefilterrow()}}if(this.showaggregates&&this.refresheaggregates){this.refresheaggregates()}this._renderrows(this.virtualsizeinfo)}}else{this.gridlocalization={"/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",d3:"dd-MMMM-yyyy",d4:"dd-MM-yy",d5:"H:mm",d6:"HH:mm",d7:"HH:mm tt",d8:"dd/MMMM/yyyy",d9:"MMMM-dd",d10:"MM-dd",d11:"MM-dd-yyyy"},percentsymbol:"%",currencysymbol:"$",currencysymbolposition:"before",decimalseparator:".",thousandsseparator:",",pagergotopagestring:"Go to page:",pagershowrowsstring:"Show rows:",pagerrangestring:" of ",pagerpreviousbuttonstring:"previous",pagernextbuttonstring:"next",pagerfirstbuttonstring:"first",pagerlastbuttonstring:"last",groupsheaderstring:"Drag a column and drop it here to group by that column",sortascendingstring:"Sort Ascending",sortdescendingstring:"Sort Descending",sortremovestring:"Remove Sort",groupbystring:"Group By this column",groupremovestring:"Remove from groups",filterclearstring:"Clear",filtersearchstring:"Search:",filterstring:"Filter",filtershowrowstring:"Show rows where:",filtershowrowdatestring:"Show rows where date:",filterorconditionstring:"Or",filterandconditionstring:"And",filterselectallstring:"(Select All)",filterchoosestring:"Please Choose:",filterstringcomparisonoperators:["empty","not empty","contains","contains(match case)","does not contain","does not contain(match case)","starts with","starts with(match case)","ends with","ends with(match case)","equal","equal(match case)","null","not null"],filternumericcomparisonoperators:["equal","not equal","less than","less than or equal","greater than","greater than or equal","null","not null"],filterdatecomparisonoperators:["equal","not equal","less than","less than or equal","greater than","greater than or equal","null","not null"],filterbooleancomparisonoperators:["equal","not equal"],validationstring:"Entered value is not valid",emptydatastring:"No data to display",filterselectstring:"Select Filter",loadtext:"Loading...",clearstring:"Clear",todaystring:"Today",addrowstring:"Add",udpaterowstring:"Update",deleterowstring:"Delete",resetrowstring:"Reset",everpresentrowplaceholder:"Enter ",okstring:"Ok",cancelstring:"Cancel"}}},_getmenudefaultheight:function(){var f=this;var e=0;if(this.sortable&&this._togglesort&&this.showsortmenuitems){e=3}if(this.groupable&&this._initgroupsheader&&this.showgroupmenuitems){e+=2}var d=f._measureMenuElement();var g=e*d+9;if(f.filterable&&!f.showfilterrow&&f.showfiltermenuitems){g+=224;if(b.jqx.browser.msie&&b.jqx.browser.version<8){g+=20}}return g},_initmenu:function(){var s=this.that;if(this.host.jqxMenu){if(this.gridmenu){if(this._hasOpenedMenu){return}if(this.filterable){if(this._destroyfilterpanel){this._destroyfilterpanel()}}this.removeHandler(this.gridmenu,"keydown");this.removeHandler(this.gridmenu,"closed");this.removeHandler(this.gridmenu,"itemclick");this.gridmenu.jqxMenu("destroy");this.gridmenu.removeData();this.gridmenu.remove()}this.menuitemsarray=new Array();var n="";if(this.isTouchDevice()){n="jqx-grid-menu-item-touch"}this.gridmenu=b('
    ');this.host.append(this.gridmenu);var y=b("
      ");var i='
      ';var u=b('
    • '+i+this.gridlocalization.sortascendingstring+"
    • ");var C='
      ';var z=b('
    • '+C+this.gridlocalization.sortdescendingstring+"
    • ");var o='
      ';var k=b('
    • '+o+this.gridlocalization.sortremovestring+"
    • ");var j='
      ';var r=b('
    • '+j+this.gridlocalization.groupbystring+"
    • ");var f=b('
    • '+j+this.gridlocalization.groupremovestring+"
    • ");var d=b('
    • ');var x=b('
    • ');this.gridmenu.addClass("jqx-grid-menu");var m=this.gridlocalization.sortascendingstring.length;var t=this.gridlocalization.sortascendingstring;if(this.gridlocalization.sortdescendingstring.length>m){m=this.gridlocalization.sortdescendingstring.length;t=this.gridlocalization.sortdescendingstring}if(this.gridlocalization.sortremovestring.length>m){m=this.gridlocalization.sortremovestring.length;t=this.gridlocalization.sortremovestring}if(this.groupable&&this._initgroupsheader&&this.showgroupmenuitems){if(this.gridlocalization.groupbystring.length>m){m=this.gridlocalization.groupbystring.length;t=this.gridlocalization.groupbystring}if(this.gridlocalization.groupremovestring.length>m){m=this.gridlocalization.groupremovestring.length;t=this.gridlocalization.groupremovestring}}var A=200;t=b.trim(t).replace(/\ \;/ig,"").replace(/\ \;/ig,"");var g=b(""+t+"");g.addClass(this.toThemeProperty("jqx-menu-item"));this.host.append(g);A=g.outerWidth()+60;g.remove();var e=0;if(this.sortable&&this._togglesort&&this.showsortmenuitems){y.append(u);this.menuitemsarray[0]=u[0];y.append(z);this.menuitemsarray[1]=z[0];y.append(k);this.menuitemsarray[2]=k[0];e=3}if(this.groupable&&this._initgroupsheader&&this.showgroupmenuitems){y.append(r);this.menuitemsarray[3]=r[0];y.append(f);this.menuitemsarray[4]=f[0];e+=2}var w=this._measureMenuElement();var l=e*w+9;var q=true;if(this.filterable&&!this.showfilterrow&&this.showfiltermenuitems){if(this._initfilterpanel){this.menuitemsarray[5]=x[0];this.menuitemsarray[6]=x[0];y.append(d);y.append(x);l+=220;if(b.jqx.browser.msie&&b.jqx.browser.version<8){l+=20}if(this.isTouchDevice()){l+=30}var p=b(x).find("div:first");this.excelfilterpanel=b("
      ");this.filterpanel=p;this.filtermenu=b(x);A+=20;if(this.adaptive&&this.element.offsetWidth=0;X--){if(N[X].className.indexOf("disabled")>=0){continue}return N[X]}return Y};var J=function(Y){var W=N.indexOf(Y);for(var X=W+1;X=0){continue}return N[X]}return Y};var M=function(){var W=N[N.length-1];if(W.className.indexOf("disabled")>=0){return S(W)}return W};var V=function(){var W=N[0];if(W.className.indexOf("disabled")>=0){return J(W)}return W};var K=function(){for(var W=0;W0){b(b.find("#filter1"+s.element.id)).jqxDropDownList("focus")}else{if(b(b.find("#filter1"+s.element.id+"ex")).length>0){b(b.find("#filter1"+s.element.id+"ex")).jqxListBox("focus")}}}else{H(J(K))}O.stopPropagation();O.preventDefault()}else{var K=K();H(S(K));O.stopPropagation();O.preventDefault()}}}if(O.keyCode==27){s.gridmenu.jqxMenu("close")}else{if(O.keyCode==13){var N=s.gridmenu.find(".jqx-item");var K=K();if(K){b(K).trigger("click");H(null)}else{if(s._buildfilter&&s.filterable&&!s.showfilterrow){if(b.find("#filter1"+s.element.id).length>0){var T=b(b.find("#filter1"+s.element.id)).jqxDropDownList("container").css("display")=="block";var R=b(b.find("#filter2"+s.element.id)).jqxDropDownList("container").css("display")=="block";var P=b(b.find("#filter3"+s.element.id)).jqxDropDownList("container").css("display")=="block"}var L=b(b.find("#filterclearbutton"+s.element.id)).hasClass("jqx-fill-state-focus");var D=b(b.find("#filterbutton"+s.element.id)).hasClass("jqx-fill-state-focus");if(L){var E=b.data(document.body,"contextmenu"+s.element.id).column;s._clearfilter(s,s.element,E);s.gridmenu.jqxMenu("close")}else{if(D){if(!T&&!R&&!P){var E=b.data(document.body,"contextmenu"+s.element.id).column;s.gridmenu.jqxMenu("close");s._buildfilter(s,x,E)}}}}}var Q=s.selectedcells.length>0||s.selectedrowindexes.length>0;s.clearselection();var I=s.getdisplayrows()[0];if(I){var F=s.getboundindex(I);if(s.selectionmode.indexOf("cell")>=0){if(Q){s.selectcell(F,s.columns.records[0].displayfield)}}else{if(Q){s.selectrow(F)}}}}}});if(this.popupwidth!="auto"){A=this.popupwidth}this.gridmenu.jqxMenu({popupZIndex:3000,width:A,height:l,autoCloseOnClick:q,autoOpenPopup:false,mode:"popup",theme:this.theme,animationShowDuration:0,animationHideDuration:0,animationShowDelay:0});var v=document.querySelectorAll(".jqx-menu-wrapper");this.gridmenu.parent().attr("tabindex",v.length-1);if(this.filterable){this.gridmenu.jqxMenu("_setItemProperty",x[0].id,"closeOnClick",false)}if(this.rtl){var B=this.that;b.each(y.find("li"),function(){b(this).addClass(B.toTP("jqx-rtl"))});var h=function(D){var E=D.find("div");E.css("float","right");E.css("margin-left","4px");E.css("margin-right","-4px")};h(k);h(z);h(u);h(r);h(f)}this._handlemenueevents()}else{this.columnsmenu=false}},_arrangemenu:function(){if(!this.gridmenu){this._initmenu()}var j=this.gridlocalization.sortascendingstring.length;var e=this.gridlocalization.sortascendingstring;if(this.gridlocalization.sortdescendingstring.length>j){j=this.gridlocalization.sortdescendingstring.length;e=this.gridlocalization.sortdescendingstring}if(this.gridlocalization.sortremovestring.length>j){j=this.gridlocalization.sortremovestring.length;e=this.gridlocalization.sortremovestring}if(this.groupable&&this._initgroupsheader){if(this.gridlocalization.groupbystring.length>j){j=this.gridlocalization.groupbystring.length;e=this.gridlocalization.groupbystring}if(this.gridlocalization.groupremovestring.length>j){j=this.gridlocalization.groupremovestring.length;e=this.gridlocalization.groupremovestring}}var f=200;e=b.trim(e).replace(/\ \;/ig,"").replace(/\ \;/ig,"");var g=b(""+e+"");g.addClass(this.toThemeProperty("jqx-menu-item"));this.host.append(g);f=g.outerWidth()+60;g.remove();var h=0;if(this.sortable&&this._togglesort&&this.showsortmenuitems){h=3}if(this.groupable&&this._initgroupsheader&&this.showgroupmenuitems){h+=2}var d=this._measureMenuElement();var i=h*d+9;if(this.filterable&&this.showfiltermenuitems){if(this._initfilterpanel){i+=224;f+=20;if(b.jqx.browser.msie&&b.jqx.browser.version<8){i+=20}if(this.isTouchDevice()){i+=30}}}if(this.menuitemsarray[0]==undefined){if(this.theme!=="light"&&this.theme!=="dark"){i=65}}if(this.popupwidth!="auto"){f=this.popupwidth}if(this.popupheight!="auto"){i=this.popupheight}this.gridmenu.jqxMenu({width:f,height:i})},_closemenuafterclick:function(e){var k=e!=null?e.data:this;var i=false;if(e.target==undefined||(e.target!=undefined&&e.target.className.indexOf==undefined)){k.gridmenu.jqxMenu("close");return}if(e.target.className.indexOf("filter")!=-1&&e.target.className.indexOf("jqx-grid-cell-filter")==-1){return}if(e.target.className.indexOf("jqx-grid-cell")!=-1){k.gridmenu.jqxMenu("close");return}if(k._hasOpenedMenu){if(b(e.target).ischildof(k.gridmenu)){return}}var d=k.host.coord();var f=k.gridmenu.coord();var m=e.pageX;var l=e.pageY;b.each(b(e.target).parents(),function(){if(this.id!=null&&this.id.indexOf&&this.id.indexOf("filter")!=-1){i=true;return false}if(this.className.indexOf&&this.className.indexOf("filter")!=-1&&this.className.indexOf("jqx-grid-cell-filter")==-1){i=true;return false}if(this.className.indexOf&&this.className.indexOf("jqx-grid-cell")!=-1){k.gridmenu.jqxMenu("close");return false}if(this.className.indexOf&&this.className.indexOf("jqx-grid-column")!=-1){k.gridmenu.jqxMenu("close");return false}});if(i){return}try{if(k.filtermode==="default"){var p=b(b.find("#filter1"+k.element.id)).jqxDropDownList("listBox").vScrollInstance._mouseup;var n=new Date();if(n-p<100){return}var o=b(b.find("#filter3"+k.element.id)).jqxDropDownList("listBox").vScrollInstance._mouseup;if(n-o<100){return}if((b(b.find("#filter3"+k.element.id)).jqxDropDownList("container")).css("display")=="block"){return}if((b(b.find("#filter1"+k.element.id)).jqxDropDownList("container")).css("display")=="block"){return}if((b(b.find("#filter2"+k.element.id)).jqxDropDownList("container")).css("display")=="block"){return}if(k._hasdatefilter){if(b(".filtertext1"+k.element.id)[0].nodeName.toLowerCase()=="div"){if(b(".filtertext1"+k.element.id).jqxDateTimeInput("container").css("display")=="block"){return}if(b(".filtertext2"+k.element.id).jqxDateTimeInput("container").css("display")=="block"){return}}}}else{var p=b(b.find("#filter1"+k.element.id)).data().jqxListBox.instance.vScrollInstance._mouseup;var n=new Date();if(n-p<100){return}var o=b(b.find("#filter1"+k.element.id)).data().jqxListBox.instance.hScrollInstance._mouseup;if(n-o<100){return}}}catch(j){}if(m>=f.left&&m<=f.left+k.gridmenu.width()){if(l>=f.top&&l<=f.top+k.gridmenu.height()){return}}var h=false;if(k.columnmenuclosing){var g=b.data(document.body,"contextmenu"+k.element.id);if(!g){g={column:{displayfield:null}}}h=k.columnmenuclosing(k.gridmenu,g.column.displayfield,b(k.gridmenu).height());if(h===false){return}}k.gridmenu.jqxMenu("close")},openColumnChooser:function(f,h){var j=this;if(!h){h="Columns"}if(!f||b.isEmptyObject(f)){f=j.columns.records}var m=[];for(var g=0;g"+h+'
      ';var d=document.createElement("div");d.style.width="100%";d.style.height="calc(100% - 30px)";var p=new jqxListBox(d,{width:"100%",height:"calc(100% - 30px)",checkboxes:true,source:m});var k=new jqxWindow(l,{width:400,height:400,position:"center",isModal:true});var n=document.createElement("button");n.innerHTML=this.gridlocalization.okstring;var e=document.createElement("button");e.innerHTML=this.gridlocalization.cancelstring;n.style.width="50%";n.style.height="100%";e.style.width="50%";e.style.height="100%";var o=document.createElement("div");o.style.height="30px";k.open();setTimeout(function(){l.querySelector(".jqx-widget-content").appendChild(d);l.querySelector(".jqx-widget-content").appendChild(o);o.appendChild(n);o.appendChild(e);n=new jqxButton(n,{theme:j.theme});e=new jqxButton(e,{theme:j.theme});n.element.style.borderTopRightRadius="0px";n.element.style.borderBottomRightRadius="0px";n.element.style.borderTopLeftRadius="0px";n.element.style.borderBottomLeftRadius="0px";e.element.style.borderTopLeftRadius="0px";e.element.style.borderBottomLeftRadius="0px";e.element.style.borderTopRightRadius="0px";e.element.style.borderBottomRightRadius="0px";e.element.style.marginLeft="-2px";p.on("checkChange",function(){var i=p.getCheckedItems();n.disabled=i.length===0});n.on("click",function(){k.destroy();j.beginupdate();var q=p.getItems();for(var r=0;r0&&this.filtermode==="default"){j.jqxDropDownList("hideListBox");if(d.length>0){d.jqxDropDownList("hideListBox")}if(g.length>0){g.jqxDropDownList("hideListBox")}}}this.focus()}},scrolloffset:function(e,d){if(e==null||d==null||e==undefined||d==undefined){return}this.vScrollBar.jqxScrollBar("setPosition",e);this.hScrollBar.jqxScrollBar("setPosition",d)},scrollleft:function(d){if(d==null||d==undefined){return}if(this.hScrollBar.css("visibility")!="hidden"){this.hScrollBar.jqxScrollBar("setPosition",d)}},scrolltop:function(d){if(d==null||d==undefined){return}if(this.vScrollBar.css("visibility")!="hidden"){this.vScrollBar.jqxScrollBar("setPosition",d)}},beginupdate:function(e,d){this._updating=true;this._datachanged=false;if(e===true){this._batchupdate=true}if(d===true){this._stopbindings=true}},endupdate:function(){this.resumeupdate()},resumeupdate:function(){this._updating=false;if(this._batchupdate){this._batchupdate=false;this._datachanged=false;if(!this._stopbindings){this.render()}else{this.updatebounddata()}return}if(this._stopbindings){this.updatebounddata("data");return}if(this._datachanged==true){var d=this.vScrollInstance.value;this.render(true,true,false);this._datachanged=false;if(d!=0&&d0){this.groups=new Array()}var g=this.that;if(h==null){h={}}if(!h.recordstartindex){h.recordstartindex=0}if(!h.recordendindex){h.recordendindex=0}if(h.loadallrecords==undefined||h.loadallrecords==null){h.loadallrecords=true}if(h.sortcomparer==undefined||h.sortcomparer==null){h.sortcomparer=null}if(h.filter==undefined||h.filter==null){h.filter=null}if(h.sort==undefined||h.sort==null){h.sort=null}if(h.data==undefined||h.data==null){h.data=null}var e=null;if(h!=null){e=h._source!=undefined?h._source.url:h.url}this.dataview=this.dataview||new b.jqx.dataview();if(b.jqx.dataview.sort){b.extend(this.dataview,new b.jqx.dataview.sort())}if(b.jqx.dataview.grouping){b.extend(this.dataview,new b.jqx.dataview.grouping())}this.dataview.suspendupdate();this.dataview.pageable=this.pageable;this.dataview.groupable=this.groupable;this.dataview.groups=this.groups;this.dataview.virtualmode=this.virtualmode;this.dataview.grid=this;this.dataview._clearcaches();this._columnClassNameCache=new Array();if(!this.pageable&&this.virtualmode){this.loadondemand=true}if(!g.initializedcall){if(h._source){if(this.sortable){if(h._source.sortcolumn!=undefined){this.sortcolumn=h._source.sortcolumn;this.source.sortcolumn=this.sortcolumn;this.dataview.sortfield=h._source.sortcolumn;h._source.sortcolumn=null}if(h._source.sortdirection!=undefined){this.dataview.sortfielddirection=h._source.sortdirection;var i=h._source.sortdirection;if(i=="a"||i=="asc"||i=="ascending"||i==true){var f=true}else{var f=false}if(i!=null){this.sortdirection={ascending:f,descending:!f}}else{this.sortdirection={ascending:false,descending:false}}}}}if(this.pageable){if(h._source){if(h._source.pagenum!=undefined){this.dataview.pagenum=h._source.pagenum}if(h._source.pagesize!=undefined){this.pagesize=h._source.pagesize;this.dataview.pagesize=h._source.pagesize}else{this.dataview.pagesize=h._source.pagesize;if(this.dataview.pagesize==undefined){this.dataview.pagesize=this.pagesize}}}}if(this.sortable){if(h.sortcolumn){this.dataview.sortfield=h.sortcolumn}if(h.sortdirection){this.dataview.sortfielddirection=h.sortdirection}}if(this.filterable){if(this.columns){b.each(this.columns,function(){if(this.filter){g.dataview.addfilter(this.datafield,this.filter)}})}}}this._loading=true;this.dataview.update=function(q){if(!g.pageable&&g.virtualmode){g.loadondemand=true}g._loading=false;if(g.dataview.isupdating()){g.dataview.resumeupdate(false)}if(g.pageable&&g.pagerrenderer){if(g._initpager){g._initpager()}else{throw new Error("jqxGrid: Missing reference to jqxgrid.pager.js.")}}if((g.source&&g.source.sortcolumn)&&g.sortby&&!g.virtualmode){g.render();if(!g.source._source.sort){g.sortby(g.source.sortcolumn,g.source.sortdirection,g.source.sortcomparer)}g.source.sortcolumn=null;g._postrender("data")}else{var s=g.vScrollInstance.value;var p=g.hScrollInstance.value;var m=g.source?g.source.datatype:"array";if(m!="local"||m!="array"){var n=g.virtualsizeinfo==null||(g.virtualsizeinfo!=null&&g.virtualsizeinfo.virtualheight==0);if(j=="cells"){var k=false;if(g.filterable&&g._initfilterpanel&&g.dataview.filters.length){k=true}if(false==q){if(!g.vScrollInstance.isScrolling()&&!g.hScrollInstance.isScrolling()){g._cellscache=new Array();g._pagescache=new Array();g._renderrows(g.virtualsizeinfo);if(g.showfilterrow&&g.filterable&&g.filterrow){g._updatelistfilters(true)}if(g.showaggregates&&g._updateaggregates){g._updateaggregates()}}if(g.sortcolumn){g.sortby(g.sortcolumn,g.dataview.sortfielddirection,g.source.sortcomparer)}if(g.autoshowloadelement){b(g.dataloadelement).css("visibility","hidden");b(g.dataloadelement).css("display","none")}if(g.virtualmode&&!g._loading){g.loadondemand=true;g._renderrows(g.virtualsizeinfo)}g._postrender("data");return}else{if(k){j="filter"}else{if(g.sortcolumn!=undefined){j="sort"}}}}if(!g.virtualmode||n||(g.virtualmode&&g.pageable)){if(g.initializedcall==true&&j=="pagechanged"){s=0;if(g.groupable&&g.groups.length>0){g._render(true,true,false,false,false);g._updatecolumnwidths();g._updatecellwidths();g._renderrows(g.virtualsizeinfo);g._postrender("data")}else{g.rendergridcontent(true);if(g.pageable&&g.updatepagerdetails){g.updatepagerdetails();if(g.autoheight){g._updatepageviews();if(g.autorowheight){g._renderrows(this.virtualsizeinfo)}}else{if(g.autorowheight){g._updatepageviews();g._renderrows(this.virtualsizeinfo)}}}}if(g.showaggregates&&g._updateaggregates){g._updateaggregates()}g._postrender("data")}else{if(j=="filter"){if(g.virtualmode){g._render(true,true,false,false,false);g._updatecolumnwidths();g._updatecellwidths();g._renderrows(g.virtualsizeinfo);g._updatefocusedfilter();g._postrender("data")}else{g._render(true,true,false,false,false);g._updatecolumnwidths();g._updatecellwidths();g._renderrows(g.virtualsizeinfo);g._updatefocusedfilter();g._postrender("data")}}else{if(j=="sort"){if(g.virtualmode){g.rendergridcontent(true);if(g.showaggregates&&g._updateaggregates){g._updateaggregates()}g._postrender("data")}else{g._render(true,true,false,false,false);if(g.sortmode==="many"){for(var r in g.sortcolumns){g.sortby(r,g.sortcolumns[r],g.source.sortcomparer)}}else{if(g.sortcolumn&&!g.source.sort){g.sortby(g.sortcolumn,g.dataview.sortfielddirection,g.source.sortcomparer)}}g._postrender("data")}if(g.source.sort){g._updatefocusedfilter()}}else{if(j=="data"){g._render(true,true,false,false,false);g._postrender("data")}else{if(j=="state"){g._render(true,true,false,g.menuitemsarray&&g.menuitemsarray.length>0&&!g.virtualmode);g._postrender("data")}else{g._render(true,true,true,g.menuitemsarray&&g.menuitemsarray.length>0&&!g.virtualmode);g._postrender("data")}}}}}}else{if(g.virtualmode&&q==true&&!g.pageable){g._render(true,true,false,false,false);g._updatefocusedfilter();g._updatecolumnwidths();g._updatecellwidths();g._renderrows(g.virtualsizeinfo);g._postrender("data")}else{if(g.virtualmode&&!g.pageable&&q==false&&j!=undefined){g.rendergridcontent(true);if(g.showaggregates&&g._updateaggregates){g._updateaggregates()}g._postrender("data")}else{if(g.virtualmode&&g.dataview.totalrecords==0&&g.dataview.filters.length>0){g._render(true,true,true,g.menuitemsarray&&!g.virtualmode);g._postrender("data")}else{g._pagescache=new Array();g._renderrows(g.virtualsizeinfo);g._postrender("data")}}}}if(g.vScrollInstance.value!=s&&s<=g.vScrollInstance.max){g.vScrollInstance.setPosition(s)}if(g.hScrollInstance.value!=p&&p<=g.hScrollInstance.max){g.hScrollInstance.setPosition(p)}}}if(g.autoshowloadelement){b(g.dataloadelement).css("visibility","hidden");b(g.dataloadelement).css("display","none")}if(g.pageable){if(g.pagerrightbutton){g.pagerrightbutton.jqxButton({disabled:false});g.pagerleftbutton.jqxButton({disabled:false});g.pagershowrowscombo.jqxDropDownList({disabled:false})}if(g.pagerfirstbutton){g.pagerfirstbutton.jqxButton({disabled:false});g.pagerlastbutton.jqxButton({disabled:false})}}g._raiseEvent(11);if(!g.initializedcall){var o=function(){g._raiseEvent(0);g.initializedcall=true;g.isInitialized=true;if(g.ready){g.ready()}if(g.sortmode==="many"&&g.sortable){if(g.source&&g.source.sortcolumns){var v=g.source.sortcolumns;for(var u=0;u0){var o=this.getdisplayrows();var p=0;for(var h=0;hr+s){this.scrolltop(p-this.rowsheight)}if(p===r){this.scrolltop(p-this.rowsheight)}break}var e=function(i){if(i.group){if(l.expandedgroups[i.uniqueid]){return l.expandedgroups[i.uniqueid].expanded}}else{return false}};var q=u.parentItem;var j=true;while(q){if(q&&!e(q)){j=false;break}q=q.parentItem}if(j){p+=this.rowsheight;if(this.details[h]){if(this.details[h].rowdetailshidden==false){p+=this.details[h].rowdetailsheight}}}}this.scrollmode=f;return true}var t=false;if(this.pageable&&this.gotopage&&!this.virtualmode){var k=Math.floor(m/g);if(this.dataview.pagenum!=k){if(this.groupable&&this.groups.length>0){return true}if(!this.editcell){this.gotopage(k)}else{setTimeout(function(){l.pagerpageinput.focus()},25);return false}t=true}}var r=this.vScrollInstance.value;var s=this._gettableheight()-this.rowsheight;var d=g*(m/g-k);d=Math.round(d);if(this._pageviews[k]){var p=this._pageviews[k].top;var n=p+d*this.rowsheight;if(this.rowdetails){for(var h=g*k;hr+s+2){this.scrolltop(n-s);t=true}else{}}}else{if(this.pageable){var n=d*this.rowsheight;if(this.rowdetails){for(var h=g*k;hr+s){this.scrollto(0,n);t=true}}}this.scrollmode=f;return t},ensurecellvisible:function(h,m){var o=this.that;var j=this.hScrollInstance.value;var r=o.hScrollInstance.max;if(o.rtl){if(this.hScrollBar.css("visibility")!="visible"){r=0}}var l=this.ensurerowvisible(h);var f=0;if(this.columns.records){var q=j;var v=this.hScrollBar[0].style.visibility;var t=this.vScrollBar[0].style.visibility;if(v=="hidden"){return}var n=this.element.offsetWidth;var p=0;var d=t=="visible"?20:0;var g=false;for(var s=0;su+n-d){k=f+e.width-n+d;if(o.rtl){k=r-k}o.scrollleft(k);g=true}else{if(f<=u){k=f-e.width;if(o.rtl){k=r-k}o.scrollleft(k);g=true}}if(p==0){if(o.rtl){o.scrollleft(r)}else{o.scrollleft(0)}g=true}else{if(p==o.columns.records.length-1){if(o.hScrollBar.css("visibility")=="visible"){if(!o.rtl){o.scrollleft(o.hScrollBar.jqxScrollBar("max"))}else{o.scrollleft(o.hScrollBar.jqxScrollBar("min"))}g=true}}}break}p++;f+=e.width}if(!g){o.scrollleft(q)}}return l},setrowheight:function(e,d){if(this._loading){throw new Error("jqxGrid: "+this.loadingerrormessage);return false}if(e==null||d==null){return false}this.heightboundrows[e]={index:e,height:d};e=this.getrowvisibleindex(e);if(e<0){return false}if(this.rows.records[e]){this.rows.records[e].height=d}else{var f=new a(this,null);f.height=d;this.rows.replace(e,f)}this.heights[e]=d;this.rendergridcontent(true);return true},getrowheight:function(d){if(d==null){return null}d=this.getrowvisibleindex(d);if(d<0){return false}if(this.rows.records[d]){return this.rows.records[d].height}},setrowdetails:function(f,h,d,j){if(f==undefined||f==null||f<0){return}var e=f+"_";if(this._rowdetailscache[e]){var g=this._rowdetailscache[e].element;b(g).remove();this._rowdetailscache[e]=null}var i=this.dataview.generatekey();this.detailboundrows[f]={index:f,details:{rowdetails:h,rowdetailsheight:d,rowdetailshidden:j,key:i}};f=this.getrowvisibleindex(f);if(f<0){return false}return this._setrowdetails(f,h,d,j,i)},getcolumn:function(d){var e=null;if(this.columns.records){b.each(this.columns.records,function(){if(this.datafield==d||this.displayfield==d){e=this;return false}})}else{if(this.columns){b.each(this.columns,function(){if(this.datafield==d||this.displayfield==d){e=this;return false}})}}return e},_getcolumnindex:function(e){var d=-1;if(this.columns.records){b.each(this.columns.records,function(){d++;if(this.datafield==e){return false}})}return d},_getcolumnat:function(d){var e=this.columns.records[d];return e},_getprevvisiblecolumn:function(e){var d=this.that;while(e>0){e--;var f=d.getcolumnat(e);if(!f){return null}if(!f.hidden){return f}}return null},_getnextvisiblecolumn:function(e){var d=this.that;while(e"}return e}return this.rowdetailstemplate}},getrecordscount:function(){return this.dataview.totalrecords},showrowdetails:function(d){if(this._loading){throw new Error("jqxGrid: "+this.loadingerrormessage);return false}if(d==null){return false}if(!this.detailsVisibility){this.detailsVisibility=new Array()}this.detailsVisibility[d]=false;d=this.getrowvisibleindex(d);if(d<0){return false}var e=this._getrowdetails(d);return this._setrowdetailsvisibility(d,e,false)},hiderowdetails:function(d){if(this._loading){throw new Error("jqxGrid: "+this.loadingerrormessage);return false}if(!this.detailsVisibility){this.detailsVisibility=new Array()}this.detailsVisibility[d]=true;d=this.getrowvisibleindex(d);if(d<0){return false}var e=this._getrowdetails(d);return this._setrowdetailsvisibility(d,e,true)},_togglerowdetails:function(j){if(!this.detailsVisibility){this.detailsVisibility=new Array()}var f=j.visibleindex;var g=this._getrowdetails(f);if(g!=null){var e=this.vScrollInstance.value;var i=!g.rowdetailshidden;var h=this.getboundindex(j);if(h!=undefined){this.detailsVisibility[h]=i}var d=this._setrowdetailsvisibility(f,g,i);if(e!==0&&this.vScrollBar.css("visibility")!=="hidden"){if(e<=this.vScrollInstance.max){this.vScrollInstance.setPosition(e)}else{this.vScrollInstance.setPosition(this.vScrollInstance.max)}}return d}return false},_setrowdetailsvisibility:function(e,f,i){if(this.rowdetailstemplate){if(!this.details){this.details=new Array()}if(!this.details[e]){var g=typeof this.rowdetailstemplate==="function"?this.rowdetailstemplate(e):this.rowdetailstemplate;if(undefined===g.rowdetailshidden){g.rowdetailshidden=true}if(undefined===g.rowdetailsheight){g.rowdetailsheight=200}if(undefined===g.rowdetails){g.rowdetails="
      "}this.details[e]={rowdetailshidden:g.rowdetailshidden,rowdetailsheight:g.rowdetailsheight,rowdetails:g.rowdetails};var h=this.dataview.generatekey();this.details[e].detailskey=h;this.detailboundrows[e]={index:e,details:this.details[e]}}}if(f!=null){this.details[e].rowdetailshidden=i}else{return false}var d=this.details[e];if(i){this._raiseEvent(21,{rowindex:e,details:d.rowdetails,height:d.rowdetailsheight})}else{this._raiseEvent(20,{rowindex:e,details:d.rowdetails,height:d.rowdetailsheight})}return this._setrowdetails(e,d.rowdetails,d.rowdetailsheight,d.rowdetailshidden)},getrowvisibleindex:function(d){if(d==undefined||d==null||d<0){return false}if(this.virtualmode){var e=this.dataview.loadedrecords[d];if(e==undefined){return -1}return e.visibleindex}return this.getrowdisplayindex(d)},hiderow:function(d){if(this._loading){throw new Error("jqxGrid: "+this.loadingerrormessage);return false}if(d==undefined||d==null||d<0){return false}if(d==null){return false}this.hiddenboundrows[d]={index:d,hidden:true};d=this.getrowvisibleindex(d);return this._setrowvisibility(d,true)},showrow:function(d){if(this._loading){throw new Error("jqxGrid: "+this.loadingerrormessage);return false}if(d==undefined||d==null||d<0){return false}if(d==null){return false}this.hiddenboundrows[d]={index:d,hidden:false};d=this.getrowvisibleindex(d);return this._setrowvisibility(d,false)},isrowhiddenat:function(d){if(d==null){return null}d=this.getrowvisibleindex(d);if(this.rows.records[d]){return this.rows.records[d].hidden}},_setrowvisibility:function(d,f,e){if(d==null){return false}this.hiddens[d]=f;if(e==undefined||e){this.rendergridcontent(true);return true}return false},_loadrows:function(){if(!this._pageviews[this.dataview.pagenum]&&!this.pageable){return}var k=!this.pageable?this._pageviews[this.dataview.pagenum].top:0;if(!this.pageable&&this._pagescache[this.dataview.pagenum]!=undefined){return null}if(!this.virtualsizeinfo){return}var l=this.that;var t=new Array();var j=new Array();var v=l.groupable&&l.groups.length>0;var d=this.dataview.totalrecords;var m=this.virtualsizeinfo.virtualheight;var e=0;this.rows.beginupdate();var o=this.dataview.pagesize;if(this.pageable&&v){o=this.dataview.rows.length}for(var p=0;p=this.dataview.rows.length){break}var f=this.dataview.rows[p];var g=null;if(!l.rows.records[f.visibleindex]){g=new a(l,f)}else{g=l.rows.records[f.visibleindex];g.setdata(f)}g.hidden=this.hiddens[g.visibleindex];if(this.rowdetailstemplate){var w=typeof this.rowdetailstemplate==="function"?this.rowdetailstemplate(g.boundindex):this.rowdetailstemplate;g.rowdetails=w.rowdetails;g.rowdetailsheight=w.rowdetailsheight;g.rowdetailshidden=w.rowdetailshidden;if(g.rowdetailshidden===undefined){g.rowdetailshidden=true}if(g.rowdetailsheight===undefined){g.rowdetailsheight=200}if(g.rowdetails===undefined){g.rowdetails="
      "}}var s=this.details[g.visibleindex];if(s){g.rowdetails=s.rowdetails;g.rowdetailsheight=s.rowdetailsheight;g.rowdetailshidden=s.rowdetailshidden;if(g.rowdetailshidden===undefined){g.rowdetailshidden=true}if(g.rowdetailsheight===undefined){g.rowdetailsheight=200}if(g.rowdetails===undefined){g.rowdetails="
      "}}else{if(!this.rowdetailstemplate){g.rowdetails=null}}if(v&&this.pageable&&g.parentbounddata!=null){var q=t[g.parentbounddata.uniqueid];if(q!=null){var r=this._findgroupstate(q.uniqueid);if(this._setsubgroupsvisibility){this._setsubgroupsvisibility(this,g.parentbounddata,!r,false)}g.hidden=this.hiddens[g.visibleindex]}if(q!=null&&q!=undefined){g.parentrow=q;q.subrows[q.subrows.length++]=g}}if(g.hidden){continue}var h=f.visibleindex;var n=this.rowsheight;if(this.cardview){n=this.cardheight}if(!this.heights[h]){this.heights[h]=n}g.height=this.heights[h];if(this.rowdetails){if(g.rowdetails&&!g.rowdetailshidden){g.height+=g.rowdetailsheight}}t[g.uniqueid]=g;j[e++]=g;g.top=k;k+=g.height;var u=h;l.rows.replace(u,g)}if((this.autoheight||this.pageable)&&this.autorowheight){if(this._pageviews&&this._pageviews.length>0){this._pageviews[0].height=k}}this.rows.resumeupdate();if(j.length>0){this._pagescache[this.dataview.pagenum]=j}},escape_HTML:function(d){return d.replace(/[&<>"]/g,function(f){var e={"&":"&","<":"<",">":">",'"':'"'};return e[f]||f})},_updateaddnewrowui:function(g){var m=this;var k=m.everpresentrowposition!="bottom"?m.addnewrowtop:m.addnewrowbottom;var o=m.columns.records.length;var f=0;for(var l=0;lh.maxwidth){e=h.maxwidth}var n=b(k[0].cells[l]);n.css("left",f);var i=true;if(n.width()==e){i=false}if(g){i=true}n.width(e);n[0].left=f;if(h.addnewrowwidget){n.html("");n.append(h.addnewrowwidget)}if(!(h.hidden&&h.hideable)&&!h.adaptivehidden){f+=e}else{n.css("display","none")}if(!i){continue}}var p=m.everpresentrowactions.split(" ");m.addnewrowbutton.show();m.addnewrowupdatebutton.show();m.addnewrowresetbutton.show();m.addnewrowdeletebutton.show();if(p.indexOf("add")==-1&&p.indexOf("addBottom")==-1){m.addnewrowbutton.hide()}if(p.indexOf("update")==-1){m.addnewrowupdatebutton.hide()}if(p.indexOf("reset")==-1){m.addnewrowresetbutton.hide()}if(p.indexOf("delete")==-1){m.addnewrowdeletebutton.hide()}var d=b(k.children()[0]);d.width(parseInt(f)+2);d.height(m.everpresentrowheight);d.css("max-height",m.everpresentrowheight+"px")},_removeaddnewrow:function(){var g=this;var d=g.columns.records.length;for(var f=0;f');var i=0;var z=o.columns.records.length;var n=o.toThemeProperty("jqx-grid-cell");n+=" "+o.toThemeProperty("jqx-grid-cell-add-new-row");n+=" "+o.toThemeProperty("jqx-grid-cell-filter-row");var m=z+10;var h=new Array();var D=o.that;f[0].cells=h;t.height(o.everpresentrowheight);if(!o.showfilterrow&&o.everpresentrowposition!="bottom"){f.css("max-height",(o.everpresentrowheight-1)+"px")}else{if(o.showfilterrow&&o.everpresentrowposition!="bottom"){f.css("max-height",(o.everpresentrowheight-3)+"px")}}t.css("max-height",o.everpresentrowheight+"px");f.append(t);var C=b("
      ").appendTo(b(document.body));var d=b("");var q=b("");var k=b("");var p=b("");C.addClass(o.toThemeProperty("jqx-popup"));C.addClass(o.toThemeProperty("jqx-rc-all"));C.addClass(o.toThemeProperty("jqx-fill-state-normal"));C.addClass(o.toThemeProperty("jqx-shadow"));C.append(d);C.append(q);C.append(k);C.append(p);var g=o.everpresentrowactions.split(" ");if(g.indexOf("add")==-1&&g.indexOf("addBottom")==-1){d.hide()}if(g.indexOf("update")==-1){q.hide()}if(g.indexOf("reset")==-1){p.hide()}if(g.indexOf("delete")==-1){k.hide()}o.addnewrowpopup=C;o.addnewrowbutton=d;o.addnewrowupdatebutton=q;o.addnewrowdeletebutton=k;o.addnewrowresetbutton=p;d.jqxButton({template:"success",theme:o.theme});k.jqxButton({template:"danger",theme:o.theme});q.jqxButton({template:"primary",theme:o.theme});p.jqxButton({template:"warning",theme:o.theme});q.mousedown(function(E){var Q={};var J={};for(var H=0;H0||o.selectedrowindexes.length>0){if(o.selectionmode.indexOf("cell")>=0){var N=o.getselectedcells()[0].rowindex}else{var N=o.selectedrowindexes[0]}var G=o.getrowdata(N);if(G){o.updaterow(G.uid,Q)}}C.hide();o.focus()});k.mousedown(function(G){if(o.selectedcells.length>0||o.selectedrowindexes.length>0){if(o.selectionmode.indexOf("cell")>=0){var I=o.getselectedcells()[0].rowindex}else{var I=o.selectedrowindexes[0]}var H=o.getrowdata(I);if(H){o.deleterow(H.uid)}}for(var F=0;F=0?"last":"first";o.addrow(null,P,E);C.hide();o.focus()});p.mousedown(function(G){var H={};for(var F=0;Fx.maxwidth){u=x.maxwidth}var e=b('
      ');t.append(e);e.css("left",i);if(o.rtl){e.css("z-index",m++);e.css("border-left-width","1px")}else{e.css("z-index",m--)}if(u=="auto"){u=0}e[0].style.width=parseFloat(u)+"px";e[0].left=i;if(!(x.hidden&&x.hideable)&&!x.adaptivehidden){i+=u}else{e.css("display","none")}h[h.length]=e[0];if(x.checkboxcolumn){var B=o.toThemeProperty("jqx-grid-cell");B+=" "+o.toThemeProperty("jqx-grid-cell-filter-row");B+=" "+o.toThemeProperty("jqx-grid-cell-pinned");e.removeClass().addClass(B);continue}var s=true;if(!o.rtl){if(o.groupable){var y=(o.showrowdetailscolumn&&o.rowdetails)?1:0;if(o.groups.length+y>w){s=false}}if(o.showrowdetailscolumn&&o.rowdetails&&w==0){s=false}}else{if(o.groupable){var y=(o.showrowdetailscolumn&&o.rowdetails)?1:0;if(o.groups.length+y+w>z-1){s=false}}if(o.showrowdetailscolumn&&o.rowdetails&&w==z-1){s=false}}o.updateeverpresentrow=function(){var G=null;if(o.selectedcells.length>0||o.selectedrowindexes.length>0){if(o.selectionmode.indexOf("cell")>=0){var H=o.getselectedcells()[0].rowindex}else{var H=o.selectedrowindexes[0]}G=o.getrowdata(H)}if(!G){return}for(var F=0;F'+o.gridlocalization.addrowstring+"
      ");e.append(l);l.mousedown(function(){d.trigger("mousedown")});continue}else{if(x.datafield==="resetButtonColumn"){var l=b('");e.append(l);l.mousedown(function(){p.trigger("mousedown")});continue}}var A=function(F,H,j){var E=b('');E[0].id=b.jqx.utilities.createId();E.addClass(F.toThemeProperty("jqx-widget"));E.addClass(F.toThemeProperty("jqx-input"));E.addClass(F.toThemeProperty("jqx-widget-content"));E.addClass(F.toThemeProperty("jqx-enableselect"));E.addClass(F.toThemeProperty("jqx-grid-cell-add-new-row"));E.css("text-align",j.cellsalign);if(F.rtl){E.css("direction","rtl")}if(F.disabled){E.attr("disabled",true)}E.attr("disabled",false);E.attr("placeholder",F.gridlocalization.everpresentrowplaceholder+j.text);E.appendTo(H);E.css("width","100%");E.css("height",F.everpresentrowheight+"px");E.css("line-height",F.everpresentrowheight+"px");E.css("max-height",F.everpresentrowheight+"px");E.css("margin","0px");E.focus(function(){if(o.selectedcells.length>0||o.selectedrowindexes.length>0){if(o.selectionmode.indexOf("cell")>=0){var K=o.getselectedcells()[0].rowindex}else{var K=o.selectedrowindexes[0]}}E.addClass(F.toThemeProperty("jqx-fill-state-focus"));var I=F.columns.records.indexOf(j);if(F.everpresentrowactionsmode!=="columns"){C.css({display:"block",top:E.coord().top+F.everpresentrowheight-1,left:I>0?E.coord().left:E.coord().left-1})}var J=C.children().width();if(j.cellsalign==="right"){var J=d.width()+p.width();C.children().css("left",J-J+"px")}else{C.children().css("left","0px")}F.content[0].scrollLeft=0;F.content[0].scrollTop=0;setTimeout(function(){F.content[0].scrollLeft=0;F.content[0].scrollTop=0},50);return false});j.addnewrowwidget=E;if(!j.reseteverpresentrowwidgetvalue){j.reseteverpresentrowwidgetvalue=function(J,I){I.val("");I.focus();I.blur();I.removeClass(o.toThemeProperty("jqx-input-invalid"));I.attr("title","")}}if(!j.seteverpresentrowwidgetvalue){j.seteverpresentrowwidgetvalue=function(J,I){J.val(I)}}if(!j.geteverpresentrowwidgetvalue){var G=j;j.geteverpresentrowwidgetvalue=function(I,P,R){var U=P.val();if(R!==false&&G.validateeverpresentrowwidgetvalue){var Y={};var O={};for(var M=0;M=0){d.trigger("mousedown")}else{if(o.everpresentrowactions.indexOf("update")>=0){q.trigger("mousedown")}else{if(o.everpresentrowactions.indexOf("delete")>=0){k.trigger("mousedown")}}}}});E.blur(function(){E.removeClass(F.toThemeProperty("jqx-fill-state-focus"));C.css("display","none")});if(j.initeverpresentrowwidget){j.initeverpresentrowwidget(j.datafield,H,C)}};A(this,e,x)}}}if(b.jqx.browser.msie&&b.jqx.browser.version<8){t.css("z-index",m--)}t.width(parseFloat(i)+2);f.addClass(n);f.css("border-bottom-width","0px");if(o.showfilterrow){f.css("border-top-width","0px")}else{f.css("border-top-width","1px")}f.css("box-sizing","border-box");f.css("border-right-width","0px")},_gettableheight:function(){if(this.tableheight!=undefined){return this.tableheight}var e=this.host.height();if(this.columnsheader){var d=this.columnsheader.outerHeight();if(!this.showheader){d=0}}e-=d;if(this.hScrollBar[0].style.visibility=="visible"){e-=this.hScrollBar.outerHeight()}if(this.pageable){e-=this.pager.outerHeight()}if(this._groupsheader()){e-=this.groupsheader.outerHeight()}if(this.showtoolbar){e-=this.toolbarheight}if(this.showfilterbar){e-=this.toolbarheight}if(this.showstatusbar){e-=this.statusbarheight}if(this.showeverpresentrow&&this.everpresentrowposition==="bottom"){e-=this.everpresentrowheight}if(e>0){this.tableheight=e;return e}return this.host.height()},_getpagesize:function(){if(this.pageable){return this.pagesize}if(this.virtualmode){var e=Math.round(this.host.height())+2*this.rowsheight;var d=Math.round(e/this.rowsheight);return d}if(this.autoheight||this.autorowheight){if(this.dataview.totalrows==0){return 1}return this.dataview.totalrows}if(this.dataview.totalrows<100&&this.dataview.totalrecords<100&&this.dataview.totalrows>0){return this.dataview.totalrows}return 100},_calculatevirtualheight:function(){var p=this.that;var e=Math.round(this.host.height())+2*this.rowsheight;var k=this._gettableheight();var r=Math.round(e/this.rowsheight);this.heights=new Array();this.hiddens=new Array();this.details=new Array();this.expandedgroups=new Array();this.hiddenboundrows=new Array();this.heightboundrows=new Array();this.detailboundrows=new Array();var h=Math.max(this.dataview.totalrows,this.dataview.totalrecords);if(this.pageable){h=this.pagesize;if(this.pagesize>Math.max(this.dataview.totalrows,this.dataview.totalrecords)&&this.autoheight){h=Math.max(this.dataview.totalrows,this.dataview.totalrecords)}else{if(!this.autoheight){if(this.dataview.totalrows0){while(g<=h+f){n+=d;if(g-f=h){var q=g-h;if(q>0){l-=d;this._pageviews[j-1]={top:l,height:d-q*this.rowsheight}}break}else{this._pageviews[j++]={top:l,height:d}}l=n;g+=f}}if(this.resizingGrid!=true){this.vScrollBar.jqxScrollBar({value:0})}if(this.hScrollBar.css("visibility")=="hidden"){var o=0;if(this.columns&&this.columns.records){for(var g=0;gthis.host.width()){k-=30}}}if(m>k&&!this.autoheight){this.vScrollBar.css("visibility","visible");if(this.scrollmode=="deferred"){this.vScrollBar.jqxScrollBar({max:m})}else{this.vScrollBar.jqxScrollBar({max:m-k});if(this.cardview){this.vScrollBar.jqxScrollBar({step:this.cardheight})}}}else{this.vScrollBar.css("visibility","hidden")}this.dataview.pagesize=f;this.dataview.updateview();return{visiblerecords:r,virtualheight:m}},_updatepageviews:function(){if(this.updating()){return}this._pagescache=new Array();this._pageviews=new Array();this.tableheight=null;var m=this.that;var h=Math.round(this.host.height())+2*this.rowsheight;var w=Math.round(h/this.rowsheight);var f=Math.max(this.dataview.totalrows,this.dataview.totalrecords);var n=f*this.rowsheight;var l=0;var q=0;var g=0;var p=0;var r=0;var o=this._getpagesize();if(!this.pageable){for(var t=0;t
      "}d.details=v}}if(d.details&&d.details.rowdetails&&!d.details.rowdetailshidden){e=d.details.rowdetailsheight;q+=e;n+=e}}l+=d.height+e}r++;if(r>=o||t==f-1){this._pageviews[g++]={top:p,height:q};q=0;p=l;r=0}}}else{if(this._updatepagedview){n=this._updatepagedview(f,n,0)}if(this.autoheight){this._arrange()}}var j=this._gettableheight();if(n>j){if(this.pageable&&this.gotopage){n=this._pageviews[0].height;if(n<0){n=this._pageviews[0].height}}if(this.vScrollBar.css("visibility")!="visible"){this.vScrollBar.css("visibility","visible")}if(n<=j||this.autoheight){this.vScrollBar.css("visibility","hidden")}if(n-j>0){if(this.scrollmode!="deferred"){var s=n-j;var u=this.vScrollInstance.max;this.vScrollBar.jqxScrollBar({max:s});if(s!=u){this.vScrollBar.jqxScrollBar({value:0})}}else{this.vScrollBar.jqxScrollBar({value:0,max:n})}}else{this.vScrollBar.jqxScrollBar({value:0,max:n})}}else{if(!this._loading){this.vScrollBar.css("visibility","hidden")}this.vScrollBar.jqxScrollBar({value:0})}this._arrange();if(this.autoheight){w=Math.round(this.host.height()/this.rowsheight)}this.virtualsizeinfo={visiblerecords:w,virtualheight:n}},updatebounddata:function(f){if(f!="data"&&f!="sort"&&f!="filter"&&f!="cells"&&f!="pagechanged"&&f!="pagesizechanged"&&!this.virtualmode){this.virtualsizeinfo=null;if(this.columns&&this.columns.records){for(var d=0;d0){var f=this._pageviews[0].height;if(this.virtualmode||!this.pageable){f=this.virtualsizeinfo.virtualheight}var e=this._gettableheight();if(f>e){if(this.pageable&&this.gotopage){f=this._pageviews[0].height;if(f<0){f=this._pageviews[0].height}}if(this.vScrollBar.css("visibility")!="visible"){this.vScrollBar.css("visibility","visible")}if(f<=e||this.autoheight){this.vScrollBar.css("visibility","hidden")}if(f-e>0){var d=f-e;this.vScrollBar.jqxScrollBar({max:d})}else{this.vScrollBar.jqxScrollBar({value:0,max:f})}}else{this.vScrollBar.css("visibility","hidden");this.vScrollBar.jqxScrollBar({value:0})}}},_refreshdataview:function(){this.dataview.refresh()},refresh:function(d){if(d!=true){if(b.jqx.isHidden(this.host)){return}if(this.virtualsizeinfo!=null){this._cellscache=new Array();this._renderrows(this.virtualsizeinfo);this._updatesize()}}},render:function(){this._render(true,true,true,true)},invalidate:function(){if(this.virtualsizeinfo){this._updatecolumnwidths();this._updatecellwidths();this._renderrows(this.virtualsizeinfo)}},clear:function(){this.databind(null);this.render()},_preparecolumngroups:function(){var o=this.columnsheight;if(this.columngroups){this.columnshierarchy=new Array();if(this.columngroups.length){var n=this;for(var h=0;hi){return 1}return 0});for(var l=1;l0&&this.rowdetails)||(this.rowdetails)){if(this.gridcontent){this._rowdetailscache=new Array();this._rowdetailselementscache=new Array();this.detailboundrows=new Array();this.details=new Array();b.jqx.utilities.html(this.gridcontent,"");this.gridcontent=null}}if(this.gridcontent){if(this.editable&&this._destroyeditors){this._destroyeditors()}}if(l){if(this.filterrow){this.filterrow.detach()}b.jqx.utilities.html(this.content,"");this.columnsheader=this.columnsheader||b('
      ');this.columnsheader.remove();this.columnsheader.addClass(this.toTP("jqx-widget-header"));this.columnsheader.addClass(this.toTP("jqx-grid-header"))}else{if(this.gridcontent){b.jqx.utilities.html(this.gridcontent,"")}}if(!this.showheader){this.columnsheader.css("display","none")}else{if(this.columnsheader){this.columnsheader.css("display","block")}}this.gridcontent=this.gridcontent||b('
      ');this.gridcontent.remove();var h=this.columnsheight;h=this._preparecolumngroups();if(this.showfilterrow&&this.filterable){this.columnsheader.height(h+this.filterrowheight);if(this.showeverpresentrow&&this.everpresentrowposition!=="bottom"){this.columnsheader.height(h+this.filterrowheight+this.everpresentrowheight)}}else{if(this.showeverpresentrow&&this.everpresentrowposition!=="bottom"){this.columnsheader.height(h+this.everpresentrowheight)}else{this.columnsheader.height(h)}}this.content.append(this.columnsheader);this.content.append(this.gridcontent);this._arrange();if(this._initgroupsheader){this._initgroupsheader()}this.selectionarea=this.selectionarea||b("
      ");this.selectionarea.addClass(this.toThemeProperty("jqx-grid-selectionarea"));this.selectionarea.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this.content.append(this.selectionarea);this.tableheight=null;this.rendergridcontent(false,l);if(this.groups.length>0&&this.groupable){var d=this.vScrollBar[0].style.visibility;this.suspendgroupevents=true;if(this.collapseallgroups){if(!this.groupsexpandedbydefault){this.collapseallgroups(false);this._updatescrollbarsafterrowsprerender()}else{this.expandallgroups(false)}}if(this.vScrollBar[0].style.visibility!=d){this._updatecolumnwidths();this._updatecellwidths()}this.suspendgroupevents=false}if(this.pageable&&this.updatepagerdetails){this.updatepagerdetails();if(this.autoheight){this._updatepageviews()}if(this.autorowheight){if(!this.autoheight){this._updatepageviews()}this._renderrows(this.virtualsizeinfo)}}if(this.showaggregates&&this._updateaggregates){this._updateaggregates()}this._addoverlayelement();if(this.scrollmode=="deferred"){this._addscrollelement()}if(this.showfilterrow&&this.filterable&&this.filterrow&&(f==undefined||f==true)){this._updatelistfilters(!l)}if(this.filterable&&this.filtermode==="simple"||this.filtermode==="default"&&this.showfilterbar){this._renderfilter()}if(this.rendered){this.rendered("full")}this.__isRendered=true},_addoverlayelement:function(){var d=b.jqx.utilities.getBrowser();if((d.browser=="msie"&&parseInt(d.version)<9)||this.isTouchDevice()){if(this._overlayElement){this._overlayElement.remove()}this._overlayElement=b("");this._overlayElement.css("background","white");this._overlayElement.css("z-index",180);this._overlayElement.css("opacity",0.001);if(this.isTouchDevice()){if(this.vScrollBar.css("visibility")!=="hidden"||this.hScrollBar.css("visibility")!=="hidden"){var f=0;if(this.selectionmode=="checkbox"){f+=30}if(this.groupable||this.rowdetails){this._overlayElement.css("left",30*(this.groups.length+(this.rowdetails?1:0)))}var g=this._overlayElement.css("left");this._overlayElement.css("left",g+f);if(this.cardview){this.content.prepend(this._overlayElement);var e=this;this.host.on("mouseup",function(){e._overlayElement.css("visibility","visible")});this._overlayElement[0].onmouseup=function(h){e._overlayElement.css("visibility","hidden");h.stopPropagation()}}}else{if(this._overlayElement){this._overlayElement.remove()}}}else{this.content.prepend(this._overlayElement)}}this._updateTouchScrolling()},_addscrollelement:function(){if(this._scrollelement){this._scrollelement.remove()}if(this._scrollelementoverlay){this._scrollelementoverlay.remove()}this._scrollelementoverlay=b("
      ");this._scrollelementoverlay.css("background","black");this._scrollelementoverlay.css("z-index",1800);this._scrollelementoverlay.css("opacity",0.1);this._scrollelement=b("");this._scrollelement.css("z-index",1900);this._scrollelement.addClass(this.toThemeProperty("jqx-button"));this._scrollelement.addClass(this.toThemeProperty("jqx-fill-state-normal"));this._scrollelement.addClass(this.toThemeProperty("jqx-rc-all"));this._scrollelement.addClass(this.toThemeProperty("jqx-shadow"));this.content.prepend(this._scrollelement);this.content.prepend(this._scrollelementoverlay)},_postrender:function(f){if(f=="filter"||f=="sort"||f=="group"){if(this.rowdetails&&this.detailsVisibility&&this.detailsVisibility.length>0){this._detailsUpdate=true;for(var e=0;e0){if(f=="filter"||f=="sort"){for(var e=0;e0){k=false;var j=this.vScrollBar[0].style.visibility;this.rendergridcontent(true,false);if(j!=this.vScrollBar[0].style.visibility||this._hiddencolumns){this._updatecolumnwidths();this._updatecellwidths();this._renderrows(this.virtualsizeinfo)}}}}else{if(f=="group"){this.groupsVisibility=new Array()}}}},rendergridcontent:function(e,g){if(this.updating()){return false}if(e==undefined||e==null){e=false}this._requiresupdate=e;var i=this.prerenderrequired;if(this.prerenderrequired){this._arrange()}var h=this.that;var g=g;if(g==null||g==undefined){g=true}this.tableheight=null;h.virtualsizeinfo=h.virtualsizeinfo||h._calculatevirtualheight();if(h.pageable&&!h.autoheight){if(h.dataview.totalrows=j){this.adaptivehidden=true}});this._updatecolumnwidths();this._updatecellwidths();this._renderrows(this.virtualsizeinfo)}else{if(this.adaptive){b.each(this.columns.records,function(k,l){if(this.columntype==="adaptive"){return true}this.adaptivehidden=false});this._updatecolumnwidths();this._updatecellwidths();this._renderrows(this.virtualsizeinfo)}}return true},_updatecolumnwidths:function(){var p=this.host.width();var f=p;var n="";if(this.columns==undefined||this.columns.records==undefined){return}var u=this.that;var h=this.rowdetails&&this.showrowdetailscolumn?(1+this.groups.length)*this.groupindentwidth:(this.groups.length)*this.groupindentwidth;var m=this.adaptive&&this.element.offsetWidth<=this.adaptivewidth;var e=0;if(m){var t=1;b.each(this.columns.records,function(q,v){if(this.adaptivehidden){t++}});var l=this.vScrollBar[0].offsetWidth>0?this.vScrollBar[0].offsetWidth+4:0;if(this.vScrollBar.css("visibility")=="hidden"){l=0}var k=this.columns.records.length-t;e=(this.element.offsetWidth-32-l)/k}b.each(this.columns.records,function(v,x){if(!(this.hidden&&this.hideable)&&!this.adaptivehidden){if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){var x=0;var y=u.vScrollBar[0].style.visibility=="hidden"?0:u.scrollbarsize+5;if(u.scrollbarautoshow||u.scrollbarsize==0){y=0}var q=f;x=parseFloat(this.width)*q/100;y+=h;if(this._percentagewidth!=undefined){x=parseFloat(this._percentagewidth)*(q-y)/100}if(xthis.maxwidth&&this.maxwidth!="auto"){x=this.maxwidth}p-=x}else{if(this.width!="auto"&&!this._width){p-=this.width}else{n+=this.text}}}});var g=this._gettableheight();if(!this.autoheight){if(this.virtualsizeinfo&&this.virtualsizeinfo.virtualheight>g){if(this.groupable&&this.groups.length>0){if(this.dataview&&this.dataview.loadedrootgroups&&!this.groupsexpandedbydefault){var s=this.dataview.loadedrootgroups.length*this.rowsheight;if(this.pageable){for(var d=0;dg){p-=this.scrollbarsize+5;f-=this.scrollbarsize+5}else{if(this.vScrollBar.css("visibility")=="visible"){p-=this.scrollbarsize+5;f-=this.scrollbarsize+5}}}else{p-=this.scrollbarsize+5;f-=this.scrollbarsize+5}}else{if(this.vScrollBar.css("visibility")!="hidden"&&this.scrollbarsize>0){p-=this.scrollbarsize+5;f-=this.scrollbarsize+5}}}}var h=this.rowdetails&&this.showrowdetailscolumn?(1+this.groups.length)*this.groupindentwidth:(this.groups.length)*this.groupindentwidth;f-=h;if(!this.columnsheader){return}var j=this.columnsheader.find("#columntable"+this.element.id);if(j.length==0){return}var i=0;var o=this;var r=0;b.each(this.columns.records,function(w,A){var y=b(this.element);if(!this.hidden&&!this.adaptivehidden&&this.element.style.display==="none"){this.element.style.display="block"}if(this.adaptivehidden){this.element.style.display="none"}var v=false;var z=this.width;if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){if(this._percentagewidth!=undefined){z=parseFloat(this._percentagewidth)*f/100}else{z=parseFloat(this.width)*f/100}v=true}if(e>0&&this.columntype!=="adaptive"){y.width(e);this.adaptivewidth=e}else{if(this.width!="auto"&&!this._width&&!v){if(parseInt(y[0].style.width)!=this.width){y.width(this.width)}}else{if(v){if(zthis.maxwidth&&this.maxwidth!="auto"){z=this.maxwidth;this.width=z}if(parseInt(y[0].style.width)!=z){y.width(z);this.width=z}}else{var x=Math.floor(p*(this.text.length/n.length));r+=x;if(p-r<3&&p!=r&&p-r>0.01){if(p-r===1){x++}else{x+=2}}else{if(w==u.columns.records.length-1){if(r"+o.escape_HTML(this.text)+"");b(document.body).append(q);x=10+q.width();q.remove()}if(xthis.maxwidth){x=this.maxwidth}this._width="auto";this.width=x;y.width(this.width)}}}if(parseInt(y[0].style.left)!=i){y.css("left",i)}if(!(this.hidden&&this.hideable)&&!this.adaptivehidden){if(e>0&&this.columntype!=="adaptive"){i+=e}else{i+=this.width}}this._requirewidthupdate=true});this.columnsheader.width(2+i);j.width(this.columnsheader.width());if(i==0){this.columnsheader[0].style.visibility="hidden"}else{this.columnsheader[0].style.visibility="inherit"}this._resizecolumngroups();if(this.showfilterrow&&this.filterrow){this.filterrow.width(this.columnsheader.width());this._updatefilterrowui()}if(this.showeverpresentrow){if(this.everpresentrowposition!=="bottom"){this.addnewrowtop.width(this.columnsheader.width())}else{this.addnewrowbottom.width(this.columnsheader.width())}this._updateaddnewrowui()}if(this.autowidth){this._arrange()}},_rendercolumnheaders:function(){var x=this.that;if(this.cardview){if(x.cardviewcolumns.length>0){b.each(this.columns.records,function(p,H){if(typeof x.cardviewcolumns[0]!=="string"){var q=false;for(var k=0;k');o[0].cells=new Array();var B=0;var h=0;var u="";var G=this.host.width();var s=G;var g=new Array();var A=new Array();var t=this.rowdetails&&this.showrowdetailscolumn?(1+this.groups.length)*this.groupindentwidth:(this.groups.length)*this.groupindentwidth;b.each(this.columns.records,function(j,k){if(!(this.hidden&&this.hideable)&&!this.adaptivehidden){if(this.width!="auto"&&!this._width){if(this.widththis.maxwidth&&this.maxwidth!="auto"){G-=this.maxwidth}else{if(this.width.toString().indexOf("%")!=-1){var k=0;var p=x.vScrollBar[0].style.visibility=="hidden"?0:x.scrollbarsize+5;p+=t;k=parseFloat(this.width)*(s-p)/100;if(kthis.maxwidth&&this.maxwidth!="auto"){k=this.maxwidth}G-=k}else{if(typeof this.width=="string"){this.width=parseInt(this.width)}G-=this.width}}}}else{u+=this.text}}if(this.pinned||this.grouped||this.checkboxcolumn){if(x._haspinned){this.pinned=true}g[g.length]=this}else{A[A.length]=this}});if(!this.rtl){for(var D=0;D=this.columns.records.length-g.length;D--){this.columns.replace(D,g[y++])}for(var C=0;Cv&&!this.scrollbarautoshow){if(this.groupable&&this.groups.length>0){if(this.dataview&&this.dataview.loadedrootgroups&&!this.groupsexpandedbydefault){var E=0;if(!this.pageable){var E=this.dataview.loadedrootgroups.length*this.rowsheight}else{if(this.pageable){for(var w=0;wv){G-=this.scrollbarsize+5;s-=this.scrollbarsize+5}}else{G-=this.scrollbarsize+5;s-=this.scrollbarsize+5}}else{if(!this.autoheight&&this.scrollbarsize>0){G-=this.scrollbarsize+5;s-=this.scrollbarsize+5}}}s-=t;var d=function(j,k){var i=x.columngroupslevel*x.columnsheight;i=i-(k.level*x.columnsheight);return i};var f=document.createDocumentFragment();var z=0;b.each(this.columns.records,function(X,V){this.height=x.columnsheight;if(x.columngroups){if(x.columngroups.length){this.height=d(this.datafield,this);l=this.height}}var ab=x.toTP("jqx-grid-column-header")+" "+x.toTP("jqx-widget-header");if(x.rtl){ab+=" "+x.toTP("jqx-grid-column-header-rtl")}var Z=!x.rtl?150+n-1:150+n+1;var T=!x.rtl?n--:n++;var H=b('
      ');if(x.columngroups){H[0].style.height=l+"px";H[0].style.bottom="0px";if(this.pinned){H[0].style.zIndex=Z}}this.uielement=H;if(this.classname!=""&&this.classname){H.addClass(this.classname)}var P=this.width;var Q=false;if(this.width===null){this.width="auto"}if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){if(this._percentagewidth!=undefined){P=parseFloat(this._percentagewidth)*s/100}else{P=parseFloat(this.width)*s/100}Q=true}if(this.width!="auto"&&!this._width&&!Q){if(Pthis.maxwidth&&this.maxwidth!="auto"){P=this.maxwidth;this.width=P}H[0].style.width=parseInt(P)+"px"}else{if(Q){if(Pthis.maxwidth&&this.maxwidth!="auto"){P=this.maxwidth}if(this._percentagewidth==undefined||this.width.toString().indexOf("%")!=-1){this._percentagewidth=this.width}H.width(P);this.width=P}else{if(!this.hidden&&!this.adaptivehidden){var U=Math.floor(G*(this.text.length/u.length));z+=U;if(G-z<3&&G!=z&&G-z>0.01){if(G-z===1){U++}else{U+=2}}else{if(X==x.columns.records.length-1){if(z"+this.text+"");b(document.body).append(S);U=10+S.width();S.remove()}if(Uthis.maxwidth){U=this.maxwidth}this._width="auto";this.width=U;P=this.width;H.width(this.width)}}}if((this.hidden&&this.hideable)||this.adaptivehidden){H.css("display","none")}var p=b(H.children()[0]);var Y=x.rtl?x.toTP("jqx-grid-column-menubutton")+" "+x.toTP("jqx-grid-column-menubutton-rtl"):x.toTP("jqx-grid-column-menubutton");Y+=" "+x.toTP("jqx-icon-arrow-down");var K=b('
      ');if(!x.enableanimations){K.css("margin-left",-16)}if(x.rtl){K.css("left","0px")}this.columnsmenu=K[0];o[0].cells[X]=H[0];K[0].style.width=parseInt(x.columnsmenuwidth)+"px";var J=x.columnsmenu;var q=false;var W=false;var R=(x.groupable&&r>0&&B0&&Bx.columns.records.length-1-r}if(R){B++;J&=false;this.sortable=false;this.editable=false;W=true}else{var M=this.renderer!=null?this.renderer(this.text,this.align,l):x._rendercolumnheader(this.text,this.align,l,x);if(M==null){M=x._rendercolumnheader(this.text,this.align,l,x)}if(this.renderer!=null){M=b(M)}J&=true;q=true}if(x.WinJS){MSApp.execUnsafeLocalFunction(function(){p.append(b(M))})}else{if(this.renderer){p.append(b(M))}else{if(M){p[0].innerHTML=M}}}if(M!=null){var O=b('
      ');K.addClass(x.toTP("jqx-widget-header"));p.append(O);var ad=O.children();this.sorticon=ad[3];this.sortasc=ad[1];this.sortdesc=ad[2];this.filtericon=ad[0];this.iconscontainer=O;if(x.rtl){O.css("margin-left","0px");O.css("left","0px");b(this.sorticon).css("float","left");b(this.sortasc).css("float","left");b(this.filtericon).css("float","left");b(this.sortdesc).css("float","left")}if(!x.autoshowfiltericon&&this.filterable){b(this.filtericon).css("display","block")}}this.element=H[0];if(J){x._handlecolumnsmenu(x,p,H,K,this);if(!this.menu){K.hide()}}f.appendChild(H[0]);if(x.groupable&&q){H[0].id=x.dataview.generatekey();if(x._handlecolumnstogroupsdragdrop){x._handlecolumnstogroupsdragdrop(this,H)}else{throw new Error("jqxGrid: Missing reference to jqxgrid.grouping.js.")}}if(x.columnsreorder&&this.draggable&&x._handlecolumnsdragreorder){x._handlecolumnsdragreorder(this,H)}var aa=this;aa._applyStyle();x.addHandler(H,"mouseenter",function(i){aa.hovered=true;aa._applyStyle()});x.addHandler(H,"mouseleave",function(i){aa.hovered=false;aa._applyStyle()});var ac=function(aj,ae,ak){if(aj.selectable){var am=x.getrows();if(aj.selected===undefined){aj.selected=false}if(!ae.shiftKey||x._clickedcolumn===undefined){x._clickedcolumn=aj}if(ae.shiftKey&&x._clickedcolumn&&ak===undefined){var al=x.columns.records.indexOf(x._clickedcolumn);var ai=x.columns.records.indexOf(aj);var af=Math.min(al,ai);var ag=Math.max(al,ai);x.clearselection();for(var ah=af;ah<=ag;ah++){ac(x.columns.records[ah],ae,true)}x._renderrows(this.virtualsizeinfo);return}if(ak){aj.selected=true}else{if(!ae.ctrlKey){x.clearselection()}aj.selected=!aj.selected}for(var ah=0;ah0&&x._togglesort){if(!x._loading){if(x.suspendClick){return true}x._togglesort(aa)}}ac(aa,i);i.preventDefault();x._raiseEvent(7,{column:aa.getcolumnproperties(),datafield:aa.datafield,originalEvent:i})});aa.toggleSelection=ac;if(aa.resizable&&x.columnsresize&&!W){var I=false;var j="mousemove";if(x.isTouchDevice()&&x.touchmode!==true){I=true;j=b.jqx.mobile.getTouchEventName("touchstart")}x.addHandler(H,j,function(ae){var i=parseInt(ae.pageX);var ag=5;var aj=parseInt(H.coord().left);if(x.hasTransform){aj=b.jqx.utilities.getOffset(H).left}if(x.resizing){return true}if(x._handlecolumnsresize){if(I){var af=x.getTouches(ae);var ai=af[0];i=ai.pageX;ag=40;if(i>=aj+aa.width-ag){x.resizablecolumn={columnelement:H,column:aa};H.css("cursor","col-resize")}else{H.css("cursor","");x.resizablecolumn=null}return true}var ah=aa.width;if(x.rtl){ah=0}if(i>=aj+ah-ag){if(i<=aj+ah+ag){x.resizablecolumn={columnelement:H,column:aa};H.css("cursor","col-resize");return false}else{H.css("cursor","");x.resizablecolumn=null}}else{H.css("cursor","");if(i');var k=p.find("div:first");k.jqxCheckBox({_canFocus:false,disabled:x.disabled,disabledContainer:true,theme:x.theme,enableContainerClick:false,animationShowDelay:0,animationHideDelay:0});k.addClass(x.toThemeProperty("jqx-checkbox"));aa.checkboxelement=k;var L=k.data().jqxCheckBox.instance;x._checkboxcolumn=aa;L.updated=function(ae,i,af){x._checkboxcolumnupdating=true;if(x.disabled){k.jqxCheckBox({disabled:x.disabled});i=af}if(i){x.selectallrows()}else{x.unselectallrows()}x._checkboxcolumnupdating=false}}});if(h>0){this.columnsheader.width(2+h)}else{this.columnsheader.width(h)}o[0].appendChild(f);this.columnsrow=o;x.columnsheader.append(o);if(this.showfilterrow&&this._updatefilterrow){if(!this.columngroups){o.height(this.columnsheight)}else{o.height(this.columngroupslevel*this.columnsheight)}if(!this.filterrow){var F=b("
      ");F[0].id="filterrow."+this.element.id;F.height(this.filterrowheight);this.filterrow=F}this.filterrow.width(2+h);this.columnsheader.append(this.filterrow);this._updatefilterrow()}if(this.showeverpresentrow&&this.everpresentrowposition!=="bottom"){if(!this.columngroups){o.height(this.columnsheight)}else{o.height(this.columngroupslevel*this.columnsheight)}if(!this.addnewrowtop){var m=b("
      ");m[0].id="addnewrowtop."+this.element.id;m.height(this.everpresentrowheight);this.addnewrowtop=m}this.addnewrowtop.width(2+h);if(this.everpresentrowposition=="topAboveFilterRow"){if(this.filterrow){this.addnewrowtop.insertBefore(this.filterrow)}else{this.columnsheader.append(this.addnewrowtop)}}else{this.columnsheader.append(this.addnewrowtop)}this._updateaddnewrow()}else{if(this.showeverpresentrow&&this.everpresentrowposition==="bottom"){if(!this.addnewrowbottom){var e=b("
      ");e[0].id="addnewrowbottom."+this.element.id;e.height(this.everpresentrowheight);this.addnewrowbottom=e}this.addnewrowbottom.width(2+h);this.addnewrow.append(this.addnewrowbottom);this._updateaddnewrow()}}if(h==0){o[0].style.visibility="hidden"}else{o[0].style.visibility="inherit"}o.width(h);if(this._handlecolumnsdragdrop){this._handlecolumnsdragdrop()}if(this._handlecolumnsreorder){this._handlecolumnsreorder()}if(this._rendersortcolumn){this._rendersortcolumn()}if(this._renderfiltercolumn){this._renderfiltercolumn()}if(this._handlecolumnsresize){this._handlecolumnsresize()}if(this.columngroups){this._rendercolumngroups()}if(this._updatecheckboxselection){this._updatecheckboxselection()}},_rendercolumngroups:function(){if(!this.columngroups){return}var p=0;for(var m=0;m');var l=b(this._rendercolumnheader(r.text,r.align,this.columnsheight,this));if(r.renderer){var l=b("
      ");var o=r.renderer(r.text,r.align,s);l.html(o)}g.append(l);g[0].style.left=e+"px";if(e===0){g[0].style.borderLeftColor="transparent"}if(!this.showcolumnheaderlines){g[0].style.borderRightColor="transparent";g[0].style.borderBottomColor="transparent";g[0].style.boxShadow="none"}g[0].style.top=q+"px";g[0].style.height=s+"px";g[0].style.width=-1+r.width+"px";f.append(g);r.element=g;if(r.rendered){r.rendered(l,r.align,s)}}}}},_resizecolumngroups:function(){if(!this.columngroups){return}for(var e=0;e0){if(!p.enableanimations){k.css("display","block");var q=!p.rtl?-48:16;m.iconscontainer.css("margin-left",q+"px");m._animating=false;m._menuvisible=true}else{k.css("display","block");k.stop();m.iconscontainer.stop();if(!p.rtl){k.css("margin-left","0px");k.animate({"margin-left":-l},"fast",function(){k.css("display","block");m._animating=false;m._menuvisible=true})}else{k.css("margin-left",-l);k.animate({"margin-left":"0px"},"fast",function(){k.css("display","block");m._animating=false;m._menuvisible=true})}var q=!p.rtl?-(32+l):l;m.iconscontainer.animate({"margin-left":q},"fast")}}}};var f="mouseenter";if(p.isTouchDevice()){f="touchstart"}p.addHandler(h,f,function(r){var q=parseInt(r.pageX);var t=p.columnsresize&&m.resizable?3:0;var v=parseInt(h.coord().left);if(p.hasTransform){v=b.jqx.utilities.getOffset(h).left}var u=m.width;if(p.rtl){u=0}if(t!=0){if(q>=v+u-t){if(q<=v+u+t){return false}}}var s=p.vScrollInstance.isScrolling();if(m.menu&&p.autoshowcolumnsmenubutton&&!s&&!p.disabled){o()}});if(!p.autoshowcolumnsmenubutton){k.css("display","block");var e=!p.rtl?-48:16;m.iconscontainer.css("margin-left",e+"px");if(!p.rtl){k.css({"margin-left":-l})}else{k.css({"margin-left":"0px"})}}p.addHandler(h,"mouseleave",function(q){if(p.menuitemsarray&&p.menuitemsarray.length>0&&m.menu){var s=b.data(document.body,"contextmenu"+p.element.id);if(s!=undefined&&k[0].id==s.columnsmenu.id){return}if(p.autoshowcolumnsmenubutton){if(!p.enableanimations){k.css("display","none");var r=!p.rtl?-32:0;m.iconscontainer.css("margin-left",r+"px");m._menuvisible=false}else{if(!p.rtl){k.css("margin-left",-l)}else{k.css("margin-left","0px")}k.stop();m.iconscontainer.stop();if(!p.rtl){k.animate({"margin-left":0},"fast",function(){k.css("display","none");m._menuvisible=false})}else{k.animate({"margin-left":-l},"fast",function(){k.css("display","none");m._menuvisible=false})}var r=!p.rtl?-32:0;m.iconscontainer.animate({"margin-left":r},"fast")}}}});var j=true;var d="";var i=b(m.filtericon);p.addHandler(k,"mousedown",function(q){if(!p.gridmenu){p._initmenu()}j=!b.data(p.gridmenu[0],"contextMenuOpened"+p.gridmenu[0].id);d=b.data(document.body,"contextmenu"+p.element.id);if(d!=null){d=d.column.datafield}});p.addHandler(i,"mousedown",function(q){if(!p.gridmenu){p._initmenu()}j=!b.data(p.gridmenu[0],"contextMenuOpened"+p.gridmenu[0].id);d=b.data(document.body,"contextmenu"+p.element.id);if(d!=null){d=d.column.datafield}});var n=function(){if(!m.menu){return false}if(!p.gridmenu){p._initmenu()}if(p.disabled){return false}for(var I=0;IparseInt(w.left)+p.gridmenu.width()){p.gridmenu.jqxMenu("open",w.left,w.top+C)}else{p.gridmenu.jqxMenu("open",k.width()+w.left-p.gridmenu.width(),w.top+C)}if(p.gridmenu.width()<100){p._arrangemenu()}if(p.adaptive&&p.element.offsetWidth=0){L=J[1]}b(J).removeClass("jqx-fill-state-focus");b(L).addClass("jqx-fill-state-focus");L.active=true},225)}p._hasOpenedMenu=true;var z=p._getmenuitembyindex(0);var x=p._getmenuitembyindex(1);var q=p._getmenuitembyindex(2);var y=p._getmenuitembyindex(3);var t=p._getmenuitembyindex(4);var H=p._getmenuitembyindex(5);if(z!=null&&x!=null&&q!=null){var u=m.sortable&&p.sortable;p.gridmenu.jqxMenu("disable",z.id,!u);p.gridmenu.jqxMenu("disable",x.id,!u);p.gridmenu.jqxMenu("disable",q.id,!u);if(m.displayfield!=undefined){var G=p.getsortinformation();var B=(G&&G.sortcolumns&&G.sortcolumns.find(function(J){return J.dataField===m.displayfield}));if(p.sortcolumn==m.displayfield||B){var G=p.getsortinformation();if(u){if(G.sortdirection.ascending){p.gridmenu.jqxMenu("disable",z.id,true)}else{p.gridmenu.jqxMenu("disable",x.id,true)}}}else{p.gridmenu.jqxMenu("disable",q.id,true)}}}if(y!=null&&t!=null){if(!p.groupable||!m.groupable){p.gridmenu.jqxMenu("disable",t.id,true);p.gridmenu.jqxMenu("disable",y.id,true)}else{if(p.groups&&p.groups.indexOf(m.datafield)!=-1){p.gridmenu.jqxMenu("disable",y.id,true);p.gridmenu.jqxMenu("disable",t.id,false)}else{p.gridmenu.jqxMenu("disable",y.id,false);p.gridmenu.jqxMenu("disable",t.id,true)}}}if(H!=null){p.menuOwner=m;p._updatefilterpanel(p,H,m);var s=0;if(p.sortable&&p._togglesort&&p.showsortmenuitems){s+=3}if(p.groupable&&p.addgroup&&p.showgroupmenuitems){s+=2}var D=s*36+6;var F=p._measureMenuElement();var D=s*F+20;if(b.jqx.browser.msie&&b.jqx.browser.version<8){D+=20;b(H).height(220)}if(p.isTouchDevice()){D+=10}if(p.filterable&&p.showfiltermenuitems){if(!m.filterable){p.gridmenu.height(D);b(H).css("display","none")}else{p.gridmenu.height(D+230);b(H).css("display","block")}}}if(p.columnmenuopening){var A=p.columnmenuopening(p.gridmenu,m.displayfield,p.gridmenu.height());if(false===A){setTimeout(function(){p._closemenu()})}}b.data(document.body,"contextmenu"+p.element.id,{column:m,columnsmenu:k[0]})};p.addHandler(i,"click",function(q){if(!m.menu){return false}if(!p.showfilterrow){if(k[0].style.display!="block"){h.trigger("mouseenter")}setTimeout(function(){if(k[0].style.display!="block"){h.trigger("mouseenter")}n()},200)}return false});p.addHandler(k,"click",function(q){if(!m.menu){return false}n();return false});if(p.isTouchDevice()){p.addHandler(k,b.jqx.mobile.getTouchEventName("touchstart"),function(q){if(!m.menu){return false}if(!p._hasOpenedMenu){n()}else{p._closemenu()}return false})}},_removecolumnhandlers:function(h){var e=this.that;var f=b(h.element);if(f.length>0){e.removeHandler(f,"mouseenter");e.removeHandler(f,"mouseleave");var g=b(h.filtericon);e.removeHandler(g,"mousedown");e.removeHandler(g,"click");e.removeHandler(f,"click");e.removeHandler(f,"mousemove");if(e.columnsreorder){e.removeHandler(f,"mousedown.drag");e.removeHandler(f,"mousemove.drag")}e.removeHandler(f,"dragstart");if(f[0].columnsmenu){var d=b(f[0].columnsmenu);e.removeHandler(d,"click");e.removeHandler(d,"mousedown");e.removeHandler(d,b.jqx.mobile.getTouchEventName("touchstart"))}}},_rendercolumnheader:function(h,i,e,d){var g="8px";if(d.columngroups){g=(e/2-this._columnheight/2);if(g<0){g=6}g+="px"}else{if(this.columnsheight!=32){g=(this.columnsheight/2-this._columnheight/2);if(g<0){g=6}g+="px"}}if(this.enableellipsis){if(i=="left"){return'
      '+h+"
      "}else{return'
      '+h+"
      "}}if(i=="center"||i=="middle"){return'"}var f=''+h+"";return f},_renderrows:function(m,p,t){var o=this.that;if((this.pageable||this.groupable)&&(this.autoheight||this.autorowheight)){if(this.table!=null&&this.table[0].rows!=null&&this.table[0].rows.length=o.source._source.totalrecords){w=o.source._source.totalrecords;y=w-o.dataview.pagesize-1;if(y<0){y=0}if(o.source._source.recordendindex==w&&o.source._source.recordstartindex==y){return}}o.source._source.recordstartindex=y;o.source._source.recordendindex=w}o.updatebounddata("cells")}}}};if(this.loadondemand){l();e();this.loadondemand=false}var d=this._browser==undefined?this._isIE10():this._browser;if(this.editable&&this.editcell&&!this.vScrollInstance.isScrolling()&&!this.hScrollInstance.isScrolling()){l()}else{if(this.autoheight){l()}else{if(d||k||(navigator&&navigator.userAgent.indexOf("Safari")!=-1)){if(this._scrolltimer!=null){clearTimeout(this._scrolltimer)}this._scrolltimer=setTimeout(function(){l()},5)}else{l()}}}}else{if(this.scrollmode=="deferred"&&(this.hScrollInstance.isScrolling()||this.vScrollInstance.isScrolling())){if(this._scrolltimer!=null){clearInterval(this._scrolltimer)}var g=this._getfirstvisualrow();if(g!=null){var r=function(B){if(g==null){return""}var A="";var y=o.deferreddatafields;if(y==null){if(o.columns.records.length>0){y=new Array();y.push(o.columns.records[0].displayfield)}}for(var x=0;x"}}A+="
      "+w+"
      ";return A};var i=this.scrollfeedback?this.scrollfeedback(g.bounddata):r(g.bounddata);if(i!=this._scrollelementcontent){this._scrollelement[0].innerHTML=i;this._scrollelementcontent=i}}this._scrollelement.css("visibility","visible");this._scrollelementoverlay.css("visibility","visible");this._scrollelement.css("margin-top",-this._scrollelement.height()/2);this._scrolltimer=setInterval(function(){if(!o.hScrollInstance.isScrolling()&&!o.vScrollInstance.isScrolling()){l();o._scrollelement.css("visibility","hidden");o._scrollelementoverlay.css("visibility","hidden");clearInterval(o._scrolltimer);if(g){o.ensurerowvisible(g.visibleindex)}}},100);return}if(navigator&&navigator.userAgent.indexOf("Chrome")==-1&&navigator.userAgent.indexOf("Safari")!=-1){this._updatedelay=1}if(this.touchDevice!=undefined&&this.touchDevice==true){this._updatedelay=5}var d=this._browser==undefined?this._isIE10():this._browser;if(d||k){this._updatedelay=5}if((d)&&this.hScrollInstance.isScrolling()){l();return}if(b.jqx.browser.mozilla&&this._updatedelay==0&&(this.vScrollInstance.isScrolling()||this.hScrollInstance.isScrolling())){this._updatedelay=0}var h=this.isTouchDevice();if(h){this._updatedelay=0}if(this.updatedelay!=null){this._updatedelay=this.updatedelay}if(this._updatedelay==0){l()}else{var j=this._jqxgridrendertimer;if(j!=null){clearTimeout(j)}if(this.vScrollInstance.isScrolling()||this.hScrollInstance.isScrolling()){if(this._updatedelay){j=setTimeout(function(){l()},this._updatedelay)}else{j=null;l()}this._jqxgridrendertimer=j}else{this._jqxgridrendertimer=j;l()}}}if(o.autorowheight&&!o.autoheight){if(this._pageviews.length>0){var n=this._gettableheight();var q=this._pageviews[0].height;if(q>n){if(this.pageable&&this.gotopage){q=this._pageviews[0].height;if(q<0){q=this._pageviews[0].height}}if(this.vScrollBar.css("visibility")!="visible"){this.vScrollBar.css("visibility","visible")}if(q<=n||this.autoheight){this.vScrollBar.css("visibility","hidden")}if(q-n>0){if(this.scrollmode!="deferred"){var s=q-n;var u=this.vScrollInstance.max;this.vScrollBar.jqxScrollBar({max:s});if(Math.round(s)!=Math.round(u)){var v=this.vScrollBar.jqxScrollBar("value");if(v>s){this.vScrollBar.jqxScrollBar({value:0})}}}}else{this.vScrollBar.jqxScrollBar({value:0,max:q})}}else{if(!this._loading){this.vScrollBar.css("visibility","hidden")}this.vScrollBar.jqxScrollBar({value:0})}this._arrange();if(this.virtualsizeinfo){this.virtualsizeinfo.virtualheight=q}}}},scrolling:function(){var e=this.vScrollInstance.isScrolling();var d=this.hScrollInstance.isScrolling();return{vertical:e,horizontal:d}},_renderhorizontalscroll:function(){var t=this.hScrollInstance;var u=t.value;if(this.hScrollBar.css("visibility")==="hidden"){t.value=0;u=0}var k=parseInt(u);if(this.table==null){return}var q=this.table[0].rows.length;var p=this.columnsrow;var r=this.groupable&&this.groups.length>0?this.groups.length:0;var l=this.columns.records.length-r;var f=this.columns.records;var n=this.dataview.rows.length==0;if(this.rtl){if(this.hScrollBar.css("visibility")!="hidden"){k=t.max-k}}if(n&&!this._haspinned){for(var w=0;w=0&&!m&&!this.editcell)||this.exporting){if(!l){return{start:0,end:k+o}}}var d=0;var i=-1;var g=k+o;var q=false;if(this.autorowheight){return{start:0,end:k+o}}if(!e){for(var h=0;h=f&&i==-1){i=h}if(d>p+f){g=h;break}}}g++;if(g>k+o){g=k+o}if(i==-1||q){i=0}return{start:i,end:g}},_getvirtualcolumnsindexes:function(e,n,i,m,d){var l=this.vScrollInstance.isScrolling()||this.hScrollInstance.isScrolling()||this._keydown;if(this.enableoptimization){if(this.rowdetails||this.rtl||(this.editcell&&l)||(this.width&&this.width.toString().indexOf("%")>=0&&!l&&!this.editcell)||this.exporting){return{start:0,end:i+m}}}if(this.rtl||this.editcell||this.exporting){return{start:0,end:i+m}}var f=0;var k=-1;var g=i+m;if(this.autorowheight){return{start:0,end:i+m}}if(!d){for(var h=0;h=e&&k==-1){k=h}if(f>n+e){g=h;break}}}g++;if(g>i+m){g=i+m}if(k==-1){k=0}return{start:k,end:g}},_getfirstvisualrow:function(){var e=this.vScrollInstance;var g=e.value;var f=parseInt(g);if(this._pagescache.length==0){this.dataview.updateview();this._loadrows()}if(this.vScrollBar[0].style.visibility!="visible"){f=0}if(!this.pageable){var d=this._findvisiblerow(f,this._pageviews);if(d==-1){return null}if(d!=this.dataview.pagenum){this.dataview.pagenum=d;this.dataview.updateview();this._loadrows()}else{if(!this._pagescache[this.dataview.pagenum]){this._loadrows()}}}var h=this._findvisiblerow(f,this._pagescache[this.dataview.pagenum]);var i=this._pagescache[this.dataview.pagenum];if(i&&i[0]){return i[h]}},_rendervisualrows:function(){if(!this.virtualsizeinfo){return}var ag=this.vScrollInstance;var t=this.hScrollInstance;var m=ag.value;var G=t.value;var r=parseInt(m);var o=parseInt(G);var C=this._gettableheight();var Q=this._hostwidth!=undefined?this._hostwidth:this.host.width();if(this.hScrollBar[0].style.visibility=="visible"){C+=29}if(this.scrollmode=="deferred"&&this._newmax!=0){if(r>this._newmax&&this._newmax!=null){r=this._newmax}}var ax=ag.isScrolling()||t.isScrolling()||this._keydown;var J=this.groupable&&this.groups.length>0;this.visiblerows=new Array();this.hittestinfo=new Array();if(this.editcell&&this.editrow==undefined){this._hidecelleditor(false)}if(this.editrow!=undefined){this._hideeditors()}if(this.virtualmode&&!this.pageable){this._pagescache=new Array()}if(this._pagescache.length==0){this.dataview.updateview();this._loadrows()}if(this.vScrollBar[0].style.visibility=="hidden"){r=0}if(!this.pageable){var S=this._findvisiblerow(r,this._pageviews);if(S==-1){this._clearvisualrows();this._renderemptyrow();this._updaterowdetailsvisibility()}if(S!=this.dataview.pagenum){this.dataview.pagenum=S;this.dataview.updateview();this._loadrows()}else{if(!this._pagescache[this.dataview.pagenum]){this._loadrows()}}}var az=this.groupable&&this.groups.length>0?this.groups.length:0;if(!this.columns.records){return}var v=this.columns.records.length-az;var am=this._findvisiblerow(r,this._pagescache[this.dataview.pagenum]);var T=this._pagescache[this.dataview.pagenum];var Z=am;if(Z<0){Z=0}var aq=0;var al=0;var X=0;var e=0;var ab=this.virtualsizeinfo.visiblerecords;var W=this.groupable?this.groups.length:0;var F=this.toTP("jqx-grid-cell")+" "+this.toTP("jqx-item");if(this.rtl){F+=" "+this.toTP("jqx-grid-cell-rtl")}if((this.autoheight||this.autorowheight)&&this.pageable){if(!this.groupable||(this.groupable&&this.groups.length===0)){ab=this.dataview.pagesize}}if(J){F=" "+this.toTP("jqx-grid-group-cell")}if(this.isTouchDevice()){F+=" "+this.toTP("jqx-touch")}if(this.autorowheight){F+=" jqx-grid-cell-wrap"}var V=this.rowsheight;if(this.cardview){V=this.cardheight}var M=Z;var ay=this._rendercell;var z=true;var u=this._getvisualcolumnsindexes(o,Q,az,v,J,true);var d=u.start;var ak=u.end;var x=this._getvirtualcolumnsindexes(o,Q,az,v,J);var O=x.start;var l=x.end;var ao=b.jqx.browser.msie&&b.jqx.browser.version<9;if((this.autoheight||this.pageable)&&this.autorowheight){if(this._pageviews[0]){this._oldpageviewheight=this._pageviews[0].height}}if(this.autorowheight){Z=0}if(Z>=0){this._updaterowdetailsvisibility();this._startboundindex=T!=null?T[Z].bounddata.boundindex:0;this._startvisibleindex=T!=null?T[Z].bounddata.visibleindex:0;var E=this.table[0].rows;if(this.columns.records.length>10&&this.enablecolumnsvirtualization){var N=function(i){if(i&&i.parentNode&&i.parentNode.nodeName!="#document-fragment"){return true}return false};for(var ar=0;ar=this.source.totalrecords){an=null}if(an==null){Z=-q;if(this._pagescache[this.dataview.pagenum+1]){T=this._pagescache[this.dataview.pagenum+1];this.dataview.pagenum++}else{var w=this._pageviews.length;do{if(this.dataview.pagenum0){this.dataview.updateview();this._loadrows();T=this._pagescache[this.dataview.pagenum]}}else{T=undefined;break}}while(T==undefined&&this.dataview.pagenum';av+="";for(var ad=d;ad':"";av+='';av+='";av+='";av+=""}av+="
      '+ah.text+"
      '+ap+"
      ";av+=ac;av+="";H+=av}P+=';">'+H+"";n.innerHTML+=P;al++;continue}this.visiblerows[this.visiblerows.length]=an;this.hittestinfo[this.hittestinfo.length]={row:an,visualrow:n,details:false};if(af&&B){al++;var n=this.table[0].rows[al];this._renderrowdetails(F,n,an,az,v,al);this.visiblerows[this.visiblerows.length]=an;this.hittestinfo[this.hittestinfo.length]={row:an,visualrow:n,details:true}}if(!this.autorowheight){if(X+e>=C){break}}}else{var ai=true;this._clearvisualrow(o,J,al,az,v);if(X+aq+e<=C){aq+=V}}al++}this._horizontalvalue=o;if(aq>0){if(this.vScrollBar[0].style.visibility=="visible"){var aw=parseInt(this.table.css("top"));var L=this._pageviews[this._pageviews.length-1];var A=ag.max;var K=L.top+L.height-C;if(this.hScrollBar.css("visibility")=="visible"){K+=this.scrollbarsize+22}if(A!=K&&!this.autorowheight){if(K>=0){if(this.scrollmode!="deferred"){ag.max=K;ag.setPosition(ag.max)}else{if(this._newmax!=K){this._newmax=K;this._rendervisualrows()}}}}}}}if((this.autoheight||this.pageable)&&this.autorowheight){this._pagescache=new Array();var ae=0;var j=0;for(var ar=0;ar=0){f=parseInt(f)+4;if(U.firstChild){if(U.firstChild.className.indexOf("jqx-grid-groups-row")==-1){if(ah.columntype!="checkbox"&&ah.columntype!="button"){if(this.editable&&this.editcell&&this.editcell.column==ah.datafield&&this.editcell.row==this.getboundindex(D)){continue}U.firstChild.style.marginTop=f+"px"}}}}}}}}if(this._pageviews[0]){this._pageviews[0].height=j}this._arrange()}this._renderemptyrow();if(this.toCompile&&this.toCompile.length>0){var aa=this;b.each(aa.toCompile,function(s,y){if(this.compiled){return true}var i=this.cell;if(!i){return true}if(b.jqx.angularCompile){b.jqx.angularCompile(i,"
      "+this.value+"
      ")}this.compiled=true})}},_hideemptyrow:function(){if(!this.showemptyrow){return}if(!this.table){return}if(!this.table[0].rows){return}var f=this.table[0].rows[0];if(!f){return}var g=false;for(var e=0;e0&&this.table[0].rows&&this.table[0].rows.length>0){var k=this.table[0].rows[0];this.table[0].style.top="0px";for(var f=0;f");g.text(this.gridlocalization.emptydatastring);d.append(g);var j=0;if(!this.oldhscroll){j=parseInt(this.table[0].style.marginLeft);if(this.rtl){d.css("z-index",999);d.css("overflow","visible")}}g.css("left",-j-(g.width()/2));g.css("top",this._gettableheight()/2-g.height()/2);if(b.jqx.browser.msie&&b.jqx.browser.version<8){g.css("margin-left","0px");g.css("left",this.host.width()/2-g.width()/2)}var h=Math.abs(parseInt(this.table[0].style.top));if(isNaN(h)){h=0}b(k).height(this._gettableheight()+h);d.css("margin-left","0px");d.width(this.host.width());if(this.table.width()0;if(!this.columns.records){return}for(var h=0;h0){e=this.dataview.pagesize*this.dataview.pagenum}}if(this.groups.length>0&&this.pageable&&this.groupable){var d=this.getrowboundindexbyid(i.bounddata.uid);if(d!=-1){for(var h in this.selectedcells){if(h==d+"_"+g){f=true}}return f}return false}if(j&&i.bounddata!=null){if(this.selectionmode!="singlerow"){if(this.dataview.filters.length>0){if(!this.virtualmode&&i.bounddata.dataindex!=undefined){for(var h in this.selectedcells){if(h==e+i.bounddata.dataindex+"_"+g){f=true}}}else{for(var h in this.selectedcells){if(h==e+i.bounddata.boundindex+"_"+g){f=true}}}}else{for(var h in this.selectedcells){if(h==e+i.bounddata.boundindex+"_"+g){f=true;break}}}}else{if(this.dataview.filters.length>0){if(!this.virtualmode&&i.bounddata.dataindex!=undefined){for(var h in this.selectedcells){if(h==e+i.bounddata.dataindex+"_"+g){f=true;break}}}else{for(var h in this.selectedcells){if(h==e+i.bounddata.boundindex+"_"+g){f=true;break}}}}else{for(var h in this.selectedcells){if(h==e+i.bounddata.boundindex==this.selectedrowindex){f=true;break}}}}}return f},_isrowselected:function(h,g){var f=false;var e=0;if(this.virtualmode&&this.pageable&&this.groupable){if(this.groups.length>0){e=this.dataview.pagesize*this.dataview.pagenum}}if(this.groupable&&this.groups.length>0&&this.pageable){var d=this.getrowboundindexbyid(g.bounddata.uid);if(d==undefined||d==-1){return false}if(this.selectedrowindexes.indexOf(d)!=-1){f=true}if(!f){f=d==this.selectedrowindex&&this.selectedrowindex!=-1}return f}if(h&&g.bounddata!=null){if(this.selectionmode!="singlerow"){if(this.dataview.filters.length>0){if(!this.virtualmode&&g.bounddata.dataindex!=undefined){if(this.selectedrowindexes.indexOf(e+g.bounddata.dataindex)!=-1){f=true}}else{if(this.selectedrowindexes.indexOf(e+g.bounddata.boundindex)!=-1){f=true}}}else{if(this.selectedrowindexes.indexOf(e+g.bounddata.boundindex)!=-1){f=true}}}else{if(this.dataview.filters.length>0){if(!this.virtualmode&&g.bounddata.dataindex!=undefined){if(this.selectedrowindexes.indexOf(e+g.bounddata.dataindex)!=-1){f=true}}else{if(this.selectedrowindexes.indexOf(e+g.bounddata.boundindex)!=-1){f=true}}}else{if(e+g.bounddata.boundindex==this.selectedrowindex){f=true}}}}return f},_rendervisualcell:function(E,k,t,n,y,C,l,u,d,j,x,r){var f=null;var g=this.columns.records[j];if(g.hidden||g.adaptivehidden){var e=u.cells[j];e.innerHTML="";return}var p=this._getcellvalue(g,d);var e=u.cells[j];var B=k;if(this.selectionmode.indexOf("cell")!=-1){if(this.dataview.filters.length>0){if(this.selectedcells[d.bounddata.dataindex+"_"+g.datafield]){t=true}else{t=false}}else{if(this.selectedcells[d.boundindex+"_"+g.datafield]){t=true}else{t=false}}if(this.editcell){if(this.editcell.row===d.boundindex&&this.editcell.column===g.datafield){if(g.columntype!=="checkbox"){t=false}}}if(this.virtualmode||(this.groupable&&this.groups.length>0&&this.pageable)){t=this._iscellselected(true,d,g.datafield)}}if(g.cellclassname!=""&&g.cellclassname){if(typeof g.cellclassname=="string"){B+=" "+g.cellclassname}else{if(!this._columnClassNameCache){this._columnClassNameCache=[]}var i=this.getboundindex(d);if(this._columnClassNameCache[i+"_"+g.datafield+"_"+p]!==undefined&&this.enableoptimization){var q=this._columnClassNameCache[i+"_"+g.datafield+"_"+p];if(q){B+=" "+q}}else{var q=g.cellclassname(i,g.datafield,p,d.bounddata);if(q){B+=" "+q}this._columnClassNameCache[i+"_"+g.datafield+"_"+p]=q}}}var s=this.showsortcolumnbackground&&this.sortcolumn&&g.displayfield==this.sortcolumn;if(this.sortmode==="many"&&this.showsortcolumnbackground){var h=this.getsortcolumns();for(var w=0;w=this.altstart){if((this.altstart+D)%(1+this.altstep)==0){if(!s){B+=" "+this.toTP("jqx-grid-cell-alt")}else{B+=" "+this.toTP("jqx-grid-cell-sort-alt")}if(g.filter&&this.showfiltercolumnbackground){B+=" "+this.toTP("jqx-grid-cell-filter-alt")}if(g.pinned&&this.showpinnedcolumnbackground){B+=" "+this.toTP("jqx-grid-cell-pinned-alt")}}}}if(j<=l){if(C||this.rowdetails||(this.pageable&&this.virtualmode)){var z=b(e);var o=this.columns.records[j].width;if(e.style.width!=parseInt(o)+"px"){z.width(o)}}}else{if(C||this.rowdetails){if(this._hiddencolumns){var z=b(e);var o=this.columns.records[j].width;if(parseInt(e.style.width)!=o){z.width(o)}}}}var A=true;if(this.rowdetails&&n){if(y&&!C){B+=" "+this.toTP("jqx-grid-details-cell")}else{if(C){B+=" "+this.toTP("jqx-grid-group-details-cell")}}if(this.showrowdetailscolumn){if(!this.rtl){if(d.group==undefined&&j==l&&!d.bounddata.totalsrow){var v=this.toThemeProperty("jqx-icon-arrow-down");if(y){B+=" "+this.toTP("jqx-grid-group-expand");B+=" "+v}else{B+=" "+this.toTP("jqx-grid-group-collapse");var v=this.toThemeProperty("jqx-icon-arrow-right");B+=" "+v}A=false;e.title="";e.innerHTML="";if(e.className!=B){e.className=B}return}}else{if(d.group==undefined&&j==u.cells.length-l-1){var v=this.toThemeProperty("jqx-icon-arrow-down");if(y){B+=" "+this.toTP("jqx-grid-group-expand-rtl");B+=" "+v}else{B+=" "+this.toTP("jqx-grid-group-collapse-rtl");var v=this.toThemeProperty("jqx-icon-arrow-left");B+=" "+v}A=false;e.title="";e.innerHTML="";if(e.className!=B){e.className=B}return}}}}if(t&&A&&j>=l){B+=" "+this.toTP("jqx-grid-cell-selected");B+=" "+this.toTP("jqx-fill-state-pressed")}if(e.className!=B){e.className=B}g._applyCellStyle(e);if(d.group!=undefined){p="";e.title="";e.innerHTML="";return}E(this,g,d,p,e,r)},_rendercell:function(w,f,k,u,d,s){var g=u+"_"+f.visibleindex;if(f.columntype=="number"||f.cellsrenderer!=null){var g=k.uniqueid+"_"+f.visibleindex}if(f.columntype=="number"){u=k.visibleindex}if(f.columntype==="adaptive"){u="..."}f._applyCellStyle(d);if(w.showrowlines){d.style.borderBottomColor=""}else{d.style.borderBottomColor="transparent"}if(w.showcolumnheaderlines){f.element.style.borderRightColor="";f.element.style.boxShadow=""}else{f.element.style.borderRightColor="transparent";f.element.style.boxShadow="none"}if(w.showcolumnlines){d.style.borderRightColor=""}else{d.style.borderRightColor="transparent"}if(w.editcell&&w.editrow==undefined){if(w.editmode=="selectedrow"&&f.editable&&w.editable){if(w.editcell.row==w.getboundindex(k)){if(w._showcelleditor){if(!w.hScrollInstance.isScrolling()&&!w.vScrollInstance.isScrolling()){w._showcelleditor(w.editcell.row,f,d,w.editcell.init)}else{w._showcelleditor(w.editcell.row,f,d,false,false)}d.className+=" "+w.toTP("jqx-grid-cell-edit");return}}}else{if(w.editcell.row==w.getboundindex(k)&&w.editcell.column==f.datafield){w.editcell.element=d;if(w.editcell.editing){if(w._showcelleditor){if(!w.hScrollInstance.isScrolling()&&!w.vScrollInstance.isScrolling()){w._showcelleditor(w.editcell.row,f,w.editcell.element,w.editcell.init)}else{w._showcelleditor(w.editcell.row,f,w.editcell.element,w.editcell.init,false)}d.className+=" "+w.toTP("jqx-grid-cell-edit");return}}}}}var t=w._defaultcellsrenderer(u,f);var p=w._cellscache[g];if(p){if(f.columntype=="checkbox"){if(w.host.jqxCheckBox){if(u===""){u=null}var o=d.innerHTML.toString().length==0;if(d.checkbox&&!w.groupable&&!o){d.checkboxrow=w.getboundindex(k);if(u==""){u=false}if(u=="1"){u=true}if(u=="0"){u=false}if(u==1){u=true}if(u==0){u=false}if(u=="true"){u=true}if(u=="false"){u=false}if(u==null&&!f.threestatecheckbox){u=false}if(f.checkboxcolumn){u=false;if(w.dataview.filters.length>0&&!w.virtualmode&&k.bounddata.dataindex!=undefined){if(w.selectedrowindexes.indexOf(k.bounddata.dataindex)!=-1){u=true}}else{if(w.selectedrowindexes.indexOf(k.bounddata.boundindex)!=-1){u=true}}}if(!w.disabled){if(d.checkboxinstance){d.checkboxinstance._setState(u)}else{d.checkbox.jqxCheckBox("_setState",u)}}}else{w._rendercheckboxcell(w,d,f,k,u)}if(f.cellsrenderer!=null){var h=f.cellsrenderer(w.getboundindex(k),f.datafield,u,t,f.getcolumnproperties(),k.bounddata);if(h!=undefined){d.innerHTML=h}}return}}else{if(f.columntype=="button"){if(w.host.jqxButton){if(u==""){u=false}if(f.cellsrenderer!=null){u=f.cellsrenderer(w.getboundindex(k),f.datafield,u,t,f.getcolumnproperties(),k.bounddata)}if(d.innerHTML==""){d.buttonrow=w.getboundindex(k);d.button=null;w._renderbuttoncell(w,d,f,k,u)}if(d.button&&!w.groupable){d.buttonrow=w.getboundindex(k);d.button.val(u)}else{w._renderbuttoncell(w,d,f,k,u)}return}}else{if(f.columntype=="progressbar"||f.columntype==="rating"){if(w.host.jqxButton){if(u==""){u=false}if(f.cellsrenderer!=null){u=f.cellsrenderer(w.getboundindex(k),f.datafield,u,t,f.getcolumnproperties(),k.bounddata)}if(d.innerHTML==""){d.progressrow=w.getboundindex(k);d.progress=null;w._renderprogresscell(w,d,f,k,u)}if(d.progress&&!w.groupable){d.progressrow=w.getboundindex(k);d.progress.val(u)}else{w._renderprogresscell(w,d,f,k,u)}return}}}}if(f.createwidget){if(d.innerHTML==""){d.widgetrow=w.getboundindex(k);d.widget=null;f.widget=null;w._renderwidgetcell(w,d,f,k,u)}if(d.widget&&!w.groupable){d.widgetrow=w.getboundindex(k);if(f.initwidget){f.initwidget(w.getboundindex(k),f.datafield,u,d.firstChild)}else{throw new Error("jqxGrid: 'initwidget' column function is not implemented. Please, implement 'initwidget'")}}else{w._renderwidgetcell(w,d,f,k,u)}return}var v=p.element;if(f.cellsrenderer!=null||(d.childNodes&&d.childNodes.length==0)||w.groupable||w.rowdetails){if(d.innerHTML!=v){d.innerHTML=v}}else{if(d.innerHTML.indexOf("editor")>=0){d.innerHTML=v}else{if(s){var q=v.indexOf(">");var n=v.indexOf("")>=0){d.innerHTML=v}else{if(i.childNodes[0]){if(r!=i.childNodes[0].nodeValue){if(r.indexOf("&")>=0){d.innerHTML=v}else{i.childNodes[0].nodeValue=r}}}else{var e=document.createTextNode(r);i.appendChild(e)}}}else{if(d.innerHTML!=v){d.innerHTML=v}}}}if(w.enabletooltips&&f.enabletooltips){d.title=p.title}return}if(f.columntype=="checkbox"){w._rendercheckboxcell(w,d,f,k,u);w._cellscache[g]={element:"",title:u};if(w.enabletooltips&&f.enabletooltips){d.title=""+u}return}else{if(f.columntype=="button"){if(f.cellsrenderer!=null){u=f.cellsrenderer(w.getboundindex(k),f.datafield,u,t,f.getcolumnproperties(),k.bounddata)}w._renderbuttoncell(w,d,f,k,u);w._cellscache[g]={element:"",title:u};if(w.enabletooltips&&f.enabletooltips){d.title=""+u}return}else{if(f.columntype=="progressbar"||f.columntype==="rating"){if(f.cellsrenderer!=null){u=f.cellsrenderer(w.getboundindex(k),f.datafield,u,t,f.getcolumnproperties(),k.bounddata)}w._renderprogresscell(w,d,f,k,u);w._cellscache[g]={element:"",title:u};if(w.enabletooltips&&f.enabletooltips){d.title=""+u}return}else{if(f.columntype=="number"){u=k.visibleindex}}}}if(f.createwidget){if(f.cellsrenderer!=null){u=f.cellsrenderer(w.getboundindex(k),f.datafield,u,t,f.getcolumnproperties(),k.bounddata)}w._renderwidgetcell(w,d,f,k,u);w._cellscache[g]={element:"",title:u};if(w.enabletooltips&&f.enabletooltips){d.title=u}return}var v=null;if(f.cellsrenderer!=null){if(!w._columnCellsRenderCache){w._columnCellsRenderCache=[]}var l=w.getboundindex(k);if(w._columnCellsRenderCache[l+"_"+f.datafield+"_"+u]!==undefined&&w.enableoptimization){v=w._columnCellsRenderCache[l+"_"+f.datafield+"_"+u]}else{v=f.cellsrenderer(w.getboundindex(k),f.datafield,u,t,f.getcolumnproperties(),k.bounddata);w._columnCellsRenderCache[l+"_"+f.datafield+"_"+u]=v}if(v&&(v.indexOf("=0||v.indexOf(" ng-")>=0)){if(w.toCompile){w.toCompile.push({cell:d,value:v,row:w.getboundindex(k)})}return}}else{v=t}if(v==null){v=t}var m=u;if(w.enabletooltips&&f.enabletooltips){if(f.cellsformat!=""){if(b.jqx.dataFormat){if(b.jqx.dataFormat.isDate(u)){m=b.jqx.dataFormat.formatdate(m,f.cellsformat,w.gridlocalization)}else{if(b.jqx.dataFormat.isNumber(u)){m=b.jqx.dataFormat.formatnumber(m,f.cellsformat,w.gridlocalization)}}}}d.title=m}if(w.WinJS){b(d).html(v)}else{var j=d.innerHTML;if(j.indexOf("editor")>=0||f.cellsrenderer!=null||w.groupable||w.virtualmode){d.innerHTML=v}else{if(j.length>0){var q=v.indexOf(">");var n=v.indexOf("")>=0){d.innerHTML=v}else{if(i.childNodes[0]){if(r!=i.childNodes[0].nodeValue){if(r.indexOf("&")>=0||j.indexOf("span")>=0){d.innerHTML=v}else{i.childNodes[0].nodeValue=r}}}else{var e=document.createTextNode(r);i.appendChild(e)}}}else{if(j!=v){d.innerHTML=v}}}}w._cellscache[g]={element:d.innerHTML,title:m};return true},_isIE10:function(){if(this._browser==undefined){var e=b.jqx.utilities.getBrowser();if(e.browser=="msie"&&parseInt(e.version)>9){this._browser=true}else{this._browser=false;if(e.browser=="msie"){var d="Browser CodeName: "+navigator.appCodeName+"";d+="Browser Name: "+navigator.appName+"";d+="Browser Version: "+navigator.appVersion+"";d+="Platform: "+navigator.platform+"";d+="User-agent header: "+navigator.userAgent+"";if(d.indexOf("Zune 4.7")!=-1){this._browser=true}}}}return this._browser},_renderinlinecell:function(f,d,e,i,g){var h=b(d);d.innerHTML='
      '},_rendercheckboxcell:function(g,e,f,k,h){if(g.host.jqxCheckBox){var j=b(e);if(h===""){if(f.threestatecheckbox){h=null}else{h=false}}if(h===null&&!f.threestatecheckbox){h=false}if(h=="1"){h=true}if(h=="0"){h=false}if(h==1){h=true}if(h==0){h=false}if(h=="true"){h=true}if(h=="false"){h=false}if(f.checkboxcolumn){h=false;var d=this.getboundindex(k);if(this.selectedrowindexes.indexOf(d)!=-1){h=true}}if(j.find(".jqx-checkbox").length==0){e.innerHTML='
      ';b(e.firstChild).jqxCheckBox({disabled:g.disabled,_canFocus:false,hasInput:false,hasThreeStates:f.threestatecheckbox,enableContainerClick:false,animationShowDelay:0,animationHideDelay:0,locked:true,theme:g.theme,checked:h});if(this.enabletooltips&&f.enabletooltips){e.title=""+h}if(this.editable&&f.editable){b(e.firstChild).jqxCheckBox({locked:false})}if(f.checkboxcolumn){b(e.firstChild).jqxCheckBox({locked:false})}e.checkbox=b(e.firstChild);e.checkboxinstance=e.checkbox.data().jqxCheckBox.instance;e.checkboxrow=this.getboundindex(k);var i=b.data(e.firstChild,"jqxCheckBox").instance;i.updated=function(l,s,m){if(g.disabled){s=m;var p=g.table[0].rows.length;var r=g._getcolumnindex(f.datafield);for(var o=0;o=f+1){m+=''}else{m+=''}}var g=e.cellsalign;if(g==="right"){g="flex-end"}d.innerHTML='
      '+m+"
      ";return}if(k==""){k=false}if(l.find(".jqx-progress").length==0){d.innerHTML='';b(d.firstChild).val(k);d.progress=b(d.firstChild);d.progressrow=h.getboundindex(n)}else{d.progressrow=h.getboundindex(n);b(d.firstChild).val(k)}},_renderbuttoncell:function(h,e,g,k,i){if(h.host.jqxButton){var j=b(e);if(i==""){i=false}if(j.find(".jqx-button").length==0){e.innerHTML='';b(e.firstChild).val(i);b(e.firstChild).attr("hideFocus","true");b(e.firstChild).jqxButton({disabled:h.disabled,theme:h.theme,height:h.rowsheight-4,width:g.width-4});e.button=b(e.firstChild);e.buttonrow=h.getboundindex(k);var d=this.isTouchDevice();if(d){var f=b.jqx.mobile.getTouchEventName("touchend");h.addHandler(b(e.firstChild),f,function(l){if(g.buttonclick){g.buttonclick(e.buttonrow,l)}})}else{h.addHandler(b(e.firstChild),"click",function(l){if(g.buttonclick){g.buttonclick(e.buttonrow,l)}})}}else{e.buttonrow=h.getboundindex(k);b(e.firstChild).val(i)}}},_clearvisualrow:function(g,f,p,i,n){var m=this.toTP("jqx-grid-cell");if(f){m=" "+this.toTP("jqx-grid-group-cell")}m+=" "+this.toTP("jqx-grid-cleared-cell");var q=this.table[0].rows;for(var k=0;kd.maxwidth){l=d.maxwidth}if(parseInt(e.style.width)!=l){if(l!="auto"){b(e)[0].style.width=l+"px"}else{b(e)[0].style.width=l}}if(e.title!=""){e.title=""}if(e.innerHTML!=""){e.innerHTML=""}}}if(q[p]){var o=this.rowsheight;if(this.cardview){o=this.cardheight}if(parseInt(q[p].style.height)!=o){q[p].style.height=parseInt(o)+"px"}}},_findgroupstate:function(e){var d=this._findgroup(e);if(d==null){return false}return d.expanded},_findgroup:function(e){var d=null;if(this.expandedgroups[e]){return this.expandedgroups[e]}return d},_clearcaches:function(){this._columnsbydatafield=new Array();this._pagescache=new Array();this._pageviews=new Array();this._cellscache=new Array();this._columnClassNameCache=new Array();this._columnCellsRenderCache=new Array();this.heights=new Array();this.hiddens=new Array();this.hiddenboundrows=new Array();this.heightboundrows=new Array();this.detailboundrows=new Array();this.details=new Array();this.expandedgroups=new Array();this._rowdetailscache=new Array();this._rowdetailselementscache=new Array();if(b.jqx.dataFormat){b.jqx.dataFormat.cleardatescache()}this.tableheight=null},_getColumnText:function(d){if(this._columnsbydatafield==undefined){this._columnsbydatafield=new Array()}if(this._columnsbydatafield[d]){return this._columnsbydatafield[d]}var f=d;var e=null;b.each(this.columns.records,function(){if(this.datafield==d||this.displayfield==d){f=this.text;e=this;return false}});this._columnsbydatafield[d]={label:f,column:e};return this._columnsbydatafield[d]},_getcolumnbydatafield:function(d){if(this.__columnsbydatafield==undefined){this.__columnsbydatafield=new Array()}if(this.__columnsbydatafield[d]){return this.__columnsbydatafield[d]}var f=d;var e=null;b.each(this.columns.records,function(){if(this.datafield==d||this.displayfield==d){f=this.text;e=this;return false}});this.__columnsbydatafield[d]=e;return this.__columnsbydatafield[d]},isscrollingvertically:function(){var d=(this.vScrollBar.jqxScrollBar("isScrolling"));return d},_renderrowdetails:function(q,y,d,x,n,A){if(y==undefined){return}var E=b(y);var g=0;var t=this.rowdetails&&this.showrowdetailscolumn?(1+this.groups.length)*this.groupindentwidth:(this.groups.length)*this.groupindentwidth;if(this.groupable&&this.groups.length>0){for(var r=0;r<=n;r++){var e=b(y.cells[r]);e[0].innerHTML="";e[0].className="jqx-grid-details-cell"}}var e=b(y.cells[g]);if(e[0].style.display=="none"){var o=y.cells[g];var B=2;var l=g;while(o!=undefined&&o.style.display=="none"&&B<10){o=y.cells[l+B-1];B++}e=b(o)}if(this.rtl){for(var v=x;v'+d.rowdetails+"";if(this.rtl){var h='
      '+d.rowdetails+"
      "}this._rowdetailscache[j]={id:y.id,html:h};if(this.initrowdetails){var f=b(h)[0];b(this.gridcontent).prepend(b(f));b(f).css("position","absolute");b(f).width(this.host.width()-t);b(f).height(e.height());var i=e.coord();b(f).css("z-index",1799);if(this.isTouchDevice()){b(f).css("z-index",1999)}b(f).addClass(this.toThemeProperty("jqx-widget-content"));var i=e.coord();var z=this.gridcontent.coord();var w=parseInt(i.top)-parseInt(z.top);var k=parseInt(i.left)-parseInt(z.left);b(f).css("top",w);b(f).css("left",k);this.content[0].scrollTop=0;this.content[0].scrollLeft=0;var D=b(b(f).children()[0]);if(D[0].id!=""){D[0].id=D[0].id+p}this.initrowdetails(p,f,this.element,this.getrowdata(p));this._rowdetailscache[j].element=f;this._rowdetailselementscache[p]=f}else{e[0].innerHTML=h}},_defaultcellsrenderer:function(f,d){if(d.cellsformat!=""){if(b.jqx.dataFormat){if(b.jqx.dataFormat.isDate(f)){f=b.jqx.dataFormat.formatdate(f,d.cellsformat,this.gridlocalization)}else{if(b.jqx.dataFormat.isNumber(f)){f=b.jqx.dataFormat.formatnumber(f,d.cellsformat,this.gridlocalization)}}}}var e="8px";if(this.rowsheight!=31){e=(this.rowsheight/2-this._cellheight/2);if(e<0){e=4}e+="px"}if(this.enableellipsis){if(d.cellsalign=="center"||d.cellsalign=="middle"){return'
      '+f+"
      "}if(d.cellsalign=="left"){return'
      '+f+"
      "}if(d.cellsalign=="right"){return'
      '+f+"
      "}}if(d.cellsalign=="center"||d.cellsalign=="middle"){return'
      '+f+"
      "}return''+f+""},getcelltext:function(g,e){if(g==null||e==null){return null}var d=this.getcellvalue(g,e);var f=this.getcolumn(e);if(f&&f.cellsformat!=""){if(b.jqx.dataFormat){if(b.jqx.dataFormat.isDate(d)){d=b.jqx.dataFormat.formatdate(d,f.cellsformat,this.gridlocalization)}else{if(b.jqx.dataFormat.isNumber(d)){d=b.jqx.dataFormat.formatnumber(d,f.cellsformat,this.gridlocalization)}}}}return d},getcelltextbyid:function(g,e){if(g==null||e==null){return null}var d=this.getcellvaluebyid(g,e);var f=this.getcolumn(e);if(f&&f.cellsformat!=""){if(b.jqx.dataFormat){if(b.jqx.dataFormat.isDate(d)){d=b.jqx.dataFormat.formatdate(d,f.cellsformat,this.gridlocalization)}else{if(b.jqx.dataFormat.isNumber(d)){d=b.jqx.dataFormat.formatnumber(d,f.cellsformat,this.gridlocalization)}}}}return d},_getcellvalue:function(d,f){var e=null;e=f.bounddata[d.datafield];if(d.displayfield!=null){e=f.bounddata[d.displayfield]}if(e==null){e=""}return e},getcell:function(h,d){if(h==null||d==null){return null}var e=parseInt(h);var g=h;var f="";if(!isNaN(e)){g=this.getrowdata(e)}if(g!=null){f=g[d]}return this._getcellresult(f,h,d)},getrenderedcell:function(h,d){if(h==null||d==null){return null}var e=parseInt(h);var g=h;var f="";if(!isNaN(e)){g=this.getrenderedrowdata(e)}if(g!=null){f=g[d]}return this._getcellresult(f,h,d)},_getcellresult:function(k,n,e){var f=this.getcolumn(e);if(f==null||f==undefined){return null}var i=f.getcolumnproperties();var g=i.hidden;var d=i.width;var m=i.pinned;var h=i.cellsalign;var j=i.cellsformat;var l=this.getrowheight(n);if(l==false){return null}return{value:k,row:n,column:e,datafield:e,width:d,height:l,hidden:g,pinned:m,align:h,format:j}},setcellvaluebyid:function(i,d,h,f,g){var e=this.getrowboundindexbyid(i);return this.setcellvalue(e,d,h,f,g)},getcellvaluebyid:function(f,d){var e=this.getrowboundindexbyid(f);return this.getcellvalue(e,d)},setcellvalue:function(o,F,H,Q,j){if(o==null||F==null){return false}var h=parseInt(o);var t=h;this._columnClassNameCache=[];var C=o;if(!isNaN(h)){C=this.getrowdata(h)}var N=false;if(this.filterable&&this._initfilterpanel&&this.dataview.filters.length){N=true}if(this.virtualmode){this._pagescache=new Array()}if(this.sortcache){this.sortcache={}}var q="";var d="";if(C!=null&&C[F]!==H){if(C[F]===null&&H===""){return}var I=this._getcolumnbydatafield(F);var R="string";if(!this.source){this.source=new b.jqx.dataAdapter({})}var v=this.source.datafields||((this.source._source)?this.source._source.datafields:null);if(v){var D="";b.each(v,function(){if(this.name==I.displayfield){if(this.type){D=this.type}return false}});if(D){R=D}d=C[I.displayfield]}q=C[F];if(this.pushToHistory){this._undoRedoIndex=-1;this._undoRedo.push({action:"setcellvalue",data:{oldvalue:q,value:H,datafield:F,row:o}})}if(!I.nullable||(H!=null&&H!==""&&I.nullable&&H.label===undefined)){if(b.jqx.dataFormat.isNumber(q)||R=="number"||R=="float"||R=="int"||R=="decimal"&&R!="date"){if(this.gridlocalization&&this.gridlocalization.decimalseparator==","){if(H&&H.indexOf&&H.indexOf(",")>=0){H=H.replace(",",".")}}H=new Number(H);H=parseFloat(H);if(isNaN(H)){H=0}}else{if(b.jqx.dataFormat.isDate(q)||R=="date"){if(H!=""){var L=H;L=new Date(L);if(L!="Invalid Date"&&L!=null){H=L}else{if(L=="Invalid Date"){L=b.jqx.dataFormat.parsedate(H,I.cellsformat);H=L}}}}}if(C[F]===H){if(!this._updating&&Q!=false){this._renderrows(this.virtualsizeinfo)}return}}var A=this.source&&this.source._source.localdata&&this.source._source.localdata.name==="observableArray";C[F]=H;if(A){var P=this.source._source.localdata;if(!P._updating){P._updating=true;P[o][F]=H;P._updating=false}}var l=this.getrenderedrowdata(h,true);if(!l){return}l[F]=H;if(H!=null&&H.label!=null){var I=this._getcolumnbydatafield(F);C[I.displayfield]=H.label;l[I.displayfield]=H.label;C[F]=H.value;l[F]=H.value;if(A&&!P._updating){P._updating=true;P[o][F]=H.value;P[o][I.displayfield]=H.label;P._updating=false}}if(N){if(C.dataindex!=undefined){t=C.dataindex;this.dataview.cachedrecords[C.dataindex][F]=H;if(H!=null&&H.label!=undefined){this.dataview.cachedrecords[C.dataindex][F]=H.value;this.dataview.cachedrecords[C.dataindex][I.displayfield]=H.label}}}}else{if(!this._updating&&Q!=false){this._renderrows(this.virtualsizeinfo)}return false}if(this.source&&this.source._knockoutdatasource&&!this._updateFromAdapter&&this.autokoupdates){if(this.source._source._localdata){var E=h;if(N){if(C.dataindex!=undefined){E=C.dataindex}}var g=this.source._source._localdata()[E];this.source.suspendKO=true;var G=g;if(G[F]&&G[F].subscribe){if(H!=null&&H.label!=null){G[I.displayfield](H.label);G[F](H.value)}else{G[F](H)}}else{var v=this.source._source.datafields;var B=null;var x=null;if(v){b.each(v,function(){if(this.name==F){x=this.map;return false}})}if(x==null){if(H!=null&&H.label!=null){G[F]=H.value;G[I.displayfield]=H.label}else{G[F]=H}}else{var f=x.split(this.source.mapChar);if(f.length>0){var n=G;for(var M=0;M0;if(N&&!u){if(this.autoheight||this.autorowheight){this.prerenderrequired=true}this.dataview.refresh();this.rendergridcontent(true,false);e();this._renderrows(this.virtualsizeinfo)}else{if(this.sortcolumn&&!u){if(this.autoheight||this.autorowheight){this.prerenderrequired=true}this.dataview.reloaddata();this.rendergridcontent(true,false);e();this._renderrows(this.virtualsizeinfo)}else{if(this.groupable&&this.groups.length>0){if(this.autoheight||this.autorowheight){this.prerenderrequired=true}if(this.pageable){if(this.groups.indexOf(F)!=-1){this._pagescache=new Array();this._cellscache=new Array();this.dataview.refresh();this._render(true,true,false,false)}else{this._pagescache=new Array();this._cellscache=new Array();this.dataview.updateview();this._renderrows(this.virtualsizeinfo)}}else{this._pagescache=new Array();this._cellscache=new Array();this.dataview.updateview();this._renderrows(this.virtualsizeinfo)}}else{this.dataview.updateview();this._renderrows(this.virtualsizeinfo)}}}}this.vScrollInstance.setPosition(K);if(this.showaggregates&&this._updatecolumnsaggregates){this._updatecolumnsaggregates()}if(this.showfilterrow&&this.filterable&&this.filterrow){var y=this.getcolumn(F).filtertype;if(y=="list"||y=="checkedlist"){this._updatelistfilters(true)}}this._raiseEvent(19,{rowindex:o,datafield:F,newvalue:H,value:H,oldvalue:q});return true},getcellvalue:function(h,d){if(h==null||d==null){return null}var e=parseInt(h);var g=h;if(!isNaN(e)){g=this.getrowdata(e)}if(g!=null){var f=g[d];return f}return null},getrows:function(){var h=this.dataview.records.length;if(this.virtualmode){var j=new Array();for(var e=0;ethis.source._source.totalrecords-g){return j.slice(0,this.source._source.totalrecords-g)}return j}if(this.dataview.sortdata){var j=new Array();for(var e=0;e=0){if(this.groupable&&this.groups.length>0){var e=this.dataview.loadedrecords[g]}else{var e=this.dataview.loadedrecords[g];if(this.pageable&&(f==undefined||f==false)){var e=this.dataview.loadedrecords[this.dataview.pagesize*this.dataview.pagenum+d]}}return e}return null},getboundrows:function(){return this.dataview.cachedrecords},getrowdisplayindex:function(d){var f=this.getdisplayrows();for(var e=0;e0&&this.pageable){if(e.bounddata){d=this.getrowboundindexbyid(e.bounddata.uid)}}if(this.dataview.filters.length>0){if(e.bounddata){if(e.bounddata.dataindex!==undefined){d=e.bounddata.dataindex}}else{if(e.dataindex!==undefined){d=e.dataindex}}}return d},getrowboundindex:function(d){var e=this.getdisplayrows()[d];if(e){if(e.dataindex!==undefined){return e.dataindex}return e.boundindex}return -1},getdisplayrows:function(){return this.dataview.loadedrecords},getloadedrows:function(){return this.getdisplayrows()},getvisiblerowdata:function(e){var d=this.getvisiblerows();if(d){return d[e]}return null},getloadedrowdata:function(e){var d=this.getloadedrows();if(d){return d[e]}return null},getvisiblerows:function(){if(this.virtualmode){return this.dataview.loadedrecords}if(this.pageable){var f=[];for(var e=0;e0;if(d>=0&&d0){var g=this.getrowvisibleindex(d);var f=this.dataview.loadedrecords[g]}else{var g=this.getrowvisibleindex(d);var f=this.dataview.loadedrecords[g]}if(f){return f.uid}}if(this.dataview.filters.length>0){var f=this.getboundrows()[d];if(f){if(f.uid!=null){return f.uid}}return null}}return null},_updateGridData:function(e){var d=false;if(this.filterable&&this._initfilterpanel&&this.dataview.filters.length){d=true}if(d){this.dataview.refresh();if(e=="updaterow"){this._render(true,true,false,false,false);this.invalidate()}else{this.render()}}else{if(this.sortcolumn||(this.groupable&&this.groups.length>0)){this.dataview.reloaddata();this.render()}else{if(e==="updaterow"){this.dataview.refresh();if(!this.virtualmode){this._render(true,true,false,false,false)}}this._cellscache=new Array();this._pagescache=new Array();this._renderrows(this.virtualsizeinfo)}}if(this.showfilterrow&&this.filterable&&this.filterrow){this._updatelistfilters(true)}},updaterow:function(d,l,g){if(d!=undefined&&l!=undefined){var i=this.that;var k=false;i._datachanged=true;this._columnClassNameCache=[];if(this.pushToHistory){var j=this.getrowdatabyid(d);this._undoRedoIndex=-1;this._undoRedo.push({action:"updaterow",data:{id:d,rowdata:l,oldrowdata:j}})}var e=function(r,m,v){if(r._loading){throw new Error("jqxGrid: "+r.loadingerrormessage);return false}var t=false;if(!b.isArray(m)){t=r.dataview.updaterow(m,v)}else{b.each(m,function(w,x){t=r.dataview.updaterow(this,v[w],false)});r._cellscache=new Array();r._pagescache=new Array();r.dataview.refresh()}var n=r.vScrollInstance.value;if(g==undefined||g==true){if(r._updating==undefined||r._updating==false){r._updateGridData("updaterow")}}if(r.showaggregates&&r._updatecolumnsaggregates){r._updatecolumnsaggregates()}if(r.source&&r.source._knockoutdatasource&&!r._updateFromAdapter&&r.autokoupdates){if(r.source._source._localdata){var o=r.dataview.recordsbyid["id"+m];var p=r.dataview.records.indexOf(o);var q=r.source._source._localdata()[p];r.source.suspendKO=true;r.source._source._localdata.replace(q,b.extend({},o));r.source.suspendKO=false}}var s=r.source&&r.source._source.localdata&&r.source._source.localdata.name==="observableArray";if(s){if(!r.source._source.localdata._updating){r.source._source.localdata._updating=true;var u=r.getrowboundindexbyid(m);r.source._source.localdata.set(u,v);r.source._source.localdata._updating=false}}r.vScrollInstance.setPosition(n);return t};if(this.source.updaterow){var f=function(m){if(m==true||m==undefined){e(i,d,l)}else{k=false}};try{k=this.source.updaterow(d,l,f);if(k==undefined){k=true}}catch(h){k=false}}else{k=e(i,d,l)}return k}return false},deleterow:function(d,k){if(d!=undefined){this._datachanged=true;var o=false;var m=this.that;var p=this.getrowboundindexbyid(d);var e=new Array();var j=new Array();if(p!=undefined){if(this.selectedrowindexes.indexOf(p)>=0){this.selectedrowindexes.splice(this.selectedrowindexes.indexOf(p),1)}if(this.selectedrowindex==p){this.selectedrowindex=-1}if(!this.virtualmode){if(m.selectionmode.indexOf("row")>=0){b.each(this.selectedrowindexes,function(){var q=m.getrowid(this);e.push(q)});this.selectedrowindexes=new Array();this.selectedrowindex=-1}else{if(m.selectionmode.indexOf("cell")>=0){for(var i in m.selectedcells){var n=m.selectedcells[i];var h=m.getrowid(n.rowindex);n.rowid=h}}}this._rendervisualrows()}}var f=function(w,r){if(w._loading){throw new Error("jqxGrid: "+w.loadingerrormessage);return false}var z=false;var t=w.vScrollInstance.value;if(!b.isArray(r)){var z=w.dataview.deleterow(r)}else{b.each(r,function(){z=w.dataview.deleterow(this,false)});w._cellscache=new Array();w._pagescache=new Array();w.dataview.refresh()}if(!w.virtualmode){if(w.selectionmode.indexOf("row")>=0){b.each(e,function(){var B=w.getrowboundindexbyid(this);if(B!=-1){w.selectrow(B,false)}})}else{var A=new Array();for(var v in w.selectedcells){var y=w.selectedcells[v];var u=y.rowid;var s=w.getrowboundindexbyid(u);if(s!=-1){y.rowindex=s;A[s+"_"+y.datafield]=y}}w.selectedcells=A}}if(w._updating==undefined||w._updating==false){if(k==undefined||k==true){setTimeout(function(){w._render(true,true,false,false);if(w.vScrollBar.css("visibility")!="visible"){w._arrange();w._updatecolumnwidths();w._updatecellwidths();w._renderrows(w.virtualsizeinfo)}})}}if(w.source&&w.source._knockoutdatasource&&!w._updateFromAdapter&&w.autokoupdates){if(w.source._source._localdata){w.source.suspendKO=true;w.source._source._localdata.pop();w.source.suspendKO=false}}var x=w.source&&w.source._source.localdata&&w.source._source.localdata.name==="observableArray";if(x){if(!w.source._source.localdata._updating){w.source._source.localdata._updating=true;w.source._source.localdata.splice(p,1);w.source._source.localdata._updating=false}}if(w.dataview.sortby&&w.sortmode!=="many"){var q=w.getsortinformation();if(q.sortcolumn){w.dataview.clearsortdata();w.dataview.sortby(q.sortcolumn,q.sortdirection?q.sortdirection.ascending:null)}}w.vScrollInstance.setPosition(t);return z};if(this.source.deleterow){var g=function(q){if(q==true||q==undefined){f(m,d)}};try{this.source.deleterow(d,g);if(o==undefined){o=true}}catch(l){o=false}}else{o=f(m,d)}return o}return false},addrow:function(f,o,j){if(o!=undefined){this._datachanged=true;if(j==undefined){j="last"}var n=false;var m=this.that;if(f==null){var g=this.dataview.filters&&this.dataview.filters.length>0;var l=!g?this.dataview.totalrecords:this.dataview.cachedrecords.length;if(!b.isArray(o)){f=this.dataview.getid(this.dataview.source.id,o,l);while(null!=this.dataview.recordsbyid["id"+f]){f++}}else{var d=new Array();b.each(o,function(e,p){var q=m.dataview.getid(m.dataview.source.id,o[e],l+e);d.push(q)});f=d}}var h=function(s,r,v,e){if(s._loading){throw new Error("jqxGrid: "+s.loadingerrormessage);return false}var u=s.vScrollInstance.value;var t=false;if(!b.isArray(v)){if(v!=undefined&&v.dataindex!=undefined){delete v.dataindex}t=s.dataview.addrow(r,v,e)}else{b.each(v,function(w,x){if(this.dataindex!=undefined){delete this.dataindex}var y=null;if(r!=null&&r[w]!=null){y=r[w]}t=s.dataview.addrow(y,this,e,false)});s._cellscache=new Array();s._pagescache=new Array();s.dataview.refresh()}if(s._updating==undefined||s._updating==false){s._render(true,true,false,false);s.invalidate()}if(s.source&&s.source._knockoutdatasource&&!s._updateFromAdapter&&s.autokoupdates){if(s.source._source._localdata){s.source.suspendKO=true;s.source._source._localdata.push(v);s.source.suspendKO=false}}var p=s.source&&s.source._source.localdata&&s.source._source.localdata.name==="observableArray";if(p){if(!s.source._source.localdata._updating){s.source._source.localdata._updating=true;var q=s.getrowboundindexbyid(r);s.source._source.localdata.set(q,v);s.source._source.localdata._updating=false}}if(s.scrollmode!="deferred"){s.vScrollInstance.setPosition(u)}else{s.vScrollInstance.setPosition(0)}return t};if(this.source&&this.source.addrow){var i=function(e,p){if(e==true||e==undefined){if(p!=undefined){f=p}h(m,f,o,j)}};try{n=this.source.addrow(f,o,j,i);if(n==undefined){n=true}}catch(k){n=false}if(n==false){return false}}else{h(this,f,o,j)}return n}return false},_findvisiblerow:function(h,i){if(h==undefined){h=parseInt(this.vScrollInstance.value)}var f=0;if(i==undefined||i==null){i=this.rows.records}var d=i.length;while(f<=d){var e=parseInt((f+d)/2);var g=i[e];if(g==undefined){break}if(g.top>h&&g.top+g.height>h){d=e-1}else{if(g.top0;var q=0;var l=f.visiblerecords;if(p.pageable&&(p.autoheight||p.autorowheight)){l=p.dataview.pagesize;if(p.groupable){p.dataview.updateview();l=p.dataview.rows.length}}if(!p.groupable&&!p.pageable&&(p.autoheight||p.autorowheight)){l=p.dataview.totalrecords}if(p.rowdetails){l+=p.dataview.pagesize}if(!p.columns.records){return}var r=p.columns.records.length;var t=p.table[0].rows;for(var n=0;n=0){e=g.host.width()}else{e=parseInt(e)}if(parseInt(g.table[0].style.width)-2>e-i){if(f!="visible"){if(!g.autowidth){g.hScrollBar[0].style.visibility="visible"}g._arrange()}if(d=="visible"){if(g.scrollmode!="deferred"&&!g.virtualmode){if(g.virtualsizeinfo){var h=g.virtualsizeinfo.virtualheight-g._gettableheight();if(!isNaN(h)&&h>0){if(f!="hidden"){g.vScrollBar.jqxScrollBar("max",h+g.scrollbarsize+4)}else{g.vScrollBar.jqxScrollBar("max",h)}}}}else{g._updatevscrollbarmax()}}else{i=-2}g.hScrollBar.jqxScrollBar("max",i+g.table.width()-g.host.width())}else{if(f!="hidden"){g.hScrollBar.css("visibility","hidden");g._arrange()}}g._renderhorizontalscroll()},_hascolumnstyle:function(){if(undefined!==this._hascolumnstyles){return this._hascolumnstyles}this._hascolumnstyles=false;for(var d=0;d');C.gridcontent.addClass(C.toTP("jqx-grid-content"));C.gridcontent.addClass(C.toTP("jqx-widget-content"));C.gridcontent.append(C.table);var B=C.groupable&&C.groups.length>0;var p=0;C.table[0].rows=new Array();var l=C.toTP("jqx-grid-cell");if(B){l=" "+C.toTP("jqx-grid-group-cell")}var u=o.visiblerecords;if(C.pageable&&(C.autoheight||C.autorowheight)){u=C.dataview.pagesize;if(C.groupable){C.dataview.updateview();u=C.dataview.rows.length;if(u0&&(C.autoheight||C.autorowheight)&&!C.pageable){u=C.dataview.rows.length}if(C.rowdetails){if(C.autoheight||C.autorowheight){u+=C.dataview.pagesize}else{u+=u}}if(!C.columns.records){return}var A=C.columns.records.length;if(b.jqx.browser.msie&&b.jqx.browser.version>8){C.table.css("opacity","0.99")}if(b.jqx.browser.mozilla){}if(navigator.userAgent.indexOf("Safari")!=-1){C.table.css("opacity","0.99")}var r=b.jqx.browser.msie&&b.jqx.browser.version<8;if(r){C.host.attr("hideFocus","true")}var k=C.tableZIndex;if(u*A>k){k=u*A}var g=C.dataview.records.length==0;var n=C.isTouchDevice();var v="";C._hiddencolumns=false;var D=5+C.columns.records.length;for(var z=0;z';if(r){var s='
      ';k--}var f=0;for(var x=0;xw.maxwidth){t=w.maxwidth}if(C.rtl){var q=k-A+2*x;var d='
      ';var y=this._defaultcellsrenderer("",w);d+=y;d+="
      ";s+=d}if(p==0){C.table.width(parseInt(f)+2);p=f}s+="
      ";v+=s}if(C.WinJS){MSApp.execUnsafeLocalFunction(function(){C.table.html(v)})}else{C.table[0].innerHTML=v}C.table[0].rows=new Array();var m=C.table.children();for(var z=0;z');C.table.append(s);s.height(C.rowsheight);C.table[0].rows[0]=s[0];C.table[0].rows[0].cells=new Array()}for(var x=0;x');d.height(C.rowsheight);s.append(d);C.table[0].rows[0].cells[x]=d[0]}if(tw.maxwidth){t=w.maxwidth}if(!(w.hidden&&w.hideable)&&!w.adaptivehidden){f+=t}}C.table.width(parseInt(f)+2);p=f}C._updatescrollbarsafterrowsprerender();if(C.rendered){C.rendered("rows")}C.toCompile=new Array();C._addoverlayelement()}},_groupsheader:function(){return this.groupable&&this.showgroupsheader},_arrange:function(){var A=null;var x=null;this.tableheight=null;var F=this.that;var n=false;var m=false;if(F.width!=null&&F.width.toString().indexOf("px")!=-1){A=F.width}else{if(F.width!=undefined&&!isNaN(F.width)){A=F.width}}if(F.width!=null&&F.width.toString().indexOf("%")!=-1){A=F.width;n=true}if(F.scrollbarautoshow){F.vScrollBar[0].style.display="none";F.hScrollBar[0].style.display="none";F.vScrollBar[0].style.zIndex=F.tableZIndex+F.headerZIndex;F.hScrollBar[0].style.zIndex=F.tableZIndex+F.headerZIndex}if(F.autowidth){var p=0;for(var B=0;B0){x=C+F._pageviews[F._pageviews.length-1].height+F._pageviews[F._pageviews.length-1].top;F.vScrollBar[0].style.visibility="hidden"}else{x=k();if(F.showemptyrow){x+=F.rowsheight}}}}else{if(F.autoheight){x=F.dataview.totalrecords*F.rowsheight;if(F.pageable&&F.gotopage){x=F.pagesize*F.rowsheight}if(F._loading){x=250;F.dataloadelement.height(x)}x+=k();if(x>10000){x=10000}}}if(A!=null){A=parseInt(A);if(!n){if(F.element.style.width!=parseInt(F.width)+"px"){F.element.style.width=parseInt(F.width)+"px"}}else{F.element.style.width=F.width}if(n){A=F.host.width();if(A<=2){A=600;F.host.width(A)}if(!F._oldWidth){F._oldWidth=A}}}else{F.host.width(250)}if(x!=null){if(this.autoheight){x+=2}if(!m){x=parseInt(x)}if(!m){if(F.element.style.height!=parseInt(x)+"px"){F.element.style.height=parseInt(x)+"px"}}else{F.element.style.height=F.height}if(m&&!F.autoheight){x=F.host.height();if(x==0){x=400;F.host.height(x)}if(!F._oldHeight){F._oldHeight=x}}}else{F.host.height(250)}if(F.autoheight){F.tableheight=null;F._gettableheight()}var v=0;if(F.showtoolbar){F.toolbar.width(A);F.toolbar.height(F.toolbarheight-1);F.toolbar.css("top",0);v+=F.toolbarheight;x-=parseInt(F.toolbarheight)}else{F.toolbar[0].style.height="0px"}if(F.showfilterbar){F.filterbar.width(A);F.filterbar.height(F.toolbarheight-1);F.filterbar.css("top",v);v+=F.toolbarheight;x-=parseInt(F.toolbarheight)}else{F.filterbar[0].style.height="0px"}if(F.showstatusbar){if(F.showaggregates){F.statusbar.width(!F.table?A:Math.max(A,F.table.width()))}else{F.statusbar.width(A)}F.statusbar.height(F.statusbarheight)}else{F.statusbar[0].style.height="0px"}if(F.showeverpresentrow&&F.everpresentrowposition==="bottom"){F.addnewrow.width(A);F.addnewrow.height(F.everpresentrowheight)}else{F.addnewrow[0].style.height="0px"}if(F._groupsheader()){F.groupsheader.width(A);F.groupsheader.height(F.groupsheaderheight);F.groupsheader.css("top",v);var y=F.groupsheader.height()+1;v+=y;if(x>y){x-=parseInt(y)}}else{if(F.groupsheader[0].style.width!=A+"px"){F.groupsheader[0].style.width=parseInt(A)+"px"}F.groupsheader[0].style.height="0px";if(F.groupsheader[0].style.top!=v+"px"){F.groupsheader.css("top",v)}var y=F.showgroupsheader&&F.groupable?F.groupsheaderheight:0;var f=v+y+"px";if(F.content[0].style.top!=f){F.content.css("top",v+F.groupsheaderheight)}}var d=F.scrollbarsize;if(isNaN(d)){d=parseInt(d);if(isNaN(d)){d="17px"}else{d=d+"px"}}d=parseInt(d);var s=4;var h=2;var j=0;if(F.vScrollBar[0].style.visibility=="visible"){j=d+s}if(F.hScrollBar[0].style.visibility=="visible"){h=d+s+2}if(d==0){j=0;h=0}var r=0;if(F.pageable){r=F.pagerheight;h+=F.pagerheight}if(F.showstatusbar){h+=F.statusbarheight;r+=F.statusbarheight}if(F.showeverpresentrow&&F.everpresentrowposition==="bottom"){h+=F.everpresentrowheight;r+=F.everpresentrowheight}if(F.hScrollBar[0].style.height!=d+"px"){F.hScrollBar[0].style.height=parseInt(d)+"px"}if(F.hScrollBar[0].style.top!=v+x-s-d-r+"px"||F.hScrollBar[0].style.left!="0px"){F.hScrollBar.css({top:v+x-s-d-r+"px",left:"0px"})}var q=F.hScrollBar[0].style.width;var l=false;var D=false;if(j==0){if(q!=(A-2)+"px"){F.hScrollBar.width(A-2);l=true}}else{if(q!=(A-d-s)+"px"){F.hScrollBar.width(A-d-s+"px");l=true}}if(!F.autoheight){if(F.vScrollBar[0].style.width!=d+"px"){F.vScrollBar.width(d);D=true}if(F.vScrollBar[0].style.height!=parseInt(x)-h+"px"){F.vScrollBar.height(parseInt(x)-h+"px");D=true}if(F.vScrollBar[0].style.left!=parseInt(A)-parseInt(d)-s+"px"||F.vScrollBar[0].style.top!=v+"px"){F.vScrollBar.css({left:parseInt(A)-parseInt(d)-s+"px",top:v})}}if(F.rtl){F.vScrollBar.css({left:"0px",top:v});if(F.vScrollBar.css("visibility")!="hidden"){F.hScrollBar.css({left:d+2})}}var o=F.vScrollInstance;o.disabled=F.disabled;if(!F.autoheight){if(D){o.refresh()}}var z=F.hScrollInstance;z.disabled=F.disabled;if(l){z.refresh()}if(F.autowidth){F.hScrollBar[0].style.visibility="hidden"}F.statusbarheight=parseInt(F.statusbarheight);F.toolbarheight=parseInt(F.toolbarheight);var t=function(w){if((w.vScrollBar[0].style.visibility=="visible")&&(w.hScrollBar[0].style.visibility=="visible")){w.bottomRight[0].style.visibility="visible";w.bottomRight.css({left:1+parseInt(w.vScrollBar.css("left")),top:parseInt(w.hScrollBar.css("top"))});if(w.rtl){w.bottomRight.css("left","0px")}w.bottomRight.width(parseInt(d)+3);w.bottomRight.height(parseInt(d)+4);var G=w.showeverpresentrow&&w.everpresentrowposition=="bottom";var i=G?w.everpresentrowheight:0;if(i>0&&!w.showaggregates){w.bottomRight.css("z-index",99);w.bottomRight.height(parseInt(d)+4+i);w.bottomRight.css({top:parseInt(w.hScrollBar.css("top"))-i})}if(w.showaggregates){w.bottomRight.css("z-index",99);w.bottomRight.height(parseInt(d)+4+w.statusbarheight+i);w.bottomRight.css({top:parseInt(w.hScrollBar.css("top"))-w.statusbarheight-i})}}else{w.bottomRight[0].style.visibility="hidden"}};t(this);if(F.content[0].style.width!=A-j+"px"){F.content.width(A-j)}if(F.content[0].style.height!=x-h+3+"px"){F.content.height(x-h+3)}if(F.scrollbarautoshow){if(F.content[0].style.width!=A+"px"){F.content.width(A)}if(F.content[0].style.height!=x+"px"){F.content.height(x)}}if(F.content[0].style.top!=v+"px"){F.content.css("top",v)}if(F.rtl){F.content.css("left",j);if(F.scrollbarautoshow){F.content.css("left","0px")}if(F.table){var u=F.table.width();if(u=0){F.hScrollBar.jqxScrollBar("max",E)}if(F.hScrollBar[0].style.visibility=="visible"&&E==0){F.hScrollBar[0].style.visibility="hidden";F._arrange()}}}if(A!=parseInt(F.dataloadelement[0].style.width)){F.dataloadelement[0].style.width=F.element.style.width}if(x!=parseInt(F.dataloadelement[0].style.height)){F.dataloadelement[0].style.height=F.element.style.height}if(this.pagergotoinput){if(this.pagergotoinput.offset().top!==this.pagergoto.offset().top){this.pagergotoinput.css("visibility","hidden");this.pagergoto.css("visibility","hidden")}else{this.pagergotoinput.css("visibility","inherit");this.pagergoto.css("visibility","inherit")}}F._hostwidth=A},destroy:function(){delete b.jqx.dataFormat.datescache;delete this.gridlocalization;delete this._undoRedo;b.jqx.utilities.resize(this.host,null,true);if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.self){this.removeHandler(b(window.top.document),"mouseup.grid"+this.element.id)}}if(this.table&&this.table[0]){var m=this.table[0].rows.length;for(var k=0;k0:false;if(this.autogeneratecolumns){var m=new Array();if(f){b.each(f,function(){var i={datafield:this.name,text:this.text||this.name,cellsformat:this.format||""};m.push(i)})}else{if(this.source.records.length>0){var o=this.source.records[0];for(var h in o){if(h!="uid"){var g={width:100,datafield:h,text:h};m.push(g)}}}}this.columns=m}if(this.columns&&this.columns.records){for(var j=0;j=0||this.everpresentrowactions.indexOf("update")>=0)){if(this.updateeverpresentrow){var i=this}setTimeout(function(){i.updateeverpresentrow()},50)}}var g=e;g.owner=this;var h=new b.Event(f);h.owner=this;h.args=g;var d=this.host.trigger(h);e=h.args;return d},wheel:function(f,e){if(e.autoheight&&e.hScrollBar.css("visibility")!="visible"){f.returnValue=true;return true}var g=0;if(!f){f=window.event}if(f.originalEvent&&f.originalEvent.wheelDelta){f.wheelDelta=f.originalEvent.wheelDelta}if(f.wheelDelta){g=f.wheelDelta/120}else{if(f.detail){g=-f.detail/3}}if(g){var d=e._handleDelta(g);if(d){if(f.preventDefault){f.preventDefault()}if(f.originalEvent!=null){f.originalEvent.mouseHandled=true}if(f.stopPropagation!=undefined){f.stopPropagation()}}if(d){d=false;f.returnValue=d;return d}else{return false}}if(f.preventDefault){f.preventDefault()}f.returnValue=false},_handleDelta:function(f){if(this.vScrollBar.css("visibility")!="hidden"){var e=this.vScrollInstance.value;if(f<0){this.scrollDown()}else{this.scrollUp()}var d=this.vScrollInstance.value;if(e!=d){return true}}else{if(this.hScrollBar.css("visibility")!="hidden"){var e=this.hScrollInstance.value;if(f>0){if(this.hScrollInstance.value>2*this.horizontalscrollbarstep){this.hScrollInstance.setPosition(this.hScrollInstance.value-2*this.horizontalscrollbarstep)}else{this.hScrollInstance.setPosition(0)}}else{if(this.hScrollInstance.value=d.min){d.setPosition(parseInt(d.value)-this.rowsheight)}else{d.setPosition(d.min)}},_removeHandlers:function(){var d=this.that;d.removeHandler(b(window),"orientationchange.jqxgrid"+d.element.id);d.removeHandler(b(window),"orientationchanged.jqxgrid"+d.element.id);d.removeHandler(d.vScrollBar,"valueChanged");d.removeHandler(d.hScrollBar,"valueChanged");d.vScrollInstance.valueChanged=null;d.hScrollInstance.valueChanged=null;var e="mousedown.jqxgrid";if(d.isTouchDevice()){e=b.jqx.mobile.getTouchEventName("touchend")}d.removeHandler(d.host,"dblclick.jqxgrid");d.removeHandler(d.host,e);d.removeHandler(d.content,"mousemove",d._mousemovefunc);d.removeHandler(d.host,"mouseleave.jqxgrid");d.removeHandler(d.content,"mouseenter");d.removeHandler(d.content,"mouseleave");d.removeHandler(d.content,"mousedown");d.removeHandler(d.content,"scroll");d.removeHandler(d.content,"selectstart."+d.element.id);d.removeHandler(d.host,"dragstart."+d.element.id);d.removeHandler(d.host,"keydown.edit"+d.element.id);d.removeHandler(b(document),"keydown.edit"+d.element.id);d.removeHandler(b(document),"keyup.edit"+d.element.id);if(d._mousemovedocumentfunc){d.removeHandler(b(document),"mousemove.selection"+d.element.id,d._mousemovedocumentfunc)}d.removeHandler(b(document),"mouseup.selection"+d.element.id);if(d._mousewheelfunc){d.removeHandler(d.host,"mousewheel",d._mousewheelfunc)}if(d.editable){d.removeHandler(b(document),"mousedown.gridedit"+d.element.id)}if(d.host.off){d.content.off("mousemove");d.host.off("mousewheel")}},_addHandlers:function(){var e=this.that;var d=e.isTouchDevice();if(!d){e.addHandler(e.host,"dragstart."+e.element.id,function(j){return false})}if(e.scrollbarautoshow){e.addHandler(e.host,"mouseenter.gridscroll"+e.element.id,function(j){e.vScrollBar.fadeIn("fast");e.hScrollBar.fadeIn("fast")});e.addHandler(e.host,"mouseleave.gridscroll"+e.element.id,function(j){if(!e.vScrollInstance.isScrolling()&&!e.hScrollInstance.isScrolling()){e.vScrollBar.fadeOut("fast");e.hScrollBar.fadeOut("fast")}})}if(e.editable){e.addHandler(b(document),"mousedown.gridedit"+e.element.id,function(m){if(e.editable&&e.begincelledit){if(e.editcell){if(!e.vScrollInstance.isScrolling()&&!e.vScrollInstance.isScrolling()){var r=e.host.coord();var q=e.host.width();var n=e.host.height();var v=false;var k=false;var t=false;if(m.pageYr.top+n){v=true;k=true}if(m.pageXr.left+q){v=true;t=true}if(v){var u=false;if(e.editcell&&e.editcell.editor){switch(e.editcell.columntype){case"datetimeinput":if(e.editcell.editor.jqxDateTimeInput&&e.editcell.editor.jqxDateTimeInput("container")&&e.editcell.editor.jqxDateTimeInput("container")[0].style.display=="block"){var s=e.editcell.editor.jqxDateTimeInput("container").coord().top;var j=e.editcell.editor.jqxDateTimeInput("container").coord().top+e.editcell.editor.jqxDateTimeInput("container").height();if(k&&(m.pageYj)){v=true;e.editcell.editor.jqxDateTimeInput("close")}else{return}}break;case"combobox":if(e.editcell.editor.jqxComboBox&&e.editcell.editor.jqxComboBox("container")&&e.editcell.editor.jqxComboBox("container")[0].style.display=="block"){var s=e.editcell.editor.jqxComboBox("container").coord().top;var j=e.editcell.editor.jqxComboBox("container").coord().top+e.editcell.editor.jqxComboBox("container").height();if(k&&(m.pageYj)){v=true;e.editcell.editor.jqxComboBox("close")}else{return}}break;case"dropdownlist":if(e.editcell.editor.jqxDropDownList&&e.editcell.editor.jqxDropDownList("container")&&e.editcell.editor.jqxDropDownList("container")[0].style.display=="block"){var s=e.editcell.editor.jqxDropDownList("container").coord().top;var j=e.editcell.editor.jqxDropDownList("container").coord().top+e.editcell.editor.jqxDropDownList("container").height();if(k&&(m.pageYj)){v=true;e.editcell.editor.jqxDropDownList("close")}else{return}}break;case"template":case"custom":var l=["jqxDropDownList","jqxComboBox","jqxDropDownButton","jqxDateTimeInput"];var p=function(A){var z=e.editcell.editor.data();if(z[A]&&z[A].instance.container&&z[A].instance.container[0].style.display=="block"){var x=z[A].instance;var B=x.container.coord().top;var y=x.container.coord().top+x.container.height();if(k&&(m.pageYy)){v=true;x.close();return true}else{return false}}};for(var o=0;o=5){e._renderrows(e.virtualsizeinfo);e.currentScrollValue=j.currentValue}else{e._renderrows(e.virtualsizeinfo);e.currentScrollValue=j.currentValue}}if(!e.pageable&&!e.groupable&&e.dataview.virtualmode){if(e.loadondemandupdate){clearTimeout(e.loadondemandupdate)}e.loadondemandupdate=setTimeout(function(){e.loadondemand=true;e._renderrows(e.virtualsizeinfo)},100)}if(d){e._lastScroll=new Date()}}};e.hScrollInstance.valueChanged=function(l){if(e.virtualsizeinfo){e._closemenu();var k=function(){e._renderhorizontalscroll();e._renderrows(e.virtualsizeinfo);if(e.editcell&&!e.editrow){if(e._showcelleditor&&e.editcell.editing){if(!e.hScrollInstance.isScrolling()){e._showcelleditor(e.editcell.row,e.getcolumn(e.editcell.column),e.editcell.element,e.editcell.init)}}}};if(d){k()}else{var j=e._browser==undefined?e._isIE10():e._browser;if(navigator&&navigator.userAgent.indexOf("Safari")!=-1&&navigator.userAgent.indexOf("Chrome")==-1){if(e._hScrollTimer){clearTimeout(e._hScrollTimer)}e._hScrollTimer=setTimeout(function(){k()},1)}else{if(b.jqx.browser.msie){if(e._hScrollTimer){clearTimeout(e._hScrollTimer)}e._hScrollTimer=setTimeout(function(){k()},0.01)}else{k()}}}if(d){e._lastScroll=new Date()}}};e._mousewheelfunc=e._mousewheelfunc||function(j){if(!e.editcell&&e.enablemousewheel){e.wheel(j,e);return false}};e.removeHandler(e.host,"mousewheel",e._mousewheelfunc);e.addHandler(e.host,"mousewheel",e._mousewheelfunc);var h="mousedown.jqxgrid";if(d){h=b.jqx.mobile.getTouchEventName("touchend")}e.addHandler(e.host,h,function(k){if(e.isTouchDevice()){e._newScroll=new Date();if(e._newScroll-e._lastScroll<500){return false}if(b(k.target).ischildof(e.vScrollBar)){return false}if(b(k.target).ischildof(e.hScrollBar)){return false}}e._mousedown=new Date();var j=e._handlemousedown(k,e);if(e.isNestedGrid){if(!e.resizablecolumn&&!e.columnsreorder){k.stopPropagation()}}e._lastmousedown=new Date();return j});if(!d){e.addHandler(e.host,"dblclick.jqxgrid",function(k){if(e.editable&&e.begincelledit&&e.editmode=="dblclick"){e._handledblclick(k,e)}else{if(b.jqx.browser.msie&&b.jqx.browser.version<9){var j=e._handlemousedown(k,e)}}e.mousecaptured=false;e._lastmousedown=new Date();return true});e._mousemovefunc=function(j){if(e._handlemousemove){return e._handlemousemove(j,e)}};e.addHandler(e.content,"mousemove",e._mousemovefunc);if(e._handlemousemoveselection){e._mousemovedocumentfunc=function(j){if(e._handlemousemoveselection){return e._handlemousemoveselection(j,e)}};e.addHandler(b(document),"mousemove.selection"+e.element.id,e._mousemovedocumentfunc)}e.addHandler(b(document),"mouseup.selection"+e.element.id,function(k){if(e._handlemouseupselection){if(k.shiftKey&&b(k.target).ischildof(e.host)){var j=e.editable;e.editable=false;e._lastmousedown=new Date(2000,1,1);e._handlemousedown(k,e);e.mousecaptured=true;e.editable=j}e._handlemouseupselection(k,e)}})}try{if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.self){var i=null;if(window.parent&&document.referrer){i=document.referrer}if(i&&i.indexOf(document.location.host)!=-1){var g=function(k){if(e._handlemouseupselection){try{e._handlemouseupselection(k,e)}catch(j){}}};e.addHandler(b(window.top.document),"mouseup.grid"+e.element.id,g)}}}}catch(f){}e.focused=false;if(!d){e.addHandler(e.content,"mouseenter",function(j){e.focused=true;if(e.wrapper){e.wrapper.attr("tabindex",1);e.content.attr("tabindex",2)}if(e._overlayElement){if(e.vScrollInstance.isScrolling()||e.hScrollInstance.isScrolling()){e._overlayElement[0].style.visibility="visible"}else{e._overlayElement[0].style.visibility="hidden"}}});e.addHandler(e.content,"mouseleave",function(j){if(e._handlemousemove){if(e.enablehover){e._clearhoverstyle()}}if(e._overlayElement){e._overlayElement[0].style.visibility="hidden"}e.focused=false});if(e.groupable||e.columnsreorder){e.addHandler(b(document),"selectstart."+e.element.id,function(j){if(e.__drag===true){return false}})}e.addHandler(e.content,"selectstart."+e.element.id,function(j){if(e.enablebrowserselection){return true}if(e.showfilterrow){if(b(j.target).ischildof(e.filterrow)){return true}}if(e.showeverpresentrow){if(b(j.target).ischildof(e.addnewrow)){return true}if(e.addnewrowtop){if(b(j.target).ischildof(e.addnewrowtop)){return true}}}if(j.target.className&&j.target.className.indexOf("jqx-grid-widget")>=0){return true}if(!e.editcell){return false}if(j.stopPropagation){j.stopPropagation()}});e.addHandler(b(document),"keyup.edit"+e.element.id,function(j){e._keydown=false});e.addHandler(b(document),"keydown.edit"+e.element.id,function(l){if(e.adaptiveview){return true}e._keydown=true&&!e.editcell;var k=l.charCode?l.charCode:l.keyCode?l.keyCode:0;if(k===20){if(!e._capsLock){e._capsLock=true}else{e._capsLock=false}}if(e.handlekeyboardnavigation){if(e.focused||(l.target===e.element||b(l.target).ischildof(e.host))){var m=e.handlekeyboardnavigation(l);if(m==true){return false}}}if(e.editable&&e.editcell){if(k==13||k==27||k==9||k==32){if(e._handleeditkeydown){j=e._handleeditkeydown(l,e)}}}if(k==27){e.mousecaptured=false;if(e.selectionarea.css("visibility")=="visible"){e.selectionarea.css("visibility","hidden")}}if(b.jqx.browser.msie&&b.jqx.browser.version<12&&e.focused&&!e.isNestedGrid){if(k==13&&j==false){return j}var j=true;var k=l.charCode?l.charCode:l.keyCode?l.keyCode:0;if(!e.editcell&&e.editable&&e.editmode!="programmatic"){if(e._handleeditkeydown){j=e._handleeditkeydown(l,e)}}if(j&&e.keyboardnavigation&&e._handlekeydown){j=e._handlekeydown(l,e);if(!j){if(l.preventDefault){l.preventDefault()}if(l.stopPropagation!=undefined){l.stopPropagation()}}return j}}return true});e.addHandler(e.host,"keyup.edit"+e.element.id,function(k){if(e.adaptiveview){return true}if(k.keyCode===9){if(!b(document.activeElement).ischildof(e.filterrow)){if(!b(document.activeElement).ischildof(e.pager)){switch(e.selectionmode){case"singlecell":case"multiplecells":case"multiplecellsextended":case"multiplecellsadvanced":var j=e.getselectedcell();if(j===null){}break;default:var l=e.getselectedrowindex();if(l===-1){}break}}}}});e.addHandler(e.host,"keydown.edit"+e.element.id,function(l){var j=true;if(e.adaptiveview){return true}if(e.handlekeyboardnavigation){var m=e.handlekeyboardnavigation(l);if(m==true){return false}}if(e.editable&&e.editmode!="programmatic"){if(e._handleeditkeydown){j=e._handleeditkeydown(l,e);if(e.isNestedGrid){l.stopPropagation()}}}if(!e.editcell&&l.altKey){if(!b(document.activeElement).ischildof(e.filterrow)){if(!b(document.activeElement).ischildof(e.pager)){if(l.keyCode===40){var k=e.getselectedcell();if(k){e.openmenu(k.column)}}else{if(l.keyCode===38){e._closemenu()}}}}}if(!(b.jqx.browser.msie&&b.jqx.browser.version<8)){if(j&&e.keyboardnavigation&&e._handlekeydown){j=e._handlekeydown(l,e);if(e.isNestedGrid){l.stopPropagation()}}}else{if(e.isNestedGrid){if(j&&e.keyboardnavigation&&e._handlekeydown){j=e._handlekeydown(l,e);l.stopPropagation()}}}if(!j){if(l.preventDefault){l.preventDefault()}if(l.stopPropagation!=undefined){l.stopPropagation()}}if(j&&e.selectedcells&&e.selectedcells.length>0){if(l.keyCode===9&&l.shiftKey&&e.table&&e.table[0].rows&&e.table[0].rows.length>0){if(!b(document.activeElement).ischildof(e.filterrow)){if(!b(document.activeElement).ischildof(e.pager)){e.table[0].rows[0].cells[0].focus()}}}}return j})}},_hittestrow:function(s,q){if(this.vScrollInstance==null||this.hScrollInstance==null){return}if(s==undefined){s=0}if(q==undefined){q==0}var l=this.vScrollInstance;var k=this.hScrollInstance;var f=l.value;if(this.vScrollBar.css("visibility")!="visible"){f=0}var m=k.value;if(this.hScrollBar.css("visibility")!="visible"){m=0}if(this.scrollmode=="deferred"&&this._newmax!=null){if(f>this._newmax){f=this._newmax}}var r=parseInt(f)+q;var j=parseInt(m)+s;if(this.visiblerows==null){return}if(this.visiblerows.length==0){return}var e=false;var i=this._findvisiblerow(r,this.visiblerows);if(i>=0){var o=this.visiblerows[i];var d=this.rowdetails&&o.rowdetails;var n=!o.rowdetailshidden;if(d){var g=this.visiblerows[i-1];if(g==o){o=g;i--}if(n){var h=b(this.hittestinfo[i].visualrow).position().top+parseInt(this.table.css("top"));var p=b(this.hittestinfo[i].visualrow).height();if(!(q>=h&&q<=h+p)){i++;o=this.visiblerows[i];e=true}}}}return{index:i,row:o,details:e}},getcellatposition:function(j,q){var r=this.that;var z=this.showheader?this.columnsheader.height()+2:0;var s=this._groupsheader()?this.groupsheader.height():0;var C=this.showtoolbar?this.toolbarheight:0;var A=this.showfilterbar?this.toolbarheight:0;s+=C;s+=A;var g=this.host.coord();if(this.hasTransform){g=b.jqx.utilities.getOffset(this.host)}var p=j-g.left;var n=q-z-g.top-s;var d=this._hittestrow(p,n);var k=d.row;var l=d.index;var t=this.table[0].rows[l];if(this.dataview&&this.dataview.records.length==0){var o=this.table[0].rows;var D=0;for(var w=0;w=D&&n=p&&p>=j){f=w;break}}if(k!=null){var e=this._getcolumnat(f);return{row:this.getboundindex(k),column:e.datafield,value:this.getcellvalue(this.getboundindex(k),e.datafield)}}return null},_handlecardedit:function(d){var e=d.target.getAttribute("row");var k=document.createElement("div");var m=this.getrowdatabyid(e);var l='
      ';l+="";for(var n=0;n';l+='";l+='';l+=""}l+="
      '+h.text+"
      ";l+="
      ";l+='
      ';l+="
      ";k.innerHTML="
      "+this.gridlocalization.udpaterowstring+" "+e+'
      '+l+"
      ";var i=k.querySelector('[dataid="Save"]');var g=k.querySelector('[dataid="Cancel"]');b(i).jqxButton({template:"primary",width:"40%",theme:this.theme});b(g).jqxButton({width:"40%",theme:this.theme});var j=this;i.onclick=function(){var D=b(k).find("[datafield]");var F={};for(var y=0;y-1){C=C.replace(j.gridlocalization.currencysymbol,"")}var z=function(J,H,I){var t=J;if(H==I){return J}var G=t.indexOf(H);while(G!=-1){t=t.replace(H,I);G=t.indexOf(H)}return t};var x=C;x=parseFloat(x);if(!isNaN(x)){C=x}else{C=z(C,j.gridlocalization.thousandsseparator,"");C=C.replace(j.gridlocalization.decimalseparator,".");if(C.indexOf(j.gridlocalization.percentsymbol)>-1){C=C.replace(j.gridlocalization.percentsymbol,"")}var q="";for(var E=0;E=0){n._handlecardedit(Z)}var o;if(Z.which){o=(Z.which==3)}else{if(Z.button){o=(Z.button==2)}}var R;if(Z.which){R=(Z.which==2)}else{if(Z.button){R=(Z.button==1)}}if(R){return true}if(this.adaptiveview){if(b(Z.target).ischildof(b(this.adaptiveview))){return true}if(Z.target==this.adaptiveview){return true}}if(this.showstatusbar){if(b(Z.target).ischildof(this.statusbar)){return true}if(Z.target==this.statusbar[0]){return true}}if(this.showtoolbar){if(b(Z.target).ischildof(this.toolbar)){return true}if(Z.target==this.toolbar[0]){return true}}if(this.showfilterbar){if(b(Z.target).ischildof(this.filterbar)){return true}if(Z.target==this.filterbar[0]){return true}}if(this.pageable){if(b(Z.target).ischildof(this.pager)){return true}if(Z.target==this.pager[0]){return true}}if(!this.columnsheader){return true}if(!this.editcell){if(this.pageable){if(b(Z.target).ischildof(this.pager)){return true}}}var X=this.showheader?this.columnsheader.height()+2:0;var C=this._groupsheader()?this.groupsheader.height():0;var F=this.showtoolbar?this.toolbarheight:0;var U=this.showfilterbar?this.toolbarheight:0;C+=F;C+=U;var V=this.host.coord();if(this.hasTransform){V=b.jqx.utilities.getOffset(this.host);var ac=this._getBodyOffset();V.left-=ac.left;V.top-=ac.top}var k=parseInt(Z.pageX);var l=parseInt(Z.pageY);if(this.isTouchDevice()){var aa=n.getTouches(Z);var Q=aa[0];k=parseInt(Q.pageX);l=parseInt(Q.pageY);if(n.touchmode==true){if(Q._pageX!=undefined){k=parseInt(Q._pageX);l=parseInt(Q._pageY)}}}var J=k-V.left;var I=l-X-V.top-C;if(this.pageable&&!this.autoheight&&this.gotopage){var d=this.pager.coord().top-V.top-C-X;if(I>d){return}}var W=this._hittestrow(J,I);if(!W){return}if(W.details){return}var r=W.row;var E=W.index;var s=Z.target.className;var j=this.table[0].rows[E];if(j==null){if(n.editable&&n.begincelledit){if(n.editcell){n.endcelledit(n.editcell.row,n.editcell.column,false,true)}}return true}n.mousecaptured=true;n.mousecaptureposition={left:Z.pageX,top:Z.pageY-C,clickedrow:j};var m=this.hScrollInstance;var u=m.value;if(this.rtl){if(this.hScrollBar.css("visibility")!="hidden"){u=m.max-m.value}}var G=-1;var D=this.groupable?this.groups.length:0;if(this.rtl){if(this.vScrollBar[0].style.visibility!="hidden"){u-=this.scrollbarsize+4}if(this.hScrollBar[0].style.visibility=="hidden"){u=-parseInt(this.content.css("left"))}}for(var S=0;S=J&&J>=k){G=S;n.mousecaptureposition.clickedcell=S;break}}if(this.rtl&&this._haspinned){for(var S=j.cells.length-1;S>=0;S--){if(!n.columns.records[S].pinned){break}var T=b(this.columnsrow[0].cells[S]).coord().left-this.host.coord().left;var k=T;var L=this._getcolumnat(S);if(L!=null&&L.hidden){continue}if(L!=null&&L.adaptivehidden){continue}var N=k+b(this.columnsrow[0].cells[S]).width();if(N>=J&&J>=k){G=S;n.mousecaptureposition.clickedcell=S;break}}}if(r!=null&&G>=0){this._raiseEvent(1,{rowindex:this.getboundindex(r),visibleindex:r.visibleindex,row:r,group:r.group,rightclick:o,originalEvent:Z});var L=this._getcolumnat(G);var O=this.getcellvalue(this.getboundindex(r),L.datafield);if(this.editable&&this.editcell){this._currentEditableColumn=G;if(L.datafield==this.editcell.column){if(this.getboundindex(r)==this.editcell.row){this.mousecaptured=false}}}if(L.columntype==="adaptive"){var K=document.createElement("div");var ab=document.createElement("div");var A=document.createElement("a");var w=document.createElement("a");var f=document.createElement("div");var M=this.getrowdata(this.getboundindex(r));A.href="#";w.href="#";K.style.zIndex=99999;K.style.position="absolute";K.style.left="0px";K.style.top="0px";K.style.width="100%";K.style.height="100%";K.className="jqx-adaptive-view jqx-widget-content";f.style.position="relative";f.style.top="100%";f.style.textAlign="center";f.style.marginTop="-40px";ab.style.position="absolute";ab.style.left="0px";ab.style.top="0px";ab.style.width="100%";ab.style.height="100%";if(this.theme){K.className="jqx-widget-content jqx-widget-content-"+this.theme}var e=document.createElement("span");e.className="jqx-icon-close";if(this.theme){e.className="jqx-icon-close jqx-widget-close-"+this.theme}e.style.zIndex=99;e.style.position="absolute";e.style.right="10px";e.style.top="10px";e.style.width="16px";e.style.height="16px";K.appendChild(ab);K.appendChild(e);A.innerHTML=this.gridlocalization.okstring;w.innerHTML=this.gridlocalization.cancelstring;A.addEventListener("mousedown",function(ae){var ag={};var x=n.adaptiveview.querySelectorAll("input");for(var y=0;y0&&E%2===0){v+=""}var B=M[L.displayfield];if(L.cellsformat!=""){if(b.jqx.dataFormat){if(b.jqx.dataFormat.isDate(B)){B=b.jqx.dataFormat.formatdate(B,L.cellsformat,this.gridlocalization)}else{if(b.jqx.dataFormat.isNumber(B)){B=b.jqx.dataFormat.formatnumber(B,L.cellsformat,this.gridlocalization)}}}}var H=this.filterable?'
      ':"";if(this.editable){if(L.editable){v+=""+H+this.escape_HTML(L.text)+": "}else{v+=""+H+this.escape_HTML(L.text)+": "}}else{v+=""+H+this.escape_HTML(L.text)+": "+B+""}E++}v+="";ab.innerHTML=v;e.addEventListener("mousedown",function(i){K.parentNode.removeChild(K);n.adaptiveview=null});this.wrapper[0].appendChild(K);this.adaptiveview=K;b(this.adaptiveview).find(".jqx-grid-column-filterbutton").on("click",function(){var i=this.getAttribute("datafield");var x=this.offsetTop;n.openmenu(i);setTimeout(function(){n.gridmenu.css("top",30+x);n.gridmenu.css("left",25);n.gridmenu.css("z-index",99999);n.gridmenu.parent().css("z-index",99999)},300)});return}this._raiseEvent(8,{rowindex:this.getboundindex(r),column:L?L.getcolumnproperties():null,row:r,visibleindex:r.visibleindex,datafield:L?L.datafield:null,columnindex:G,value:O,rightclick:o,originalEvent:Z});if(L.createwidget){return true}if(this.isTouchDevice()){if(L.columntype=="checkbox"&&this.editable&&this._overlayElement){if(!this.editcell){this._overlayElement.css("visibility","hidden");this.editcell=this.getcell(E,L.datafield);return true}}else{if(L.columntype=="button"&&this._overlayElement){if(L.buttonclick){L.buttonclick(j.cells[G].buttonrow,Z)}return true}}}var h=false;if(this._lastmousedown!=null){if(this._mousedown-this._lastmousedown<300){if(this._clickedrowindex==this.getboundindex(r)){this._raiseEvent(22,{rowindex:this.getboundindex(r),row:r,visibleindex:r.visibleindex,group:r.group,rightclick:o,originalEvent:Z});if(this._clickedcolumn==L.datafield){this._raiseEvent(23,{rowindex:this.getboundindex(r),row:r,visibleindex:r.visibleindex,column:L?L.getcolumnproperties():null,datafield:L?L.datafield:null,columnindex:G,value:O,rightclick:o,originalEvent:Z})}h=true;this._clickedrowindex=-1;this._clickedcolumn=null;if(Z.isPropagationStopped&&Z.isPropagationStopped()){return false}}}}if(o){return true}if(!h){this._clickedrowindex=this.getboundindex(r);this._clickedcolumn=L.datafield}var g=b.jqx.utilities.getBrowser();if(g.browser=="msie"&&parseInt(g.version)<=7){if(G==0&&this.rowdetails){s="jqx-grid-group-collapse"}if(D>0){if(G<=D){s="jqx-grid-group-collapse"}}}if(s.indexOf("jqx-grid-group-expand")!=-1||s.indexOf("jqx-grid-group-collapse")!=-1){if(!this.rtl){if(D>0&&G0&&G>j.cells.length-D-1&&this._togglegroupstate){this._togglegroupstate(r.bounddata,true)}else{if(G==j.cells.length-1-D&&this.rowdetails&&this.showrowdetailscolumn){this._togglerowdetails(r.bounddata,true);this.gridcontent[0].scrollTop=0;this.gridcontent[0].scrollLeft=0}}}}else{if(r.boundindex!=-1){var p=this.selectedrowindexes.slice(0);var Y=false;if(n.selectionmode!="none"&&n.selectionmode!="checkbox"&&this._selectrowwithmouse){if(n.selectionmode=="multiplecellsadvanced"||n.selectionmode=="multiplecellsextended"||n.selectionmode=="multiplerowsextended"||n.selectionmode=="multiplerowsadvanced"){if(!Z.ctrlKey&&!Z.shiftKey&&!Z.metaKey){n.selectedrowindexes=new Array();n.selectedcells=new Array()}}var z=false;var q=this.getboundindex(r);if(n._oldselectedrow===q||n.selectionmode==="none"){z=true}if(n.selectionmode.indexOf("cell")==-1){if((n.selectionmode!="singlerow")||(n.selectedrowindex!=q&&n.selectionmode=="singlerow")){this._applyrowselection(q,true,false,null,L.datafield);this._selectrowwithmouse(n,W,p,L.datafield,Z.ctrlKey||Z.metaKey,Z.shiftKey)}}else{if(L.datafield!=null){this._selectrowwithmouse(n,W,p,L.datafield,Z.ctrlKey||Z.metaKey,Z.shiftKey);if(!Z.shiftKey){this._applycellselection(q,L.datafield,true,false)}}}if(n._oldselectedcell){if(n._oldselectedcell.datafield==n.selectedcell.datafield&&n._oldselectedcell.rowindex==n.selectedcell.rowindex){Y=true}}n._oldselectedcell=n.selectedcell;n._oldselectedrow=q}if(n.autosavestate){if(n.savestate){n.savestate()}}if(n.editable&&n.begincelledit&&n.editmode!="programmatic"){if(Z.isPropagationStopped&&Z.isPropagationStopped()){return false}if(n.editmode=="selectedrow"){if(z&&!n.editcell){if(L.columntype!=="checkbox"){this._currentEditableColumn=G;var t=n.beginrowedit(this.getboundindex(r))}}else{if(n.editcell&&!z&&n.selectionmode!="none"){var t=n.endrowedit(n.editcell.row)}}}else{var q=this.getboundindex(r);var P=n.editmode=="click"||(Y&&n.editmode=="selectedcell");if(n.selectionmode.indexOf("cell")==-1){if(n.editmode!="dblclick"){P=true}}if(P){if(r.boundindex!=undefined&&L.editable){var t=n.begincelledit(this.getboundindex(r),L.datafield,L.defaulteditorvalue,false);if(n.selectionmode.indexOf("cell")!=-1){n._applycellselection(q,L.datafield,false,false)}}}if(n.selectionmode.indexOf("cell")!=-1){if(n.editmode=="selectedcell"&&!Y&&n.editcell){n.endcelledit(n.editcell.row,n.editcell.column,false,true)}}if(n.editmode=="dblclick"&&!Y&&n.editcell&&!(n.editcell.row==q&&L.datafield==n.editcell.column)){n.endcelledit(n.editcell.row,n.editcell.column,false,true)}}return true}}}}return true},_columnPropertyChanged:function(e,d,g,f){},_rowPropertyChanged:function(g,d,f,e){},_serializeObject:function(d){if(d==null){return""}var e="";b.each(d,function(g){var i=this;if(g>0){e+=", "}e+="[";var f=0;for(var h in i){if(f>0){e+=", "}e+="{"+h+":"+i[h]+"}";f++}e+="]"});return e},isbindingcompleted:function(){return !this._loading},propertiesChangedHandler:function(d,e,f){if(f.width&&f.height&&Object.keys(f).length==2){d._updatesize(true,true);d._resizeWindow();if(d.virtualmode&&!d._loading){d.vScrollInstance.setPosition(0)}else{setTimeout(function(){d._renderrows(d.virtualsizeinfo)},100)}}},propertyChangedHandler:function(e,f,i,h){if(this.isInitialized==undefined||this.isInitialized==false){return}if(e.batchUpdate&&e.batchUpdate.width&&e.batchUpdate.height&&Object.keys(e.batchUpdate).length==2){return}f=f.toLowerCase();switch(f){case"cardview":case"cardviewsize":case"cardviewcolumns":case"cardheight":e.rowsheight=32;e.__rowsheight=e.rowsheight;e.virtualsizeinfo=null;if(e.cardview){e.__rowsheight=e.rowsheight;e.rowsheight=e.cardheight}e.render();break;case"editable":case"showcolumnheaderlines":case"showcolumnlines":case"showrowlines":e.refresh();break;case"everpresentrowactionsmode":if(i!=h){e._removeaddnewrow();e.render()}break;case"everpresentrowactions":e._updateaddnewrowui();break;case"showeverpresentrow":case"everpresentrowposition":case"everpresentrowheight":if(i!=h){e._removeaddnewrow();e.render()}break;case"rtl":e.content.css("left","");e.columns=e._columns;e._filterrowcache=[];e.vScrollBar.jqxScrollBar({rtl:h});e.hScrollBar.jqxScrollBar({rtl:h});if(e._initpager){e._initpager()}if(e._initgroupsheader){e._initgroupsheader()}e.render();break;case"enablebrowserselection":if(!e.showfilterrow){if(!e.showstatusbar&&!e.showtoolbar){e.host.addClass("jqx-disableselect")}e.content.addClass("jqx-disableselect")}if(e.enablebrowserselection){e.content.removeClass("jqx-disableselect");e.host.removeClass("jqx-disableselect")}break;case"columnsheight":if(e.columnsheight!=32||e.columngroups){e._measureElement("column")}e._render(true,true,true,false,false);break;case"rowsheight":if(h!=i){if(e.rowsheight!=31){e._measureElement("cell")}e.virtualsizeinfo=null;e.rendergridcontent(true,false);e.refresh()}break;case"scrollMode":e.vScrollInstance.thumbStep=e.rowsheight;break;case"showdefaultloadelement":e._builddataloadelement();break;case"showfiltermenuitems":case"showsortmenuitems":case"showgroupmenuitems":case"filtermode":e._initmenu();break;case"touchmode":if(i!=h){e._removeHandlers();e.touchDevice=null;e.vScrollBar.jqxScrollBar({touchMode:h});e.hScrollBar.jqxScrollBar({touchMode:h});e._updateTouchScrolling();e._arrange();e._updatecolumnwidths();e._updatecellwidths();e._addHandlers()}break;case"autoshowcolumnsmenubutton":if(i!=h){e._rendercolumnheaders()}break;case"rendergridrows":if(i!=h){e.updatebounddata()}break;case"editmode":if(i!=h){e._removeHandlers();e._addHandlers()}break;case"source":e.updatebounddata();if(e.virtualmode&&!e._loading){e.loadondemand=true;e._renderrows(e.virtualsizeinfo)}break;case"horizontalscrollbarstep":case"verticalscrollbarstep":case"horizontalscrollbarlargestep":case"verticalscrollbarlargestep":this.vScrollBar.jqxScrollBar({step:this.verticalscrollbarstep,largestep:this.verticalscrollbarlargestep});this.hScrollBar.jqxScrollBar({step:this.horizontalscrollbarstep,largestep:this.horizontalscrollbarlargestep});break;case"closeablegroups":if(e._initgroupsheader){e._initgroupsheader()}break;case"showgroupsheader":if(i!=h){e._arrange();if(e._initgroupsheader){e._initgroupsheader()}e._renderrows(e.virtualsizeinfo)}break;case"theme":if(h!=i){b.jqx.utilities.setTheme(i,h,e.host);if(e.gridmenu){e.gridmenu.jqxMenu({theme:h})}if(e.pageable){e._updatepagertheme()}if(e.filterable){e._updatefilterrowui(true)}if(e.showeverpresentrow){e._updateaddnewrowui(true)}e._applyThemeSettings()}break;case"showtoolbar":case"showfilterbar":case"toolbarheight":if(i!=h){e._arrange();e.refresh()}break;case"showstatusbar":if(i!=h){if(e.statusbar){if(h){e.statusbar.show()}else{e.statusbar.hide()}}e._arrange();e.refresh()}break;case"statusbarheight":if(i!=h){e._arrange();e.refresh()}break;case"filterable":case"showfilterrow":if(i!=h){e.render()}break;case"autoshowfiltericon":case"showfiltercolumnbackground":case"showpinnedcolumnbackground":case"showsortcolumnbackground":if(i!=h){e.rendergridcontent()}break;case"showrowdetailscolumn":if(i!=h){e.render()}break;case"scrollbarsize":if(i!=h){b.jqx.utilities.scrollBarSize=h;e._arrange()}break;case"width":case"height":if(i!=h){e._updatesize(true,true);e._resizeWindow();if(e.virtualmode&&!e._loading){e.vScrollInstance.setPosition(0)}else{setTimeout(function(){e._renderrows(e.virtualsizeinfo)},100)}}break;case"altrows":case"altstart":case"altstep":if(i!=h){e._renderrows(e.virtualsizeinfo)}break;case"groupsheaderheight":if(i!=h){e._arrange();if(e._initgroupsheader){e._initgroupsheader()}}break;case"pagerheight":if(i!=h){e._initpager()}break;case"selectedrowindex":e.selectrow(h);break;case"selectionmode":if(i!=h){if(h=="none"){e.selectedrowindexes=new Array();e.selectedcells=new Array();e.selectedrowindex=-1}e._renderrows(e.virtualsizeinfo);if(h=="checkbox"){e._render(false,false,true,false,false)}}break;case"showheader":if(h){e.columnsheader.css("display","block")}else{e.columnsheader.css("display","none")}break;case"virtualmode":if(i!=h){e.dataview.virtualmode=e.virtualmode;e.dataview.refresh(false);e._render(false,false,false)}break;case"columnsmenu":if(i!=h){e.render()}break;case"columngroups":e._render(true,true,true,false,false);break;case"columns":if(e.columns&&e.columns.length>e.headerZIndex){e.headerZIndex=e.columns.length+100}if(e._serializeObject(e._cachedcolumns)!==e._serializeObject(h)){var d=false;if(e.filterable){if(i&&i.records){b.each(i.records,function(){if(this.filter){d=true}e.dataview.removefilter(this.displayfield,this.filter)})}}e._columns=null;e._filterrowcache=[];e.render();if(d){e.applyfilters()}e._cachedcolumns=e.columns;if(e.removesort){e.removesort()}}else{e[f]=i}break;case"autoheight":if(i!=h){e._render(false,false,true)}break;case"pagermode":case"pagerbuttonscount":if(i!=h){if(e._initpager){if(e.pagershowrowscombo){e.pagershowrowscombo.jqxDropDownList("destroy");e.pagershowrowscombo=null}if(e.pagerrightbutton){e.removeHandler(e.pagerrightbutton,"mousedown");e.removeHandler(e.pagerrightbutton,"mouseup");e.removeHandler(e.pagerrightbutton,"click");e.pagerrightbutton.jqxButton("destroy");e.pagerrightbutton=null}if(e.pagerleftbutton){e.removeHandler(e.pagerleftbutton,"mousedown");e.removeHandler(e.pagerleftbutton,"mouseup");e.removeHandler(e.pagerleftbutton,"click");e.pagerleftbutton.jqxButton("destroy");e.removeHandler(b(document),"mouseup.pagerbuttons"+e.element.id);e.pagerleftbutton=null}e.pagerdiv.remove();e._initpager()}}break;case"pagesizeoptions":case"pageable":case"pagesize":if(i!=h){if(e._loading){throw new Error("jqxGrid: "+e.loadingerrormessage);return}if(!e.host.jqxDropDownList||!e.host.jqxListBox){e._testmodules();return}if(e._initpager){if(f!="pageable"&&f!="pagermode"){if(typeof(h)=="string"){var g="The expected value type is: Int.";if(f!="pagesize"){var g="The expected value type is: Array of Int values."}throw new Error("Invalid Value for: "+f+". "+g)}}e.dataview.pageable=e.pageable;e.dataview.pagenum=0;e.dataview.pagesize=e._getpagesize();if(e.virtualmode){e.updatebounddata()}e.dataview.refresh(true);e._initpager();if(f=="pagesizeoptions"){if(h!=null&&h.length>0){e.pagesize=parseInt(h[0]);e.dataview.pagesize=parseInt(h[0]);e.prerenderrequired=true;e._requiresupdate=true;e.dataview.pagenum=-1;e.gotopage(0)}}}e._render(false,false,false)}break;case"groups":if(e._serializeObject(i)!==e._serializeObject(h)){e.dataview.groups=h;e._refreshdataview();e._render(true,true,true,false)}break;case"groupable":if(i!=h){e.dataview.groupable=e.groupable;e.dataview.pagenum=0;e.dataview.refresh(false);e._render(false,false,true)}break;case"renderstatusbar":if(h!=null){e.renderstatusbar(e.statusbar)}break;case"rendertoolbar":if(h!=null){e.rendertoolbar(e.toolbar)}break;case"disabled":if(h){e.host.addClass(e.toThemeProperty("jqx-fill-state-disabled"))}else{e.host.removeClass(e.toThemeProperty("jqx-fill-state-disabled"))}b.jqx.aria(e,"aria-disabled",e.disabled);if(e.pageable){if(e.pagerrightbutton){e.pagerrightbutton.jqxButton({disabled:h});e.pagerleftbutton.jqxButton({disabled:h});e.pagershowrowscombo.jqxDropDownList({disabled:h});e.pagergotoinput.attr("disabled",h)}if(e.pagerfirstbutton){e.pagerfirstbutton.jqxButton({disabled:h});e.pagerlastbutton.jqxButton({disabled:h})}}e.vScrollBar.jqxScrollBar({disabled:h});e.hScrollBar.jqxScrollBar({disabled:h});if(e.filterable&&e.showfilterrow){e._updatefilterrowui(true)}if(e.showeverpresentrow){e._updateaddnewrowui(true)}break}}});function c(d,e){this.owner=d;this.datafield=null;this.displayfield=null;this.text="";this.createfilterpanel=null;this.sortable=true;this.hideable=true;this.editable=true;this.hidden=false;this.adaptivehidden=false;this.groupable=true;this.renderer=null;this.cellsrenderer=null;this.checkchange=null,this.threestatecheckbox=false;this.buttonclick=null,this.columntype=null;this.cellsformat="";this.align="left";this.cellsalign="left";this.width="auto";this.minwidth=25;this.maxwidth="auto";this.pinned=false;this.visibleindex=-1;this.filterable=true;this.filter=null;this.filteritems=[];this.resizable=true;this.initeditor=null;this.createeditor=null;this.createwidget=null;this.initwidget=null;this.destroywidget=null;this.destroyeditor=null;this.geteditorvalue=null;this.validation=null;this.classname="";this.cellclassname="";this.cellendedit=null;this.cellbeginedit=null;this.cellvaluechanging=null;this.aggregates=null;this.aggregatesrenderer=null;this.menu=true;this.createfilterwidget=null;this.filtertype="default";this.filtercondition=null;this.rendered=null;this.exportable=true;this.exporting=false;this.draggable=true;this.nullable=true;this.clipboard=true;this.selectable=false;this.autofill=true;this._applyStyle=function(){var f=this;if(f.hovered){if(f.style.headerBackgroundHoveredColor){f.element.style.backgroundColor=f.style.headerBackgroundHoveredColor}if(f.style.headerHoveredColor){f.element.style.color=f.style.headerHoveredColor}return}if(f.selected){if(f.style.headerBackgroundSelectedColor){f.element.style.backgroundColor=f.style.headerBackgroundSelectedColor}if(f.style.headerSelectedColor){f.element.style.color=f.style.headerSelectedColor}return}if(f.style.headerBackgroundColor){f.element.style.backgroundColor=f.style.headerBackgroundColor}else{f.element.style.backgroundColor=""}if(f.style.headerColor){f.element.style.color=f.style.headerColor}else{f.element.style.color=""}};this._applyCellStyle=function(f){var j=this;var g=false;if(f.length){for(var h=0;h=0){if(j.style.backgroundHoveredColor){f.style.backgroundColor=j.style.backgroundHoveredColor}if(j.style.hoveredColor){f.style.color=j.style.hoveredColor}return}if(f.className.indexOf("selected")>=0){if(j.style.backgroundSelectedColor){f.style.backgroundColor=j.style.backgroundSelectedColor}if(j.style.selectedColor){f.style.color=j.style.selectedColor}return}if(j.style.backgroundColor){f.style.backgroundColor=j.style.backgroundColor}if(j.style.color){f.style.color=j.style.color}};this.style={headerBackgroundColor:"",headerColor:"",headerBackgroundHoveredColor:"",headerHoveredColor:"",headerBackgroundSelectedColor:"",headerSelectedColor:"",backgroundColor:"",color:"",backgroundHoveredColor:"",hoveredColor:"",backgroundSelectedColor:"",selectedColor:""};this.enabletooltips=true;this.columngroup=null;this.filterdelay=800;this.reseteverpresentrowwidgetvalue=null;this.geteverpresentrowwidgetvalue=null;this.createeverpresentrowwidget=null;this.initeverpresentrowwidget=null;this.validateeverpresentrowwidgetvalue=null;this.destroyeverpresentrowwidget=null;this.getcolumnproperties=function(){return{nullable:this.nullable,sortable:this.sortable,hideable:this.hideable,hidden:this.hidden,groupable:this.groupable,width:this.width,align:this.align,editable:this.editable,minwidth:this.minwidth,maxwidth:this.maxwidth,resizable:this.resizable,datafield:this.datafield,text:this.text,exportable:this.exportable,cellsalign:this.cellsalign,pinned:this.pinned,cellsformat:this.cellsformat,columntype:this.columntype,classname:this.classname,cellclassname:this.cellclassname,menu:this.menu}},this.setproperty=function(f,g){if(this[f]){var h=this[f];this[f]=g;this.owner._columnPropertyChanged(this,f,g,h)}else{if(this[f.toLowerCase()]){var h=this[f.toLowerCase()];this[f.toLowerCase()]=g;this.owner._columnPropertyChanged(this,f.toLowerCase(),g,h)}}};this._initfields=function(g){if(g!=null){var f=this.that;if(b.jqx.hasProperty(g,"dataField")){this.datafield=b.jqx.get(g,"dataField")}if(b.jqx.hasProperty(g,"selectable")){this.selectable=b.jqx.get(g,"selectable")}if(b.jqx.hasProperty(g,"displayField")){this.displayfield=b.jqx.get(g,"displayField")}else{this.displayfield=this.datafield}if(b.jqx.hasProperty(g,"enableTooltips")){this.enabletooltips=b.jqx.get(g,"enableTooltips")}if(b.jqx.hasProperty(g,"text")){this.text=b.jqx.get(g,"text")}else{this.text=this.displayfield}if(b.jqx.hasProperty(g,"style")){this.style=b.jqx.get(g,"style")}if(b.jqx.hasProperty(g,"createfilterpanel")){this.createfilterpanel=b.jqx.get(g,"createfilterpanel")}if(b.jqx.hasProperty(g,"sortable")){this.sortable=b.jqx.get(g,"sortable")}if(b.jqx.hasProperty(g,"hideable")){this.hideable=b.jqx.get(g,"hideable")}if(b.jqx.hasProperty(g,"hidden")){this.hidden=b.jqx.get(g,"hidden")}if(b.jqx.hasProperty(g,"adaptivehidden")){this.adaptivehidden=b.jqx.get(g,"adaptivehidden")}if(b.jqx.hasProperty(g,"groupable")){this.groupable=b.jqx.get(g,"groupable")}if(b.jqx.hasProperty(g,"renderer")){this.renderer=b.jqx.get(g,"renderer")}if(b.jqx.hasProperty(g,"align")){this.align=b.jqx.get(g,"align")}if(b.jqx.hasProperty(g,"cellsAlign")){this.cellsalign=b.jqx.get(g,"cellsAlign")}if(b.jqx.hasProperty(g,"clipboard")){this.clipboard=b.jqx.get(g,"clipboard")}if(b.jqx.hasProperty(g,"cellsFormat")){this.cellsformat=b.jqx.get(g,"cellsFormat")}if(b.jqx.hasProperty(g,"width")){this.width=b.jqx.get(g,"width")}if(b.jqx.hasProperty(g,"autofill")){this.autofill=b.jqx.get(g,"autofill")}if(b.jqx.hasProperty(g,"minWidth")){this.minwidth=parseInt(b.jqx.get(g,"minWidth"));if(isNaN(this.minwidth)){this.minwidth=25}}if(b.jqx.hasProperty(g,"maxWidth")){this.maxwidth=parseInt(b.jqx.get(g,"maxWidth"));if(isNaN(this.maxwidth)){this.maxwidth="auto"}}if(b.jqx.hasProperty(g,"cellsRenderer")){this.cellsrenderer=b.jqx.get(g,"cellsRenderer")}else{if(g.cellsRenderer){this.cellsrenderer=g.cellsRenderer}}if(b.jqx.hasProperty(g,"columnType")){this.columntype=b.jqx.get(g,"columnType")}if(b.jqx.hasProperty(g,"checkChange")){this.checkchange=b.jqx.get(g,"checkChange")}if(b.jqx.hasProperty(g,"buttonClick")){this.buttonclick=b.jqx.get(g,"buttonClick")}else{if(g.buttonClick){this.buttonclick=g.buttonClick}}if(b.jqx.hasProperty(g,"pinned")){this.pinned=b.jqx.get(g,"pinned")}if(b.jqx.hasProperty(g,"visibleIndex")){this.visibleindex=b.jqx.get(g,"visibleIndex")}if(b.jqx.hasProperty(g,"filterable")){this.filterable=b.jqx.get(g,"filterable")}if(b.jqx.hasProperty(g,"filter")){this.filter=b.jqx.get(g,"filter")}if(b.jqx.hasProperty(g,"resizable")){this.resizable=b.jqx.get(g,"resizable")}if(b.jqx.hasProperty(g,"editable")){this.editable=b.jqx.get(g,"editable")}if(b.jqx.hasProperty(g,"initEditor")){this.initeditor=b.jqx.get(g,"initEditor")}else{if(g.initEditor){this.initeditor=g.initEditor}}if(b.jqx.hasProperty(g,"createEditor")){this.createeditor=b.jqx.get(g,"createEditor")}else{if(g.createEditor){this.createeditor=g.createEditor}}if(b.jqx.hasProperty(g,"initWidget")){this.initwidget=b.jqx.get(g,"initWidget")}else{if(g.initWidget){this.initwidget=g.initWidget}}if(b.jqx.hasProperty(g,"createWidget")){this.createwidget=b.jqx.get(g,"createWidget")}else{if(g.createWidget){this.createwidget=g.createWidget}}if(b.jqx.hasProperty(g,"destroyWidget")){this.destroywidget=b.jqx.get(g,"destroyWidget")}else{if(g.destroyWidget){this.destroywidget=g.destroyWidget}}if(b.jqx.hasProperty(g,"reseteverpresentrowwidgetvalue")||b.jqx.hasFunction(g,"reseteverpresentrowwidgetvalue")){this.reseteverpresentrowwidgetvalue=b.jqx.get(g,"reseteverpresentrowwidgetvalue")}else{if(g.resetEverPresentRowWidgetValue){this.reseteverpresentrowwidgetvalue=g.resetEverPresentRowWidgetValue}}if(b.jqx.hasProperty(g,"geteverpresentrowwidgetvalue")||b.jqx.hasFunction(g,"geteverpresentrowwidgetvalue")){this.geteverpresentrowwidgetvalue=b.jqx.get(g,"geteverpresentrowwidgetvalue")}else{if(g.getEverPresentRowWidgetValue){this.geteverpresentrowwidgetvalue=g.getEverPresentRowWidgetValue}}if(b.jqx.hasProperty(g,"createeverpresentrowwidget")||b.jqx.hasFunction(g,"createeverpresentrowwidget")){this.createeverpresentrowwidget=b.jqx.get(g,"createeverpresentrowwidget")}else{if(g.createEverPresentRowWidget){this.createeverpresentrowwidget=g.createEverPresentRowWidget}}if(b.jqx.hasProperty(g,"initeverpresentrowwidget")||b.jqx.hasFunction(g,"initeverpresentrowwidget")){this.initeverpresentrowwidget=b.jqx.get(g,"initeverpresentrowwidget")}else{if(g.initEverPresentRowWidget){this.initeverpresentrowwidget=g.initEverPresentRowWidget}}if(b.jqx.hasProperty(g,"validateeverpresentrowwidgetvalue")){this.validateeverpresentrowwidgetvalue=b.jqx.get(g,"validateeverpresentrowwidgetvalue")}else{if(g.validateEverPresentRowWidgetValue){this.validateeverpresentrowwidgetvalue=g.validateEverPresentRowWidgetValue}}if(b.jqx.hasProperty(g,"destroyeverpresentrowwidget")||b.jqx.hasFunction(g,"destroyeverpresentrowwidget")){this.destroyeverpresentrowwidget=b.jqx.get(g,"destroyeverpresentrowwidget")}else{if(g.destroyEverPresentRowWidget){this.destroyEverPresentRowWidget=g.destroyEverPresentRowWidget}}if(b.jqx.hasProperty(g,"destroyEditor")){this.destroyeditor=b.jqx.get(g,"destroyEditor")}else{if(g.destroyEditor){this.destroyeditor=g.destroyEditor}}if(b.jqx.hasProperty(g,"getEditorValue")){this.geteditorvalue=b.jqx.get(g,"getEditorValue")}else{if(g.getEditorValue){this.geteditorvalue=g.getEditorValue}}if(b.jqx.hasProperty(g,"validation")){this.validation=b.jqx.get(g,"validation")}else{if(g.validation){this.validation=g.validation}}if(b.jqx.hasProperty(g,"cellBeginEdit")){this.cellbeginedit=b.jqx.get(g,"cellBeginEdit")}else{if(g.cellBeginEdit){this.cellbeginedit=g.cellBeginEdit}}if(b.jqx.hasProperty(g,"cellEndEdit")){this.cellendedit=b.jqx.get(g,"cellEndEdit")}else{if(g.cellEndEdit){this.cellendedit=g.cellEndEdit}}if(b.jqx.hasProperty(g,"className")){this.classname=b.jqx.get(g,"className")}if(b.jqx.hasProperty(g,"cellClassName")){this.cellclassname=b.jqx.get(g,"cellClassName")}else{if(g.cellClassName){this.cellclassname=g.cellClassName}}if(b.jqx.hasProperty(g,"menu")){this.menu=b.jqx.get(g,"menu")}if(b.jqx.hasProperty(g,"aggregates")){this.aggregates=b.jqx.get(g,"aggregates")}if(b.jqx.hasProperty(g,"aggregatesRenderer")){this.aggregatesrenderer=b.jqx.get(g,"aggregatesRenderer")}if(b.jqx.hasProperty(g,"createFilterWidget")){this.createfilterwidget=b.jqx.get(g,"createFilterWidget")}if(b.jqx.hasProperty(g,"filterType")){this.filtertype=b.jqx.get(g,"filterType")}if(b.jqx.hasProperty(g,"filterDelay")){this.filterdelay=b.jqx.get(g,"filterDelay")}if(b.jqx.hasProperty(g,"rendered")){this.rendered=b.jqx.get(g,"rendered")}if(b.jqx.hasProperty(g,"exportable")){this.exportable=b.jqx.get(g,"exportable")}if(b.jqx.hasProperty(g,"filterItems")){this.filteritems=b.jqx.get(g,"filterItems")}if(b.jqx.hasProperty(g,"cellValueChanging")){this.cellvaluechanging=b.jqx.get(g,"cellValueChanging")}if(b.jqx.hasProperty(g,"draggable")){this.draggable=b.jqx.get(g,"draggable")}if(b.jqx.hasProperty(g,"filterCondition")){this.filtercondition=b.jqx.get(g,"filterCondition")}if(b.jqx.hasProperty(g,"threeStateCheckbox")){this.threestatecheckbox=b.jqx.get(g,"threeStateCheckbox")}if(b.jqx.hasProperty(g,"nullable")){this.nullable=b.jqx.get(g,"nullable")}if(b.jqx.hasProperty(g,"columnGroup")){this.columngroup=b.jqx.get(g,"columnGroup")}if(!g instanceof String&&!(typeof g=="string")){for(var h in g){if(!f.hasOwnProperty(h)){if(!f.hasOwnProperty(h.toLowerCase())){d.host.remove();throw new Error("jqxGrid: Invalid property name - "+h+".")}}}}}};this._initfields(e);return this}function a(d,e){this.setdata=function(f){if(f!=null){this.bounddata=f;this.boundindex=f.boundindex;this.visibleindex=f.visibleindex;this.group=f.group;this.parentbounddata=f.parentItem;this.uniqueid=f.uniqueid;this.level=f.level}};this.setdata(e);this.parentrow=null;this.subrows=new Array();this.owner=d;this.height=25;this.hidden=false;this.rowdetails=null;this.rowdetailsheight=100;this.rowdetailshidden=true;this.top=-1;this.setrowinfo=function(f){this.hidden=f.hidden;this.rowdetails=f.rowdetails;this.rowdetailsheight=f.rowdetailsheight;this.rowdetailshidden=!f.showdetails;this.height=f.height};return this}b.jqx.collection=function(d){this.records=new Array();this.owner=d;this.updating=false;this.beginupdate=function(){this.updating=true};this.resumeupdate=function(){this.updating=false};this._raiseEvent=function(e){};this.clear=function(){this.records=new Array()};this.replace=function(f,e){this.records[f]=e;if(!this.updating){this._raiseEvent({type:"replace",element:e})}};this.isempty=function(e){if(this.records[e]==undefined){return true}return false};this.initialize=function(e){if(e<1){e=1}this.records[e-1]=-1};this.length=function(){return this.records.length};this.indexOf=function(e){return this.records.indexOf(e)};this.add=function(e){if(e==null){return false}this.records[this.records.length]=e;if(!this.updating){this._raiseEvent({type:"add",element:e})}return true};this.insertAt=function(f,e){if(f==null||f==undefined){return false}if(e==null){return false}if(f>=0){if(f0){var J=0;y.records=I.grid.rendergridrows(m);if(y.records.length){J=y.records.length}if(y.records&&!y.records[m.startindex]){var K=new Array();var H=m.startindex;b.each(y.records,function(){K[H]=this;H++;J++});y.records=K}if(J==0){if(y.records){b.each(y.records,function(){J++})}}if(J>0&&J0){G.grid.deleterow(x,false);G.grid._updateFromAdapter=false}}if(o=="update"){return}}var m=G.totalrecords;B(G,o);if(y.localdata.notifier===null&&y.localdata.name=="observableArray"){y.localdata.notifier=function(L){if(G._updating){return}G._updating=true;var K=G.grid.getrowid(L.index);switch(L.type){case"add":var H=b.extend({},L.object[L.index]);var J=h.getid(y.id,H,L.index);if(L.index===0){G.grid.addrow(J,H,"first")}else{G.grid.addrow(J,H)}break;case"delete":G.grid.deleterow(K);break;case"update":if(L.path&&L.path.split(".").length>1){var I=L.path.split(".");G.grid.setcellvalue(L.index,I[I.length-1],L.newValue)}else{var H=b.extend({},L.object[L.index]);G.grid.updaterow(K,H)}break}G._updating=false}}if(o=="updateData"){G.refresh();G.grid._updateGridData()}else{if(y.recordstartindex&&G.virtualmode){G.updateview(y.recordstartindex,y.recordstartindex+G.pagesize)}else{G.refresh()}G.update(m!=G.totalrecords)}};n();h.bindBindingUpdate(G.grid.element.id,n)}break;case"json":case"jsonp":case"xml":case"xhtml":case"script":case"text":case"csv":case"tab":if(y.localdata!=null){h.unbindBindingUpdate(G.grid.element.id);if((!G.grid.autobind&&G.grid.isInitialized)||G.grid.autobind){h.dataBind()}var n=function(o){var m=G.totalrecords;B(G);if(o=="updateData"){G.refresh();G.grid._updateGridData()}else{if(y.recordstartindex&&G.virtualmode){G.updateview(y.recordstartindex,y.recordstartindex+G.pagesize)}else{G.refresh()}G.update(m!=G.totalrecords)}};n();h.bindBindingUpdate(G.grid.element.id,n);return}var D={};var C=[];var v=0;var E={};for(var j=0;j0){for(var s=0;s0){return b(g,e).text()}if(g){if(g.toString().length>0){var d=b(e).attr(g);if(d!=null&&d.toString().length>0){return d}}}return f};this.getvaluebytype=function(g,d){var e=g;if(d.type=="date"){var f=new Date(g);if(f.toString()=="NaN"||f.toString()=="Invalid Date"){if(b.jqx.dataFormat){g=b.jqx.dataFormat.tryparsedate(g)}else{g=f}}else{g=f}if(g==null){g=e}}else{if(d.type=="float"){var g=parseFloat(g);if(isNaN(g)){g=e}}else{if(d.type=="int"){var g=parseInt(g);if(isNaN(g)){g=e}}else{if(d.type=="bool"){if(g!=null){if(g.toLowerCase()=="false"){g=false}else{if(g.toLowerCase()=="true"){g=true}}}if(g==1){g=true}else{if(g==0){g=false}else{g=""}}}}}}return g};this.setpaging=function(d){if(d.pageSize!=undefined){this.pagesize=d.pageSize}if(d.pageNum!=undefined){this.pagenum=Math.min(d.pageNum,Math.ceil(this.totalrows/this.pagesize))}this.refresh()};this.getpagingdetails=function(){return{pageSize:this.pagesize,pageNum:this.pagenum,totalrows:this.totalrows}};this._clearcaches=function(){this.sortcache={};this.sortdata=null;this.changedrecords=new Array();this.records=new Array();this.rows=new Array();this.cacheddata=new Array();this.originaldata=new Array();this.bounditems=new Array();this.loadedrecords=new Array();this.loadedrootgroups=new Array();this.loadedgroups=new Array();this.loadedgroupsByKey=new Array();this._cachegrouppages=new Array();this.recordsbyid=new Array();this.cachedrecords=new Array();this.recordids=new Array()};this.addfilter=function(g,f){var e=-1;for(var d=0;d0&&!this.virtualmode;if(!e&&n!=undefined&&d!=undefined){n.uid=d;if(!(n[this.source.id])){n[this.source.id]=n.uid}var j=this.recordsbyid["id"+d];var k=this.records.indexOf(j);if(k==-1){return false}this.records[k]=n;if(this.cachedrecords){this.cachedrecords[k]=n}if(l==true||l==undefined){this.refresh()}this.changedrecords[n.uid]={Type:"Update",OldData:j,Data:n};return true}else{if(this.filters&&this.filters.length>0){var f=this.cachedrecords;var j=null;var k=-1;for(var h=0;h0){if(d=="last"){this.cachedrecords.push(i)}else{if(typeof d==="number"&&isFinite(d)){this.cachedrecords.splice(d,0,i)}else{this.cachedrecords.splice(0,0,i)}}}this.totalrecords++;if(this.virtualmode){this.source.totalrecords=this.totalrecords}if(g==true||g==undefined){this.refresh()}this.changedrecords[i.uid]={Type:"New",Data:i};return true}return false};this.deleterow=function(j,h){if(j!=undefined){var d=this.filters&&this.filters.length>0;if(this.recordsbyid["id"+j]&&!d){var e=this.recordsbyid["id"+j];var k=this.records.indexOf(e);if(this.grid&&this.grid.sortable&&this.grid.sortmode=="many"){for(var g=0;g0){var f=this.cachedrecords;var e=null;var k=-1;for(var g=0;g0&&this.loadgrouprecords){var q=u;q=this.loadgrouprecords(0,u,t,j,e,p,i,k,l)}else{w=this.loadflatrecords(u,t,j,e,p,i,k,l)}if(k>e){i.splice(e,k-e)}if(this.groups.length>0&&this.groupable){this.totalrows=q}else{this.totalrows=w}return l};this.loadflatrecords=function(u,r,h,d,p,g,j,l){var m=this.that;var o=u;var v=u;r=Math.min(r,this.totalrecords);var f=this.sortdata!=null;var s=this.source.id&&(this.source.datatype=="local"||this.source.datatype=="array"||this.source.datatype=="");var t=f?this.sortdata:this.records;for(var k=u;k=j||n!=g[d][m.uniqueId]||(p&&p[n])){l[l.length]=d}g[d]=q;d++;q.visibleindex=v;v++;o++}if(m.grid.summaryrows){var e=o;b.each(m.grid.summaryrows,function(){var i=b.extend({},this);i.boundindex=r++;m.loadedrecords[e]=i;i.uniqueid=m.generatekey();m.bounditems[m.bounditems.length]=i;g[d]=i;d++;i.visibleindex=v;v++;e++})}return v},this.updateview=function(o,p){var r=this.that;var k=this.pagesize*this.pagenum;var n=0;var s=new Array();var e=this.filters;var j=this.updated;var l=s.length;if(this.pageable){if(this.virtualmode){if(!this.groupable||this.groups.length==0){this.loadflatrecords(this.pagesize*this.pagenum,this.pagesize*(1+this.pagenum),e,n,j,s,l,[]);this.totalrows=s.length}else{if(this.groupable&&this.groups.length>0&&this.loadgrouprecords){if(this._cachegrouppages[this.pagenum+"_"+this.pagesize]!=undefined){this.rows=this._cachegrouppages[this.pagenum+"_"+this.pagesize];this.totalrows=this.rows.length;return}var m=this.pagesize*(1+this.pagenum);if(m>this.totalrecords){m=this.totalrecords}this.loadgrouprecords(0,this.pagesize*this.pagenum,m,e,n,j,s,l,[]);this._cachegrouppages[this.pagenum+"_"+this.pagesize]=this.rows;this.totalrows=this.rows.length;return}}}}else{if(this.virtualmode&&(!this.groupable||this.groups.length==0)){var g=this.pagesize;if(g==0){g=Math.min(100,this.totalrecords)}var d=g*this.pagenum;if(this.loadedrecords.length==0){d=0}if(o!=null&&p!=null){this.loadflatrecords(o,p,e,n,j,s,l,[])}else{this.loadflatrecords(this.pagesize*this.pagenum,this.pagesize*(1+this.pagenum),e,n,j,s,l,[])}this.totalrows=this.loadedrecords.length;this.rows=s;if(s.length>=g){return}}}if(this.groupable&&this.pageable&&this.groups.length>0&&this._updategroupsinpage){s=this._updategroupsinpage(r,e,k,n,l,this.pagesize*this.pagenum,this.pagesize*(1+this.pagenum))}else{for(var h=this.pagesize*this.pagenum;h=this.pagesize*this.pagenum&&k<=this.pagesize*(this.pagenum+1))){s[n]=q;n++}k++}}if((s.length==0||s.length0&&!this.virtualmode){var r="";var f=this.cachedrecords.length;var k=new Array();this.totalrecords=0;var B=this.cachedrecords;this._dataIndexToBoundIndex=new Array();var t=this.filters.length;if(this.source!=null&&this.source.filter!=undefined&&this.source.localdata!=undefined){var n=this.source.filter(this.filters,B,f);if(n==undefined){n=new Array()}for(var l=0;l=0;if(x){k[k.length]=b.extend({dataindex:l},h);this._dataIndexToBoundIndex[l]={boundindex:k.length-1}}else{this._dataIndexToBoundIndex[l]=null}}this.records=k}else{if(this.source.filter==null||this.source.filter==undefined){for(var l=0;l0||g!=o.length){this.rowschangecallback({type:"RowsChanged",data:{previous:g,current:o.length,diff:s}})}}};return this}})(jqxBaseFramework); -(function(a){a.jqx.dataview.grouping=function(){this.loadgrouprecords=function(B,E,p,C,G,e,P,D,v){var K=B;var h=this;var O=new Array();for(var l=0;l=D||F!=P[G][h.uniqueId]||(e&&e[F])){v[v.length]=G}var J=new Array();var u=0;for(var l=0;l0){ab=aa.subItems[aa.subItems.length-1];af.parentItem=ab.parentItem;if(af.parentItem.subItems){af.parentItem.subItems[af.parentItem.subItems.length]=af}var ac=[];var ae=function(){for(var ah=0;ah0){ab=aa.subGroups[aa.subGroups.length-1];af.level=ab.level;af.parentItem=aa;aa.subGroups[aa.subGroups.length]=af;var ac=[];var ae=function(ai){if(ai.totalsrow){return}for(var ah=0;ah0){S=o(Y,X,S)}else{if(X.subItems.length>0){S=g(Y,X,S)}}}}if(W.subItems.length>0){S=g(Y,W,S)}q(W);return S};var x=I.length;this.loadedgroups=new Array();this.rows=new Array();var K=0;for(var N=0;N0){var B=0;var h=new Array();var g=new Array();for(var m=0;mthis.totalrecords){f=this.totalrecords}for(var v=j;v=C.pagesize*C.pagenum&&L=u||D!=p[d][C.uniqueId]||(updated&&updated[D])){w[w.length]=d}var e=new Array();var y=0;for(var m=0;m0){var i=J(M);if(i){q=true;return true}}if(M.subItems.length>0){q=true;return true}}}if(O.subItems.length>0){q=true;return true}return q};var b=function(S,Q,T){var P=1;var M=S.grid.columns.records?S.grid.columns.records:S.grid.columns;if(S.aggregates==true){for(var N=0;N0){W=V.subItems[V.subItems.length-1];aa.parentItem=W.parentItem;if(aa.parentItem.subItems){aa.parentItem.subItems[aa.parentItem.subItems.length]=aa}var X=[];var Z=function(){for(var ac=0;ac0){W=V.subGroups[V.subGroups.length-1];aa.level=W.level;aa.parentItem=V;V.subGroups[V.subGroups.length]=aa;var X=[];var Z=function(ad){if(ad.totalsrow){return}for(var ac=0;ac0){T=b(S,R,T)}else{if(R.subItems.length>0){T=x(S,R,T)}}}}}if(Q.subItems.length>0){T=x(S,Q,T)}q(Q);return T};var K=0;for(var G=0;G');this.groupsheaderdiv.height(this.groupsheaderheight);this.groupsheaderdiv.css("top",0);this.groupsheader.append(this.groupsheaderdiv);this.groupheadersbounds=new Array();var d=this.groups.length;this.groupsheaderdiv.children().remove();this.groupsheaderdiv[0].innerHTML="";var b=new Array();if(d>0){a.each(this.groups,function(i){var n=this;var m=e._getColumnText(this);var l=m.label;var k=e._rendergroupcolumn(l,n);k.addClass(e.toThemeProperty("jqx-grid-group-column"));e.groupsheaderdiv.append(k);if(e.closeablegroups){var j=a(k.find(".jqx-icon-close"));if(e.isTouchDevice()&&e.touchmode!==true){e.addHandler(j,"touchstart",function(){e.removegroupat(i);return false})}else{e.addHandler(j,"click",function(){e.removegroupat(i);return false})}}if(e.sortable){e.addHandler(k,"click",function(){var o=e.getcolumn(n);if(o!=null){e._togglesort(o)}return false})}b[b.length]=k;e._handlegroupstocolumnsdragdrop(this,k);if(i');if(e.rtl){h.css("float","right")}h.width(e.groupindentwidth/3);h.height(1);h.css("top",g/2);h.addClass(e.toThemeProperty("jqx-grid-group-column-line"));e.groupsheaderdiv.append(h)}})}else{var f=a('
      '+c+"
      ");this.groupsheaderdiv.append(f);if(this.rtl){f.addClass(this.toThemeProperty("jqx-rtl"))}}this._groupheaders=b;this._updategroupheadersbounds()}},_updategroupheadersbounds:function(){var c=this;var b=this.groupsheaderdiv.children().outerHeight();var d=(this.groupsheader.height()-b)/2;this.groupsheaderdiv.css("top",d);if(!this.rtl){this.groupsheaderdiv.css("left",d);this.groupsheaderdiv.css("right","")}else{this.groupsheaderdiv.css("left","");this.groupsheaderdiv.css("right",d)}if(this.rtl){this._groupheaders.reverse()}a.each(this._groupheaders,function(f){var e=this.coord();c.groupheadersbounds[f]={left:e.left,top:e.top,width:this.outerWidth(),height:this.outerHeight(),index:f}})},addgroup:function(c){if(c){var b=this;if(b.groups!==b.dataview.groups){b.dataview.groups=b.groups}b.groups[b.groups.length]=c;b.refreshgroups();this._raiseEvent(12,{type:"Add",index:b.groups[b.groups.length],groups:b.groups})}},insertgroup:function(d,c){if(d!=undefined&&d!=null&&d>=0&&d<=this.groups.length){if(c){var b=this;if(b.groups!==b.dataview.groups){b.dataview.groups=b.groups}b.groups.splice(d,0,c.toString());b.refreshgroups();this._raiseEvent(12,{type:"Insert",index:d,groups:b.groups})}}},refreshgroups:function(){this._refreshdataview();this._render(true,true,true,false);this._postrender("group")},_insertaftergroup:function(d,c){var b=this._getGroupIndexByDataField(d);this.insertgroup(b+1,c)},_insertbeforegroup:function(d,c){var b=this._getGroupIndexByDataField(d);this.insertgroup(b,c)},removegroupat:function(c){if(c>=0&&c!=null&&c!=undefined){var b=this;if(b.groups!==b.dataview.groups){b.dataview.groups=b.groups}b.groups.splice(c,1);b.refreshgroups();if(b.virtualmode){b.updatebounddata()}this._raiseEvent(12,{type:"Remove",index:c,groups:b.groups});return true}return false},cleargroups:function(){var b=this;b.groups=[];b.dataview.groups=b.groups;b.refreshgroups();this._raiseEvent(12,{type:"Clear",index:-1,groups:b.groups});return true},removegroup:function(c){if(c==null){return false}var b=this.groups.indexOf(c.toString());return this.removegroupat(b)},getrootgroupscount:function(){var b=this.dataview.loadedrootgroups.length;return b},collapsegroup:function(c){if(c>=0&&c.toString().indexOf(".")===-1){return this._setrootgroupstate(c,false)}var b=c.toString().split(".");var f=null;if(!this.groupsVisibility){this.groupsVisibility=new Array()}for(var d=0;d=0&&c.toString().indexOf(".")===-1){return this._setrootgroupstate(c,true)}var b=c.toString().split(".");var f=null;for(var d=0;d0){d.subrows=h}}var i=this.jsonParser().stringify(k);i=i.replace(/subItems/ig,"subrows");i=i.replace(/subGroups/ig,"subgroups");d=this.jsonParser().parse(i);return d},getrootgroups:function(){var d=this.dataview.loadedrootgroups.length;var c=new Array();for(var b=0;b=0&&d0){c._setsubgroupsvisibility(c,e,!b||f,d)}else{if(e.subItems.length>0){c._setgroupitemsvisibility(c,e,!b||f)}}}if(f){c._setrowvisibility(e.visibleindex,f,false)}}if(h.subItems&&h.subItems.length>0){c._setgroupitemsvisibility(c,h,f)}},_handlecolumnsdragdrop:function(){var d=this;var g=-1;var c=false;if(!d.groupable){return}var f="mousemove.grouping"+this.element.id;var e="mousedown.grouping"+this.element.id;var h="mouseup.grouping"+this.element.id;var b=false;if(this.isTouchDevice()&&this.touchmode!==true){b=true;f=a.jqx.mobile.getTouchEventName("touchmove")+".grouping"+this.element.id;e=a.jqx.mobile.getTouchEventName("touchstart")+".grouping"+this.element.id;h=a.jqx.mobile.getTouchEventName("touchend")+".grouping"+this.element.id}this.removeHandler(a(document),f);this.addHandler(a(document),f,function(j){if(!d.showgroupsheader){return true}if(d.dragcolumn!=null){var l=parseInt(j.pageX);var u=parseInt(j.pageY);if(b){var r=d.getTouches(j);var p=r[0];l=parseInt(p.pageX);u=parseInt(p.pageY)}var n=d.host.coord();var v=parseInt(n.left);var w=parseInt(n.top);if(d.dragmousedownoffset==undefined||d.dragmousedownoffset==null){d.dragmousedownoffset={left:0,top:0}}var t=parseInt(l)-parseInt(d.dragmousedownoffset.left);var i=parseInt(u)-parseInt(d.dragmousedownoffset.top);d.dragcolumn.css({left:t+"px",top:i+"px"});c=false;if(l>=v&&l<=v+d.host.width()){if(u>=w&&u<=w+d.host.height()){c=true}}g=-1;if(c){d.dragcolumnicon.removeClass(d.toThemeProperty("jqx-grid-dragcancel-icon"));d.dragcolumnicon.addClass(d.toThemeProperty("jqx-grid-drag-icon"));var s=d.groupsheader.coord();var m=s.top+d.groupsheader.height();var q=a.data(d.dragcolumn[0],"datarecord");if(q){var k=d.groups.indexOf(q.toString())}else{var k=-1}var o=(k==-1)||(d.groups.length>1&&k>-1);if(d.dropline!=null){if(u>=s.top&&u<=m){if(o){g=d._handlegroupdroplines(l)}}else{d.dropline.fadeOut("slow")}}}else{if(d.dropline!=null){d.dropline.fadeOut("slow")}d.dragcolumnicon.removeClass(d.toThemeProperty("jqx-grid-drag-icon"));d.dragcolumnicon.addClass(d.toThemeProperty("jqx-grid-dragcancel-icon"))}if(b){j.preventDefault();j.stopPropagation();return false}}},{passive:false});this.removeHandler(a(document),h);this.addHandler(a(document),h,function(i){if(!d.showgroupsheader){return true}d.__drag=false;a(document.body).removeClass("jqx-disableselect");var m=parseInt(i.pageX);var s=parseInt(i.pageY);if(b){var p=d.getTouches(i);var o=p[0];m=parseInt(o.pageX);s=parseInt(o.pageY)}var n=d.host.coord();var t=parseInt(n.left);var u=parseInt(n.top);var k=d.groupsheader.height();if(d.showtoolbar){u+=d.toolbarheight}d.dragstarted=false;d.dragmousedown=null;if(d.dragcolumn!=null){var l=a.data(d.dragcolumn[0],"datarecord");d.dragcolumn.remove();d.dragcolumn=null;if(l!=null){if(!d.getcolumn(l).groupable){if(d.dropline!=null){d.dropline.remove();d.dropline=null}return}if(c){if(g!=-1){var q=g.index;var r=d.groups[q];var j=d._getGroupIndexByDataField(l);if(j!=q){if(j!=undefined&&j>=0){d.groups.splice(j,1)}if(g.position=="before"){if(!d.rtl){d._insertbeforegroup(r,l)}else{d._insertaftergroup(r,l)}}else{if(!d.rtl){d._insertaftergroup(r,l)}else{d._insertbeforegroup(r,l)}}}}else{if(d.groups.length==0){if(s>u&&s<=u+k){d.addgroup(l)}}else{if(s>u+k){var j=d._getGroupIndexByDataField(l);d.removegroupat(j)}}}}if(d.dropline!=null){d.dropline.remove();d.dropline=null}}}})},_getGroupIndexByDataField:function(b){for(var c=0;c0){f=this.left-1-b.groupindentwidth/6}b.dropline.css("left",f);b.dropline.css("top",this.top);b.dropline.height(this.height);b.dropline.fadeIn("slow");c={index:e,position:"before"};if(b.rtl){c={index:b.groupheadersbounds.length-1-e,position:"before"}}return false}else{if(d>=this.left+this.width/2){b.dropline.css("left",1+this.left+this.width);b.dropline.css("top",this.top);b.dropline.height(this.height);b.dropline.fadeIn("slow");c={index:e,position:"after"};if(b.rtl){c={index:b.groupheadersbounds.length-1-e,position:"after"}}}}});return c},_handlegroupstocolumnsdragdrop:function(c,e){this.dragmousedown=null;this.dragmousedownoffset=null;this.dragstarted=false;this.dragcolumn=null;var f=this;var d;var h="mousedown";var g="mousemove";var b=false;if(this.isTouchDevice()&&this.touchmode!==true){b=true;h=a.jqx.mobile.getTouchEventName("touchstart");g=a.jqx.mobile.getTouchEventName("touchmove")}this.addHandler(e,"dragstart",function(i){return false});this.addHandler(e,h,function(i){if(!f.showgroupsheader){return true}var l=i.pageX;var k=i.pageY;f.__drag=true;f.dragmousedown={left:l,top:k};if(b){var j=f.getTouches(i);var n=j[0];l=n.pageX;k=n.pageY;f.dragmousedown={left:l,top:k};if(i.preventDefault){i.preventDefault()}}var m=a(i.target).coord();f.dragmousedownoffset={left:parseInt(l)-parseInt(m.left),top:parseInt(k-m.top)}});this.addHandler(e,g,function(i){if(!f.showgroupsheader){return true}if(f.dragmousedown){d={left:i.pageX,top:i.pageY};if(b){var k=f.getTouches(i);var m=k[0];d={left:m.pageX,top:m.pageY}}if(!f.dragstarted&&f.dragcolumn==null){var j=Math.abs(d.left-f.dragmousedown.left);var l=Math.abs(d.top-f.dragmousedown.top);if(j>3||l>3){f._createdragcolumn(e,d,true);a(document.body).addClass("jqx-disableselect");a.data(f.dragcolumn[0],"datarecord",c);if(i.preventDefault){i.preventDefault()}}}}},{passive:false})},_createdragcolumn:function(c,e,g){var h=this;var f=e;h.dragcolumn=a("
      ");var j=c.clone();h.dragcolumn.css("z-index",999999);j.css("border-width","1px");j.css("opacity","0.4");var i=a(j.find("."+h.toThemeProperty("jqx-grid-column-menubutton")));if(i.length>0){i.css("display","none")}var b=a(j.find(".jqx-icon-close"));if(b.length>0){b.css("display","none")}h.dragcolumnicon=a('
      ');h.dragcolumnicon.addClass(h.toThemeProperty("jqx-grid-drag-icon"));h.dragcolumn.css("float","left");h.dragcolumn.css("position","absolute");var d=h.host.coord();j.width(c.width()+16);h.dragcolumn.append(j);h.dragcolumn.height(c.height());h.dragcolumn.width(j.width());h.dragcolumn.append(h.dragcolumnicon);a(document.body).append(h.dragcolumn);j.css("margin-left",0);j.css("left",0);j.css("top",0);h.dragcolumn.css("left",f.left+h.dragmousedown.left);h.dragcolumn.css("top",f.top+h.dragmousedown.top);if(g!=undefined&&g){h.dropline=a('
      ');h.dropline.width(2);h.dropline.addClass(h.toThemeProperty("jqx-grid-group-drag-line"));a(document.body).append(h.dropline)}},iscolumngroupable:function(b){return this._getcolumnproperty(b,"groupable")},_handlecolumnstogroupsdragdrop:function(c,f){this.dragmousedown=null;this.dragmousedownoffset=null;this.dragstarted=false;this.dragcolumn=null;var g=this;var e;var b=false;if(this.isTouchDevice()&&this.touchmode!==true){b=true}var d="mousedown.drag";var e="mousemove.drag";if(b){d=a.jqx.mobile.getTouchEventName("touchstart")+".drag";e=a.jqx.mobile.getTouchEventName("touchmove")+".drag"}else{this.addHandler(f,"dragstart",function(h){return false})}this.addHandler(f,d,function(j){if(!g.showgroupsheader){return true}g.__drag=true;if(g._isColumnInGroups(c.displayfield)){if(f.css("cursor")!="col-resize"){return true}else{return true}}if(false==c.groupable){return true}var i=j.pageX;var h=j.pageY;if(b){var k=g.getTouches(j);var m=k[0];i=m.pageX;h=m.pageY}g.dragmousedown={left:i,top:h};if(b){if(j.preventDefault){j.preventDefault()}}var l=a(j.target).coord();g.dragmousedownoffset={left:parseInt(i)-parseInt(l.left),top:parseInt(h-l.top)}});this.addHandler(f,e,function(j){if(!g.showgroupsheader){return true}if(g._isColumnInGroups(c.displayfield)){if(f.css("cursor")!="col-resize"){return true}else{return true}}if(g.dragmousedown){var i=j.pageX;var h=j.pageY;if(b){var l=g.getTouches(j);var n=l[0];i=n.pageX;h=n.pageY}e={left:i,top:h};if(!g.dragstarted&&g.dragcolumn==null){var k=Math.abs(e.left-g.dragmousedown.left);var m=Math.abs(e.top-g.dragmousedown.top);if(k>3||m>3){g._createdragcolumn(f,e,true);a.data(g.dragcolumn[0],"datarecord",c.displayfield);if(j.preventDefault){j.preventDefault()}}}}})},_rendergroupcolumn:function(g,h){var e=a('
      ');if(this.rtl){e.css("float","right")}if(this.groupcolumnrenderer!=null){e[0].innerHTML=this.groupcolumnrenderer(g);e.addClass(this.toThemeProperty("jqx-grid-group-column"));e.addClass(this.toThemeProperty("jqx-fill-state-normal"))}if(this.closeablegroups){if(e[0].innerHTML==""){e[0].innerHTML=''+g+""}if(this.rtl){e[0].innerHTML=''+g+""}var d=!this.rtl?"right":"left";var c='
      ';if(a.jqx.browser.msie&&a.jqx.browser.version<8){c='
      '}if(this.rtl){var c='
      ';if(a.jqx.browser.msie&&a.jqx.browser.version<8){c='
      '}}e[0].innerHTML+=c}else{if(e[0].innerHTML==""){e[0].innerHTML=''+g+""}}if(this.sortable){var f=a('
      ');var b=a('
      ');if(this.closeablegroups){var f=a('
      ');var b=a('
      ')}if(this.rtl){var f=a('
      ');var b=a('
      ');if(this.closeablegroups){var f=a('
      ');var b=a('
      ')}}f.css("display","none");b.css("display","none");if(a.jqx.browser.msie&&a.jqx.browser.version<8){f.css("float","left");b.css("float","left")}e.append(f);e.append(b);a.data(document.body,"groupsortelements"+h,{sortasc:f,sortdesc:b})}e.addClass(this.toThemeProperty("jqx-fill-state-normal"));e.addClass(this.toThemeProperty("jqx-grid-group-column"));return e},_rendergroup:function(p,x,b,v,k,B,u){var H=x;var c=x.cells[b.level];if(this.rtl){c=x.cells[x.cells.length-1-b.level]}var F=this._findgroupstate(b.uniqueid);if(b.bounddata.subGroups.length>0||b.bounddata.subItems.length>0){var i=this.rtl?"-rtl":"";var C=this.toThemeProperty("jqx-icon-arrow-right");if(i){C=this.toThemeProperty("jqx-icon-arrow-left")}if(F){c.className+=" "+this.toThemeProperty("jqx-grid-group-expand"+i)+" "+this.toThemeProperty("jqx-icon-arrow-down")}else{c.className+=" "+this.toThemeProperty("jqx-grid-group-collapse"+i)+" "+C}}var t=this._getColumnText(this.groups[b.level]).label;var d=this.groupindentwidth;var r=this.rowdetails&&this.showrowdetailscolumn?(1+p)*d:(p)*d;var y=u-r;var g=b.level+1;if(this.rtl){g=0}var n=H.cells[g];var A=2;while(n!=undefined&&n.style.display=="none"&&A0?b.bounddata.subItems.length:b.bounddata.subGroups.length;if(this.showgroupaggregates){var I=b.bounddata.subItems.length>0?b.bounddata.subItems:b.bounddata.subGroups;l=0;for(var G=0;G'+t+': '+b.group+" ("+l+")"}}else{var e=this._getcolumnbydatafield(this.groups[b.level]);var z=b.group;if(e!=null){if(e.cellsformat){if(a.jqx.dataFormat){if(a.jqx.dataFormat.isDate(z)){z=a.jqx.dataFormat.formatdate(z,e.cellsformat,this.gridlocalization)}else{if(a.jqx.dataFormat.isNumber(z)){z=a.jqx.dataFormat.formatnumber(z,e.cellsformat,this.gridlocalization)}}}}var l=b.bounddata.subItems.length>0?b.bounddata.subItems.length:b.bounddata.subGroups.length;if(this.showgroupaggregates){var I=b.bounddata.subItems.length>0?b.bounddata.subItems:b.bounddata.subGroups;l=0;for(var G=0;G'+t+': '+z+" ("+l+")"}else{throw new Error("jqxGrid: Unable to find '"+this.groups[b.level]+"' group in the Grid's columns collection.")}}if(this.rtl){if(!e){e=this._getcolumnbydatafield(this.groups[b.level])}var s=this.hScrollBar.css("visibility")=="hidden"?0:this.hScrollInstance.max-this.hScrollInstance.value;var D=this.vScrollBar.css("visibility")=="hidden"?0:this.scrollbarsize+6;var r=this.rowdetails&&this.showrowdetailscolumn?(2+b.level)*d:(1+b.level)*d;n.style.width=u+parseInt(s)-r-D+"px";f.addClass(this.toThemeProperty("jqx-rtl"));var w=a(x.cells[x.cells.length-1]).css("z-index");f.css("z-index",w);var E=f.find("div");var y=E.width();E.css("left","100%");var o=this.columns.records[x.cells.length-2-b.level]!=null?this.columns.records[x.cells.length-2-b.level].pinned:false;if(this.table.width()=D||F!=P[G][h.uniqueId]||(e&&e[F])){v[v.length]=G}var J=new Array();var u=0;for(var l=0;l0){ab=aa.subItems[aa.subItems.length-1];af.parentItem=ab.parentItem;if(af.parentItem.subItems){af.parentItem.subItems[af.parentItem.subItems.length]=af}var ac=[];var ae=function(){for(var ah=0;ah0){ab=aa.subGroups[aa.subGroups.length-1];af.level=ab.level;af.parentItem=aa;aa.subGroups[aa.subGroups.length]=af;var ac=[];var ae=function(ai){if(ai.totalsrow){return}for(var ah=0;ah0){S=o(Y,X,S)}else{if(X.subItems.length>0){S=g(Y,X,S)}}}}if(W.subItems.length>0){S=g(Y,W,S)}q(W);return S};var x=I.length;this.loadedgroups=new Array();this.rows=new Array();var K=0;for(var N=0;N0){var B=0;var h=new Array();var g=new Array();for(var m=0;mthis.totalrecords){f=this.totalrecords}for(var v=j;v=C.pagesize*C.pagenum&&L=u||D!=p[d][C.uniqueId]||(updated&&updated[D])){w[w.length]=d}var e=new Array();var y=0;for(var m=0;m0){var i=J(M);if(i){q=true;return true}}if(M.subItems.length>0){q=true;return true}}}if(O.subItems.length>0){q=true;return true}return q};var b=function(S,Q,T){var P=1;var M=S.grid.columns.records?S.grid.columns.records:S.grid.columns;if(S.aggregates==true){for(var N=0;N0){W=V.subItems[V.subItems.length-1];aa.parentItem=W.parentItem;if(aa.parentItem.subItems){aa.parentItem.subItems[aa.parentItem.subItems.length]=aa}var X=[];var Z=function(){for(var ac=0;ac0){W=V.subGroups[V.subGroups.length-1];aa.level=W.level;aa.parentItem=V;V.subGroups[V.subGroups.length]=aa;var X=[];var Z=function(ad){if(ad.totalsrow){return}for(var ac=0;ac0){T=b(S,R,T)}else{if(R.subItems.length>0){T=x(S,R,T)}}}}}if(Q.subItems.length>0){T=x(S,Q,T)}q(Q);return T};var K=0;for(var G=0;G');this.groupsheaderdiv.height(this.groupsheaderheight);this.groupsheaderdiv.css("top",0);this.groupsheader.append(this.groupsheaderdiv);this.groupheadersbounds=new Array();var d=this.groups.length;this.groupsheaderdiv.children().remove();this.groupsheaderdiv[0].innerHTML="";var b=new Array();if(d>0){a.each(this.groups,function(i){var n=this;var m=e._getColumnText(this);var l=m.label;var k=e._rendergroupcolumn(l,n);k.addClass(e.toThemeProperty("jqx-grid-group-column"));e.groupsheaderdiv.append(k);if(e.closeablegroups){var j=a(k.find(".jqx-icon-close"));if(e.isTouchDevice()&&e.touchmode!==true){e.addHandler(j,"touchstart",function(){e.removegroupat(i);return false})}else{e.addHandler(j,"click",function(){e.removegroupat(i);return false})}}if(e.sortable){e.addHandler(k,"click",function(){var o=e.getcolumn(n);if(o!=null){e._togglesort(o)}return false})}b[b.length]=k;e._handlegroupstocolumnsdragdrop(this,k);if(i');if(e.rtl){h.css("float","right")}h.width(e.groupindentwidth/3);h.height(1);h.css("top",g/2);h.addClass(e.toThemeProperty("jqx-grid-group-column-line"));e.groupsheaderdiv.append(h)}})}else{var f=a('
      '+c+"
      ");this.groupsheaderdiv.append(f);if(this.rtl){f.addClass(this.toThemeProperty("jqx-rtl"))}}this._groupheaders=b;this._updategroupheadersbounds()}},_updategroupheadersbounds:function(){var c=this;var b=this.groupsheaderdiv.children().outerHeight();var d=(this.groupsheader.height()-b)/2;this.groupsheaderdiv.css("top",d);if(!this.rtl){this.groupsheaderdiv.css("left",d);this.groupsheaderdiv.css("right","")}else{this.groupsheaderdiv.css("left","");this.groupsheaderdiv.css("right",d)}if(this.rtl){this._groupheaders.reverse()}a.each(this._groupheaders,function(f){var e=this.coord();c.groupheadersbounds[f]={left:e.left,top:e.top,width:this.outerWidth(),height:this.outerHeight(),index:f}})},addgroup:function(c){if(c){var b=this;if(b.groups!==b.dataview.groups){b.dataview.groups=b.groups}b.groups[b.groups.length]=c;b.refreshgroups();this._raiseEvent(12,{type:"Add",index:b.groups[b.groups.length],groups:b.groups})}},insertgroup:function(d,c){if(d!=undefined&&d!=null&&d>=0&&d<=this.groups.length){if(c){var b=this;if(b.groups!==b.dataview.groups){b.dataview.groups=b.groups}b.groups.splice(d,0,c.toString());b.refreshgroups();this._raiseEvent(12,{type:"Insert",index:d,groups:b.groups})}}},refreshgroups:function(){this._refreshdataview();this._render(true,true,true,false);this._postrender("group")},_insertaftergroup:function(d,c){var b=this._getGroupIndexByDataField(d);this.insertgroup(b+1,c)},_insertbeforegroup:function(d,c){var b=this._getGroupIndexByDataField(d);this.insertgroup(b,c)},removegroupat:function(c){if(c>=0&&c!=null&&c!=undefined){var b=this;if(b.groups!==b.dataview.groups){b.dataview.groups=b.groups}b.groups.splice(c,1);b.refreshgroups();if(b.virtualmode){b.updatebounddata()}this._raiseEvent(12,{type:"Remove",index:c,groups:b.groups});return true}return false},cleargroups:function(){var b=this;b.groups=[];b.dataview.groups=b.groups;b.refreshgroups();this._raiseEvent(12,{type:"Clear",index:-1,groups:b.groups});return true},removegroup:function(c){if(c==null){return false}var b=this.groups.indexOf(c.toString());return this.removegroupat(b)},getrootgroupscount:function(){var b=this.dataview.loadedrootgroups.length;return b},collapsegroup:function(c){if(c>=0&&c.toString().indexOf(".")===-1){return this._setrootgroupstate(c,false)}var b=c.toString().split(".");var f=null;if(!this.groupsVisibility){this.groupsVisibility=new Array()}for(var d=0;d=0&&c.toString().indexOf(".")===-1){return this._setrootgroupstate(c,true)}var b=c.toString().split(".");var f=null;for(var d=0;d0){d.subrows=h}}var i=this.jsonParser().stringify(k);i=i.replace(/subItems/ig,"subrows");i=i.replace(/subGroups/ig,"subgroups");d=this.jsonParser().parse(i);return d},getrootgroups:function(){var d=this.dataview.loadedrootgroups.length;var c=new Array();for(var b=0;b=0&&d0){c._setsubgroupsvisibility(c,e,!b||f,d)}else{if(e.subItems.length>0){c._setgroupitemsvisibility(c,e,!b||f)}}}if(f){c._setrowvisibility(e.visibleindex,f,false)}}if(h.subItems&&h.subItems.length>0){c._setgroupitemsvisibility(c,h,f)}},_handlecolumnsdragdrop:function(){var d=this;var g=-1;var c=false;if(!d.groupable){return}var f="mousemove.grouping"+this.element.id;var e="mousedown.grouping"+this.element.id;var h="mouseup.grouping"+this.element.id;var b=false;if(this.isTouchDevice()&&this.touchmode!==true){b=true;f=a.jqx.mobile.getTouchEventName("touchmove")+".grouping"+this.element.id;e=a.jqx.mobile.getTouchEventName("touchstart")+".grouping"+this.element.id;h=a.jqx.mobile.getTouchEventName("touchend")+".grouping"+this.element.id}this.removeHandler(a(document),f);this.addHandler(a(document),f,function(j){if(!d.showgroupsheader){return true}if(d.dragcolumn!=null){var l=parseInt(j.pageX);var u=parseInt(j.pageY);if(b){var r=d.getTouches(j);var p=r[0];l=parseInt(p.pageX);u=parseInt(p.pageY)}var n=d.host.coord();var v=parseInt(n.left);var w=parseInt(n.top);if(d.dragmousedownoffset==undefined||d.dragmousedownoffset==null){d.dragmousedownoffset={left:0,top:0}}var t=parseInt(l)-parseInt(d.dragmousedownoffset.left);var i=parseInt(u)-parseInt(d.dragmousedownoffset.top);d.dragcolumn.css({left:t+"px",top:i+"px"});c=false;if(l>=v&&l<=v+d.host.width()){if(u>=w&&u<=w+d.host.height()){c=true}}g=-1;if(c){d.dragcolumnicon.removeClass(d.toThemeProperty("jqx-grid-dragcancel-icon"));d.dragcolumnicon.addClass(d.toThemeProperty("jqx-grid-drag-icon"));var s=d.groupsheader.coord();var m=s.top+d.groupsheader.height();var q=a.data(d.dragcolumn[0],"datarecord");if(q){var k=d.groups.indexOf(q.toString())}else{var k=-1}var o=(k==-1)||(d.groups.length>1&&k>-1);if(d.dropline!=null){if(u>=s.top&&u<=m){if(o){g=d._handlegroupdroplines(l)}}else{d.dropline.fadeOut("slow")}}}else{if(d.dropline!=null){d.dropline.fadeOut("slow")}d.dragcolumnicon.removeClass(d.toThemeProperty("jqx-grid-drag-icon"));d.dragcolumnicon.addClass(d.toThemeProperty("jqx-grid-dragcancel-icon"))}if(b){j.preventDefault();j.stopPropagation();return false}}},{passive:false});this.removeHandler(a(document),h);this.addHandler(a(document),h,function(i){if(!d.showgroupsheader){return true}d.__drag=false;a(document.body).removeClass("jqx-disableselect");var m=parseInt(i.pageX);var s=parseInt(i.pageY);if(b){var p=d.getTouches(i);var o=p[0];m=parseInt(o.pageX);s=parseInt(o.pageY)}var n=d.host.coord();var t=parseInt(n.left);var u=parseInt(n.top);var k=d.groupsheader.height();if(d.showtoolbar){u+=d.toolbarheight}d.dragstarted=false;d.dragmousedown=null;if(d.dragcolumn!=null){var l=a.data(d.dragcolumn[0],"datarecord");d.dragcolumn.remove();d.dragcolumn=null;if(l!=null){if(!d.getcolumn(l).groupable){if(d.dropline!=null){d.dropline.remove();d.dropline=null}return}if(c){if(g!=-1){var q=g.index;var r=d.groups[q];var j=d._getGroupIndexByDataField(l);if(j!=q){if(j!=undefined&&j>=0){d.groups.splice(j,1)}if(g.position=="before"){if(!d.rtl){d._insertbeforegroup(r,l)}else{d._insertaftergroup(r,l)}}else{if(!d.rtl){d._insertaftergroup(r,l)}else{d._insertbeforegroup(r,l)}}}}else{if(d.groups.length==0){if(s>u&&s<=u+k){d.addgroup(l)}}else{if(s>u+k){var j=d._getGroupIndexByDataField(l);d.removegroupat(j)}}}}if(d.dropline!=null){d.dropline.remove();d.dropline=null}}}})},_getGroupIndexByDataField:function(b){for(var c=0;c0){f=this.left-1-b.groupindentwidth/6}b.dropline.css("left",f);b.dropline.css("top",this.top);b.dropline.height(this.height);b.dropline.fadeIn("slow");c={index:e,position:"before"};if(b.rtl){c={index:b.groupheadersbounds.length-1-e,position:"before"}}return false}else{if(d>=this.left+this.width/2){b.dropline.css("left",1+this.left+this.width);b.dropline.css("top",this.top);b.dropline.height(this.height);b.dropline.fadeIn("slow");c={index:e,position:"after"};if(b.rtl){c={index:b.groupheadersbounds.length-1-e,position:"after"}}}}});return c},_handlegroupstocolumnsdragdrop:function(c,e){this.dragmousedown=null;this.dragmousedownoffset=null;this.dragstarted=false;this.dragcolumn=null;var f=this;var d;var h="mousedown";var g="mousemove";var b=false;if(this.isTouchDevice()&&this.touchmode!==true){b=true;h=a.jqx.mobile.getTouchEventName("touchstart");g=a.jqx.mobile.getTouchEventName("touchmove")}this.addHandler(e,"dragstart",function(i){return false});this.addHandler(e,h,function(i){if(!f.showgroupsheader){return true}var l=i.pageX;var k=i.pageY;f.__drag=true;f.dragmousedown={left:l,top:k};if(b){var j=f.getTouches(i);var n=j[0];l=n.pageX;k=n.pageY;f.dragmousedown={left:l,top:k};if(i.preventDefault){i.preventDefault()}}var m=a(i.target).coord();f.dragmousedownoffset={left:parseInt(l)-parseInt(m.left),top:parseInt(k-m.top)}});this.addHandler(e,g,function(i){if(!f.showgroupsheader){return true}if(f.dragmousedown){d={left:i.pageX,top:i.pageY};if(b){var k=f.getTouches(i);var m=k[0];d={left:m.pageX,top:m.pageY}}if(!f.dragstarted&&f.dragcolumn==null){var j=Math.abs(d.left-f.dragmousedown.left);var l=Math.abs(d.top-f.dragmousedown.top);if(j>3||l>3){f._createdragcolumn(e,d,true);a(document.body).addClass("jqx-disableselect");a.data(f.dragcolumn[0],"datarecord",c);if(i.preventDefault){i.preventDefault()}}}}},{passive:false})},_createdragcolumn:function(c,e,g){var h=this;var f=e;h.dragcolumn=a("
      ");var j=c.clone();h.dragcolumn.css("z-index",999999);j.css("border-width","1px");j.css("opacity","0.4");var i=a(j.find("."+h.toThemeProperty("jqx-grid-column-menubutton")));if(i.length>0){i.css("display","none")}var b=a(j.find(".jqx-icon-close"));if(b.length>0){b.css("display","none")}h.dragcolumnicon=a('
      ');h.dragcolumnicon.addClass(h.toThemeProperty("jqx-grid-drag-icon"));h.dragcolumn.css("float","left");h.dragcolumn.css("position","absolute");var d=h.host.coord();j.width(c.width()+16);h.dragcolumn.append(j);h.dragcolumn.height(c.height());h.dragcolumn.width(j.width());h.dragcolumn.append(h.dragcolumnicon);a(document.body).append(h.dragcolumn);j.css("margin-left",0);j.css("left",0);j.css("top",0);h.dragcolumn.css("left",f.left+h.dragmousedown.left);h.dragcolumn.css("top",f.top+h.dragmousedown.top);if(g!=undefined&&g){h.dropline=a('
      ');h.dropline.width(2);h.dropline.addClass(h.toThemeProperty("jqx-grid-group-drag-line"));a(document.body).append(h.dropline)}},iscolumngroupable:function(b){return this._getcolumnproperty(b,"groupable")},_handlecolumnstogroupsdragdrop:function(c,f){this.dragmousedown=null;this.dragmousedownoffset=null;this.dragstarted=false;this.dragcolumn=null;var g=this;var e;var b=false;if(this.isTouchDevice()&&this.touchmode!==true){b=true}var d="mousedown.drag";var e="mousemove.drag";if(b){d=a.jqx.mobile.getTouchEventName("touchstart")+".drag";e=a.jqx.mobile.getTouchEventName("touchmove")+".drag"}else{this.addHandler(f,"dragstart",function(h){return false})}this.addHandler(f,d,function(j){if(!g.showgroupsheader){return true}g.__drag=true;if(g._isColumnInGroups(c.displayfield)){if(f.css("cursor")!="col-resize"){return true}else{return true}}if(false==c.groupable){return true}var i=j.pageX;var h=j.pageY;if(b){var k=g.getTouches(j);var m=k[0];i=m.pageX;h=m.pageY}g.dragmousedown={left:i,top:h};if(b){if(j.preventDefault){j.preventDefault()}}var l=a(j.target).coord();g.dragmousedownoffset={left:parseInt(i)-parseInt(l.left),top:parseInt(h-l.top)}});this.addHandler(f,e,function(j){if(!g.showgroupsheader){return true}if(g._isColumnInGroups(c.displayfield)){if(f.css("cursor")!="col-resize"){return true}else{return true}}if(g.dragmousedown){var i=j.pageX;var h=j.pageY;if(b){var l=g.getTouches(j);var n=l[0];i=n.pageX;h=n.pageY}e={left:i,top:h};if(!g.dragstarted&&g.dragcolumn==null){var k=Math.abs(e.left-g.dragmousedown.left);var m=Math.abs(e.top-g.dragmousedown.top);if(k>3||m>3){g._createdragcolumn(f,e,true);a.data(g.dragcolumn[0],"datarecord",c.displayfield);if(j.preventDefault){j.preventDefault()}}}}})},_rendergroupcolumn:function(g,h){var e=a('
      ');if(this.rtl){e.css("float","right")}if(this.groupcolumnrenderer!=null){e[0].innerHTML=this.groupcolumnrenderer(g);e.addClass(this.toThemeProperty("jqx-grid-group-column"));e.addClass(this.toThemeProperty("jqx-fill-state-normal"))}if(this.closeablegroups){if(e[0].innerHTML==""){e[0].innerHTML=''+g+""}if(this.rtl){e[0].innerHTML=''+g+""}var d=!this.rtl?"right":"left";var c='
      ';if(a.jqx.browser.msie&&a.jqx.browser.version<8){c='
      '}if(this.rtl){var c='
      ';if(a.jqx.browser.msie&&a.jqx.browser.version<8){c='
      '}}e[0].innerHTML+=c}else{if(e[0].innerHTML==""){e[0].innerHTML=''+g+""}}if(this.sortable){var f=a('
      ');var b=a('
      ');if(this.closeablegroups){var f=a('
      ');var b=a('
      ')}if(this.rtl){var f=a('
      ');var b=a('
      ');if(this.closeablegroups){var f=a('
      ');var b=a('
      ')}}f.css("display","none");b.css("display","none");if(a.jqx.browser.msie&&a.jqx.browser.version<8){f.css("float","left");b.css("float","left")}e.append(f);e.append(b);a.data(document.body,"groupsortelements"+h,{sortasc:f,sortdesc:b})}e.addClass(this.toThemeProperty("jqx-fill-state-normal"));e.addClass(this.toThemeProperty("jqx-grid-group-column"));return e},_rendergroup:function(p,x,b,v,k,B,u){var H=x;var c=x.cells[b.level];if(this.rtl){c=x.cells[x.cells.length-1-b.level]}var F=this._findgroupstate(b.uniqueid);if(b.bounddata.subGroups.length>0||b.bounddata.subItems.length>0){var i=this.rtl?"-rtl":"";var C=this.toThemeProperty("jqx-icon-arrow-right");if(i){C=this.toThemeProperty("jqx-icon-arrow-left")}if(F){c.className+=" "+this.toThemeProperty("jqx-grid-group-expand"+i)+" "+this.toThemeProperty("jqx-icon-arrow-down")}else{c.className+=" "+this.toThemeProperty("jqx-grid-group-collapse"+i)+" "+C}}var t=this._getColumnText(this.groups[b.level]).label;var d=this.groupindentwidth;var r=this.rowdetails&&this.showrowdetailscolumn?(1+p)*d:(p)*d;var y=u-r;var g=b.level+1;if(this.rtl){g=0}var n=H.cells[g];var A=2;while(n!=undefined&&n.style.display=="none"&&A0?b.bounddata.subItems.length:b.bounddata.subGroups.length;if(this.showgroupaggregates){var I=b.bounddata.subItems.length>0?b.bounddata.subItems:b.bounddata.subGroups;l=0;for(var G=0;G'+t+': '+b.group+" ("+l+")"}}else{var e=this._getcolumnbydatafield(this.groups[b.level]);var z=b.group;if(e!=null){if(e.cellsformat){if(a.jqx.dataFormat){if(a.jqx.dataFormat.isDate(z)){z=a.jqx.dataFormat.formatdate(z,e.cellsformat,this.gridlocalization)}else{if(a.jqx.dataFormat.isNumber(z)){z=a.jqx.dataFormat.formatnumber(z,e.cellsformat,this.gridlocalization)}}}}var l=b.bounddata.subItems.length>0?b.bounddata.subItems.length:b.bounddata.subGroups.length;if(this.showgroupaggregates){var I=b.bounddata.subItems.length>0?b.bounddata.subItems:b.bounddata.subGroups;l=0;for(var G=0;G'+t+': '+z+" ("+l+")"}else{throw new Error("jqxGrid: Unable to find '"+this.groups[b.level]+"' group in the Grid's columns collection.")}}if(this.rtl){if(!e){e=this._getcolumnbydatafield(this.groups[b.level])}var s=this.hScrollBar.css("visibility")=="hidden"?0:this.hScrollInstance.max-this.hScrollInstance.value;var D=this.vScrollBar.css("visibility")=="hidden"?0:this.scrollbarsize+6;var r=this.rowdetails&&this.showrowdetailscolumn?(2+b.level)*d:(1+b.level)*d;n.style.width=u+parseInt(s)-r-D+"px";f.addClass(this.toThemeProperty("jqx-rtl"));var w=a(x.cells[x.cells.length-1]).css("z-index");f.css("z-index",w);var E=f.find("div");var y=E.width();E.css("left","100%");var o=this.columns.records[x.cells.length-2-b.level]!=null?this.columns.records[x.cells.length-2-b.level].pinned:false;if(this.table.width()=m&&m>=g){d=u;break}}if(h!=null){var c=this._getcolumnat(d);if(!(q.indexOf("jqx-grid-group-expand")!=-1||q.indexOf("jqx-grid-group-collapse")!=-1)){if(h.boundindex!=-1){n.begincelledit(n.getboundindex(h),c.datafield,c.defaulteditorvalue)}}}},_getpreveditablecolumn:function(c){var b=this;while(c>0){c--;var d=b.getcolumnat(c);if(!d){return null}if(!d.editable){continue}if(!d.hidden){return d}}return null},_getnexteditablecolumn:function(c){var b=this;while(c=0){return true}if(j.pageable){if(a(T.target).ischildof(this.pager)){return true}}if(this.showtoolbar){if(a(T.target).ischildof(this.toolbar)){return true}}if(this.showeverpresentrow){if(this.addnewrowtop){if(a(T.target).ischildof(this.addnewrowtop)){return true}}if(this.addnewrowbottom){if(a(T.target).ischildof(this.addnewrowbottom)){return true}}}if(this.showstatusbar){if(a(T.target).ischildof(this.statusbar)){return true}}if(this.rowdetails){if(a(T.target).ischildof(this.content.find("[role='rowgroup']"))){return true}}if(this.editcell){if(this.editmode==="selectedrow"){if(u===13){this.endrowedit(this.editcell.row,false);return false}else{if(u===27){this.endrowedit(this.editcell.row,true);return false}}if(u==32){if(this._currentColumn&&this.getcolumn(this._currentColumn).columntype=="checkbox"){var M=this.getcolumn(this._currentColumn);if(M.editable){var A=!this.getcellvalue(this.editcell.row,M.datafield);var H=this.getrowdata(this.editcell.row);var s=this.editcell.row;var H=j.getrowdata(j.editcell.row);this.pushToHistory=true;this.setcellvalue(this.editcell.row,M.datafield,A,false);this.pushToHistory=false;var k=this._focusedColumn;var d=this._currentColumn;var f=this._currentEditableColumn;this.endrowedit(this.editcell.row,false);this.beginrowedit(s,false);this._currentColumn=d;this._focusedColumn=k;this._currentEditableColumn=f;this._renderrows();this.selectcell(s,M.datafield);this._oldselectedcell=this.selectedcell;if(k){var G=this;setTimeout(function(){G.selectcell(s,M.datafield);G._oldselectedcell=G.selectedcell;a(G._checkboxCells[M.datafield].checkbox).jqxCheckBox("focus")},25)}return false}}}if(u===9){var K=this.editcell.datafield;var e=this._getcolumnindex(K);if(this._currentEditableColumn){e=this._currentEditableColumn}else{this._currentEditableColumn=e}var M=this._getnexteditablecolumn(e);if(T.shiftKey||this.rtl){M=this._getpreveditablecolumn(e)}if(M){var e=this._getcolumnindex(M.datafield);if(this.editcell[M.datafield]){this._currentEditableColumn=e;var b=this.editcell[M.datafield].editor;if(b){if(b.data().jqxWidget&&b.data().jqxWidget.focus){b.data().jqxWidget.focus()}else{b.focus();b[0].onkeyup=function(){if(j.gridcontent[0].scrollTop!=0){j.scrolltop(Math.abs(j.gridcontent[0].scrollTop));j.gridcontent[0].scrollTop=0}if(j.gridcontent[0].scrollLeft!=0){j.gridcontent[0].scrollLeft=0}}}}this._focusedColumn=M.datafield;this._currentColumn=M.datafield;if(this.gridcontent[0].scrollTop!=0){this.scrolltop(Math.abs(this.gridcontent[0].scrollTop));this.gridcontent[0].scrollTop=0}if(this.gridcontent[0].scrollLeft!=0){this.gridcontent[0].scrollLeft=0}}else{if(M.columntype=="checkbox"){this._currentColumn=M.datafield;this._currentEditableColumn=e;this.selectcell(this.editcell.row,M.datafield);this._oldselectedcell=this.selectedcell;if(this._checkboxCells[M.datafield]){a(this._checkboxCells[M.datafield].checkbox).jqxCheckBox("focus")}return false}}}return false}return true}if(this.editcell.columntype==null||this.editcell.columntype=="textbox"||this.editcell.columntype=="numberinput"||this.editcell.columntype=="combobox"||this.editcell.columntype=="datetimeinput"){if(u>=33&&u<=40&&j.selectionmode=="multiplecellsadvanced"){var b=this.editcell.columntype=="textbox"||this.editcell.columntype==null?this.editcell.editor:this.editcell.editor.find("input");var p=j._selection(b);var J=b.val().length;if(p.length>0&&this.editcell.columntype!="datetimeinput"){j._cancelkeydown=true}if(p.start>0&&u==37){j._cancelkeydown=true}if(p.startthis.dataview.pagenum){setTimeout(function(){j.pagerpageinput.focus()},25)}return}}j.begincelledit(l,K);if(this.editcell!=null&&this.editcell.columntype=="checkbox"){this._renderrows(this.virtualsizeinfo)}}else{if(this.editcell!=null){j.endcelledit(l,K,false);this._renderrows(this.virtualsizeinfo)}return true}}return false}else{if(u==13){var F=this.selectedcell;if(F){var z=this.getrowvisibleindex(F.rowindex)}this.endcelledit(this.editcell.row,this.editcell.column,false,true);if(this.selectionmode=="multiplecellsadvanced"){var B=j.getselectedcell();if(B!=null){if(j.selectcell){if(this.editcell==null){if(B.rowindex+1=this.pagesize){this.clearselection(false);var S=this.dataview.loadedrecords[z];this.selectcell(this.getboundindex(S),B.datafield)}}}}}}}}}}return false}else{if(u==27){this.endcelledit(this.editcell.row,this.editcell.column,true,true);return false}}}}else{var O=false;if(u==113){O=true}if(!T.ctrlKey&&!T.altKey&&!T.metaKey){if(u>=48&&u<=57){this.editchar=String.fromCharCode(u);O=true}if(u===189){O=true}if(u>=65&&u<=90){this.editchar=String.fromCharCode(u);var o=false;if(T.shiftKey){o=T.shiftKey}else{if(T.modifiers){o=!!(T.modifiers&4)}}if(this._capsLock){o=!o}if(!o){this.editchar=this.editchar.toLowerCase()}O=true}else{if(u>=96&&u<=105){this.editchar=u-96;this.editchar=this.editchar.toString();O=true}}var C=a(".jqx-grid").length;O=O&&(C==1||(C>1&&j.focused));var R=a.data(document.body,"jqxgrid.edit");if(R!==undefined&&R!==""){if(u===13||O){if(R!=j.element.id){return true}}}}if(u==13||O){if(j.getselectedrowindex){var l=j.getselectedrowindex();if(j.editmode==="selectedrow"){if(l>=0){j.beginrowedit(l)}else{var B=j.getselectedcell();if(B!=null){var M=j._getcolumnbydatafield(B.datafield);j.beginrowedit(B.rowindex)}return false}}switch(j.selectionmode){case"singlerow":case"multiplerows":case"multiplerowsextended":if(l>=0){var K="";for(var P=0;P0){for(var w=0;w=0){return}if(this.groups.indexOf(f.displayfield)>=0){return}}if(this.editrow!=undefined){return}if(this.editcell){if(this.editcell.row==o&&this.editcell.column==e){return true}if(this.editmode==="selectedrow"){if(this.editcell.row==o){return}}var d=this.endcelledit(this.editcell.row,this.editcell.column,false,true,false);if(false==d){return}}var i=f.columntype=="checkbox"||f.columntype=="button"||f.createwidget;this.host.removeClass("jqx-disableselect");this.content.removeClass("jqx-disableselect");if(f.editable){if(f.cellbeginedit){var k=this.getcell(o,e);var m=f.cellbeginedit(o,e,f.columntype,k!=null?k.value:null);if(m==false){return}}var j=this.getrowvisibleindex(o);this.editcell=this.getcell(o,e);if(this.editcell){this.editcell.visiblerowindex=j;if(!this.editcell.editing){if(!i){this.editcell.editing=true}this.editcell.columntype=f.columntype;this.editcell.defaultvalue=l;if(f.defaultvalue!=undefined){this.editcell.defaultvalue=f.defaultvalue}this.editcell.init=true;if(f.columntype!="checkbox"&&this.editmode!="selectedrow"){var h=this.getrowdata(o);this._raiseEvent(17,{rowindex:o,row:h,datafield:f.datafield,value:this.editcell.value,columntype:f.columntype})}a.data(document.body,"jqxgrid.edit",this.element.id);if(!i){var b=this.getrowvisibleindex(o);if(g!==false){if(!this.autorowheight&&this.groups.length===0){var n=this.ensurecellvisible(b,f.datafield)}}if(c!==false){this._renderrows(this.virtualsizeinfo)}}if(this.editcell){this.editcell.init=false;return true}}}}else{if(!this.editcell){this.editchar="";return}this.editchar="";this.editcell.editor=null;this.editcell.editing=false;if(c!==false){this._renderrows(this.virtualsizeinfo)}this.editcell=null}},getScrollTop:function(){if(this._py){return this._py}this._py=typeof pageYOffset!="undefined";if(this._py){return pageYOffset}else{var c=document.body;var b=document.documentElement;b=(b.clientHeight)?b:c;return b.scrollTop}},getScrollLeft:function(){if(typeof pageXOffset!="undefined"){return pageXOffset}else{var c=document.body;var b=document.documentElement;b=(b.clientHeight)?b:c;return b.scrollLeft}},endcelledit:function(h,o,k,e,p){if(h==undefined||o==undefined){if(this.editcell){h=this.editcell.row;o=this.editcell.column}if(k==undefined){k=true}}if(!this.editcell){return}var d=this.getcolumn(o);var v=this;if(v.editmode==="selectedrow"){this.endrowedit(h,k);return}var u=function(){if(p!=false){if(v.isTouchDevice()){return}if(!v.isNestedGrid){var w=v.getScrollTop();var y=v.getScrollLeft();try{v.element.focus();v.content.focus();if(w!=v.getScrollTop()){window.scrollTo(y,w)}setTimeout(function(){v.element.focus();v.content.focus();if(w!=v.getScrollTop()){window.scrollTo(y,w)}},10)}catch(x){}}}};if(d.columntype=="checkbox"||d.columntype=="button"||d.createwidget){if(this.editcell){this.editcell.editor=null;this.editcell.editing=false;this.editcell=null}return true}var i=this._geteditorvalue(d);var g=function(x){x._hidecelleditor();if(d.cellendedit){d.cellendedit(h,o,d.columntype,x.editcell.value,i)}x.editchar=null;var z;if(d.displayfield!=d.datafield){var w=x.getcellvalue(x.editcell.row,d.displayfield);var y=x.editcell.value;z={value:y,label:w}}else{z=x.editcell.value}var A=x.getrowdata(h);x._raiseEvent(18,{rowindex:h,row:A,datafield:o,displayfield:d.displayfield,oldvalue:i,value:i,columntype:d.columntype});x.editcell.editor=null;x.editcell.editing=false;x.editcell=null;if(e||e==undefined){x._renderrows(x.virtualsizeinfo)}u();if(!x.enablebrowserselection){x.host.addClass("jqx-disableselect");x.content.addClass("jqx-disableselect")}};if(k){g(this);return false}if(this.validationpopup){this.validationpopup.hide();this.validationpopuparrow.hide()}if(d.cellvaluechanging){var b=d.cellvaluechanging(h,o,d.columntype,this.editcell.value,i);if(b!=undefined){i=b}}if(d.validation){var c=this.getcell(h,o);try{var q=d.validation(c,i);var m=this.gridlocalization.validationstring;if(q.message!=undefined){m=q.message}var n=typeof q=="boolean"?q:q.result;if(!n){if(q.showmessage==undefined||q.showmessage==true){this._showvalidationpopup(h,o,m)}this.editcell.validated=false;return false}}catch(s){this._showvalidationpopup(h,o,this.gridlocalization.validationstring);this.editcell.validated=false;return false}}var j;if(d.displayfield!=d.datafield){var l=this.getcellvalue(this.editcell.row,d.displayfield);var r=this.editcell.value;j={value:r,label:l}}else{j=this.editcell.value}var f=this.getrowdata(h);if(d.cellendedit){var t=d.cellendedit(h,o,d.columntype,this.editcell.value,i);if(t==false){this._raiseEvent(18,{rowindex:h,row:f,datafield:o,displayfield:d.displayfield,oldvalue:j,value:j,columntype:d.columntype});g(this);return false}}this._raiseEvent(18,{rowindex:h,row:f,datafield:o,displayfield:d.displayfield,oldvalue:j,value:i,columntype:d.columntype});this._hidecelleditor(false);if(this.editcell!=undefined){this.editcell.editor=null;this.editcell.editing=false}this.editcell=null;this.editchar=null;this.pushToHistory=true;this.setcellvalue(h,o,i,e);this.pushToHistory=false;if(!this.enablebrowserselection){this.host.addClass("jqx-disableselect");this.content.addClass("jqx-disableselect")}if(!a.jqx.browser.msie){u()}a.data(document.body,"jqxgrid.edit","");return true},beginrowedit:function(f){var e=this;var g=-1;if(f==undefined){return}e._oldselectedrow=f;this._cellscache=new Array();var c=false;if(this.editmode!="selectedrow"){c=true}if(c){var b=this.editmode;this.editmode="selectedrow"}var d=null;if(this._currentEditableColumn){d=this.getcolumnat(this._currentEditableColumn).datafield}a.each(this.columns.records,function(i,k){if(e.editable&&this.editable){if(this.columntype==="checkbox"||this.columntype==="custom"||this.columntype==="widget"||this.columntype==="template"||this.columntype==="button"){return true}if(!d){d=this.datafield}var h=e.getcell(f,this.datafield);e.begincelledit(f,this.datafield,null,false,false);var j=e.getrowdata(f);e._raiseEvent(17,{rowindex:f,row:j,datafield:this.datafield,value:h.value,columntype:this.columntype})}});if(e.editcell){e.editcell.init=true}this._renderrows(this.virtualsizeinfo);if(c){this.editmode=b}if(d&&e.editcell){setTimeout(function(){if(e.editcell&&e.editcell[d]){var h=e.editcell[d].editor;if(h){if(h.data().jqxWidget&&h.data().jqxWidget.focus){h.data().jqxWidget.focus()}else{h.focus()}}}},25)}},endrowedit:function(k,o){var D=this;this._currentEditableColumn=0;this._focusedColumn=null;this._currentColumn=null;this._checkboxCells=[];if(!this.editcell){return false}if(this.editcell.editor==undefined&&this.editcell.columntype!=="checkbox"){return false}var C=function(){if(focus!=false){if(D.isTouchDevice()){return}if(!D.isNestedGrid){var i=D.getScrollTop();var F=D.getScrollLeft();try{D.element.focus();D.content.focus();if(i!=D.getScrollTop()){window.scrollTo(F,i)}setTimeout(function(){D.element.focus();D.content.focus();if(i!=D.getScrollTop()){window.scrollTo(F,i)}},10)}catch(E){}}}};var p=false;if(this.editmode!="selectedrow"){p=true}if(p){var v=this.editmode;this.editmode="selectedrow"}var h=false;var d={};if(this.validationpopup){this.validationpopup.hide();this.validationpopuparrow.hide()}for(var B=0;B"):l;d.css("top",a(o).parent().position().top);if(this.oldhscroll){d.css("left",-j+parseInt(a(o).position().left))}else{d.css("left",parseInt(a(o).position().left))}if(H.pinned){d.css("left",j+parseInt(a(o).position().left))}if(l==undefined){d.prependTo(this.table);d[0].id="dropdownlisteditor"+this.element.id+E;var g=this.source._source?true:false;var y=null;if(!g){y=new a.jqx.dataAdapter(this.source,{autoBind:false,uniqueDataFields:[B],async:false,autoSort:true,autoSortField:B})}else{var q={localdata:JSON.parse(JSON.stringify(this.source.records)),datatype:this.source.datatype,async:false};y=new a.jqx.dataAdapter(q,{autoBind:false,async:false,uniqueDataFields:[B],autoSort:true,autoSortField:B})}var v=!H.createeditor?true:false;d.jqxDropDownList({hint:false,enableBrowserBoundsDetection:true,keyboardSelection:false,source:y,rtl:this.rtl,autoDropDownHeight:v,theme:this.theme,width:h.width(),height:h.height(),displayMember:B,valueMember:F});this.editors["dropdownlist_"+E]=d;if(H.createeditor){H.createeditor(r,J,d)}}if(H._requirewidthupdate){d.jqxDropDownList({width:h.width()})}var c=d.jqxDropDownList("listBox").visibleItems;if(!H.createeditor){if(c.length<8){d.jqxDropDownList("autoDropDownHeight",true)}else{d.jqxDropDownList("autoDropDownHeight",false)}}var J=this.getcellvalue(r,B);var A=this.findRecordIndex(J,B,c);if(L){if(J!=""){d.jqxDropDownList("selectIndex",A,true)}else{d.jqxDropDownList("selectIndex",-1)}}if(!this.editcell){return}if(this.editcell.defaultvalue!=undefined){d.jqxDropDownList("selectIndex",this.editcell.defaultvalue,true)}if(x){d.jqxDropDownList("focus")}}break;case"combobox":if(this.host.jqxComboBox){o.innerHTML="";var E=a.trim(H.datafield).split(" ").join("");var B=a.trim(H.displayfield).split(" ").join("");if(E.indexOf(".")!=-1){E=E.replace(".","")}if(B.indexOf(".")!=-1){B=B.replace(".","")}var s=this.editors["combobox_"+E];d=s==undefined?a("
      "):s;d.css("top",a(o).parent().position().top);if(this.oldhscroll){d.css("left",-j+parseInt(a(o).position().left))}else{d.css("left",parseInt(a(o).position().left))}if(H.pinned){d.css("left",j+parseInt(a(o).position().left))}if(s==undefined){d.prependTo(this.table);d[0].id="comboboxeditor"+this.element.id+E;var g=this.source._source?true:false;var y=null;if(!g){y=new a.jqx.dataAdapter(this.source,{autoBind:false,uniqueDataFields:[B],async:false,autoSort:true,autoSortField:B})}else{var q={localdata:JSON.parse(JSON.stringify(this.source.records)),datatype:this.source.datatype,async:false};y=new a.jqx.dataAdapter(q,{autoBind:false,async:false,uniqueDataFields:[B],autoSort:true,autoSortField:B})}var v=!H.createeditor?true:false;d.jqxComboBox({hint:false,enableBrowserBoundsDetection:true,keyboardSelection:false,source:y,rtl:this.rtl,autoDropDownHeight:v,theme:this.theme,width:h.width(),height:h.height(),displayMember:B,valueMember:F});d.removeAttr("tabindex");d.find("div").removeAttr("tabindex");this.editors["combobox_"+E]=d;if(H.createeditor){H.createeditor(r,J,d)}}if(H._requirewidthupdate){d.jqxComboBox({width:h.width()-2})}var c=d.jqxComboBox("listBox").visibleItems;if(!H.createeditor){if(c.length<8){d.jqxComboBox("autoDropDownHeight",true)}else{d.jqxComboBox("autoDropDownHeight",false)}}var J=this.getcellvalue(r,B);var A=this.findRecordIndex(J,B,c);if(L){if(J!=""){d.jqxComboBox("selectIndex",A,true);d.jqxComboBox("val",J)}else{d.jqxComboBox("selectIndex",-1);d.jqxComboBox("val",J)}}if(!this.editcell){return}if(this.editcell.defaultvalue!=undefined){d.jqxComboBox("selectIndex",this.editcell.defaultvalue,true)}if(this.editchar&&this.editchar.length>0){d.jqxComboBox("input").val(this.editchar)}if(x){setTimeout(function(){m(d.jqxComboBox("input"));if(d){d.jqxComboBox("_setSelection",0,0);if(t.editchar){d.jqxComboBox("_setSelection",1,1);t.editchar=null}else{if(d.jqxComboBox("input")){var e=d.jqxComboBox("input").val();d.jqxComboBox("_setSelection",0,e.length)}}}},10)}}break;case"datetimeinput":if(this.host.jqxDateTimeInput){o.innerHTML="";var E=a.trim(H.datafield).split(" ").join("");if(E.indexOf(".")!=-1){E=E.replace(".","")}var w=this.editors["datetimeinput_"+E];d=w==undefined?a("
      "):w;d.show();d.css("top",a(o).parent().position().top);if(this.oldhscroll){d.css("left",-j+parseInt(a(o).position().left))}else{d.css("left",parseInt(a(o).position().left))}if(H.pinned){d.css("left",j+parseInt(a(o).position().left))}if(w==undefined){d.prependTo(this.table);d[0].id="datetimeeditor"+this.element.id+E;var G={calendar:this.gridlocalization};d.jqxDateTimeInput({hint:false,firstDayOfWeek:this.gridlocalization.firstDay,enableBrowserBoundsDetection:true,localization:G,_editor:true,theme:this.theme,rtl:this.rtl,width:h.width(),height:h.height(),formatString:H.cellsformat});this.editors["datetimeinput_"+E]=d;if(H.createeditor){H.createeditor(r,J,d)}}if(H._requirewidthupdate){d.jqxDateTimeInput({width:h.width()})}if(L){if(J!=""&&J!=null){var M=new Date(J);if(M=="Invalid Date"){if(this.source.getvaluebytype){M=this.source.getvaluebytype(J,{name:H.datafield,type:"date"})}}d.jqxDateTimeInput("setDate",M)}else{d.jqxDateTimeInput("setDate",null)}if(this.editcell.defaultvalue!=undefined){d.jqxDateTimeInput("setDate",this.editcell.defaultvalue)}}if(x){var N=this.editEvent;setTimeout(function(){m(d.jqxDateTimeInput("dateTimeInput"));setTimeout(function(){d.jqxDateTimeInput("_selectGroup",0);if(t.editchar&&t.editchar.length>0){var S=parseInt(t.editchar);if(!isNaN(S)){if(N){var e=N.charCode?N.charCode:N.keyCode?N.keyCode:0;d.jqxDateTimeInput("_handleKeyPress",N,e)}}}},25)},10)}}break;case"numberinput":if(this.host.jqxNumberInput){o.innerHTML="";var E=a.trim(H.datafield).split(" ").join("");if(E.indexOf(".")!=-1){E=E.replace(".","")}var P=this.editors["numberinput_"+E];d=P==undefined?a("
      "):P;d.show();d.css("top",a(o).parent().position().top);if(this.oldhscroll){d.css("left",-j+parseInt(a(o).position().left))}else{d.css("left",parseInt(a(o).position().left))}if(H.pinned){d.css("left",j+parseInt(a(o).position().left))}if(P==undefined){d.prependTo(this.table);d[0].id="numbereditor"+this.element.id+E;var n="";var z="left";var O=2;if(H.cellsformat){if(H.cellsformat.indexOf("c")!=-1){n=this.gridlocalization.currencysymbol;z=this.gridlocalization.currencysymbolposition;if(z=="before"){z="left"}else{z="right"}if(H.cellsformat.length>1){O=parseInt(H.cellsformat.substring(1),10)}}else{if(H.cellsformat.indexOf("p")!=-1){n=this.gridlocalization.percentsymbol;z="right";if(H.cellsformat.length>1){O=parseInt(H.cellsformat.substring(1),10)}}}}else{O=0}d.jqxNumberInput({decimalSeparator:this.gridlocalization.decimalseparator,decimalDigits:O,inputMode:"simple",theme:this.theme,rtl:this.rtl,width:h.width(),height:h.height(),spinButtons:true,symbol:n,symbolPosition:z});this.editors["numberinput_"+E]=d;if(H.createeditor){H.createeditor(r,J,d)}}if(H._requirewidthupdate){d.jqxNumberInput({width:h.width()})}if(L){if(J!=""&&J!=null){var R=J;d.jqxNumberInput("setDecimal",R)}else{d.jqxNumberInput("setDecimal",0)}if(this.editcell.defaultvalue!=undefined){d.jqxNumberInput("setDecimal",this.editcell.defaultvalue)}if(this.editchar&&this.editchar.length>0){var p=parseInt(this.editchar);if(!isNaN(p)){d.jqxNumberInput("setDecimal",p)}}if(x){setTimeout(function(){m(d.jqxNumberInput("numberInput"));d.jqxNumberInput("_setSelectionStart",0);if(t.editchar){if(H.cellsformat.length>0&&H.cellsformat.indexOf("c")>=0){d.jqxNumberInput("_setSelectionStart",2)}else{d.jqxNumberInput("_setSelectionStart",1)}t.editchar=null}else{var e=d.jqxNumberInput("spinButtons");if(e){var S=d.jqxNumberInput("numberInput").val();t._setSelection(d.jqxNumberInput("numberInput")[0],S.length,S.length)}else{var S=d.jqxNumberInput("numberInput").val();t._setSelection(d.jqxNumberInput("numberInput")[0],0,S.length)}d.jqxNumberInput("selectAll")}},10)}}}break;case"rating":if(this.host.jqxRating){o.innerHTML="";var E=a.trim(H.datafield).split(" ").join("");if(E.indexOf(".")!=-1){E=E.replace(".","")}var Q=this.editors["rating_"+E];d=Q==undefined?a("
      "):Q;d.show();d.css("top",a(o).parent().position().top);if(this.oldhscroll){d.css("left",-j+parseInt(a(o).position().left))}else{d.css("left",parseInt(a(o).position().left))}if(H.pinned){d.css("left",j+parseInt(a(o).position().left))}if(Q==undefined){d.prependTo(this.table);d[0].id="ratingEditor"+this.element.id+E;d.jqxRating({theme:this.theme,width:h.width(),height:h.height()});this.editors["numberinput_"+E]=d;if(H.createeditor){H.createeditor(r,J,d)}}if(H._requirewidthupdate){d.jqxRating({width:h.width()})}if(L){if(J!=""&&J!=null){var R=J;d.jqxRating("val",R)}else{d.jqxRating("val",0)}if(this.editcell.defaultvalue!=undefined){d.jqxRating("val",this.editcell.defaultvalue)}}}break;case"custom":o.innerHTML="";var E=a.trim(H.datafield).split(" ").join("");if(E.indexOf(".")!=-1){E=E.replace(".","")}var C=this.editors["customeditor_"+E+"_"+r];d=C==undefined?a("
      "):C;d.show();d.css("top",a(o).parent().position().top);if(this.oldhscroll){d.css("left",-j+parseInt(a(o).position().left))}else{d.css("left",parseInt(a(o).position().left))}if(H.pinned){d.css("left",j+parseInt(a(o).position().left))}if(C==undefined){d.prependTo(this.table);d[0].id="customeditor"+this.element.id+E+"_"+r;this.editors["customeditor_"+E+"_"+r]=d;var b=h.width()-1;var f=h.height()-1;d.width(b);d.height(f);if(H.createeditor){H.createeditor(r,J,d,D,b,f,this.editchar)}}if(H._requirewidthupdate){d.width(h.width())}break;case"template":o.innerHTML="";var E=a.trim(H.datafield).split(" ").join("");if(E.indexOf(".")!=-1){E=E.replace(".","")}var i=this.editors["templateeditor_"+E];d=i==undefined?a("
      "):i;d.show();d.css("top",a(o).parent().position().top);if(this.oldhscroll){d.css("left",-j+parseInt(a(o).position().left))}else{d.css("left",parseInt(a(o).position().left))}if(H.pinned){d.css("left",j+parseInt(a(o).position().left))}if(i==undefined){d.prependTo(this.table);d[0].id="templateeditor"+this.element.id+E;this.editors["templateeditor_"+E]=d;var b=h.width()-1;var f=h.height()-1;d.width(b);d.height(f);if(H.createeditor){H.createeditor(r,J,d,D,b,f,this.editchar)}}if(H._requirewidthupdate){d.width(h.width())}break;case"textbox":default:o.innerHTML="";d=this.editors["textboxeditor_"+H.datafield]||a("");d[0].id="textboxeditor"+this.element.id+H.datafield;d.appendTo(h);if(this.rtl){d.css("direction","rtl")}if(L||d[0].className==""){d.addClass(this.toThemeProperty("jqx-input"));d.addClass(this.toThemeProperty("jqx-widget-content"));if(this.editchar&&this.editchar.length>0){d.val(this.editchar)}else{if(H.cellsformat!=""){J=this.getcelltext(r,F)}if(J==undefined){J=""}d.val(J)}if(this.editcell.defaultvalue!=undefined){d.val(this.editcell.defaultvalue)}d.width(h.width()+1);d.height(h.height()+1);if(H.createeditor){H.createeditor(r,J,d)}if(H.cellsformat!=""){if(H.cellsformat.indexOf("p")!=-1||H.cellsformat.indexOf("c")!=-1||H.cellsformat.indexOf("n")!=-1||H.cellsformat.indexOf("f")!=-1){if(!this.editors["textboxeditor_"+H.datafield]){d.keydown(function(S){var Y=S.charCode?S.charCode:S.keyCode?S.keyCode:0;var V=String.fromCharCode(Y);var W=parseInt(V);if(isNaN(W)){return true}if(t._selection(d).length>0){return true}var U="";var T=d.val();if(H.cellsformat.length>1){var X=parseInt(H.cellsformat.substring(1));if(isNaN(X)){X=0}}else{var X=0}if(X>0){if(T.indexOf(t.gridlocalization.decimalseparator)!=-1){if(t._selection(d).start>T.indexOf(t.gridlocalization.decimalseparator)){return true}}}for(var Z=0;Z=11){return false}})}}}}this.editors["textboxeditor_"+H.datafield]=d;if(L){if(x){setTimeout(function(){m(d);if(t.editchar){t._setSelection(d[0],1,1);t.editchar=null}else{t._setSelection(d[0],0,d.val().length)}},25)}}break}if(d){d.addClass("jqx-grid-cell-edit");d[0].style.zIndex=1+parseInt(o.style.zIndex);if(a.jqx.browser.msie&&a.jqx.browser.version<8){d[0].style.zIndex=1+this.columns.records.length+o.style.zIndex}d.css("display","block");this.editcell.editor=d;if(!this.editcell[F]){this.editcell[F]={};this.editcell[F].editor=d}else{this.editcell[F].editor=d}}if(L){if(H.initeditor){H.initeditor(r,J,d,D,this.editchar)}}if(t.isTouchDevice()){return}setTimeout(function(){if(t.content){t.content[0].scrollTop=0;t.content[0].scrollLeft=0}if(t.gridcontent){t.gridcontent[0].scrollLeft=0;t.gridcontent[0].scrollTop=0}},10)},_setSelection:function(d,g,b){try{if("selectionStart" in d){d.setSelectionRange(g,b)}else{var c=d.createTextRange();c.collapse(true);c.moveEnd("character",b);c.moveStart("character",g);c.select()}}catch(e){var f=e}},_hideeditors:function(){if(this.editcells!=null){var b=this;for(var c in this.editcells){b.editcell=b.editcells[c];b._hidecelleditor()}}},_hidecelleditor:function(b){if(!this.editcell){return}if(this.editmode==="selectedrow"){for(var c=0;c-1){o=o.replace(this.gridlocalization.currencysymbol,"")}var m=function(w,u,v){var s=w;if(u==v){return w}var t=s.indexOf(u);while(t!=-1){s=s.replace(u,v);t=s.indexOf(u)}return s};var k=o;k=new Number(k);if(!isNaN(k)){return k}o=m(o,this.gridlocalization.thousandsseparator,"");o=o.replace(this.gridlocalization.decimalseparator,".");if(o.indexOf(this.gridlocalization.percentsymbol)>-1){o=o.replace(this.gridlocalization.percentsymbol,"")}var d="";for(var r=0;r");var r=a("
      ");g.html(h);r.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));g.addClass(this.toThemeProperty("jqx-grid-validation"));g.addClass(this.toThemeProperty("jqx-rc-all"));g.prependTo(this.table);r.prependTo(this.table);var l=this.hScrollInstance;var n=l.value;var d=parseInt(n);var b=this.getcolumn(j).uielement;var p=null;for(var o=0;o=this._gettableheight()-this.rowsheight){r.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));r.addClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));k=parseInt(c.position().top)-this.rowsheight;if(k<0){k=0;this.validationpopuparrow.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));q=true}g.css("top",k+"px");r.css("top",k+g.outerHeight()-9)}var t=-d+parseInt(a(b).position().left);if(b[0].offsetHeight===0){t=-d+parseInt(b[0].style.left)}r.css("left",d+t+30);var m=g.width();if(m+t>this.host.width()-20){var e=m+t-this.host.width()+40;t-=e}if(!q){g.css("left",d+t)}else{g.css("left",d+parseInt(a(b).position().left)-g.outerWidth())}g.show();r.show();if(!this.popups){this.popups=new Array()}this.popups[this.popups.length]={validation:g,validationrow:r}},_showvalidationpopup:function(p,e,q){var c=this.editcell;var k=this.editcell.editor;if(this.editmode=="selectedrow"){var c=this.editcell[e];if(c&&c.editor){k=c.editor;c.element=k}}if(!k){return}if(this.validationpopup&&a.jqx.isHidden(this.validationpopup)){if(this.validationpopup.remove){this.validationpopup.remove();this.validationpopuparrow.remove()}this.validationpopup=null;this.validationpopuparrow=null;if(e===undefined&&q===undefined&&this.editors&&this.editors.length===0){return}}if(!this.validationpopup){var n=a("
      ");var m=a("
      ");n.html(q);m.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));n.addClass(this.toThemeProperty("jqx-grid-validation"));n.addClass(this.toThemeProperty("jqx-rc-all"));n.prependTo(this.table);m.prependTo(this.table);this.validationpopup=n;this.validationpopuparrow=m}else{this.validationpopup.html(q)}var h=this.hScrollInstance;var j=h.value;var g=parseInt(j);if(this.editmode=="selectedrow"){if(this.visiblerows&&this.visiblerows[this.editcell.visiblerowindex]){this.validationpopup.css("top",this.visiblerows[this.editcell.visiblerowindex].top+(this.rowsheight+5)+"px")}else{this.validationpopup.css("top",parseInt(a(c.editor).position().top)+(this.rowsheight+5)+"px")}}else{this.validationpopup.css("top",parseInt(a(c.element).parent().position().top)+(this.rowsheight+5)+"px")}var b=parseInt(this.validationpopup.css("top"));this.validationpopuparrow.css("top",b-11);this.validationpopuparrow.removeClass();this.validationpopuparrow.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));var o=this._gettableheight();var f=false;if(b>=o){this.validationpopuparrow.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));this.validationpopuparrow.addClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));b=parseInt(a(c.element).parent().position().top)-this.rowsheight-5;if(this.editmode=="selectedrow"){if(this.visiblerows&&this.visiblerows[this.editcell.visiblerowindex]){b=this.visiblerows[this.editcell.visiblerowindex].top-this.rowsheight-5}else{b=parseInt(a(c.editor).position().top)-this.rowsheight-5}}if(b<0){b=0;this.validationpopuparrow.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));f=true}this.validationpopup.css("top",b+"px");this.validationpopuparrow.css("top",b+this.validationpopup.outerHeight()-9)}var l=-g+parseInt(a(c.element).position().left);this.validationpopuparrow.css("left",g+l+30);var d=this.validationpopup.width();if(d+l>this.host.width()-20){var i=d+l-this.host.width()+40;l-=i}if(!f){this.validationpopup.css("left",g+l)}else{this.validationpopup.css("left",g+parseInt(a(c.element).position().left)-this.validationpopup.outerWidth())}if(this.editcell.editor.css("display")=="none"){this.validationpopup.hide();this.validationpopuparrow.hide()}else{this.validationpopup.show();this.validationpopuparrow.show()}}})})(jqxBaseFramework); diff --git a/jqwidgets/jqxangular.js b/jqwidgets/jqxangular.js index 15071d0fb..db3bfcc59 100644 --- a/jqwidgets/jqxangular.js +++ b/jqwidgets/jqxangular.js @@ -1,5 +1,5 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ diff --git a/jqwidgets/jqxbargauge.js b/jqwidgets/jqxbargauge.js index f7503e546..4ba284898 100644 --- a/jqwidgets/jqxbargauge.js +++ b/jqwidgets/jqxbargauge.js @@ -1,5 +1,5 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ diff --git a/jqwidgets/jqxbulletchart.js b/jqwidgets/jqxbulletchart.js index 74c5bc4b2..63b71af1d 100644 --- a/jqwidgets/jqxbulletchart.js +++ b/jqwidgets/jqxbulletchart.js @@ -1,5 +1,5 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ diff --git a/jqwidgets/jqxbuttongroup.js b/jqwidgets/jqxbuttongroup.js index b17414f88..30aa9034d 100644 --- a/jqwidgets/jqxbuttongroup.js +++ b/jqwidgets/jqxbuttongroup.js @@ -1,5 +1,5 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ diff --git a/jqwidgets/jqxbuttons.js b/jqwidgets/jqxbuttons.js index c541c7c41..cced011d6 100644 --- a/jqwidgets/jqxbuttons.js +++ b/jqwidgets/jqxbuttons.js @@ -1,5 +1,5 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ diff --git a/jqwidgets/jqxcalendar.js b/jqwidgets/jqxcalendar.js index 797c4a404..e4c9b0522 100644 --- a/jqwidgets/jqxcalendar.js +++ b/jqwidgets/jqxcalendar.js @@ -1,5 +1,5 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ diff --git a/jqwidgets/jqxchart.annotations.js b/jqwidgets/jqxchart.annotations.js index 9a104698f..140b07299 100644 --- a/jqwidgets/jqxchart.annotations.js +++ b/jqwidgets/jqxchart.annotations.js @@ -1,5 +1,5 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ diff --git a/jqwidgets/jqxchart.api.js b/jqwidgets/jqxchart.api.js index 586888271..f4e509ddb 100644 --- a/jqwidgets/jqxchart.api.js +++ b/jqwidgets/jqxchart.api.js @@ -1,5 +1,5 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ diff --git a/jqwidgets/jqxchart.core.js b/jqwidgets/jqxchart.core.js index 2e181b2e4..2650dff9e 100644 --- a/jqwidgets/jqxchart.core.js +++ b/jqwidgets/jqxchart.core.js @@ -1,5 +1,5 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ diff --git a/jqwidgets/jqxchart.js b/jqwidgets/jqxchart.js index 02024006e..669193848 100644 --- a/jqwidgets/jqxchart.js +++ b/jqwidgets/jqxchart.js @@ -1,5 +1,5 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ diff --git a/jqwidgets/jqxchart.rangeselector.js b/jqwidgets/jqxchart.rangeselector.js index 04868d034..cf8795d9e 100644 --- a/jqwidgets/jqxchart.rangeselector.js +++ b/jqwidgets/jqxchart.rangeselector.js @@ -1,5 +1,5 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ diff --git a/jqwidgets/jqxchart.waterfall.js b/jqwidgets/jqxchart.waterfall.js index 086047829..b4b3cf0a6 100644 --- a/jqwidgets/jqxchart.waterfall.js +++ b/jqwidgets/jqxchart.waterfall.js @@ -1,5 +1,5 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ diff --git a/jqwidgets/jqxcheckbox.js b/jqwidgets/jqxcheckbox.js index 5af10e15d..f4125eb15 100644 --- a/jqwidgets/jqxcheckbox.js +++ b/jqwidgets/jqxcheckbox.js @@ -1,5 +1,5 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ diff --git a/jqwidgets/jqxcheckbox.zip b/jqwidgets/jqxcheckbox.zip deleted file mode 100644 index 80be5a47e..000000000 Binary files a/jqwidgets/jqxcheckbox.zip and /dev/null differ diff --git a/jqwidgets/jqxcolorpicker.js b/jqwidgets/jqxcolorpicker.js index f5a16532e..42c0652e6 100644 --- a/jqwidgets/jqxcolorpicker.js +++ b/jqwidgets/jqxcolorpicker.js @@ -1,5 +1,5 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ diff --git a/jqwidgets/jqxcombobox.js b/jqwidgets/jqxcombobox.js index 4050193bf..08826b9f7 100644 --- a/jqwidgets/jqxcombobox.js +++ b/jqwidgets/jqxcombobox.js @@ -1,5 +1,5 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ diff --git a/jqwidgets/jqxcomplexinput.js b/jqwidgets/jqxcomplexinput.js index ea4fbd133..fbe2f08b0 100644 --- a/jqwidgets/jqxcomplexinput.js +++ b/jqwidgets/jqxcomplexinput.js @@ -1,5 +1,5 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ diff --git a/jqwidgets/jqxcore.js b/jqwidgets/jqxcore.js index 0c3edced5..55eebb0ba 100644 --- a/jqwidgets/jqxcore.js +++ b/jqwidgets/jqxcore.js @@ -1,5 +1,5 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ diff --git a/jqwidgets/jqxdata.export.js b/jqwidgets/jqxdata.export.js index 9babef8d2..9673c4465 100644 --- a/jqwidgets/jqxdata.export.js +++ b/jqwidgets/jqxdata.export.js @@ -1,5 +1,5 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ diff --git a/jqwidgets/jqxdata.js b/jqwidgets/jqxdata.js index 767724d88..cceac60ab 100644 --- a/jqwidgets/jqxdata.js +++ b/jqwidgets/jqxdata.js @@ -1,5 +1,5 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ diff --git a/jqwidgets/jqxdatatable.js b/jqwidgets/jqxdatatable.js index 178126bc4..5dd714cf2 100644 --- a/jqwidgets/jqxdatatable.js +++ b/jqwidgets/jqxdatatable.js @@ -1,5 +1,5 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ diff --git a/jqwidgets/jqxdate.js b/jqwidgets/jqxdate.js index c59a128e8..2262cc0c1 100644 --- a/jqwidgets/jqxdate.js +++ b/jqwidgets/jqxdate.js @@ -1,5 +1,5 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ diff --git a/jqwidgets/jqxdatetimeinput.js b/jqwidgets/jqxdatetimeinput.js index a010a97db..1612700ae 100644 --- a/jqwidgets/jqxdatetimeinput.js +++ b/jqwidgets/jqxdatetimeinput.js @@ -1,9 +1,9 @@ /* -jQWidgets v12.0.0 (2021-Feb) +jQWidgets v12.0.1 (2021-Mar) Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ -(function(a){a.jqx.jqxWidget("jqxDateTimeInput","",{});a.extend(a.jqx._jqxDateTimeInput.prototype,{defineInstance:function(){var b={value:a.jqx._jqxDateTimeInput.getDateTime(new Date()),minDate:a.jqx._jqxDateTimeInput.getDateTime(new Date()),maxDate:a.jqx._jqxDateTimeInput.getDateTime(new Date()),min:new Date(1900,0,1),max:new Date(2100,0,1),rowHeaderWidth:25,enableViews:true,views:["month","year","decade"],selectableDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],change:null,changing:null,titleFormat:["MMMM yyyy","yyyy","yyyy","yyyy"],template:"default",columnHeaderHeight:20,titleHeight:30,firstDayOfWeek:0,showWeekNumbers:false,showTimeButton:false,cookies:false,cookieoptions:null,showFooter:false,formatString:"dd/MM/yyyy",width:200,height:25,dayNameFormat:"firstTwoLetters",textAlign:"left",readonly:false,culture:"default",activeEditor:null,showCalendarButton:true,openDelay:250,closeDelay:300,closeCalendarAfterSelection:true,isEditing:false,enableBrowserBoundsDetection:false,dropDownHorizontalAlignment:"left",dropDownVerticalAlignment:"bottom",enableAbsoluteSelection:false,disabled:false,buttonSize:21,animationType:"slide",dropDownWidth:"200px",restrictedDates:new Array(),dropDownHeight:"205px",dropDownContainer:"default",selectionMode:"default",renderMode:"full",rtl:false,timeRange:null,_editor:false,todayString:"Today",clearString:"Clear",popupZIndex:2000,allowNullDate:true,changeType:null,placeHolder:"",enableHover:true,hint:true,allowKeyboardDelete:true,yearCutoff:null,editMode:"default",localization:{backString:"Back",forwardString:"Forward",todayString:"Today",clearString:"Clear",calendar:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss",ISO:"yyyy-MM-dd hh:mm:ss"}}},events:["valueChanged","textchanged","mousedown","mouseup","keydown","keyup","keypress","open","close","change"],aria:{"aria-valuenow":{name:"getDate",type:"date"},"aria-valuetext":{name:"getText",type:"string"},"aria-valuemin":{name:"min",type:"date"},"aria-valuemax":{name:"max",type:"date"},"aria-disabled":{name:"disabled",type:"boolean"}}};if(this===a.jqx._jqxDateTimeInput.prototype){return b}a.extend(true,this,b);this.value._setHours(0);this.value._setMinutes(0);this.value._setSeconds(0);this.value._setMilliseconds(0);this.minDate._setYear(1900);this.minDate._setMonth(1);this.minDate._setDay(1);this.minDate._setHours(1);this.minDate._setMinutes(1);this.minDate._setSeconds(1);this.minDate._setMilliseconds(1);this.maxDate._setYear(2100);this.maxDate._setMonth(1);this.maxDate._setDay(1);this.maxDate._setHours(1);this.maxDate._setMinutes(1);this.maxDate._setSeconds(1);this.maxDate._setMilliseconds(1);this.defaultMinDate=this.minDate;this.defaultMaxDate=this.maxDate;return b},createInstance:function(d){var m="";var k=this;if(!k.host.jqxCalendar){throw new Error("jqxDateTimeInput: Missing reference to jqxcalendar.js.")}if(k.isMaterialized()){var z=window.getComputedStyle(this.element);var t=z.getPropertyValue("--jqx-dropdown-animation");var q=z.getPropertyValue("--jqx-datetimeinput-dropdown-width")||280;var l=z.getPropertyValue("--jqx-datetimeinput-dropdown-height")||280;if(t&&this.animationType=="default"){this.animationType=t.trim()}if(q){this.dropDownWidth=q}if(l){this.dropDownHeight=l}}if(k.formatString!="dd/MM/yyyy"){var g=k.formatString.split(" ");if(g&&g.length>1){var c="";for(var s=0;s",j);f[0].style.cssText=k.field.style.cssText;if(!k.width){k.width=a(k.field).width()}if(!k.height){k.height=a(k.field).outerHeight()}a(k.field).hide().after(f);var x=k.host.data();k.host=f;k.host.data(x);k.element=f[0];k.element.id=k.field.id;k.field.id=j.id;if(k._className){k.host.addClass(k._className);a(k.field).removeClass(k._className)}if(k.field.tabIndex){var e=k.field.tabIndex;k.field.tabIndex=-1;k.element.tabIndex=e}}if(k.host.attr("value")){m=true;var y=k.host.attr("value");if(k.selectionMode!="range"){var u=new Date(y);if(u!=undefined&&!isNaN(u)){k.value=a.jqx._jqxDateTimeInput.getDateTime(u)}}}if(k.value!=null&&k.value instanceof Date){k.value=a.jqx._jqxDateTimeInput.getDateTime(k.value)}else{if(k.value!=null&&typeof(k.value)=="string"){var u=new Date(k.value);if(u!=undefined&&!isNaN(u)){k.value=a.jqx._jqxDateTimeInput.getDateTime(u)}else{if(k.value.indexOf(",")>=0){k.value=k.value.replace(/\,/g,"/");var u=new Date(k.value);if(u!=undefined&&!isNaN(u)){k.value=a.jqx._jqxDateTimeInput.getDateTime(u)}}}}}this._initTimeRange();this._validateTimeRange();k.host.attr("data-role","input");k.render();a.jqx.aria(this);if(k.getDate()!=null){a.jqx.aria(this,"aria-label","Current focused date is "+k.getDate().toLocaleString())}else{a.jqx.aria(this,"aria-label","Current focused date is Null")}if(k.minDate!==k.defaultMinDate){k.min=k.minDate}if(k.maxDate!==k.defaultMaxDate){k.max=k.maxDate}k.setMaxDate(k.max,false);k.setMinDate(k.min,false);if(k.selectionMode!=="range"&&k.value&&k.value.dateTime&&k.min&&k.max&&(k.value.dateTimek.max)){if(k.value.dateTimek.max){k.value.dateTime=k.max}k._updateText()}if(k.selectionMode=="range"){if(m){var y=k.host.attr("value");var w=y.substring(0,y.indexOf("-"));var v=y.substring(y.indexOf("-")+1);var p=new Date(w);var b=new Date(v);if(p!=undefined&&!isNaN(p)){if(b!=undefined&&!isNaN(b)){k.setRange(p,b)}}}else{if(k.getDate()!=null){k.setRange(k.getDate(),k.getDate())}}}k._getMask();if(k.editMode==="full"&&k.value===null&&k._mask[0]!==undefined){k.dateTimeInput[0].value=k._mask[0]}},_validateTimeRange:function(){if(this.timeRange){var b=this.value.dateTime.getHours();var c=this.value.dateTime.getMinutes();if(b<=this.timeRange.minHour){this.value._setHours(this.timeRange.minHour);if(c=this.timeRange.maxHour){this.value._setHours(this.timeRange.maxHour);if(c>this.timeRange.maxMinute){this.value._setMinutes(this.timeRange.maxMinute);this._updateEditorsValue()}else{this._updateEditorsValue()}}}},_initTimeRange:function(){if(this.timeRange){if(this.timeRange.min){var c=null;if(this.timeRange.min.indexOf("AM")>=0||this.timeRange.min.indexOf("PM")>=0){c=this.timeRange.min.indexOf("AM")>=0?"AM":"PM"}var d=this.timeRange.min.split(":");var b=parseInt(d[0]);var f=parseInt(d[1]);if(c){this.timeRange.minDefaultHour=b;this.timeRange.minMeridian=c}if(c&&c=="PM"){b+=12}this.timeRange.minHour=b;this.timeRange.minMinute=f}if(this.timeRange.max){var c=null;if(this.timeRange.max.indexOf("AM")>=0||this.timeRange.max.indexOf("PM")>=0){c=this.timeRange.max.indexOf("AM")>=0?"AM":"PM"}var e=this.timeRange.max.split(":");var b=parseInt(e[0]);var f=parseInt(e[1]);if(c){this.timeRange.maxDefaultHour=b;this.timeRange.maxMeridian=c}if(c&&c=="PM"){b+=12}this.timeRange.maxHour=b;this.timeRange.maxMinute=f}}},_format:function(d,e,b){var f=false;try{if(window.Globalize!=undefined){f=true}if(document.Globalize){window.Globalize=document.Globalize;f=true}}catch(c){if(document.Globalize){window.Globalize=document.Globalize;f=true}}if(document.Globalize){window.Globalize=document.Globalize;f=true}if(a.global){return a.global.format(d,e,this.culture)}else{if(f){try{var e=window.Globalize.format(d,e,this.culture);return e}catch(c){return window.Globalize.format(d,e)}}else{if(a.jqx.dataFormat){if(d instanceof Date){return a.jqx.dataFormat.formatdate(d,e,this.localization.calendar)}else{if(typeof d==="number"){return a.jqx.dataFormat.formatnumber(d,e,this.localization.calendar)}else{return a.jqx.dataFormat.formatdate(d,e,this.localization.calendar)}}}else{throw new Error("jqxDateTimeInput: Missing reference to globalize.js.")}}}},render:function(){var k=this;k._removeHandlers();k.element.innerHTML="";k.host.attr({role:"textbox"});k.id=a.jqx.utilities.createId();var f=a.jqx.utilities.createId();var j=a.jqx.utilities.createId();k._setSize();if(k.width==null){k.width=k.host.width();k.host.width(k.width)}k.touch=a.jqx.mobile.isTouchDevice();var c=a("
      ").appendTo(k.host);k.dateTimeInput=a("").appendTo(c);k.dateTimeInput.addClass(k.toThemeProperty("jqx-reset"));k.dateTimeInput.addClass(k.toThemeProperty("jqx-clear"));k.dateTimeInput.addClass(k.toThemeProperty("jqx-input-content"));k.dateTimeInput.addClass(k.toThemeProperty("jqx-widget-content"));k.dateTimeInput.addClass(k.toThemeProperty("jqx-rc-all"));if(!k.isMaterialized()){k.dateTimeInput.attr("placeHolder",k.placeHolder)}if(k.renderMode!="full"){k.dateTimeInput.remove()}var d=k.host.attr("name");if(d){k.dateTimeInput.attr("name",d)}if(k.host.attr("tabindex")){k.dateTimeInput.attr("tabindex",k.host.attr("tabindex"));k.host.removeAttr("tabindex")}if(k.rtl){k.dateTimeInput.css("direction","rtl");k.dateTimeInput.addClass("jqx-rtl")}k.calendarButton=a("
      ").appendTo(c);if(!k.rtl){k.calendarButton.addClass(k.toThemeProperty("jqx-action-button"))}else{k.calendarButton.addClass(k.toThemeProperty("jqx-action-button-rtl"))}k.calendarButtonIcon=a(k.calendarButton.children()[0]);k.calendarButtonIcon.addClass(k.toThemeProperty("jqx-icon"));k.calendarButtonIcon.addClass(k.toThemeProperty("jqx-icon-calendar"));k.calendarButton.addClass(k.toThemeProperty("jqx-fill-state-normal"));if(!k.rtl){if(!k.showTimeButton){k.calendarButton.addClass(k.toThemeProperty("jqx-rc-r"))}}else{k.calendarButton.addClass(k.toThemeProperty("jqx-rc-l"))}k.timeButton=a("
      ").appendTo(c);if(!k.rtl){k.timeButton.addClass(k.toThemeProperty("jqx-action-button"))}else{k.timeButton.addClass(k.toThemeProperty("jqx-action-button-rtl"))}k.timeButtonIcon=a(k.timeButton.children()[0]);k.timeButtonIcon.addClass(k.toThemeProperty("jqx-icon"));k.timeButtonIcon.addClass(k.toThemeProperty("jqx-icon-time"));k.timeButton.addClass(k.toThemeProperty("jqx-fill-state-normal"));if(!k.rtl){k.timeButton.addClass(k.toThemeProperty("jqx-rc-r"))}else{k.timeButton.addClass(k.toThemeProperty("jqx-rc-l"))}var m=this;k._arrange();if(a.jqx._jqxCalendar!=null&&a.jqx._jqxCalendar!=undefined){try{var i="calendar"+k.id;var h=a(a.find("#"+i));if(h.length>0){h.remove()}a.jqx.aria(this,"aria-owns",i);a.jqx.aria(this,"aria-haspopup",true);a.jqx.aria(this,"aria-readonly",k.selectionMode=="range"?true:false);var b=a("
      ");if(a.jqx.utilities.getBrowser().browser=="opera"){b.hide()}b.addClass(k.toThemeProperty("jqx-calendar-container"));if(k.dropDownContainer=="element"){b.appendTo(k.host)}else{b.appendTo(document.body)}k.container=b;k.calendarContainer=a(a.find("#innerCalendar"+k.id)).jqxCalendar({titleFormat:this.titleFormat,restrictedDates:this.restrictedDates,changing:k.changing,change:k.change,enableViews:k.enableViews,selectableDays:k.selectableDays,views:k.views,rowHeaderWidth:k.rowHeaderWidth,titleHeight:k.titleHeight,columnHeaderHeight:k.columnHeaderHeight,_checkForHiddenParent:false,enableAutoNavigation:false,canRender:false,localization:k.localization,todayString:k.todayString,clearString:k.clearString,dayNameFormat:k.dayNameFormat,rtl:k.rtl,culture:k.culture,showFooter:k.showFooter,selectionMode:k.selectionMode,firstDayOfWeek:k.firstDayOfWeek,showWeekNumbers:k.showWeekNumbers,width:k.dropDownWidth,height:k.dropDownHeight,theme:k.theme});if(k.dropDownContainer=="element"){k.calendarContainer.css({position:"absolute",top:0,left:0})}else{k.calendarContainer.css({position:"absolute",zIndex:k.popupZIndex,top:0,left:0})}k.calendarContainer.addClass(k.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){k.calendarContainer.addClass(k.toThemeProperty("jqx-noshadow"))}k.timeContainer=a(a.find("#innerTime"+k.id));k.timeContainer.css({position:"absolute",zIndex:k.popupZIndex,top:0,left:0});k.timeContainer.addClass(k.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){k.timeContainer.addClass(k.toThemeProperty("jqx-noshadow"))}k._calendar=a.data(k.calendarContainer[0],"jqxCalendar").instance;var m=this;k._calendar.today=function(){m.today()};k._calendar.clear=function(){m.clear()};if(a.jqx.utilities.getBrowser().browser=="opera"){b.show()}b.height(parseInt(k.calendarContainer.height())+25);b.width(parseInt(k.calendarContainer.width())+25);if(k.selectionMode=="range"){k.readonly=true}if(k.animationType=="none"){k.container.css("display","none")}else{k.container.hide()}}catch(l){}}if(a.global){a.global.preferCulture(k.culture)}k.selectedText="";k._addHandlers();k.self=this;k.oldValue=k.getDate();k.items=new Array();k.editors=new Array();k._loadItems();k.editorText="";if(k.readonly==true){k.dateTimeInput.css("readonly",k.readonly)}k.dateTimeInput.css("text-align",k.textAlign);k.host.addClass(k.toThemeProperty("jqx-widget"));k.host.addClass(k.toThemeProperty("jqx-datetimeinput"));k.host.addClass(k.toThemeProperty("jqx-input"));k.host.addClass(k.toThemeProperty("jqx-overflow-hidden"));k.host.addClass(k.toThemeProperty("jqx-rc-all"));k.host.addClass(k.toThemeProperty("jqx-reset"));k.host.addClass(k.toThemeProperty("jqx-clear"));k.host.addClass(k.toThemeProperty("jqx-widget-content"));k.propertyChangeMap.disabled=function(e,p,o,q){if(q){e.host.addClass(m.toThemeProperty("jqx-input-disabled"));e.host.addClass(m.toThemeProperty("jqx-fill-state-disabled"))}else{e.host.removeClass(m.toThemeProperty("jqx-fill-state-disabled"));e.host.removeClass(m.toThemeProperty("jqx-input-disabled"))}a.jqx.aria(e,"aria-disabled",q)};if(k.disabled){k.host.addClass(k.toThemeProperty("jqx-input-disabled"));k.host.addClass(k.toThemeProperty("jqx-fill-state-disabled"));k.dateTimeInput.attr("disabled",true)}if(k.host.parents("form").length>0){k.addHandler(k.host.parents("form"),"reset",function(){setTimeout(function(){m.setDate(new Date())},10)})}if(k.cookies){var g=a.jqx.cookie.cookie("jqxDateTimeInput"+k.element.id);if(g!=null){k.setDate(new Date(g))}}if(a.jqx.browser.msie&&a.jqx.browser.version<8){if(k.host.parents(".jqx-window").length>0){var n=k.host.parents(".jqx-window").css("z-index");k.container.css("z-index",n+10);k.calendarContainer.css("z-index",n+10)}}if(k.culture!="default"){k._applyCulture()}if(k.value){if(k.calendarContainer.jqxCalendar("_isDisabled",k.value.dateTime)){k.dateTimeInput.addClass(k.toThemeProperty("jqx-input-invalid"))}else{k.dateTimeInput.removeClass(k.toThemeProperty("jqx-input-invalid"))}}this._addBarAndLabel(this.dateTimeInput);this._updateHint(true);if(k.template){k.bar.addClass(k.toThemeProperty("jqx-"+k.template));k.label.addClass(k.toThemeProperty("jqx-"+k.template));k.timeButton.addClass(k.toThemeProperty("jqx-"+k.template));k.calendarButton.addClass(k.toThemeProperty("jqx-"+k.template))}this._setSize();this._arrange()},val:function(c){var b=this;if(arguments.length!=0){if(c==null){b.setDate(null)}if(b.selectionMode=="range"){b.setRange(arguments[0],arguments[1]);return b.getText()}if(c instanceof Date){b.setDate(c)}if(typeof(c)=="string"){if(c=="date"){return b.getDate()}b.setDate(c)}if(b._calendar.getDate()!=b.getDate()){b._calendar.setDate(b.getDate())}}return b.getText()},_setSize:function(){var b=window.getComputedStyle(this.element);var c=parseInt(b.borderLeftWidth)*2;var h=b.boxSizing;if(this.element.offsetWidth===0){c=2}if(h==="border-box"||isNaN(c)){c=0}if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.element.style.width=parseInt(this.width)-c+"px"}else{if(this.width!=undefined&&!isNaN(this.width)){this.element.style.width=parseInt(this.width)-c+"px"}}if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.element.style.height=parseInt(this.height)-c+"px"}else{if(this.height!=undefined&&!isNaN(this.height)){this.element.style.height=parseInt(this.height)-c+"px"}}var g=false;if(this.width!=null&&this.width.toString().indexOf("%")!=-1){g=true;this.host.width(this.width);if(c>0){this.host.css("box-sizing","border-box")}}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){g=true;this.host.height(this.height)}var e=this;var f=function(){if(e.calendarContainer){e._arrange()}};if(g){if(this.calendarContainer){this._arrange();var d=this.host.width();if(this.dropDownWidth!="auto"){d=this.dropDownWidth}this.calendarContainer.jqxCalendar({width:d});this.container.width(parseInt(d)+25)}}a.jqx.utilities.resize(this.host,function(){f()})},_arrange:function(){if(this.height==null){this.height=27;this.host.height(27)}var e=parseInt(this.host.width());var m=parseInt(this.host.height());var i=window.getComputedStyle(this.element);var g=parseInt(i.borderLeftWidth)*2;var f=i.boxSizing;if(f==="border-box"||isNaN(g)){g=0}var k=this.buttonSize;var h=2;if(!this.showCalendarButton&&!this.showTimeButton){k=0;var l=0;this.calendarButton.hide();h=0}if(!this.showCalendarButton){this.calendarButton.hide()}else{this.calendarButton.show()}if(!this.showTimeButton){this.timeButton.hide()}else{this.timeButton.show()}var b=e-k-1*h;if(this.showTimeButton&&this.showCalendarButton){var b=e-2*k-1*h}else{if(this.showTimeButton||this.showCalendarButton){var b=e-k-1*h}}if(b>0){this.dateTimeInput[0].style.width=b+"px"}if(this.rtl){this.dateTimeInput[0].style.width=(-1+b+"px")}this.dateTimeInput[0].style.left="0px";this.dateTimeInput[0].style.top="0px";this.calendarButton[0].style.width=k+1+"px";this.calendarButton[0].style.left=1+b+"px";this.timeButton[0].style.width=k+1+"px";if(this.showCalendarButton){this.timeButton[0].style.left=1+this.calendarButton.width()+b+"px"}else{this.timeButton[0].style.left=1+b+"px"}if(this.renderMode!="full"){this.calendarButton[0].style.width="100%";this.calendarButton[0].style.left="0px";this.calendarButton.css("border","none");this.timeButton[0].style.width="100%";this.timeButton[0].style.left="0px";this.timeButton.css("border","none")}var d=this.dateTimeInput.height();if(d==0&&this.renderMode!="full"){d=parseInt(this.dateTimeInput.css("font-size"))+3;this.calendarButton.addClass(this.toThemeProperty("jqx-rc-all"));this.timeButton.addClass(this.toThemeProperty("jqx-rc-all"))}else{d=17}if(this.dateTimeInput[0].className.indexOf("jqx-rc-all")==-1){this.dateTimeInput.addClass(this.toThemeProperty("jqx-rc-all"))}var j=parseInt(m)/2-parseInt(d)/2;if(j>0){var n=this.dateTimeInput.css("font-size");if(""==n){n=13}var j=m-2-parseInt(n)-2;if(isNaN(j)){j=0}if(j<0){j=0}var c=j/2;if(a.jqx.browser.msie&&a.jqx.browser.version<8){c=j/4}this.dateTimeInput[0].style.paddingTop=Math.round(c)+"px";this.dateTimeInput[0].style.paddingBottom=Math.round(c)+"px"}if(this.rtl){this.calendarButton[0].style.width=k+"px";this.timeButton[0].style.width=k+"px";this.calendarButton.css("left","0px");if(this.showCalendarButton){this.timeButton.css("left",k+"px")}else{this.timeButton.css("left","0px")}this.dateTimeInput.css("left",this.calendarButton.width());if(this.showTimeButton&&this.showCalendarButton){this.dateTimeInput.css("left",this.timeButton.width()+this.calendarButton.width())}if(a.jqx.browser.msie&&a.jqx.browser.version<=8){this.dateTimeInput.css("left",1+this.calendarButton.width());if(this.showTimeButton&&this.showCalendarButton){this.dateTimeInput.css("left",1+this.timeButton.width()+this.calendarButton.width())}}}},_removeHandlers:function(){var b=this;this.removeHandler(a(document),"mousedown."+this.id);if(this.dateTimeInput){this.removeHandler(this.dateTimeInput,"keydown."+this.id);this.removeHandler(this.dateTimeInput,"blur");this.removeHandler(this.dateTimeInput,"focus");this.removeHandler(this.host,"focus");this.removeHandler(this.dateTimeInput,"mousedown");this.removeHandler(this.dateTimeInput,"mouseup");this.removeHandler(this.dateTimeInput,"keydown");this.removeHandler(this.dateTimeInput,"keyup");this.removeHandler(this.dateTimeInput,"keypress")}if(this.calendarButton!=null){this.removeHandler(this.calendarButton,"mousedown")}if(this.timeButton!=null){this.removeHandler(this.timeButton,"mousedown")}if(this.calendarContainer!=null){this.removeHandler(this.calendarContainer,"cellSelected");this.removeHandler(this.calendarContainer,"cellMouseDown")}this.removeHandler(a(window),"resize."+this.id)},isOpened:function(){var c=this;var b=a.data(document.body,"openedJQXCalendar"+this.id);if(b!=null&&b==c.calendarContainer){return true}return false},wheel:function(d,c){if(!c.isEditing){return}c.changeType="mouse";var e=0;if(!d){d=window.event}if(d.originalEvent&&d.originalEvent.wheelDelta){d.wheelDelta=d.originalEvent.wheelDelta}if(d.wheelDelta){e=d.wheelDelta/120}else{if(d.detail){e=-d.detail/3}}if(e){var b=c._handleDelta(e);if(!b){if(d.preventDefault){d.preventDefault()}d.returnValue=false;return b}else{return false}}if(d.preventDefault){d.preventDefault()}d.returnValue=false},_handleDelta:function(b){if(b<0){this.spinDown()}else{this.spinUp()}return false},focus:function(){try{var c=this;c._firstFocusDate=c.getDate();this._setSelectionStart(0);this._selectGroup(-1);this.dateTimeInput.focus();setTimeout(function(){c._setSelectionStart(0);c._selectGroup(-1);c.dateTimeInput.focus()},25)}catch(b){}},_addHandlers:function(){var e=this.element.id;var c=this.element;var d=this;if(this.host.parents()){this.addHandler(this.host.parents(),"scroll.datetimeinput"+this.element.id,function(f){var g=d.isOpened();if(g){d.close()}})}this.addHandler(this.host,"mouseenter",function(){if(!d.disabled&&d.enableHover){var f=true;d.calendarButtonIcon.addClass(d.toThemeProperty("jqx-icon-calendar-hover"));d.calendarButton.addClass(d.toThemeProperty("jqx-fill-state-hover"));if(d.showTimeButton){d.timeButtonIcon.addClass(d.toThemeProperty("jqx-icon-time-hover"));d.timeButton.addClass(d.toThemeProperty("jqx-fill-state-hover"))}}});this.addHandler(this.host,"mouseleave",function(){if(!d.disabled&&d.enableHover){d.calendarButtonIcon.removeClass(d.toThemeProperty("jqx-icon-calendar-hover"));d.calendarButton.removeClass(d.toThemeProperty("jqx-fill-state-hover"));if(d.showTimeButton){d.timeButtonIcon.removeClass(d.toThemeProperty("jqx-icon-time-hover"));d.timeButton.removeClass(d.toThemeProperty("jqx-fill-state-hover"))}}});this.addHandler(this.host,"mousewheel",function(f){d.wheel(f,d)});this.addHandler(a(document),"mousedown."+this.id,this._closeOpenedCalendar,{me:this});if(a.jqx.mobile.isTouchDevice()){this.addHandler(a(document),a.jqx.mobile.getTouchEventName("touchstart")+"."+this.id,this._closeOpenedCalendar,{me:this})}this.addHandler(this.dateTimeInput,"keydown."+this.id,function(h){var g=a.data(document.body,"openedJQXCalendar"+d.id);if(g!=null&&g==d.calendarContainer){var f=d.handleCalendarKey(h,d);return f}});if(this.calendarContainer!=null){this.addHandler(this.calendarContainer,"keydown",function(f){if(f.keyCode==13){if(d.isOpened()){if(!d._calendar._viewAnimating&&d._calendar.view=="month"){d.hideCalendar("selected","keyboard");d.dateTimeInput.focus();return false}}return true}else{if(f.keyCode==9){if(d.isOpened()){d.hideCalendar("selected","keyboard");return true}}else{if(f.keyCode==27){if(d.isOpened()){d.hideCalendar(null,"keyboard");d.dateTimeInput.focus();return false}return true}}}d.timePopup=false;if(f.keyCode==84){d.timePopup=true}if(f.keyCode==115){if(d.isOpened()){d.hideCalendar("keyboard","keyboard");d.dateTimeInput.focus();return false}else{if(!d.isOpened()){d.showCalendar("keyboard","keyboard");d.dateTimeInput.focus();return false}}}if(f.altKey){if(f.keyCode==38){if(d.isOpened()){d.hideCalendar("keyboard","keyboard");d.dateTimeInput.focus();return false}}else{if(f.keyCode==40){if(!d.isOpened()){d.showCalendar("keyboard","keyboard");d.dateTimeInput.focus();return false}}}}});this.addHandler(this.calendarContainer,"cellSelected",function(g){if(d.closeCalendarAfterSelection){var f=a.data(document.body,"openedJQXCalendarValue");if(g.args.selectionType=="mouse"){if(d.selectionMode!="range"){d.hideCalendar("selected","mouse")}else{if(d._calendar._clicks==0){d.hideCalendar("selected","mouse")}}}}});this.addHandler(this.calendarContainer,"cellMouseDown",function(f){if(d.closeCalendarAfterSelection){if(d._calendar.value){a.data(document.body,"openedJQXCalendarValue",new a.jqx._jqxDateTimeInput.getDateTime(d._calendar.value.dateTime))}}})}this.addHandler(this.dateTimeInput,"blur",function(h){d.bar.removeClass("focused");d.label.removeClass("focused");d._endFullEdit();if(d.value!=null){d.isEditing=false;var g=d.value.dateTime.getDay();var f=d._oldDT;d._validateValue(true);if(h.stopPropagation){h.stopPropagation()}d._updateText();d._raiseEvent(9,h)}if(!d.isOpened()){d.host.removeClass(d.toThemeProperty("jqx-fill-state-focus"))}});this.addHandler(this.host,"focus",function(f){d.focus()});this.addHandler(this.dateTimeInput,"focus",function(f){d._firstFocusDate=d.getDate();if(d.value!=null){if(d.selectionMode!="range"){d._oldDT=new Date(d.value.dateTime)}else{d._oldDT=d.getRange()}setTimeout(function(){var g=d._selection();d.isEditing=true;d._validateValue();d._updateText();d._setSelectionStart(0);d._selectGroup(-1,g);d.host.addClass(d.toThemeProperty("jqx-fill-state-focus"))})}else{d._setSelectionStart(0);d._selectGroup(-1);d.host.addClass(d.toThemeProperty("jqx-fill-state-focus"))}if(f.stopPropagation){f.stopPropagation()}d.bar.addClass("focused");d.label.addClass("focused");if(f.preventDefault){f.preventDefault();return false}});var b="mousedown";if(this.touch){b=a.jqx.mobile.getTouchEventName("touchstart")}this.addHandler(this.calendarButton,b,function(g){var h=d.container;var f=h.css("display")=="block";d.timePopup=false;d.calendarPopup=true;if(!d.disabled){if(!d.isanimating){if(f){d.hideCalendar();return false}else{d.showCalendar("mouse");g.preventDefault()}}}});this.addHandler(this.timeButton,b,function(g){var h=d.container;var f=h.css("display")=="block";d.timePopup=true;d.calendarPopup=false;if(!d.disabled){if(!d.isanimating){if(f){d.hideCalendar("mouse","mouse");return false}else{d.showCalendar("mouse");g.preventDefault()}}}});this.addHandler(this.dateTimeInput,"mousedown",function(f){return d._raiseEvent(2,f)});this.addHandler(this.dateTimeInput,"mouseup",function(f){return d._raiseEvent(3,f)});this.addHandler(this.dateTimeInput,"keydown",function(f){return d._raiseEvent(4,f)});this.addHandler(this.dateTimeInput,"keyup",function(f){var g=this.value;if(d._fullEditInProgress&&d._enteredValue&&d._mask[g.length]!==undefined){this.value=this.value+d._mask[g.length]}return d._raiseEvent(5,f)});this.addHandler(this.dateTimeInput,"keypress",function(f){return d._raiseEvent(6,f)})},createID:function(){var b=Math.random()+"";b=b.replace(".","");b="99"+b;b=b/1;return"dateTimeInput"+b},setMaxDate:function(b,c){if(b==null){return}if(b!=null&&typeof(b)=="string"){b=new Date(b);if(!this._isValidDate(b)){return}}this.maxDate=a.jqx._jqxDateTimeInput.getDateTime(b);if(this._calendar!=null){this._calendar.setMaxDate(b)}if(c!=false){if(this.getDate()!=null&&this.getDate()>b){this.setDate(b)}a.jqx.aria(this,"aria-valuemax",b);this._refreshValue();this._updateText()}},getMaxDate:function(){if(this.maxDate!=null&&this.maxDate!=undefined){return this.maxDate.dateTime}return null},setMinDate:function(b,c){if(b==null){return}if(b!=null&&typeof(b)=="string"){b=new Date(b);if(!this._isValidDate(b)){return}}this.minDate=a.jqx._jqxDateTimeInput.getDateTime(b);if(this._calendar!=null){this._calendar.setMinDate(b)}if(c!=false){if(this.getDate()!=null&&this.getDate()=0){d=d.replace(/\,/g,"/");d=new Date(d);if(!this._isValidDate(d)){d=f}}if(d.toString().indexOf("-")>=0){d=d.replace(/\-/g,"/");d=new Date(d);if(!this._isValidDate(d)){d=f}if(d.getFullYear&&isNaN(d.getFullYear)){d=f}}if(d!=""){var c=d;if(window.Globalize!=undefined){d=window.Globalize.parseDate(c,this.formatString,this.culture)}else{if(a.jqx.dataFormat){d=a.jqx.dataFormat.parsedate(c,this.formatString,this.localization.calendar)}else{d=new Date(d)}}if(d===null&&c!==null){if(this._isValidDate(c)){d=c}}if(!this._isValidDate(d)){return}}}if(d==null||d=="null"||d=="undefined"){if(!this.allowNullDate){d=this.min}}if(!this._isValidDate(d)){d=null}if(d==null||d=="null"||d=="undefined"||d===""){if(this.value!=null){this.value=null;this._calendar.setDate(null);this._refreshValue();if(this.cookies){if(this.value!=null){a.jqx.cookie.cookie("jqxDateTimeInput"+this.element.id,this.value.dateTime.toString(),this.cookieoptions)}}this._setSelectionStart(0);this._selectGroup(-1);this._raiseEvent("0",d,e);this._raiseEvent("9",d,e)}return}if(dthis.getMaxDate()){return}if(this.value==null){this.value=new a.jqx._jqxDateTimeInput.getDateTime(new Date());this.value._setHours(0);this.value._setMinutes(0);this.value._setSeconds(0);this.value._setMilliseconds(0)}if(d.getFullYear){this.value._setYear(d.getFullYear());this.value._setDay(1);this.value._setMonth(d.getMonth()+1);this.value._setHours(d.getHours());this.value._setMinutes(d.getMinutes());this.value._setSeconds(d.getSeconds());this.value._setMilliseconds(d.getMilliseconds());this.value._setDay(d.getDate())}this._validateTimeRange();this._refreshValue();if(this.cookies){if(this.value!=null){a.jqx.cookie.cookie("jqxDateTimeInput"+this.element.id,this.value.dateTime.toString(),this.cookieoptions)}}var b=this.getDate();var g=(b-e);if(g!=0){this._raiseEvent("0",d,e);this._raiseEvent("9",d,e);return true}},getDate:function(){if(this.value==undefined){return null}return new Date(this.value.dateTime)},getText:function(){return this.dateTimeInput.val()},setRange:function(d,c){if(typeof(d)=="object"&&!this._isValidDate(d)){d=null}if(typeof(c)=="object"&&!this._isValidDate(c)){c=null}if(d!=null&&typeof(d)=="string"){d=new Date(d);if(!this._isValidDate(d)){return}}if(c!=null&&typeof(c)=="string"){c=new Date(c);if(!this._isValidDate(c)){return}}if(d&&isNaN(d)&&d.toString()=="NaN"&&typeof(d)!="string"){return}if(c&&isNaN(c)&&c.toString()=="NaN"&&typeof(c)!="string"){return}this._calendar.setRange(d,c);if(c&&d&&(c.valueOf()!=d.valueOf())){this._range={from:d,to:c}}else{this._range=this._calendar.getRange()}var b=d;if(b!=null&&b.getFullYear){if(this.value==null){this.value=new a.jqx._jqxDateTimeInput.getDateTime(new Date());this.value._setHours(0);this.value._setMinutes(0);this.value._setSeconds(0);this.value._setMilliseconds(0)}this.value._setYear(b.getFullYear());this.value._setMonth(b.getMonth()+1);this.value._setHours(b.getHours());this.value._setMinutes(b.getMinutes());this.value._setSeconds(b.getSeconds());this.value._setMilliseconds(b.getMilliseconds());this.value._setDay(b.getDate())}this._refreshValue();if(this.value){this._raiseEvent("0",this.value.dateTime)}else{this._raiseEvent("0",null)}},getRange:function(){var b=this._calendar.getRange();if(this._range){var d=this._range.from;var c=this._range.to;if(c&&d&&(c.valueOf()!=d.valueOf())){if(b.from){b.from.setHours(d.getHours(),d.getMinutes(),d.getSeconds(),d.getMilliseconds())}if(b.to){b.to.setHours(c.getHours(),c.getMinutes(),c.getSeconds(),c.getMilliseconds())}}}return b},_validateValue:function(e){var b=false;for(var d=0;d1){c=1}}break;case"Character":break;case"Day":if(c<1){c=1}else{if(c>31){c=31}}break;case"FORMAT_hh":if(c<1){c=1}else{if(c>12){c=12}}break;case"FORMAT_HH":if(c<0){c=0}else{if(c>23){c=23}}break;case"Millisecond":if(c<0){c=0}else{if(c>999){c=999}}break;case"Minute":if(c<0){c=0}else{if(c>59){c=59}}break;case"Month":if(c<1){c=1}else{if(c>12){c=12}}break;case"ReadOnly":break;case"Second":if(c<0){c=0}else{if(c>59){c=59}}break;case"Year":if(cthis.maxDate.year){c=this.maxDate.year}}break}if(this.editors[d].value!=c){this.editors[d].value=c;b=true}}this.updateValue(e);if(this.value!=null&&e===true){if(this.value.dateTime>this.maxDate.dateTime){this._internalSetValue(this.maxDate);this._updateEditorsValue()}else{if(this.value.dateTime=0){this._selectGroup(e)}},spinDown:function(){var d=this.value;if(d==null){return}if(this.activeEditor!=null){var b=this.editors.indexOf(this.activeEditor);if(b==-1){return}if(this.items[b].type=="Day"){if(this.value!=null){this.activeEditor.maxValue=this.value._daysInMonth(this.value.year,this.value.month)}}var c=this.activeEditor.positions;this.activeEditor.decreaseValue(this.enableAbsoluteSelection);this.activeEditor.positions=c}if(this.isEditing){this.isEditing=false}this.updateValue();this.isEditing=true;this._updateText();var e=this.editors.indexOf(this.activeEditor);if(e>=0){this._selectGroup(e)}},_passKeyToCalendar:function(c){if(c.keyCode==13||c.keyCode==9){this.hideCalendar("selected","keyboard");return true}else{if(c.keyCode==27){var e=this.calendarContainer;var d=this._calendar;var f=this.closeCalendarAfterSelection;this.closeCalendarAfterSelection=false;d.setDate(this.value.dateTime);this.closeCalendarAfterSelection=f;this.hideCalendar()}}var f=this.closeCalendarAfterSelection;this.closeCalendarAfterSelection=false;var b=this._calendar._handleKey(c);this.closeCalendarAfterSelection=f;return b},handleCalendarKey:function(f,e){var c=a(f.target);var d=a.data(document.body,"openedJQXCalendar"+this.id);if(d!=null){if(d.length>0){var b=e._passKeyToCalendar(f);return b}}return true},_findPos:function(c){if(c==null){return}while(c&&(c.type=="hidden"||c.nodeType!=1||a.expr.filters.hidden(c))){c=c.nextSibling}var b=a(c).coord(true);return[b.left,b.top]},testOffset:function(h,f,c){var g=h.outerWidth();var j=h.outerHeight();var i=a(window).width()+a(window).scrollLeft();var e=a(window).height()+a(window).scrollTop();if(f.left+g>i){if(g>this.host.width()){var d=this.host.coord().left;var b=g-this.host.width();f.left=d-b+2}}if(f.left<0){f.left=parseInt(this.host.coord().left)+"px"}f.top-=Math.min(f.top,(f.top+j>e&&e>j)?Math.abs(j+c+23):0);return f},open:function(b){if(b=="time"){this.timePopup=true}else{this.timePopup=false}this.showCalendar()},close:function(b){this.hideCalendar()},_getBodyOffset:function(){var c=0;var b=0;if(a("body").css("border-top-width")!="0px"){c=parseInt(a("body").css("border-top-width"));if(isNaN(c)){c=0}}if(a("body").css("border-left-width")!="0px"){b=parseInt(a("body").css("border-left-width"));if(isNaN(b)){b=0}}return{left:b,top:c}},initTimePopup:function(){this.timePopupElement=a("
      ").appendTo(this.timeContainer);this.timePopupElement.addClass(this.toThemeProperty("jqx-widget-content jqx-widget jqx-date-time-input-popup"));var s="";s+="
       
       
       
       
      ::: 
       
      ";var l=this._getFormatValue(this.formatString);if(this.selectionMode!="range"){this.timePopupElement[0].innerHTML=s}else{this.timePopupElement[0].innerHTML="
      "+s+"-"+s+"
      "}this.timePopupElement.find(".jqx-icon-down").addClass(this.toThemeProperty("jqx-icon jqx-icon-arrow-down"));this.timePopupElement.find(".jqx-icon-up").addClass(this.toThemeProperty("jqx-icon jqx-icon-arrow-up"));var g=this.timePopupElement.find("input");g.addClass(this.toThemeProperty("jqx-input"));g.addClass(this.toThemeProperty("jqx-rc-all"));this.addHandler(g,"mousedown",function(u){u.stopPropagation()});var e=function(u){if(u.target.className.indexOf("hour")>=0){m._decrementHour(a(u.target))}if(u.target.className.indexOf("minute")>=0){m._decrementMinuteSecond(a(u.target))}if(u.target.className.indexOf("second")>=0){m._decrementMinuteSecond(a(u.target))}if(u.target.className.indexOf("millisecond")>=0){m._decrementMillisecond(a(u.target))}if(u.target.className.indexOf("meridian")>=0){m._decrementMeridian(a(u.target))}};var k=function(u){if(u.target.className.indexOf("hour")>=0){m._incrementHour(a(u.target))}if(u.target.className.indexOf("minute")>=0){m._incrementMinuteSecond(a(u.target))}if(u.target.className.indexOf("second")>=0){m._incrementMinuteSecond(a(u.target))}if(u.target.className.indexOf("millisecond")>=0){m._incrementMillisecond(a(u.target))}if(u.target.className.indexOf("meridian")>=0){m._incrementMeridian(a(u.target))}};var r=function(v,u){if(!u.isEditing){return}var w=0;if(!v){v=window.event}if(v.originalEvent&&v.originalEvent.wheelDelta){v.wheelDelta=v.originalEvent.wheelDelta}if(v.originalEvent&&v.originalEvent.deltaY!=undefined){w=-v.originalEvent.deltaY}if(v.wheelDelta){w=v.wheelDelta/120}else{if(v.detail){w=-v.detail/3}}if(w){if(document.activeElement==v.target&&v.target.nodeName.toLowerCase()=="input"){if(w<0){e(v)}else{k(v)}}if(v.preventDefault){v.preventDefault()}v.returnValue=false}if(v.preventDefault){v.preventDefault()}v.returnValue=false};this.addHandler(g,"wheel",function(u){r(u,m)});this.addHandler(g,"keydown",function(v){var u=a(v.target);if(v.ctrlKey){if(v.keyCode==38){if(m.isOpened()){m.hideCalendar("keyboard","keyboard");m.dateTimeInput.focus();return false}}else{if(v.keyCode==40){if(!m.isOpened()){m.showCalendar("keyboard","keyboard");m.dateTimeInput.focus();return false}}}}if(v.keyCode==40){e(v);v.preventDefault()}else{if(v.keyCode==38){k(v);v.preventDefault()}else{if(v.keyCode==13){v.preventDefault();m.hideCalendar("keyboard","keyboard");m.dateTimeInput.focus()}else{if(v.keyCode==27){v.preventDefault();m.hideCalendar("cancel");m.dateTimeInput.focus()}}}}});this.hourInput=a(g[0]);this.minuteInput=a(g[1]);this.secondInput=a(g[2]);this.mssecondInput=a(g[3]);this.meridianInput=a(g[4]);this.hourInput2=a(g[5]);this.minuteInput2=a(g[6]);this.secondInput2=a(g[7]);this.mssecondInput2=a(g[8]);this.meridianInput2=a(g[9]);var m=this;var o=this.timePopupElement.find(".increment-hour-column");this.hourIncrement=a(o[0]);this.hourIncrement2=a(o[1]);this.addHandler(g,"change",function(v){var u=a(v.target);if(u.val().length<=1){u.val("0"+a(v.target).val())}if(v.target.className.indexOf("hour")>=0){var w=parseInt(a(v.target).val());if(l.indexOf("HH")>=0){while(w>24){w=w-24}}else{while(w>12){w=w-12}}if(w<10){w="0"+w}if(u.val()!=w){u.val(w)}}if(v.target.className.indexOf("minute")>=0||v.target.className.indexOf("second")>=0){var w=parseInt(a(v.target).val());while(w>59){w--}if(w<10){w="0"+w}if(u.val()!=w){u.val(w)}}});this._incrementHour=function(u){var v=parseInt(u.val());v++;if(l.indexOf("HH")>=0){if(v>23){v=0}}else{if(v>12){v=1}}if(v<10){v="0"+v}u.val(v)};this._incrementMinuteSecond=function(u){var v=parseInt(u.val());v++;if(v>59){v=0}if(v<10){v="0"+v}u.val(v)};this._incrementMillisecond=function(u){var v=parseInt(u.val());v++;if(v>999){v=0}if(v<10){v="0"+v}u.val(v)};this._incrementMeridian=function(u){var v=u.val();if(v.toLowerCase().indexOf("a")>=0){v="PM"}else{v="AM"}u.val(v)};this._decrementHour=function(u){var v=parseInt(u.val());v--;if(l.indexOf("HH")>=0){if(v<0){v=23}}else{if(v<1){v=12}}if(v<10){v="0"+v}u.val(v)};this._decrementMinuteSecond=function(u){var v=parseInt(u.val());v--;if(v<0){v=59}if(v<10){v="0"+v}u.val(v)};this._decrementMillisecond=function(u){var v=parseInt(u.val());v--;if(v<0){v=999}if(v<10){v="0"+v}u.val(v)};this._decrementMeridian=function(u){var v=u.val();if(v.toLowerCase().indexOf("a")>=0){v="PM"}else{v="AM"}u.val(v)};this.addHandler(this.hourIncrement,"mousedown",function(u){u.stopPropagation();m._incrementHour(m.hourInput)});this.addHandler(this.hourIncrement2,"mousedown",function(u){u.stopPropagation();m._incrementHour(m.hourInput2)});var p=this.timePopupElement.find(".increment-minute-column");this.minuteIncrement=a(p[0]);this.minuteIncrement2=a(p[1]);this.addHandler(this.minuteIncrement,"mousedown",function(u){u.stopPropagation();m._incrementMinuteSecond(m.minuteInput)});this.addHandler(this.minuteIncrement2,"mousedown",function(u){u.stopPropagation();m._incrementMinuteSecond(m.minuteInput2)});var c=this.timePopupElement.find(".increment-second-column");this.secondIncrement=a(c[0]);this.secondIncrement2=a(c[1]);this.addHandler(this.secondIncrement,"mousedown",function(u){u.stopPropagation();m._incrementMinuteSecond(m.secondInput)});this.addHandler(this.secondIncrement2,"mousedown",function(u){u.stopPropagation();m._incrementMinuteSecond(m.secondInput2)});var d=this.timePopupElement.find(".increment-millisecond-column");this.millisecondsIncrement=a(d[0]);this.millisecondsIncrement2=a(d[1]);this.addHandler(this.millisecondsIncrement,"mousedown",function(u){u.stopPropagation();m._incrementMillisecond(m.mssecondInput)});this.addHandler(this.millisecondsIncrement2,"mousedown",function(u){u.stopPropagation();m._incrementMillisecond(m.mssecondInput2)});var i=this.timePopupElement.find(".increment-meridian-column");this.meridianIncrement=a(i[0]);this.meridianIncrement2=a(i[1]);this.addHandler(this.meridianIncrement,"mousedown",function(u){u.stopPropagation();m._incrementMeridian(m.meridianInput)});this.addHandler(this.meridianIncrement2,"mousedown",function(u){u.stopPropagation();m._incrementMeridian(m.meridianInput2)});var n=this.timePopupElement.find(".decrement-hour-column");this.hourDecrement=a(n[0]);this.hourDecrement2=a(n[1]);this.addHandler(this.hourDecrement,"mousedown",function(u){u.stopPropagation();m._decrementHour(m.hourInput)});this.addHandler(this.hourDecrement2,"mousedown",function(u){u.stopPropagation();m._decrementHour(m.hourInput2)});var j=this.timePopupElement.find(".decrement-minute-column");this.minuteDecrement=a(j[0]);this.minuteDecrement2=a(j[1]);this.addHandler(this.minuteDecrement,"mousedown",function(u){u.stopPropagation();m._decrementMinuteSecond(m.minuteInput)});this.addHandler(this.minuteDecrement2,"mousedown",function(u){u.stopPropagation();m._decrementMinuteSecond(m.minuteInput2)});var t=this.timePopupElement.find(".decrement-second-column");this.secondDecrement=a(t[0]);this.secondDecrement2=a(t[1]);this.addHandler(this.secondDecrement,"mousedown",function(u){u.stopPropagation();m._decrementMinuteSecond(m.secondInput)});this.addHandler(this.secondDecrement2,"mousedown",function(u){u.stopPropagation();m._decrementMinuteSecond(m.secondInput2)});var b=this.timePopupElement.find(".decrement-millisecond-column");this.millisecondsDecrement=a(b[0]);this.millisecondsDecrement2=a(b[1]);this.addHandler(this.millisecondsDecrement,"mousedown",function(u){u.stopPropagation();m._decrementMillisecond(m.mssecondInput)});this.addHandler(this.millisecondsDecrement2,"mousedown",function(u){u.stopPropagation();m._decrementMillisecond(m.mssecondInput2)});var f=this.timePopupElement.find(".decrement-meridian-column");this.meridianDecrement=a(f[0]);this.meridianDecrement2=a(f[1]);this.addHandler(this.meridianDecrement,"mousedown",function(u){u.stopPropagation();m._decrementMeridian(m.meridianInput)});this.addHandler(this.meridianDecrement2,"mousedown",function(u){u.stopPropagation();m._decrementMeridian(m.meridianInput2)});var q=this.timePopupElement.find("table");this.addHandler(this.timePopupElement,"mousedown",function(u){u.stopPropagation()});var h=function(u){var v=u.find("tr");if(l.indexOf("mm")==-1){m.minuteInput.hide();m.minuteInput2.hide();a(a(v[0]).children()[1]).hide();a(a(v[0]).children()[2]).hide();a(a(v[1]).children()[1]).hide();a(a(v[1]).children()[2]).hide();a(a(v[2]).children()[1]).hide();a(a(v[2]).children()[2]).hide()}if(l.indexOf("ss")==-1){m.secondInput.hide();m.secondInput2.hide();a(a(v[0]).children()[3]).hide();a(a(v[0]).children()[4]).hide();a(a(v[1]).children()[3]).hide();a(a(v[1]).children()[4]).hide();a(a(v[2]).children()[3]).hide();a(a(v[2]).children()[4]).hide()}if(l.indexOf("tt")==-1&&l.indexOf("hh")==-1){m.meridianInput.hide();m.meridianInput2.hide();a(a(v[0]).children()[7]).hide();a(a(v[0]).children()[8]).hide();a(a(v[1]).children()[7]).hide();a(a(v[1]).children()[8]).hide();a(a(v[2]).children()[7]).hide();a(a(v[2]).children()[8]).hide()}if(l.indexOf("zz")==-1){m.mssecondInput.hide();m.mssecondInput2.hide();a(a(v[0]).children()[5]).hide();a(a(v[0]).children()[6]).hide();a(a(v[1]).children()[5]).hide();a(a(v[1]).children()[6]).hide();a(a(v[2]).children()[5]).hide();a(a(v[2]).children()[6]).hide()}};if(q.length==1){h(q)}else{h(a(a(q)[1]));h(a(a(q)[2]))}},updateTimePopup:function(){var b=this._getFormatValue(this.formatString);if(this.selectionMode!="range"){var f=this.getDate();if(this.hourInput){if(f){var c=f.getHours();var h=f.getMinutes();var g=f.getHours();var e=f.getSeconds();var d=f.getMilliseconds()}else{var c=0;var h=0;var g=0;var e=0;var d=0}if(c>=12){g="PM";if(b.indexOf("HH")==-1){c-=12;if(c==0){c=12}}}else{g="AM"}if(this.meridianInput.css("display")!="none"){if(c==0){c=12}}if(c<10){c="0"+c}if(h<10){h="0"+h}if(e<10){e="0"+e}if(d<10){d="0"+d}this.hourInput.val(c);this.minuteInput.val(h);this.secondInput.val(e);this.mssecondInput.val(d);this.meridianInput.val(g)}}else{var f=this.getRange().from;if(this.hourInput){if(f){var c=f.getHours();var h=f.getMinutes();var g=f.getHours();var e=f.getSeconds();var d=f.getMilliseconds()}else{var c=0;var h=0;var g=0;var e=0;var d=0}if(c>=12){g="PM";if(b.indexOf("HH")==-1){c-=12;if(c==0){c=12}}}else{g="AM"}if(this.meridianInput.css("display")!="none"){if(c==0){c=12}}if(c<10){c="0"+c}if(h<10){h="0"+h}if(e<10){e="0"+e}if(d<10){d="0"+d}this.hourInput.val(c);this.minuteInput.val(h);this.secondInput.val(e);this.mssecondInput.val(d);this.meridianInput.val(g)}var f=this.getRange().to;if(this.hourInput2){if(f){var c=f.getHours();var h=f.getMinutes();var g=f.getHours();var e=f.getSeconds();var d=f.getMilliseconds()}else{var c=0;var h=0;var g=0;var e=0;var d=0}if(c>=12){g="PM";if(b.indexOf("HH")==-1){c-=12;if(c==0){c=12}}}else{g="AM"}if(this.meridianInput.css("display")!="none"){if(c==0){c=12}}if(c<10){c="0"+c}if(h<10){h="0"+h}if(e<10){e="0"+e}if(d<10){d="0"+d}this.hourInput2.val(c);this.minuteInput2.val(h);this.secondInput2.val(e);this.mssecondInput2.val(d);this.meridianInput2.val(g)}}},showCalendar:function(){var o=this.calendarContainer;var s=this._calendar;a.jqx.aria(this,"aria-expanded",true);if(this.showTimeButton){if(this.timePopup){if(!this.timePopupElement){this.initTimePopup()}this.calendarContainer.css("visibility","hidden");this.timeContainer.css("visibility","visible");this.updateTimePopup();var d=this.timeContainer.find("input");var v=0;for(var z=0;zthis.host.width()){var f=23;this.container.css("left",f+parseInt(Math.round(u))-x+"px")}else{this.container.css("left",25+parseInt(Math.round(u))+x+"px")}}if(this.dropDownVerticalAlignment=="top"){var y=o.height();if(this.timePopup){this.timeContainer.css("top",this.container.height()-75)}b=true;o.css("top",23);o.addClass(this.toThemeProperty("jqx-popup-up"));var n=parseInt(this.host.outerHeight());var m=parseInt(p)-Math.abs(y+n+23);this.container.css("top",m)}if(this.enableBrowserBoundsDetection){var j=this.testOffset(o,{left:parseInt(this.container.css("left")),top:parseInt(p)},parseInt(this.host.outerHeight()));if(parseInt(this.container.css("top"))!=j.top){b=true;o.css("top",23);o.addClass(this.toThemeProperty("jqx-popup-up"))}else{o.css("top",0)}this.container.css("top",j.top);if(parseInt(this.container.css("left"))!=j.left){this.container.css("left",j.left)}}this._raiseEvent(7,o);if(this.animationType!="none"&&this.animationType!="transform"){this.container.css("display","block");var q=parseInt(o.outerHeight());o.stop();this.isanimating=true;this.opening=true;if(this.animationType=="fade"){o.css("margin-top",0);o.css("opacity",0);o.animate({opacity:1},this.openDelay,function(){r.isanimating=false;r.opening=false;a.data(document.body,"openedJQXCalendar"+r.id,o);r.calendarContainer.focus()});if(this.timePopup){this.timeContainer.css("margin-top",0);this.timeContainer.css("opacity",0);this.timeContainer.animate({opacity:1},this.openDelay,function(){r.isanimating=false;r.opening=false;a.data(document.body,"openedJQXCalendar"+r.id,o);r.timeContainer.focus()})}}else{o.css("opacity",1);if(this.timePopup){this.timeContainer.css("opacity",1)}if(b){o.css("margin-top",q)}else{o.css("margin-top",-q)}if(this.timePopup){if(b){this.timeContainer.css("margin-top",q)}else{this.timeContainer.css("margin-top",-q)}this.timeContainer.animate({"margin-top":0},this.openDelay,function(){r.isanimating=false;r.opening=false;a.data(document.body,"openedJQXCalendar"+r.id,o);r.timeContainer.focus()})}o.animate({"margin-top":0},this.openDelay,function(){r.isanimating=false;r.opening=false;a.data(document.body,"openedJQXCalendar"+r.id,o);r.calendarContainer.focus()})}}else{o.stop();r.isanimating=false;r.opening=false;o.css("opacity",1);o.css("margin-top",0);this.container.css("display","block");a.data(document.body,"openedJQXCalendar"+r.id,o);this.calendarContainer.focus();if(this.timePopup){this.timeContainer.stop();this.timeContainer.css("opacity",1);this.timeContainer.css("margin-top",0);this.timeContainer.focus()}}if(this.value==null){if(this._calendar&&this._calendar._getSelectedCell()){this._calendar._getSelectedCell().isSelected=false}}if(this.timePopup){this.timeButtonIcon.addClass(this.toThemeProperty("jqx-icon-time-pressed"));this.timeButton.addClass(this.toThemeProperty("jqx-fill-state-hover"));this.timeButton.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this.timeContainer.addClass(this.toThemeProperty("jqx-fill-state-focus"))}else{this.calendarButtonIcon.addClass(this.toThemeProperty("jqx-icon-calendar-pressed"));this.calendarButton.addClass(this.toThemeProperty("jqx-fill-state-hover"));this.calendarButton.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this.calendarContainer.addClass(this.toThemeProperty("jqx-fill-state-focus"))}this.host.addClass(this.toThemeProperty("jqx-fill-state-focus"));this.calendarContainer.addClass(this.toThemeProperty("jqx-popup-show"));if(this.isMaterialized()){this._calendar.refresh()}},hideCalendar:function(j,o){if(o){this.changeType=o}var h=this.calendarContainer;var b=this.container;var p=this;a.jqx.aria(this,"aria-expanded",false);if(this.showTimeButton){if(this.timeContainer.css("visibility")!="hidden"&&j!="cancel"){if(this.selectionMode!="range"&&this.hourInput){var e=this.getDate();var g=parseInt(this.hourInput.val());var f=parseInt(this.minuteInput.val());var c=parseInt(this.secondInput.val());var q=parseInt(this.mssecondInput.val());var d=this.meridianInput.val();if(isNaN(g)){g=0}if(isNaN(f)){f=0}if(isNaN(c)){c=0}if(isNaN(q)){q=0}if(this.meridianInput.css("display")!="none"){if(d.toLowerCase().indexOf("p")>=0){if(g<12){g+=12}}if(d.toLowerCase().indexOf("a")>=0){if(g>=12){g-=12}}}if(!e){e=new Date()}e.setHours(g,f,c,q);this.setDate(e)}else{if(this.hourInput&&j!="selected"){var i=this.getRange();var g=parseInt(this.hourInput.val());var f=parseInt(this.minuteInput.val());var c=parseInt(this.secondInput.val());var q=parseInt(this.mssecondInput.val());var d=this.meridianInput.val();if(isNaN(g)){g=0}if(isNaN(f)){f=0}if(isNaN(c)){c=0}if(isNaN(q)){q=0}if(this.meridianInput.css("display")!="none"){if(d.toLowerCase().indexOf("p")>=0){if(g<12){g+=12}}if(d.toLowerCase().indexOf("a")>=0){if(g>=12){g-=12}}}var l=i.from;if(!l){l=new Date()}l.setHours(g,f,c,q);var g=parseInt(this.hourInput2.val());var f=parseInt(this.minuteInput2.val());var c=parseInt(this.secondInput2.val());var q=parseInt(this.mssecondInput2.val());var d=this.meridianInput2.val();if(f==""){f=0}if(c==""){c=0}if(q==""){q=0}if(this.meridianInput2.css("display")!="none"){if(d.toLowerCase().indexOf("p")>=0){if(g<12){g+=12}}if(d.toLowerCase().indexOf("a")>=0){if(g>=12){g-=12}}}var k=i.to;if(!k){k=new Date()}k.setHours(g,f,c,q);if(k.valueOf()0){var h=j[0].id.toString();var f=h.toString().substring(13);var i=a(document).find("#"+f);var n=b.data.me.hideCalendar();if(n!==false){a.data(document.body,"openedJQXCalendar"+b.data.me.id,null)}}}},_loadItems:function(){if(this.value!=null){this.items=new Array();var d=this._getFormatValue(this.formatString);this.items=this._parseFormatValue(d);this.editors=new Array();for(var b=0;b=1){f=d.format(d.value,0,d.items.length)}var b=d.dateTimeInput.val();if(b!=f){d._raiseEvent(1,d.value)}}if(d.selectionMode=="range"){var c=d.getRange();var i=d.format(d.value,0,d.items.length);if(c.to){var h=a.jqx._jqxDateTimeInput.getDateTime(c.from);i=d.format(h,0,d.items.length);var g=a.jqx._jqxDateTimeInput.getDateTime(c.to);var e=d.format(g,0,d.items.length);var f=i+" - "+e;if(f==" - "){f=""}}else{f=""}}d.dateTimeInput.val(f)},format:function(h,j,f){var b="";for(var e=j;e2;if(g.type=="FORMAT_AMPM"){d=true;if(this.editors[e].value==0){c=this.editors[e].amString}else{c=this.editors[e].pmString}}if(!d){if(this.yearCutoff!==null&&g.type==="Year"&&g.format==="yy"){c=this.editors[e].value.toString().substring(2)}else{c=g.dateParserInEditMode(new Number(this.editors[e].value),"d"+this.editors[e].maxEditPositions,this);while(c.length0){var d=this._getFormatValueGroupLength(f);var g=null;switch(f.substring(0,1)){case":":case"/":d=1;g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,1),"ReadOnly",this.culture);break;case'"':case"'":var b=f.indexOf(f[0],1);g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(1,1+Math.max(1,b-1)),"ReadOnly",this.culture);d=Math.max(1,b+1);break;case"\\":if(f.length>=2){g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(1,1),"ReadOnly",this.culture);d=2}break;case"d":case"D":if(d>2){g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Day",this.culture)}else{g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Day",this.culture)}break;case"f":case"F":if(d>7){d=7}if(d>3){g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"ReadOnly",this.culture)}else{g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Millisecond",this.culture)}break;case"g":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"ReadOnly",this.culture);break;case"h":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"FORMAT_hh",this.culture);break;case"H":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"FORMAT_HH",this.culture);break;case"m":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Minute",this.culture);break;case"M":if(d>4){d=4}g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Month",this.culture);break;case"s":case"S":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Second",this.culture);break;case"t":case"T":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"FORMAT_AMPM",this.culture);break;case"y":case"Y":if(d>1){g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Year",this.culture)}else{d=1;g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,1),null,"ReadOnly",this.culture)}break;case"z":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"ReadOnly",this.culture);break;default:d=1;g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,1),"ReadOnly",this.culture);break}c[e]=a.extend(true,{},g);f=f.substring(d);e++}return c},_getFormatValue:function(b){if(b==null||b.length==0){b="d"}if(b.length==1){switch(b.substring(0,1)){case"d":return this.localization.calendar.patterns.d;case"D":return this.localization.calendar.patterns.D;case"t":return this.localization.calendar.patterns.t;case"T":return this.localization.calendar.patterns.T;case"f":return this.localization.calendar.patterns.f;case"F":return this.localization.calendar.patterns.F;case"M":return this.localization.calendar.patterns.M;case"Y":return this.localization.calendar.patterns.Y;case"S":return this.localization.calendar.patterns.S}}if(b.length==2&&b.substring(0,1)=="%"){b=b.substring(1)}return b},_updateEditorsValue:function(){var j=this.value;if(j==null){return}var g=j.year;var h=j.day;var d=j.hour;var l=j.millisecond;var b=j.second;var c=j.minute;var f=j.month;if(this.items==null){return}for(var e=0;e=0&&d<12){this.editors[e].value=0}else{this.editors[e].value=1}break;case"Day":this.editors[e].value=h;break;case"FORMAT_hh":var k=d%12;if(k==0){k=12}this.editors[e].value=k;break;case"FORMAT_HH":this.editors[e].value=d;break;case"Millisecond":this.editors[e].value=l;break;case"Minute":this.editors[e].value=c;break;case"Month":this.editors[e].value=f;break;case"Second":this.editors[e].value=b;break;case"Year":this.editors[e].value=g;break}}},updateValue:function(z){if(this.isEditing){return}if(this.items&&this.items.length==0){return}var o=0;var s=1;var C=1;var l=0;var d=0;var J=0;var u=0;var I=1;var h=0;var m=false;var r=false;var D=false;var c=false;var b=false;var q=false;var x=false;var t=new Array();var e=null;var y=0;for(var B=0;B0&&I>0&&C>0&&u>=0&&l>=0&&J>=0&&d>=0){var K=this.value;if(K!=null){if(!m){s=K.year}if(!r){I=K.month}if(!D){C=K.day}}try{if(I>12){I=12}if(I<1){I=1}if(z&&K._daysInMonth(s,I)<=C){C=K._daysInMonth(s,I);if(t!=null&&t.length>0){for(B=0;B=12){l-=12}}else{if(l+12<24){l+=12}}}var g=this.value.dateTime.getDate();this.value._setYear(parseInt(s));this.value._setDay(C);this.value._setMonth(I);if(c){this.value._setHours(l)}if(b){this.value._setMinutes(u)}if(q){this.value._setSeconds(J)}if(x){this.value._setMilliseconds(d)}this._validateTimeRange()}catch(j){this.value=K}if(G!=null){var A=this.value.dateTime.getFullYear()==G.getFullYear()&&this.value.dateTime.getDate()==G.getDate()&&this.value.dateTime.getMonth()==G.getMonth()&&this.value.dateTime.getHours()==G.getHours()&&this.value.dateTime.getMinutes()==G.getMinutes()&&this.value.dateTime.getSeconds()==G.getSeconds();if(!A){if(this.changing){var n=this.changing(G,this.value.dateTime);if(n){this.value=a.jqx._jqxDateTimeInput.getDateTime(n)}}this._raiseEvent("0",this.value.dateTime);if(this.cookies){if(this.value!=null){a.jqx.cookie.cookie("jqxDateTimeInput"+this.element.id,this.value.dateTime.toString(),this.cookieoptions)}}if(this.change){this.change(this.value.dateTime)}}}}var f=this.editors.indexOf(this.activeEditor);var p=this.items[f];if(this.value){if(this.calendarContainer.jqxCalendar("_isDisabled",this.value.dateTime)){this.dateTimeInput.addClass(this.toThemeProperty("jqx-input-invalid"))}else{this.dateTimeInput.removeClass(this.toThemeProperty("jqx-input-invalid"))}}},_internalSetValue:function(b){this.value._setYear(parseInt(b.year));this.value._setDay(b.day);this.value._setMonth(b.month);this.value._setHours(b.hour);this.value._setMinutes(b.minute);this.value._setSeconds(b.second);this.value._setMilliseconds(b.milisecond)},_raiseEvent:function(c,n,f){var m=this.events[c];var g={};g.owner=this;if(n==null){n={}}if(f==null){f=n}var l=n.charCode?n.charCode:n.keyCode?n.keyCode:0;var o=true;var k=this.readonly;var b=new a.Event(m);b.owner=this;b.args=g;b.args.date=this.getDate();if(c==9){b.args.type=this.changeType;this.changeType=null}this.element.value=this.dateTimeInput.val();if(c==9&&this.selectionMode!="range"){var d=b.args.date;if(this._oldDT){if(d!=null){if(!(d.getFullYear()!=this._oldDT.getFullYear()||d.getMonth()!=this._oldDT.getMonth()||d.getDate()!=this._oldDT.getDate()||d.getHours()!=this._oldDT.getHours()||d.getMinutes()!=this._oldDT.getMinutes()||d.getSeconds()!=this._oldDT.getSeconds())){return true}}a.jqx.aria(this,"aria-valuenow",this.getDate());a.jqx.aria(this,"aria-valuetext",this.getText());if(this.getDate()!=null){a.jqx.aria(this,"aria-label","Current focused date is "+this.getDate().toLocaleString())}else{a.jqx.aria(this,"aria-label","Current focused date is Null")}}b.args.oldValue=f;b.args.newValue=b.args.date;if(this._oldDT){b.args.oldValue=this._oldDT}}if(this.selectionMode=="range"){b.args.date=this.getRange();if(this._oldDT){var d=b.args.date.from;if(c==9){var j=false;var i=false;var e=this._oldDT.from;if(d!=null&&e){if(!(d.getFullYear()!=e.getFullYear()||d.getMonth()!=e.getMonth()||d.getDate()!=e.getDate()||d.getHours()!=e.getHours()||d.getMinutes()!=e.getMinutes()||d.getSeconds()!=e.getSeconds())){j=true}}var d=b.args.date.to;if(d!=null){e=this._oldDT.to;if(e){if(!(d.getFullYear()!=e.getFullYear()||d.getMonth()!=e.getMonth()||d.getDate()!=e.getDate()||d.getHours()!=e.getHours()||d.getMinutes()!=e.getMinutes()||d.getSeconds()!=e.getSeconds())){i=true}}}if(j&&i){return true}var j=b.args.date.from;if(j==null){j=""}else{j=j.toString()}var i=b.args.date.to;if(i==null){i=""}else{i=i.toString()}a.jqx.aria(this,"aria-valuenow",j+"-"+i);a.jqx.aria(this,"aria-valuetext",this.getText());if(j&&i){a.jqx.aria(this,"aria-label","Current focused range is "+j.toLocaleString()+"-"+i.toLocaleString())}}}b.args.oldValue=f;b.args.newValue=b.args.date;if(this._oldDT){b.args.oldValue=this._oldDT}}if(this.host.css("display")=="none"){return true}if(c!=2&&c!=3&&c!=4&&c!=5&&c!=6){o=this.host.trigger(b);if(b.stopPropagation){b.stopPropagation()}}var h=this;if(!k){if(c==2&&!this.disabled){setTimeout(function(){h.isEditing=true;if(this.selectionMode=="range"){h._selectGroup(-1)}else{h._selectGroup(-1)}},25)}}if(c==4){if(k||this.disabled){if(l==8||l==46){this.isEditing=false;if(this.allowKeyboardDelete){if(this.allowNullDate){this.setDate(null)}else{if(this.selectionMode!="range"){this.setDate(this.getMinDate())}else{this.setRange(this.getMinDate(),this.getMinDate())}}}}if(l==9){return true}if(!n.altKey){return false}}o=this._handleKeyDown(n,l)}else{if(c==5){if(l==9){return true}if(k||this.disabled){return false}}else{if(c==6){if(l==9){return true}if(k||this.disabled){return false}o=this._handleKeyPress(n,l)}}}return o},_doLeftKey:function(){if(this.activeEditor!=null){if(!this.isEditing){this.isEditing=true}var b=this.activeEditor;var d=false;var e=this.editors.indexOf(this.activeEditor);var c=e;if(this.enableAbsoluteSelection){if(e>=0&&this.activeEditor.positions>0){this.activeEditor.positions--;this._selectGroup(e);return}}while(e>0){this.activeEditor=this.editors[--e];this._selectGroup(e);if(this.items[e].type!="ReadOnly"){d=true;break}}if(!d){if(c>=0){this.activeEditor=this.editors[c]}}if(this.activeEditor!=null&&b!=this.activeEditor){if(this.items[e].type!="ReadOnly"){if(this.enableAbsoluteSelection){this.activeEditor.positions=this.activeEditor.maxEditPositions-1}else{this.activeEditor.positions=0}}}if(this.activeEditor!=b){this._validateValue();this._updateText();this._selectGroup(this.editors.indexOf(this.activeEditor));return true}else{return false}}},_doRightKey:function(){if(this.activeEditor!=null){if(!this.isEditing){this.isEditing=true}var b=this.activeEditor;var d=false;var e=this.editors.indexOf(this.activeEditor);var c=e;if(this.enableAbsoluteSelection){if(e>=0&&this.activeEditor.positions2){break}d=true;break}}if(!d){if(c>=0){this.activeEditor=this.editors[c]}}if(this.activeEditor!=null&&this.activeEditor!=b){if(this.items[e].type!="ReadOnly"){this.activeEditor.positions=0}}if(this.activeEditor!=b){this._validateValue();this._updateText();this._selectGroup(this.editors.indexOf(this.activeEditor));return true}else{return false}}},_saveSelectedText:function(){var c=this._selection();var e="";var d=this.dateTimeInput.val();if(c.start>0||c.length>0){for(var b=c.start;b1){c=1}}break;case"Character":break;case"Day":if(c<1){c=1}else{if(c>31){c=31}}break;case"FORMAT_hh":if(c<1){c=1}else{if(c>12){c=12}}break;case"FORMAT_HH":if(c<0){c=0}else{if(c>23){c=23}}break;case"Millisecond":if(c<0){c=0}else{if(c>99){c=99}}break;case"Minute":if(c<0){c=0}else{if(c>59){c=59}}break;case"Month":if(c<1){c=1}else{if(c>12){c=12}}break;case"ReadOnly":break;case"Second":if(c<0){c=0}else{if(c>59){c=59}}break;case"Year":if(cthis.maxDate.year){c=this.maxDate.year}}break}if(d.value!=c){b=true}if(!b){this.isEditing=false;this._validateValue();this._updateText();this.isEditing=true;this._doRightKey();return true}return false}}},_handleKeyPress:function(j,n){if(this._fullEditInProgress){this._enteredValue=true;return}var m=this._selection();var b=this;var d=j.ctrlKey||j.metaKey;if((d&&n==97)||(d&&n==65)){return true}if(n==8){if(m.start>0){b._setSelectionStart(m.start)}return false}if(n==46){if(m.start=0){this.changeType="keyboard";var f=String.fromCharCode(n);var k=parseInt(f);if(f=="p"||f=="a"||f=="A"||f=="P"){if(this.activeEditor&&this.activeEditor.item.type=="FORMAT_AMPM"){if(this.activeEditor.value==0&&(f=="p"||f=="P")){this.spinUp()}else{if(this.activeEditor.value==1&&(f=="a"||f=="A")){this.spinDown()}}}}if(!isNaN(k)){if(this.container.css("display")=="block"){this.hideCalendar()}this.updateValue();this._updateText();var h=false;var i=this.editors.indexOf(this.activeEditor);var c=null;this.isEditing=true;if(i.type!="ReadOnly"){c=this.activeEditor}if(c!=null&&c.positions==0){this.editorText=""}if(this.activeEditor==null){this.activeEditor=this.editors[0]}if(this.activeEditor==null){return false}this.activeEditor.insert(f);if(c!=null&&this.editorText.length>=c.maxEditPositions){this.editorText=""}this.editorText+=f;var o=this._selectWithAdvancePattern();if(this.activeEditor.positions==this.activeEditor.maxEditPositions){var g=this._getLastEditableEditorIndex();if(this.editors.indexOf(this.activeEditor)==g&&o&&this.enableAbsoluteSelection){this.activeEditor.positions=this.activeEditor.maxEditPositions-1}else{this.activeEditor.positions=0}}h=true;this.updateValue();this._updateText();this._selectGroup(this.editors.indexOf(this.activeEditor));return false}}var l=this._isSpecialKey(n);return l},_getLastEditableEditorIndex:function(){var b=0;var d=this;for(var c=this.items.length-1;c>=0;c--){if(this.items[c].type!="ReadOnly"){return c}}return -1},_handleKeyDown:function(l,r){var k=this;this.timePopup=false;if(r==84){this.timePopup=true}if(l.keyCode==115){if(k.isOpened()){k.hideCalendar("keyboard","keyboard");return false}else{if(!k.isOpened()){k.showCalendar("keyboard","keyboard");return false}}}if(l.altKey){if(l.keyCode==38){if(k.isOpened()){if(k.showTimeButton&&!k.showCalendarButton){k.timePopup=true}k.hideCalendar("keyboard","keyboard");return false}}else{if(l.keyCode==40){if(!k.isOpened()){if(k.showTimeButton&&!k.showCalendarButton){k.timePopup=true}k.showCalendar("keyboard","keyboard");return false}}}}else{if(l.ctrlKey){this.timePopup=true;if(l.keyCode==38){if(k.isOpened()){k.hideCalendar("keyboard","keyboard");return false}}else{if(l.keyCode==40){if(!k.isOpened()){k.showCalendar("keyboard","keyboard");return false}}}}}if(k.isOpened()){if(l.keyCode==9){k.hideCalendar("selected","keyboard");return true}return}var p=k._selection();var b=l.ctrlKey||l.metaKey;if((b&&r==99)||(b&&r==67)){k._saveSelectedText(l);return true}if((b&&r==122)||(b&&r==90)){return false}if((b&&r==118)||(b&&r==86)||(l.shiftKey&&r==45)){var o=k.val();var m=this;var c=a('