mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-04 18:33:38 +00:00
18 lines
32 KiB
JavaScript
18 lines
32 KiB
JavaScript
|
/*! tableSorter 2.16+ widgets - updated 8/9/2014 (v2.17.7) */
|
||
|
;(function(k){
|
||
|
var c=k.tablesorter=k.tablesorter||{};
|
||
|
c.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",footerRow:"",footerCells:"",icons:"",sortNone:"bootstrap-icon-unsorted",sortAsc:"icon-chevron-up glyphicon glyphicon-chevron-up",sortDesc:"icon-chevron-down glyphicon glyphicon-chevron-down",active:"",hover:"",filterRow:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",caption:"ui-widget-content ui-corner-all",header:"ui-widget-header ui-corner-all ui-state-default", footerRow:"",footerCells:"",icons:"ui-icon",sortNone:"ui-icon-carat-2-n-s",sortAsc:"ui-icon-carat-1-n",sortDesc:"ui-icon-carat-1-s",active:"ui-state-active",hover:"ui-state-hover",filterRow:"",even:"ui-widget-content",odd:"ui-state-default"}};k.extend(c.css,{filterRow:"tablesorter-filter-row",filter:"tablesorter-filter",wrapper:"tablesorter-wrapper",resizer:"tablesorter-resizer",sticky:"tablesorter-stickyHeader",stickyVis:"tablesorter-sticky-visible"});
|
||
|
c.storage=function(b,a,d,c){b=k(b)[0];var g, f,e=!1;g={};f=b.config;var l=k(b);b=c&&c.id||l.attr(c&&c.group||"data-table-group")||b.id||k(".tablesorter").index(l);c=c&&c.url||l.attr(c&&c.page||"data-table-page")||f&&f.fixedUrl||window.location.pathname;if("localStorage"in window)try{window.localStorage.setItem("_tmptest","temp"),e=!0,window.localStorage.removeItem("_tmptest")}catch(m){}k.parseJSON&&(e?g=k.parseJSON(localStorage[a]||"{}"):(f=document.cookie.split(/[;\s|=]/),g=k.inArray(a,f)+1,g=0!==g?k.parseJSON(f[g]||"{}"):{}));if((d||""=== d)&&window.JSON&&JSON.hasOwnProperty("stringify"))g[c]||(g[c]={}),g[c][b]=d,e?localStorage[a]=JSON.stringify(g):(d=new Date,d.setTime(d.getTime()+31536E6),document.cookie=a+"="+JSON.stringify(g).replace(/\"/g,'"')+"; expires="+d.toGMTString()+"; path=/");else return g&&g[c]?g[c][b]:""};
|
||
|
c.addHeaderResizeEvent=function(b,a,d){b=k(b)[0];var c;d=k.extend({},{timer:250},d);var g=b.config,f=g.widgetOptions,e=function(a){f.resize_flag=!0;c=[];g.$headers.each(function(){var a=k(this),b=a.data("savedSizes")|| [0,0],d=this.offsetWidth,e=this.offsetHeight;if(d!==b[0]||e!==b[1])a.data("savedSizes",[d,e]),c.push(this)});c.length&&!1!==a&&g.$table.trigger("resize",[c]);f.resize_flag=!1};e(!1);clearInterval(f.resize_timer);if(a)return f.resize_flag=!1;f.resize_timer=setInterval(function(){f.resize_flag||e()},d.timer)};
|
||
|
c.addWidget({id:"uitheme",priority:10,format:function(b,a,d){var h,g,f,e=c.themes;h=a.$table;f=a.$headers;var l=a.theme||"jui",m=e[l]||e.jui,e=m.sortNone+" "+m.sortDesc+" "+m.sortAsc;a.debug&& (g=new Date);h.hasClass("tablesorter-"+l)&&a.theme!==l&&b.hasInitialized||(""!==m.even&&(d.zebra[0]+=" "+m.even),""!==m.odd&&(d.zebra[1]+=" "+m.odd),h.find("caption").addClass(m.caption),b=h.removeClass(""===a.theme?"":"tablesorter-"+a.theme).addClass("tablesorter-"+l+" "+m.table).find("tfoot"),b.length&&b.find("tr").addClass(m.footerRow).children("th, td").addClass(m.footerCells),f.addClass(m.header).not(".sorter-false").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(a){k(this)["mouseenter"=== a.type?"addClass":"removeClass"](m.hover)}),f.find("."+c.css.wrapper).length||f.wrapInner('<div class="'+c.css.wrapper+'" style="position:relative;height:100%;width:100%"></div>'),a.cssIcon&&f.find("."+c.css.icon).addClass(m.icons),h.hasClass("hasFilters")&&f.find("."+c.css.filterRow).addClass(m.filterRow));for(h=0;h<a.columns;h++)f=a.$headers.add(a.$extraHeaders).filter('[data-column="'+h+'"]'),b=c.css.icon?f.find("."+c.css.icon):f,d=a.$headers.filter('[data-column="'+h+'"]:last'),d.length&&(d[0].sortDisabled? (f.removeClass(e),b.removeClass(e+" "+m.icons)):(d=f.hasClass(c.css.sortAsc)?m.sortAsc:f.hasClass(c.css.sortDesc)?m.sortDesc:f.hasClass(c.css.header)?m.sortNone:"",f[d===m.sortNone?"removeClass":"addClass"](m.active),b.removeClass(e).addClass(d)));a.debug&&c.benchmark("Applying "+l+" theme",g)},remove:function(b,a,d){b=a.$table;a=a.theme||"jui";d=c.themes[a]||c.themes.jui;var h=b.children("thead").children(),g=d.sortNone+" "+d.sortDesc+" "+d.sortAsc;b.removeClass("tablesorter-"+a+" "+d.table).find(c.css.header).removeClass(d.header); h.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(d.hover+" "+g+" "+d.active).find("."+c.css.filterRow).removeClass(d.filterRow);h.find("."+c.css.icon).removeClass(d.icons)}});
|
||
|
c.addWidget({id:"columns",priority:30,options:{columns:["primary","secondary","tertiary"]},format:function(b,a,d){var h,g,f,e,l,m,n,p,s=a.$table,r=a.$tbodies,t=a.sortList,v=t.length,w=d&&d.columns||["primary","secondary","tertiary"],x=w.length-1;n=w.join(" ");a.debug&&(h=new Date);for(f=0;f<r.length;f++)g=c.processTbody(b, r.eq(f),!0),e=g.children("tr"),e.each(function(){l=k(this);if("none"!==this.style.display&&(m=l.children().removeClass(n),t&&t[0]&&(m.eq(t[0][0]).addClass(w[0]),1<v)))for(p=1;p<v;p++)m.eq(t[p][0]).addClass(w[p]||w[x])}),c.processTbody(b,g,!1);b=!1!==d.columns_thead?["thead tr"]:[];!1!==d.columns_tfoot&&b.push("tfoot tr");if(b.length&&(e=s.find(b.join(",")).children().removeClass(n),v))for(p=0;p<v;p++)e.filter('[data-column="'+t[p][0]+'"]').addClass(w[p]||w[x]);a.debug&&c.benchmark("Applying Columns widget", h)},remove:function(b,a,d){var h=a.$tbodies,g=(d.columns||["primary","secondary","tertiary"]).join(" ");a.$headers.removeClass(g);a.$table.children("tfoot").children("tr").children("th, td").removeClass(g);for(a=0;a<h.length;a++)d=c.processTbody(b,h.eq(a),!0),d.children("tr").each(function(){k(this).children().removeClass(g)}),c.processTbody(b,d,!1)}});
|
||
|
c.addWidget({id:"filter",priority:50,options:{filter_childRows:!1,filter_columnFilters:!0,filter_cssFilter:"",filter_external:"",filter_filteredRow:"filtered", filter_formatter:null,filter_functions:null,filter_hideEmpty:!0,filter_hideFilters:!1,filter_ignoreCase:!0,filter_liveSearch:!0,filter_onlyAvail:"filter-onlyAvail",filter_placeholder:{search:"",select:""},filter_reset:null,filter_saveFilters:!1,filter_searchDelay:300,filter_searchFiltered:!0,filter_selectSource:null,filter_startsWith:!1,filter_useParsedData:!1,filter_serversideFiltering:!1,filter_defaultAttrib:"data-value",filter_selectSourceSeparator:"|"},format:function(b,a,d){a.$table.hasClass("hasFilters")|| c.filter.init(b,a,d)},remove:function(b,a,d){var h,g=a.$tbodies;a.$table.removeClass("hasFilters").unbind("addRows updateCell update updateRows updateComplete appendCache filterReset filterEnd search ".split(" ").join(a.namespace+"filter ")).find("."+c.css.filterRow).remove();for(a=0;a<g.length;a++)h=c.processTbody(b,g.eq(a),!0),h.children().removeClass(d.filter_filteredRow).show(),c.processTbody(b,h,!1);d.filter_reset&&k(document).undelegate(d.filter_reset,"click.tsfilter")}});
|
||
|
c.filter={regex:{regex:/^\/((?:\\\/|[^\/])+)\/([mig]{0,3})?$/, child:/tablesorter-childRow/,filtered:/filtered/,type:/undefined|number/,exact:/(^[\"|\'|=]+)|([\"|\'|=]+$)/g,nondigit:/[^\w,. \-()]/g,operators:/[<>=]/g},types:{regex:function(b,a,d,h){if(c.filter.regex.regex.test(a)){var g;b=c.filter.regex.regex.exec(a);try{g=(new RegExp(b[1],b[2])).test(h)}catch(f){g=!1}return g}return null},operators:function(b,a,d,h,g,f,e,l,m){if(/^[<>]=?/.test(a)){var n;d=e.config;b=c.formatFloat(a.replace(c.filter.regex.operators,""),e);l=d.parsers[f];d=b;if(m[f]||"numeric"=== l.type)n=c.filter.parseFilter(e,k.trim(""+a.replace(c.filter.regex.operators,"")),f,m[f],!0),b="number"!==typeof n||""===n||isNaN(n)?b:n;h=!m[f]&&"numeric"!==l.type||isNaN(b)||"undefined"===typeof g?isNaN(h)?c.formatFloat(h.replace(c.filter.regex.nondigit,""),e):c.formatFloat(h,e):g;/>/.test(a)&&(n=/>=/.test(a)?h>=b:h>b);/</.test(a)&&(n=/<=/.test(a)?h<=b:h<b);n||""!==d||(n=!0);return n}return null},notMatch:function(b,a,d,h,g,f,e,l,m){if(/^\!/.test(a)){a=c.filter.parseFilter(e,a.replace("!",""),f, m[f]);if(c.filter.regex.exact.test(a))return a=a.replace(c.filter.regex.exact,""),""===a?!0:k.trim(a)!==h;b=h.search(k.trim(a));return""===a?!0:!(l.filter_startsWith?0===b:0<=b)}return null},exact:function(b,a,d,h,g,f,e,l,m,n){return c.filter.regex.exact.test(a)?(b=c.filter.parseFilter(e,a.replace(c.filter.regex.exact,""),f,m[f]),n?0<=k.inArray(b,n):b==h):null},and:function(b,a,d,h,g,f,e,l,m){if(c.filter.regex.andTest.test(b)){b=a.split(c.filter.regex.andSplit);a=0<=h.search(k.trim(c.filter.parseFilter(e, b[0],f,m[f])));for(d=b.length-1;a&&d;)a=a&&0<=h.search(k.trim(c.filter.parseFilter(e,b[d],f,m[f]))),d--;return a}return null},range:function(b,a,d,h,g,f,e,k,m){if(c.filter.regex.toTest.test(a)){b=e.config;var n=a.split(c.filter.regex.toSplit);d=c.formatFloat(c.filter.parseFilter(e,n[0].replace(c.filter.regex.nondigit,""),f,m[f]),e);k=c.formatFloat(c.filter.parseFilter(e,n[1].replace(c.filter.regex.nondigit,""),f,m[f]),e);if(m[f]||"numeric"===b.parsers[f].type)a=b.parsers[f].format(""+n[0],e,b.$headers.eq(f), f),d=""===a||isNaN(a)?d:a,a=b.parsers[f].format(""+n[1],e,b.$headers.eq(f),f),k=""===a||isNaN(a)?k:a;a=!m[f]&&"numeric"!==b.parsers[f].type||isNaN(d)||isNaN(k)?isNaN(h)?c.formatFloat(h.replace(c.filter.regex.nondigit,""),e):c.formatFloat(h,e):g;d>k&&(h=d,d=k,k=h);return a>=d&&a<=k||""===d||""===k}return null},wild:function(b,a,d,h,g,f,e,l,m,n){return/[\?|\*]/.test(a)||c.filter.regex.orReplace.test(b)?(b=e.config,a=c.filter.parseFilter(e,a.replace(c.filter.regex.orReplace,"|"),f,m[f]),!b.$headers.filter('[data-column="'+ f+'"]:last').hasClass("filter-match")&&/\|/.test(a)&&(a=k.isArray(n)?"("+a+")":"^("+a+")$"),(new RegExp(a.replace(/\?/g,"\\S{1}").replace(/\*/g,"\\S*"))).test(h)):null},fuzzy:function(b,a,d,h,g,f,e,k,m){if(/^~/.test(a)){b=0;d=h.length;f=c.filter.parseFilter(e,a.slice(1),f,m[f]);for(a=0;a<d;a++)h[a]===f[b]&&(b+=1);return b===f.length?!0:!1}return null}},init:function(b,a,d){c.language=k.extend(!0,{},{to:"to",or:"or",and:"and"},c.language);var h,g,f,e,l,m,n,p;h=c.filter.regex;a.debug&&(p=new Date); a.$table.addClass("hasFilters");d.searchTimer=null;d.filter_initTimer=null;d.filter_formatterCount=0;d.filter_formatterInit=[];k.extend(h,{child:new RegExp(a.cssChildRow),filtered:new RegExp(d.filter_filteredRow),alreadyFiltered:new RegExp("(\\s+("+c.language.or+"|-|"+c.language.to+")\\s+)","i"),toTest:new RegExp("\\s+(-|"+c.language.to+")\\s+","i"),toSplit:new RegExp("(?:\\s+(?:-|"+c.language.to+")\\s+)","gi"),andTest:new RegExp("\\s+("+c.language.and+"|&&)\\s+","i"),andSplit:new RegExp("(?:\\s+(?:"+ c.language.and+"|&&)\\s+)","gi"),orReplace:new RegExp("\\s+("+c.language.or+")\\s+","gi")});!1!==d.filter_columnFilters&&a.$headers.filter(".filter-false, .parser-false").length!==a.$headers.length&&c.filter.buildRow(b,a,d);a.$table.bind("addRows updateCell update updateRows updateComplete appendCache filterReset filterEnd search ".split(" ").join(a.namespace+"filter "),function(e,f){a.$table.find("."+c.css.filterRow).toggle(!(d.filter_hideEmpty&&k.isEmptyObj
|
||
|
c.getFilters=function(b,a,d,h){var g,f=!1,e=b?k(b)[0].config:"",l=e?e.widgetOptions:"";if(!0!==a&&l&&!l.filter_columnFilters)return k(b).data("lastSearch");if(e&&(e.$filters&&(g=e.$filters.find("."+c.css.filter)),l.filter_$externalFilters&&(g=g&&g.length?g.add(l.filter_$externalFilters): l.filter_$externalFilters),g&&g.length))for(f=d||[],b=0;b<e.columns+1;b++)a=g.filter('[data-column="'+(b===e.columns?"all":b)+'"]'),a.length&&(a=a.sort(function(a,b){return k(b).attr("data-lastSearchTime")-k(a).attr("data-lastSearchTime")}),k.isArray(d)?(h?a.slice(1):a).val(d[b]).trigger("change.tsfilter"):(f[b]=a.val()||"",a.slice(1).val(f[b])),b===e.columns&&a.length&&(l.filter_$anyMatch=a));0===f.length&&(f=!1);return f};
|
||
|
c.setFilters=function(b,a,d,h){var g=b?k(b)[0].config:"";b=c.getFilters(b, !0,a,h);g&&d&&(g.lastCombinedFilter=null,g.lastSearch=[],c.filter.searching(g.$table[0],a,h),g.$table.trigger("filterFomatterUpdate"));return!!b};
|
||
|
c.addWidget({id:"stickyHeaders",priority:60,options:{stickyHeaders:"",stickyHeaders_attachTo:null,stickyHeaders_offset:0,stickyHeaders_filteredToTop:!0,stickyHeaders_cloneId:"-sticky",stickyHeaders_addResizeEvent:!0,stickyHeaders_includeCaption:!0,stickyHeaders_zIndex:2},format:function(b,a,d){if(!(a.$table.hasClass("hasStickyHeaders")||0<=k.inArray("filter", a.widgets)&&!a.$table.hasClass("hasFilters"))){var h=a.$table,g=k(d.stickyHeaders_attachTo),f=h.children("thead:first"),e=g.length?g:k(window),l=f.children("tr").not(".sticky-false").children(),m="."+c.css.headerIn,n=h.find("tfoot"),p=isNaN(d.stickyHeaders_offset)?k(d.stickyHeaders_offset):"",s=g.length?0:p.length?p.height()||0:parseInt(d.stickyHeaders_offset,10)||0,r=d.$sticky=h.clone().addClass("containsStickyHeaders").css({position:g.length?"absolute":"fixed",margin:0,top:s,left:0,visibility:"hidden", zIndex:d.stickyHeaders_zIndex?d.stickyHeaders_zIndex:2}),t=r.children("thead:first").addClass(c.css.sticky+" "+d.stickyHeaders),v,w="",x=0,A="collapse"!==h.css("border-collapse")&&!/(webkit|msie)/i.test(navigator.userAgent),z=function(){s=p.length?p.height()||0:parseInt(d.stickyHeaders_offset,10)||0;x=0;A&&(x=2*parseInt(l.eq(0).css("border-left-width"),10));r.css({left:g.length?(parseInt(g.css("padding-left"),10)||0)+parseInt(a.$table.css("padding-left"),10)+parseInt(a.$table.css("margin-left"),10)+ parseInt(h.css("border-left-width"),10):f.offset().left-e.scrollLeft()-x,width:h.width()});v.filter(":visible").each(function(b){b=l.filter(":visible").eq(b);var d=A&&k(this).attr("data-column")===""+parseInt(a.columns/2,10)?1:0;k(this).css({width:b.width()-x}).find(m).width(b.find(m).width()-d)})};r.attr("id")&&(r[0].id+=d.stickyHeaders_cloneId);r.find("thead:gt(0), tr.sticky-false").hide();r.find("tbody, tfoot").remove();d.stickyHeaders_includeCaption?r.find("caption").css("margin-left","-1px"): r.find("caption").remove();v=t.children().children();r.css({height:0,width:0,padding:0,margin:0,border:0});v.find("."+c.css.resizer).remove();h.addClass("hasStickyHeaders").bind("pagerComplete.tsSticky",function(){z()});c.bindEvents(b,t.children().children(".tablesorter-header"));h.after(r);e.bind("scroll.tsSticky resize.tsSticky",function(a){if(h.is(":visible")){var b=h.offset(),c=d.stickyHeaders_includeCaption?0:h.find("caption").outerHeight(!0),c=(g.length?g.offset().top:e.scrollTop())+s-c,k=h.height()- (r.height()+(n.height()||0)),b=c>b.top&&c<b.top+k?"visible":"hidden",c={visibility:b};g.length?c.top=g.scrollTop():c.left=f.offset().left-e.scrollLeft()-x;r.removeClass("tablesorter-sticky-visible tablesorter-sticky-hidden").addClass("tablesorter-sticky-"+b).css(c);if(b!==w||"resize"===a.type)z(),w=b}});d.stickyHeaders_addResizeEvent&&c.addHeaderResizeEvent(b);h.hasClass("hasFilters")&&(h.bind("filterEnd",function(){var b=k(document.activeElement).closest("td"),b=b.parent().children().index(b);r.hasClass(c.css.stickyVis)&& d.stickyHeaders_filteredToTop&&(window.scrollTo(0,h.position().top),0<=b&&a.$filters&&a.$filters.eq(b).find("a, select, input").filter(":visible").focus())}),c.filter.bindSearch(h,v.find("."+c.css.filter)),d.filter_hideFilters&&c.filter.hideFilters(r,a));h.trigger("stickyHeadersInit")}},remove:function(b,a,d){a.$table.removeClass("hasStickyHeaders").unbind("pagerComplete.tsSticky").find("."+c.css.sticky).remove();d.$sticky&&d.$sticky.length&&d.$sticky.remove();k(".hasStickyHeaders").length||k(window).unbind("scroll.tsSticky resize.tsSticky"); c.addHeaderResizeEvent(b,!1)}});
|
||
|
c.addWidget({id:"resizable",priority:40,options:{resizable:!0,resizable_addLastColumn:!1,resizable_widths:[],resizable_throttle:!1},format:function(b,a,d){if(!a.$table.hasClass("hasResizable")){a.$table.addClass("hasResizable");c.resizableReset(b,!0);var h,g,f,e,l,m={},n=a.$table,p=0,s=null,r=null,t=20>Math.abs(n.parent().width()-n.width()),v=function(a){if(0!==p&&s){var b=a.pageX-p,c=s.width();s.width(c+b);s.width()!==c&&t&&r.width(r.width()-b);p=a.pageX}},w=function(){c.storage&& s&&r&&(m={},m[s.index()]=s.width(),m[r.index()]=r.width(),s.width(m[s.index()]),r.width(m[r.index()]),!1!==d.resizable&&c.storage(b,"tablesorter-resizable",a.$headers.map(function(){return k(this).width()}).get()));p=0;s=r=null;k(window).trigger("resize")};if(m=c.storage&&!1!==d.resizable?c.storage(b,"tablesorter-resizable"):{})for(e in m)!isNaN(e)&&e<a.$headers.length&&a.$headers.eq(e).width(m[e]);h=n.children("thead:first").children("tr");h.children().each(function(){var d;d=k(this);e=d.attr("data-column"); d="false"===c.getData(d,c.getColumnData(b,a.headers,e),"resizable");h.children().filter('[data-column="'+e+'"]')[d?"addClass":"removeClass"]("resizable-false")});h.each(function(){f=k(this).children().not(".resizable-false");k(this).find("."+c.css.wrapper).length||f.wrapInner('<div class="'+c.css.wrapper+'" style="position:relative;height:100%;width:100%"></div>');d.resizable_addLastColumn||(f=f.slice(0,-1));g=g?g.add(f):f});g.each(function(){var a=k(this),b=parseInt(a.css("padding-right"),10)+10; a.find("."+c.css.wrapper).append('<div class="'+c.css.resizer+'" style="cursor:w-resize;position:absolute;z-index:1;right:-'+b+'px;top:0;height:100%;width:20px;"></div>')}).find("."+c.css.resizer).bind("mousedown",function(b){s=k(b.target).closest("th");var c=a.$headers.filter('[data-column="'+s.attr("data-column")+'"]');1<c.length&&(s=s.add(c));r=b.shiftKey?s.parent().find("th").not(".resizable-false").filter(":last"):s.nextAll(":not(.resizable-false)").eq(0);p=b.pageX});k(document).bind("mousemove.tsresize", function(a){0!==p&&s&&(d.resizable_throttle?(clearTimeout(l),l=setTimeout(function(){v(a)},isNaN(d.resizable_throttle)?5:d.resizable_throttle)):v(a))}).bind("mouseup.tsresize",function(){w()});n.find("thead:first").bind("contextmenu.tsresize",function(){c.resizableReset(b);var a=k.isEmptyObject?k.isEmptyObject(m):!0;m={};return a})}},remove:function(b,a){a.$table.removeClass("hasResizable").children("thead").unbind("mouseup.tsresize mouseleave.tsresize contextmenu.tsresize").children("tr").children().unbind("mousemove.tsresize mouseup.tsresize").find("."+ c.css.resizer).remove();c.resizableReset(b)}});
|
||
|
c.resizableReset=function(b,a){k(b).each(function(){var d,h=this.config,g=h&&h.widgetOptions;b&&h&&(h.$headers.each(function(a){d=k(this);g.resizable_widths[a]?d.css("width",g.resizable_widths[a]):d.hasClass("resizable-false")||d.css("width","")}),c.storage&&!a&&c.storage(this,"tablesorter-resizable",{}))})};
|
||
|
c.addWidget({id:"saveSort",priority:20,options:{saveSort:!0},init:function(b,a,c,h){a.format(b,c,h,!0)},format:function(b,a,d,h){var g,f=a.$table; d=!1!==d.saveSort;var e={sortList:a.sortList};a.debug&&(g=new Date);f.hasClass("hasSaveSort")?d&&b.hasInitialized&&c.storage&&(c.storage(b,"tablesorter-savesort",e),a.debug&&c.benchmark("saveSort widget: Saving last sort: "+a.sortList,g)):(f.addClass("hasSaveSort"),e="",c.storage&&(e=(d=c.storage(b,"tablesorter-savesort"))&&d.hasOwnProperty("sortList")&&k.isArray(d.sortList)?d.sortList:"",a.debug&&c.benchmark('saveSort: Last sort loaded: "'+e+'"',g),f.bind("saveSortReset",function(a){a.stopPropagation(); c.storage(b,"tablesorter-savesort","")})),h&&e&&0<e.length?a.sortList=e:b.hasInitialized&&e&&0<e.length&&f.trigger("sorton",[e]))},remove:function(b){c.storage&&c.storage(b,"tablesorter-savesort","")}})
|
||
|
})(jQuery);
|