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

4 lines
52 KiB
JavaScript
Raw Normal View History

2018-08-27 16:00:49 +00:00
(function(factory){if (typeof define === 'function' && define.amd){define(['jquery'], factory);} else if (typeof module === 'object' && typeof module.exports === 'object'){module.exports = factory(require('jquery'));} else {factory(jQuery);}}(function(jQuery){
2024-08-14 01:18:52 +00:00
/*! tablesorter (FORK) - updated 2024-08-13 (v2.32.0)*/
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&"object"==typeof module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){return function(h,u,p){"use strict";var g=h.tablesorter||{};h.extend(!0,g.defaults,{fixedUrl:"",widgetOptions:{storage_fixedUrl:"",storage_group:"",storage_page:"",storage_storageType:"",storage_tableId:"",storage_useSessionStorage:""}}),g.storage=function(e,t,r,i){var a=!1,l={},s=(e=h(e)[0]).config,n=s&&s.widgetOptions,o=g.debug(s,"storage"),c=(i&&i.storageType||n&&n.storage_storageType).toString().charAt(0).toLowerCase(),d=c?"":i&&i.useSessionStorage||n&&n.storage_useSessionStorage,f=h(e),e=i&&i.id||f.attr(i&&i.group||n&&n.storage_group||"data-table-group")||n&&n.storage_tableId||e.id||h(".tablesorter").index(f),f=i&&i.url||f.attr(i&&i.page||n&&n.storage_page||"data-table-page")||n&&n.storage_fixedUrl||s&&s.fixedUrl||u.location.pathname;if("c"!==c&&(c="s"===c||d?"sessionStorage":"localStorage")in u)try{u[c].setItem("_tmptest","temp"),a=!0,u[c].removeItem("_tmptest")}catch(e){console.warn(c+" is not supported in this browser")}if(o&&console.log("Storage >> Using",a?c:"cookies"),h.parseJSON&&(l=a?h.parseJSON(u[c][t]||"null")||{}:(i=p.cookie.split(/[;\s|=]/),0!==(n=h.inArray(t,i)+1)&&h.parseJSON(i[n]||"null")||{})),void 0===r||!u.JSON||!JSON.hasOwnProperty("stringify"))return l&&l[f]?l[f][e]:"";l[f]||(l[f]={}),l[f][e]=r,a?u[c][t]=JSON.stringify(l):((s=new Date).setTime(s.getTime()+31536e6),p.cookie=t+"="+JSON.stringify(l).replace(/\"/g,'"')+"; expires="+s.toGMTString()+"; path=/")}}(e,window,document),function(S){"use strict";var C=S.tablesorter||{};C.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",sortNone:"",sortAsc:"",sortDesc:"",active:"",hover:"",icons:"",iconSortNone:"bootstrap-icon-unsorted",iconSortAsc:"glyphicon glyphicon-chevron-up",iconSortDesc:"glyphicon glyphicon-chevron-down",filterRow:"",footerRow:"",footerCells:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",caption:"ui-widget-content",header:"ui-widget-header ui-corner-all ui-state-default",sortNone:"",sortAsc:"",sortDesc:"",active:"ui-state-active",hover:"ui-state-hover",icons:"ui-icon",iconSortNone:"ui-icon-carat-2-n-s ui-icon-caret-2-n-s",iconSortAsc:"ui-icon-carat-1-n ui-icon-caret-1-n",iconSortDesc:"ui-icon-carat-1-s ui-icon-caret-1-s",filterRow:"",footerRow:"",footerCells:"",even:"ui-widget-content",odd:"ui-state-default"}},S.extend(C.css,{wrapper:"tablesorter-wrapper"}),C.addWidget({id:"uitheme",priority:10,format:function(e,t,r){var i,a,l,s,n,o,c,d,f,h,u,p,g=C.themes,m=t.$table.add(S(t.namespace+"_extra_table")),b=t.$headers.add(S(t.namespace+"_extra_headers")),y=t.theme||"jui",_=g[y]||{},v=S.trim([_.sortNone,_.sortDesc,_.sortAsc,_.active].join(" ")),w=S.trim([_.iconSortNone,_.iconSortDesc,_.iconSortAsc].join(" ")),x=C.debug(t,"uitheme");for(x&&(n=new Date),m.hasClass("tablesorter-"+y)&&t.theme===t.appliedTheme&&r.uitheme_applied||(r.uitheme_applied=!0,h=g[t.appliedTheme]||{},g=(p=!S.isEmptyObject(h))?[h.sortNone,h.sortDesc,h.sortAsc,h.active].join(" "):"",u=p?[h.iconSortNone,h.iconSortDesc,h.iconSortAsc].join(" "):"",p&&(r.zebra[0]=S.trim(" "+r.zebra[0].replace(" "+h.even,"")),r.zebra[1]=S.trim(" "+r.zebra[1].replace(" "+h.odd,"")),t.$tbodies.children().removeClass([h.even,h.odd].join(" "))),_.even&&(r.zebra[0]+=" "+_.even),_.odd&&(r.zebra[1]+=" "+_.odd),m.children("caption").removeClass(h.caption||"").addClass(_.caption),d=m.removeClass((t.appliedTheme?"tablesorter-"+(t.appliedTheme||""):"")+" "+(h.table||"")).addClass("tablesorter-"+y+" "+(_.table||"")).children("tfoot"),t.appliedTheme=t.theme,d.length&&d.children("tr").removeClass(h.footerRow||"").addClass(_.footerRow).children("th, td").removeClass(h.footerCells||"").addClass(_.footerCells),b.removeClass((p?[h.header,h.hover,g].join(" "):"")||"").addClass(_.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(e){S(this)["mouseenter"===e.typ