tablesorter/dist/js/widgets/widget-currentSort.min.js
Rob Garrison 7f082fa019 v2.28.10
2017-05-16 15:33:15 -05:00

2 lines
751 B
JavaScript

/*! Widget: currentSort - 7/31/2016 (v2.27.0) */
!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);