tablesorter/dist/js/widgets/widget-currentSort.min.js

2 lines
751 B
JavaScript
Raw Normal View History

2016-08-01 01:48:27 +00:00
/*! Widget: currentSort - 7/31/2016 (v2.27.0) */
2017-05-16 20:33:15 +00:00
!function(t){"use strict";var r=t.tablesorter;r.currentSortLanguage={0:"asc",1:"desc",2:"unsorted"},r.currentSort={init:function(t){t.$table.on("sortEnd.tscurrentSort",function(){r.currentSort.update(this.config)})},update:function(t){if(t){var n,o=t.widgetOptions,e=r.currentSortLanguage,c=e[2],u=Array.apply(null,Array(t.columns)).map(String.prototype.valueOf,c),a=t.sortList,i=a.length;for(n=0;n<i;n++)u[a[n][0]]=e[a[n][1]];t.currentSort=u,"function"==typeof o.currentSort_callback&&o.currentSort_callback(t,u)}}},r.addWidget({id:"currentSort",options:{currentSort_callback:null},init:function(t,n,o,e){r.currentSort.init(o,e)},remove:function(t,r){r.$table.off("sortEnd.tscurrentSort")}})}(jQuery);