mambax7/alumni-26x

View on GitHub
media/jquery/tablesorter-master/dist/js/widgets/widget-currentSort.min.js

Summary

Maintainability
A
0 mins
Test Coverage
/*! 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);