diff -r 033898178630 -r 37f1a08315f3 www/jqwidgets/jqxgrid.storage.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/jqwidgets/jqxgrid.storage.js Sun Aug 05 11:32:13 2018 +0200 @@ -0,0 +1,9 @@ +/* +jQWidgets v6.0.5 (2018-July) +Copyright (c) 2011-2018 jQWidgets. +License: https://jqwidgets.com/license/ +*/ +/* eslint-disable */ + +(function(a){a.extend(a.jqx._jqxGrid.prototype,{savestate:function(b){var c=this.getstate();if(b!==undefined&&!a.isEmptyObject(b)){if(b.indexOf("sort")==-1){delete c.sortcolumn;delete c.sortdirection}if(b.indexOf("pager")==-1){delete c.pagenum;delete c.pagesizeoptions;delete c.pagesize}if(b.indexOf("selection")==-1){delete c.selectedcells;delete c.selectedrowindexes;delete c.selectedrowindex}if(b.indexOf("grouping")==-1){delete c.groups}if(b.indexOf("filter")==-1){delete c.filters}a.each(this.columns.records,function(e){var d=c.columns[this.datafield];if(b.indexOf("hidden_columns")==-1){delete d.hidden}if(b.indexOf("reorder")==-1){delete d.index}if(b.indexOf("columns_width")==-1){delete d.width}if(b.indexOf("columns_text")==-1){delete d.text}if(b.indexOf("alignment")==-1){delete d.align;delete d.cellsalign}})}if(window.localStorage){window.localStorage["jqxGrid"+this.element.id]=this._stringify(c)}this._savedstate=c;return c},loadstate:function(d,j){var g="";if(d!=undefined&&d.width!=undefined){g=d}else{if(window.localStorage){var c=window.localStorage["jqxGrid"+this.element.id];if(c){var g=a.parseJSON(window.localStorage["jqxGrid"+this.element.id])}}else{if(this._savedstate){var g=this._savedstate}}}if(g!=null&&g!==""){if(this.virtualmode||(this.source._source.url&&this.source._source.url!="")){this.source.beginUpdate()}var f=g;if(f.width!==undefined){this.width=f.width}if(f.height!==undefined){this.height=f.height}if(this.pageable){if(f.pagesize!=undefined){this.pagesize=f.pagesize;this.dataview.pagesize=f.pagesize}if(f.pagenum!=undefined){this.dataview.pagenum=f.pagenum}if(f.pagesizeoptions!=undefined){this.pagesizeoptions=f.pagesizeoptions}if(this.pagesizeoptions){var e=0;for(var b=0;b=this.pagesizeoptions[b]){e=b}}if(this.pagershowrowscombo){this.pagershowrowscombo.jqxDropDownList({selectedIndex:e})}}}if(this.sortable){if(this._loading){this._loading=false}if(f.sortdirection){if(f.sortdirection.ascending||f.sortdirection.descending){this.dataview.sortfield=f.sortcolumn;var h=f.sortdirection.ascending?"asc":"desc";this.dataview.sortfielddirection=h;this.source.sortcolumn=f.sortcolumn;this.source.sortdirection=h;this.sortby(f.sortcolumn,h)}}else{if(this.dataview.sortfield!=null&&(this.dataview.sortfielddirection=="asc"||this.dataview.sortfielddirection=="desc")){this.sortby(this.dataview.sortfield,null)}}}if(this.groupable&&f.groups){this.dataview.groups=f.groups;this.groups=f.groups}this.loadingstate=true;if(this.virtualsizeinfo){this._loadselectionandcolumnwidths(f)}this.loadingstate=false;if(this.virtualmode||(this.source._source.url&&this.source._source.url!="")){if(j==true){this.source.endUpdate(false)}else{this.source.endUpdate(false);if(this.virtualmode||this.source._source.filter||this.source._source.sort){this.updatebounddata("state")}}}}},_loadselectionandcolumnwidths:function(j){this.loadingstate=true;var m="";if(j!=undefined&&j.width!=undefined){m=j}else{if(window.localStorage){if(window.localStorage["jqxGrid"+this.element.id]){var m=a.parseJSON(window.localStorage["jqxGrid"+this.element.id])}}else{if(this._savedstate){var m=this._savedstate}}}if(m!=null&&m!=""){var E=this._loading;this._loading=false;var G=m;var F=this;var g=false;var d=[];d.length=0;var D=[];a.each(this.columns.records,function(I){var i=G.columns[this.datafield];if(i!=undefined){if(this.text!=i.text){g=true}if(this.hidden!=i.hidden){g=true}if(i.width!==undefined){this.width=i.width;if(this._width){this._width=null}if(this._percentagewidth){this._percentagewidth=null}}if(i.hidden!==undefined){this.hidden=i.hidden}if(i.pinned!==undefined){this.pinned=i.pinned}if(i.groupable!==undefined){this.groupable=i.groupable}if(i.resizable!==undefined){this.resizable=i.resizable}this.draggable=i.draggable;if(i.text!==undefined){this.text=i.text}if(i.align!==undefined){this.align=i.align}if(i.cellsalign!==undefined){this.cellsalign=i.cellsalign}if(F._columns){for(var H=0;H0){if(this.setcolumnindex){var x=this.rowdetails?1:0;x+=this.groupable?this.groups.length:0;var v=new Array();for(var C=0;Ci.key){return 1}return 0});f.reverse();a.each(f,function(i,I){var H=this.key;F.setcolumnindex(this.column.datafield,H,false)})}this.prerenderrequired=true;if(this.groupable){this._refreshdataview()}this.rendergridcontent(true);if(this._updatefilterrowui&&this.filterable&&this.showfilterrow){this._updatefilterrowui()}this._renderrows(this.virtualsizeinfo)}if(this.filterable&&G.filters!==undefined){if(this.clearfilters){this._loading=false;this.clearfilters(false)}var c="";var p=new a.jqx.filter();for(var C=0;C0){this.applyfilters();if(this.showfilterrow){a.each(this.columns.records,function(){if(this.filtertype=="checkedlist"&&this.filterable){if(F.host.jqxDropDownList){var L=this;var J=L._filterwidget;var O=J.jqxDropDownList("getItems");var H=J.jqxDropDownList("listBox");H.checkAll(false);if(L.filter){H.uncheckAll(false);var N=L.filter.getfilters();for(var K=0;K0){H.host.jqxListBox("indeterminateIndex",0,true,false)}}}}})}}if(this.pageable&&G.pagenum!==undefined){if(this.gotopage&&!this.virtualmode){this.dataview.pagenum=-1;this.gotopage(G.pagenum)}else{if(this.gotopage&&this.virtualmode){this.gotopage(G.pagenum)}}}}if(G.selectedrowindexes&&G.selectedrowindexes&&G.selectedrowindexes.length>0){this.selectedrowindexes=G.selectedrowindexes;this.selectedrowindex=G.selectedrowindex;if(this.selectionmode==="checkbox"){this._updatecheckboxselection()}}if(G.selectedcells){if(this._applycellselection){a.each(G.selectedcells,function(){F._applycellselection(this.rowindex,this.datafield,true,false)})}}if(this.groupable&&G.groups!==undefined){this._refreshdataview();this.render();this._loading=E;this.loadingstate=false;return}if(g){this.prerenderrequired=true;this.rendergridcontent(true);this._loading=E;this.loadingstate=false;if(this.updating()){return false}}else{this._loading=E;this._updatecolumnwidths();this._updatecellwidths();this.loadingstate=false}this.loadingstate=false;this._loading=E;this._renderrows(this.virtualsizeinfo)}this.loadingstate=false},getstate:function(){var p=this.getdatainformation();var h={};h.width=this.width;h.height=this.height;h.pagenum=p.paginginformation.pagenum;h.pagesize=p.paginginformation.pagesize;h.pagesizeoptions=this.pagesizeoptions;h.sortcolumn=p.sortinformation.sortcolumn;h.sortdirection=p.sortinformation.sortdirection;if(this.selectionmode!=null){if(this.getselectedcells){if(this.selectionmode.toString().indexOf("cell")!=-1){var o=this.getselectedcells();var q=new Array();a.each(o,function(){q.push({datafield:this.datafield,rowindex:this.rowindex})});h.selectedcells=q}else{var n=this.getselectedrowindexes();h.selectedrowindexes=n;h.selectedrowindex=this.selectedrowindex}}}var i={};var d=0;if(this.dataview.filters){for(var j=0;j