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);
|