diff -r 2da3d3340403 -r 2d1d43c3a2c2 www-thermferm/jqwidgets/jqxgrid.sort.js --- a/www-thermferm/jqwidgets/jqxgrid.sort.js Fri May 19 16:34:21 2017 +0200 +++ b/www-thermferm/jqwidgets/jqxgrid.sort.js Sun May 28 14:19:57 2017 +0200 @@ -1,7 +1,7 @@ /* -jQWidgets v3.8.0 (2015-Apr) -Copyright (c) 2011-2015 jQWidgets. +jQWidgets v4.5.2 (2017-May) +Copyright (c) 2011-2017 jQWidgets. License: http://jqwidgets.com/license/ -*/ - -(function(a){a.jqx.dataview.sort=function(){this.sortby=function(d,f,p){var m=Object.prototype.toString;if(f==null){this.sortdata=null;this.refresh();return}if(f==undefined){f=true}if(f=="a"||f=="asc"||f=="ascending"||f==true){f=true}else{f=false}var g=d;this.sortfield=d;this.sortfielddirection=f?"asc":"desc";if(this.sortcache==undefined){this.sortcache={}}this.sortdata=[];var b=[];var c=false;if(g=="constructor"){g=""}if(!this.virtualmode&&this.sortcache[g]!=null){var o=this.sortcache[g];b=o._sortdata;if(o.direction==f){b.reverse()}else{if(!o.direction&&f){b.reverse()}c=true}if(b.lengthb){return 1}return 0;case"date":case"time":if(cb){return 1}return 0;case"string":case"text":c=String(c).toLowerCase();b=String(b).toLowerCase();break}}else{if(a.jqx.dataFormat.isNumber(c)&&a.jqx.dataFormat.isNumber(b)){if(cb){return 1}return 0}else{if(a.jqx.dataFormat.isDate(c)&&a.jqx.dataFormat.isDate(b)){if(cb){return 1}return 0}else{if(!a.jqx.dataFormat.isNumber(c)&&!a.jqx.dataFormat.isNumber(b)){c=String(c).toLowerCase();b=String(b).toLowerCase()}}}}}try{if(cb){return 1}}catch(d){var f=d}return 0};this._equals=function(c,b){return(this._compare(c,b)===0)}};a.extend(a.jqx._jqxGrid.prototype,{_rendersortcolumn:function(){var b=this.that;var d=this.getsortcolumn();if(this.sortdirection){var c=function(f,g){var e=b.getcolumn(f);if(e){if(g.ascending){a.jqx.aria(e.element,"aria-sort","ascending")}else{if(g.descending){a.jqx.aria(e.element,"aria-sort","descending")}else{a.jqx.aria(e.element,"aria-sort","none")}}}};if(this._oldsortinfo){if(this._oldsortinfo.column){c(this._oldsortinfo.column,{ascending:false,descending:false})}}c(d,this.sortdirection)}this._oldsortinfo={column:d,direction:this.sortdirection};if(this.sortdirection){a.each(this.columns.records,function(f,g){var e=a.data(document.body,"groupsortelements"+this.displayfield);if(d==null||this.displayfield!=d){a(this.sortasc).hide();a(this.sortdesc).hide();if(e!=null){e.sortasc.hide();e.sortdesc.hide()}}else{if(b.sortdirection.ascending){a(this.sortasc).show();a(this.sortdesc).hide();if(e!=null){e.sortasc.show();e.sortdesc.hide()}}else{a(this.sortasc).hide();a(this.sortdesc).show();if(e!=null){e.sortasc.hide();e.sortdesc.show()}}}})}},getsortcolumn:function(){if(this.sortcolumn!=undefined){return this.sortcolumn}return null},removesort:function(){this.sortby(null)},sortby:function(d,g,f,e,b){if(this._loading&&b!==false){throw new Error("jqxGrid: "+this.loadingerrormessage);return false}if(d==null){g=null;d=this.sortcolumn}if(d!=undefined){var c=this.that;if(f==undefined&&c.source.sortcomparer!=null){f=c.source.sortcomparer}if(g=="a"||g=="asc"||g=="ascending"||g==true){ascending=true}else{ascending=false}if(g!=null){c.sortdirection={ascending:ascending,descending:!ascending}}else{c.sortdirection={ascending:false,descending:false}}if(g!=null){c.sortcolumn=d}else{c.sortcolumn=null}if(c.source.sort||c.virtualmode){c.dataview.sortfield=d;if(g==null){c.dataview.sortfielddirection=""}else{c.dataview.sortfielddirection=ascending?"asc":"desc"}if(c.source.sort&&!this._loading){c.source.sort(d,g);c._raiseEvent(6,{sortinformation:c.getsortinformation()});return}}else{c.dataview.sortby(d,g,f)}if(e===false){return}if(c.groupable&&c.groups.length>0){c._render(true,false,false);if(c._updategroupheadersbounds&&c.showgroupsheader){c._updategroupheadersbounds()}}else{if(c.pageable){c.dataview.updateview()}c._updaterowsproperties();c.rendergridcontent(true)}c._raiseEvent(6,{sortinformation:c.getsortinformation()})}},_togglesort:function(d){var b=this.that;if(this.disabled){return}if(d.sortable&&b.sortable){var c=b.getsortinformation();var e=null;if(c.sortcolumn!=null&&c.sortcolumn==d.displayfield){e=c.sortdirection.ascending;if(b.sorttogglestates>1){if(e==true){e=false}else{e=null}}else{e=!e}}else{e=true}b.sortby(d.displayfield,e,null)}}})})(jqxBaseFramework); \ No newline at end of file +*/ +!function(a){a.jqx.dataview.sort=function(){this.sortby=function(b,c,d){var e=Object.prototype.toString;if(null==c)return this.sortdata=null,this.sortcache={},this.grid._pagescache=new Array,this.grid._cellscache=new Array,void this.refresh();void 0==c&&(c=!0),c="a"==c||"asc"==c||"ascending"==c||1==c;var f=b;this.sortfield=b,this.sortfielddirection=c?"asc":"desc",void 0==this.sortcache&&(this.sortcache={}),this.sortdata=[];var g=[],h=!1;if("constructor"==f&&(f=""),!this.virtualmode&&null!=this.sortcache[f]){var i=this.sortcache[f];g=i._sortdata,i.direction==c?g.reverse():(!i.direction&&c&&g.reverse(),h=!0),g.lengthc?1:0;case"date":case"time":return bc?1:0;case"string":case"text":b=String(b).toLowerCase(),c=String(c).toLowerCase()}else{if(a.jqx.dataFormat.isNumber(b)&&a.jqx.dataFormat.isNumber(c))return bc?1:0;if(a.jqx.dataFormat.isDate(b)&&a.jqx.dataFormat.isDate(c))return bc?1:0;a.jqx.dataFormat.isNumber(b)||a.jqx.dataFormat.isNumber(c)||(b=String(b).toLowerCase(),c=String(c).toLowerCase())}try{if(bc)return 1}catch(a){}return 0},this._equals=function(a,b){return 0===this._compare(a,b)}},a.extend(a.jqx._jqxGrid.prototype,{_rendersortcolumn:function(){var b=this.that,c=this.getsortcolumn();if(this.sortdirection){var d=function(c,d){var e=b.getcolumn(c);e&&(d.ascending?a.jqx.aria(e.element,"aria-sort","ascending"):d.descending?a.jqx.aria(e.element,"aria-sort","descending"):a.jqx.aria(e.element,"aria-sort","none"))};this._oldsortinfo&&this._oldsortinfo.column&&d(this._oldsortinfo.column,{ascending:!1,descending:!1}),d(c,this.sortdirection)}this._oldsortinfo={column:c,direction:this.sortdirection},this.sortdirection&&a.each(this.columns.records,function(d,e){var f=a.data(document.body,"groupsortelements"+this.displayfield);null==c||this.displayfield!=c?(a(this.sortasc).hide(),a(this.sortdesc).hide(),null!=f&&(f.sortasc.hide(),f.sortdesc.hide())):b.sortdirection.ascending?(a(this.sortasc).show(),a(this.sortdesc).hide(),null!=f&&(f.sortasc.show(),f.sortdesc.hide())):(a(this.sortasc).hide(),a(this.sortdesc).show(),null!=f&&(f.sortasc.hide(),f.sortdesc.show()))})},getsortcolumn:function(){return void 0!=this.sortcolumn?this.sortcolumn:null},removesort:function(){this.sortby(null)},sortby:function(a,b,c,d,e){if(this._loading&&e!==!1)throw new Error("jqxGrid: "+this.loadingerrormessage);if(null==a&&(b=null,a=this.sortcolumn),void 0!=a){var f=this.that;if(void 0==c&&null!=f.source.sortcomparer&&(c=f.source.sortcomparer),"a"==b||"asc"==b||"ascending"==b||1==b?ascending=!0:ascending=!1,null!=b?f.sortdirection={ascending:ascending,descending:!ascending}:f.sortdirection={ascending:!1,descending:!1},null!=b?f.sortcolumn=a:f.sortcolumn=null,f.source.sort||f.virtualmode){if(f.dataview.sortfield=a,null==b?f.dataview.sortfielddirection="":f.dataview.sortfielddirection=ascending?"asc":"desc",f.source.sort&&!this._loading)return f.source.sort(a,b),void f._raiseEvent(6,{sortinformation:f.getsortinformation()})}else f.dataview.sortby(a,b,c);if(d===!1)return;f.groupable&&f.groups.length>0?(f._render(!0,!1,!1),f._updategroupheadersbounds&&f.showgroupsheader&&f._updategroupheadersbounds(),f._postrender("sort")):(f.pageable&&f.dataview.updateview(),f._updaterowsproperties(),f.rendergridcontent(!0),f._postrender("sort")),f._raiseEvent(6,{sortinformation:f.getsortinformation()})}},_togglesort:function(a){var b=this.that;if(!this.disabled&&a.sortable&&b.sortable){var c=b.getsortinformation(),d=null;null!=c.sortcolumn&&c.sortcolumn==a.displayfield?(d=c.sortdirection.ascending,d=b.sorttogglestates>1?1!=d&&null:!d):d=!0,b.sortby(a.displayfield,d,null)}}})}(jqxBaseFramework); +