tablesorter/js/jquery.tablesorter.widgets.min.js

18 lines
34 KiB
JavaScript
Raw Normal View History

2014-09-16 00:44:03 +00:00
/*! tableSorter 2.16+ widgets - updated 9/15/2014 (v2.17.8) */
2014-08-09 16:29:10 +00:00
;(function(k){
2014-06-29 04:04:50 +00:00
var c=k.tablesorter=k.tablesorter||{};
2014-07-17 17:40:11 +00:00
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"});
2014-09-16 00:44:03 +00:00
c.storage=function(d,a,b,e){d=k(d)[0];var c, h,g=!1;c={};h=d.config;var n=k(d);d=e&&e.id||n.attr(e&&e.group||"data-table-group")||d.id||k(".tablesorter").index(n);e=e&&e.url||n.attr(e&&e.page||"data-table-page")||h&&h.fixedUrl||window.location.pathname;if("localStorage"in window)try{window.localStorage.setItem("_tmptest","temp"),g=!0,window.localStorage.removeItem("_tmptest")}catch(l){}k.parseJSON&&(g?c=k.parseJSON(localStorage[a]||"{}"):(h=document.cookie.split(/[;\s|=]/),c=k.inArray(a,h)+1,c=0!==c?k.parseJSON(h[c]||"{}"):{}));if((b||""=== b)&&window.JSON&&JSON.hasOwnProperty("stringify"))c[e]||(c[e]={}),c[e][d]=b,g?localStorage[a]=JSON.stringify(c):(b=new Date,b.setTime(b.getTime()+31536E6),document.cookie=a+"="+JSON.stringify(c).replace(/\"/g,'"')+"; expires="+b.toGMTString()+"; path=/");else return c&&c[e]?c[e][d]:""};
c.addHeaderResizeEvent=function(d,a,b){d=k(d)[0];var c;b=k.extend({},{timer:250},b);var f=d.config,h=f.widgetOptions,g=function(a){h.resize_flag=!0;c=[];f.$headers.each(function(){var a=k(this),b=a.data("savedSizes")|| [0,0],d=this.offsetWidth,f=this.offsetHeight;if(d!==b[0]||f!==b[1])a.data("savedSizes",[d,f]),c.push(this)});c.length&&!1!==a&&f.$table.trigger("resize",[c]);h.resize_flag=!1};g(!1);clearInterval(h.resize_timer);if(a)return h.resize_flag=!1;h.resize_timer=setInterval(function(){h.resize_flag||g()},b.timer)};
c.addWidget({id:"uitheme",priority:10,format:function(d,a,b){var e,f,h,g=c.themes;e=a.$table;h=a.$headers;var n=a.theme||"jui",l=g[n]||g.jui,g=l.sortNone+" "+l.sortDesc+" "+l.sortAsc;a.debug&& (f=new Date);e.hasClass("tablesorter-"+n)&&a.theme!==n&&d.hasInitialized||(""!==l.even&&(b.zebra[0]+=" "+l.even),""!==l.odd&&(b.zebra[1]+=" "+l.odd),e.find("caption").addClass(l.caption),d=e.removeClass(""===a.theme?"":"tablesorter-"+a.theme).addClass("tablesorter-"+n+" "+l.table).find("tfoot"),d.length&&d.find("tr").addClass(l.footerRow).children("th, td").addClass(l.footerCells),h.addClass(l.header).not(".sorter-false").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(a){k(this)["mouseenter"=== a.type?"addClass":"removeClass"](l.hover)}),h.find("."+c.css.wrapper).length||h.wrapInner('<div class="'+c.css.wrapper+'" style="position:relative;height:100%;width:100%"></div>'),a.cssIcon&&h.find("."+c.css.icon).addClass(l.icons),e.hasClass("hasFilters")&&h.find("."+c.css.filterRow).addClass(l.filterRow));for(e=0;e<a.columns;e++)h=a.$headers.add(a.$extraHeaders).filter('[data-column="'+e+'"]'),d=c.css.icon?h.find("."+c.css.icon):h,b=a.$headers.filter('[data-column="'+e+'"]:last'),b.length&&(b[0].sortDisabled? (h.removeClass(g),d.removeClass(g+" "+l.icons)):(b=h.hasClass(c.css.sortAsc)?l.sortAsc:h.hasClass(c.css.sortDesc)?l.sortDesc:h.hasClass(c.css.header)?l.sortNone:"",h[b===l.sortNone?"removeClass":"addClass"](l.active),d.removeClass(g).addClass(b)));a.debug&&c.benchmark("Applying "+n+" theme",f)},remove:function(d,a){var b=a.$table,e=a.theme||"jui",f=c.themes[e]||c.themes.jui,h=b.children("thead").children(),g=f.sortNone+" "+f.sortDesc+" "+f.sortAsc;b.removeClass("tablesorter-"+e+" "+f.table).find(c.css.header).removeClass(f.header); h.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(f.hover+" "+g+" "+f.active).find("."+c.css.filterRow).removeClass(f.filterRow);h.find("."+c.css.icon).removeClass(f.icons)}});
c.addWidget({id:"columns",priority:30,options:{columns:["primary","secondary","tertiary"]},format:function(d,a,b){var e,f,h,g,n,l,r,p,s=a.$table,t=a.$tbodies,x=a.sortList,w=x.length,v=b&&b.columns||["primary","secondary","tertiary"],A=v.length-1;r=v.join(" ");a.debug&&(e=new Date);for(h=0;h<t.length;h++)f=c.processTbody(d, t.eq(h),!0),g=f.children("tr"),g.each(function(){n=k(this);if("none"!==this.style.display&&(l=n.children().removeClass(r),x&&x[0]&&(l.eq(x[0][0]).addClass(v[0]),1<w)))for(p=1;p<w;p++)l.eq(x[p][0]).addClass(v[p]||v[A])}),c.processTbody(d,f,!1);d=!1!==b.columns_thead?["thead tr"]:[];!1!==b.columns_tfoot&&d.push("tfoot tr");if(d.length&&(g=s.find(d.join(",")).children().removeClass(r),w))for(p=0;p<w;p++)g.filter('[data-column="'+x[p][0]+'"]').addClass(v[p]||v[A]);a.debug&&c.benchmark("Applying Columns widget", e)},remove:function(d,a,b){var e=a.$tbodies,f=(b.columns||["primary","secondary","tertiary"]).join(" ");a.$headers.removeClass(f);a.$table.children("tfoot").children("tr").children("th, td").removeClass(f);for(a=0;a<e.length;a++)b=c.processTbody(d,e.eq(a),!0),b.children("tr").each(function(){k(this).children().removeClass(f)}),c.processTbody(d,b,!1)}});
c.addWidget({id:"filter",priority:50,options:{filter_childRows:!1,filter_columnFilters:!0,filter_cssFilter:"",filter_defaultFilter:{},filter_excludeFilter:{}, 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(d,a,b){a.$table.hasClass("hasFilters")||c.filter.init(d,a,b)},remove:function(d,a,b){var e,f=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<f.length;a++)e=c.processTbody(d,f.eq(a),!0),e.children().removeClass(b.filter_filteredRow).show(),c.processTbody(d,e,!1);b.filter_reset&&k(document).undelegate(b.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,query:"(q|query)"},types:{regex:function(d,a){if(c.filter.regex.regex.test(a.iFilter)){var b,e=c.filter.regex.regex.exec(a.iFilter);try{b=(new RegExp(e[1],e[2])).test(a.iExact)}catch(f){b=!1}return b}return null},operators:function(d,a){if(/^[<>]=?/.test(a.iFilter)){var b, e;b=d.table;var f=a.index,h=a.parsed[f],g=c.formatFloat(a.iFilter.replace(c.filter.regex.operators,""),b),n=d.parsers[f],l=g;if(h||"numeric"===n.type)e=c.filter.parseFilter(d,k.trim(""+a.iFilter.replace(c.filter.regex.operators,"")),f,h,!0),g="number"!==typeof e||""===e||isNaN(e)?g:e;b=!h&&"numeric"!==n.type||isNaN(g)||"undefined"===typeof a.cache?isNaN(a.iExact)?c.formatFloat(a.iExact.replace(c.filter.regex.nondigit,""),b):c.formatFloat(a.iExact,b):a.cache;/>/.test(a.iFilter)&&(e=/>=/.test(a.iFilter)? b>=g:b>g);/</.test(a.iFilter)&&(e=/<=/.test(a.iFilter)?b<=g:b<g);e||""!==l||(e=!0);return e}return null},notMatch:function(d,a){if(/^\!/.test(a.iFilter)){var b,e=c.filter.parseFilter(d,a.iFilter.replace("!",""),a.index,a.parsed[a.index]);if(c.filter.regex.exact.test(e))return e=e.replace(c.filter.regex.exact,""),""===e?!0:k.trim(e)!==a.iExact;b=a.iExact.search(k.trim(e));return""===e?!0:!(d.widgetOptions.filter_startsWith?0===b:0<=b)}return null},exact:function(d,a){if(c.filter.regex.exact.test(a.iFilter)){var b= c.filter.parseFilter(d,a.iFilter.replace(c.filter.regex.exact,""),a.index,a.parsed[a.index]);return a.anyMatch?0<=k.inArray(b,a.rowArray):b==a.iExact}return null},and:function(d,a){if(c.filter.regex.andTest.test(a.filter)){for(var b=a.index,e=a.parsed[b],f=a.iFilter.split(c.filter.regex.andSplit),h=0<=a.iExact.search(k.trim(c.filter.parseFilter(d,f[0],b,e))),g=f.length-1;h&&g;)h=h&&0<=a.iExact.search(k.trim(c.filter.parseFilter(d,f[g],b,e))),g--;return h}return null},range:function(d,a){if(c.filter.regex.toTest.test(a.iFilter)){var b, e;e=d.table;var f=a.index,h=a.parsed[f],g=a.iFilter.split(c.filter.regex.toSplit),k=c.formatFloat(c.filter.parseFilter(d,g[0].replace(c.filter.regex.nondigit,""),f,h),e),l=c.formatFloat(c.filter.parseFilter(d,g[1].replace(c.filter.regex.nondigit,""),f,h),e);if(h||"numeric"===d.parsers[f].type)b=d.parsers[f].format(""+g[0],e,d.$headers.eq(f),f),k=""===b||isNaN(b)?k:b,b=d.parsers[f].format(""+g[1],e,d.$headers.eq(f),f),l=""===b||isNaN(b)?l:b;b=!h&&"numeric"!==d.parsers[f].type||isNaN(k)||isNaN(l)?isNaN(a.iExact)? c.formatFloat(a.iExact.replace(c.filter.regex.nondigit,""),e):c.formatFloat(a.iExact,e):a.cache;k>l&&(e=k,k=l,l=e);return b>=k&&b<=l||""===k||""===l}return null},wild:function(d,a){if(/[\?|\*]/.test(a.iFilter)||c.filter.regex.orReplace.test(a.filter)){var b=a.index,e=a.parsed[b],e=c.filter.parseFilter(d,a.iFilter.replace(c.filter.regex.orReplace,"|"),b,e);!d.$headers.filter('[data-column="'+b+'"]:last').hasClass("filter-match")&&/\|/.test(e)&&(e=a.anyMatch&&k.isArray(a.rowArray)?"("+e+")":"^("+e+ ")$");return(new RegExp(e.replace(/\?/g,"\\S{1}").replace(/\*/g,"\\S*"))).test(a.iExact)}return null},fuzzy:function(d,a){if(/^~/.test(a.iFilter)){var b,e=0,f=a.iExact.length,h=c.filter.parseFilter(d,a.iFilter.slice(1),a.index,a.parsed[a.index]);for(b=0;b<f;b++)a.iExact[b]===h[e]&&(e+=1);return e===h.length?!0:!1}return null}},init:function(d,a,b){c.language=k.extend(!0,{},{to:"to",or:"or",and:"and"},c.language);var e,f,h,g,n,l,r,p;e=c.filter.regex;a.debug&&(p=new Date);a.$table.addClass("hasFilters"); b.searchTimer=null;b.filter_initTimer=null;b.filter_formatterCount=0;b.filter_formatterInit=[];b.filter_initializing=!0;h="\\{"+c.filter.regex.query+"\\}";k.extend(e,{child:new RegExp(a.cssChildRow),filtered:new RegExp(b.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
c.getFilters=function(d,a,b,e){var f,h=!1,g=d?k(d)[0].config:"",n=g?g.widgetOptions:"";if(!0!==a&&n&&!n.filter_columnFilters)return k(d).data("lastSearch");if(g&&(g.$filters&&(f=g.$filters.find("."+c.css.filter)),n.filter_$externalFilters&&(f=f&&f.length?f.add(n.filter_$externalFilters): n.filter_$externalFilters),f&&f.length))for(h=b||[],d=0;d<g.columns+1;d++)a=f.filter('[data-column="'+(d===g.columns?"all":d)+'"]'),a.length&&(a=a.sort(function(a,b){return k(b).attr("data-lastSearchTime")-k(a).attr("data-lastSearchTime")}),k.isArray(b)?(e?a.slice(1):a).val(b[d]).trigger("change.tsfilter"):(h[d]=a.val()||"",a.slice(1).val(h[d])),d===g.columns&&a.length&&(n.filter_$anyMatch=a));0===h.length&&(h=!1);return h};
c.setFilters=function(d,a,b,e){var f=d?k(d)[0].config:"";d=c.getFilters(d, !0,a,e);f&&b&&(f.lastCombinedFilter=null,f.lastSearch=[],c.filter.searching(f.$table[0],a,e),f.$table.trigger("filterFomatterUpdate"));return!!d};
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(d,a,b){if(!(a.$table.hasClass("hasStickyHeaders")||0<=k.inArray("filter", a.widgets)&&!a.$table.hasClass("hasFilters"))){var e=a.$table,f=k(b.stickyHeaders_attachTo||"window"),h=e.children("thead:first"),g=f.length?f:k(window),n=h.children("tr").not(".sticky-false").children(),l="."+c.css.headerIn,r=e.find("tfoot"),p=isNaN(b.stickyHeaders_offset)?k(b.stickyHeaders_offset):"",s=f.length?0:p.length?p.height()||0:parseInt(b.stickyHeaders_offset,10)||0,t=b.$sticky=e.clone().addClass("containsStickyHeaders").css({position:f.length?"absolute":"fixed",margin:0,top:s,left:0,visibility:"hidden", zIndex:b.stickyHeaders_zIndex?b.stickyHeaders_zIndex:2}),x=t.children("thead:first").addClass(c.css.sticky+" "+b.stickyHeaders),w,v="",A=0,y="collapse"!==e.css("border-collapse")&&!/(webkit|msie)/i.test(navigator.userAgent),z=function(){s=p.length?p.height()||0:parseInt(b.stickyHeaders_offset,10)||0;A=0;y&&(A=2*parseInt(n.eq(0).css("border-left-width"),10));t.css({left:f.length?(parseInt(f.css("padding-left"),10)||0)+parseInt(a.$table.css("padding-left"),10)+parseInt(a.$table.css("margin-left"),10)+ parseInt(e.css("border-left-width"),10):h.offset().left-g.scrollLeft()-A,width:e.width()});w.filter(":visible").each(function(b){b=n.filter(":visible").eq(b);var c=y&&k(this).attr("data-column")===""+parseInt(a.columns/2,10)?1:0;k(this).css({width:b.width()-A}).find(l).width(b.find(l).width()-c)})};t.attr("id")&&(t[0].id+=b.stickyHeaders_cloneId);t.find("thead:gt(0), tr.sticky-false").hide();t.find("tbody, tfoot").remove();b.stickyHeaders_includeCaption?t.find("caption").css("margin-left","-1px"): t.find("caption").remove();w=x.children().children();t.css({height:0,width:0,padding:0,margin:0,border:0});w.find("."+c.css.resizer).remove();e.addClass("hasStickyHeaders").bind("pagerComplete.tsSticky",function(){z()});c.bindEvents(d,x.children().children(".tablesorter-header"));e.after(t);g.bind("scroll.tsSticky resize.tsSticky",function(a){if(e.is(":visible")){var c=e.offset(),d=b.stickyHeaders_includeCaption?0:e.find("caption").outerHeight(!0),d=(f.length?f.offset().top:g.scrollTop())+s-d,k=e.height()- (t.height()+(r.height()||0)),c=d>c.top&&d<c.top+k?"visible":"hidden",d={visibility:c};f.length?d.top=f.scrollTop():d.left=h.offset().left-g.scrollLeft()-A;t.removeClass("tablesorter-sticky-visible tablesorter-sticky-hidden").addClass("tablesorter-sticky-"+c).css(d);if(c!==v||"resize"===a.type)z(),v=c}});b.stickyHeaders_addResizeEvent&&c.addHeaderResizeEvent(d);e.hasClass("hasFilters")&&(e.bind("filterEnd",function(){var d=k(document.activeElement).closest("td"),d=d.parent().children().index(d);t.hasClass(c.css.stickyVis)&& b.stickyHeaders_filteredToTop&&(window.scrollTo(0,e.position().top),0<=d&&a.$filters&&a.$filters.eq(d).find("a, select, input").filter(":visible").focus())}),c.filter.bindSearch(e,w.find("."+c.css.filter)),b.filter_hideFilters&&c.filter.hideFilters(t,a));e.trigger("stickyHeadersInit")}},remove:function(d,a,b){a.$table.removeClass("hasStickyHeaders").unbind("pagerComplete.tsSticky").find("."+c.css.sticky).remove();b.$sticky&&b.$sticky.length&&b.$sticky.remove();k(".hasStickyHeaders").length||k(window).unbind("scroll.tsSticky resize.tsSticky"); c.addHeaderResizeEvent(d,!1)}});
c.addWidget({id:"resizable",priority:40,options:{resizable:!0,resizable_addLastColumn:!1,resizable_widths:[],resizable_throttle:!1},format:function(d,a,b){if(!a.$table.hasClass("hasResizable")){a.$table.addClass("hasResizable");c.resizableReset(d,!0);var e,f,h,g,n,l={},r=a.$table,p=0,s=null,t=null,x=20>Math.abs(r.parent().width()-r.width()),w=function(a){if(0!==p&&s){var b=a.pageX-p,c=s.width();s.width(c+b);s.width()!==c&&x&&t.width(t.width()-b);p=a.pageX}},v=function(){c.storage&& s&&t&&(l={},l[s.index()]=s.width(),l[t.index()]=t.width(),s.width(l[s.index()]),t.width(l[t.index()]),!1!==b.resizable&&c.storage(d,"tablesorter-resizable",a.$headers.map(function(){return k(this).width()}).get()));p=0;s=t=null;k(window).trigger("resize")};if(l=c.storage&&!1!==b.resizable?c.storage(d,"tablesorter-resizable"):{})for(g in l)!isNaN(g)&&g<a.$headers.length&&a.$headers.eq(g).width(l[g]);e=r.children("thead:first").children("tr");e.children().each(function(){var b;b=k(this);g=b.attr("data-column"); b="false"===c.getData(b,c.getColumnData(d,a.headers,g),"resizable");e.children().filter('[data-column="'+g+'"]')[b?"addClass":"removeClass"]("resizable-false")});e.each(function(){h=k(this).children().not(".resizable-false");k(this).find("."+c.css.wrapper).length||h.wrapInner('<div class="'+c.css.wrapper+'" style="position:relative;height:100%;width:100%"></div>');b.resizable_addLastColumn||(h=h.slice(0,-1));f=f?f.add(h):h});f.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));t=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&&(b.resizable_throttle?(clearTimeout(n),n=setTimeout(function(){w(a)},isNaN(b.resizable_throttle)?5:b.resizable_throttle)):w(a))}).bind("mouseup.tsresize",function(){v()});r.find("thead:first").bind("contextmenu.tsresize",function(){c.resizableReset(d);var a=k.isEmptyObject?k.isEmptyObject(l):!0;l={};return a})}},remove:function(d,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(d)}});
c.resizableReset=function(d,a){k(d).each(function(){var b,e=this.config,f=e&&e.widgetOptions;d&&e&&(e.$headers.each(function(a){b=k(this);f.resizable_widths[a]?b.css("width",f.resizable_widths[a]):b.hasClass("resizable-false")||b.css("width","")}),c.storage&&!a&&c.storage(this,"tablesorter-resizable",{}))})};
c.addWidget({id:"saveSort",priority:20,options:{saveSort:!0},init:function(c,a,b,e){a.format(c,b,e,!0)},format:function(d,a,b,e){var f,h=a.$table; b=!1!==b.saveSort;var g={sortList:a.sortList};a.debug&&(f=new Date);h.hasClass("hasSaveSort")?b&&d.hasInitialized&&c.storage&&(c.storage(d,"tablesorter-savesort",g),a.debug&&c.benchmark("saveSort widget: Saving last sort: "+a.sortList,f)):(h.addClass("hasSaveSort"),g="",c.storage&&(g=(b=c.storage(d,"tablesorter-savesort"))&&b.hasOwnProperty("sortList")&&k.isArray(b.sortList)?b.sortList:"",a.debug&&c.benchmark('saveSort: Last sort loaded: "'+g+'"',f),h.bind("saveSortReset",function(a){a.stopPropagation(); c.storage(d,"tablesorter-savesort","")})),e&&g&&0<g.length?a.sortList=g:d.hasInitialized&&g&&0<g.length&&h.trigger("sorton",[g]))},remove:function(d){c.storage&&c.storage(d,"tablesorter-savesort","")}})
2013-10-30 22:47:58 +00:00
})(jQuery);