diff --git a/README.md b/README.md index 01225012..cfee4943 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,21 @@ If you would like to contribute, please... View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/Changes). +#### Version 2.28.10 (5/16/2017) + +* Core: + * Disable `updateCell` method for child rows (temporary block until code is fixed). + * Add namespace class name to table. +* Parsers + * Input-select: + * Prevent input select parser from handling events from child rows. See [pull #1399](https://github.com/Mottie/tablesorter/pull/1399); thanks [@andysleigh](https://github.com/andysleigh)! + * Remove unused variables & add `ignoreChildRow` option. + * Bind & update stickyHeaders checkbox. Fixes [issue #261](https://github.com/Mottie/tablesorter/issues/261). +* Meta: + * Use correct `composer.json` jQuery version. Fixes [issue #1398](https://github.com/Mottie/tablesorter/issues/1398). + * Clarify use of GPLv2 license. See [issue #1400](https://github.com/Mottie/tablesorter/issues/1400). + * Update dependencies. + #### Version 2.28.9 (5/3/2017) * Core: @@ -136,13 +151,3 @@ View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/C * Add `storage_storageType` option & deprecate `storage_useSessionStorage`. * Meta: * Update dependencies x2. - -#### Version 2.28.7 (4/4/2017) - -* Editable: - * Remove "blur" event listeners. See [issue #1360](https://github.com/Mottie/tablesorter/issues/1360). -* Filter: - * Add "filterAndSortReset" method. See [issue #1361](https://github.com/Mottie/tablesorter/issues/1361). - * Prevent JS error added from last update. Fixes [issue #1377](https://github.com/Mottie/tablesorter/issues/1377). -* Meta: - * Fix composer.json license. diff --git a/dist/css/theme.grey.min.css b/dist/css/theme.grey.min.css index 59d07220..244296c8 100644 --- a/dist/css/theme.grey.min.css +++ b/dist/css/theme.grey.min.css @@ -1 +1 @@ -.tablesorter-grey{width:100%;margin:10px 0 15px;text-align:left;border-spacing:0;border-left:#555 1px solid}.tablesorter-grey th,.tablesorter-grey thead td{font:700 12px/18px Arial,Sans-serif;color:#c8c8c8;background-color:#3c3c3c;background-image:-moz-linear-gradient(top,#555,#3c3c3c);background-image:-ms-linear-gradient(top,#555,#3c3c3c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#555),to(#3c3c3c));background-image:-webkit-linear-gradient(top,#555,#3c3c3c);background-image:-o-linear-gradient(top,#555,#3c3c3c);background-image:linear-gradient(to bottom,#555,#3c3c3c);background-repeat:repeat-x;border-right:#555 1px solid;text-shadow:0 1px 0 rgba(128,128,128,.7);-webkit-box-shadow:inset 0 1px 0 #222;-moz-box-shadow:inset 0 1px 0 #222;box-shadow:inset 0 1px 0 #222;padding:4px}.tablesorter-grey .tablesorter-header-inner{position:relative;padding:4px 15px 4px 4px}.tablesorter-grey .header,.tablesorter-grey .tablesorter-header{cursor:pointer}.tablesorter-grey .header i,.tablesorter-grey .tablesorter-header i.tablesorter-icon{width:18px;height:10px;position:absolute;right:2px;top:50%;margin-top:-10px;background-image:url(data:image/gif;base64,R0lGODlhFQAJAIAAAP///////yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==);background-repeat:no-repeat;background-position:center right;padding:4px;white-space:normal}.tablesorter-grey th.headerSortDown,.tablesorter-grey th.headerSortUp,.tablesorter-grey th.tablesorter-headerSortDown,.tablesorter-grey th.tablesorter-headerSortUp{color:#ddd;background-color:#135185;background-image:-moz-linear-gradient(top,#195c93,#0e4776);background-image:-ms-linear-gradient(top,#195c93,#0e4776);background-image:-webkit-gradient(linear,0 0,0 100%,from(#195c93),to(#0e4776));background-image:-webkit-linear-gradient(top,#195c93,#0e4776);background-image:-o-linear-gradient(top,#195c93,#0e4776);background-image:linear-gradient(to bottom,#195c93,#0e4776)}.tablesorter-grey .headerSortUp i.tablesorter-icon,.tablesorter-grey .tablesorter-headerAsc i.tablesorter-icon,.tablesorter-grey .tablesorter-headerSortUp i.tablesorter-icon{background-image:url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7)}.tablesorter-grey .headerSortDown i.tablesorter-icon,.tablesorter-grey .tablesorter-headerDesc i.tablesorter-icon,.tablesorter-grey .tablesorter-headerSortDown i.tablesorter-icon{background-image:url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7)}.tablesorter-grey thead .sorter-false{cursor:default}.tablesorter-grey thead .sorter-false i.tablesorter-icon{display:none}.tablesorter-grey tbody td,.tablesorter-grey tfoot td,.tablesorter-grey tfoot th{padding:4px;vertical-align:top;border-right:#555 1px solid}.tablesorter-grey tfoot td,.tablesorter-grey tfoot th{padding:8px}.tablesorter-grey td{color:#eee;background-color:#6d6d6d;padding:4px;vertical-align:top}.tablesorter-grey tbody>tr.even.hover>td,.tablesorter-grey tbody>tr.even:hover+tr.tablesorter-childRow+tr.tablesorter-childRow>td,.tablesorter-grey tbody>tr.even:hover+tr.tablesorter-childRow>td,.tablesorter-grey tbody>tr.even:hover>td,.tablesorter-grey tbody>tr.hover>td,.tablesorter-grey tbody>tr:hover+tr.tablesorter-childRow+tr.tablesorter-childRow>td,.tablesorter-grey tbody>tr:hover+tr.tablesorter-childRow>td,.tablesorter-grey tbody>tr:hover>td{background-color:#134b78}.tablesorter-grey tbody>tr.odd.hover>td,.tablesorter-grey tbody>tr.odd:hover+tr.tablesorter-childRow+tr.tablesorter-childRow>td,.tablesorter-grey tbody>tr.odd:hover+tr.tablesorter-childRow>td,.tablesorter-grey tbody>tr.odd:hover>td{background-color:#134b78}.tablesorter-grey .tablesorter-processing{background-position:center center!important;background-repeat:no-repeat!important;background-image:url(data:image/gif;base64,R0lGODlhFAAUAKEAAO7u7lpaWgAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQBCgACACwAAAAAFAAUAAACQZRvoIDtu1wLQUAlqKTVxqwhXIiBnDg6Y4eyx4lKW5XK7wrLeK3vbq8J2W4T4e1nMhpWrZCTt3xKZ8kgsggdJmUFACH5BAEKAAIALAcAAAALAAcAAAIUVB6ii7jajgCAuUmtovxtXnmdUAAAIfkEAQoAAgAsDQACAAcACwAAAhRUIpmHy/3gUVQAQO9NetuugCFWAAAh+QQBCgACACwNAAcABwALAAACE5QVcZjKbVo6ck2AF95m5/6BSwEAIfkEAQoAAgAsBwANAAsABwAAAhOUH3kr6QaAcSrGWe1VQl+mMUIBACH5BAEKAAIALAIADQALAAcAAAIUlICmh7ncTAgqijkruDiv7n2YUAAAIfkEAQoAAgAsAAAHAAcACwAAAhQUIGmHyedehIoqFXLKfPOAaZdWAAAh+QQFCgACACwAAAIABwALAAACFJQFcJiXb15zLYRl7cla8OtlGGgUADs=)!important}.tablesorter-grey tbody tr.odd>td{background-color:#5e5e5e}.tablesorter-grey tbody tr.even>td{background-color:#6d6d6d}.tablesorter-grey td.primary,.tablesorter-grey tr.odd td.primary{color:#ddd;background-color:#165388}.tablesorter-grey tr.even td.primary{color:#ddd;background-color:#195c93}.tablesorter-grey td.secondary,.tablesorter-grey tr.odd td.secondary{color:#ddd;background-color:#185c9a}.tablesorter-grey tr.even td.secondary{color:#ddd;background-color:#1d67a5}.tablesorter-grey td.tertiary,.tablesorter-grey tr.odd td.tertiary{color:#ddd;background-color:#1b67ad}.tablesorter-grey tr.even td.tertiary{color:#ddd;background-color:#2073b7}caption{background-color:#fff}.tablesorter-grey .tablesorter-filter-row{background-color:#3c3c3c}.tablesorter-grey .tablesorter-filter-row td{background-color:#3c3c3c;line-height:normal;text-align:center;-webkit-transition:line-height .1s ease;-moz-transition:line-height .1s ease;-o-transition:line-height .1s ease;transition:line-height .1s ease}.tablesorter-grey .tablesorter-filter-row .disabled{opacity:.5;cursor:not-allowed}.tablesorter-grey .tablesorter-filter-row.hideme td{padding:2px;margin:0;line-height:0;cursor:pointer}.tablesorter-grey .tablesorter-filter-row.hideme *{height:1px;min-height:0;border:0;padding:0;margin:0;/* don't use visibility: hidden because it disables tabbing */opacity:0}.tablesorter-grey input.tablesorter-filter,.tablesorter-grey select.tablesorter-filter{width:98%;height:auto;margin:0;padding:4px;background-color:#6d6d6d;border:1px solid #555;color:#ddd;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:height .1s ease;-moz-transition:height .1s ease;-o-transition:height .1s ease;transition:height .1s ease}.tablesorter .filtered{display:none}.tablesorter .tablesorter-errorRow td{text-align:center;cursor:pointer;background-color:#e6bf99} \ No newline at end of file +.tablesorter-grey{width:100%;margin:10px 0 15px;text-align:left;border-spacing:0;border-left:#555 1px solid}.tablesorter-grey th,.tablesorter-grey thead td{font:bold 12px/18px Arial,Sans-serif;color:#c8c8c8;background-color:#3c3c3c;background-image:-moz-linear-gradient(top,#555,#3c3c3c);background-image:-ms-linear-gradient(top,#555,#3c3c3c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#555),to(#3c3c3c));background-image:-webkit-linear-gradient(top,#555,#3c3c3c);background-image:-o-linear-gradient(top,#555,#3c3c3c);background-image:linear-gradient(to bottom,#555,#3c3c3c);background-repeat:repeat-x;border-right:#555 1px solid;text-shadow:0 1px 0 rgba(128,128,128,.7);-webkit-box-shadow:inset 0 1px 0 #222;-moz-box-shadow:inset 0 1px 0 #222;box-shadow:inset 0 1px 0 #222;padding:4px}.tablesorter-grey .tablesorter-header-inner{position:relative;padding:4px 15px 4px 4px}.tablesorter-grey .header,.tablesorter-grey .tablesorter-header{cursor:pointer}.tablesorter-grey .header i,.tablesorter-grey .tablesorter-header i.tablesorter-icon{width:18px;height:10px;position:absolute;right:2px;top:50%;margin-top:-10px;background-image:url(data:image/gif;base64,R0lGODlhFQAJAIAAAP///////yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==);background-repeat:no-repeat;background-position:center right;padding:4px;white-space:normal}.tablesorter-grey th.headerSortDown,.tablesorter-grey th.headerSortUp,.tablesorter-grey th.tablesorter-headerSortDown,.tablesorter-grey th.tablesorter-headerSortUp{color:#ddd;background-color:#135185;background-image:-moz-linear-gradient(top,#195c93,#0e4776);background-image:-ms-linear-gradient(top,#195c93,#0e4776);background-image:-webkit-gradient(linear,0 0,0 100%,from(#195c93),to(#0e4776));background-image:-webkit-linear-gradient(top,#195c93,#0e4776);background-image:-o-linear-gradient(top,#195c93,#0e4776);background-image:linear-gradient(to bottom,#195c93,#0e4776)}.tablesorter-grey .headerSortUp i.tablesorter-icon,.tablesorter-grey .tablesorter-headerAsc i.tablesorter-icon,.tablesorter-grey .tablesorter-headerSortUp i.tablesorter-icon{background-image:url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7)}.tablesorter-grey .headerSortDown i.tablesorter-icon,.tablesorter-grey .tablesorter-headerDesc i.tablesorter-icon,.tablesorter-grey .tablesorter-headerSortDown i.tablesorter-icon{background-image:url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7)}.tablesorter-grey thead .sorter-false{cursor:default}.tablesorter-grey thead .sorter-false i.tablesorter-icon{display:none}.tablesorter-grey tbody td,.tablesorter-grey tfoot td,.tablesorter-grey tfoot th{padding:4px;vertical-align:top;border-right:#555 1px solid}.tablesorter-grey tfoot td,.tablesorter-grey tfoot th{padding:8px}.tablesorter-grey td{color:#eee;background-color:#6d6d6d;padding:4px;vertical-align:top}.tablesorter-grey tbody>tr.even.hover>td,.tablesorter-grey tbody>tr.even:hover+tr.tablesorter-childRow+tr.tablesorter-childRow>td,.tablesorter-grey tbody>tr.even:hover+tr.tablesorter-childRow>td,.tablesorter-grey tbody>tr.even:hover>td,.tablesorter-grey tbody>tr.hover>td,.tablesorter-grey tbody>tr:hover+tr.tablesorter-childRow+tr.tablesorter-childRow>td,.tablesorter-grey tbody>tr:hover+tr.tablesorter-childRow>td,.tablesorter-grey tbody>tr:hover>td{background-color:#134b78}.tablesorter-grey tbody>tr.odd.hover>td,.tablesorter-grey tbody>tr.odd:hover+tr.tablesorter-childRow+tr.tablesorter-childRow>td,.tablesorter-grey tbody>tr.odd:hover+tr.tablesorter-childRow>td,.tablesorter-grey tbody>tr.odd:hover>td{background-color:#134b78}.tablesorter-grey .tablesorter-processing{background-position:center center!important;background-repeat:no-repeat!important;background-image:url(data:image/gif;base64,R0lGODlhFAAUAKEAAO7u7lpaWgAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQBCgACACwAAAAAFAAUAAACQZRvoIDtu1wLQUAlqKTVxqwhXIiBnDg6Y4eyx4lKW5XK7wrLeK3vbq8J2W4T4e1nMhpWrZCTt3xKZ8kgsggdJmUFACH5BAEKAAIALAcAAAALAAcAAAIUVB6ii7jajgCAuUmtovxtXnmdUAAAIfkEAQoAAgAsDQACAAcACwAAAhRUIpmHy/3gUVQAQO9NetuugCFWAAAh+QQBCgACACwNAAcABwALAAACE5QVcZjKbVo6ck2AF95m5/6BSwEAIfkEAQoAAgAsBwANAAsABwAAAhOUH3kr6QaAcSrGWe1VQl+mMUIBACH5BAEKAAIALAIADQALAAcAAAIUlICmh7ncTAgqijkruDiv7n2YUAAAIfkEAQoAAgAsAAAHAAcACwAAAhQUIGmHyedehIoqFXLKfPOAaZdWAAAh+QQFCgACACwAAAIABwALAAACFJQFcJiXb15zLYRl7cla8OtlGGgUADs=)!important}.tablesorter-grey tbody tr.odd>td{background-color:#5e5e5e}.tablesorter-grey tbody tr.even>td{background-color:#6d6d6d}.tablesorter-grey td.primary,.tablesorter-grey tr.odd td.primary{color:#ddd;background-color:#165388}.tablesorter-grey tr.even td.primary{color:#ddd;background-color:#195c93}.tablesorter-grey td.secondary,.tablesorter-grey tr.odd td.secondary{color:#ddd;background-color:#185c9a}.tablesorter-grey tr.even td.secondary{color:#ddd;background-color:#1d67a5}.tablesorter-grey td.tertiary,.tablesorter-grey tr.odd td.tertiary{color:#ddd;background-color:#1b67ad}.tablesorter-grey tr.even td.tertiary{color:#ddd;background-color:#2073b7}caption{background-color:#fff}.tablesorter-grey .tablesorter-filter-row{background-color:#3c3c3c}.tablesorter-grey .tablesorter-filter-row td{background-color:#3c3c3c;line-height:normal;text-align:center;-webkit-transition:line-height .1s ease;-moz-transition:line-height .1s ease;-o-transition:line-height .1s ease;transition:line-height .1s ease}.tablesorter-grey .tablesorter-filter-row .disabled{opacity:.5;cursor:not-allowed}.tablesorter-grey .tablesorter-filter-row.hideme td{padding:2px;margin:0;line-height:0;cursor:pointer}.tablesorter-grey .tablesorter-filter-row.hideme *{height:1px;min-height:0;border:0;padding:0;margin:0;/* don't use visibility: hidden because it disables tabbing */opacity:0}.tablesorter-grey input.tablesorter-filter,.tablesorter-grey select.tablesorter-filter{width:98%;height:auto;margin:0;padding:4px;background-color:#6d6d6d;border:1px solid #555;color:#ddd;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:height .1s ease;-moz-transition:height .1s ease;-o-transition:height .1s ease;transition:height .1s ease}.tablesorter .filtered{display:none}.tablesorter .tablesorter-errorRow td{text-align:center;cursor:pointer;background-color:#e6bf99} \ No newline at end of file diff --git a/dist/js/extras/jquery.dragtable.mod.min.js b/dist/js/extras/jquery.dragtable.mod.min.js index c734b63b..a6641e21 100644 --- a/dist/js/extras/jquery.dragtable.mod.min.js +++ b/dist/js/extras/jquery.dragtable.mod.min.js @@ -1,3 +1,3 @@ /*! Dragtable Mod for TableSorter - updated 10/31/2015 (v2.24.0) */ -!function(a){"use strict";function b(){var b=a('');a(document.head).append(b),a(document.body).attr("onselectstart","return false;").attr("unselectable","on"),window.getSelection?window.getSelection().removeAllRanges():document.selection.empty()}function c(){a("#__dragtable_disable_text_selection__").remove(),e?a(document.body).attr("onselectstart",e):a(document.body).removeAttr("onselectstart"),f?a(document.body).attr("unselectable",f):a(document.body).removeAttr("unselectable")}var d=a.tablesorter;d.dragtable={create:function(b){var c,d=b.originalTable.el,e=b.options.dragHandle.replace(".","");d.children("thead").children().children("th,td").each(function(){var d=a(this);d.find(b.options.dragHandle+",."+e+"-disabled").length||(c=!b.options.dragaccept||d.hasClass(b.options.dragaccept.replace(".","")),d.wrapInner('
').prepend('
'))})},start:function(b){(b=a(b)[0])&&b.config&&(b.config.widgetOptions.dragtableLast={search:a(b).data("lastSearch"),order:d.dragtable.getOrder(b)})},update:function(b){var c,e,f,g=b.originalTable,h=g.el[0],i=a(h),j=h.config,k=j&&j.widgetOptions,l=g.startIndex-1,m=g.endIndex-1,n=d.dragtable.getOrder(h)||[],o=d.hasWidget(i,"filter")||!1,p=k&&k.dragtableLast||{},q=[];(p.order||[]).join("")!==n.join("")&&(j.sortList.length&&(e=a.extend(!0,[],j.sortList),a.each(n,function(a,b){f=d.isValueInArray(parseInt(b,10),e),b!==p.order[a]&&f>=0&&(j.sortList[f][0]=a)})),o&&a.each(p.search||[],function(a){q[a]=p.search[n[a]]}),c=!!d.hasWidget(j.$table,"editable")&&k.editable_columnsArray,c&&(j.widgetOptions.editable_columnsArray=d.dragtable.reindexArrayItem(c,l,m)),c=!!d.hasWidget(j.$table,"math")&&k.math_ignore,c&&(j.widgetOptions.math_ignore=d.dragtable.reindexArrayItem(c,l,m)),c=!!d.hasWidget(j.$table,"resizable")&&k.resizable_widths,c&&(k.resizable_widths=d.dragtable.moveArrayItem(c,l,m)),d.updateAll(j,!1,function(){o&&setTimeout(function(){j.lastCombinedFilter=null,j.$table.data("lastSearch",q),d.setFilters(i,q),a.isFunction(b.options.tablesorterComplete)&&b.options.tablesorterComplete(j.table)},10)}))},getOrder:function(b){return a(b).children("thead").children("."+d.css.headerRow).children().map(function(){return a(this).attr("data-column")}).get()||[]},startColumnMove:function(b){var c,d=b.el[0].config,e=b.startIndex-1,f=b.endIndex-1,g=d.columns-1,h=f!==g&&f<=e,i=d.$table.children().children("tr");d.debug&&console.log("Inserting column "+e+(h?" before":" after")+" column "+f),i.each(function(){c=a(this).children(),c.eq(e)[h?"insertBefore":"insertAfter"](c.eq(f))}),c=d.$table.children("colgroup").children(),c.eq(e)[h?"insertBefore":"insertAfter"](c.eq(f))},swapNodes:function(a,b){var c,d,e,f=a.length;for(c=0;c=e)for(d=c-e;1+d--;)a.push(void 0);return a.splice(c,0,a.splice(b,1)[0]),a},reindexArrayItem:function(b,c,d){var e=a.inArray(d,b),f=a.inArray(c,b),g=(Math.max.apply(Math,b),[]);return e>=0&&f>=0?b:(a.each(b,function(a,b){d=d?g.push(b+(bc&&(b===c?g.push(d):b=c?g.push(b-1):b<=d?g.push(b):b>c&&g.push(b+(b',s=[],t=m.eq(0).children("th, td").length;for(g=0;g"+(p?'':"")+"",m.each(function(a){s[g]+=""+u[a].outerHTML+""}),s[g]+="",u=n.children(":nth-child("+(g+1)+")"),d.options.maxMovingRows>1&&(u=u.add(n.children(":nth-child("+(g+1)+")").slice(0,d.options.maxMovingRows-1))),u.each(function(a){s[g]+=""+this.outerHTML+""}),s[g]+="",d.options.excludeFooter||(s[g]+=""+l.filter("tfoot").children("tr:visible").children()[g].outerHTML+""),s[g]+="
")}r+=s.join("")+"",this.sortableTable.el=this.originalTable.el.before(r).prev(),this.sortableTable.el.find("> li > table").each(function(b){a(this).css("width",j[b]+"px")}),this.sortableTable.selectedHandle=this.sortableTable.el.find("th .dragtable-handle-selected");var v=this.options.dragaccept?"li:has("+this.options.dragaccept+")":"li";this.sortableTable.el.sortable({items:v,stop:this._rearrangeTable(),revert:this.options.revert,tolerance:this.options.tolerance,containment:this.options.containment,cursor:this.options.cursor,cursorAt:this.options.cursorAt,distance:this.options.distance,axis:this.options.axis}),this.originalTable.startIndex=a(c.target).closest("th,td").prevAll().length+1,this.options.beforeMoving(this.originalTable,this.sortableTable),this.sortableTable.movingRow=this.sortableTable.el.children("li:nth-child("+this.originalTable.startIndex+")"),b(),this.sortableTable.movingRow.trigger(a.extend(a.Event(c.type),{which:1,clientX:c.clientX,clientY:c.clientY,pageX:c.pageX,pageY:c.pageY,screenX:c.screenX,screenY:c.screenY}));var w=this.sortableTable.el.find(".ui-sortable-placeholder");w.height()>0&&w.css("height",this.sortableTable.el.find(".ui-sortable-helper").height()),w.html('
')},bindTo:{},_create:function(){var b=this;b.originalTable={el:b.element,selectedHandle:a(),sortOrder:{},startIndex:0,endIndex:0},d.dragtable.create(b),b.bindTo="> thead > tr > "+(b.options.dragaccept||"th, td"),b.element.find(b.bindTo).find(b.options.dragHandle).length&&(b.bindTo+=" "+b.options.dragHandle),a.isFunction(b.options.restoreState)?b.options.restoreState(b.originalTable):b._restoreState(b.options.restoreState),b.originalTable.el.on("mousedown.dragtable",b.bindTo,function(c){1===c.which&&(d.dragtable.start(b.originalTable.el),!1!==b.options.beforeStart(b.originalTable)&&(clearTimeout(b.downTimer),b.downTimer=setTimeout(function(){b.originalTable.selectedHandle=a(b),b.originalTable.selectedHandle.addClass("dragtable-handle-selected"),b._generateSortable(c)},b.options.clickDelay)))}).on("mouseup.dragtable",b.options.dragHandle,function(){clearTimeout(b.downTimer)})},redraw:function(){this.destroy(),this._create()},destroy:function(){this.originalTable.el.off("mousedown.dragtable mouseup.dragtable",this.bindTo),a.Widget.prototype.destroy.apply(this,arguments)}});var e=a(document.body).attr("onselectstart"),f=a(document.body).attr("unselectable")}(jQuery); \ No newline at end of file +!function(e){"use strict";function t(){var t=e('');e(document.head).append(t),e(document.body).attr("onselectstart","return false;").attr("unselectable","on"),window.getSelection?window.getSelection().removeAllRanges():document.selection.empty()}function a(){e("#__dragtable_disable_text_selection__").remove(),i?e(document.body).attr("onselectstart",i):e(document.body).removeAttr("onselectstart"),n?e(document.body).attr("unselectable",n):e(document.body).removeAttr("unselectable")}var r=e.tablesorter;r.dragtable={create:function(t){var a,r=t.originalTable.el,i=t.options.dragHandle.replace(".","");r.children("thead").children().children("th,td").each(function(){var r=e(this);r.find(t.options.dragHandle+",."+i+"-disabled").length||(a=!t.options.dragaccept||r.hasClass(t.options.dragaccept.replace(".","")),r.wrapInner('
').prepend('
'))})},start:function(t){(t=e(t)[0])&&t.config&&(t.config.widgetOptions.dragtableLast={search:e(t).data("lastSearch"),order:r.dragtable.getOrder(t)})},update:function(t){var a,i,n,o=t.originalTable,l=o.el[0],s=e(l),d=l.config,c=d&&d.widgetOptions,h=o.startIndex-1,b=o.endIndex-1,u=r.dragtable.getOrder(l)||[],g=r.hasWidget(s,"filter")||!1,p=c&&c.dragtableLast||{},f=[];(p.order||[]).join("")!==u.join("")&&(d.sortList.length&&(i=e.extend(!0,[],d.sortList),e.each(u,function(e,t){n=r.isValueInArray(parseInt(t,10),i),t!==p.order[e]&&n>=0&&(d.sortList[n][0]=e)})),g&&e.each(p.search||[],function(e){f[e]=p.search[u[e]]}),(a=!!r.hasWidget(d.$table,"editable")&&c.editable_columnsArray)&&(d.widgetOptions.editable_columnsArray=r.dragtable.reindexArrayItem(a,h,b)),(a=!!r.hasWidget(d.$table,"math")&&c.math_ignore)&&(d.widgetOptions.math_ignore=r.dragtable.reindexArrayItem(a,h,b)),(a=!!r.hasWidget(d.$table,"resizable")&&c.resizable_widths)&&(c.resizable_widths=r.dragtable.moveArrayItem(a,h,b)),r.updateAll(d,!1,function(){g&&setTimeout(function(){d.lastCombinedFilter=null,d.$table.data("lastSearch",f),r.setFilters(s,f),e.isFunction(t.options.tablesorterComplete)&&t.options.tablesorterComplete(d.table)},10)}))},getOrder:function(t){return e(t).children("thead").children("."+r.css.headerRow).children().map(function(){return e(this).attr("data-column")}).get()||[]},startColumnMove:function(t){var a,r=t.el[0].config,i=t.startIndex-1,n=t.endIndex-1,o=r.columns-1,l=n!==o&&n<=i,s=r.$table.children().children("tr");r.debug&&console.log("Inserting column "+i+(l?" before":" after")+" column "+n),s.each(function(){(a=e(this).children()).eq(i)[l?"insertBefore":"insertAfter"](a.eq(n))}),(a=r.$table.children("colgroup").children()).eq(i)[l?"insertBefore":"insertAfter"](a.eq(n))},swapNodes:function(e,t){var a,r,i,n=e.length;for(a=0;a=i)for(r=a-i;1+r--;)e.push(void 0);return e.splice(a,0,e.splice(t,1)[0]),e},reindexArrayItem:function(t,a,r){var i=e.inArray(r,t),n=e.inArray(a,t),o=(Math.max.apply(Math,t),[]);return i>=0&&n>=0?t:(e.each(t,function(e,t){r=r?o.push(t+(ta&&(t===a?o.push(r):t=a?o.push(t-1):t<=r?o.push(t):t>a&&o.push(t+(t',v=[],T=b.eq(0).children("th, td").length;for(o=0;o"+(p?'':"")+"",b.each(function(e){v[o]+=""+y[e].outerHTML+""}),v[o]+="",y=u.children(":nth-child("+(o+1)+")"),r.options.maxMovingRows>1&&(y=y.add(u.children(":nth-child("+(o+1)+")").slice(0,r.options.maxMovingRows-1))),y.each(function(e){v[o]+=""+this.outerHTML+""}),v[o]+="",r.options.excludeFooter||(v[o]+=""+h.filter("tfoot").children("tr:visible").children()[o].outerHTML+""),v[o]+="
")}m+=v.join("")+"",this.sortableTable.el=this.originalTable.el.before(m).prev(),this.sortableTable.el.find("> li > table").each(function(t){e(this).css("width",d[t]+"px")}),this.sortableTable.selectedHandle=this.sortableTable.el.find("th .dragtable-handle-selected");var x=this.options.dragaccept?"li:has("+this.options.dragaccept+")":"li";this.sortableTable.el.sortable({items:x,stop:this._rearrangeTable(),revert:this.options.revert,tolerance:this.options.tolerance,containment:this.options.containment,cursor:this.options.cursor,cursorAt:this.options.cursorAt,distance:this.options.distance,axis:this.options.axis}),this.originalTable.startIndex=e(a.target).closest("th,td").prevAll().length+1,this.options.beforeMoving(this.originalTable,this.sortableTable),this.sortableTable.movingRow=this.sortableTable.el.children("li:nth-child("+this.originalTable.startIndex+")"),t(),this.sortableTable.movingRow.trigger(e.extend(e.Event(a.type),{which:1,clientX:a.clientX,clientY:a.clientY,pageX:a.pageX,pageY:a.pageY,screenX:a.screenX,screenY:a.screenY}));var w=this.sortableTable.el.find(".ui-sortable-placeholder");w.height()>0&&w.css("height",this.sortableTable.el.find(".ui-sortable-helper").height()),w.html('
')},bindTo:{},_create:function(){var t=this;t.originalTable={el:t.element,selectedHandle:e(),sortOrder:{},startIndex:0,endIndex:0},r.dragtable.create(t),t.bindTo="> thead > tr > "+(t.options.dragaccept||"th, td"),t.element.find(t.bindTo).find(t.options.dragHandle).length&&(t.bindTo+=" "+t.options.dragHandle),e.isFunction(t.options.restoreState)?t.options.restoreState(t.originalTable):t._restoreState(t.options.restoreState),t.originalTable.el.on("mousedown.dragtable",t.bindTo,function(a){1===a.which&&(r.dragtable.start(t.originalTable.el),!1!==t.options.beforeStart(t.originalTable)&&(clearTimeout(t.downTimer),t.downTimer=setTimeout(function(){t.originalTable.selectedHandle=e(t),t.originalTable.selectedHandle.addClass("dragtable-handle-selected"),t._generateSortable(a)},t.options.clickDelay)))}).on("mouseup.dragtable",t.options.dragHandle,function(){clearTimeout(t.downTimer)})},redraw:function(){this.destroy(),this._create()},destroy:function(){this.originalTable.el.off("mousedown.dragtable mouseup.dragtable",this.bindTo),e.Widget.prototype.destroy.apply(this,arguments)}});var i=e(document.body).attr("onselectstart"),n=e(document.body).attr("unselectable")}(jQuery); \ No newline at end of file diff --git a/dist/js/extras/jquery.metadata.min.js b/dist/js/extras/jquery.metadata.min.js index cf09c02b..935c0e2b 100644 --- a/dist/js/extras/jquery.metadata.min.js +++ b/dist/js/extras/jquery.metadata.min.js @@ -1 +1 @@ -!function($){$.extend({metadata:{defaults:{type:"class",name:"metadata",cre:/(\{.*\})/,single:"metadata"},setType:function(a,b){this.defaults.type=a,this.defaults.name=b},get:function(elem,opts){var data,m,e,attr,settings=$.extend({},this.defaults,opts);if(settings.single.length||(settings.single="metadata"),data=$.data(elem,settings.single))return data;if(data="{}","class"===settings.type)(m=settings.cre.exec(elem.className))&&(data=m[1]);else if("elem"===settings.type){if(!elem.getElementsByTagName)return;e=elem.getElementsByTagName(settings.name),e.length&&(data=$.trim(e[0].innerHTML))}else void 0!==elem.getAttribute&&(attr=elem.getAttribute(settings.name))&&(data=attr);return data.indexOf("{")<0&&(data="{"+data+"}"),data=eval("("+data+")"),$.data(elem,settings.single,data),data}}}),$.fn.metadata=function(a){return $.metadata.get(this[0],a)}}(jQuery); \ No newline at end of file +!function($){$.extend({metadata:{defaults:{type:"class",name:"metadata",cre:/(\{.*\})/,single:"metadata"},setType:function(t,e){this.defaults.type=t,this.defaults.name=e},get:function(elem,opts){var data,m,e,attr,settings=$.extend({},this.defaults,opts);if(settings.single.length||(settings.single="metadata"),data=$.data(elem,settings.single))return data;if(data="{}","class"===settings.type)(m=settings.cre.exec(elem.className))&&(data=m[1]);else if("elem"===settings.type){if(!elem.getElementsByTagName)return;e=elem.getElementsByTagName(settings.name),e.length&&(data=$.trim(e[0].innerHTML))}else void 0!==elem.getAttribute&&(attr=elem.getAttribute(settings.name))&&(data=attr);return data.indexOf("{")<0&&(data="{"+data+"}"),data=eval("("+data+")"),$.data(elem,settings.single,data),data}}}),$.fn.metadata=function(t){return $.metadata.get(this[0],t)}}(jQuery); \ No newline at end of file diff --git a/dist/js/extras/jquery.tablesorter.pager.min.js b/dist/js/extras/jquery.tablesorter.pager.min.js index eb158c42..fa0d4390 100644 --- a/dist/js/extras/jquery.tablesorter.pager.min.js +++ b/dist/js/extras/jquery.tablesorter.pager.min.js @@ -2,4 +2,4 @@ * tablesorter (FORK) pager plugin * updated 4/18/2017 (v2.28.8) */ -!function(a){"use strict";var b=a.tablesorter;a.extend({tablesorterPager:new function(){this.defaults={container:null,ajaxUrl:null,customAjaxUrl:function(a,b){return b},ajaxError:null,ajaxObject:{dataType:"json"},processAjaxOnInit:!0,ajaxProcessing:function(a){return[0,[],null]},output:"{startRow} to {endRow} of {totalRows} rows",updateArrows:!0,page:0,pageReset:0,size:10,maxOptionSize:20,savePages:!0,storageKey:"tablesorter-pager",fixedHeight:!1,countChildRows:!1,removeRows:!1,cssFirst:".first",cssPrev:".prev",cssNext:".next",cssLast:".last",cssGoto:".gotoPage",cssPageDisplay:".pagedisplay",cssPageSize:".pagesize",cssErrorRow:"tablesorter-errorRow",cssDisabled:"disabled",totalRows:0,totalPages:0,filteredRows:0,filteredPages:0,ajaxCounter:0,currentFilters:[],startRow:0,endRow:0,$size:null,last:{}};var c="filterInit filterStart filterEnd sortEnd disablePager enablePager destroyPager updateComplete pageSize pageSet pageAndSize pagerUpdate refreshComplete ",d=this,e=function(a,b,c){var d,e="addClass",f="removeClass",g=b.cssDisabled,h=!!c,i=h||0===b.page,j=t(a,b),k=h||b.page===j-1||0===j;b.updateArrows&&(d=b.$container.find(b.cssFirst+","+b.cssPrev),d[i?e:f](g),d.each(function(){this.ariaDisabled=i}),d=b.$container.find(b.cssNext+","+b.cssLast),d[k?e:f](g),d.each(function(){this.ariaDisabled=k}))},f=function(a,c){var d,e,f,g=a.config,h=g.$table.hasClass("hasFilters");if(h&&!c.ajax)if(b.isEmptyObject(g.cache))c.filteredRows=c.totalRows=g.$tbodies.eq(0).children("tr").not(c.countChildRows?"":"."+g.cssChildRow).length;else for(c.filteredRows=0,d=g.cache[0].normalized,f=d.length,e=0;e=0){if(k=w*d.page>d.filteredRows&&g,d.page=k?d.pageReset||0:d.page,d.startRow=k?w*d.page+1:0===d.filteredRows?0:w*d.page+1,d.endRow=Math.min(d.filteredRows,d.totalRows,w*(d.page+1)),l=d.$container.find(d.cssPageDisplay),"function"==typeof d.output?j=d.output(c,d):(q=l.attr("data-pager-output"+(d.filteredRows'):f.length>1&&g&&g[f[0]]?g[f[0]][f[1]]:d[e]||(g?g[e]:h)||h})),m=d.$container.find(d.cssGoto),m.length){for(k="",p=h(c,d),o=p.length,n=0;n'+p[n]+"";m.html(k).val(d.page+1)}l.length&&(l["INPUT"===l[0].nodeName?"val":"html"](j),l.find(".ts-startRow, .ts-page").unbind("change"+s).bind("change"+s,function(){var b=a(this).val(),c=a(this).hasClass("ts-startRow")?Math.floor(b/w)+1:b;r.$table.triggerHandler("pageSet"+s,[c])}))}e(c,d),i(c,d),d.initialized&&!1!==g&&(r.debug&&console.log("Pager: Triggering pagerComplete"),r.$table.triggerHandler("pagerComplete",d),d.savePages&&b.storage&&b.storage(c,d.storageKey,{page:d.page,size:w===d.totalRows?"all":w}))}},h=function(b,c){var d,e,f,g,h,i,j=t(b,c)||1,k=5*Math.ceil(j/c.maxOptionSize/5),l=j>c.maxOptionSize,m=c.page+1,n=k,o=j-k,p=[1],q=l?k:1;for(d=q;d<=j;)p[p.length]=d,d+=l?k:1;if(p[p.length]=j,l){for(f=[],e=Math.max(Math.floor(c.maxOptionSize/k)-1,5),n=m-e,n<1&&(n=1),o=m+e,o>j&&(o=j),d=n;d<=o;d++)f[f.length]=d;p=a.grep(p,function(b,c){return a.inArray(b,p)===c}),h=p.length,i=f.length,h-i>k/2&&h+i>c.maxOptionSize&&(g=Math.floor(h/2)-Math.floor(i/2),Array.prototype.splice.apply(p,[g,i])),p=p.concat(f)}return p=a.grep(p,function(b,c){return a.inArray(b,p)===c}).sort(function(a,b){return a-b})},i=function(b,c){var d,e,f=b.config,g=f.$tbodies.eq(0);g.find("tr.pagerSavedHeightSpacer").remove(),c.fixedHeight&&!c.isDisabled&&(e=a.data(b,"pagerSavedHeight"))&&(d=e-g.height())>5&&a.data(b,"pagerLastSize")===c.size&&g.children("tr:visible").length<("all"===c.size?c.totalRows:c.size)&&g.append('')},j=function(b,c){var d,e=b.config,f=e.$tbodies.eq(0);f.find("tr.pagerSavedHeightSpacer").remove(),f.children("tr:visible").length||f.append(' '),d=f.children("tr").eq(0).height()*("all"===c.size?c.totalRows:c.size),a.data(b,"pagerSavedHeight",d),i(b,c),a.data(b,"pagerLastSize",c.size)},k=function(a,c){if(!c.ajaxUrl){var d,e=0,f=a.config,g=f.$tbodies.eq(0).children("tr"),h=g.length,i="all"===c.size?c.totalRows:c.size,j=c.page*i,k=j+i,l=0,m=0;for(c.cacheIndex=[],d=0;d=j&&m=j&&m0&&g[e].className.match(b.css.cssHasChild))for(;++e> Ajax Error",f,h,i),b.showError(d,f,h,i),z.$tbodies.eq(0).children("tr").detach(),e.totalRows=0;else{if(a.isArray(D)?(l=isNaN(D[0])&&!isNaN(D[1]),w=D[l?1:0],e.totalRows=isNaN(w)?e.totalRows||0:w,z.totalRows=z.filteredRows=e.filteredRows=e.totalRows,t=0===e.totalRows?[]:D[l?0:1]||[],s=D[2]):(e.ajaxData=D,z.totalRows=e.totalRows=D.total,z.filteredRows=e.filteredRows=void 0!==D.filteredRows?D.filteredRows:D.total,s=D.headers,t=D.rows||[]),u=t&&t.length,t instanceof jQuery)e.processAjaxOnInit&&(z.$tbodies.eq(0).empty(),z.$tbodies.eq(0).append(t));else if(u){for(j=0;j",k=0;k"+t[j][k]+"";C+=""}e.processAjaxOnInit&&z.$tbodies.eq(0).html(C)}if(e.processAjaxOnInit=!0,s)for(m=A.hasClass("hasStickyHeaders"),o=m?z.widgetOptions.$sticky.children("thead:first").children("tr:not(."+z.cssIgnoreRow+")").children():"",n=A.find("tfoot tr:first").children(),p=z.$headers.filter("th "),x=p.length,k=0;k> No rows for pager to render"));if(e.page>=e.totalPages&&y(c,e),e.cacheIndex=[],e.isDisabled=!1,e.initialized&&(m.debug&&console.log("Pager: Triggering pagerChange"),l.triggerHandler("pagerChange",e)),e.removeRows){for(b.clearTableBody(c),f=b.processTbody(c,m.$tbodies.eq(0),!0),h=n?0:q,i=n?0:q,j=0;jq&&j<=p&&(j++,e.cacheIndex[e.cacheIndex.length]=h,f.append(d[h])),h++;b.processTbody(c,f,!1)}else k(c,e);g(c,e),c.isUpdating&&(m.debug&&console.log("Pager: Triggering updateComplete"),l.triggerHandler("updateComplete",[c,!0]))},q=function(c,d){var f,g,h;for(d.ajax?e(c,d,!0):(a.data(c,"pagerLastPage",d.page),a.data(c,"pagerLastSize",d.size),d.page=0,d.size=d.totalPages,d.totalPages=1,a(c).addClass("pagerDisabled").removeAttr("aria-describedby").find("tr.pagerSavedHeightSpacer").remove(),p(c,c.config.rowsCopy,d),d.isDisabled=!0,b.applyWidget(c),c.config.debug&&console.log("Pager: Disabled")),g=d.$container.find(d.cssGoto+","+d.cssPageSize+", .ts-startRow, .ts-page"),h=g.length,f=0;fc&&c>=0&&(b.page=c),b.page},v=function(a,b,c){var d=parseInt(b,10)||a.size||a.settings.size||10;return a.initialized&&(/all/i.test(d+" "+b)||d===a.totalRows)?a.$container.find(a.cssPageSize+' option[value="all"]').length?"all":a.totalRows:"get"===c?d:a.size},w=function(b,c,d){d.size=v(d,c,"get"),d.$container.find(d.cssPageSize).val(d.size),a.data(b,"pagerLastPage",u(b,d)),a.data(b,"pagerLastSize",d.size),d.totalPages="all"===d.size?1:Math.ceil(d.totalRows/d.size),d.filteredPages="all"===d.size?1:Math.ceil(d.filteredRows/d.size)},x=function(a,b){b.page=0,s(a,b)},y=function(a,b){b.page=t(a,b)-1,s(a,b)},z=function(a,b){b.page++;var c=t(a,b)-1;b.page>=c&&(b.page=c),s(a,b)},A=function(a,b){b.page--,b.page<=0&&(b.page=0),s(a,b)},B=function(c,d){d.initialized=!0,d.initializing=!1,c.config.debug&&console.log("Pager: Triggering pagerInitialized"),a(c).triggerHandler("pagerInitialized",d),b.applyWidget(c),g(c,d)},C=function(b,c){b.config.pager=a.extend(!0,{},a.tablesorterPager.defaults,c.settings),F(b,c.settings)},D=function(a,c){var d=a.config,e=d.namespace+"pager",f=[c.cssFirst,c.cssPrev,c.cssNext,c.cssLast,c.cssGoto,c.cssPageSize].join(",");q(a,c),c.$container.hide().find(f).unbind(e),d.appender=null,d.$table.unbind(e),b.storage&&b.storage(a,c.storageKey,""),delete d.pager,delete d.rowsCopy},E=function(c,d,e){var f,g,h,i=c.config;d.$container.find(d.cssGoto+","+d.cssPageSize+",.ts-startRow, .ts-page").removeClass(d.cssDisabled).removeAttr("disabled").each(function(){this.ariaDisabled=!1}),d.isDisabled=!1,d.page=a.data(c,"pagerLastPage")||d.page||0,h=d.$container.find(d.cssPageSize),g=h.find("option[selected]").val(),d.size=a.data(c,"pagerLastSize")||v(d,g,"get"),d.totalPages="all"===d.size?1:Math.ceil(t(c,d)/d.size),w(c,d.size,d),c.id&&!i.$table.attr("aria-describedby")&&(h=d.$container.find(d.cssPageDisplay),f=h.attr("id"),f||(f=c.id+"_pager_info",h.attr("id",f)),i.$table.attr("aria-describedby",f)),j(c,d),e&&(b.update(i),w(c,d.size,d),s(c,d),l(c,d),i.debug&&console.log("Pager: Enabled"))},F=function(e,f){var h,i,m,n,o=e.config,p=o.widgetOptions,t=o.pager=a.extend(!0,{},a.tablesorterPager.defaults,f),u=o.$table,B=o.namespace+"pager",F=t.$container=a(t.container).addClass("tablesorter-pager").show();t.settings=a.extend(!0,{},a.tablesorterPager.defaults,f),o.debug&&console.log("Pager: Initializing"),t.oldAjaxSuccess=t.oldAjaxSuccess||t.ajaxObject.success,o.appender=d.appender,t.initializing=!0,t.savePages&&b.storage&&(h=b.storage(e,t.storageKey)||{},t.page=isNaN(h.page)?t.page:h.page,t.size="all"===h.size?h.size:(isNaN(h.size)?t.size:h.size)||t.setSize||10,w(e,t.size,t)),t.regexRows=new RegExp("("+(p.filter_filteredRow||"filtered")+"|"+o.selectorRemove.slice(1)+"|"+o.cssChildRow+")"),t.regexFiltered=new RegExp(p.filter_filteredRow||"filtered"),u.unbind(c.split(" ").join(B+" ").replace(/\s+/g," ")).bind("filterInit filterStart ".split(" ").join(B+" "),function(c,d){t.currentFilters=a.isArray(d)?d:o.$table.data("lastSearch");var e;e=b.filter.equalFilters?b.filter.equalFilters(o,o.lastSearch,t.currentFilters):(o.lastSearch||[]).join("")!==(t.currentFilters||[]).join(""),"filterStart"!==c.type||!1===t.pageReset||e||(t.page=t.pageReset)}).bind("filterEnd sortEnd ".split(" ").join(B+" "),function(){t.currentFilters=o.$table.data("lastSearch"),(t.initialized||t.initializing)&&(o.delayInit&&o.rowsCopy&&0===o.rowsCopy.length&&r(e),g(e,t,!1),s(e,t,!1),b.applyWidget(e))}).bind("disablePager"+B,function(a){a.stopPropagation(),q(e,t)}).bind("enablePager"+B,function(a){a.stopPropagation(),E(e,t,!0)}).bind("destroyPager"+B,function(a){a.stopPropagation(),D(e,t)}).bind("resetToLoadState"+B,function(a){a.stopPropagation(),C(e,t)}).bind("updateComplete"+B,function(a,b,c){if(a.stopPropagation(),b&&!c&&!t.ajax){var d=o.$tbodies.eq(0).children("tr").not(o.selectorRemove);t.totalRows=d.length-(t.countChildRows?0:d.filter("."+o.cssChildRow).length),t.totalPages="all"===t.size?1:Math.ceil(t.totalRows/t.size),d.length&&o.rowsCopy&&0===o.rowsCopy.length&&r(b),t.page>=t.totalPages&&y(b,t),k(b,t),j(b,t),g(b,t,!0)}}).bind("pageSize refreshComplete ".split(" ").join(B+" "),function(a,b){a.stopPropagation(),w(e,v(t,b,"get"),t),s(e,t),k(e,t),g(e,t,!1)}).bind("pageSet pagerUpdate ".split(" ").join(B+" "),function(a,b){a.stopPropagation(),"pagerUpdate"===a.type&&(b=void 0===b?t.page+1:b,t.last.page=!0),t.page=(parseInt(b,10)||1)-1,s(e,t,!0),g(e,t,!1)}).bind("pageAndSize"+B,function(a,b,c){a.stopPropagation(),t.page=(parseInt(b,10)||1)-1,w(e,v(t,c,"get"),t),s(e,t,!0),k(e,t),g(e,t,!1)}),i=[t.cssFirst,t.cssPrev,t.cssNext,t.cssLast],m=[x,A,z,y],o.debug&&!F.length&&console.warn("Pager: >> Container not found"),F.find(i.join(",")).attr("tabindex",0).unbind("click"+B).bind("click"+B,function(b){b.stopPropagation();var c,d=a(this),f=i.length;if(!d.hasClass(t.cssDisabled))for(c=0;c> Goto selector not found"),n=F.find(t.cssPageSize),n.length?(n.find("option").removeAttr("selected"),n.unbind("change"+B).bind("change"+B,function(){if(!a(this).hasClass(t.cssDisabled)){var b=a(this).val();w(e,b,t),s(e,t),j(e,t)}return!1})):o.debug&&console.warn("Pager: >> Size selector not found"),t.initialized=!1,u.triggerHandler("pagerBeforeInitialized",t),E(e,t,!1),"string"==typeof t.ajaxUrl?(t.ajax=!0,o.widgetOptions.filter_serversideFiltering=!0,o.serverSideSorting=!0,s(e,t)):(t.ajax=!1,b.appendCache(o,!0),l(e,t)),t.ajax||t.initialized||(t.initializing=!1,t.initialized=!0,w(e,t.size,t),s(e,t),o.debug&&console.log("Pager: Triggering pagerInitialized"),o.$table.triggerHandler("pagerInitialized",t),o.widgetOptions.filter_initialized&&b.hasWidget(e,"filter")||g(e,t,!1)),o.widgetInit.pager=!0};d.appender=function(b,c){var d=b.config,e=d.pager;e.ajax||(d.rowsCopy=c,e.totalRows=e.countChildRows?d.$tbodies.eq(0).children("tr").length:c.length,e.size=a.data(b,"pagerLastSize")||e.size||e.settings.size||10,e.totalPages="all"===e.size?1:Math.ceil(e.totalRows/e.size),p(b,c,e),g(b,e,!1))},d.construct=function(a){return this.each(function(){this.config&&this.hasInitialized&&F(this,a)})}}}),b.showError=function(b,c,d,e){var f=a(b),g=f[0].config,h=g&&g.widgetOptions,i=g.pager&&g.pager.cssErrorRow||h&&h.pager_css&&h.pager_css.errorRow||"tablesorter-errorRow",j=typeof c,k=!0,l="",m=function(){g.$table.find("thead").find("."+i).remove()};if(!f.length)return void console.error("tablesorter showError: no table parameter passed");if("function"==typeof g.pager.ajaxError){if(!1===(k=g.pager.ajaxError(g,c,d,e)))return m();l=k}else if("function"==typeof h.pager_ajaxError){if(!1===(k=h.pager_ajaxError(g,c,d,e)))return m();l=k}if(""===l)if("object"===j)l=0===c.status?"Not connected, verify Network":404===c.status?"Requested page not found [404]":500===c.status?"Internal Server Error [500]":"parsererror"===e?"Requested JSON parse failed":"timeout"===e?"Time out error":"abort"===e?"Ajax Request aborted":"Uncaught error: "+c.statusText+" ["+c.status+"]";else{if("string"!==j)return m();l=c}a(/tr\>/.test(l)?l:''+l+"").click(function(){a(this).remove()}).appendTo(g.$table.find("thead:first")).addClass(i+" "+g.selectorRemove.slice(1)).attr({role:"alert","aria-live":"assertive"})},a.fn.extend({tablesorterPager:a.tablesorterPager.construct})}(jQuery); \ No newline at end of file +!function(e){"use strict";var t=e.tablesorter;e.extend({tablesorterPager:new function(){this.defaults={container:null,ajaxUrl:null,customAjaxUrl:function(e,t){return t},ajaxError:null,ajaxObject:{dataType:"json"},processAjaxOnInit:!0,ajaxProcessing:function(e){return[0,[],null]},output:"{startRow} to {endRow} of {totalRows} rows",updateArrows:!0,page:0,pageReset:0,size:10,maxOptionSize:20,savePages:!0,storageKey:"tablesorter-pager",fixedHeight:!1,countChildRows:!1,removeRows:!1,cssFirst:".first",cssPrev:".prev",cssNext:".next",cssLast:".last",cssGoto:".gotoPage",cssPageDisplay:".pagedisplay",cssPageSize:".pagesize",cssErrorRow:"tablesorter-errorRow",cssDisabled:"disabled",totalRows:0,totalPages:0,filteredRows:0,filteredPages:0,ajaxCounter:0,currentFilters:[],startRow:0,endRow:0,$size:null,last:{}};var a="filterInit filterStart filterEnd sortEnd disablePager enablePager destroyPager updateComplete pageSize pageSet pageAndSize pagerUpdate refreshComplete ",i=this,s=function(e,t,a){var i,s="addClass",r="removeClass",o=t.cssDisabled,n=!!a,l=n||0===t.page,g=z(e,t),c=n||t.page===g-1||0===g;t.updateArrows&&((i=t.$container.find(t.cssFirst+","+t.cssPrev))[l?s:r](o),i.each(function(){this.ariaDisabled=l}),(i=t.$container.find(t.cssNext+","+t.cssLast))[c?s:r](o),i.each(function(){this.ariaDisabled=c}))},r=function(e,a){var i,s,r,o=e.config,n=o.$table.hasClass("hasFilters");if(n&&!a.ajax)if(t.isEmptyObject(o.cache))a.filteredRows=a.totalRows=o.$tbodies.eq(0).children("tr").not(a.countChildRows?"":"."+o.cssChildRow).length;else for(a.filteredRows=0,r=(i=o.cache[0].normalized).length,s=0;s=0){if(c=P*i.page>i.filteredRows&&o,i.page=c?i.pageReset||0:i.page,i.startRow=c?P*i.page+1:0===i.filteredRows?0:P*i.page+1,i.endRow=Math.min(i.filteredRows,i.totalRows,P*(i.page+1)),d=i.$container.find(i.cssPageDisplay),"function"==typeof i.output?g=i.output(a,i):(w=d.attr("data-pager-output"+(i.filteredRows'):r.length>1&&o&&o[r[0]]?o[r[0]][r[1]]:i[s]||(o?o[s]:n)||n})),(p=i.$container.find(i.cssGoto)).length){for(c="",u=(h=n(a,i)).length,f=0;f'+h[f]+"";p.html(c).val(i.page+1)}d.length&&(d["INPUT"===d[0].nodeName?"val":"html"](g),d.find(".ts-startRow, .ts-page").unbind("change"+R).bind("change"+R,function(){var t=e(this).val(),a=e(this).hasClass("ts-startRow")?Math.floor(t/P)+1:t;b.$table.triggerHandler("pageSet"+R,[a])}))}s(a,i),l(a,i),i.initialized&&!1!==o&&(b.debug&&console.log("Pager: Triggering pagerComplete"),b.$table.triggerHandler("pagerComplete",i),i.savePages&&t.storage&&t.storage(a,i.storageKey,{page:i.page,size:P===i.totalRows?"all":P}))}},n=function(t,a){var i,s,r,o,n,l,g=z(t,a)||1,c=5*Math.ceil(g/a.maxOptionSize/5),d=g>a.maxOptionSize,p=a.page+1,f=c,u=g-c,h=[1];for(i=d?c:1;i<=g;)h[h.length]=i,i+=d?c:1;if(h[h.length]=g,d){for(r=[],(f=p-(s=Math.max(Math.floor(a.maxOptionSize/c)-1,5)))<1&&(f=1),(u=p+s)>g&&(u=g),i=f;i<=u;i++)r[r.length]=i;(n=(h=e.grep(h,function(t,a){return e.inArray(t,h)===a})).length)-(l=r.length)>c/2&&n+l>a.maxOptionSize&&(o=Math.floor(n/2)-Math.floor(l/2),Array.prototype.splice.apply(h,[o,l])),h=h.concat(r)}return h=e.grep(h,function(t,a){return e.inArray(t,h)===a}).sort(function(e,t){return e-t})},l=function(t,a){var i,s,r=t.config,o=r.$tbodies.eq(0);o.find("tr.pagerSavedHeightSpacer").remove(),a.fixedHeight&&!a.isDisabled&&(s=e.data(t,"pagerSavedHeight"))&&(i=s-o.height())>5&&e.data(t,"pagerLastSize")===a.size&&o.children("tr:visible").length<("all"===a.size?a.totalRows:a.size)&&o.append('')},g=function(t,a){var i,s=t.config,r=s.$tbodies.eq(0);r.find("tr.pagerSavedHeightSpacer").remove(),r.children("tr:visible").length||r.append(' '),i=r.children("tr").eq(0).height()*("all"===a.size?a.totalRows:a.size),e.data(t,"pagerSavedHeight",i),l(t,a),e.data(t,"pagerLastSize",a.size)},c=function(e,a){if(!a.ajaxUrl){var i,s=0,r=e.config,o=r.$tbodies.eq(0).children("tr"),n=o.length,l="all"===a.size?a.totalRows:a.size,g=a.page*l,c=g+l,d=0,p=0;for(a.cacheIndex=[],i=0;i=g&&p=g&&p0&&o[s].className.match(t.css.cssHasChild))for(;++s> Ajax Error",r,n,l),t.showError(i,r,n,l),y.$tbodies.eq(0).children("tr").detach(),s.totalRows=0;else{if(e.isArray(I)?(P=I[(d=isNaN(I[0])&&!isNaN(I[1]))?1:0],s.totalRows=isNaN(P)?s.totalRows||0:P,y.totalRows=y.filteredRows=s.filteredRows=s.totalRows,z=0===s.totalRows?[]:I[d?0:1]||[],R=I[2]):(s.ajaxData=I,y.totalRows=s.totalRows=I.total,y.filteredRows=s.filteredRows=void 0!==I.filteredRows?I.filteredRows:I.total,R=I.headers,z=I.rows||[]),x=z&&z.length,z instanceof jQuery)s.processAjaxOnInit&&(y.$tbodies.eq(0).empty(),y.$tbodies.eq(0).append(z));else if(x){for(g=0;g",c=0;c"+z[g][c]+"";$+=""}s.processAjaxOnInit&&y.$tbodies.eq(0).html($)}if(s.processAjaxOnInit=!0,R)for(u=(p=C.hasClass("hasStickyHeaders"))?y.widgetOptions.$sticky.children("thead:first").children("tr:not(."+y.cssIgnoreRow+")").children():"",f=C.find("tfoot tr:first").children(),v=(h=y.$headers.filter("th ")).length,c=0;c> No rows for pager to render"));if(s.page>=s.totalPages&&m(a,s),s.cacheIndex=[],s.isDisabled=!1,s.initialized&&(p.debug&&console.log("Pager: Triggering pagerChange"),d.triggerHandler("pagerChange",s)),s.removeRows){for(t.clearTableBody(a),r=t.processTbody(a,p.$tbodies.eq(0),!0),n=f?0:w,l=f?0:w,g=0;gw&&g<=h&&(g++,s.cacheIndex[s.cacheIndex.length]=n,r.append(i[n])),n++;t.processTbody(a,r,!1)}else c(a,s);o(a,s),a.isUpdating&&(p.debug&&console.log("Pager: Triggering updateComplete"),d.triggerHandler("updateComplete",[a,!0]))},w=function(a,i){var r,o,n;for(i.ajax?s(a,i,!0):(e.data(a,"pagerLastPage",i.page),e.data(a,"pagerLastSize",i.size),i.page=0,i.size=i.totalPages,i.totalPages=1,e(a).addClass("pagerDisabled").removeAttr("aria-describedby").find("tr.pagerSavedHeightSpacer").remove(),h(a,a.config.rowsCopy,i),i.isDisabled=!0,t.applyWidget(a),a.config.debug&&console.log("Pager: Disabled")),n=(o=i.$container.find(i.cssGoto+","+i.cssPageSize+", .ts-startRow, .ts-page")).length,r=0;ra&&a>=0&&(t.page=a),t.page},j=function(e,t,a){var i=parseInt(t,10)||e.size||e.settings.size||10;return e.initialized&&(/all/i.test(i+" "+t)||i===e.totalRows)?e.$container.find(e.cssPageSize+' option[value="all"]').length?"all":e.totalRows:"get"===a?i:e.size},P=function(t,a,i){i.size=j(i,a,"get"),i.$container.find(i.cssPageSize).val(i.size),e.data(t,"pagerLastPage",x(t,i)),e.data(t,"pagerLastSize",i.size),i.totalPages="all"===i.size?1:Math.ceil(i.totalRows/i.size),i.filteredPages="all"===i.size?1:Math.ceil(i.filteredRows/i.size)},v=function(e,t){t.page=0,R(e,t)},m=function(e,t){t.page=z(e,t)-1,R(e,t)},y=function(e,t){t.page++;var a=z(e,t)-1;t.page>=a&&(t.page=a),R(e,t)},C=function(e,t){--t.page<=0&&(t.page=0),R(e,t)},S=function(a,i){i.initialized=!0,i.initializing=!1,a.config.debug&&console.log("Pager: Triggering pagerInitialized"),e(a).triggerHandler("pagerInitialized",i),t.applyWidget(a),o(a,i)},$=function(t,a){t.config.pager=e.extend(!0,{},e.tablesorterPager.defaults,a.settings),F(t,a.settings)},I=function(e,a){var i=e.config,s=i.namespace+"pager",r=[a.cssFirst,a.cssPrev,a.cssNext,a.cssLast,a.cssGoto,a.cssPageSize].join(",");w(e,a),a.$container.hide().find(r).unbind(s),i.appender=null,i.$table.unbind(s),t.storage&&t.storage(e,a.storageKey,""),delete i.pager,delete i.rowsCopy},A=function(a,i,s){var r,o,n,l=a.config;i.$container.find(i.cssGoto+","+i.cssPageSize+",.ts-startRow, .ts-page").removeClass(i.cssDisabled).removeAttr("disabled").each(function(){this.ariaDisabled=!1}),i.isDisabled=!1,i.page=e.data(a,"pagerLastPage")||i.page||0,o=(n=i.$container.find(i.cssPageSize)).find("option[selected]").val(),i.size=e.data(a,"pagerLastSize")||j(i,o,"get"),i.totalPages="all"===i.size?1:Math.ceil(z(a,i)/i.size),P(a,i.size,i),a.id&&!l.$table.attr("aria-describedby")&&((r=(n=i.$container.find(i.cssPageDisplay)).attr("id"))||(r=a.id+"_pager_info",n.attr("id",r)),l.$table.attr("aria-describedby",r)),g(a,i),s&&(t.update(l),P(a,i.size,i),R(a,i),d(a,i),l.debug&&console.log("Pager: Enabled"))},F=function(s,r){var n,l,p,f,u=s.config,h=u.widgetOptions,z=u.pager=e.extend(!0,{},e.tablesorterPager.defaults,r),x=u.$table,S=u.namespace+"pager",F=z.$container=e(z.container).addClass("tablesorter-pager").show();z.settings=e.extend(!0,{},e.tablesorterPager.defaults,r),u.debug&&console.log("Pager: Initializing"),z.oldAjaxSuccess=z.oldAjaxSuccess||z.ajaxObject.success,u.appender=i.appender,z.initializing=!0,z.savePages&&t.storage&&(n=t.storage(s,z.storageKey)||{},z.page=isNaN(n.page)?z.page:n.page,z.size="all"===n.size?n.size:(isNaN(n.size)?z.size:n.size)||z.setSize||10,P(s,z.size,z)),z.regexRows=new RegExp("("+(h.filter_filteredRow||"filtered")+"|"+u.selectorRemove.slice(1)+"|"+u.cssChildRow+")"),z.regexFiltered=new RegExp(h.filter_filteredRow||"filtered"),x.unbind(a.split(" ").join(S+" ").replace(/\s+/g," ")).bind("filterInit filterStart ".split(" ").join(S+" "),function(a,i){z.currentFilters=e.isArray(i)?i:u.$table.data("lastSearch");var s;s=t.filter.equalFilters?t.filter.equalFilters(u,u.lastSearch,z.currentFilters):(u.lastSearch||[]).join("")!==(z.currentFilters||[]).join(""),"filterStart"!==a.type||!1===z.pageReset||s||(z.page=z.pageReset)}).bind("filterEnd sortEnd ".split(" ").join(S+" "),function(){z.currentFilters=u.$table.data("lastSearch"),(z.initialized||z.initializing)&&(u.delayInit&&u.rowsCopy&&0===u.rowsCopy.length&&b(s),o(s,z,!1),R(s,z,!1),t.applyWidget(s))}).bind("disablePager"+S,function(e){e.stopPropagation(),w(s,z)}).bind("enablePager"+S,function(e){e.stopPropagation(),A(s,z,!0)}).bind("destroyPager"+S,function(e){e.stopPropagation(),I(s,z)}).bind("resetToLoadState"+S,function(e){e.stopPropagation(),$(s,z)}).bind("updateComplete"+S,function(e,t,a){if(e.stopPropagation(),t&&!a&&!z.ajax){var i=u.$tbodies.eq(0).children("tr").not(u.selectorRemove);z.totalRows=i.length-(z.countChildRows?0:i.filter("."+u.cssChildRow).length),z.totalPages="all"===z.size?1:Math.ceil(z.totalRows/z.size),i.length&&u.rowsCopy&&0===u.rowsCopy.length&&b(t),z.page>=z.totalPages&&m(t,z),c(t,z),g(t,z),o(t,z,!0)}}).bind("pageSize refreshComplete ".split(" ").join(S+" "),function(e,t){e.stopPropagation(),P(s,j(z,t,"get"),z),R(s,z),c(s,z),o(s,z,!1)}).bind("pageSet pagerUpdate ".split(" ").join(S+" "),function(e,t){e.stopPropagation(),"pagerUpdate"===e.type&&(t=void 0===t?z.page+1:t,z.last.page=!0),z.page=(parseInt(t,10)||1)-1,R(s,z,!0),o(s,z,!1)}).bind("pageAndSize"+S,function(e,t,a){e.stopPropagation(),z.page=(parseInt(t,10)||1)-1,P(s,j(z,a,"get"),z),R(s,z,!0),c(s,z),o(s,z,!1)}),l=[z.cssFirst,z.cssPrev,z.cssNext,z.cssLast],p=[v,C,y,m],u.debug&&!F.length&&console.warn("Pager: >> Container not found"),F.find(l.join(",")).attr("tabindex",0).unbind("click"+S).bind("click"+S,function(t){t.stopPropagation();var a,i=e(this),r=l.length;if(!i.hasClass(z.cssDisabled))for(a=0;a> Goto selector not found"),(f=F.find(z.cssPageSize)).length?(f.find("option").removeAttr("selected"),f.unbind("change"+S).bind("change"+S,function(){if(!e(this).hasClass(z.cssDisabled)){var t=e(this).val();P(s,t,z),R(s,z),g(s,z)}return!1})):u.debug&&console.warn("Pager: >> Size selector not found"),z.initialized=!1,x.triggerHandler("pagerBeforeInitialized",z),A(s,z,!1),"string"==typeof z.ajaxUrl?(z.ajax=!0,u.widgetOptions.filter_serversideFiltering=!0,u.serverSideSorting=!0,R(s,z)):(z.ajax=!1,t.appendCache(u,!0),d(s,z)),z.ajax||z.initialized||(z.initializing=!1,z.initialized=!0,P(s,z.size,z),R(s,z),u.debug&&console.log("Pager: Triggering pagerInitialized"),u.$table.triggerHandler("pagerInitialized",z),u.widgetOptions.filter_initialized&&t.hasWidget(s,"filter")||o(s,z,!1)),u.widgetInit.pager=!0};i.appender=function(t,a){var i=t.config,s=i.pager;s.ajax||(i.rowsCopy=a,s.totalRows=s.countChildRows?i.$tbodies.eq(0).children("tr").length:a.length,s.size=e.data(t,"pagerLastSize")||s.size||s.settings.size||10,s.totalPages="all"===s.size?1:Math.ceil(s.totalRows/s.size),h(t,a,s),o(t,s,!1))},i.construct=function(e){return this.each(function(){this.config&&this.hasInitialized&&F(this,e)})}}}),t.showError=function(t,a,i,s){var r=e(t),o=r[0].config,n=o&&o.widgetOptions,l=o.pager&&o.pager.cssErrorRow||n&&n.pager_css&&n.pager_css.errorRow||"tablesorter-errorRow",g=typeof a,c=!0,d="",p=function(){o.$table.find("thead").find("."+l).remove()};if(!r.length)return void console.error("tablesorter showError: no table parameter passed");if("function"==typeof o.pager.ajaxError){if(!1===(c=o.pager.ajaxError(o,a,i,s)))return p();d=c}else if("function"==typeof n.pager_ajaxError){if(!1===(c=n.pager_ajaxError(o,a,i,s)))return p();d=c}if(""===d)if("object"===g)d=0===a.status?"Not connected, verify Network":404===a.status?"Requested page not found [404]":500===a.status?"Internal Server Error [500]":"parsererror"===s?"Requested JSON parse failed":"timeout"===s?"Time out error":"abort"===s?"Ajax Request aborted":"Uncaught error: "+a.statusText+" ["+a.status+"]";else{if("string"!==g)return p();d=a}e(/tr\>/.test(d)?d:''+d+"").click(function(){e(this).remove()}).appendTo(o.$table.find("thead:first")).addClass(l+" "+o.selectorRemove.slice(1)).attr({role:"alert","aria-live":"assertive"})},e.fn.extend({tablesorterPager:e.tablesorterPager.construct})}(jQuery); \ No newline at end of file diff --git a/dist/js/extras/semver-mod.min.js b/dist/js/extras/semver-mod.min.js index 51ff7100..9ce8c545 100644 --- a/dist/js/extras/semver-mod.min.js +++ b/dist/js/extras/semver-mod.min.js @@ -1,2 +1,2 @@ /*! Modified semver.js for node.js (v4.3.3, 3/27/2015) */ -!function(){function a(a,b){if(a instanceof d)return a;if("string"!=typeof a)return null;if(a.length>U)return null;if(!(b?W[la]:W[ia]).test(a))return null;try{return new d(a,b)}catch(a){return null}}function b(b,c){var d=a(b,c);return d?d.version:null}function c(b,c){var d=a(b.trim().replace(/^[=v]+/,""),c);return d?d.version:null}function d(a,b){if(a instanceof d){if(a.loose===b)return a;a=a.version}else if("string"!=typeof a)throw new TypeError("Invalid Version: "+a);if(a.length>U)throw new TypeError("version is longer than "+U+" characters");if(!(this instanceof d))return new d(a,b);R("SemVer",a,b),this.loose=b;var c=a.trim().match(b?W[la]:W[ia]);if(!c)throw new TypeError("Invalid Version: "+a);if(this.raw=a,this.major=+c[1],this.minor=+c[2],this.patch=+c[3],this.major>V||this.major<0)throw new TypeError("Invalid major version");if(this.minor>V||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>V||this.patch<0)throw new TypeError("Invalid patch version");c[4]?this.prerelease=c[4].split(".").map(function(a){if(/^[0-9]+$/.test(a)){var b=+a;if(b>=0&&bb?1:0}function h(a,b){return g(b,a)}function i(a,b){return new d(a,b).major}function j(a,b){return new d(a,b).minor}function k(a,b){return new d(a,b).patch}function l(a,b,c){return new d(a,c).compare(b)}function m(a,b){return l(a,b,!0)}function n(a,b,c){return l(b,a,c)}function o(a,b){return a.sort(function(a,c){return T.compare(a,c,b)})}function p(a,b){return a.sort(function(a,c){return T.rcompare(a,c,b)})}function q(a,b,c){return l(a,b,c)>0}function r(a,b,c){return l(a,b,c)<0}function s(a,b,c){return 0===l(a,b,c)}function t(a,b,c){return 0!==l(a,b,c)}function u(a,b,c){return l(a,b,c)>=0}function v(a,b,c){return l(a,b,c)<=0}function w(a,b,c,d){var e;switch(b){case"===":"object"==typeof a&&(a=a.version),"object"==typeof c&&(c=c.version),e=a===c;break;case"!==":"object"==typeof a&&(a=a.version),"object"==typeof c&&(c=c.version),e=a!==c;break;case"":case"=":case"==":e=s(a,c,d);break;case"!=":e=t(a,c,d);break;case">":e=q(a,c,d);break;case">=":e=u(a,c,d);break;case"<":e=r(a,c,d);break;case"<=":e=v(a,c,d);break;default:throw new TypeError("Invalid operator: "+b)}return e}function x(a,b){if(a instanceof x){if(a.loose===b)return a;a=a.value}if(!(this instanceof x))return new x(a,b);R("comparator",a,b),this.loose=b,this.parse(a),this.semver===Ja?this.value="":this.value=this.operator+this.semver.version,R("comp",this)}function y(a,b){if(a instanceof y&&a.loose===b)return a;if(!(this instanceof y))return new y(a,b);if(this.loose=b,this.raw=a,this.set=a.split(/\s*\|\|\s*/).map(function(a){return this.parseRange(a.trim())},this).filter(function(a){return a.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+a);this.format()}function z(a,b){return new y(a,b).set.map(function(a){return a.map(function(a){return a.value}).join(" ").trim().split(" ")})}function A(a,b){return R("comp",a),a=E(a,b),R("caret",a),a=C(a,b),R("tildes",a),a=G(a,b),R("xrange",a),a=I(a,b),R("stars",a),a}function B(a){return!a||"x"===a.toLowerCase()||"*"===a}function C(a,b){return a.trim().split(/\s+/).map(function(a){return D(a,b)}).join(" ")}function D(a,b){var c=b?W[wa]:W[va];return a.replace(c,function(b,c,d,e,f){R("tilde",a,b,c,d,e,f);var g;return B(c)?g="":B(d)?g=">="+c+".0.0 <"+(+c+1)+".0.0":B(e)?g=">="+c+"."+d+".0 <"+c+"."+(+d+1)+".0":f?(R("replaceTilde pr",f),"-"!==f.charAt(0)&&(f="-"+f),g=">="+c+"."+d+"."+e+f+" <"+c+"."+(+d+1)+".0"):g=">="+c+"."+d+"."+e+" <"+c+"."+(+d+1)+".0",R("tilde return",g),g})}function E(a,b){return a.trim().split(/\s+/).map(function(a){return F(a,b)}).join(" ")}function F(a,b){R("caret",a,b);var c=b?W[Aa]:W[za];return a.replace(c,function(b,c,d,e,f){R("caret",a,b,c,d,e,f);var g;return B(c)?g="":B(d)?g=">="+c+".0.0 <"+(+c+1)+".0.0":B(e)?g="0"===c?">="+c+"."+d+".0 <"+c+"."+(+d+1)+".0":">="+c+"."+d+".0 <"+(+c+1)+".0.0":f?(R("replaceCaret pr",f),"-"!==f.charAt(0)&&(f="-"+f),g="0"===c?"0"===d?">="+c+"."+d+"."+e+f+" <"+c+"."+d+"."+(+e+1):">="+c+"."+d+"."+e+f+" <"+c+"."+(+d+1)+".0":">="+c+"."+d+"."+e+f+" <"+(+c+1)+".0.0"):(R("no pr"),g="0"===c?"0"===d?">="+c+"."+d+"."+e+" <"+c+"."+d+"."+(+e+1):">="+c+"."+d+"."+e+" <"+c+"."+(+d+1)+".0":">="+c+"."+d+"."+e+" <"+(+c+1)+".0.0"),R("caret return",g),g})}function G(a,b){return R("replaceXRanges",a,b),a.split(/\s+/).map(function(a){return H(a,b)}).join(" ")}function H(a,b){a=a.trim();var c=b?W[sa]:W[ra];return a.replace(c,function(b,c,d,e,f,g){R("xRange",a,b,c,d,e,f,g);var h=B(d),i=h||B(e),j=i||B(f),k=j;return"="===c&&k&&(c=""),h?b=">"===c||"<"===c?"<0.0.0":"*":c&&k?(i&&(e=0),j&&(f=0),">"===c?(c=">=",i?(d=+d+1,e=0,f=0):j&&(e=+e+1,f=0)):"<="===c&&(c="<",i?d=+d+1:e=+e+1),b=c+d+"."+e+"."+f):i?b=">="+d+".0.0 <"+(+d+1)+".0.0":j&&(b=">="+d+"."+e+".0 <"+d+"."+(+e+1)+".0"),R("xRange return",b),b})}function I(a,b){return R("replaceStars",a,b),a.trim().replace(W[Ga],"")}function J(a,b,c,d,e,f,g,h,i,j,k,l,m){return b=B(c)?"":B(d)?">="+c+".0.0":B(e)?">="+c+"."+d+".0":">="+b,h=B(i)?"":B(j)?"<"+(+i+1)+".0.0":B(k)?"<"+i+"."+(+j+1)+".0":l?"<="+i+"."+j+"."+k+"-"+l:"<="+h,(b+" "+h).trim()}function K(a,b){for(var c=0;c0){var d=a[c].semver;if(d.major===b.major&&d.minor===b.minor&&d.patch===b.patch)return!0}}return!1}return!0}function L(a,b,c){try{b=new y(b,c)}catch(a){return!1}return b.test(a)}function M(a,b,c){return a.filter(function(a){return L(a,b,c)}).sort(function(a,b){return n(a,b,c)})[0]||null}function N(a,b){try{return new y(a,b).range||"*"}catch(a){return null}}function O(a,b,c){return Q(a,b,"<",c)}function P(a,b,c){return Q(a,b,">",c)}function Q(a,b,c,e){a=new d(a,e),b=new y(b,e);var f,g,h,i,j;switch(c){case">":f=q,g=v,h=r,i=">",j=">=";break;case"<":f=r,g=u,h=q,i="<",j="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(L(a,b,e))return!1;for(var k=0;k)?=?)";var na=Y++;X[na]=X[$]+"|x|X|\\*";var oa=Y++;X[oa]=X[Z]+"|x|X|\\*";var pa=Y++;X[pa]="[v=\\s]*("+X[oa]+")(?:\\.("+X[oa]+")(?:\\.("+X[oa]+")(?:"+X[ea]+")?"+X[ha]+"?)?)?";var qa=Y++;X[qa]="[v=\\s]*("+X[na]+")(?:\\.("+X[na]+")(?:\\.("+X[na]+")(?:"+X[fa]+")?"+X[ha]+"?)?)?";var ra=Y++;X[ra]="^"+X[ma]+"\\s*"+X[pa]+"$";var sa=Y++;X[sa]="^"+X[ma]+"\\s*"+X[qa]+"$";var ta=Y++;X[ta]="(?:~>?)";var ua=Y++;X[ua]="(\\s*)"+X[ta]+"\\s+",W[ua]=new RegExp(X[ua],"g");var va=Y++;X[va]="^"+X[ta]+X[pa]+"$";var wa=Y++;X[wa]="^"+X[ta]+X[qa]+"$";var xa=Y++;X[xa]="(?:\\^)";var ya=Y++;X[ya]="(\\s*)"+X[xa]+"\\s+",W[ya]=new RegExp(X[ya],"g");var za=Y++;X[za]="^"+X[xa]+X[pa]+"$";var Aa=Y++;X[Aa]="^"+X[xa]+X[qa]+"$";var Ba=Y++;X[Ba]="^"+X[ma]+"\\s*("+ka+")$|^$";var Ca=Y++;X[Ca]="^"+X[ma]+"\\s*("+ja+")$|^$";var Da=Y++;X[Da]="(\\s*)"+X[ma]+"\\s*("+ka+"|"+X[pa]+")",W[Da]=new RegExp(X[Da],"g");var Ea=Y++;X[Ea]="^\\s*("+X[pa]+")\\s+-\\s+("+X[pa]+")\\s*$";var Fa=Y++;X[Fa]="^\\s*("+X[qa]+")\\s+-\\s+("+X[qa]+")\\s*$";var Ga=Y++;X[Ga]="(<|>)?=?\\s*\\*";for(var Ha=0;Ha'},d.prototype.toString=function(){return this.version},d.prototype.compare=function(a){return R("SemVer.compare",this.version,this.loose,a),a instanceof d||(a=new d(a,this.loose)),this.compareMain(a)||this.comparePre(a)},d.prototype.compareMain=function(a){return a instanceof d||(a=new d(a,this.loose)),g(this.major,a.major)||g(this.minor,a.minor)||g(this.patch,a.patch)},d.prototype.comparePre=function(a){if(a instanceof d||(a=new d(a,this.loose)),this.prerelease.length&&!a.prerelease.length)return-1;if(!this.prerelease.length&&a.prerelease.length)return 1;if(!this.prerelease.length&&!a.prerelease.length)return 0;var b=0;do{var c=this.prerelease[b],e=a.prerelease[b];if(R("prerelease compare",b,c,e),void 0===c&&void 0===e)return 0;if(void 0===e)return 1;if(void 0===c)return-1;if(c!==e)return g(c,e)}while(++b)},d.prototype.inc=function(a,b){switch(a){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",b);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",b);break;case"prepatch":this.prerelease.length=0,this.inc("patch",b),this.inc("pre",b);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",b),this.inc("pre",b);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var c=this.prerelease.length;--c>=0;)"number"==typeof this.prerelease[c]&&(this.prerelease[c]++,c=-2);-1===c&&this.prerelease.push(0)}b&&(this.prerelease[0]===b?isNaN(this.prerelease[1])&&(this.prerelease=[b,0]):this.prerelease=[b,0]);break;default:throw new Error("invalid increment argument: "+a)}return this.format(),this},T.inc=e,T.diff=f,T.compareIdentifiers=g;var Ia=/^[0-9]+$/;T.rcompareIdentifiers=h,T.major=i,T.minor=j,T.patch=k,T.compare=l,T.compareLoose=m,T.rcompare=n,T.sort=o,T.rsort=p,T.gt=q,T.lt=r,T.eq=s,T.neq=t,T.gte=u,T.lte=v,T.cmp=w,T.Comparator=x;var Ja={};x.prototype.parse=function(a){var b=this.loose?W[Ba]:W[Ca],c=a.match(b);if(!c)throw new TypeError("Invalid comparator: "+a);this.operator=c[1],"="===this.operator&&(this.operator=""),c[2]?this.semver=new d(c[2],this.loose):this.semver=Ja},x.prototype.inspect=function(){return''},x.prototype.toString=function(){return this.value},x.prototype.test=function(a){return R("Comparator.test",a,this.loose),this.semver===Ja||("string"==typeof a&&(a=new d(a,this.loose)),w(a,this.operator,this.semver,this.loose))},T.Range=y,y.prototype.inspect=function(){return''},y.prototype.format=function(){return this.range=this.set.map(function(a){return a.join(" ").trim()}).join("||").trim(),this.range},y.prototype.toString=function(){return this.range},y.prototype.parseRange=function(a){var b=this.loose;a=a.trim(),R("range",a,b);var c=b?W[Fa]:W[Ea];a=a.replace(c,J),R("hyphen replace",a),a=a.replace(W[Da],"$1$2$3"),R("comparator trim",a,W[Da]),a=a.replace(W[ua],"$1~"),a=a.replace(W[ya],"$1^"),a=a.split(/\s+/).join(" ");var d=b?W[Ba]:W[Ca],e=a.split(" ").map(function(a){return A(a,b)}).join(" ").split(/\s+/);return this.loose&&(e=e.filter(function(a){return!!a.match(d)})),e=e.map(function(a){return new x(a,b)})},T.toComparators=z,y.prototype.test=function(a){if(!a)return!1;"string"==typeof a&&(a=new d(a,this.loose));for(var b=0;bL)return null;if(!(e?F[ur]:F[ar]).test(r))return null;try{return new n(r,e)}catch(r){return null}}function e(e,t){var n=r(e,t);return n?n.version:null}function t(e,t){var n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}function n(r,e){if(r instanceof n){if(r.loose===e)return r;r=r.version}else if("string"!=typeof r)throw new TypeError("Invalid Version: "+r);if(r.length>L)throw new TypeError("version is longer than "+L+" characters");if(!(this instanceof n))return new n(r,e);q("SemVer",r,e),this.loose=e;var t=r.trim().match(e?F[ur]:F[ar]);if(!t)throw new TypeError("Invalid Version: "+r);if(this.raw=r,this.major=+t[1],this.minor=+t[2],this.patch=+t[3],this.major>U||this.major<0)throw new TypeError("Invalid major version");if(this.minor>U||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>U||this.patch<0)throw new TypeError("Invalid patch version");t[4]?this.prerelease=t[4].split(".").map(function(r){if(/^[0-9]+$/.test(r)){var e=+r;if(e>=0&&ee?1:0}function a(r,e){return s(e,r)}function p(r,e){return new n(r,e).major}function c(r,e){return new n(r,e).minor}function u(r,e){return new n(r,e).patch}function h(r,e,t){return new n(r,t).compare(e)}function f(r,e){return h(r,e,!0)}function l(r,e,t){return h(e,r,t)}function v(r,e){return r.sort(function(r,t){return B.compare(r,t,e)})}function m(r,e){return r.sort(function(r,t){return B.rcompare(r,t,e)})}function g(r,e,t){return h(r,e,t)>0}function w(r,e,t){return h(r,e,t)<0}function y(r,e,t){return 0===h(r,e,t)}function d(r,e,t){return 0!==h(r,e,t)}function j(r,e,t){return h(r,e,t)>=0}function E(r,e,t){return h(r,e,t)<=0}function b(r,e,t,n){var i;switch(e){case"===":"object"==typeof r&&(r=r.version),"object"==typeof t&&(t=t.version),i=r===t;break;case"!==":"object"==typeof r&&(r=r.version),"object"==typeof t&&(t=t.version),i=r!==t;break;case"":case"=":case"==":i=y(r,t,n);break;case"!=":i=d(r,t,n);break;case">":i=g(r,t,n);break;case">=":i=j(r,t,n);break;case"<":i=w(r,t,n);break;case"<=":i=E(r,t,n);break;default:throw new TypeError("Invalid operator: "+e)}return i}function $(r,e){if(r instanceof $){if(r.loose===e)return r;r=r.value}if(!(this instanceof $))return new $(r,e);q("comparator",r,e),this.loose=e,this.parse(r),this.semver===Mr?this.value="":this.value=this.operator+this.semver.version,q("comp",this)}function k(r,e){if(r instanceof k&&r.loose===e)return r;if(!(this instanceof k))return new k(r,e);if(this.loose=e,this.raw=r,this.set=r.split(/\s*\|\|\s*/).map(function(r){return this.parseRange(r.trim())},this).filter(function(r){return r.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+r);this.format()}function R(r,e){return new k(r,e).set.map(function(r){return r.map(function(r){return r.value}).join(" ").trim().split(" ")})}function S(r,e){return q("comp",r),r=V(r,e),q("caret",r),r=I(r,e),q("tildes",r),r=C(r,e),q("xrange",r),r=M(r,e),q("stars",r),r}function x(r){return!r||"x"===r.toLowerCase()||"*"===r}function I(r,e){return r.trim().split(/\s+/).map(function(r){return T(r,e)}).join(" ")}function T(r,e){var t=e?F[Er]:F[jr];return r.replace(t,function(e,t,n,i,o){q("tilde",r,e,t,n,i,o);var s;return x(t)?s="":x(n)?s=">="+t+".0.0 <"+(+t+1)+".0.0":x(i)?s=">="+t+"."+n+".0 <"+t+"."+(+n+1)+".0":o?(q("replaceTilde pr",o),"-"!==o.charAt(0)&&(o="-"+o),s=">="+t+"."+n+"."+i+o+" <"+t+"."+(+n+1)+".0"):s=">="+t+"."+n+"."+i+" <"+t+"."+(+n+1)+".0",q("tilde return",s),s})}function V(r,e){return r.trim().split(/\s+/).map(function(r){return A(r,e)}).join(" ")}function A(r,e){q("caret",r,e);var t=e?F[Rr]:F[kr];return r.replace(t,function(e,t,n,i,o){q("caret",r,e,t,n,i,o);var s;return x(t)?s="":x(n)?s=">="+t+".0.0 <"+(+t+1)+".0.0":x(i)?s="0"===t?">="+t+"."+n+".0 <"+t+"."+(+n+1)+".0":">="+t+"."+n+".0 <"+(+t+1)+".0.0":o?(q("replaceCaret pr",o),"-"!==o.charAt(0)&&(o="-"+o),s="0"===t?"0"===n?">="+t+"."+n+"."+i+o+" <"+t+"."+n+"."+(+i+1):">="+t+"."+n+"."+i+o+" <"+t+"."+(+n+1)+".0":">="+t+"."+n+"."+i+o+" <"+(+t+1)+".0.0"):(q("no pr"),s="0"===t?"0"===n?">="+t+"."+n+"."+i+" <"+t+"."+n+"."+(+i+1):">="+t+"."+n+"."+i+" <"+t+"."+(+n+1)+".0":">="+t+"."+n+"."+i+" <"+(+t+1)+".0.0"),q("caret return",s),s})}function C(r,e){return q("replaceXRanges",r,e),r.split(/\s+/).map(function(r){return N(r,e)}).join(" ")}function N(r,e){r=r.trim();var t=e?F[wr]:F[gr];return r.replace(t,function(e,t,n,i,o,s){q("xRange",r,e,t,n,i,o,s);var a=x(n),p=a||x(i),c=p||x(o),u=c;return"="===t&&u&&(t=""),a?e=">"===t||"<"===t?"<0.0.0":"*":t&&u?(p&&(i=0),c&&(o=0),">"===t?(t=">=",p?(n=+n+1,i=0,o=0):c&&(i=+i+1,o=0)):"<="===t&&(t="<",p?n=+n+1:i=+i+1),e=t+n+"."+i+"."+o):p?e=">="+n+".0.0 <"+(+n+1)+".0.0":c&&(e=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0"),q("xRange return",e),e})}function M(r,e){return q("replaceStars",r,e),r.trim().replace(F[Ar],"")}function _(r,e,t,n,i,o,s,a,p,c,u,h,f){return e=x(t)?"":x(n)?">="+t+".0.0":x(i)?">="+t+"."+n+".0":">="+e,a=x(p)?"":x(c)?"<"+(+p+1)+".0.0":x(u)?"<"+p+"."+(+c+1)+".0":h?"<="+p+"."+c+"."+u+"-"+h:"<="+a,(e+" "+a).trim()}function D(r,e){for(t=0;t0){var n=r[t].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}}return!1}return!0}function X(r,e,t){try{e=new k(e,t)}catch(r){return!1}return e.test(r)}function z(r,e,t){return r.filter(function(r){return X(r,e,t)}).sort(function(r,e){return l(r,e,t)})[0]||null}function G(r,e){try{return new k(r,e).range||"*"}catch(r){return null}}function O(r,e,t){return Z(r,e,"<",t)}function P(r,e,t){return Z(r,e,">",t)}function Z(r,e,t,i){r=new n(r,i),e=new k(e,i);var o,s,a,p,c;switch(t){case">":o=g,s=E,a=w,p=">",c=">=";break;case"<":o=w,s=j,a=g,p="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(X(r,e,i))return!1;for(var u=0;u)?=?)";var fr=J++;H[fr]=H[Q]+"|x|X|\\*";var lr=J++;H[lr]=H[K]+"|x|X|\\*";var vr=J++;H[vr]="[v=\\s]*("+H[lr]+")(?:\\.("+H[lr]+")(?:\\.("+H[lr]+")(?:"+H[nr]+")?"+H[sr]+"?)?)?";var mr=J++;H[mr]="[v=\\s]*("+H[fr]+")(?:\\.("+H[fr]+")(?:\\.("+H[fr]+")(?:"+H[ir]+")?"+H[sr]+"?)?)?";var gr=J++;H[gr]="^"+H[hr]+"\\s*"+H[vr]+"$";var wr=J++;H[wr]="^"+H[hr]+"\\s*"+H[mr]+"$";var yr=J++;H[yr]="(?:~>?)";var dr=J++;H[dr]="(\\s*)"+H[yr]+"\\s+",F[dr]=new RegExp(H[dr],"g");var jr=J++;H[jr]="^"+H[yr]+H[vr]+"$";var Er=J++;H[Er]="^"+H[yr]+H[mr]+"$";var br=J++;H[br]="(?:\\^)";var $r=J++;H[$r]="(\\s*)"+H[br]+"\\s+",F[$r]=new RegExp(H[$r],"g");var kr=J++;H[kr]="^"+H[br]+H[vr]+"$";var Rr=J++;H[Rr]="^"+H[br]+H[mr]+"$";var Sr=J++;H[Sr]="^"+H[hr]+"\\s*("+cr+")$|^$";var xr=J++;H[xr]="^"+H[hr]+"\\s*("+pr+")$|^$";var Ir=J++;H[Ir]="(\\s*)"+H[hr]+"\\s*("+cr+"|"+H[vr]+")",F[Ir]=new RegExp(H[Ir],"g");var Tr=J++;H[Tr]="^\\s*("+H[vr]+")\\s+-\\s+("+H[vr]+")\\s*$";var Vr=J++;H[Vr]="^\\s*("+H[mr]+")\\s+-\\s+("+H[mr]+")\\s*$";var Ar=J++;H[Ar]="(<|>)?=?\\s*\\*";for(var Cr=0;Cr'},n.prototype.toString=function(){return this.version},n.prototype.compare=function(r){return q("SemVer.compare",this.version,this.loose,r),r instanceof n||(r=new n(r,this.loose)),this.compareMain(r)||this.comparePre(r)},n.prototype.compareMain=function(r){return r instanceof n||(r=new n(r,this.loose)),s(this.major,r.major)||s(this.minor,r.minor)||s(this.patch,r.patch)},n.prototype.comparePre=function(r){if(r instanceof n||(r=new n(r,this.loose)),this.prerelease.length&&!r.prerelease.length)return-1;if(!this.prerelease.length&&r.prerelease.length)return 1;if(!this.prerelease.length&&!r.prerelease.length)return 0;var e=0;do{var t=this.prerelease[e],i=r.prerelease[e];if(q("prerelease compare",e,t,i),void 0===t&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===t)return-1;if(t!==i)return s(t,i)}while(++e)},n.prototype.inc=function(r,e){switch(r){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e),this.inc("pre",e);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",e),this.inc("pre",e);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var t=this.prerelease.length;--t>=0;)"number"==typeof this.prerelease[t]&&(this.prerelease[t]++,t=-2);-1===t&&this.prerelease.push(0)}e&&(this.prerelease[0]===e?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error("invalid increment argument: "+r)}return this.format(),this},B.inc=i,B.diff=o,B.compareIdentifiers=s;var Nr=/^[0-9]+$/;B.rcompareIdentifiers=a,B.major=p,B.minor=c,B.patch=u,B.compare=h,B.compareLoose=f,B.rcompare=l,B.sort=v,B.rsort=m,B.gt=g,B.lt=w,B.eq=y,B.neq=d,B.gte=j,B.lte=E,B.cmp=b,B.Comparator=$;var Mr={};$.prototype.parse=function(r){var e=this.loose?F[Sr]:F[xr],t=r.match(e);if(!t)throw new TypeError("Invalid comparator: "+r);this.operator=t[1],"="===this.operator&&(this.operator=""),t[2]?this.semver=new n(t[2],this.loose):this.semver=Mr},$.prototype.inspect=function(){return''},$.prototype.toString=function(){return this.value},$.prototype.test=function(r){return q("Comparator.test",r,this.loose),this.semver===Mr||("string"==typeof r&&(r=new n(r,this.loose)),b(r,this.operator,this.semver,this.loose))},B.Range=k,k.prototype.inspect=function(){return''},k.prototype.format=function(){return this.range=this.set.map(function(r){return r.join(" ").trim()}).join("||").trim(),this.range},k.prototype.toString=function(){return this.range},k.prototype.parseRange=function(r){var e=this.loose;r=r.trim(),q("range",r,e);var t=e?F[Vr]:F[Tr];r=r.replace(t,_),q("hyphen replace",r),r=r.replace(F[Ir],"$1$2$3"),q("comparator trim",r,F[Ir]),r=(r=(r=r.replace(F[dr],"$1~")).replace(F[$r],"$1^")).split(/\s+/).join(" ");var n=e?F[Sr]:F[xr],i=r.split(" ").map(function(r){return S(r,e)}).join(" ").split(/\s+/);return this.loose&&(i=i.filter(function(r){return!!r.match(n)})),i=i.map(function(r){return new $(r,e)})},B.toComparators=R,k.prototype.test=function(r){if(!r)return!1;"string"==typeof r&&(r=new n(r,this.loose));for(var e=0;e thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me",debug:!1,headerList:[],empties:{},strings:{},parsers:[],globalize:0,imgAttr:0},css:{table:"tablesorter",cssHasChild:"tablesorter-hasChildRow",childRow:"tablesorter-childRow",colgroup:"tablesorter-colgroup",header:"tablesorter-header",headerRow:"tablesorter-headerRow",headerIn:"tablesorter-header-inner",icon:"tablesorter-icon",processing:"tablesorter-processing",sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc",sortNone:"tablesorter-headerUnSorted"},language:{sortAsc:"Ascending sort applied, ",sortDesc:"Descending sort applied, ",sortNone:"No sort applied, ",sortDisabled:"sorting is disabled",nextAsc:"activate to apply an ascending sort",nextDesc:"activate to apply a descending sort",nextNone:"activate to remove the sort"},regex:{templateContent:/\{content\}/g,templateIcon:/\{icon\}/g,templateName:/\{name\}/i,spaces:/\s+/g,nonWord:/\W/g,formElements:/(input|select|button|textarea)/i,chunk:/(^([+\-]?(?:\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,chunks:/(^\\0|\\0$)/,hex:/^0x[0-9a-f]+$/i,comma:/,/g,digitNonUS:/[\s|\.]/g,digitNegativeTest:/^\s*\([.\d]+\)/,digitNegativeReplace:/^\s*\(([.\d]+)\)/,digitTest:/^[\-+(]?\d+[)]?$/,digitReplace:/[,.'"\s]/g},string:{max:1,min:-1,emptymin:1,emptymax:-1,zero:0,none:0,null:0,top:!0,bottom:!1},keyCodes:{enter:13},dates:{},instanceMethods:{},setup:function(a,d){if(!a||!a.tHead||0===a.tBodies.length||!0===a.hasInitialized)return void(d.debug&&(a.hasInitialized?console.warn("Stopping initialization. Tablesorter has already been initialized"):console.error("Stopping initialization! No table, thead or tbody",a)));var e="",f=b(a),g=b.metadata;a.hasInitialized=!1,a.isProcessing=!0,a.config=d,b.data(a,"tablesorter",d),d.debug&&(console[console.group?"group":"log"]("Initializing tablesorter v"+c.version),b.data(a,"startoveralltimer",new Date)),d.supportsDataObject=function(a){return a[0]=parseInt(a[0],10),a[0]>1||1===a[0]&&parseInt(a[1],10)>=4}(b.fn.jquery.split(".")),d.emptyTo=d.emptyTo.toLowerCase(),d.stringTo=d.stringTo.toLowerCase(),d.last={sortList:[],clickedIndex:-1},/tablesorter\-/.test(f.attr("class"))||(e=""!==d.theme?" tablesorter-"+d.theme:""),d.table=a,d.$table=f.addClass(c.css.table+" "+d.tableClass+e).attr("role","grid"),d.$headers=f.find(d.selectorHeaders),d.namespace?d.namespace="."+d.namespace.replace(c.regex.nonWord,""):d.namespace=".tablesorter"+Math.random().toString(16).slice(2),d.$table.children().children("tr").attr("role","row"),d.$tbodies=f.children("tbody:not(."+d.cssInfoBlock+")").attr({"aria-live":"polite","aria-relevant":"all"}),d.$table.children("caption").length&&(e=d.$table.children("caption")[0],e.id||(e.id=d.namespace.slice(1)+"caption"),d.$table.attr("aria-labelledby",e.id)),d.widgetInit={},d.textExtraction=d.$table.attr("data-text-extraction")||d.textExtraction||"basic",c.buildHeaders(d),c.fixColumnWidth(a),c.addWidgetFromClass(a),c.applyWidgetOptions(a),c.setupParsers(d),d.totalRows=0,c.validateOptions(d),d.delayInit||c.buildCache(d),c.bindEvents(a,d.$headers,!0),c.bindMethods(d),d.supportsDataObject&&void 0!==f.data().sortlist?d.sortList=f.data().sortlist:g&&f.metadata()&&f.metadata().sortlist&&(d.sortList=f.metadata().sortlist),c.applyWidget(a,!0),d.sortList.length>0?c.sortOn(d,d.sortList,{},!d.initWidgets):(c.setHeadersCss(d),d.initWidgets&&c.applyWidget(a,!1)),d.showProcessing&&f.unbind("sortBegin"+d.namespace+" sortEnd"+d.namespace).bind("sortBegin"+d.namespace+" sortEnd"+d.namespace,function(b){clearTimeout(d.timerProcessing),c.isProcessing(a),"sortBegin"===b.type&&(d.timerProcessing=setTimeout(function(){c.isProcessing(a,!0)},500))}),a.hasInitialized=!0,a.isProcessing=!1,d.debug&&(console.log("Overall initialization time:"+c.benchmark(b.data(a,"startoveralltimer"))),d.debug&&console.groupEnd&&console.groupEnd()),f.triggerHandler("tablesorter-initialized",a),"function"==typeof d.initialized&&d.initialized(a)},bindMethods:function(a){var d=a.$table,e=a.namespace,f="sortReset update updateRows updateAll updateHeaders addRows updateCell updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave ".split(" ").join(e+" ");d.unbind(f.replace(c.regex.spaces," ")).bind("sortReset"+e,function(a,b){a.stopPropagation(),c.sortReset(this.config,function(a){a.isApplyingWidgets?setTimeout(function(){c.applyWidget(a,"",b)},100):c.applyWidget(a,"",b)})}).bind("updateAll"+e,function(a,b,d){a.stopPropagation(),c.updateAll(this.config,b,d)}).bind("update"+e+" updateRows"+e,function(a,b,d){a.stopPropagation(),c.update(this.config,b,d)}).bind("updateHeaders"+e,function(a,b){a.stopPropagation(),c.updateHeaders(this.config,b)}).bind("updateCell"+e,function(a,b,d,e){a.stopPropagation(),c.updateCell(this.config,b,d,e)}).bind("addRows"+e,function(a,b,d,e){a.stopPropagation(),c.addRows(this.config,b,d,e)}).bind("updateComplete"+e,function(){this.isUpdating=!1}).bind("sorton"+e,function(a,b,d,e){a.stopPropagation(),c.sortOn(this.config,b,d,e)}).bind("appendCache"+e,function(a,d,e){a.stopPropagation(),c.appendCache(this.config,e),b.isFunction(d)&&d(this)}).bind("updateCache"+e,function(a,b,d){a.stopPropagation(),c.updateCache(this.config,b,d)}).bind("applyWidgetId"+e,function(a,b){a.stopPropagation(),c.applyWidgetId(this,b)}).bind("applyWidgets"+e,function(a,b){a.stopPropagation(),c.applyWidget(this,b)}).bind("refreshWidgets"+e,function(a,b,d){a.stopPropagation(),c.refreshWidgets(this,b,d)}).bind("removeWidget"+e,function(a,b,d){a.stopPropagation(),c.removeWidget(this,b,d)}).bind("destroy"+e,function(a,b,d){a.stopPropagation(),c.destroy(this,b,d)}).bind("resetToLoadState"+e,function(d){d.stopPropagation(),c.removeWidget(this,!0,!1);var e=b.extend(!0,{},a.originalSettings);a=b.extend(!0,{},c.defaults,e),a.originalSettings=e,this.hasInitialized=!1,c.setup(this,a)})},bindEvents:function(a,d,e){a=b(a)[0];var f,g=a.config,h=g.namespace,i=null;!0!==e&&(d.addClass(h.slice(1)+"_extra_headers"),(f=b.fn.closest?d.closest("table")[0]:d.parents("table")[0])&&"TABLE"===f.nodeName&&f!==a&&b(f).addClass(h.slice(1)+"_extra_table")),f=(g.pointerDown+" "+g.pointerUp+" "+g.pointerClick+" sort keyup ").replace(c.regex.spaces," ").split(" ").join(h+" "),d.find(g.selectorSort).add(d.filter(g.selectorSort)).unbind(f).bind(f,function(a,e){var f,h,j,k=b(a.target),l=" "+a.type+" ";if(!(1!==(a.which||a.button)&&!l.match(" "+g.pointerClick+" | sort | keyup ")||" keyup "===l&&a.which!==c.keyCodes.enter||l.match(" "+g.pointerClick+" ")&&void 0!==a.which||l.match(" "+g.pointerUp+" ")&&i!==a.target&&!0!==e)){if(l.match(" "+g.pointerDown+" "))return i=a.target,j=k.jquery.split("."),void("1"===j[0]&&j[1]<4&&a.preventDefault());if(i=null,c.regex.formElements.test(a.target.nodeName)||k.hasClass(g.cssNoSort)||k.parents("."+g.cssNoSort).length>0||k.parents("button").length>0)return!g.cancelSelection;g.delayInit&&c.isEmptyObject(g.cache)&&c.buildCache(g),f=b.fn.closest?b(this).closest("th, td"):/TH|TD/.test(this.nodeName)?b(this):b(this).parents("th, td"),j=d.index(f),g.last.clickedIndex=j<0?f.attr("data-column"):j,h=g.$headers[g.last.clickedIndex],h&&!h.sortDisabled&&c.initSort(g,h,a)}}),g.cancelSelection&&d.attr("unselectable","on").bind("selectstart",!1).css({"user-select":"none",MozUserSelect:"none"})},buildHeaders:function(a){var d,e,f,g;for(a.headerList=[],a.headerContent=[],a.sortVars=[],a.debug&&(f=new Date),a.columns=c.computeColumnIndex(a.$table.children("thead, tfoot").children("tr")),e=a.cssIcon?'':"",a.$headers=b(b.map(a.$table.find(a.selectorHeaders),function(d,f){var g,h,i,j,k,l=b(d);if(!l.parent().hasClass(a.cssIgnoreRow))return g=c.getColumnData(a.table,a.headers,f,!0),a.headerContent[f]=l.html(),""===a.headerTemplate||l.find("."+c.css.headerIn).length||(j=a.headerTemplate.replace(c.regex.templateContent,l.html()).replace(c.regex.templateIcon,l.find("."+c.css.icon).length?"":e),a.onRenderTemplate&&(h=a.onRenderTemplate.apply(l,[f,j]))&&"string"==typeof h&&(j=h),l.html('
'+j+"
")),a.onRenderHeader&&a.onRenderHeader.apply(l,[f,a,a.$table]),i=parseInt(l.attr("data-column"),10),d.column=i,k=c.getOrder(c.getData(l,g,"sortInitialOrder")||a.sortInitialOrder),a.sortVars[i]={count:-1,order:k?a.sortReset?[1,0,2]:[1,0]:a.sortReset?[0,1,2]:[0,1],lockedOrder:!1},k=c.getData(l,g,"lockedOrder")||!1,void 0!==k&&!1!==k&&(a.sortVars[i].lockedOrder=!0,a.sortVars[i].order=c.getOrder(k)?[1,1]:[0,0]),a.headerList[f]=d,l.addClass(c.css.header+" "+a.cssHeader).parent().addClass(c.css.headerRow+" "+a.cssHeaderRow).attr("role","row"),a.tabIndex&&l.attr("tabindex",0),d})),a.$headerIndexed=[],g=0;g0))for(h+=f,g+=f;f+1>0;)e.parsers[h-f]=m,e.extractors[h-f]=n,f--;h++}s+=e.parsers.length?q:1}a.debug&&(c.isEmptyObject(t)?console.warn(" No parsers detected!"):console[console.table?"table":"log"](t),console.log("Completed detecting parsers"+c.benchmark(o)),console.groupEnd&&console.groupEnd()),a.parsers=e.parsers,a.extractors=e.extractors},addParser:function(a){var b,d=c.parsers.length,e=!0;for(b=0;b=0;)if((g=c.parsers[j])&&"text"!==g.id&&g.is&&g.is(l,a.table,k,h))return g;return c.getParserById("text")},getElementText:function(a,d,e){if(!d)return"";var f,g=a.textExtraction||"",h=d.jquery?d:b(d);return"string"==typeof g?"basic"===g&&void 0!==(f=h.attr(a.textAttribute))?b.trim(f):b.trim(d.textContent||h.text()):"function"==typeof g?b.trim(g(h[0],a.table,e)):"function"==typeof(f=c.getColumnData(a.table,g,e))?b.trim(f(h[0],a.table,e)):b.trim(h[0].textContent||h.text())},getParsedText:function(a,b,d,e){void 0===e&&(e=c.getElementText(a,b,d));var f=""+e,g=a.parsers[d],h=a.extractors[d];return g&&(h&&"function"==typeof h.format&&(e=h.format(e,a.table,b,d)),f="no-parser"===g.id?"":g.format(""+e,a.table,b,d),a.ignoreCase&&"string"==typeof f&&(f=f.toLowerCase())),f},buildCache:function(a,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B=a.table,C=a.parsers;if(a.$tbodies=a.$table.children("tbody:not(."+a.cssInfoBlock+")"),l=void 0===e?a.$tbodies:e,a.cache={},a.totalRows=0,!C)return a.debug?console.warn("Warning: *Empty table!* Not building a cache"):"";for(a.debug&&(q=new Date),a.showProcessing&&c.isProcessing(B,!0),k=0;k0&&(w+=v,y+=v)),w++;else{for(s.$row=m,s.order=i,w=0,y=a.columns,j=0;j0)){for(A=0;A<=v;)h=a.duplicateSpan||0===A?g:"string"!=typeof a.textExtraction?c.getElementText(a,p,w+A)||"":"",s.raw[w+A]=h,n[w+A]=h,A++;w+=v,y+=v}w++}n[a.columns]=s,f.normalized[f.normalized.length]=n}f.colMax=u,a.totalRows+=f.normalized.length}if(a.showProcessing&&c.isProcessing(B),a.debug){for(z=Math.min(5,a.cache[0].normalized.length),console[console.group?"group":"log"]("Building cache for "+a.totalRows+" rows (showing "+z+" rows in log) and "+a.columns+" columns"+c.benchmark(q)),g={},j=0;j-1);return d}),d=d.not(".sorter-false").filter('[data-column="'+g[e][0]+'"]'+(1===h?":last":"")),d.length)){for(f=0;f=0?f:g[1]%l.length}},updateAll:function(a,b,d){var e=a.table;e.isUpdating=!0,c.refreshWidgets(e,!0,!0),c.buildHeaders(a),c.bindEvents(e,a.$headers,!0),c.bindMethods(a),c.commonUpdate(a,b,d)},update:function(a,b,d){a.table.isUpdating=!0,c.updateHeader(a),c.commonUpdate(a,b,d)},updateHeaders:function(a,b){a.table.isUpdating=!0,c.buildHeaders(a),c.bindEvents(a.table,a.$headers,!0),c.resortComplete(a,b)},updateCell:function(a,d,e,f){if(c.isEmptyObject(a.cache))return c.updateHeader(a),void c.commonUpdate(a,e,f);a.table.isUpdating=!0,a.$table.find(a.selectorRemove).remove();var g,h,i,j,k,l,m=a.$tbodies,n=b(d),o=m.index(b.fn.closest?n.closest("tbody"):n.parents("tbody").filter(":first")),p=a.cache[o],q=b.fn.closest?n.closest("tr"):n.parents("tr").filter(":first");if(d=n[0],m.length&&o>=0){if(i=m.eq(o).find("tr").not("."+a.cssChildRow).index(q),k=p.normalized[i],(l=q[0].cells.length)!==a.columns)for(j=0,g=!1,h=0;h0&&(p+=t),p++;r[d.columns]=q,d.cache[j].normalized[o]=r}c.checkResort(d,f,g)}},updateCache:function(a,b,d){a.parsers&&a.parsers.length||c.setupParsers(a,d),c.buildCache(a,b,d)},appendCache:function(a,b){var d,e,f,g,h,i,j,k=a.table,l=a.widgetOptions,m=a.$tbodies,n=[],o=a.cache;if(c.isEmptyObject(o))return a.appender?a.appender(k,n):k.isUpdating?a.$table.triggerHandler("updateComplete",k):"";for(a.debug&&(j=new Date),i=0;i1))for(g=1;g=0)for(g=0;g1))for(g=1;ge)return 1}for(d=(a||"").replace(j.chunk,"\\0$1\\0").replace(j.chunks,"").split("\\0"),e=(b||"").replace(j.chunk,"\\0$1\\0").replace(j.chunks,"").split("\\0"),i=Math.max(d.length,e.length),h=0;hg)return 1}return 0},sortNaturalAsc:function(a,b,d,e){if(a===b)return 0;var f=c.string[e.empties[d]||e.emptyTo];return""===a&&0!==f?"boolean"==typeof f?f?-1:1:-f||-1:""===b&&0!==f?"boolean"==typeof f?f?1:-1:f||1:c.sortNatural(a,b)},sortNaturalDesc:function(a,b,d,e){if(a===b)return 0;var f=c.string[e.empties[d]||e.emptyTo];return""===a&&0!==f?"boolean"==typeof f?f?-1:1:f||1:""===b&&0!==f?"boolean"==typeof f?f?1:-1:-f||-1:c.sortNatural(b,a)},sortText:function(a,b){return a>b?1:a=0&&!0!==e&&j.widgets.splice(h,1),g&&g.remove&&(j.debug&&console.log((e?"Refreshing":"Removing")+' "'+d[f]+'" widget'),g.remove(a,j,j.widgetOptions,e),j.widgetInit[d[f]]=!1)},refreshWidgets:function(a,d,e){a=b(a)[0];var f,g,h=a.config,i=h.widgets,j=c.widgets,k=j.length,l=[],m=function(a){b(a).triggerHandler("refreshComplete")};for(f=0;f'),d=i.$table.width(),f=i.$tbodies.find("tr:first").children(":visible"),g=f.length,h=0;h").css("width",e));i.$table.prepend(j)}},getData:function(a,c,d){var e,f,g="",h=b(a);return h.length?(e=!!b.metadata&&h.metadata(),f=" "+(h.attr("class")||""),void 0!==h.data(d)||void 0!==h.data(d.toLowerCase())?g+=h.data(d)||h.data(d.toLowerCase()):e&&void 0!==e[d]?g+=e[d]:c&&void 0!==c[d]?g+=c[d]:" "!==f&&f.match(" "+d+"-")&&(g=f.match(new RegExp("\\s"+d+"-([\\w-]+)"))[1]||""),b.trim(g)):""},getColumnData:function(a,c,d,e,f){if("object"!=typeof c||null===c)return c;a=b(a)[0];var g,h,i=a.config,j=f||i.$headers,k=i.$headerIndexed&&i.$headerIndexed[d]||j.filter('[data-column="'+d+'"]:last');if(void 0!==c[d])return e?c[d]:c[j.index(k)];for(h in c)if("string"==typeof h&&(g=k.filter(h).add(k.find(h)),g.length))return c[h]},isProcessing:function(a,d,e){a=b(a);var f=a[0].config,g=e||a.find("."+c.css.header);d?(void 0!==e&&f.sortList.length>0&&(g=g.filter(function(){return!this.sortDisabled&&c.isValueInArray(parseFloat(b(this).attr("data-column")),f.sortList)>=0})),a.add(g).addClass(c.css.processing+" "+f.cssProcessing)):a.add(g).removeClass(c.css.processing+" "+f.cssProcessing)},processTbody:function(a,c,d){if(a=b(a)[0],d)return a.isProcessing=!0,c.before(''),b.fn.detach?c.detach():c.remove();var e=b(a).find("colgroup.tablesorter-savemyplace");c.insertAfter(e),e.remove(),a.isProcessing=!1},clearTableBody:function(a){b(a)[0].config.$tbodies.children().detach()},characterEquivalents:{a:"áàâãäąå",A:"ÁÀÂÃÄĄÅ",c:"çćč",C:"ÇĆČ",e:"éèêëěę",E:"ÉÈÊËĚĘ",i:"íìİîïı",I:"ÍÌİÎÏ",o:"óòôõöō",O:"ÓÒÔÕÖŌ",ss:"ß",SS:"ẞ",u:"úùûüů",U:"ÚÙÛÜŮ"},replaceAccents:function(a){var b,d="[",e=c.characterEquivalents;if(!c.characterRegex){c.characterRegexArray={};for(b in e)"string"==typeof b&&(d+=e[b],c.characterRegexArray[b]=new RegExp("["+e[b]+"]","g"));c.characterRegex=new RegExp(d+"]")}if(c.characterRegex.test(a))for(b in e)"string"==typeof b&&(a=a.replace(c.characterRegexArray[b],b));return a},validateOptions:function(a){var d,e,f,g,h="headers sortForce sortList sortAppend widgets".split(" "),i=a.originalSettings;if(i){a.debug&&(g=new Date);for(d in i)if("undefined"===(f=typeof c.defaults[d]))console.warn('Tablesorter Warning! "table.config.'+d+'" option not recognized');else if("object"===f)for(e in i[d])f=c.defaults[d]&&typeof c.defaults[d][e],b.inArray(d,h)<0&&"undefined"===f&&console.warn('Tablesorter Warning! "table.config.'+d+"."+e+'" option not recognized');a.debug&&console.log("validate options time:"+c.benchmark(g))}},restoreHeaders:function(a){var d,e,f=b(a)[0].config,g=f.$table.find(f.selectorHeaders),h=g.length;for(d=0;d tr").children("th, td");!1===d&&b.inArray("uitheme",h.widgets)>=0&&(g.triggerHandler("applyWidgetId",["uitheme"]),g.triggerHandler("applyWidgetId",["zebra"])),j.find("tr").not(k).remove(),f="sortReset update updateRows updateAll updateHeaders updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets removeWidget destroy mouseup mouseleave "+"keypress sortBegin sortEnd resetToLoadState ".split(" ").join(h.namespace+" "),g.removeData("tablesorter").unbind(f.replace(c.regex.spaces," ")),h.$headers.add(l).removeClass([c.css.header,h.cssHeader,h.cssAsc,h.cssDesc,c.css.sortAsc,c.css.sortDesc,c.css.sortNone].join(" ")).removeAttr("data-column").removeAttr("aria-label").attr("aria-disabled","true"),k.find(h.selectorSort).unbind("mousedown mouseup keypress ".split(" ").join(h.namespace+" ").replace(c.regex.spaces," ")),c.restoreHeaders(a),g.toggleClass(c.css.table+" "+h.tableClass+" tablesorter-"+h.theme,!1===d),a.hasInitialized=!1,delete a.config.cache,"function"==typeof e&&e(a),i&&console.log("tablesorter has been removed")}}};b.fn.tablesorter=function(a){return this.each(function(){var d=this,e=b.extend(!0,{},c.defaults,a,c.instanceMethods);e.originalSettings=a,!d.hasInitialized&&c.buildTable&&"TABLE"!==this.nodeName?c.buildTable(d,e):c.setup(d,e)})},window.console&&window.console.log||(c.logs=[],console={},console.log=console.warn=console.error=console.table=function(){var a=arguments.length>1?arguments:arguments[0];c.logs[c.logs.length]={date:Date.now(),log:a}}),c.addParser({id:"no-parser",is:function(){return!1},format:function(){return""},type:"text"}),c.addParser({id:"text",is:function(){return!0},format:function(a,d){var e=d.config;return a&&(a=b.trim(e.ignoreCase?a.toLocaleLowerCase():a),a=e.sortLocaleCompare?c.replaceAccents(a):a),a},type:"text"}),c.regex.nondigit=/[^\w,. \-()]/g,c.addParser({id:"digit",is:function(a){return c.isDigit(a)},format:function(a,d){var e=c.formatFloat((a||"").replace(c.regex.nondigit,""),d);return a&&"number"==typeof e?e:a?b.trim(a&&d.config.ignoreCase?a.toLocaleLowerCase():a):a},type:"numeric"}),c.regex.currencyReplace=/[+\-,. ]/g,c.regex.currencyTest=/^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/,c.addParser({id:"currency",is:function(a){return a=(a||"").replace(c.regex.currencyReplace,""),c.regex.currencyTest.test(a)},format:function(a,d){var e=c.formatFloat((a||"").replace(c.regex.nondigit,""),d);return a&&"number"==typeof e?e:a?b.trim(a&&d.config.ignoreCase?a.toLocaleLowerCase():a):a},type:"numeric"}),c.regex.urlProtocolTest=/^(https?|ftp|file):\/\//,c.regex.urlProtocolReplace=/(https?|ftp|file):\/\/(www\.)?/,c.addParser({id:"url",is:function(a){return c.regex.urlProtocolTest.test(a)},format:function(a){return a?b.trim(a.replace(c.regex.urlProtocolReplace,"")):a},type:"text"}),c.regex.dash=/-/g,c.regex.isoDate=/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}/,c.addParser({id:"isoDate",is:function(a){return c.regex.isoDate.test(a)},format:function(a,b){var d=a?new Date(a.replace(c.regex.dash,"/")):a;return d instanceof Date&&isFinite(d)?d.getTime():a},type:"numeric"}),c.regex.percent=/%/g,c.regex.percentTest=/(\d\s*?%|%\s*?\d)/,c.addParser({id:"percent",is:function(a){return c.regex.percentTest.test(a)&&a.length<15},format:function(a,b){return a?c.formatFloat(a.replace(c.regex.percent,""),b):a},type:"numeric"}),c.addParser({id:"image",is:function(a,b,c,d){return d.find("img").length>0},format:function(a,c,d){return b(d).find("img").attr(c.config.imgAttr||"alt")||a},parsed:!0,type:"text"}),c.regex.dateReplace=/(\S)([AP]M)$/i,c.regex.usLongDateTest1=/^[A-Z]{3,10}\.?\s+\d{1,2},?\s+(\d{4})(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?$/i,c.regex.usLongDateTest2=/^\d{1,2}\s+[A-Z]{3,10}\s+\d{4}/i,c.addParser({id:"usLongDate",is:function(a){return c.regex.usLongDateTest1.test(a)||c.regex.usLongDateTest2.test(a)},format:function(a,b){var d=a?new Date(a.replace(c.regex.dateReplace,"$1 $2")):a;return d instanceof Date&&isFinite(d)?d.getTime():a},type:"numeric"}),c.regex.shortDateTest=/(^\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4})|(^\d{4}[\/\s]\d{1,2}[\/\s]\d{1,2})/,c.regex.shortDateReplace=/[\-.,]/g,c.regex.shortDateXXY=/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,c.regex.shortDateYMD=/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/,c.convertFormat=function(a,b){a=(a||"").replace(c.regex.spaces," ").replace(c.regex.shortDateReplace,"/"),"mmddyyyy"===b?a=a.replace(c.regex.shortDateXXY,"$3/$1/$2"):"ddmmyyyy"===b?a=a.replace(c.regex.shortDateXXY,"$3/$2/$1"):"yyyymmdd"===b&&(a=a.replace(c.regex.shortDateYMD,"$1/$2/$3"));var d=new Date(a);return d instanceof Date&&isFinite(d)?d.getTime():""},c.addParser({id:"shortDate",is:function(a){return a=(a||"").replace(c.regex.spaces," ").replace(c.regex.shortDateReplace,"/"),c.regex.shortDateTest.test(a)},format:function(a,b,d,e){if(a){var f=b.config,g=f.$headerIndexed[e],h=g.length&&g.data("dateFormat")||c.getData(g,c.getColumnData(b,f.headers,e),"dateFormat")||f.dateFormat;return g.length&&g.data("dateFormat",h),c.convertFormat(a,h)||a}return a},type:"numeric"}),c.regex.timeTest=/^(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)$|^((?:[01]\d|[2][0-4]):[0-5]\d)$/i,c.regex.timeMatch=/(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)/i,c.addParser({id:"time",is:function(a){return c.regex.timeTest.test(a)},format:function(a,b){var d,e=(a||"").match(c.regex.timeMatch),f=new Date(a),g=a&&(null!==e?e[0]:"00:00 AM"),h=g?new Date("2000/01/01 "+g.replace(c.regex.dateReplace,"$1 $2")):g;return h instanceof Date&&isFinite(h)?(d=f instanceof Date&&isFinite(f)?f.getTime():0,d?parseFloat(h.getTime()+"."+f.getTime()):h.getTime()):a},type:"numeric"}),c.addParser({id:"metadata",is:function(){return!1},format:function(a,c,d){var e=c.config,f=e.parserMetadataName?e.parserMetadataName:"sortValue";return b(d).metadata()[f]},type:"numeric"}),c.addWidget({id:"zebra",priority:90,format:function(a,c,d){var e,f,g,h,i,j,k,l=new RegExp(c.cssChildRow,"i"),m=c.$tbodies.add(b(c.namespace+"_extra_table").children("tbody:not(."+c.cssInfoBlock+")"));for(i=0;i
')}),d.cssIcon&&u.find("."+b.css.icon).removeClass(r?[o.icons,q].join(" "):"").addClass(w.icons||""),b.hasWidget(d.table,"filter")&&(g=function(){t.children("thead").children("."+b.css.filterRow).removeClass(r?o.filterRow||"":"").addClass(w.filterRow||"")},e.filter_initialized?g():t.one("filterInit",function(){g()}))),f=0;f1)))for(m=1;m=]/g,query:"(q|query)",wild01:/\?/g,wild0More:/\*/g,quote:/\"/g,isNeg1:/(>=?\s*-\d)/,isNeg2:/(<=?\s*\d)/},types:{or:function(d,e,f){if((c.orTest.test(e.iFilter)||c.orSplit.test(e.filter))&&!c.regex.test(e.filter)){var g,h,i,j,k=a.extend({},e),l=e.filter.split(c.orSplit),m=e.iFilter.split(c.orSplit),n=l.length;for(g=0;g=l:g>l:c.ltTest.test(f.iFilter)&&(h=c.lteTest.test(f.iFilter)?g<=l:g=0)))}return null},exact:function(d,e){if(c.exact.test(e.iFilter)){var f=e.iFilter.replace(c.exact,""),g=b.parseFilter(d,f,e)||"";return e.anyMatch?a.inArray(g,e.rowArray)>=0:g==e.iExact}return null},range:function(a,e){if(c.toTest.test(e.iFilter)){var f,g,h,i,j=a.table,k=e.index,l=e.parsed[k],m=e.iFilter.split(c.toSplit);return g=m[0].replace(d.regex.nondigit,"")||"",h=d.formatFloat(b.parseFilter(a,g,e),j),g=m[1].replace(d.regex.nondigit,"")||"",i=d.formatFloat(b.parseFilter(a,g,e),j),(l||"numeric"===a.parsers[k].type)&&(f=a.parsers[k].format(""+m[0],j,a.$headers.eq(k),k),h=""===f||isNaN(f)?h:f,f=a.parsers[k].format(""+m[1],j,a.$headers.eq(k),k),i=""===f||isNaN(f)?i:f),!l&&"numeric"!==a.parsers[k].type||isNaN(h)||isNaN(i)?(g=isNaN(e.iExact)?e.iExact.replace(d.regex.nondigit,""):e.iExact,f=d.formatFloat(g,j)):f=e.cache,h>i&&(g=h,h=i,i=g),f>=h&&f<=i||""===h||""===i}return null},wild:function(a,d){if(c.wildOrTest.test(d.iFilter)){var e=""+(b.parseFilter(a,d.iFilter,d)||"");!c.wildTest.test(e)&&d.nestedFilters&&(e=d.isMatch?e:"^("+e+")$");try{return new RegExp(e.replace(c.wild01,"\\S{1}").replace(c.wild0More,"\\S*"),a.widgetOptions.filter_ignoreCase?"i":"").test(d.exact)}catch(a){return null}}return null},fuzzy:function(a,d){if(c.fuzzyTest.test(d.iFilter)){var e,f=0,g=d.iExact.length,h=d.iFilter.slice(1),i=b.parseFilter(a,h,d)||"";for(e=0;e]=?/,gtTest:/>/,gteTest:/>=/,ltTest:/'+(j.data("placeholder")||j.attr("data-placeholder")||p.filter_placeholder.select||"")+"":"",l=h,i=h,h.indexOf(p.filter_selectSourceSeparator)>=0&&(l=h.split(p.filter_selectSourceSeparator),i=l[1],l=l[0]),g+="");o.$table.find("thead").find("select."+e.filter+'[data-column="'+k+'"]').append(g),i=p.filter_selectSource,m="function"==typeof i||d.getColumnData(f,i,k),m&&b.buildSelect(o.table,k,"",!0,j.hasClass(p.filter_onlyAvail))}b.buildDefault(f,!0),b.bindSearch(f,o.$table.find("."+e.filter),!0),p.filter_external&&b.bindSearch(f,p.filter_external),p.filter_hideFilters&&b.hideFilters(o),o.showProcessing&&(i="filterStart filterEnd ".split(" ").join(o.namespace+"filter "),o.$table.unbind(i.replace(d.regex.spaces," ")).bind(i,function(b,c){j=c?o.$table.find("."+e.header).filter("[data-column]").filter(function(){return""!==c[a(this).data("column")]}):"",d.isProcessing(f,"filterStart"===b.type,c?j:"")})),o.filteredRows=o.totalRows,i="tablesorter-initialized pagerBeforeInitialized ".split(" ").join(o.namespace+"filter "),o.$table.unbind(i.replace(d.regex.spaces," ")).bind(i,function(){b.completeInit(this)}),o.pager&&o.pager.initialized&&!p.filter_initialized?(o.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){b.filterInitComplete(o)},100)):p.filter_initialized||b.completeInit(f)},completeInit:function(a){var c=a.config,e=c.widgetOptions,f=b.setDefaults(a,c,e)||[];f.length&&(c.delayInit&&""===f.join("")||d.setFilters(a,f,!0)),c.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){e.filter_initialized||b.filterInitComplete(c)},100)},formatterUpdated:function(a,b){var c=a&&a.closest("table")[0].config.widgetOptions;c&&!c.filter_initialized&&(c.filter_formatterInit[b]=1)},filterInitComplete:function(c){var d,e,f=c.widgetOptions,g=0,h=function(){f.filter_initialized=!0,c.lastSearch=c.$table.data("lastSearch"),c.$table.triggerHandler("filterInit",c),b.findRows(c.table,c.lastSearch||[])};if(a.isEmptyObject(f.filter_formatter))h();else{for(e=f.filter_formatterInit.length,d=0;d';for(j=0;j1?'").appendTo(f.$table.children("thead").eq(0)).children("td"),j=0;j").appendTo(h):(o=d.getColumnData(c,g.filter_formatter,j),o?(g.filter_formatterCount++,t=o(h,j),t&&0===t.length&&(t=h.children("input")),t&&(0===t.parent().length||t.parent().length&&t.parent()[0]!==h[0])&&h.append(t)):t=a('').appendTo(h),t&&(p=k.data("placeholder")||k.attr("data-placeholder")||g.filter_placeholder.search||"",t.attr("placeholder",p))),t&&(n=(a.isArray(g.filter_cssFilter)?void 0!==g.filter_cssFilter[j]?g.filter_cssFilter[j]||"":"":g.filter_cssFilter)||"",t.addClass(e.filter+" "+n).attr("data-column",h.attr("data-column")),m&&(t.attr("placeholder","").addClass(e.filterDisabled)[0].disabled=!0)))},bindSearch:function(c,e,g){if(c=a(c)[0],e=a(e),e.length){var h,i=c.config,j=i.widgetOptions,k=i.namespace+"filter",l=j.filter_$externalFilters;!0!==g&&(h=j.filter_anyColumnSelector+","+j.filter_multipleColumnSelector,j.filter_$anyMatch=e.filter(h),l&&l.length?j.filter_$externalFilters=j.filter_$externalFilters.add(e):j.filter_$externalFilters=e,d.setFilters(c,i.$table.data("lastSearch")||[],!1===g)),h="keypress keyup keydown search change input ".split(" ").join(k+" "),e.attr("data-lastSearchTime",(new Date).getTime()).unbind(h.replace(d.regex.spaces," ")).bind("keydown"+k,function(a){if(a.which===f.escape&&!c.config.widgetOptions.filter_resetOnEsc)return!1}).bind("keyup"+k,function(e){j=c.config.widgetOptions;var g=parseInt(a(this).attr("data-column"),10),h="boolean"==typeof j.filter_liveSearch?j.filter_liveSearch:d.getColumnData(c,j.filter_liveSearch,g);if(void 0===h&&(h=j.filter_liveSearch.fallback||!1),a(this).attr("data-lastSearchTime",(new Date).getTime()),e.which===f.escape)this.value=j.filter_resetOnEsc?"":i.lastSearch[g];else{if(!1===h)return;if(""!==this.value&&("number"==typeof h&&this.value.length=f.left&&e.which<=f.down)))return} -b.searching(c,!0,!0,g)}).bind("search change keypress input ".split(" ").join(k+" "),function(e){var g=parseInt(a(this).attr("data-column"),10),h="boolean"==typeof j.filter_liveSearch?j.filter_liveSearch:d.getColumnData(c,j.filter_liveSearch,g);!c.config.widgetOptions.filter_initialized||e.which!==f.enter&&"search"!==e.type&&("change"!==e.type&&"input"!==e.type||!0!==h||this.value===i.lastSearch[g])||(e.preventDefault(),a(this).attr("data-lastSearchTime",(new Date).getTime()),b.searching(c,"keypress"!==e.type,!0,g))})}},searching:function(a,c,e,f){var g,h=a.config.widgetOptions;void 0===f?g=!1:void 0===(g="boolean"==typeof h.filter_liveSearch?h.filter_liveSearch:d.getColumnData(a,h.filter_liveSearch,f))&&(g=h.filter_liveSearch.fallback||!1),clearTimeout(h.filter_searchTimer),void 0===c||!0===c?h.filter_searchTimer=setTimeout(function(){b.checkFilters(a,c,e)},g?h.filter_searchDelay:10):b.checkFilters(a,c,e)},equalFilters:function(b,c,d){var e,f=[],g=[],h=b.columns+1;for(c=a.isArray(c)?c:[],d=a.isArray(d)?d:[],e=0;e1?a.trim(b).split(/\s/):[a.trim(b)],h=g.length-1,i=0,j=d;for(h<1&&f>1&&(g[1]=g[0]);e.test(j);)j=j.replace(e,g[i++]||""),e.test(j)&&ih&&(d=g,g=h,h=d),h>=a.columns&&(h=a.columns-1);g<=h;g++)m[m.length]=g;b=b.replace(e[k],"")}if(!c&&/,/.test(b))for(i=b.split(/\s*,\s*/),l=i.length,j=0;j-1})},multipleColumns:function(c,d){var e=c.widgetOptions,f=e.filter_initialized||!d.filter(e.filter_anyColumnSelector).length,g=a.trim(b.getLatestSearch(d).attr("data-column")||"");return b.findRange(c,g,!f)},processTypes:function(c,d,e){var f,g=null,h=null;for(f in b.types)a.inArray(f,e.excludeMatch)<0&&null===h&&null!==(h=b.types[f](c,d,e))&&(g=h);return g},matchType:function(a,b){var c,d=a.widgetOptions,f=a.$headerIndexed[b];return f.hasClass("filter-exact")?c=!1:f.hasClass("filter-match")?c=!0:(d.filter_columnFilters?f=a.$filters.find("."+e.filter).add(d.filter_$externalFilters).filter('[data-column="'+b+'"]'):d.filter_$externalFilters&&(f=d.filter_$externalFilters.filter('[data-column="'+b+'"]')),c=!!f.length&&"match"===a.widgetOptions.filter_matchType[(f[0].nodeName||"").toLowerCase()]),c},processRow:function(e,f,g){var h,i,j,k,l,m=e.widgetOptions,n=!0,o=m.filter_$anyMatch&&m.filter_$anyMatch.length,p=m.filter_$anyMatch&&m.filter_$anyMatch.length?b.multipleColumns(e,m.filter_$anyMatch):[];if(f.$cells=f.$row.children(),f.anyMatchFlag&&p.length>1||f.anyMatchFilter&&!o){if(f.anyMatch=!0,f.isMatch=!0,f.rowArray=f.$cells.map(function(b){if(a.inArray(b,p)>-1||f.anyMatchFilter&&!o)return f.parsed[b]?l=f.cacheArray[b]:(l=f.rawArray[b],l=a.trim(m.filter_ignoreCase?l.toLowerCase():l),e.sortLocaleCompare&&(l=d.replaceAccents(l))),l}).get(),f.filter=f.anyMatchFilter,f.iFilter=f.iAnyMatchFilter,f.exact=f.rowArray.join(" "),f.iExact=m.filter_ignoreCase?f.exact.toLowerCase():f.exact,f.cache=f.cacheArray.slice(0,-1).join(" "),g.excludeMatch=g.noAnyMatch,null!==(i=b.processTypes(e,f,g)))n=i;else if(m.filter_startsWith)for(n=!1,p=Math.min(e.columns,f.rowArray.length);!n&&p>0;)p--,n=n||0===f.rowArray[p].indexOf(f.iFilter);else n=(f.iExact+f.childRowText).indexOf(f.iFilter)>=0;if(f.anyMatch=!1,f.filters.join("")===f.filter)return n}for(p=0;p=0:f.filter===f.exact:"function"==typeof j?i=j(f.exact,f.cache,f.filter,p,f.$row,e,f):"function"==typeof j[k||f.filter]&&(l=k||f.filter,i=j[l](f.exact,f.cache,f.filter,p,f.$row,e,f))),null===i?(i=b.processTypes(e,f,g),null!==i?h=i:(l=(f.iExact+f.childRowText).indexOf(b.parseFilter(e,f.iFilter,f)),h=!m.filter_startsWith&&l>=0||m.filter_startsWith&&0===l)):h=i,n=!!h&&n);return n},findRows:function(e,f,g){if(!b.equalFilters(e.config,e.config.lastSearch,g)&&e.config.widgetOptions.filter_initialized){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E=a.extend([],f),F=e.config,G=F.widgetOptions,H={anyMatch:!1,filters:f,filter_regexCache:[]},I={noAnyMatch:["range","operators"],functions:[],excludeFilter:[],defaultColFilter:[],defaultAnyFilter:d.getColumnData(e,G.filter_defaultFilter,F.columns,!0)||""};for(H.parsed=[],p=0;p1&&(isNaN(B[0])?a.each(F.headerContent,function(a,b){b.toLowerCase().indexOf(B[0])>-1&&(C=a,f[C]=B[1])}):C=parseInt(B[0],10)-1,C>=0&&C")>=0)return l;a.isArray(l)?i=l:"object"===a.type(j)&&l&&(i=l(c,e,f))}return!1===i&&(i=b.getOptions(c,e,f)),b.processOptions(c,e,i)},processOptions:function(b,c,e){if(!a.isArray(e))return!1;b=a(b)[0];var f,g,h,i,j,k,l=b.config,m=void 0!==c&&null!==c&&c>=0&&c'+(s.data("placeholder")||s.attr("data-placeholder")||r.filter_placeholder.select||"")+"",u=q.$table.find("thead").find("select."+e.filter+'[data-column="'+f+'"]').val();if(void 0!==g&&""!==g||(g=b.getOptionSource(d,f,i)),a.isArray(g)){for(j=0;j"}else""+p!="[object Object]"&&(l=p=(""+p).replace(c.quote,"""),k=l,l.indexOf(r.filter_selectSourceSeparator)>=0&&(m=l.split(r.filter_selectSourceSeparator),k=m[0],l=m[1]),t+=""!==p?"":"");g=[]}n=(q.$filters?q.$filters:q.$table.children("thead")).find("."+e.filter),r.filter_$externalFilters&&(n=n&&n.length?n.add(r.filter_$externalFilters):r.filter_$externalFilters),o=n.filter('select[data-column="'+f+'"]'),o.length&&(o[h?"html":"append"](t),a.isArray(g)||o.append(g).val(u),o.val(u))}},buildDefault:function(a,c){var e,f,g,h=a.config,i=h.widgetOptions,j=h.columns;for(e=0;e1&&(j=j.slice(1)),h===m.columns&&(k=j.filter(n.filter_anyColumnSelector),j=k.length?k:j),j.val(f[h]).trigger("change"+m.namespace)):(l[h]=j.val()||"",h===m.columns?j.slice(1).filter('[data-column*="'+j.attr("data-column")+'"]').val(l[h]):j.slice(1).val(l[h])),h===m.columns&&j.length&&(n.filter_$anyMatch=j));return l},d.setFilters=function(c,e,f,g){var h=c?a(c)[0].config:"",i=d.getFilters(c,!0,e,g);return void 0===f&&(f=!0),h&&f&&(h.lastCombinedFilter=null,h.lastSearch=[],b.searching(h.table,e,g),h.$table.triggerHandler("filterFomatterUpdate")),0!==i.length}}(a),function(a,b){"use strict";var c=a.tablesorter||{};a.extend(c.css,{sticky:"tablesorter-stickyHeader",stickyVis:"tablesorter-sticky-visible",stickyHide:"tablesorter-sticky-hidden",stickyWrap:"tablesorter-sticky-wrapper"}),c.addHeaderResizeEvent=function(b,c,d){if(b=a(b)[0],b.config){var e={timer:250},f=a.extend({},e,d),g=b.config,h=g.widgetOptions,i=function(a){var b,c,d,e,f,i,j=g.$headers.length;for(h.resize_flag=!0,c=[],b=0;b=0&&!e.$table.hasClass("hasFilters"))){var g,h,i,j,k=e.$table,l=a(f.stickyHeaders_attachTo),m=e.namespace+"stickyheaders ",n=a(f.stickyHeaders_yScroll||f.stickyHeaders_attachTo||b),o=a(f.stickyHeaders_xScroll||f.stickyHeaders_attachTo||b),p=k.children("thead:first"),q=p.children("tr").not(".sticky-false").children(),r=k.children("tfoot"),s=isNaN(f.stickyHeaders_offset)?a(f.stickyHeaders_offset):"",t=s.length?s.height()||0:parseInt(f.stickyHeaders_offset,10)||0,u=k.parent().closest("."+c.css.table).hasClass("hasStickyHeaders")?k.parent().closest("table.tablesorter")[0].config.widgetOptions.$sticky.parent():[],v=u.length?u.height():0,w=f.$sticky=k.clone().addClass("containsStickyHeaders "+c.css.sticky+" "+f.stickyHeaders+" "+e.namespace.slice(1)+"_extra_table").wrap('
'),x=w.parent().addClass(c.css.stickyHide).css({position:l.length?"absolute":"fixed",padding:parseInt(w.parent().parent().css("padding-left"),10),top:t+v,left:0,visibility:"hidden",zIndex:f.stickyHeaders_zIndex||2}),y=w.children("thead:first"),z="",A=0,B=function(a,c){var d,e,f,g,h,i=a.filter(":visible"),j=i.length;for(d=0;dd.top&&j=0&&e.$filters&&e.$filters.eq(g).find("a, select, input").filter(":visible").focus())}),c.filter.bindSearch(k,j.find("."+c.css.filter)),f.filter_hideFilters&&c.filter.hideFilters(e,w)),f.stickyHeaders_addResizeEvent&&k.bind("resize"+e.namespace+"stickyheaders",function(){C()}),k.triggerHandler("stickyHeadersInit")}},remove:function(d,e,f){var g=e.namespace+"stickyheaders ";e.$table.removeClass("hasStickyHeaders").unbind("pagerComplete resize filterEnd stickyHeadersUpdate ".split(" ").join(g).replace(/\s+/g," ")).next("."+c.css.stickyWrap).remove(),f.$sticky&&f.$sticky.length&&f.$sticky.remove(),a(b).add(f.stickyHeaders_xScroll).add(f.stickyHeaders_yScroll).add(f.stickyHeaders_attachTo).unbind("scroll resize ".split(" ").join(g).replace(/\s+/g," ")),c.addHeaderResizeEvent(d,!0)}})}(a,window),function(a,b){"use strict";var c=a.tablesorter||{};a.extend(c.css,{resizableContainer:"tablesorter-resizable-container",resizableHandle:"tablesorter-resizable-handle",resizableNoSelect:"tablesorter-disableSelection",resizableStorage:"tablesorter-resizable"}),a(function(){var b="";a("head").append(b)}),c.resizable={init:function(b,d){if(!b.$table.hasClass("hasResizable")){b.$table.addClass("hasResizable");var e,f,g,h,i=b.$table,j=i.parent(),k=parseInt(i.css("margin-top"),10),l=d.resizable_vars={useStorage:c.storage&&!1!==d.resizable,$wrap:j,mouseXPosition:0,$target:null,$next:null,overflow:"auto"===j.css("overflow")||"scroll"===j.css("overflow")||"auto"===j.css("overflow-x")||"scroll"===j.css("overflow-x"),storedSizes:[]};for(c.resizableReset(b.table,!0),l.tableWidth=i.width(),l.fullWidth=Math.abs(j.width()-l.tableWidth)<20,l.useStorage&&l.overflow&&(c.storage(b.table,"tablesorter-table-original-css-width",l.tableWidth),h=c.storage(b.table,"tablesorter-table-resized-width")||"auto",c.resizable.setWidth(i,h,!0)),d.resizable_vars.storedSizes=g=(l.useStorage?c.storage(b.table,c.css.resizableStorage):[])||[],c.resizable.setWidths(b,d,g),c.resizable.updateStoredSizes(b,d),d.$resizable_container=a('
').css({top:k}).insertBefore(i),f=0;f').appendTo(d.$resizable_container).attr({"data-column":f,unselectable:"on"}).data("header",e).bind("selectstart",!1);c.resizable.bindings(b,d)}},updateStoredSizes:function(a,b){var c,d,e=a.columns,f=b.resizable_vars;for(f.storedSizes=[],c=0;c0){for(h.storedSizes[h.target]+=k,c.resizable.setWidth(h.$target,h.storedSizes[h.target],!0),f=0;f0?d.sortList=k:c.hasInitialized&&k&&k.length>0&&b.sortOn(d,k))},remove:function(a,c){c.$table.removeClass("hasSaveSort"),b.storage&&b.storage(a,"tablesorter-savesort","")}})}(a),a.tablesorter}); \ No newline at end of file +/*! tablesorter (FORK) - updated 05-16-2017 (v2.28.10)*/ +!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(t){"use strict";var r=t.tablesorter={version:"2.28.10",parsers:[],widgets:[],defaults:{theme:"default",widthFixed:!1,showProcessing:!1,headerTemplate:"{content}",onRenderTemplate:null,onRenderHeader:null,cancelSelection:!0,tabIndex:!0,dateFormat:"mmddyyyy",sortMultiSortKey:"shiftKey",sortResetKey:"ctrlKey",usNumberFormat:!0,delayInit:!1,serverSideSorting:!1,resort:!0,headers:{},ignoreCase:!0,sortForce:null,sortList:[],sortAppend:null,sortStable:!1,sortInitialOrder:"asc",sortLocaleCompare:!1,sortReset:!1,sortRestart:!1,emptyTo:"bottom",stringTo:"max",duplicateSpan:!0,textExtraction:"basic",textAttribute:"data-text",textSorter:null,numberSorter:null,initWidgets:!0,widgetClass:"widget-{name}",widgets:[],widgetOptions:{zebra:["even","odd"]},initialized:null,tableClass:"",cssAsc:"",cssDesc:"",cssNone:"",cssHeader:"",cssHeaderRow:"",cssProcessing:"",cssChildRow:"tablesorter-childRow",cssInfoBlock:"tablesorter-infoOnly",cssNoSort:"tablesorter-noSort",cssIgnoreRow:"tablesorter-ignoreRow",cssIcon:"tablesorter-icon",cssIconNone:"",cssIconAsc:"",cssIconDesc:"",pointerClick:"click",pointerDown:"mousedown",pointerUp:"mouseup",selectorHeaders:"> thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me",debug:!1,headerList:[],empties:{},strings:{},parsers:[],globalize:0,imgAttr:0},css:{table:"tablesorter",cssHasChild:"tablesorter-hasChildRow",childRow:"tablesorter-childRow",colgroup:"tablesorter-colgroup",header:"tablesorter-header",headerRow:"tablesorter-headerRow",headerIn:"tablesorter-header-inner",icon:"tablesorter-icon",processing:"tablesorter-processing",sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc",sortNone:"tablesorter-headerUnSorted"},language:{sortAsc:"Ascending sort applied, ",sortDesc:"Descending sort applied, ",sortNone:"No sort applied, ",sortDisabled:"sorting is disabled",nextAsc:"activate to apply an ascending sort",nextDesc:"activate to apply a descending sort",nextNone:"activate to remove the sort"},regex:{templateContent:/\{content\}/g,templateIcon:/\{icon\}/g,templateName:/\{name\}/i,spaces:/\s+/g,nonWord:/\W/g,formElements:/(input|select|button|textarea)/i,chunk:/(^([+\-]?(?:\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,chunks:/(^\\0|\\0$)/,hex:/^0x[0-9a-f]+$/i,comma:/,/g,digitNonUS:/[\s|\.]/g,digitNegativeTest:/^\s*\([.\d]+\)/,digitNegativeReplace:/^\s*\(([.\d]+)\)/,digitTest:/^[\-+(]?\d+[)]?$/,digitReplace:/[,.'"\s]/g},string:{max:1,min:-1,emptymin:1,emptymax:-1,zero:0,none:0,null:0,top:!0,bottom:!1},keyCodes:{enter:13},dates:{},instanceMethods:{},setup:function(e,a){if(!e||!e.tHead||0===e.tBodies.length||!0===e.hasInitialized)return void(a.debug&&(e.hasInitialized?console.warn("Stopping initialization. Tablesorter has already been initialized"):console.error("Stopping initialization! No table, thead or tbody",e)));var i="",s=t(e),o=t.metadata;e.hasInitialized=!1,e.isProcessing=!0,e.config=a,t.data(e,"tablesorter",a),a.debug&&(console[console.group?"group":"log"]("Initializing tablesorter v"+r.version),t.data(e,"startoveralltimer",new Date)),a.supportsDataObject=function(e){return e[0]=parseInt(e[0],10),e[0]>1||1===e[0]&&parseInt(e[1],10)>=4}(t.fn.jquery.split(".")),a.emptyTo=a.emptyTo.toLowerCase(),a.stringTo=a.stringTo.toLowerCase(),a.last={sortList:[],clickedIndex:-1},/tablesorter\-/.test(s.attr("class"))||(i=""!==a.theme?" tablesorter-"+a.theme:""),a.namespace?a.namespace="."+a.namespace.replace(r.regex.nonWord,""):a.namespace=".tablesorter"+Math.random().toString(16).slice(2),a.table=e,a.$table=s.addClass(r.css.table+" "+a.tableClass+i+" "+a.namespace.slice(1)).attr("role","grid"),a.$headers=s.find(a.selectorHeaders),a.$table.children().children("tr").attr("role","row"),a.$tbodies=s.children("tbody:not(."+a.cssInfoBlock+")").attr({"aria-live":"polite","aria-relevant":"all"}),a.$table.children("caption").length&&((i=a.$table.children("caption")[0]).id||(i.id=a.namespace.slice(1)+"caption"),a.$table.attr("aria-labelledby",i.id)),a.widgetInit={},a.textExtraction=a.$table.attr("data-text-extraction")||a.textExtraction||"basic",r.buildHeaders(a),r.fixColumnWidth(e),r.addWidgetFromClass(e),r.applyWidgetOptions(e),r.setupParsers(a),a.totalRows=0,r.validateOptions(a),a.delayInit||r.buildCache(a),r.bindEvents(e,a.$headers,!0),r.bindMethods(a),a.supportsDataObject&&void 0!==s.data().sortlist?a.sortList=s.data().sortlist:o&&s.metadata()&&s.metadata().sortlist&&(a.sortList=s.metadata().sortlist),r.applyWidget(e,!0),a.sortList.length>0?r.sortOn(a,a.sortList,{},!a.initWidgets):(r.setHeadersCss(a),a.initWidgets&&r.applyWidget(e,!1)),a.showProcessing&&s.unbind("sortBegin"+a.namespace+" sortEnd"+a.namespace).bind("sortBegin"+a.namespace+" sortEnd"+a.namespace,function(t){clearTimeout(a.timerProcessing),r.isProcessing(e),"sortBegin"===t.type&&(a.timerProcessing=setTimeout(function(){r.isProcessing(e,!0)},500))}),e.hasInitialized=!0,e.isProcessing=!1,a.debug&&(console.log("Overall initialization time:"+r.benchmark(t.data(e,"startoveralltimer"))),a.debug&&console.groupEnd&&console.groupEnd()),s.triggerHandler("tablesorter-initialized",e),"function"==typeof a.initialized&&a.initialized(e)},bindMethods:function(e){var a=e.$table,i=e.namespace,s="sortReset update updateRows updateAll updateHeaders addRows updateCell updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave ".split(" ").join(i+" ");a.unbind(s.replace(r.regex.spaces," ")).bind("sortReset"+i,function(e,t){e.stopPropagation(),r.sortReset(this.config,function(e){e.isApplyingWidgets?setTimeout(function(){r.applyWidget(e,"",t)},100):r.applyWidget(e,"",t)})}).bind("updateAll"+i,function(e,t,a){e.stopPropagation(),r.updateAll(this.config,t,a)}).bind("update"+i+" updateRows"+i,function(e,t,a){e.stopPropagation(),r.update(this.config,t,a)}).bind("updateHeaders"+i,function(e,t){e.stopPropagation(),r.updateHeaders(this.config,t)}).bind("updateCell"+i,function(e,t,a,i){e.stopPropagation(),r.updateCell(this.config,t,a,i)}).bind("addRows"+i,function(e,t,a,i){e.stopPropagation(),r.addRows(this.config,t,a,i)}).bind("updateComplete"+i,function(){this.isUpdating=!1}).bind("sorton"+i,function(e,t,a,i){e.stopPropagation(),r.sortOn(this.config,t,a,i)}).bind("appendCache"+i,function(e,a,i){e.stopPropagation(),r.appendCache(this.config,i),t.isFunction(a)&&a(this)}).bind("updateCache"+i,function(e,t,a){e.stopPropagation(),r.updateCache(this.config,t,a)}).bind("applyWidgetId"+i,function(e,t){e.stopPropagation(),r.applyWidgetId(this,t)}).bind("applyWidgets"+i,function(e,t){e.stopPropagation(),r.applyWidget(this,t)}).bind("refreshWidgets"+i,function(e,t,a){e.stopPropagation(),r.refreshWidgets(this,t,a)}).bind("removeWidget"+i,function(e,t,a){e.stopPropagation(),r.removeWidget(this,t,a)}).bind("destroy"+i,function(e,t,a){e.stopPropagation(),r.destroy(this,t,a)}).bind("resetToLoadState"+i,function(a){a.stopPropagation(),r.removeWidget(this,!0,!1);var i=t.extend(!0,{},e.originalSettings);(e=t.extend(!0,{},r.defaults,i)).originalSettings=i,this.hasInitialized=!1,r.setup(this,e)})},bindEvents:function(e,a,i){var s,o=(e=t(e)[0]).config,n=o.namespace,l=null;!0!==i&&(a.addClass(n.slice(1)+"_extra_headers"),(s=t.fn.closest?a.closest("table")[0]:a.parents("table")[0])&&"TABLE"===s.nodeName&&s!==e&&t(s).addClass(n.slice(1)+"_extra_table")),s=(o.pointerDown+" "+o.pointerUp+" "+o.pointerClick+" sort keyup ").replace(r.regex.spaces," ").split(" ").join(n+" "),a.find(o.selectorSort).add(a.filter(o.selectorSort)).unbind(s).bind(s,function(e,i){var s,n,d,c=t(e.target),f=" "+e.type+" ";if(!(1!==(e.which||e.button)&&!f.match(" "+o.pointerClick+" | sort | keyup ")||" keyup "===f&&e.which!==r.keyCodes.enter||f.match(" "+o.pointerClick+" ")&&void 0!==e.which||f.match(" "+o.pointerUp+" ")&&l!==e.target&&!0!==i)){if(f.match(" "+o.pointerDown+" "))return l=e.target,void("1"===(d=c.jquery.split("."))[0]&&d[1]<4&&e.preventDefault());if(l=null,r.regex.formElements.test(e.target.nodeName)||c.hasClass(o.cssNoSort)||c.parents("."+o.cssNoSort).length>0||c.parents("button").length>0)return!o.cancelSelection;o.delayInit&&r.isEmptyObject(o.cache)&&r.buildCache(o),s=t.fn.closest?t(this).closest("th, td"):/TH|TD/.test(this.nodeName)?t(this):t(this).parents("th, td"),d=a.index(s),o.last.clickedIndex=d<0?s.attr("data-column"):d,(n=o.$headers[o.last.clickedIndex])&&!n.sortDisabled&&r.initSort(o,n,e)}}),o.cancelSelection&&a.attr("unselectable","on").bind("selectstart",!1).css({"user-select":"none",MozUserSelect:"none"})},buildHeaders:function(e){var a,i,s,o;for(e.headerList=[],e.headerContent=[],e.sortVars=[],e.debug&&(s=new Date),e.columns=r.computeColumnIndex(e.$table.children("thead, tfoot").children("tr")),i=e.cssIcon?'':"",e.$headers=t(t.map(e.$table.find(e.selectorHeaders),function(a,s){var o,n,l,d,c,f=t(a);if(!f.parent().hasClass(e.cssIgnoreRow))return o=r.getColumnData(e.table,e.headers,s,!0),e.headerContent[s]=f.html(),""===e.headerTemplate||f.find("."+r.css.headerIn).length||(d=e.headerTemplate.replace(r.regex.templateContent,f.html()).replace(r.regex.templateIcon,f.find("."+r.css.icon).length?"":i),e.onRenderTemplate&&(n=e.onRenderTemplate.apply(f,[s,d]))&&"string"==typeof n&&(d=n),f.html('
'+d+"
")),e.onRenderHeader&&e.onRenderHeader.apply(f,[s,e,e.$table]),l=parseInt(f.attr("data-column"),10),a.column=l,c=r.getOrder(r.getData(f,o,"sortInitialOrder")||e.sortInitialOrder),e.sortVars[l]={count:-1,order:c?e.sortReset?[1,0,2]:[1,0]:e.sortReset?[0,1,2]:[0,1],lockedOrder:!1},void 0!==(c=r.getData(f,o,"lockedOrder")||!1)&&!1!==c&&(e.sortVars[l].lockedOrder=!0,e.sortVars[l].order=r.getOrder(c)?[1,1]:[0,0]),e.headerList[s]=a,f.addClass(r.css.header+" "+e.cssHeader).parent().addClass(r.css.headerRow+" "+e.cssHeaderRow).attr("role","row"),e.tabIndex&&f.attr("tabindex",0),a})),e.$headerIndexed=[],o=0;o0))for(n+=s,o+=s;s+1>0;)i.parsers[n-s]=u,i.extractors[n-s]=p,s--;n++}y+=i.parsers.length?m:1}e.debug&&(r.isEmptyObject(w)?console.warn(" No parsers detected!"):console[console.table?"table":"log"](w),console.log("Completed detecting parsers"+r.benchmark(g)),console.groupEnd&&console.groupEnd()),e.parsers=i.parsers,e.extractors=i.extractors},addParser:function(e){var t,a=r.parsers.length,i=!0;for(t=0;t=0;)if((o=r.parsers[d])&&"text"!==o.id&&o.is&&o.is(f,e.table,c,n))return o;return r.getParserById("text")},getElementText:function(e,a,i){if(!a)return"";var s,o=e.textExtraction||"",n=a.jquery?a:t(a);return"string"==typeof o?"basic"===o&&void 0!==(s=n.attr(e.textAttribute))?t.trim(s):t.trim(a.textContent||n.text()):"function"==typeof o?t.trim(o(n[0],e.table,i)):"function"==typeof(s=r.getColumnData(e.table,o,i))?t.trim(s(n[0],e.table,i)):t.trim(n[0].textContent||n.text())},getParsedText:function(e,t,a,i){void 0===i&&(i=r.getElementText(e,t,a));var s=""+i,o=e.parsers[a],n=e.extractors[a];return o&&(n&&"function"==typeof n.format&&(i=n.format(i,e.table,t,a)),s="no-parser"===o.id?"":o.format(""+i,e.table,t,a),e.ignoreCase&&"string"==typeof s&&(s=s.toLowerCase())),s},buildCache:function(e,a,i){var s,o,n,l,d,c,f,u,p,g,h,m,b,y,w,v,x,C,_,$,S,z,F=e.table,R=e.parsers;if(e.$tbodies=e.$table.children("tbody:not(."+e.cssInfoBlock+")"),f=void 0===i?e.$tbodies:i,e.cache={},e.totalRows=0,!R)return e.debug?console.warn("Warning: *Empty table!* Not building a cache"):"";for(e.debug&&(m=new Date),e.showProcessing&&r.isProcessing(F,!0),c=0;c0&&(C+=x,$+=x)),C++;else{for(y.$row=u,y.order=l,C=0,$=e.columns,d=0;d<$;++d){if((h=u[0].cells[d])&&C0)){for(z=0;z<=x;)n=e.duplicateSpan||0===z?o:"string"!=typeof e.textExtraction?r.getElementText(e,h,C+z)||"":"",y.raw[C+z]=n,p[C+z]=n,z++;C+=x,$+=x}C++}p[e.columns]=y,s.normalized[s.normalized.length]=p}s.colMax=v,e.totalRows+=s.normalized.length}if(e.showProcessing&&r.isProcessing(F),e.debug){for(S=Math.min(5,e.cache[0].normalized.length),console[console.group?"group":"log"]("Building cache for "+e.totalRows+" rows (showing "+S+" rows in log) and "+e.columns+" columns"+r.benchmark(m)),o={},d=0;d-1);return a}),(a=a.not(".sorter-false").filter('[data-column="'+o[i][0]+'"]'+(1===n?":last":""))).length)){for(s=0;s=0?s:o[1]%f.length}},updateAll:function(e,t,a){var i=e.table;i.isUpdating=!0,r.refreshWidgets(i,!0,!0),r.buildHeaders(e),r.bindEvents(i,e.$headers,!0),r.bindMethods(e),r.commonUpdate(e,t,a)},update:function(e,t,a){e.table.isUpdating=!0,r.updateHeader(e),r.commonUpdate(e,t,a)},updateHeaders:function(e,t){e.table.isUpdating=!0,r.buildHeaders(e),r.bindEvents(e.table,e.$headers,!0),r.resortComplete(e,t)},updateCell:function(e,a,i,s){if(t(a).closest("tr").hasClass(e.cssChildRow))return void console.warn('Tablesorter Warning! "updateCell" for child row content has been disabled, use "update" instead');if(r.isEmptyObject(e.cache))return r.updateHeader(e),void r.commonUpdate(e,i,s);e.table.isUpdating=!0,e.$table.find(e.selectorRemove).remove();var o,n,l,d,c,f,u=e.$tbodies,p=t(a),g=u.index(t.fn.closest?p.closest("tbody"):p.parents("tbody").filter(":first")),h=e.cache[g],m=t.fn.closest?p.closest("tr"):p.parents("tr").filter(":first");if(a=p[0],u.length&&g>=0){if(l=u.eq(g).find("tr").not("."+e.cssChildRow).index(m),c=h.normalized[l],(f=m[0].cells.length)!==e.columns)for(d=0,o=!1,n=0;n0&&(h+=w),h++;b[a.columns]=m,a.cache[d].normalized[g]=b}r.checkResort(a,s,o)}},updateCache:function(e,t,a){e.parsers&&e.parsers.length||r.setupParsers(e,a),r.buildCache(e,t,a)},appendCache:function(e,t){var a,i,s,o,n,l,d,c=e.table,f=e.widgetOptions,u=e.$tbodies,p=[],g=e.cache;if(r.isEmptyObject(g))return e.appender?e.appender(c,p):c.isUpdating?e.$table.triggerHandler("updateComplete",c):"";for(e.debug&&(d=new Date),l=0;l1))for(o=1;o=0)for(o=0;o1))for(o=1;oi)return 1}for(a=(e||"").replace(d.chunk,"\\0$1\\0").replace(d.chunks,"").split("\\0"),i=(t||"").replace(d.chunk,"\\0$1\\0").replace(d.chunks,"").split("\\0"),l=Math.max(a.length,i.length),n=0;no)return 1}return 0},sortNaturalAsc:function(e,t,a,i){if(e===t)return 0;var s=r.string[i.empties[a]||i.emptyTo];return""===e&&0!==s?"boolean"==typeof s?s?-1:1:-s||-1:""===t&&0!==s?"boolean"==typeof s?s?1:-1:s||1:r.sortNatural(e,t)},sortNaturalDesc:function(e,t,a,i){if(e===t)return 0;var s=r.string[i.empties[a]||i.emptyTo];return""===e&&0!==s?"boolean"==typeof s?s?-1:1:s||1:""===t&&0!==s?"boolean"==typeof s?s?1:-1:-s||-1:r.sortNatural(t,e)},sortText:function(e,t){return e>t?1:e=0&&!0!==i&&d.widgets.splice(n,1),o&&o.remove&&(d.debug&&console.log((i?"Refreshing":"Removing")+' "'+a[s]+'" widget'),o.remove(e,d,d.widgetOptions,i),d.widgetInit[a[s]]=!1)},refreshWidgets:function(e,a,i){var s,o,n=(e=t(e)[0]).config.widgets,l=r.widgets,d=l.length,c=[],f=function(e){t(e).triggerHandler("refreshComplete")};for(s=0;s'),a=l.$table.width(),o=(s=l.$tbodies.find("tr:first").children(":visible")).length,n=0;n").css("width",i));l.$table.prepend(d)}},getData:function(e,r,a){var i,s,o="",n=t(e);return n.length?(i=!!t.metadata&&n.metadata(),s=" "+(n.attr("class")||""),void 0!==n.data(a)||void 0!==n.data(a.toLowerCase())?o+=n.data(a)||n.data(a.toLowerCase()):i&&void 0!==i[a]?o+=i[a]:r&&void 0!==r[a]?o+=r[a]:" "!==s&&s.match(" "+a+"-")&&(o=s.match(new RegExp("\\s"+a+"-([\\w-]+)"))[1]||""),t.trim(o)):""},getColumnData:function(e,r,a,i,s){if("object"!=typeof r||null===r)return r;var o,n=(e=t(e)[0]).config,l=s||n.$headers,d=n.$headerIndexed&&n.$headerIndexed[a]||l.filter('[data-column="'+a+'"]:last');if(void 0!==r[a])return i?r[a]:r[l.index(d)];for(o in r)if("string"==typeof o&&d.filter(o).add(d.find(o)).length)return r[o]},isProcessing:function(e,a,i){var s=(e=t(e))[0].config,o=i||e.find("."+r.css.header);a?(void 0!==i&&s.sortList.length>0&&(o=o.filter(function(){return!this.sortDisabled&&r.isValueInArray(parseFloat(t(this).attr("data-column")),s.sortList)>=0})),e.add(o).addClass(r.css.processing+" "+s.cssProcessing)):e.add(o).removeClass(r.css.processing+" "+s.cssProcessing)},processTbody:function(e,r,a){if(e=t(e)[0],a)return e.isProcessing=!0,r.before(''),t.fn.detach?r.detach():r.remove();var i=t(e).find("colgroup.tablesorter-savemyplace");r.insertAfter(i),i.remove(),e.isProcessing=!1},clearTableBody:function(e){t(e)[0].config.$tbodies.children().detach()},characterEquivalents:{a:"áàâãäąå",A:"ÁÀÂÃÄĄÅ",c:"çćč",C:"ÇĆČ",e:"éèêëěę",E:"ÉÈÊËĚĘ",i:"íìİîïı",I:"ÍÌİÎÏ",o:"óòôõöō",O:"ÓÒÔÕÖŌ",ss:"ß",SS:"ẞ",u:"úùûüů",U:"ÚÙÛÜŮ"},replaceAccents:function(e){var t,a="[",i=r.characterEquivalents;if(!r.characterRegex){r.characterRegexArray={};for(t in i)"string"==typeof t&&(a+=i[t],r.characterRegexArray[t]=new RegExp("["+i[t]+"]","g"));r.characterRegex=new RegExp(a+"]")}if(r.characterRegex.test(e))for(t in i)"string"==typeof t&&(e=e.replace(r.characterRegexArray[t],t));return e},validateOptions:function(e){var a,i,s,o,n="headers sortForce sortList sortAppend widgets".split(" "),l=e.originalSettings;if(l){e.debug&&(o=new Date);for(a in l)if("undefined"===(s=typeof r.defaults[a]))console.warn('Tablesorter Warning! "table.config.'+a+'" option not recognized');else if("object"===s)for(i in l[a])s=r.defaults[a]&&typeof r.defaults[a][i],t.inArray(a,n)<0&&"undefined"===s&&console.warn('Tablesorter Warning! "table.config.'+a+"."+i+'" option not recognized');e.debug&&console.log("validate options time:"+r.benchmark(o))}},restoreHeaders:function(e){var a,i,s=t(e)[0].config,o=s.$table.find(s.selectorHeaders),n=o.length;for(a=0;a tr").children("th, td");!1===a&&t.inArray("uitheme",n.widgets)>=0&&(o.triggerHandler("applyWidgetId",["uitheme"]),o.triggerHandler("applyWidgetId",["zebra"])),d.find("tr").not(c).remove(),s="sortReset update updateRows updateAll updateHeaders updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets removeWidget destroy mouseup mouseleave "+"keypress sortBegin sortEnd resetToLoadState ".split(" ").join(n.namespace+" "),o.removeData("tablesorter").unbind(s.replace(r.regex.spaces," ")),n.$headers.add(f).removeClass([r.css.header,n.cssHeader,n.cssAsc,n.cssDesc,r.css.sortAsc,r.css.sortDesc,r.css.sortNone].join(" ")).removeAttr("data-column").removeAttr("aria-label").attr("aria-disabled","true"),c.find(n.selectorSort).unbind("mousedown mouseup keypress ".split(" ").join(n.namespace+" ").replace(r.regex.spaces," ")),r.restoreHeaders(e),o.toggleClass(r.css.table+" "+n.tableClass+" tablesorter-"+n.theme,!1===a),o.removeClass(n.namespace.slice(1)),e.hasInitialized=!1,delete e.config.cache,"function"==typeof i&&i(e),l&&console.log("tablesorter has been removed")}}};t.fn.tablesorter=function(e){return this.each(function(){var a=this,i=t.extend(!0,{},r.defaults,e,r.instanceMethods);i.originalSettings=e,!a.hasInitialized&&r.buildTable&&"TABLE"!==this.nodeName?r.buildTable(a,i):r.setup(a,i)})},window.console&&window.console.log||(r.logs=[],console={},console.log=console.warn=console.error=console.table=function(){var e=arguments.length>1?arguments:arguments[0];r.logs[r.logs.length]={date:Date.now(),log:e}}),r.addParser({id:"no-parser",is:function(){return!1},format:function(){return""},type:"text"}),r.addParser({id:"text",is:function(){return!0},format:function(e,a){var i=a.config;return e&&(e=t.trim(i.ignoreCase?e.toLocaleLowerCase():e),e=i.sortLocaleCompare?r.replaceAccents(e):e),e},type:"text"}),r.regex.nondigit=/[^\w,. \-()]/g,r.addParser({id:"digit",is:function(e){return r.isDigit(e)},format:function(e,a){var i=r.formatFloat((e||"").replace(r.regex.nondigit,""),a);return e&&"number"==typeof i?i:e?t.trim(e&&a.config.ignoreCase?e.toLocaleLowerCase():e):e},type:"numeric"}),r.regex.currencyReplace=/[+\-,. ]/g,r.regex.currencyTest=/^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/,r.addParser({id:"currency",is:function(e){return e=(e||"").replace(r.regex.currencyReplace,""),r.regex.currencyTest.test(e)},format:function(e,a){var i=r.formatFloat((e||"").replace(r.regex.nondigit,""),a);return e&&"number"==typeof i?i:e?t.trim(e&&a.config.ignoreCase?e.toLocaleLowerCase():e):e},type:"numeric"}),r.regex.urlProtocolTest=/^(https?|ftp|file):\/\//,r.regex.urlProtocolReplace=/(https?|ftp|file):\/\/(www\.)?/,r.addParser({id:"url",is:function(e){return r.regex.urlProtocolTest.test(e)},format:function(e){return e?t.trim(e.replace(r.regex.urlProtocolReplace,"")):e},type:"text"}),r.regex.dash=/-/g,r.regex.isoDate=/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}/,r.addParser({id:"isoDate",is:function(e){return r.regex.isoDate.test(e)},format:function(e,t){var a=e?new Date(e.replace(r.regex.dash,"/")):e;return a instanceof Date&&isFinite(a)?a.getTime():e},type:"numeric"}),r.regex.percent=/%/g,r.regex.percentTest=/(\d\s*?%|%\s*?\d)/,r.addParser({id:"percent",is:function(e){return r.regex.percentTest.test(e)&&e.length<15},format:function(e,t){return e?r.formatFloat(e.replace(r.regex.percent,""),t):e},type:"numeric"}),r.addParser({id:"image",is:function(e,t,r,a){return a.find("img").length>0},format:function(e,r,a){return t(a).find("img").attr(r.config.imgAttr||"alt")||e},parsed:!0,type:"text"}),r.regex.dateReplace=/(\S)([AP]M)$/i,r.regex.usLongDateTest1=/^[A-Z]{3,10}\.?\s+\d{1,2},?\s+(\d{4})(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?$/i,r.regex.usLongDateTest2=/^\d{1,2}\s+[A-Z]{3,10}\s+\d{4}/i,r.addParser({id:"usLongDate",is:function(e){return r.regex.usLongDateTest1.test(e)||r.regex.usLongDateTest2.test(e)},format:function(e,t){var a=e?new Date(e.replace(r.regex.dateReplace,"$1 $2")):e;return a instanceof Date&&isFinite(a)?a.getTime():e},type:"numeric"}),r.regex.shortDateTest=/(^\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4})|(^\d{4}[\/\s]\d{1,2}[\/\s]\d{1,2})/,r.regex.shortDateReplace=/[\-.,]/g,r.regex.shortDateXXY=/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,r.regex.shortDateYMD=/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/,r.convertFormat=function(e,t){e=(e||"").replace(r.regex.spaces," ").replace(r.regex.shortDateReplace,"/"),"mmddyyyy"===t?e=e.replace(r.regex.shortDateXXY,"$3/$1/$2"):"ddmmyyyy"===t?e=e.replace(r.regex.shortDateXXY,"$3/$2/$1"):"yyyymmdd"===t&&(e=e.replace(r.regex.shortDateYMD,"$1/$2/$3"));var a=new Date(e);return a instanceof Date&&isFinite(a)?a.getTime():""},r.addParser({id:"shortDate",is:function(e){return e=(e||"").replace(r.regex.spaces," ").replace(r.regex.shortDateReplace,"/"),r.regex.shortDateTest.test(e)},format:function(e,t,a,i){if(e){var s=t.config,o=s.$headerIndexed[i],n=o.length&&o.data("dateFormat")||r.getData(o,r.getColumnData(t,s.headers,i),"dateFormat")||s.dateFormat;return o.length&&o.data("dateFormat",n),r.convertFormat(e,n)||e}return e},type:"numeric"}),r.regex.timeTest=/^(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)$|^((?:[01]\d|[2][0-4]):[0-5]\d)$/i,r.regex.timeMatch=/(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)/i,r.addParser({id:"time",is:function(e){return r.regex.timeTest.test(e)},format:function(e,t){var a,i=(e||"").match(r.regex.timeMatch),s=new Date(e),o=e&&(null!==i?i[0]:"00:00 AM"),n=o?new Date("2000/01/01 "+o.replace(r.regex.dateReplace,"$1 $2")):o;return n instanceof Date&&isFinite(n)?(a=s instanceof Date&&isFinite(s)?s.getTime():0,a?parseFloat(n.getTime()+"."+s.getTime()):n.getTime()):e},type:"numeric"}),r.addParser({id:"metadata",is:function(){return!1},format:function(e,r,a){var i=r.config,s=i.parserMetadataName?i.parserMetadataName:"sortValue";return t(a).metadata()[s]},type:"numeric"}),r.addWidget({id:"zebra",priority:90,format:function(e,r,a){var i,s,o,n,l,d,c,f=new RegExp(r.cssChildRow,"i"),u=r.$tbodies.add(t(r.namespace+"_extra_table").children("tbody:not(."+r.cssInfoBlock+")"));for(l=0;l
')}),a.cssIcon&&v.find("."+t.css.icon).removeClass(b?[g.icons,m].join(" "):"").addClass(C.icons||""),t.hasWidget(a.table,"filter")&&(o=function(){w.children("thead").children("."+t.css.filterRow).removeClass(b?g.filterRow||"":"").addClass(C.filterRow||"")},i.filter_initialized?o():w.one("filterInit",function(){o()}))),s=0;s1)))for(u=1;u=]/g,query:"(q|query)",wild01:/\?/g,wild0More:/\*/g,quote:/\"/g,isNeg1:/(>=?\s*-\d)/,isNeg2:/(<=?\s*\d)/},types:{or:function(a,i,s){if((r.orTest.test(i.iFilter)||r.orSplit.test(i.filter))&&!r.regex.test(i.filter)){var o,n,l,d,c=e.extend({},i),f=i.filter.split(r.orSplit),u=i.iFilter.split(r.orSplit),p=f.length;for(o=0;o=f:o>f:r.ltTest.test(s.iFilter)&&(n=r.lteTest.test(s.iFilter)?o<=f:o=0)))}return null},exact:function(a,i){if(r.exact.test(i.iFilter)){var s=i.iFilter.replace(r.exact,""),o=t.parseFilter(a,s,i)||"";return i.anyMatch?e.inArray(o,i.rowArray)>=0:o==i.iExact}return null},range:function(e,i){if(r.toTest.test(i.iFilter)){var s,o,n,l,d=e.table,c=i.index,f=i.parsed[c],u=i.iFilter.split(r.toSplit);return o=u[0].replace(a.regex.nondigit,"")||"",n=a.formatFloat(t.parseFilter(e,o,i),d),o=u[1].replace(a.regex.nondigit,"")||"",l=a.formatFloat(t.parseFilter(e,o,i),d),(f||"numeric"===e.parsers[c].type)&&(n=""===(s=e.parsers[c].format(""+u[0],d,e.$headers.eq(c),c))||isNaN(s)?n:s,l=""===(s=e.parsers[c].format(""+u[1],d,e.$headers.eq(c),c))||isNaN(s)?l:s),!f&&"numeric"!==e.parsers[c].type||isNaN(n)||isNaN(l)?(o=isNaN(i.iExact)?i.iExact.replace(a.regex.nondigit,""):i.iExact,s=a.formatFloat(o,d)):s=i.cache,n>l&&(o=n,n=l,l=o),s>=n&&s<=l||""===n||""===l}return null},wild:function(e,a){if(r.wildOrTest.test(a.iFilter)){var i=""+(t.parseFilter(e,a.iFilter,a)||"");!r.wildTest.test(i)&&a.nestedFilters&&(i=a.isMatch?i:"^("+i+")$");try{return new RegExp(i.replace(r.wild01,"\\S{1}").replace(r.wild0More,"\\S*"),e.widgetOptions.filter_ignoreCase?"i":"").test(a.exact)}catch(e){return null}}return null},fuzzy:function(e,a){if(r.fuzzyTest.test(a.iFilter)){var i,s=0,o=a.iExact.length,n=a.iFilter.slice(1),l=t.parseFilter(e,n,a)||"";for(i=0;i]=?/,gtTest:/>/,gteTest:/>=/,ltTest:/'+(d.data("placeholder")||d.attr("data-placeholder")||h.filter_placeholder.select||"")+"":"",f=n,l=n,n.indexOf(h.filter_selectSourceSeparator)>=0&&(l=(f=n.split(h.filter_selectSourceSeparator))[1],f=f[0]),o+="");g.$table.find("thead").find("select."+i.filter+'[data-column="'+c+'"]').append(o),(u="function"==typeof(l=h.filter_selectSource)||a.getColumnData(s,l,c))&&t.buildSelect(g.table,c,"",!0,d.hasClass(h.filter_onlyAvail))}t.buildDefault(s,!0),t.bindSearch(s,g.$table.find("."+i.filter),!0),h.filter_external&&t.bindSearch(s,h.filter_external),h.filter_hideFilters&&t.hideFilters(g),g.showProcessing&&(l="filterStart filterEnd ".split(" ").join(g.namespace+"filter "),g.$table.unbind(l.replace(a.regex.spaces," ")).bind(l,function(t,r){d=r?g.$table.find("."+i.header).filter("[data-column]").filter(function(){return""!==r[e(this).data("column")]}):"",a.isProcessing(s,"filterStart"===t.type,r?d:"")})),g.filteredRows=g.totalRows,l="tablesorter-initialized pagerBeforeInitialized ".split(" ").join(g.namespace+"filter "),g.$table.unbind(l.replace(a.regex.spaces," ")).bind(l,function(){t.completeInit(this)}),g.pager&&g.pager.initialized&&!h.filter_initialized?(g.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){t.filterInitComplete(g)},100)):h.filter_initialized||t.completeInit(s)},completeInit:function(e){var r=e.config,i=r.widgetOptions,s=t.setDefaults(e,r,i)||[];s.length&&(r.delayInit&&""===s.join("")||a.setFilters(e,s,!0)),r.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){i.filter_initialized||t.filterInitComplete(r)},100)},formatterUpdated:function(e,t){var r=e&&e.closest("table")[0].config.widgetOptions;r&&!r.filter_initialized&&(r.filter_formatterInit[t]=1)},filterInitComplete:function(r){var a,i,s=r.widgetOptions,o=0,n=function(){s.filter_initialized=!0,r.lastSearch=r.$table.data("lastSearch"),r.$table.triggerHandler("filterInit",r),t.findRows(r.table,r.lastSearch||[])};if(e.isEmptyObject(s.filter_formatter))n();else{for(i=s.filter_formatterInit.length,a=0;a';for(d=0;d1?'").appendTo(s.$table.children("thead").eq(0)).children("td"),d=0;d").appendTo(n):((g=a.getColumnData(r,o.filter_formatter,d))?(o.filter_formatterCount++,(w=g(n,d))&&0===w.length&&(w=n.children("input")),w&&(0===w.parent().length||w.parent().length&&w.parent()[0]!==n[0])&&n.append(w)):w=e('').appendTo(n),w&&(h=c.data("placeholder")||c.attr("data-placeholder")||o.filter_placeholder.search||"",w.attr("placeholder",h))),w&&(p=(e.isArray(o.filter_cssFilter)?void 0!==o.filter_cssFilter[d]?o.filter_cssFilter[d]||"":"":o.filter_cssFilter)||"",w.addClass(i.filter+" "+p).attr("data-column",n.attr("data-column")),u&&(w.attr("placeholder","").addClass(i.filterDisabled)[0].disabled=!0)))},bindSearch:function(r,i,o){if(r=e(r)[0],(i=e(i)).length){var n,l=r.config,d=l.widgetOptions,c=l.namespace+"filter",f=d.filter_$externalFilters;!0!==o&&(n=d.filter_anyColumnSelector+","+d.filter_multipleColumnSelector,d.filter_$anyMatch=i.filter(n),f&&f.length?d.filter_$externalFilters=d.filter_$externalFilters.add(i):d.filter_$externalFilters=i,a.setFilters(r,l.$table.data("lastSearch")||[],!1===o)),n="keypress keyup keydown search change input ".split(" ").join(c+" "),i.attr("data-lastSearchTime",(new Date).getTime()).unbind(n.replace(a.regex.spaces," ")).bind("keydown"+c,function(e){if(e.which===s.escape&&!r.config.widgetOptions.filter_resetOnEsc)return!1}).bind("keyup"+c,function(i){d=r.config.widgetOptions;var o=parseInt(e(this).attr("data-column"),10),n="boolean"==typeof d.filter_liveSearch?d.filter_liveSearch:a.getColumnData(r,d.filter_liveSearch,o);if(void 0===n&&(n=d.filter_liveSearch.fallback||!1),e(this).attr("data-lastSearchTime",(new Date).getTime()),i.which===s.escape)this.value=d.filter_resetOnEsc?"":l.lastSearch[o];else{if(!1===n)return;if(""!==this.value&&("number"==typeof n&&this.value.length=s.left&&i.which<=s.down)))return}t.searching(r,!0,!0,o)}).bind("search change keypress input ".split(" ").join(c+" "),function(i){var o=parseInt(e(this).attr("data-column"),10),n="boolean"==typeof d.filter_liveSearch?d.filter_liveSearch:a.getColumnData(r,d.filter_liveSearch,o);!r.config.widgetOptions.filter_initialized||i.which!==s.enter&&"search"!==i.type&&("change"!==i.type&&"input"!==i.type||!0!==n||this.value===l.lastSearch[o])||(i.preventDefault(),e(this).attr("data-lastSearchTime",(new Date).getTime()),t.searching(r,"keypress"!==i.type,!0,o))})}},searching:function(e,r,i,s){var o,n=e.config.widgetOptions;void 0===s?o=!1:void 0===(o="boolean"==typeof n.filter_liveSearch?n.filter_liveSearch:a.getColumnData(e,n.filter_liveSearch,s))&&(o=n.filter_liveSearch.fallback||!1),clearTimeout(n.filter_searchTimer),void 0===r||!0===r?n.filter_searchTimer=setTimeout(function(){t.checkFilters(e,r,i)},o?n.filter_searchDelay:10):t.checkFilters(e,r,i)},equalFilters:function(t,r,a){var i,s=[],o=[],n=t.columns+1;for(r=e.isArray(r)?r:[],a=e.isArray(a)?a:[],i=0;i1?e.trim(t).split(/\s/):[e.trim(t)],n=o.length-1,l=0,d=a;for(n<1&&s>1&&(o[1]=o[0]);i.test(d);)d=d.replace(i,o[l++]||""),i.test(d)&&l(n=parseInt(s[1],10)||e.columns-1)&&(a=o,o=n,n=a),n>=e.columns&&(n=e.columns-1);o<=n;o++)u[u.length]=o;t=t.replace(i[c],"")}if(!r&&/,/.test(t))for(f=(l=t.split(/\s*,\s*/)).length,d=0;d-1})},multipleColumns:function(r,a){var i=r.widgetOptions,s=i.filter_initialized||!a.filter(i.filter_anyColumnSelector).length,o=e.trim(t.getLatestSearch(a).attr("data-column")||"");return t.findRange(r,o,!s)},processTypes:function(r,a,i){var s,o=null,n=null;for(s in t.types)e.inArray(s,i.excludeMatch)<0&&null===n&&null!==(n=t.types[s](r,a,i))&&(o=n);return o},matchType:function(e,t){var r,a=e.widgetOptions,s=e.$headerIndexed[t];return s.hasClass("filter-exact")?r=!1:s.hasClass("filter-match")?r=!0:(a.filter_columnFilters?s=e.$filters.find("."+i.filter).add(a.filter_$externalFilters).filter('[data-column="'+t+'"]'):a.filter_$externalFilters&&(s=a.filter_$externalFilters.filter('[data-column="'+t+'"]')),r=!!s.length&&"match"===e.widgetOptions.filter_matchType[(s[0].nodeName||"").toLowerCase()]),r},processRow:function(i,s,o){var n,l,d,c,f,u=i.widgetOptions,p=!0,g=u.filter_$anyMatch&&u.filter_$anyMatch.length,h=u.filter_$anyMatch&&u.filter_$anyMatch.length?t.multipleColumns(i,u.filter_$anyMatch):[];if(s.$cells=s.$row.children(),s.anyMatchFlag&&h.length>1||s.anyMatchFilter&&!g){if(s.anyMatch=!0,s.isMatch=!0,s.rowArray=s.$cells.map(function(t){if(e.inArray(t,h)>-1||s.anyMatchFilter&&!g)return s.parsed[t]?f=s.cacheArray[t]:(f=s.rawArray[t],f=e.trim(u.filter_ignoreCase?f.toLowerCase():f),i.sortLocaleCompare&&(f=a.replaceAccents(f))),f}).get(),s.filter=s.anyMatchFilter,s.iFilter=s.iAnyMatchFilter,s.exact=s.rowArray.join(" "),s.iExact=u.filter_ignoreCase?s.exact.toLowerCase():s.exact,s.cache=s.cacheArray.slice(0,-1).join(" "),o.excludeMatch=o.noAnyMatch,null!==(l=t.processTypes(i,s,o)))p=l;else if(u.filter_startsWith)for(p=!1,h=Math.min(i.columns,s.rowArray.length);!p&&h>0;)h--,p=p||0===s.rowArray[h].indexOf(s.iFilter);else p=(s.iExact+s.childRowText).indexOf(s.iFilter)>=0;if(s.anyMatch=!1,s.filters.join("")===s.filter)return p}for(h=0;h=0:s.filter===s.exact:"function"==typeof d?l=d(s.exact,s.cache,s.filter,h,s.$row,i,s):"function"==typeof d[c||s.filter]&&(l=d[f=c||s.filter](s.exact,s.cache,s.filter,h,s.$row,i,s))),null===l?null!==(l=t.processTypes(i,s,o))?n=l:(f=(s.iExact+s.childRowText).indexOf(t.parseFilter(i,s.iFilter,s)),n=!u.filter_startsWith&&f>=0||u.filter_startsWith&&0===f):n=l,p=!!n&&p);return p},findRows:function(i,s,o){if(!t.equalFilters(i.config,i.config.lastSearch,o)&&i.config.widgetOptions.filter_initialized){var n,l,d,c,f,u,p,g,h,m,b,y,w,v,x,C,_,$,S,z,F,R,T,I=e.extend([],s),k=i.config,A=k.widgetOptions,D={anyMatch:!1,filters:s,filter_regexCache:[]},H={noAnyMatch:["range","operators"],functions:[],excludeFilter:[],defaultColFilter:[],defaultAnyFilter:a.getColumnData(i,A.filter_defaultFilter,k.columns,!0)||""};for(D.parsed=[],h=0;h1&&(isNaN(F[0])?e.each(k.headerContent,function(e,t){t.toLowerCase().indexOf(F[0])>-1&&(s[R=e]=F[1])}):R=parseInt(F[0],10)-1,R>=0&&R")>=0)return c;e.isArray(c)?n=c:"object"===e.type(l)&&c&&(n=c(r,i,s))}return!1===n&&(n=t.getOptions(r,i,s)),t.processOptions(r,i,n)},processOptions:function(t,r,i){if(!e.isArray(i))return!1;var s,o,n,l,d,c,f=(t=e(t)[0]).config,u=void 0!==r&&null!==r&&r>=0&&r'+(y.data("placeholder")||y.attr("data-placeholder")||b.filter_placeholder.select||"")+"",v=m.$table.find("thead").find("select."+i.filter+'[data-column="'+s+'"]').val();if(void 0!==o&&""!==o||(o=t.getOptionSource(a,s,l)),e.isArray(o)){for(d=0;d"}else""+h!="[object Object]"&&(c=f=h=(""+h).replace(r.quote,"""),f.indexOf(b.filter_selectSourceSeparator)>=0&&(c=(u=f.split(b.filter_selectSourceSeparator))[0],f=u[1]),w+=""!==h?"":"");o=[]}p=(m.$filters?m.$filters:m.$table.children("thead")).find("."+i.filter),b.filter_$externalFilters&&(p=p&&p.length?p.add(b.filter_$externalFilters):b.filter_$externalFilters),(g=p.filter('select[data-column="'+s+'"]')).length&&(g[n?"html":"append"](w),e.isArray(o)||g.append(o).val(v),g.val(v))}},buildDefault:function(e,r){var i,s,o,n=e.config,l=n.widgetOptions,d=n.columns;for(i=0;i1&&(d=d.slice(1)),n===u.columns&&(d=(c=d.filter(p.filter_anyColumnSelector)).length?c:d),d.val(s[n]).trigger("change"+u.namespace)):(f[n]=d.val()||"",n===u.columns?d.slice(1).filter('[data-column*="'+d.attr("data-column")+'"]').val(f[n]):d.slice(1).val(f[n])),n===u.columns&&d.length&&(p.filter_$anyMatch=d));return f},a.setFilters=function(r,i,s,o){var n=r?e(r)[0].config:"",l=a.getFilters(r,!0,i,o);return void 0===s&&(s=!0),n&&s&&(n.lastCombinedFilter=null,n.lastSearch=[],t.searching(n.table,i,o),n.$table.triggerHandler("filterFomatterUpdate")),0!==l.length}}(e),function(e,t){"use strict";var r=e.tablesorter||{};e.extend(r.css,{sticky:"tablesorter-stickyHeader",stickyVis:"tablesorter-sticky-visible",stickyHide:"tablesorter-sticky-hidden",stickyWrap:"tablesorter-sticky-wrapper"}),r.addHeaderResizeEvent=function(t,r,a){if((t=e(t)[0]).config){var i={timer:250},s=e.extend({},i,a),o=t.config,n=o.widgetOptions,l=function(e){var t,r,a,i,s,l,d=o.$headers.length;for(n.resize_flag=!0,r=[],t=0;t=0&&!i.$table.hasClass("hasFilters"))){var o,n,l,d,c=i.$table,f=e(s.stickyHeaders_attachTo),u=i.namespace+"stickyheaders ",p=e(s.stickyHeaders_yScroll||s.stickyHeaders_attachTo||t),g=e(s.stickyHeaders_xScroll||s.stickyHeaders_attachTo||t),h=c.children("thead:first").children("tr").not(".sticky-false").children(),m=c.children("tfoot"),b=isNaN(s.stickyHeaders_offset)?e(s.stickyHeaders_offset):"",y=b.length?b.height()||0:parseInt(s.stickyHeaders_offset,10)||0,w=c.parent().closest("."+r.css.table).hasClass("hasStickyHeaders")?c.parent().closest("table.tablesorter")[0].config.widgetOptions.$sticky.parent():[],v=w.length?w.height():0,x=s.$sticky=c.clone().addClass("containsStickyHeaders "+r.css.sticky+" "+s.stickyHeaders+" "+i.namespace.slice(1)+"_extra_table").wrap('
'),C=x.parent().addClass(r.css.stickyHide).css({position:f.length?"absolute":"fixed",padding:parseInt(x.parent().parent().css("padding-left"),10),top:y+v,left:0,visibility:"hidden",zIndex:s.stickyHeaders_zIndex||2}),_=x.children("thead:first"),$="",S=0,z=function(e,r){var a,i,s,o,n,l=e.filter(":visible"),d=l.length;for(a=0;aa.top&&d=0&&i.$filters&&i.$filters.eq(o).find("a, select, input").filter(":visible").focus())}),r.filter.bindSearch(c,d.find("."+r.css.filter)),s.filter_hideFilters&&r.filter.hideFilters(i,x)),s.stickyHeaders_addResizeEvent&&c.bind("resize"+i.namespace+"stickyheaders",function(){F()}),c.triggerHandler("stickyHeadersInit")}},remove:function(a,i,s){var o=i.namespace+"stickyheaders ";i.$table.removeClass("hasStickyHeaders").unbind("pagerComplete resize filterEnd stickyHeadersUpdate ".split(" ").join(o).replace(/\s+/g," ")).next("."+r.css.stickyWrap).remove(),s.$sticky&&s.$sticky.length&&s.$sticky.remove(),e(t).add(s.stickyHeaders_xScroll).add(s.stickyHeaders_yScroll).add(s.stickyHeaders_attachTo).unbind("scroll resize ".split(" ").join(o).replace(/\s+/g," ")),r.addHeaderResizeEvent(a,!0)}})}(e,window),function(e,t){"use strict";var r=e.tablesorter||{};e.extend(r.css,{resizableContainer:"tablesorter-resizable-container",resizableHandle:"tablesorter-resizable-handle",resizableNoSelect:"tablesorter-disableSelection",resizableStorage:"tablesorter-resizable"}),e(function(){var t="";e("head").append(t)}),r.resizable={init:function(t,a){if(!t.$table.hasClass("hasResizable")){t.$table.addClass("hasResizable");var i,s,o,n,l=t.$table,d=l.parent(),c=parseInt(l.css("margin-top"),10),f=a.resizable_vars={useStorage:r.storage&&!1!==a.resizable,$wrap:d,mouseXPosition:0,$target:null,$next:null,overflow:"auto"===d.css("overflow")||"scroll"===d.css("overflow")||"auto"===d.css("overflow-x")||"scroll"===d.css("overflow-x"),storedSizes:[]};for(r.resizableReset(t.table,!0),f.tableWidth=l.width(),f.fullWidth=Math.abs(d.width()-f.tableWidth)<20,f.useStorage&&f.overflow&&(r.storage(t.table,"tablesorter-table-original-css-width",f.tableWidth),n=r.storage(t.table,"tablesorter-table-resized-width")||"auto",r.resizable.setWidth(l,n,!0)),a.resizable_vars.storedSizes=o=(f.useStorage?r.storage(t.table,r.css.resizableStorage):[])||[],r.resizable.setWidths(t,a,o),r.resizable.updateStoredSizes(t,a),a.$resizable_container=e('
').css({top:c}).insertBefore(l),s=0;s').appendTo(a.$resizable_container).attr({"data-column":s,unselectable:"on"}).data("header",i).bind("selectstart",!1);r.resizable.bindings(t,a)}},updateStoredSizes:function(e,t){var r,a,i=e.columns,s=t.resizable_vars;for(s.storedSizes=[],r=0;r0){for(n.storedSizes[n.target]+=c,r.resizable.setWidth(n.$target,n.storedSizes[n.target],!0),s=0;s0?a.sortList=c:r.hasInitialized&&c&&c.length>0&&t.sortOn(a,c))},remove:function(e,r){r.$table.removeClass("hasSaveSort"),t.storage&&t.storage(e,"tablesorter-savesort","")}})}(e),e.tablesorter}); \ No newline at end of file diff --git a/dist/js/jquery.tablesorter.js b/dist/js/jquery.tablesorter.js index 640b1a79..a0cf13cc 100644 --- a/dist/js/jquery.tablesorter.js +++ b/dist/js/jquery.tablesorter.js @@ -8,7 +8,7 @@ } }(function(jQuery) { -/*! TableSorter (FORK) v2.28.9 *//* +/*! TableSorter (FORK) v2.28.10 *//* * Client-side table sorting with ease! * @requires jQuery v1.2.6+ * @@ -32,7 +32,7 @@ 'use strict'; var ts = $.tablesorter = { - version : '2.28.9', + version : '2.28.10', parsers : [], widgets : [], @@ -264,11 +264,6 @@ if ( !/tablesorter\-/.test( $table.attr( 'class' ) ) ) { tmp = ( c.theme !== '' ? ' tablesorter-' + c.theme : '' ); } - c.table = table; - c.$table = $table - .addClass( ts.css.table + ' ' + c.tableClass + tmp ) - .attr( 'role', 'grid' ); - c.$headers = $table.find( c.selectorHeaders ); // give the table a unique id, which will be used in namespace binding if ( !c.namespace ) { @@ -278,6 +273,14 @@ c.namespace = '.' + c.namespace.replace( ts.regex.nonWord, '' ); } + c.table = table; + c.$table = $table + // add namespace to table to allow bindings on extra elements to target + // the parent table (e.g. parser-input-select) + .addClass( ts.css.table + ' ' + c.tableClass + tmp + ' ' + c.namespace.slice(1) ) + .attr( 'role', 'grid' ); + c.$headers = $table.find( c.selectorHeaders ); + c.$table.children().children( 'tr' ).attr( 'role', 'row' ); c.$tbodies = $table.children( 'tbody:not(.' + c.cssInfoBlock + ')' ).attr({ 'aria-live' : 'polite', @@ -1296,6 +1299,12 @@ }, updateCell : function( c, cell, resort, callback ) { + // updateCell for child rows is a mess - we'll ignore them for now + // eventually I'll break out the "update" row cache code to make everything consistent + if ( $( cell ).closest( 'tr' ).hasClass( c.cssChildRow ) ) { + console.warn('Tablesorter Warning! "updateCell" for child row content has been disabled, use "update" instead'); + return; + } if ( ts.isEmptyObject( c.cache ) ) { // empty table, do an update instead - fixes #1099 ts.updateHeader( c ); @@ -2514,6 +2523,7 @@ .unbind( ( 'mousedown mouseup keypress '.split( ' ' ).join( c.namespace + ' ' ) ).replace( ts.regex.spaces, ' ' ) ); ts.restoreHeaders( table ); $t.toggleClass( ts.css.table + ' ' + c.tableClass + ' tablesorter-' + c.theme, removeClasses === false ); + $t.removeClass(c.namespace.slice(1)); // clear flag in case the plugin is initialized again table.hasInitialized = false; delete table.config.cache; diff --git a/dist/js/jquery.tablesorter.min.js b/dist/js/jquery.tablesorter.min.js index 2e54c421..ce144e2e 100644 --- a/dist/js/jquery.tablesorter.min.js +++ b/dist/js/jquery.tablesorter.min.js @@ -1,2 +1 @@ -!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&"object"==typeof module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){return function(b){"use strict";var c=b.tablesorter={version:"2.28.9",parsers:[],widgets:[],defaults:{theme:"default",widthFixed:!1,showProcessing:!1,headerTemplate:"{content}",onRenderTemplate:null,onRenderHeader:null,cancelSelection:!0,tabIndex:!0,dateFormat:"mmddyyyy",sortMultiSortKey:"shiftKey",sortResetKey:"ctrlKey",usNumberFormat:!0,delayInit:!1,serverSideSorting:!1,resort:!0,headers:{},ignoreCase:!0,sortForce:null,sortList:[],sortAppend:null,sortStable:!1,sortInitialOrder:"asc",sortLocaleCompare:!1,sortReset:!1,sortRestart:!1,emptyTo:"bottom",stringTo:"max",duplicateSpan:!0,textExtraction:"basic",textAttribute:"data-text",textSorter:null,numberSorter:null,initWidgets:!0,widgetClass:"widget-{name}",widgets:[],widgetOptions:{zebra:["even","odd"]},initialized:null,tableClass:"",cssAsc:"",cssDesc:"",cssNone:"",cssHeader:"",cssHeaderRow:"",cssProcessing:"",cssChildRow:"tablesorter-childRow",cssInfoBlock:"tablesorter-infoOnly",cssNoSort:"tablesorter-noSort",cssIgnoreRow:"tablesorter-ignoreRow",cssIcon:"tablesorter-icon",cssIconNone:"",cssIconAsc:"",cssIconDesc:"",pointerClick:"click",pointerDown:"mousedown",pointerUp:"mouseup",selectorHeaders:"> thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me",debug:!1,headerList:[],empties:{},strings:{},parsers:[],globalize:0,imgAttr:0},css:{table:"tablesorter",cssHasChild:"tablesorter-hasChildRow",childRow:"tablesorter-childRow",colgroup:"tablesorter-colgroup",header:"tablesorter-header",headerRow:"tablesorter-headerRow",headerIn:"tablesorter-header-inner",icon:"tablesorter-icon",processing:"tablesorter-processing",sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc",sortNone:"tablesorter-headerUnSorted"},language:{sortAsc:"Ascending sort applied, ",sortDesc:"Descending sort applied, ",sortNone:"No sort applied, ",sortDisabled:"sorting is disabled",nextAsc:"activate to apply an ascending sort",nextDesc:"activate to apply a descending sort",nextNone:"activate to remove the sort"},regex:{templateContent:/\{content\}/g,templateIcon:/\{icon\}/g,templateName:/\{name\}/i,spaces:/\s+/g,nonWord:/\W/g,formElements:/(input|select|button|textarea)/i,chunk:/(^([+\-]?(?:\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,chunks:/(^\\0|\\0$)/,hex:/^0x[0-9a-f]+$/i,comma:/,/g,digitNonUS:/[\s|\.]/g,digitNegativeTest:/^\s*\([.\d]+\)/,digitNegativeReplace:/^\s*\(([.\d]+)\)/,digitTest:/^[\-+(]?\d+[)]?$/,digitReplace:/[,.'"\s]/g},string:{max:1,min:-1,emptymin:1,emptymax:-1,zero:0,none:0,null:0,top:!0,bottom:!1},keyCodes:{enter:13},dates:{},instanceMethods:{},setup:function(a,d){if(!a||!a.tHead||0===a.tBodies.length||!0===a.hasInitialized)return void(d.debug&&(a.hasInitialized?console.warn("Stopping initialization. Tablesorter has already been initialized"):console.error("Stopping initialization! No table, thead or tbody",a)));var e="",f=b(a),g=b.metadata;a.hasInitialized=!1,a.isProcessing=!0,a.config=d,b.data(a,"tablesorter",d),d.debug&&(console[console.group?"group":"log"]("Initializing tablesorter v"+c.version),b.data(a,"startoveralltimer",new Date)),d.supportsDataObject=function(a){return a[0]=parseInt(a[0],10),a[0]>1||1===a[0]&&parseInt(a[1],10)>=4}(b.fn.jquery.split(".")),d.emptyTo=d.emptyTo.toLowerCase(),d.stringTo=d.stringTo.toLowerCase(),d.last={sortList:[],clickedIndex:-1},/tablesorter\-/.test(f.attr("class"))||(e=""!==d.theme?" tablesorter-"+d.theme:""),d.table=a,d.$table=f.addClass(c.css.table+" "+d.tableClass+e).attr("role","grid"),d.$headers=f.find(d.selectorHeaders),d.namespace?d.namespace="."+d.namespace.replace(c.regex.nonWord,""):d.namespace=".tablesorter"+Math.random().toString(16).slice(2),d.$table.children().children("tr").attr("role","row"),d.$tbodies=f.children("tbody:not(."+d.cssInfoBlock+")").attr({"aria-live":"polite","aria-relevant":"all"}),d.$table.children("caption").length&&(e=d.$table.children("caption")[0],e.id||(e.id=d.namespace.slice(1)+"caption"),d.$table.attr("aria-labelledby",e.id)),d.widgetInit={},d.textExtraction=d.$table.attr("data-text-extraction")||d.textExtraction||"basic",c.buildHeaders(d),c.fixColumnWidth(a),c.addWidgetFromClass(a),c.applyWidgetOptions(a),c.setupParsers(d),d.totalRows=0,c.validateOptions(d),d.delayInit||c.buildCache(d),c.bindEvents(a,d.$headers,!0),c.bindMethods(d),d.supportsDataObject&&void 0!==f.data().sortlist?d.sortList=f.data().sortlist:g&&f.metadata()&&f.metadata().sortlist&&(d.sortList=f.metadata().sortlist),c.applyWidget(a,!0),d.sortList.length>0?c.sortOn(d,d.sortList,{},!d.initWidgets):(c.setHeadersCss(d),d.initWidgets&&c.applyWidget(a,!1)),d.showProcessing&&f.unbind("sortBegin"+d.namespace+" sortEnd"+d.namespace).bind("sortBegin"+d.namespace+" sortEnd"+d.namespace,function(b){clearTimeout(d.timerProcessing),c.isProcessing(a),"sortBegin"===b.type&&(d.timerProcessing=setTimeout(function(){c.isProcessing(a,!0)},500))}),a.hasInitialized=!0,a.isProcessing=!1,d.debug&&(console.log("Overall initialization time:"+c.benchmark(b.data(a,"startoveralltimer"))),d.debug&&console.groupEnd&&console.groupEnd()),f.triggerHandler("tablesorter-initialized",a),"function"==typeof d.initialized&&d.initialized(a)},bindMethods:function(a){var d=a.$table,e=a.namespace,f="sortReset update updateRows updateAll updateHeaders addRows updateCell updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave ".split(" ").join(e+" ");d.unbind(f.replace(c.regex.spaces," ")).bind("sortReset"+e,function(a,b){a.stopPropagation(),c.sortReset(this.config,function(a){a.isApplyingWidgets?setTimeout(function(){c.applyWidget(a,"",b)},100):c.applyWidget(a,"",b)})}).bind("updateAll"+e,function(a,b,d){a.stopPropagation(),c.updateAll(this.config,b,d)}).bind("update"+e+" updateRows"+e,function(a,b,d){a.stopPropagation(),c.update(this.config,b,d)}).bind("updateHeaders"+e,function(a,b){a.stopPropagation(),c.updateHeaders(this.config,b)}).bind("updateCell"+e,function(a,b,d,e){a.stopPropagation(),c.updateCell(this.config,b,d,e)}).bind("addRows"+e,function(a,b,d,e){a.stopPropagation(),c.addRows(this.config,b,d,e)}).bind("updateComplete"+e,function(){this.isUpdating=!1}).bind("sorton"+e,function(a,b,d,e){a.stopPropagation(),c.sortOn(this.config,b,d,e)}).bind("appendCache"+e,function(a,d,e){a.stopPropagation(),c.appendCache(this.config,e),b.isFunction(d)&&d(this)}).bind("updateCache"+e,function(a,b,d){a.stopPropagation(),c.updateCache(this.config,b,d)}).bind("applyWidgetId"+e,function(a,b){a.stopPropagation(),c.applyWidgetId(this,b)}).bind("applyWidgets"+e,function(a,b){a.stopPropagation(),c.applyWidget(this,b)}).bind("refreshWidgets"+e,function(a,b,d){a.stopPropagation(),c.refreshWidgets(this,b,d)}).bind("removeWidget"+e,function(a,b,d){a.stopPropagation(),c.removeWidget(this,b,d)}).bind("destroy"+e,function(a,b,d){a.stopPropagation(),c.destroy(this,b,d)}).bind("resetToLoadState"+e,function(d){d.stopPropagation(),c.removeWidget(this,!0,!1);var e=b.extend(!0,{},a.originalSettings);a=b.extend(!0,{},c.defaults,e),a.originalSettings=e,this.hasInitialized=!1,c.setup(this,a)})},bindEvents:function(a,d,e){a=b(a)[0];var f,g=a.config,h=g.namespace,i=null;!0!==e&&(d.addClass(h.slice(1)+"_extra_headers"),(f=b.fn.closest?d.closest("table")[0]:d.parents("table")[0])&&"TABLE"===f.nodeName&&f!==a&&b(f).addClass(h.slice(1)+"_extra_table")),f=(g.pointerDown+" "+g.pointerUp+" "+g.pointerClick+" sort keyup ").replace(c.regex.spaces," ").split(" ").join(h+" "),d.find(g.selectorSort).add(d.filter(g.selectorSort)).unbind(f).bind(f,function(a,e){var f,h,j,k=b(a.target),l=" "+a.type+" ";if(!(1!==(a.which||a.button)&&!l.match(" "+g.pointerClick+" | sort | keyup ")||" keyup "===l&&a.which!==c.keyCodes.enter||l.match(" "+g.pointerClick+" ")&&void 0!==a.which||l.match(" "+g.pointerUp+" ")&&i!==a.target&&!0!==e)){if(l.match(" "+g.pointerDown+" "))return i=a.target,j=k.jquery.split("."),void("1"===j[0]&&j[1]<4&&a.preventDefault());if(i=null,c.regex.formElements.test(a.target.nodeName)||k.hasClass(g.cssNoSort)||k.parents("."+g.cssNoSort).length>0||k.parents("button").length>0)return!g.cancelSelection;g.delayInit&&c.isEmptyObject(g.cache)&&c.buildCache(g),f=b.fn.closest?b(this).closest("th, td"):/TH|TD/.test(this.nodeName)?b(this):b(this).parents("th, td"),j=d.index(f),g.last.clickedIndex=j<0?f.attr("data-column"):j,h=g.$headers[g.last.clickedIndex],h&&!h.sortDisabled&&c.initSort(g,h,a)}}),g.cancelSelection&&d.attr("unselectable","on").bind("selectstart",!1).css({"user-select":"none",MozUserSelect:"none"})},buildHeaders:function(a){var d,e,f,g;for(a.headerList=[],a.headerContent=[],a.sortVars=[],a.debug&&(f=new Date),a.columns=c.computeColumnIndex(a.$table.children("thead, tfoot").children("tr")),e=a.cssIcon?'':"",a.$headers=b(b.map(a.$table.find(a.selectorHeaders),function(d,f){var g,h,i,j,k,l=b(d);if(!l.parent().hasClass(a.cssIgnoreRow))return g=c.getColumnData(a.table,a.headers,f,!0),a.headerContent[f]=l.html(),""===a.headerTemplate||l.find("."+c.css.headerIn).length||(j=a.headerTemplate.replace(c.regex.templateContent,l.html()).replace(c.regex.templateIcon,l.find("."+c.css.icon).length?"":e),a.onRenderTemplate&&(h=a.onRenderTemplate.apply(l,[f,j]))&&"string"==typeof h&&(j=h),l.html('
'+j+"
")),a.onRenderHeader&&a.onRenderHeader.apply(l,[f,a,a.$table]),i=parseInt(l.attr("data-column"),10),d.column=i,k=c.getOrder(c.getData(l,g,"sortInitialOrder")||a.sortInitialOrder),a.sortVars[i]={count:-1,order:k?a.sortReset?[1,0,2]:[1,0]:a.sortReset?[0,1,2]:[0,1],lockedOrder:!1},k=c.getData(l,g,"lockedOrder")||!1,void 0!==k&&!1!==k&&(a.sortVars[i].lockedOrder=!0,a.sortVars[i].order=c.getOrder(k)?[1,1]:[0,0]),a.headerList[f]=d,l.addClass(c.css.header+" "+a.cssHeader).parent().addClass(c.css.headerRow+" "+a.cssHeaderRow).attr("role","row"),a.tabIndex&&l.attr("tabindex",0),d})),a.$headerIndexed=[],g=0;g0))for(h+=f,g+=f;f+1>0;)e.parsers[h-f]=m,e.extractors[h-f]=n,f--;h++}s+=e.parsers.length?q:1}a.debug&&(c.isEmptyObject(t)?console.warn(" No parsers detected!"):console[console.table?"table":"log"](t),console.log("Completed detecting parsers"+c.benchmark(o)),console.groupEnd&&console.groupEnd()),a.parsers=e.parsers,a.extractors=e.extractors},addParser:function(a){var b,d=c.parsers.length,e=!0;for(b=0;b=0;)if((g=c.parsers[j])&&"text"!==g.id&&g.is&&g.is(l,a.table,k,h))return g;return c.getParserById("text")},getElementText:function(a,d,e){if(!d)return"";var f,g=a.textExtraction||"",h=d.jquery?d:b(d);return"string"==typeof g?"basic"===g&&void 0!==(f=h.attr(a.textAttribute))?b.trim(f):b.trim(d.textContent||h.text()):"function"==typeof g?b.trim(g(h[0],a.table,e)):"function"==typeof(f=c.getColumnData(a.table,g,e))?b.trim(f(h[0],a.table,e)):b.trim(h[0].textContent||h.text())},getParsedText:function(a,b,d,e){void 0===e&&(e=c.getElementText(a,b,d));var f=""+e,g=a.parsers[d],h=a.extractors[d];return g&&(h&&"function"==typeof h.format&&(e=h.format(e,a.table,b,d)),f="no-parser"===g.id?"":g.format(""+e,a.table,b,d),a.ignoreCase&&"string"==typeof f&&(f=f.toLowerCase())),f},buildCache:function(a,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B=a.table,C=a.parsers;if(a.$tbodies=a.$table.children("tbody:not(."+a.cssInfoBlock+")"),l=void 0===e?a.$tbodies:e,a.cache={},a.totalRows=0,!C)return a.debug?console.warn("Warning: *Empty table!* Not building a cache"):"";for(a.debug&&(q=new Date),a.showProcessing&&c.isProcessing(B,!0),k=0;k0&&(w+=v,y+=v)),w++;else{for(s.$row=m,s.order=i,w=0,y=a.columns,j=0;j0)){for(A=0;A<=v;)h=a.duplicateSpan||0===A?g:"string"!=typeof a.textExtraction?c.getElementText(a,p,w+A)||"":"",s.raw[w+A]=h,n[w+A]=h,A++;w+=v,y+=v}w++}n[a.columns]=s,f.normalized[f.normalized.length]=n}f.colMax=u,a.totalRows+=f.normalized.length}if(a.showProcessing&&c.isProcessing(B),a.debug){for(z=Math.min(5,a.cache[0].normalized.length),console[console.group?"group":"log"]("Building cache for "+a.totalRows+" rows (showing "+z+" rows in log) and "+a.columns+" columns"+c.benchmark(q)),g={},j=0;j-1);return d}),d=d.not(".sorter-false").filter('[data-column="'+g[e][0]+'"]'+(1===h?":last":"")),d.length)){for(f=0;f=0?f:g[1]%l.length}},updateAll:function(a,b,d){var e=a.table;e.isUpdating=!0,c.refreshWidgets(e,!0,!0),c.buildHeaders(a),c.bindEvents(e,a.$headers,!0),c.bindMethods(a),c.commonUpdate(a,b,d)},update:function(a,b,d){a.table.isUpdating=!0,c.updateHeader(a),c.commonUpdate(a,b,d)},updateHeaders:function(a,b){a.table.isUpdating=!0,c.buildHeaders(a),c.bindEvents(a.table,a.$headers,!0),c.resortComplete(a,b)},updateCell:function(a,d,e,f){if(c.isEmptyObject(a.cache))return c.updateHeader(a),void c.commonUpdate(a,e,f);a.table.isUpdating=!0,a.$table.find(a.selectorRemove).remove();var g,h,i,j,k,l,m=a.$tbodies,n=b(d),o=m.index(b.fn.closest?n.closest("tbody"):n.parents("tbody").filter(":first")),p=a.cache[o],q=b.fn.closest?n.closest("tr"):n.parents("tr").filter(":first");if(d=n[0],m.length&&o>=0){if(i=m.eq(o).find("tr").not("."+a.cssChildRow).index(q),k=p.normalized[i],(l=q[0].cells.length)!==a.columns)for(j=0,g=!1,h=0;h0&&(p+=t),p++;r[d.columns]=q,d.cache[j].normalized[o]=r}c.checkResort(d,f,g)}},updateCache:function(a,b,d){a.parsers&&a.parsers.length||c.setupParsers(a,d),c.buildCache(a,b,d)},appendCache:function(a,b){var d,e,f,g,h,i,j,k=a.table,l=a.widgetOptions,m=a.$tbodies,n=[],o=a.cache;if(c.isEmptyObject(o))return a.appender?a.appender(k,n):k.isUpdating?a.$table.triggerHandler("updateComplete",k):"";for(a.debug&&(j=new Date),i=0;i1))for(g=1;g=0)for(g=0;g1))for(g=1;ge)return 1}for(d=(a||"").replace(j.chunk,"\\0$1\\0").replace(j.chunks,"").split("\\0"),e=(b||"").replace(j.chunk,"\\0$1\\0").replace(j.chunks,"").split("\\0"),i=Math.max(d.length,e.length),h=0;hg)return 1}return 0},sortNaturalAsc:function(a,b,d,e){if(a===b)return 0;var f=c.string[e.empties[d]||e.emptyTo];return""===a&&0!==f?"boolean"==typeof f?f?-1:1:-f||-1:""===b&&0!==f?"boolean"==typeof f?f?1:-1:f||1:c.sortNatural(a,b)},sortNaturalDesc:function(a,b,d,e){if(a===b)return 0;var f=c.string[e.empties[d]||e.emptyTo];return""===a&&0!==f?"boolean"==typeof f?f?-1:1:f||1:""===b&&0!==f?"boolean"==typeof f?f?1:-1:-f||-1:c.sortNatural(b,a)},sortText:function(a,b){return a>b?1:a=0&&!0!==e&&j.widgets.splice(h,1),g&&g.remove&&(j.debug&&console.log((e?"Refreshing":"Removing")+' "'+d[f]+'" widget'),g.remove(a,j,j.widgetOptions,e),j.widgetInit[d[f]]=!1)},refreshWidgets:function(a,d,e){a=b(a)[0];var f,g,h=a.config,i=h.widgets,j=c.widgets,k=j.length,l=[],m=function(a){b(a).triggerHandler("refreshComplete")};for(f=0;f'),d=i.$table.width(),f=i.$tbodies.find("tr:first").children(":visible"),g=f.length,h=0;h").css("width",e));i.$table.prepend(j)}},getData:function(a,c,d){var e,f,g="",h=b(a);return h.length?(e=!!b.metadata&&h.metadata(),f=" "+(h.attr("class")||""),void 0!==h.data(d)||void 0!==h.data(d.toLowerCase())?g+=h.data(d)||h.data(d.toLowerCase()):e&&void 0!==e[d]?g+=e[d]:c&&void 0!==c[d]?g+=c[d]:" "!==f&&f.match(" "+d+"-")&&(g=f.match(new RegExp("\\s"+d+"-([\\w-]+)"))[1]||""),b.trim(g)):""},getColumnData:function(a,c,d,e,f){if("object"!=typeof c||null===c)return c;a=b(a)[0];var g,h,i=a.config,j=f||i.$headers,k=i.$headerIndexed&&i.$headerIndexed[d]||j.filter('[data-column="'+d+'"]:last');if(void 0!==c[d])return e?c[d]:c[j.index(k)];for(h in c)if("string"==typeof h&&(g=k.filter(h).add(k.find(h)),g.length))return c[h]},isProcessing:function(a,d,e){a=b(a);var f=a[0].config,g=e||a.find("."+c.css.header);d?(void 0!==e&&f.sortList.length>0&&(g=g.filter(function(){return!this.sortDisabled&&c.isValueInArray(parseFloat(b(this).attr("data-column")),f.sortList)>=0})),a.add(g).addClass(c.css.processing+" "+f.cssProcessing)):a.add(g).removeClass(c.css.processing+" "+f.cssProcessing)},processTbody:function(a,c,d){if(a=b(a)[0],d)return a.isProcessing=!0,c.before(''),b.fn.detach?c.detach():c.remove();var e=b(a).find("colgroup.tablesorter-savemyplace");c.insertAfter(e),e.remove(),a.isProcessing=!1},clearTableBody:function(a){b(a)[0].config.$tbodies.children().detach()},characterEquivalents:{a:"áàâãäąå",A:"ÁÀÂÃÄĄÅ",c:"çćč",C:"ÇĆČ",e:"éèêëěę",E:"ÉÈÊËĚĘ",i:"íìİîïı",I:"ÍÌİÎÏ",o:"óòôõöō",O:"ÓÒÔÕÖŌ",ss:"ß",SS:"ẞ",u:"úùûüů",U:"ÚÙÛÜŮ"},replaceAccents:function(a){var b,d="[",e=c.characterEquivalents;if(!c.characterRegex){c.characterRegexArray={};for(b in e)"string"==typeof b&&(d+=e[b],c.characterRegexArray[b]=new RegExp("["+e[b]+"]","g"));c.characterRegex=new RegExp(d+"]")}if(c.characterRegex.test(a))for(b in e)"string"==typeof b&&(a=a.replace(c.characterRegexArray[b],b));return a},validateOptions:function(a){var d,e,f,g,h="headers sortForce sortList sortAppend widgets".split(" "),i=a.originalSettings;if(i){a.debug&&(g=new Date);for(d in i)if("undefined"===(f=typeof c.defaults[d]))console.warn('Tablesorter Warning! "table.config.'+d+'" option not recognized');else if("object"===f)for(e in i[d])f=c.defaults[d]&&typeof c.defaults[d][e],b.inArray(d,h)<0&&"undefined"===f&&console.warn('Tablesorter Warning! "table.config.'+d+"."+e+'" option not recognized');a.debug&&console.log("validate options time:"+c.benchmark(g))}},restoreHeaders:function(a){var d,e,f=b(a)[0].config,g=f.$table.find(f.selectorHeaders),h=g.length;for(d=0;d tr").children("th, td");!1===d&&b.inArray("uitheme",h.widgets)>=0&&(g.triggerHandler("applyWidgetId",["uitheme"]),g.triggerHandler("applyWidgetId",["zebra"])),j.find("tr").not(k).remove(),f="sortReset update updateRows updateAll updateHeaders updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets removeWidget destroy mouseup mouseleave "+"keypress sortBegin sortEnd resetToLoadState ".split(" ").join(h.namespace+" "),g.removeData("tablesorter").unbind(f.replace(c.regex.spaces," ")),h.$headers.add(l).removeClass([c.css.header,h.cssHeader,h.cssAsc,h.cssDesc,c.css.sortAsc,c.css.sortDesc,c.css.sortNone].join(" ")).removeAttr("data-column").removeAttr("aria-label").attr("aria-disabled","true"),k.find(h.selectorSort).unbind("mousedown mouseup keypress ".split(" ").join(h.namespace+" ").replace(c.regex.spaces," ")),c.restoreHeaders(a),g.toggleClass(c.css.table+" "+h.tableClass+" tablesorter-"+h.theme,!1===d),a.hasInitialized=!1,delete a.config.cache,"function"==typeof e&&e(a),i&&console.log("tablesorter has been removed")}}};b.fn.tablesorter=function(a){return this.each(function(){var d=this,e=b.extend(!0,{},c.defaults,a,c.instanceMethods);e.originalSettings=a,!d.hasInitialized&&c.buildTable&&"TABLE"!==this.nodeName?c.buildTable(d,e):c.setup(d,e)})},window.console&&window.console.log||(c.logs=[],console={},console.log=console.warn=console.error=console.table=function(){var a=arguments.length>1?arguments:arguments[0];c.logs[c.logs.length]={date:Date.now(),log:a}}),c.addParser({id:"no-parser",is:function(){return!1},format:function(){return""},type:"text"}),c.addParser({id:"text",is:function(){return!0},format:function(a,d){var e=d.config;return a&&(a=b.trim(e.ignoreCase?a.toLocaleLowerCase():a),a=e.sortLocaleCompare?c.replaceAccents(a):a),a},type:"text"}),c.regex.nondigit=/[^\w,. \-()]/g,c.addParser({id:"digit",is:function(a){return c.isDigit(a)},format:function(a,d){var e=c.formatFloat((a||"").replace(c.regex.nondigit,""),d);return a&&"number"==typeof e?e:a?b.trim(a&&d.config.ignoreCase?a.toLocaleLowerCase():a):a},type:"numeric"}),c.regex.currencyReplace=/[+\-,. ]/g,c.regex.currencyTest=/^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/,c.addParser({id:"currency",is:function(a){return a=(a||"").replace(c.regex.currencyReplace,""),c.regex.currencyTest.test(a)},format:function(a,d){var e=c.formatFloat((a||"").replace(c.regex.nondigit,""),d);return a&&"number"==typeof e?e:a?b.trim(a&&d.config.ignoreCase?a.toLocaleLowerCase():a):a},type:"numeric"}),c.regex.urlProtocolTest=/^(https?|ftp|file):\/\//,c.regex.urlProtocolReplace=/(https?|ftp|file):\/\/(www\.)?/,c.addParser({id:"url",is:function(a){return c.regex.urlProtocolTest.test(a)},format:function(a){return a?b.trim(a.replace(c.regex.urlProtocolReplace,"")):a},type:"text"}),c.regex.dash=/-/g,c.regex.isoDate=/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}/,c.addParser({id:"isoDate",is:function(a){return c.regex.isoDate.test(a)},format:function(a,b){var d=a?new Date(a.replace(c.regex.dash,"/")):a;return d instanceof Date&&isFinite(d)?d.getTime():a},type:"numeric"}),c.regex.percent=/%/g,c.regex.percentTest=/(\d\s*?%|%\s*?\d)/,c.addParser({id:"percent",is:function(a){return c.regex.percentTest.test(a)&&a.length<15},format:function(a,b){return a?c.formatFloat(a.replace(c.regex.percent,""),b):a},type:"numeric"}),c.addParser({id:"image",is:function(a,b,c,d){return d.find("img").length>0},format:function(a,c,d){return b(d).find("img").attr(c.config.imgAttr||"alt")||a},parsed:!0,type:"text"}),c.regex.dateReplace=/(\S)([AP]M)$/i,c.regex.usLongDateTest1=/^[A-Z]{3,10}\.?\s+\d{1,2},?\s+(\d{4})(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?$/i,c.regex.usLongDateTest2=/^\d{1,2}\s+[A-Z]{3,10}\s+\d{4}/i,c.addParser({id:"usLongDate",is:function(a){return c.regex.usLongDateTest1.test(a)||c.regex.usLongDateTest2.test(a)},format:function(a,b){var d=a?new Date(a.replace(c.regex.dateReplace,"$1 $2")):a;return d instanceof Date&&isFinite(d)?d.getTime():a},type:"numeric"}),c.regex.shortDateTest=/(^\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4})|(^\d{4}[\/\s]\d{1,2}[\/\s]\d{1,2})/,c.regex.shortDateReplace=/[\-.,]/g,c.regex.shortDateXXY=/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,c.regex.shortDateYMD=/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/,c.convertFormat=function(a,b){a=(a||"").replace(c.regex.spaces," ").replace(c.regex.shortDateReplace,"/"),"mmddyyyy"===b?a=a.replace(c.regex.shortDateXXY,"$3/$1/$2"):"ddmmyyyy"===b?a=a.replace(c.regex.shortDateXXY,"$3/$2/$1"):"yyyymmdd"===b&&(a=a.replace(c.regex.shortDateYMD,"$1/$2/$3"));var d=new Date(a);return d instanceof Date&&isFinite(d)?d.getTime():""},c.addParser({id:"shortDate",is:function(a){return a=(a||"").replace(c.regex.spaces," ").replace(c.regex.shortDateReplace,"/"),c.regex.shortDateTest.test(a)},format:function(a,b,d,e){if(a){var f=b.config,g=f.$headerIndexed[e],h=g.length&&g.data("dateFormat")||c.getData(g,c.getColumnData(b,f.headers,e),"dateFormat")||f.dateFormat;return g.length&&g.data("dateFormat",h),c.convertFormat(a,h)||a}return a},type:"numeric"}),c.regex.timeTest=/^(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)$|^((?:[01]\d|[2][0-4]):[0-5]\d)$/i,c.regex.timeMatch=/(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)/i,c.addParser({id:"time",is:function(a){return c.regex.timeTest.test(a)},format:function(a,b){var d,e=(a||"").match(c.regex.timeMatch),f=new Date(a),g=a&&(null!==e?e[0]:"00:00 AM"),h=g?new Date("2000/01/01 "+g.replace(c.regex.dateReplace,"$1 $2")):g;return h instanceof Date&&isFinite(h)?(d=f instanceof Date&&isFinite(f)?f.getTime():0,d?parseFloat(h.getTime()+"."+f.getTime()):h.getTime()):a},type:"numeric"}),c.addParser({id:"metadata",is:function(){return!1},format:function(a,c,d){var e=c.config,f=e.parserMetadataName?e.parserMetadataName:"sortValue";return b(d).metadata()[f]},type:"numeric"}),c.addWidget({id:"zebra",priority:90,format:function(a,c,d){var e,f,g,h,i,j,k,l=new RegExp(c.cssChildRow,"i"),m=c.$tbodies.add(b(c.namespace+"_extra_table").children("tbody:not(."+c.cssInfoBlock+")"));for(i=0;i thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me",debug:!1,headerList:[],empties:{},strings:{},parsers:[],globalize:0,imgAttr:0},css:{table:"tablesorter",cssHasChild:"tablesorter-hasChildRow",childRow:"tablesorter-childRow",colgroup:"tablesorter-colgroup",header:"tablesorter-header",headerRow:"tablesorter-headerRow",headerIn:"tablesorter-header-inner",icon:"tablesorter-icon",processing:"tablesorter-processing",sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc",sortNone:"tablesorter-headerUnSorted"},language:{sortAsc:"Ascending sort applied, ",sortDesc:"Descending sort applied, ",sortNone:"No sort applied, ",sortDisabled:"sorting is disabled",nextAsc:"activate to apply an ascending sort",nextDesc:"activate to apply a descending sort",nextNone:"activate to remove the sort"},regex:{templateContent:/\{content\}/g,templateIcon:/\{icon\}/g,templateName:/\{name\}/i,spaces:/\s+/g,nonWord:/\W/g,formElements:/(input|select|button|textarea)/i,chunk:/(^([+\-]?(?:\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,chunks:/(^\\0|\\0$)/,hex:/^0x[0-9a-f]+$/i,comma:/,/g,digitNonUS:/[\s|\.]/g,digitNegativeTest:/^\s*\([.\d]+\)/,digitNegativeReplace:/^\s*\(([.\d]+)\)/,digitTest:/^[\-+(]?\d+[)]?$/,digitReplace:/[,.'"\s]/g},string:{max:1,min:-1,emptymin:1,emptymax:-1,zero:0,none:0,null:0,top:!0,bottom:!1},keyCodes:{enter:13},dates:{},instanceMethods:{},setup:function(e,s){if(!e||!e.tHead||0===e.tBodies.length||!0===e.hasInitialized)return void(s.debug&&(e.hasInitialized?console.warn("Stopping initialization. Tablesorter has already been initialized"):console.error("Stopping initialization! No table, thead or tbody",e)));var o="",a=t(e),n=t.metadata;e.hasInitialized=!1,e.isProcessing=!0,e.config=s,t.data(e,"tablesorter",s),s.debug&&(console[console.group?"group":"log"]("Initializing tablesorter v"+r.version),t.data(e,"startoveralltimer",new Date)),s.supportsDataObject=function(e){return e[0]=parseInt(e[0],10),e[0]>1||1===e[0]&&parseInt(e[1],10)>=4}(t.fn.jquery.split(".")),s.emptyTo=s.emptyTo.toLowerCase(),s.stringTo=s.stringTo.toLowerCase(),s.last={sortList:[],clickedIndex:-1},/tablesorter\-/.test(a.attr("class"))||(o=""!==s.theme?" tablesorter-"+s.theme:""),s.namespace?s.namespace="."+s.namespace.replace(r.regex.nonWord,""):s.namespace=".tablesorter"+Math.random().toString(16).slice(2),s.table=e,s.$table=a.addClass(r.css.table+" "+s.tableClass+o+" "+s.namespace.slice(1)).attr("role","grid"),s.$headers=a.find(s.selectorHeaders),s.$table.children().children("tr").attr("role","row"),s.$tbodies=a.children("tbody:not(."+s.cssInfoBlock+")").attr({"aria-live":"polite","aria-relevant":"all"}),s.$table.children("caption").length&&((o=s.$table.children("caption")[0]).id||(o.id=s.namespace.slice(1)+"caption"),s.$table.attr("aria-labelledby",o.id)),s.widgetInit={},s.textExtraction=s.$table.attr("data-text-extraction")||s.textExtraction||"basic",r.buildHeaders(s),r.fixColumnWidth(e),r.addWidgetFromClass(e),r.applyWidgetOptions(e),r.setupParsers(s),s.totalRows=0,r.validateOptions(s),s.delayInit||r.buildCache(s),r.bindEvents(e,s.$headers,!0),r.bindMethods(s),s.supportsDataObject&&void 0!==a.data().sortlist?s.sortList=a.data().sortlist:n&&a.metadata()&&a.metadata().sortlist&&(s.sortList=a.metadata().sortlist),r.applyWidget(e,!0),s.sortList.length>0?r.sortOn(s,s.sortList,{},!s.initWidgets):(r.setHeadersCss(s),s.initWidgets&&r.applyWidget(e,!1)),s.showProcessing&&a.unbind("sortBegin"+s.namespace+" sortEnd"+s.namespace).bind("sortBegin"+s.namespace+" sortEnd"+s.namespace,function(t){clearTimeout(s.timerProcessing),r.isProcessing(e),"sortBegin"===t.type&&(s.timerProcessing=setTimeout(function(){r.isProcessing(e,!0)},500))}),e.hasInitialized=!0,e.isProcessing=!1,s.debug&&(console.log("Overall initialization time:"+r.benchmark(t.data(e,"startoveralltimer"))),s.debug&&console.groupEnd&&console.groupEnd()),a.triggerHandler("tablesorter-initialized",e),"function"==typeof s.initialized&&s.initialized(e)},bindMethods:function(e){var s=e.$table,o=e.namespace,a="sortReset update updateRows updateAll updateHeaders addRows updateCell updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave ".split(" ").join(o+" ");s.unbind(a.replace(r.regex.spaces," ")).bind("sortReset"+o,function(e,t){e.stopPropagation(),r.sortReset(this.config,function(e){e.isApplyingWidgets?setTimeout(function(){r.applyWidget(e,"",t)},100):r.applyWidget(e,"",t)})}).bind("updateAll"+o,function(e,t,s){e.stopPropagation(),r.updateAll(this.config,t,s)}).bind("update"+o+" updateRows"+o,function(e,t,s){e.stopPropagation(),r.update(this.config,t,s)}).bind("updateHeaders"+o,function(e,t){e.stopPropagation(),r.updateHeaders(this.config,t)}).bind("updateCell"+o,function(e,t,s,o){e.stopPropagation(),r.updateCell(this.config,t,s,o)}).bind("addRows"+o,function(e,t,s,o){e.stopPropagation(),r.addRows(this.config,t,s,o)}).bind("updateComplete"+o,function(){this.isUpdating=!1}).bind("sorton"+o,function(e,t,s,o){e.stopPropagation(),r.sortOn(this.config,t,s,o)}).bind("appendCache"+o,function(e,s,o){e.stopPropagation(),r.appendCache(this.config,o),t.isFunction(s)&&s(this)}).bind("updateCache"+o,function(e,t,s){e.stopPropagation(),r.updateCache(this.config,t,s)}).bind("applyWidgetId"+o,function(e,t){e.stopPropagation(),r.applyWidgetId(this,t)}).bind("applyWidgets"+o,function(e,t){e.stopPropagation(),r.applyWidget(this,t)}).bind("refreshWidgets"+o,function(e,t,s){e.stopPropagation(),r.refreshWidgets(this,t,s)}).bind("removeWidget"+o,function(e,t,s){e.stopPropagation(),r.removeWidget(this,t,s)}).bind("destroy"+o,function(e,t,s){e.stopPropagation(),r.destroy(this,t,s)}).bind("resetToLoadState"+o,function(s){s.stopPropagation(),r.removeWidget(this,!0,!1);var o=t.extend(!0,{},e.originalSettings);(e=t.extend(!0,{},r.defaults,o)).originalSettings=o,this.hasInitialized=!1,r.setup(this,e)})},bindEvents:function(e,s,o){var a,n=(e=t(e)[0]).config,i=n.namespace,d=null;!0!==o&&(s.addClass(i.slice(1)+"_extra_headers"),(a=t.fn.closest?s.closest("table")[0]:s.parents("table")[0])&&"TABLE"===a.nodeName&&a!==e&&t(a).addClass(i.slice(1)+"_extra_table")),a=(n.pointerDown+" "+n.pointerUp+" "+n.pointerClick+" sort keyup ").replace(r.regex.spaces," ").split(" ").join(i+" "),s.find(n.selectorSort).add(s.filter(n.selectorSort)).unbind(a).bind(a,function(e,o){var a,i,l,c=t(e.target),g=" "+e.type+" ";if(!(1!==(e.which||e.button)&&!g.match(" "+n.pointerClick+" | sort | keyup ")||" keyup "===g&&e.which!==r.keyCodes.enter||g.match(" "+n.pointerClick+" ")&&void 0!==e.which||g.match(" "+n.pointerUp+" ")&&d!==e.target&&!0!==o)){if(g.match(" "+n.pointerDown+" "))return d=e.target,void("1"===(l=c.jquery.split("."))[0]&&l[1]<4&&e.preventDefault());if(d=null,r.regex.formElements.test(e.target.nodeName)||c.hasClass(n.cssNoSort)||c.parents("."+n.cssNoSort).length>0||c.parents("button").length>0)return!n.cancelSelection;n.delayInit&&r.isEmptyObject(n.cache)&&r.buildCache(n),a=t.fn.closest?t(this).closest("th, td"):/TH|TD/.test(this.nodeName)?t(this):t(this).parents("th, td"),l=s.index(a),n.last.clickedIndex=l<0?a.attr("data-column"):l,(i=n.$headers[n.last.clickedIndex])&&!i.sortDisabled&&r.initSort(n,i,e)}}),n.cancelSelection&&s.attr("unselectable","on").bind("selectstart",!1).css({"user-select":"none",MozUserSelect:"none"})},buildHeaders:function(e){var s,o,a,n;for(e.headerList=[],e.headerContent=[],e.sortVars=[],e.debug&&(a=new Date),e.columns=r.computeColumnIndex(e.$table.children("thead, tfoot").children("tr")),o=e.cssIcon?'':"",e.$headers=t(t.map(e.$table.find(e.selectorHeaders),function(s,a){var n,i,d,l,c,g=t(s);if(!g.parent().hasClass(e.cssIgnoreRow))return n=r.getColumnData(e.table,e.headers,a,!0),e.headerContent[a]=g.html(),""===e.headerTemplate||g.find("."+r.css.headerIn).length||(l=e.headerTemplate.replace(r.regex.templateContent,g.html()).replace(r.regex.templateIcon,g.find("."+r.css.icon).length?"":o),e.onRenderTemplate&&(i=e.onRenderTemplate.apply(g,[a,l]))&&"string"==typeof i&&(l=i),g.html('
'+l+"
")),e.onRenderHeader&&e.onRenderHeader.apply(g,[a,e,e.$table]),d=parseInt(g.attr("data-column"),10),s.column=d,c=r.getOrder(r.getData(g,n,"sortInitialOrder")||e.sortInitialOrder),e.sortVars[d]={count:-1,order:c?e.sortReset?[1,0,2]:[1,0]:e.sortReset?[0,1,2]:[0,1],lockedOrder:!1},void 0!==(c=r.getData(g,n,"lockedOrder")||!1)&&!1!==c&&(e.sortVars[d].lockedOrder=!0,e.sortVars[d].order=r.getOrder(c)?[1,1]:[0,0]),e.headerList[a]=s,g.addClass(r.css.header+" "+e.cssHeader).parent().addClass(r.css.headerRow+" "+e.cssHeaderRow).attr("role","row"),e.tabIndex&&g.attr("tabindex",0),s})),e.$headerIndexed=[],n=0;n0))for(i+=a,n+=a;a+1>0;)o.parsers[i-a]=p,o.extractors[i-a]=u,a--;i++}y+=o.parsers.length?m:1}e.debug&&(r.isEmptyObject(w)?console.warn(" No parsers detected!"):console[console.table?"table":"log"](w),console.log("Completed detecting parsers"+r.benchmark(f)),console.groupEnd&&console.groupEnd()),e.parsers=o.parsers,e.extractors=o.extractors},addParser:function(e){var t,s=r.parsers.length,o=!0;for(t=0;t=0;)if((n=r.parsers[l])&&"text"!==n.id&&n.is&&n.is(g,e.table,c,i))return n;return r.getParserById("text")},getElementText:function(e,s,o){if(!s)return"";var a,n=e.textExtraction||"",i=s.jquery?s:t(s);return"string"==typeof n?"basic"===n&&void 0!==(a=i.attr(e.textAttribute))?t.trim(a):t.trim(s.textContent||i.text()):"function"==typeof n?t.trim(n(i[0],e.table,o)):"function"==typeof(a=r.getColumnData(e.table,n,o))?t.trim(a(i[0],e.table,o)):t.trim(i[0].textContent||i.text())},getParsedText:function(e,t,s,o){void 0===o&&(o=r.getElementText(e,t,s));var a=""+o,n=e.parsers[s],i=e.extractors[s];return n&&(i&&"function"==typeof i.format&&(o=i.format(o,e.table,t,s)),a="no-parser"===n.id?"":n.format(""+o,e.table,t,s),e.ignoreCase&&"string"==typeof a&&(a=a.toLowerCase())),a},buildCache:function(e,s,o){var a,n,i,d,l,c,g,p,u,f,h,m,b,y,w,x,v,C,$,I,D,R,T=e.table,L=e.parsers;if(e.$tbodies=e.$table.children("tbody:not(."+e.cssInfoBlock+")"),g=void 0===o?e.$tbodies:o,e.cache={},e.totalRows=0,!L)return e.debug?console.warn("Warning: *Empty table!* Not building a cache"):"";for(e.debug&&(m=new Date),e.showProcessing&&r.isProcessing(T,!0),c=0;c0&&(C+=v,I+=v)),C++;else{for(y.$row=p,y.order=d,C=0,I=e.columns,l=0;l0)){for(R=0;R<=v;)i=e.duplicateSpan||0===R?n:"string"!=typeof e.textExtraction?r.getElementText(e,h,C+R)||"":"",y.raw[C+R]=i,u[C+R]=i,R++;C+=v,I+=v}C++}u[e.columns]=y,a.normalized[a.normalized.length]=u}a.colMax=x,e.totalRows+=a.normalized.length}if(e.showProcessing&&r.isProcessing(T),e.debug){for(D=Math.min(5,e.cache[0].normalized.length),console[console.group?"group":"log"]("Building cache for "+e.totalRows+" rows (showing "+D+" rows in log) and "+e.columns+" columns"+r.benchmark(m)),n={},l=0;l-1);return s}),(s=s.not(".sorter-false").filter('[data-column="'+n[o][0]+'"]'+(1===i?":last":""))).length)){for(a=0;a=0?a:n[1]%g.length}},updateAll:function(e,t,s){var o=e.table;o.isUpdating=!0,r.refreshWidgets(o,!0,!0),r.buildHeaders(e),r.bindEvents(o,e.$headers,!0),r.bindMethods(e),r.commonUpdate(e,t,s)},update:function(e,t,s){e.table.isUpdating=!0,r.updateHeader(e),r.commonUpdate(e,t,s)},updateHeaders:function(e,t){e.table.isUpdating=!0,r.buildHeaders(e),r.bindEvents(e.table,e.$headers,!0),r.resortComplete(e,t)},updateCell:function(e,s,o,a){if(t(s).closest("tr").hasClass(e.cssChildRow))return void console.warn('Tablesorter Warning! "updateCell" for child row content has been disabled, use "update" instead');if(r.isEmptyObject(e.cache))return r.updateHeader(e),void r.commonUpdate(e,o,a);e.table.isUpdating=!0,e.$table.find(e.selectorRemove).remove();var n,i,d,l,c,g,p=e.$tbodies,u=t(s),f=p.index(t.fn.closest?u.closest("tbody"):u.parents("tbody").filter(":first")),h=e.cache[f],m=t.fn.closest?u.closest("tr"):u.parents("tr").filter(":first");if(s=u[0],p.length&&f>=0){if(d=p.eq(f).find("tr").not("."+e.cssChildRow).index(m),c=h.normalized[d],(g=m[0].cells.length)!==e.columns)for(l=0,n=!1,i=0;i0&&(h+=w),h++;b[s.columns]=m,s.cache[l].normalized[f]=b}r.checkResort(s,a,n)}},updateCache:function(e,t,s){e.parsers&&e.parsers.length||r.setupParsers(e,s),r.buildCache(e,t,s)},appendCache:function(e,t){var s,o,a,n,i,d,l,c=e.table,g=e.widgetOptions,p=e.$tbodies,u=[],f=e.cache;if(r.isEmptyObject(f))return e.appender?e.appender(c,u):c.isUpdating?e.$table.triggerHandler("updateComplete",c):"";for(e.debug&&(l=new Date),d=0;d1))for(n=1;n=0)for(n=0;n1))for(n=1;no)return 1}for(s=(e||"").replace(l.chunk,"\\0$1\\0").replace(l.chunks,"").split("\\0"),o=(t||"").replace(l.chunk,"\\0$1\\0").replace(l.chunks,"").split("\\0"),d=Math.max(s.length,o.length),i=0;in)return 1}return 0},sortNaturalAsc:function(e,t,s,o){if(e===t)return 0;var a=r.string[o.empties[s]||o.emptyTo];return""===e&&0!==a?"boolean"==typeof a?a?-1:1:-a||-1:""===t&&0!==a?"boolean"==typeof a?a?1:-1:a||1:r.sortNatural(e,t)},sortNaturalDesc:function(e,t,s,o){if(e===t)return 0;var a=r.string[o.empties[s]||o.emptyTo];return""===e&&0!==a?"boolean"==typeof a?a?-1:1:a||1:""===t&&0!==a?"boolean"==typeof a?a?1:-1:-a||-1:r.sortNatural(t,e)},sortText:function(e,t){return e>t?1:e=0&&!0!==o&&l.widgets.splice(i,1),n&&n.remove&&(l.debug&&console.log((o?"Refreshing":"Removing")+' "'+s[a]+'" widget'),n.remove(e,l,l.widgetOptions,o),l.widgetInit[s[a]]=!1)},refreshWidgets:function(e,s,o){var a,n,i=(e=t(e)[0]).config.widgets,d=r.widgets,l=d.length,c=[],g=function(e){t(e).triggerHandler("refreshComplete")};for(a=0;a'),s=d.$table.width(),n=(a=d.$tbodies.find("tr:first").children(":visible")).length,i=0;i").css("width",o));d.$table.prepend(l)}},getData:function(e,r,s){var o,a,n="",i=t(e);return i.length?(o=!!t.metadata&&i.metadata(),a=" "+(i.attr("class")||""),void 0!==i.data(s)||void 0!==i.data(s.toLowerCase())?n+=i.data(s)||i.data(s.toLowerCase()):o&&void 0!==o[s]?n+=o[s]:r&&void 0!==r[s]?n+=r[s]:" "!==a&&a.match(" "+s+"-")&&(n=a.match(new RegExp("\\s"+s+"-([\\w-]+)"))[1]||""),t.trim(n)):""},getColumnData:function(e,r,s,o,a){if("object"!=typeof r||null===r)return r;var n,i=(e=t(e)[0]).config,d=a||i.$headers,l=i.$headerIndexed&&i.$headerIndexed[s]||d.filter('[data-column="'+s+'"]:last');if(void 0!==r[s])return o?r[s]:r[d.index(l)];for(n in r)if("string"==typeof n&&l.filter(n).add(l.find(n)).length)return r[n]},isProcessing:function(e,s,o){var a=(e=t(e))[0].config,n=o||e.find("."+r.css.header);s?(void 0!==o&&a.sortList.length>0&&(n=n.filter(function(){return!this.sortDisabled&&r.isValueInArray(parseFloat(t(this).attr("data-column")),a.sortList)>=0})),e.add(n).addClass(r.css.processing+" "+a.cssProcessing)):e.add(n).removeClass(r.css.processing+" "+a.cssProcessing)},processTbody:function(e,r,s){if(e=t(e)[0],s)return e.isProcessing=!0,r.before(''),t.fn.detach?r.detach():r.remove();var o=t(e).find("colgroup.tablesorter-savemyplace");r.insertAfter(o),o.remove(),e.isProcessing=!1},clearTableBody:function(e){t(e)[0].config.$tbodies.children().detach()},characterEquivalents:{a:"áàâãäąå",A:"ÁÀÂÃÄĄÅ",c:"çćč",C:"ÇĆČ",e:"éèêëěę",E:"ÉÈÊËĚĘ",i:"íìİîïı",I:"ÍÌİÎÏ",o:"óòôõöō",O:"ÓÒÔÕÖŌ",ss:"ß",SS:"ẞ",u:"úùûüů",U:"ÚÙÛÜŮ"},replaceAccents:function(e){var t,s="[",o=r.characterEquivalents;if(!r.characterRegex){r.characterRegexArray={};for(t in o)"string"==typeof t&&(s+=o[t],r.characterRegexArray[t]=new RegExp("["+o[t]+"]","g"));r.characterRegex=new RegExp(s+"]")}if(r.characterRegex.test(e))for(t in o)"string"==typeof t&&(e=e.replace(r.characterRegexArray[t],t));return e},validateOptions:function(e){var s,o,a,n,i="headers sortForce sortList sortAppend widgets".split(" "),d=e.originalSettings;if(d){e.debug&&(n=new Date);for(s in d)if("undefined"===(a=typeof r.defaults[s]))console.warn('Tablesorter Warning! "table.config.'+s+'" option not recognized');else if("object"===a)for(o in d[s])a=r.defaults[s]&&typeof r.defaults[s][o],t.inArray(s,i)<0&&"undefined"===a&&console.warn('Tablesorter Warning! "table.config.'+s+"."+o+'" option not recognized');e.debug&&console.log("validate options time:"+r.benchmark(n))}},restoreHeaders:function(e){var s,o,a=t(e)[0].config,n=a.$table.find(a.selectorHeaders),i=n.length;for(s=0;s tr").children("th, td");!1===s&&t.inArray("uitheme",i.widgets)>=0&&(n.triggerHandler("applyWidgetId",["uitheme"]),n.triggerHandler("applyWidgetId",["zebra"])),l.find("tr").not(c).remove(),a="sortReset update updateRows updateAll updateHeaders updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets removeWidget destroy mouseup mouseleave "+"keypress sortBegin sortEnd resetToLoadState ".split(" ").join(i.namespace+" "),n.removeData("tablesorter").unbind(a.replace(r.regex.spaces," ")),i.$headers.add(g).removeClass([r.css.header,i.cssHeader,i.cssAsc,i.cssDesc,r.css.sortAsc,r.css.sortDesc,r.css.sortNone].join(" ")).removeAttr("data-column").removeAttr("aria-label").attr("aria-disabled","true"),c.find(i.selectorSort).unbind("mousedown mouseup keypress ".split(" ").join(i.namespace+" ").replace(r.regex.spaces," ")),r.restoreHeaders(e),n.toggleClass(r.css.table+" "+i.tableClass+" tablesorter-"+i.theme,!1===s),n.removeClass(i.namespace.slice(1)),e.hasInitialized=!1,delete e.config.cache,"function"==typeof o&&o(e),d&&console.log("tablesorter has been removed")}}};t.fn.tablesorter=function(e){return this.each(function(){var s=this,o=t.extend(!0,{},r.defaults,e,r.instanceMethods);o.originalSettings=e,!s.hasInitialized&&r.buildTable&&"TABLE"!==this.nodeName?r.buildTable(s,o):r.setup(s,o)})},window.console&&window.console.log||(r.logs=[],console={},console.log=console.warn=console.error=console.table=function(){var e=arguments.length>1?arguments:arguments[0];r.logs[r.logs.length]={date:Date.now(),log:e}}),r.addParser({id:"no-parser",is:function(){return!1},format:function(){return""},type:"text"}),r.addParser({id:"text",is:function(){return!0},format:function(e,s){var o=s.config;return e&&(e=t.trim(o.ignoreCase?e.toLocaleLowerCase():e),e=o.sortLocaleCompare?r.replaceAccents(e):e),e},type:"text"}),r.regex.nondigit=/[^\w,. \-()]/g,r.addParser({id:"digit",is:function(e){return r.isDigit(e)},format:function(e,s){var o=r.formatFloat((e||"").replace(r.regex.nondigit,""),s);return e&&"number"==typeof o?o:e?t.trim(e&&s.config.ignoreCase?e.toLocaleLowerCase():e):e},type:"numeric"}),r.regex.currencyReplace=/[+\-,. ]/g,r.regex.currencyTest=/^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/,r.addParser({id:"currency",is:function(e){return e=(e||"").replace(r.regex.currencyReplace,""),r.regex.currencyTest.test(e)},format:function(e,s){var o=r.formatFloat((e||"").replace(r.regex.nondigit,""),s);return e&&"number"==typeof o?o:e?t.trim(e&&s.config.ignoreCase?e.toLocaleLowerCase():e):e},type:"numeric"}),r.regex.urlProtocolTest=/^(https?|ftp|file):\/\//,r.regex.urlProtocolReplace=/(https?|ftp|file):\/\/(www\.)?/,r.addParser({id:"url",is:function(e){return r.regex.urlProtocolTest.test(e)},format:function(e){return e?t.trim(e.replace(r.regex.urlProtocolReplace,"")):e},type:"text"}),r.regex.dash=/-/g,r.regex.isoDate=/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}/,r.addParser({id:"isoDate",is:function(e){return r.regex.isoDate.test(e)},format:function(e,t){var s=e?new Date(e.replace(r.regex.dash,"/")):e;return s instanceof Date&&isFinite(s)?s.getTime():e},type:"numeric"}),r.regex.percent=/%/g,r.regex.percentTest=/(\d\s*?%|%\s*?\d)/,r.addParser({id:"percent",is:function(e){return r.regex.percentTest.test(e)&&e.length<15},format:function(e,t){return e?r.formatFloat(e.replace(r.regex.percent,""),t):e},type:"numeric"}),r.addParser({id:"image",is:function(e,t,r,s){return s.find("img").length>0},format:function(e,r,s){return t(s).find("img").attr(r.config.imgAttr||"alt")||e},parsed:!0,type:"text"}),r.regex.dateReplace=/(\S)([AP]M)$/i,r.regex.usLongDateTest1=/^[A-Z]{3,10}\.?\s+\d{1,2},?\s+(\d{4})(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?$/i,r.regex.usLongDateTest2=/^\d{1,2}\s+[A-Z]{3,10}\s+\d{4}/i,r.addParser({id:"usLongDate",is:function(e){return r.regex.usLongDateTest1.test(e)||r.regex.usLongDateTest2.test(e)},format:function(e,t){var s=e?new Date(e.replace(r.regex.dateReplace,"$1 $2")):e;return s instanceof Date&&isFinite(s)?s.getTime():e},type:"numeric"}),r.regex.shortDateTest=/(^\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4})|(^\d{4}[\/\s]\d{1,2}[\/\s]\d{1,2})/,r.regex.shortDateReplace=/[\-.,]/g,r.regex.shortDateXXY=/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,r.regex.shortDateYMD=/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/,r.convertFormat=function(e,t){e=(e||"").replace(r.regex.spaces," ").replace(r.regex.shortDateReplace,"/"),"mmddyyyy"===t?e=e.replace(r.regex.shortDateXXY,"$3/$1/$2"):"ddmmyyyy"===t?e=e.replace(r.regex.shortDateXXY,"$3/$2/$1"):"yyyymmdd"===t&&(e=e.replace(r.regex.shortDateYMD,"$1/$2/$3"));var s=new Date(e);return s instanceof Date&&isFinite(s)?s.getTime():""},r.addParser({id:"shortDate",is:function(e){return e=(e||"").replace(r.regex.spaces," ").replace(r.regex.shortDateReplace,"/"),r.regex.shortDateTest.test(e)},format:function(e,t,s,o){if(e){var a=t.config,n=a.$headerIndexed[o],i=n.length&&n.data("dateFormat")||r.getData(n,r.getColumnData(t,a.headers,o),"dateFormat")||a.dateFormat;return n.length&&n.data("dateFormat",i),r.convertFormat(e,i)||e}return e},type:"numeric"}),r.regex.timeTest=/^(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)$|^((?:[01]\d|[2][0-4]):[0-5]\d)$/i,r.regex.timeMatch=/(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)/i,r.addParser({id:"time",is:function(e){return r.regex.timeTest.test(e)},format:function(e,t){var s,o=(e||"").match(r.regex.timeMatch),a=new Date(e),n=e&&(null!==o?o[0]:"00:00 AM"),i=n?new Date("2000/01/01 "+n.replace(r.regex.dateReplace,"$1 $2")):n;return i instanceof Date&&isFinite(i)?(s=a instanceof Date&&isFinite(a)?a.getTime():0,s?parseFloat(i.getTime()+"."+a.getTime()):i.getTime()):e},type:"numeric"}),r.addParser({id:"metadata",is:function(){return!1},format:function(e,r,s){var o=r.config,a=o.parserMetadataName?o.parserMetadataName:"sortValue";return t(s).metadata()[a]},type:"numeric"}),r.addWidget({id:"zebra",priority:90,format:function(e,r,s){var o,a,n,i,d,l,c,g=new RegExp(r.cssChildRow,"i"),p=r.$tbodies.add(t(r.namespace+"_extra_table").children("tbody:not(."+r.cssInfoBlock+")"));for(d=0;d
')}),d.cssIcon&&u.find("."+b.css.icon).removeClass(r?[o.icons,q].join(" "):"").addClass(w.icons||""),b.hasWidget(d.table,"filter")&&(g=function(){t.children("thead").children("."+b.css.filterRow).removeClass(r?o.filterRow||"":"").addClass(w.filterRow||"")},e.filter_initialized?g():t.one("filterInit",function(){g()}))),f=0;f1)))for(m=1;m=]/g,query:"(q|query)",wild01:/\?/g,wild0More:/\*/g,quote:/\"/g,isNeg1:/(>=?\s*-\d)/,isNeg2:/(<=?\s*\d)/},types:{or:function(d,e,f){if((c.orTest.test(e.iFilter)||c.orSplit.test(e.filter))&&!c.regex.test(e.filter)){var g,h,i,j,k=a.extend({},e),l=e.filter.split(c.orSplit),m=e.iFilter.split(c.orSplit),n=l.length;for(g=0;g=l:g>l:c.ltTest.test(f.iFilter)&&(h=c.lteTest.test(f.iFilter)?g<=l:g=0)))}return null},exact:function(d,e){if(c.exact.test(e.iFilter)){var f=e.iFilter.replace(c.exact,""),g=b.parseFilter(d,f,e)||"";return e.anyMatch?a.inArray(g,e.rowArray)>=0:g==e.iExact}return null},range:function(a,e){if(c.toTest.test(e.iFilter)){var f,g,h,i,j=a.table,k=e.index,l=e.parsed[k],m=e.iFilter.split(c.toSplit);return g=m[0].replace(d.regex.nondigit,"")||"",h=d.formatFloat(b.parseFilter(a,g,e),j),g=m[1].replace(d.regex.nondigit,"")||"",i=d.formatFloat(b.parseFilter(a,g,e),j),(l||"numeric"===a.parsers[k].type)&&(f=a.parsers[k].format(""+m[0],j,a.$headers.eq(k),k),h=""===f||isNaN(f)?h:f,f=a.parsers[k].format(""+m[1],j,a.$headers.eq(k),k),i=""===f||isNaN(f)?i:f),!l&&"numeric"!==a.parsers[k].type||isNaN(h)||isNaN(i)?(g=isNaN(e.iExact)?e.iExact.replace(d.regex.nondigit,""):e.iExact,f=d.formatFloat(g,j)):f=e.cache,h>i&&(g=h,h=i,i=g),f>=h&&f<=i||""===h||""===i}return null},wild:function(a,d){if(c.wildOrTest.test(d.iFilter)){var e=""+(b.parseFilter(a,d.iFilter,d)||"");!c.wildTest.test(e)&&d.nestedFilters&&(e=d.isMatch?e:"^("+e+")$");try{return new RegExp(e.replace(c.wild01,"\\S{1}").replace(c.wild0More,"\\S*"),a.widgetOptions.filter_ignoreCase?"i":"").test(d.exact)}catch(a){return null}}return null},fuzzy:function(a,d){if(c.fuzzyTest.test(d.iFilter)){var e,f=0,g=d.iExact.length,h=d.iFilter.slice(1),i=b.parseFilter(a,h,d)||"";for(e=0;e]=?/,gtTest:/>/,gteTest:/>=/,ltTest:/'+(j.data("placeholder")||j.attr("data-placeholder")||p.filter_placeholder.select||"")+"":"",l=h,i=h,h.indexOf(p.filter_selectSourceSeparator)>=0&&(l=h.split(p.filter_selectSourceSeparator),i=l[1],l=l[0]),g+="");o.$table.find("thead").find("select."+e.filter+'[data-column="'+k+'"]').append(g),i=p.filter_selectSource,m="function"==typeof i||d.getColumnData(f,i,k),m&&b.buildSelect(o.table,k,"",!0,j.hasClass(p.filter_onlyAvail))}b.buildDefault(f,!0),b.bindSearch(f,o.$table.find("."+e.filter),!0),p.filter_external&&b.bindSearch(f,p.filter_external),p.filter_hideFilters&&b.hideFilters(o),o.showProcessing&&(i="filterStart filterEnd ".split(" ").join(o.namespace+"filter "),o.$table.unbind(i.replace(d.regex.spaces," ")).bind(i,function(b,c){j=c?o.$table.find("."+e.header).filter("[data-column]").filter(function(){return""!==c[a(this).data("column")]}):"",d.isProcessing(f,"filterStart"===b.type,c?j:"")})),o.filteredRows=o.totalRows,i="tablesorter-initialized pagerBeforeInitialized ".split(" ").join(o.namespace+"filter "),o.$table.unbind(i.replace(d.regex.spaces," ")).bind(i,function(){b.completeInit(this)}),o.pager&&o.pager.initialized&&!p.filter_initialized?(o.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){b.filterInitComplete(o)},100)):p.filter_initialized||b.completeInit(f)},completeInit:function(a){var c=a.config,e=c.widgetOptions,f=b.setDefaults(a,c,e)||[];f.length&&(c.delayInit&&""===f.join("")||d.setFilters(a,f,!0)),c.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){e.filter_initialized||b.filterInitComplete(c)},100)},formatterUpdated:function(a,b){var c=a&&a.closest("table")[0].config.widgetOptions;c&&!c.filter_initialized&&(c.filter_formatterInit[b]=1)},filterInitComplete:function(c){var d,e,f=c.widgetOptions,g=0,h=function(){f.filter_initialized=!0,c.lastSearch=c.$table.data("lastSearch"),c.$table.triggerHandler("filterInit",c),b.findRows(c.table,c.lastSearch||[])};if(a.isEmptyObject(f.filter_formatter))h();else{for(e=f.filter_formatterInit.length,d=0;d';for(j=0;j1?'").appendTo(f.$table.children("thead").eq(0)).children("td"),j=0;j").appendTo(h):(o=d.getColumnData(c,g.filter_formatter,j),o?(g.filter_formatterCount++,t=o(h,j),t&&0===t.length&&(t=h.children("input")),t&&(0===t.parent().length||t.parent().length&&t.parent()[0]!==h[0])&&h.append(t)):t=a('').appendTo(h),t&&(p=k.data("placeholder")||k.attr("data-placeholder")||g.filter_placeholder.search||"",t.attr("placeholder",p))),t&&(n=(a.isArray(g.filter_cssFilter)?void 0!==g.filter_cssFilter[j]?g.filter_cssFilter[j]||"":"":g.filter_cssFilter)||"",t.addClass(e.filter+" "+n).attr("data-column",h.attr("data-column")),m&&(t.attr("placeholder","").addClass(e.filterDisabled)[0].disabled=!0)))},bindSearch:function(c,e,g){if(c=a(c)[0],e=a(e),e.length){var h,i=c.config,j=i.widgetOptions,k=i.namespace+"filter",l=j.filter_$externalFilters;!0!==g&&(h=j.filter_anyColumnSelector+","+j.filter_multipleColumnSelector,j.filter_$anyMatch=e.filter(h),l&&l.length?j.filter_$externalFilters=j.filter_$externalFilters.add(e):j.filter_$externalFilters=e,d.setFilters(c,i.$table.data("lastSearch")||[],!1===g)),h="keypress keyup keydown search change input ".split(" ").join(k+" "),e.attr("data-lastSearchTime",(new Date).getTime()).unbind(h.replace(d.regex.spaces," ")).bind("keydown"+k,function(a){if(a.which===f.escape&&!c.config.widgetOptions.filter_resetOnEsc)return!1}).bind("keyup"+k,function(e){j=c.config.widgetOptions;var g=parseInt(a(this).attr("data-column"),10),h="boolean"==typeof j.filter_liveSearch?j.filter_liveSearch:d.getColumnData(c,j.filter_liveSearch,g);if(void 0===h&&(h=j.filter_liveSearch.fallback||!1),a(this).attr("data-lastSearchTime",(new Date).getTime()),e.which===f.escape)this.value=j.filter_resetOnEsc?"":i.lastSearch[g];else{if(!1===h)return;if(""!==this.value&&("number"==typeof h&&this.value.length=f.left&&e.which<=f.down)))return}b.searching(c,!0,!0,g)}).bind("search change keypress input ".split(" ").join(k+" "),function(e){var g=parseInt(a(this).attr("data-column"),10),h="boolean"==typeof j.filter_liveSearch?j.filter_liveSearch:d.getColumnData(c,j.filter_liveSearch,g);!c.config.widgetOptions.filter_initialized||e.which!==f.enter&&"search"!==e.type&&("change"!==e.type&&"input"!==e.type||!0!==h||this.value===i.lastSearch[g])||(e.preventDefault(),a(this).attr("data-lastSearchTime",(new Date).getTime()),b.searching(c,"keypress"!==e.type,!0,g))})}},searching:function(a,c,e,f){var g,h=a.config.widgetOptions;void 0===f?g=!1:void 0===(g="boolean"==typeof h.filter_liveSearch?h.filter_liveSearch:d.getColumnData(a,h.filter_liveSearch,f))&&(g=h.filter_liveSearch.fallback||!1),clearTimeout(h.filter_searchTimer),void 0===c||!0===c?h.filter_searchTimer=setTimeout(function(){b.checkFilters(a,c,e)},g?h.filter_searchDelay:10):b.checkFilters(a,c,e)},equalFilters:function(b,c,d){var e,f=[],g=[],h=b.columns+1;for(c=a.isArray(c)?c:[],d=a.isArray(d)?d:[],e=0;e1?a.trim(b).split(/\s/):[a.trim(b)],h=g.length-1,i=0,j=d;for(h<1&&f>1&&(g[1]=g[0]);e.test(j);)j=j.replace(e,g[i++]||""),e.test(j)&&ih&&(d=g,g=h,h=d),h>=a.columns&&(h=a.columns-1);g<=h;g++)m[m.length]=g;b=b.replace(e[k],"")}if(!c&&/,/.test(b))for(i=b.split(/\s*,\s*/),l=i.length,j=0;j-1})},multipleColumns:function(c,d){var e=c.widgetOptions,f=e.filter_initialized||!d.filter(e.filter_anyColumnSelector).length,g=a.trim(b.getLatestSearch(d).attr("data-column")||"");return b.findRange(c,g,!f)},processTypes:function(c,d,e){var f,g=null,h=null;for(f in b.types)a.inArray(f,e.excludeMatch)<0&&null===h&&null!==(h=b.types[f](c,d,e))&&(g=h);return g},matchType:function(a,b){var c,d=a.widgetOptions,f=a.$headerIndexed[b];return f.hasClass("filter-exact")?c=!1:f.hasClass("filter-match")?c=!0:(d.filter_columnFilters?f=a.$filters.find("."+e.filter).add(d.filter_$externalFilters).filter('[data-column="'+b+'"]'):d.filter_$externalFilters&&(f=d.filter_$externalFilters.filter('[data-column="'+b+'"]')),c=!!f.length&&"match"===a.widgetOptions.filter_matchType[(f[0].nodeName||"").toLowerCase()]),c},processRow:function(e,f,g){var h,i,j,k,l,m=e.widgetOptions,n=!0,o=m.filter_$anyMatch&&m.filter_$anyMatch.length,p=m.filter_$anyMatch&&m.filter_$anyMatch.length?b.multipleColumns(e,m.filter_$anyMatch):[];if(f.$cells=f.$row.children(),f.anyMatchFlag&&p.length>1||f.anyMatchFilter&&!o){if(f.anyMatch=!0,f.isMatch=!0,f.rowArray=f.$cells.map(function(b){if(a.inArray(b,p)>-1||f.anyMatchFilter&&!o)return f.parsed[b]?l=f.cacheArray[b]:(l=f.rawArray[b],l=a.trim(m.filter_ignoreCase?l.toLowerCase():l),e.sortLocaleCompare&&(l=d.replaceAccents(l))),l}).get(),f.filter=f.anyMatchFilter,f.iFilter=f.iAnyMatchFilter,f.exact=f.rowArray.join(" "),f.iExact=m.filter_ignoreCase?f.exact.toLowerCase():f.exact,f.cache=f.cacheArray.slice(0,-1).join(" "),g.excludeMatch=g.noAnyMatch,null!==(i=b.processTypes(e,f,g)))n=i;else if(m.filter_startsWith)for(n=!1,p=Math.min(e.columns,f.rowArray.length);!n&&p>0;)p--,n=n||0===f.rowArray[p].indexOf(f.iFilter);else n=(f.iExact+f.childRowText).indexOf(f.iFilter)>=0;if(f.anyMatch=!1,f.filters.join("")===f.filter)return n}for(p=0;p=0:f.filter===f.exact:"function"==typeof j?i=j(f.exact,f.cache,f.filter,p,f.$row,e,f):"function"==typeof j[k||f.filter]&&(l=k||f.filter,i=j[l](f.exact,f.cache,f.filter,p,f.$row,e,f))),null===i?(i=b.processTypes(e,f,g),null!==i?h=i:(l=(f.iExact+f.childRowText).indexOf(b.parseFilter(e,f.iFilter,f)),h=!m.filter_startsWith&&l>=0||m.filter_startsWith&&0===l)):h=i,n=!!h&&n);return n},findRows:function(e,f,g){if(!b.equalFilters(e.config,e.config.lastSearch,g)&&e.config.widgetOptions.filter_initialized){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E=a.extend([],f),F=e.config,G=F.widgetOptions,H={anyMatch:!1,filters:f,filter_regexCache:[]},I={noAnyMatch:["range","operators"],functions:[],excludeFilter:[],defaultColFilter:[],defaultAnyFilter:d.getColumnData(e,G.filter_defaultFilter,F.columns,!0)||""};for(H.parsed=[],p=0;p1&&(isNaN(B[0])?a.each(F.headerContent,function(a,b){b.toLowerCase().indexOf(B[0])>-1&&(C=a,f[C]=B[1])}):C=parseInt(B[0],10)-1,C>=0&&C")>=0)return l;a.isArray(l)?i=l:"object"===a.type(j)&&l&&(i=l(c,e,f))}return!1===i&&(i=b.getOptions(c,e,f)),b.processOptions(c,e,i)},processOptions:function(b,c,e){if(!a.isArray(e))return!1;b=a(b)[0];var f,g,h,i,j,k,l=b.config,m=void 0!==c&&null!==c&&c>=0&&c'+(s.data("placeholder")||s.attr("data-placeholder")||r.filter_placeholder.select||"")+"",u=q.$table.find("thead").find("select."+e.filter+'[data-column="'+f+'"]').val();if(void 0!==g&&""!==g||(g=b.getOptionSource(d,f,i)),a.isArray(g)){for(j=0;j"}else""+p!="[object Object]"&&(l=p=(""+p).replace(c.quote,"""),k=l,l.indexOf(r.filter_selectSourceSeparator)>=0&&(m=l.split(r.filter_selectSourceSeparator),k=m[0],l=m[1]),t+=""!==p?"":"");g=[]}n=(q.$filters?q.$filters:q.$table.children("thead")).find("."+e.filter),r.filter_$externalFilters&&(n=n&&n.length?n.add(r.filter_$externalFilters):r.filter_$externalFilters),o=n.filter('select[data-column="'+f+'"]'),o.length&&(o[h?"html":"append"](t),a.isArray(g)||o.append(g).val(u),o.val(u))}},buildDefault:function(a,c){var e,f,g,h=a.config,i=h.widgetOptions,j=h.columns;for(e=0;e1&&(j=j.slice(1)),h===m.columns&&(k=j.filter(n.filter_anyColumnSelector),j=k.length?k:j),j.val(f[h]).trigger("change"+m.namespace)):(l[h]=j.val()||"",h===m.columns?j.slice(1).filter('[data-column*="'+j.attr("data-column")+'"]').val(l[h]):j.slice(1).val(l[h])),h===m.columns&&j.length&&(n.filter_$anyMatch=j));return l},d.setFilters=function(c,e,f,g){var h=c?a(c)[0].config:"",i=d.getFilters(c,!0,e,g);return void 0===f&&(f=!0),h&&f&&(h.lastCombinedFilter=null,h.lastSearch=[],b.searching(h.table,e,g),h.$table.triggerHandler("filterFomatterUpdate")),0!==i.length}}(a),function(a,b){"use strict";var c=a.tablesorter||{};a.extend(c.css,{sticky:"tablesorter-stickyHeader",stickyVis:"tablesorter-sticky-visible",stickyHide:"tablesorter-sticky-hidden",stickyWrap:"tablesorter-sticky-wrapper"}),c.addHeaderResizeEvent=function(b,c,d){if(b=a(b)[0],b.config){var e={timer:250},f=a.extend({},e,d),g=b.config,h=g.widgetOptions,i=function(a){var b,c,d,e,f,i,j=g.$headers.length;for(h.resize_flag=!0,c=[],b=0;b=0&&!e.$table.hasClass("hasFilters"))){var g,h,i,j,k=e.$table,l=a(f.stickyHeaders_attachTo),m=e.namespace+"stickyheaders ",n=a(f.stickyHeaders_yScroll||f.stickyHeaders_attachTo||b),o=a(f.stickyHeaders_xScroll||f.stickyHeaders_attachTo||b),p=k.children("thead:first"),q=p.children("tr").not(".sticky-false").children(),r=k.children("tfoot"),s=isNaN(f.stickyHeaders_offset)?a(f.stickyHeaders_offset):"",t=s.length?s.height()||0:parseInt(f.stickyHeaders_offset,10)||0,u=k.parent().closest("."+c.css.table).hasClass("hasStickyHeaders")?k.parent().closest("table.tablesorter")[0].config.widgetOptions.$sticky.parent():[],v=u.length?u.height():0,w=f.$sticky=k.clone().addClass("containsStickyHeaders "+c.css.sticky+" "+f.stickyHeaders+" "+e.namespace.slice(1)+"_extra_table").wrap('
'),x=w.parent().addClass(c.css.stickyHide).css({position:l.length?"absolute":"fixed",padding:parseInt(w.parent().parent().css("padding-left"),10),top:t+v,left:0,visibility:"hidden",zIndex:f.stickyHeaders_zIndex||2}),y=w.children("thead:first"),z="",A=0,B=function(a,c){var d,e,f,g,h,i=a.filter(":visible"),j=i.length;for(d=0;dd.top&&j=0&&e.$filters&&e.$filters.eq(g).find("a, select, input").filter(":visible").focus())}),c.filter.bindSearch(k,j.find("."+c.css.filter)),f.filter_hideFilters&&c.filter.hideFilters(e,w)),f.stickyHeaders_addResizeEvent&&k.bind("resize"+e.namespace+"stickyheaders",function(){C()}),k.triggerHandler("stickyHeadersInit")}},remove:function(d,e,f){var g=e.namespace+"stickyheaders ";e.$table.removeClass("hasStickyHeaders").unbind("pagerComplete resize filterEnd stickyHeadersUpdate ".split(" ").join(g).replace(/\s+/g," ")).next("."+c.css.stickyWrap).remove(),f.$sticky&&f.$sticky.length&&f.$sticky.remove(),a(b).add(f.stickyHeaders_xScroll).add(f.stickyHeaders_yScroll).add(f.stickyHeaders_attachTo).unbind("scroll resize ".split(" ").join(g).replace(/\s+/g," ")),c.addHeaderResizeEvent(d,!0)}})}(a,window),function(a,b){"use strict";var c=a.tablesorter||{};a.extend(c.css,{resizableContainer:"tablesorter-resizable-container",resizableHandle:"tablesorter-resizable-handle",resizableNoSelect:"tablesorter-disableSelection",resizableStorage:"tablesorter-resizable"}),a(function(){var b="";a("head").append(b)}),c.resizable={init:function(b,d){if(!b.$table.hasClass("hasResizable")){b.$table.addClass("hasResizable");var e,f,g,h,i=b.$table,j=i.parent(),k=parseInt(i.css("margin-top"),10),l=d.resizable_vars={useStorage:c.storage&&!1!==d.resizable,$wrap:j,mouseXPosition:0,$target:null,$next:null,overflow:"auto"===j.css("overflow")||"scroll"===j.css("overflow")||"auto"===j.css("overflow-x")||"scroll"===j.css("overflow-x"),storedSizes:[]};for(c.resizableReset(b.table,!0),l.tableWidth=i.width(),l.fullWidth=Math.abs(j.width()-l.tableWidth)<20,l.useStorage&&l.overflow&&(c.storage(b.table,"tablesorter-table-original-css-width",l.tableWidth),h=c.storage(b.table,"tablesorter-table-resized-width")||"auto",c.resizable.setWidth(i,h,!0)),d.resizable_vars.storedSizes=g=(l.useStorage?c.storage(b.table,c.css.resizableStorage):[])||[],c.resizable.setWidths(b,d,g),c.resizable.updateStoredSizes(b,d),d.$resizable_container=a('
').css({top:k}).insertBefore(i),f=0;f').appendTo(d.$resizable_container).attr({"data-column":f,unselectable:"on"}).data("header",e).bind("selectstart",!1);c.resizable.bindings(b,d)}},updateStoredSizes:function(a,b){var c,d,e=a.columns,f=b.resizable_vars;for(f.storedSizes=[],c=0;c0){for(h.storedSizes[h.target]+=k,c.resizable.setWidth(h.$target,h.storedSizes[h.target],!0),f=0;f0?d.sortList=k:c.hasInitialized&&k&&k.length>0&&b.sortOn(d,k))},remove:function(a,c){c.$table.removeClass("hasSaveSort"),b.storage&&b.storage(a,"tablesorter-savesort","")}})}(a),a.tablesorter}); \ No newline at end of file +/*! tablesorter (FORK) - updated 05-16-2017 (v2.28.10)*/ +!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(e,t,r){"use strict";var i=e.tablesorter||{};e.extend(!0,i.defaults,{fixedUrl:"",widgetOptions:{storage_fixedUrl:"",storage_group:"",storage_page:"",storage_storageType:"",storage_tableId:"",storage_useSessionStorage:""}}),i.storage=function(i,a,l,s){var n,o,c,d=!1,f={},h=(i=e(i)[0]).config,u=h&&h.widgetOptions,p=(s&&s.storageType||u&&u.storage_storageType).toString().charAt(0).toLowerCase(),g=p?"":s&&s.useSessionStorage||u&&u.storage_useSessionStorage,m=e(i),b=s&&s.id||m.attr(s&&s.group||u&&u.storage_group||"data-table-group")||u&&u.storage_tableId||i.id||e(".tablesorter").index(m),y=s&&s.url||m.attr(s&&s.page||u&&u.storage_page||"data-table-page")||u&&u.storage_fixedUrl||h&&h.fixedUrl||t.location.pathname;if("c"!==p&&(p="s"===p||g?"sessionStorage":"localStorage")in t)try{t[p].setItem("_tmptest","temp"),d=!0,t[p].removeItem("_tmptest")}catch(e){h&&h.debug&&console.warn(p+" is not supported in this browser")}if(h.debug&&console.log("Storage widget using",d?p:"cookies"),e.parseJSON&&(d?f=e.parseJSON(t[p][a]||"null")||{}:(o=r.cookie.split(/[;\s|=]/),f=0!==(n=e.inArray(a,o)+1)?e.parseJSON(o[n]||"null")||{}:{})),void 0===l||!t.JSON||!JSON.hasOwnProperty("stringify"))return f&&f[y]?f[y][b]:"";f[y]||(f[y]={}),f[y][b]=l,d?t[p][a]=JSON.stringify(f):((c=new Date).setTime(c.getTime()+31536e6),r.cookie=a+"="+JSON.stringify(f).replace(/\"/g,'"')+"; expires="+c.toGMTString()+"; path=/")}}(e,window,document),function(e){"use strict";var t=e.tablesorter||{};t.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",sortNone:"",sortAsc:"",sortDesc:"",active:"",hover:"",icons:"",iconSortNone:"bootstrap-icon-unsorted",iconSortAsc:"icon-chevron-up glyphicon glyphicon-chevron-up",iconSortDesc:"icon-chevron-down 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"}},e.extend(t.css,{wrapper:"tablesorter-wrapper"}),t.addWidget({id:"uitheme",priority:10,format:function(r,i,a){var l,s,n,o,c,d,f,h,u,p,g,m,b,y=t.themes,_=i.$table.add(e(i.namespace+"_extra_table")),v=i.$headers.add(e(i.namespace+"_extra_headers")),w=i.theme||"jui",x=y[w]||{},S=e.trim([x.sortNone,x.sortDesc,x.sortAsc,x.active].join(" ")),C=e.trim([x.iconSortNone,x.iconSortDesc,x.iconSortAsc].join(" "));for(i.debug&&(c=new Date),_.hasClass("tablesorter-"+w)&&i.theme===i.appliedTheme&&a.uitheme_applied||(a.uitheme_applied=!0,p=y[i.appliedTheme]||{},g=(b=!e.isEmptyObject(p))?[p.sortNone,p.sortDesc,p.sortAsc,p.active].join(" "):"",m=b?[p.iconSortNone,p.iconSortDesc,p.iconSortAsc].join(" "):"",b&&(a.zebra[0]=e.trim(" "+a.zebra[0].replace(" "+p.even,"")),a.zebra[1]=e.trim(" "+a.zebra[1].replace(" "+p.odd,"")),i.$tbodies.children().removeClass([p.even,p.odd].join(" "))),x.even&&(a.zebra[0]+=" "+x.even),x.odd&&(a.zebra[1]+=" "+x.odd),_.children("caption").removeClass(p.caption||"").addClass(x.caption),h=_.removeClass((i.appliedTheme?"tablesorter-"+(i.appliedTheme||""):"")+" "+(p.table||"")).addClass("tablesorter-"+w+" "+(x.table||"")).children("tfoot"),i.appliedTheme=i.theme,h.length&&h.children("tr").removeClass(p.footerRow||"").addClass(x.footerRow).children("th, td").removeClass(p.footerCells||"").addClass(x.footerCells),v.removeClass((b?[p.header,p.hover,g].join(" "):"")||"").addClass(x.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(t){e(this)["mouseenter"===t.type?"addClass":"removeClass"](x.hover||"")}),v.each(function(){var r=e(this);r.find("."+t.css.wrapper).length||r.wrapInner('
')}),i.cssIcon&&v.find("."+t.css.icon).removeClass(b?[p.icons,m].join(" "):"").addClass(x.icons||""),t.hasWidget(i.table,"filter")&&(s=function(){_.children("thead").children("."+t.css.filterRow).removeClass(b?p.filterRow||"":"").addClass(x.filterRow||"")},a.filter_initialized?s():_.one("filterInit",function(){s()}))),l=0;l1)))for(h=1;h=]/g,query:"(q|query)",wild01:/\?/g,wild0More:/\*/g,quote:/\"/g,isNeg1:/(>=?\s*-\d)/,isNeg2:/(<=?\s*\d)/},types:{or:function(i,a,l){if((r.orTest.test(a.iFilter)||r.orSplit.test(a.filter))&&!r.regex.test(a.filter)){var s,n,o,c,d=e.extend({},a),f=a.filter.split(r.orSplit),h=a.iFilter.split(r.orSplit),u=f.length;for(s=0;s=f:s>f:r.ltTest.test(l.iFilter)&&(n=r.lteTest.test(l.iFilter)?s<=f:s=0)))}return null},exact:function(i,a){if(r.exact.test(a.iFilter)){var l=a.iFilter.replace(r.exact,""),s=t.parseFilter(i,l,a)||"";return a.anyMatch?e.inArray(s,a.rowArray)>=0:s==a.iExact}return null},range:function(e,a){if(r.toTest.test(a.iFilter)){var l,s,n,o,c=e.table,d=a.index,f=a.parsed[d],h=a.iFilter.split(r.toSplit);return s=h[0].replace(i.regex.nondigit,"")||"",n=i.formatFloat(t.parseFilter(e,s,a),c),s=h[1].replace(i.regex.nondigit,"")||"",o=i.formatFloat(t.parseFilter(e,s,a),c),(f||"numeric"===e.parsers[d].type)&&(n=""===(l=e.parsers[d].format(""+h[0],c,e.$headers.eq(d),d))||isNaN(l)?n:l,o=""===(l=e.parsers[d].format(""+h[1],c,e.$headers.eq(d),d))||isNaN(l)?o:l),!f&&"numeric"!==e.parsers[d].type||isNaN(n)||isNaN(o)?(s=isNaN(a.iExact)?a.iExact.replace(i.regex.nondigit,""):a.iExact,l=i.formatFloat(s,c)):l=a.cache,n>o&&(s=n,n=o,o=s),l>=n&&l<=o||""===n||""===o}return null},wild:function(e,i){if(r.wildOrTest.test(i.iFilter)){var a=""+(t.parseFilter(e,i.iFilter,i)||"");!r.wildTest.test(a)&&i.nestedFilters&&(a=i.isMatch?a:"^("+a+")$");try{return new RegExp(a.replace(r.wild01,"\\S{1}").replace(r.wild0More,"\\S*"),e.widgetOptions.filter_ignoreCase?"i":"").test(i.exact)}catch(e){return null}}return null},fuzzy:function(e,i){if(r.fuzzyTest.test(i.iFilter)){var a,l=0,s=i.iExact.length,n=i.iFilter.slice(1),o=t.parseFilter(e,n,i)||"";for(a=0;a]=?/,gtTest:/>/,gteTest:/>=/,ltTest:/'+(c.data("placeholder")||c.attr("data-placeholder")||g.filter_placeholder.select||"")+"":"",f=n,o=n,n.indexOf(g.filter_selectSourceSeparator)>=0&&(o=(f=n.split(g.filter_selectSourceSeparator))[1],f=f[0]),s+="");p.$table.find("thead").find("select."+a.filter+'[data-column="'+d+'"]').append(s),(h="function"==typeof(o=g.filter_selectSource)||i.getColumnData(l,o,d))&&t.buildSelect(p.table,d,"",!0,c.hasClass(g.filter_onlyAvail))}t.buildDefault(l,!0),t.bindSearch(l,p.$table.find("."+a.filter),!0),g.filter_external&&t.bindSearch(l,g.filter_external),g.filter_hideFilters&&t.hideFilters(p),p.showProcessing&&(o="filterStart filterEnd ".split(" ").join(p.namespace+"filter "),p.$table.unbind(o.replace(i.regex.spaces," ")).bind(o,function(t,r){c=r?p.$table.find("."+a.header).filter("[data-column]").filter(function(){return""!==r[e(this).data("column")]}):"",i.isProcessing(l,"filterStart"===t.type,r?c:"")})),p.filteredRows=p.totalRows,o="tablesorter-initialized pagerBeforeInitialized ".split(" ").join(p.namespace+"filter "),p.$table.unbind(o.replace(i.regex.spaces," ")).bind(o,function(){t.completeInit(this)}),p.pager&&p.pager.initialized&&!g.filter_initialized?(p.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){t.filterInitComplete(p)},100)):g.filter_initialized||t.completeInit(l)},completeInit:function(e){var r=e.config,a=r.widgetOptions,l=t.setDefaults(e,r,a)||[];l.length&&(r.delayInit&&""===l.join("")||i.setFilters(e,l,!0)),r.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){a.filter_initialized||t.filterInitComplete(r)},100)},formatterUpdated:function(e,t){var r=e&&e.closest("table")[0].config.widgetOptions;r&&!r.filter_initialized&&(r.filter_formatterInit[t]=1)},filterInitComplete:function(r){var i,a,l=r.widgetOptions,s=0,n=function(){l.filter_initialized=!0,r.lastSearch=r.$table.data("lastSearch"),r.$table.triggerHandler("filterInit",r),t.findRows(r.table,r.lastSearch||[])};if(e.isEmptyObject(l.filter_formatter))n();else{for(a=l.filter_formatterInit.length,i=0;i';for(c=0;c1?'").appendTo(l.$table.children("thead").eq(0)).children("td"),c=0;c").appendTo(n):((p=i.getColumnData(r,s.filter_formatter,c))?(s.filter_formatterCount++,(_=p(n,c))&&0===_.length&&(_=n.children("input")),_&&(0===_.parent().length||_.parent().length&&_.parent()[0]!==n[0])&&n.append(_)):_=e('').appendTo(n),_&&(g=d.data("placeholder")||d.attr("data-placeholder")||s.filter_placeholder.search||"",_.attr("placeholder",g))),_&&(u=(e.isArray(s.filter_cssFilter)?void 0!==s.filter_cssFilter[c]?s.filter_cssFilter[c]||"":"":s.filter_cssFilter)||"",_.addClass(a.filter+" "+u).attr("data-column",n.attr("data-column")),h&&(_.attr("placeholder","").addClass(a.filterDisabled)[0].disabled=!0)))},bindSearch:function(r,a,s){if(r=e(r)[0],(a=e(a)).length){var n,o=r.config,c=o.widgetOptions,d=o.namespace+"filter",f=c.filter_$externalFilters;!0!==s&&(n=c.filter_anyColumnSelector+","+c.filter_multipleColumnSelector,c.filter_$anyMatch=a.filter(n),f&&f.length?c.filter_$externalFilters=c.filter_$externalFilters.add(a):c.filter_$externalFilters=a,i.setFilters(r,o.$table.data("lastSearch")||[],!1===s)),n="keypress keyup keydown search change input ".split(" ").join(d+" "),a.attr("data-lastSearchTime",(new Date).getTime()).unbind(n.replace(i.regex.spaces," ")).bind("keydown"+d,function(e){if(e.which===l.escape&&!r.config.widgetOptions.filter_resetOnEsc)return!1}).bind("keyup"+d,function(a){c=r.config.widgetOptions;var s=parseInt(e(this).attr("data-column"),10),n="boolean"==typeof c.filter_liveSearch?c.filter_liveSearch:i.getColumnData(r,c.filter_liveSearch,s);if(void 0===n&&(n=c.filter_liveSearch.fallback||!1),e(this).attr("data-lastSearchTime",(new Date).getTime()),a.which===l.escape)this.value=c.filter_resetOnEsc?"":o.lastSearch[s];else{if(!1===n)return;if(""!==this.value&&("number"==typeof n&&this.value.length=l.left&&a.which<=l.down)))return}t.searching(r,!0,!0,s)}).bind("search change keypress input ".split(" ").join(d+" "),function(a){var s=parseInt(e(this).attr("data-column"),10),n="boolean"==typeof c.filter_liveSearch?c.filter_liveSearch:i.getColumnData(r,c.filter_liveSearch,s);!r.config.widgetOptions.filter_initialized||a.which!==l.enter&&"search"!==a.type&&("change"!==a.type&&"input"!==a.type||!0!==n||this.value===o.lastSearch[s])||(a.preventDefault(),e(this).attr("data-lastSearchTime",(new Date).getTime()),t.searching(r,"keypress"!==a.type,!0,s))})}},searching:function(e,r,a,l){var s,n=e.config.widgetOptions;void 0===l?s=!1:void 0===(s="boolean"==typeof n.filter_liveSearch?n.filter_liveSearch:i.getColumnData(e,n.filter_liveSearch,l))&&(s=n.filter_liveSearch.fallback||!1),clearTimeout(n.filter_searchTimer),void 0===r||!0===r?n.filter_searchTimer=setTimeout(function(){t.checkFilters(e,r,a)},s?n.filter_searchDelay:10):t.checkFilters(e,r,a)},equalFilters:function(t,r,i){var a,l=[],s=[],n=t.columns+1;for(r=e.isArray(r)?r:[],i=e.isArray(i)?i:[],a=0;a1?e.trim(t).split(/\s/):[e.trim(t)],n=s.length-1,o=0,c=i;for(n<1&&l>1&&(s[1]=s[0]);a.test(c);)c=c.replace(a,s[o++]||""),a.test(c)&&o(n=parseInt(l[1],10)||e.columns-1)&&(i=s,s=n,n=i),n>=e.columns&&(n=e.columns-1);s<=n;s++)h[h.length]=s;t=t.replace(a[d],"")}if(!r&&/,/.test(t))for(f=(o=t.split(/\s*,\s*/)).length,c=0;c-1})},multipleColumns:function(r,i){var a=r.widgetOptions,l=a.filter_initialized||!i.filter(a.filter_anyColumnSelector).length,s=e.trim(t.getLatestSearch(i).attr("data-column")||"");return t.findRange(r,s,!l)},processTypes:function(r,i,a){var l,s=null,n=null;for(l in t.types)e.inArray(l,a.excludeMatch)<0&&null===n&&null!==(n=t.types[l](r,i,a))&&(s=n);return s},matchType:function(e,t){var r,i=e.widgetOptions,l=e.$headerIndexed[t];return l.hasClass("filter-exact")?r=!1:l.hasClass("filter-match")?r=!0:(i.filter_columnFilters?l=e.$filters.find("."+a.filter).add(i.filter_$externalFilters).filter('[data-column="'+t+'"]'):i.filter_$externalFilters&&(l=i.filter_$externalFilters.filter('[data-column="'+t+'"]')),r=!!l.length&&"match"===e.widgetOptions.filter_matchType[(l[0].nodeName||"").toLowerCase()]),r},processRow:function(a,l,s){var n,o,c,d,f,h=a.widgetOptions,u=!0,p=h.filter_$anyMatch&&h.filter_$anyMatch.length,g=h.filter_$anyMatch&&h.filter_$anyMatch.length?t.multipleColumns(a,h.filter_$anyMatch):[];if(l.$cells=l.$row.children(),l.anyMatchFlag&&g.length>1||l.anyMatchFilter&&!p){if(l.anyMatch=!0,l.isMatch=!0,l.rowArray=l.$cells.map(function(t){if(e.inArray(t,g)>-1||l.anyMatchFilter&&!p)return l.parsed[t]?f=l.cacheArray[t]:(f=l.rawArray[t],f=e.trim(h.filter_ignoreCase?f.toLowerCase():f),a.sortLocaleCompare&&(f=i.replaceAccents(f))),f}).get(),l.filter=l.anyMatchFilter,l.iFilter=l.iAnyMatchFilter,l.exact=l.rowArray.join(" "),l.iExact=h.filter_ignoreCase?l.exact.toLowerCase():l.exact,l.cache=l.cacheArray.slice(0,-1).join(" "),s.excludeMatch=s.noAnyMatch,null!==(o=t.processTypes(a,l,s)))u=o;else if(h.filter_startsWith)for(u=!1,g=Math.min(a.columns,l.rowArray.length);!u&&g>0;)g--,u=u||0===l.rowArray[g].indexOf(l.iFilter);else u=(l.iExact+l.childRowText).indexOf(l.iFilter)>=0;if(l.anyMatch=!1,l.filters.join("")===l.filter)return u}for(g=0;g=0:l.filter===l.exact:"function"==typeof c?o=c(l.exact,l.cache,l.filter,g,l.$row,a,l):"function"==typeof c[d||l.filter]&&(o=c[f=d||l.filter](l.exact,l.cache,l.filter,g,l.$row,a,l))),null===o?null!==(o=t.processTypes(a,l,s))?n=o:(f=(l.iExact+l.childRowText).indexOf(t.parseFilter(a,l.iFilter,l)),n=!h.filter_startsWith&&f>=0||h.filter_startsWith&&0===f):n=o,u=!!n&&u);return u},findRows:function(a,l,s){if(!t.equalFilters(a.config,a.config.lastSearch,s)&&a.config.widgetOptions.filter_initialized){var n,o,c,d,f,h,u,p,g,m,b,y,_,v,w,x,S,C,z,$,F,R,T,k=e.extend([],l),H=a.config,A=H.widgetOptions,I={anyMatch:!1,filters:l,filter_regexCache:[]},O={noAnyMatch:["range","operators"],functions:[],excludeFilter:[],defaultColFilter:[],defaultAnyFilter:i.getColumnData(a,A.filter_defaultFilter,H.columns,!0)||""};for(I.parsed=[],g=0;g1&&(isNaN(F[0])?e.each(H.headerContent,function(e,t){t.toLowerCase().indexOf(F[0])>-1&&(l[R=e]=F[1])}):R=parseInt(F[0],10)-1,R>=0&&R")>=0)return d;e.isArray(d)?n=d:"object"===e.type(o)&&d&&(n=d(r,a,l))}return!1===n&&(n=t.getOptions(r,a,l)),t.processOptions(r,a,n)},processOptions:function(t,r,a){if(!e.isArray(a))return!1;var l,s,n,o,c,d,f=(t=e(t)[0]).config,h=void 0!==r&&null!==r&&r>=0&&r'+(y.data("placeholder")||y.attr("data-placeholder")||b.filter_placeholder.select||"")+"",v=m.$table.find("thead").find("select."+a.filter+'[data-column="'+l+'"]').val();if(void 0!==s&&""!==s||(s=t.getOptionSource(i,l,o)),e.isArray(s)){for(c=0;c"}else""+g!="[object Object]"&&(d=f=g=(""+g).replace(r.quote,"""),f.indexOf(b.filter_selectSourceSeparator)>=0&&(d=(h=f.split(b.filter_selectSourceSeparator))[0],f=h[1]),_+=""!==g?"":"");s=[]}u=(m.$filters?m.$filters:m.$table.children("thead")).find("."+a.filter),b.filter_$externalFilters&&(u=u&&u.length?u.add(b.filter_$externalFilters):b.filter_$externalFilters),(p=u.filter('select[data-column="'+l+'"]')).length&&(p[n?"html":"append"](_),e.isArray(s)||p.append(s).val(v),p.val(v))}},buildDefault:function(e,r){var a,l,s,n=e.config,o=n.widgetOptions,c=n.columns;for(a=0;a1&&(c=c.slice(1)),n===h.columns&&(c=(d=c.filter(u.filter_anyColumnSelector)).length?d:c),c.val(l[n]).trigger("change"+h.namespace)):(f[n]=c.val()||"",n===h.columns?c.slice(1).filter('[data-column*="'+c.attr("data-column")+'"]').val(f[n]):c.slice(1).val(f[n])),n===h.columns&&c.length&&(u.filter_$anyMatch=c));return f},i.setFilters=function(r,a,l,s){var n=r?e(r)[0].config:"",o=i.getFilters(r,!0,a,s);return void 0===l&&(l=!0),n&&l&&(n.lastCombinedFilter=null,n.lastSearch=[],t.searching(n.table,a,s),n.$table.triggerHandler("filterFomatterUpdate")),0!==o.length}}(e),function(e,t){"use strict";var r=e.tablesorter||{};e.extend(r.css,{sticky:"tablesorter-stickyHeader",stickyVis:"tablesorter-sticky-visible",stickyHide:"tablesorter-sticky-hidden",stickyWrap:"tablesorter-sticky-wrapper"}),r.addHeaderResizeEvent=function(t,r,i){if((t=e(t)[0]).config){var a={timer:250},l=e.extend({},a,i),s=t.config,n=s.widgetOptions,o=function(e){var t,r,i,a,l,o,c=s.$headers.length;for(n.resize_flag=!0,r=[],t=0;t=0&&!a.$table.hasClass("hasFilters"))){var s,n,o,c,d=a.$table,f=e(l.stickyHeaders_attachTo),h=a.namespace+"stickyheaders ",u=e(l.stickyHeaders_yScroll||l.stickyHeaders_attachTo||t),p=e(l.stickyHeaders_xScroll||l.stickyHeaders_attachTo||t),g=d.children("thead:first").children("tr").not(".sticky-false").children(),m=d.children("tfoot"),b=isNaN(l.stickyHeaders_offset)?e(l.stickyHeaders_offset):"",y=b.length?b.height()||0:parseInt(l.stickyHeaders_offset,10)||0,_=d.parent().closest("."+r.css.table).hasClass("hasStickyHeaders")?d.parent().closest("table.tablesorter")[0].config.widgetOptions.$sticky.parent():[],v=_.length?_.height():0,w=l.$sticky=d.clone().addClass("containsStickyHeaders "+r.css.sticky+" "+l.stickyHeaders+" "+a.namespace.slice(1)+"_extra_table").wrap('
'),x=w.parent().addClass(r.css.stickyHide).css({position:f.length?"absolute":"fixed",padding:parseInt(w.parent().parent().css("padding-left"),10),top:y+v,left:0,visibility:"hidden",zIndex:l.stickyHeaders_zIndex||2}),S=w.children("thead:first"),C="",z=0,$=function(e,r){var i,a,l,s,n,o=e.filter(":visible"),c=o.length;for(i=0;ii.top&&c=0&&a.$filters&&a.$filters.eq(s).find("a, select, input").filter(":visible").focus())}),r.filter.bindSearch(d,c.find("."+r.css.filter)),l.filter_hideFilters&&r.filter.hideFilters(a,w)),l.stickyHeaders_addResizeEvent&&d.bind("resize"+a.namespace+"stickyheaders",function(){F()}),d.triggerHandler("stickyHeadersInit")}},remove:function(i,a,l){var s=a.namespace+"stickyheaders ";a.$table.removeClass("hasStickyHeaders").unbind("pagerComplete resize filterEnd stickyHeadersUpdate ".split(" ").join(s).replace(/\s+/g," ")).next("."+r.css.stickyWrap).remove(),l.$sticky&&l.$sticky.length&&l.$sticky.remove(),e(t).add(l.stickyHeaders_xScroll).add(l.stickyHeaders_yScroll).add(l.stickyHeaders_attachTo).unbind("scroll resize ".split(" ").join(s).replace(/\s+/g," ")),r.addHeaderResizeEvent(i,!0)}})}(e,window),function(e,t){"use strict";var r=e.tablesorter||{};e.extend(r.css,{resizableContainer:"tablesorter-resizable-container",resizableHandle:"tablesorter-resizable-handle",resizableNoSelect:"tablesorter-disableSelection",resizableStorage:"tablesorter-resizable"}),e(function(){var t="";e("head").append(t)}),r.resizable={init:function(t,i){if(!t.$table.hasClass("hasResizable")){t.$table.addClass("hasResizable");var a,l,s,n,o=t.$table,c=o.parent(),d=parseInt(o.css("margin-top"),10),f=i.resizable_vars={useStorage:r.storage&&!1!==i.resizable,$wrap:c,mouseXPosition:0,$target:null,$next:null,overflow:"auto"===c.css("overflow")||"scroll"===c.css("overflow")||"auto"===c.css("overflow-x")||"scroll"===c.css("overflow-x"),storedSizes:[]};for(r.resizableReset(t.table,!0),f.tableWidth=o.width(),f.fullWidth=Math.abs(c.width()-f.tableWidth)<20,f.useStorage&&f.overflow&&(r.storage(t.table,"tablesorter-table-original-css-width",f.tableWidth),n=r.storage(t.table,"tablesorter-table-resized-width")||"auto",r.resizable.setWidth(o,n,!0)),i.resizable_vars.storedSizes=s=(f.useStorage?r.storage(t.table,r.css.resizableStorage):[])||[],r.resizable.setWidths(t,i,s),r.resizable.updateStoredSizes(t,i),i.$resizable_container=e('
').css({top:d}).insertBefore(o),l=0;l').appendTo(i.$resizable_container).attr({"data-column":l,unselectable:"on"}).data("header",a).bind("selectstart",!1);r.resizable.bindings(t,i)}},updateStoredSizes:function(e,t){var r,i,a=e.columns,l=t.resizable_vars;for(l.storedSizes=[],r=0;r0){for(n.storedSizes[n.target]+=d,r.resizable.setWidth(n.$target,n.storedSizes[n.target],!0),l=0;l0?i.sortList=d:r.hasInitialized&&d&&d.length>0&&t.sortOn(i,d))},remove:function(e,r){r.$table.removeClass("hasSaveSort"),t.storage&&t.storage(e,"tablesorter-savesort","")}})}(e),e.tablesorter}); \ No newline at end of file diff --git a/dist/js/parsers/parser-date-extract.min.js b/dist/js/parsers/parser-date-extract.min.js index 240dc3e5..d3a7800e 100644 --- a/dist/js/parsers/parser-date-extract.min.js +++ b/dist/js/parsers/parser-date-extract.min.js @@ -1,6 +1,6 @@ /*! Parser: Extract out date - updated 10/26/2014 (v2.18.0) */ -!function(a){"use strict";var b={usLong:/[A-Z]{3,10}\.?\s+\d{1,2},?\s+(?:\d{4})(?:\s+\d{1,2}:\d{2}(?::\d{2})?(?:\s+[AP]M)?)?/i,mdy:/(\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4}(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?)/i,dmy:/(\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4}(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?)/i,dmyreplace:/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,ymd:/(\d{4}[\/\s]\d{1,2}[\/\s]\d{1,2}(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?)/i,ymdreplace:/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/};/*! extract US Long Date */ -a.tablesorter.addParser({id:"extractUSLongDate",is:function(){return!1},format:function(a){var c,d=a?a.match(b.usLong):a;return d?(c=new Date(d[0]),c instanceof Date&&isFinite(c)?c.getTime():a):a},type:"numeric"}),/*! extract MMDDYYYY */ -a.tablesorter.addParser({id:"extractMMDDYYYY",is:function(){return!1},format:function(a){var c,d=a?a.replace(/\s+/g," ").replace(/[\-.,]/g,"/").match(b.mdy):a;return d?(c=new Date(d[0]),c instanceof Date&&isFinite(c)?c.getTime():a):a},type:"numeric"}),/*! extract DDMMYYYY */ -a.tablesorter.addParser({id:"extractDDMMYYYY",is:function(){return!1},format:function(a){var c,d=a?a.replace(/\s+/g," ").replace(/[\-.,]/g,"/").match(b.dmy):a;return d?(c=new Date(d[0].replace(b.dmyreplace,"$2/$1/$3")),c instanceof Date&&isFinite(c)?c.getTime():a):a},type:"numeric"}),/*! extract YYYYMMDD */ -a.tablesorter.addParser({id:"extractYYYYMMDD",is:function(){return!1},format:function(a){var c,d=a?a.replace(/\s+/g," ").replace(/[\-.,]/g,"/").match(b.ymd):a;return d?(c=new Date(d[0].replace(b.ymdreplace,"$2/$3/$1")),c instanceof Date&&isFinite(c)?c.getTime():a):a},type:"numeric"})}(jQuery); \ No newline at end of file +!function(e){"use strict";var t={usLong:/[A-Z]{3,10}\.?\s+\d{1,2},?\s+(?:\d{4})(?:\s+\d{1,2}:\d{2}(?::\d{2})?(?:\s+[AP]M)?)?/i,mdy:/(\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4}(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?)/i,dmy:/(\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4}(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?)/i,dmyreplace:/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,ymd:/(\d{4}[\/\s]\d{1,2}[\/\s]\d{1,2}(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?)/i,ymdreplace:/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/};/*! extract US Long Date */ +e.tablesorter.addParser({id:"extractUSLongDate",is:function(){return!1},format:function(e){var r,a=e?e.match(t.usLong):e;return a?(r=new Date(a[0]),r instanceof Date&&isFinite(r)?r.getTime():e):e},type:"numeric"}),/*! extract MMDDYYYY */ +e.tablesorter.addParser({id:"extractMMDDYYYY",is:function(){return!1},format:function(e){var r,a=e?e.replace(/\s+/g," ").replace(/[\-.,]/g,"/").match(t.mdy):e;return a?(r=new Date(a[0]),r instanceof Date&&isFinite(r)?r.getTime():e):e},type:"numeric"}),/*! extract DDMMYYYY */ +e.tablesorter.addParser({id:"extractDDMMYYYY",is:function(){return!1},format:function(e){var r,a=e?e.replace(/\s+/g," ").replace(/[\-.,]/g,"/").match(t.dmy):e;return a?(r=new Date(a[0].replace(t.dmyreplace,"$2/$1/$3")),r instanceof Date&&isFinite(r)?r.getTime():e):e},type:"numeric"}),/*! extract YYYYMMDD */ +e.tablesorter.addParser({id:"extractYYYYMMDD",is:function(){return!1},format:function(e){var r,a=e?e.replace(/\s+/g," ").replace(/[\-.,]/g,"/").match(t.ymd):e;return a?(r=new Date(a[0].replace(t.ymdreplace,"$2/$3/$1")),r instanceof Date&&isFinite(r)?r.getTime():e):e},type:"numeric"})}(jQuery); \ No newline at end of file diff --git a/dist/js/parsers/parser-date-iso8601.min.js b/dist/js/parsers/parser-date-iso8601.min.js index 0b5f6604..2bab3e6c 100644 --- a/dist/js/parsers/parser-date-iso8601.min.js +++ b/dist/js/parsers/parser-date-iso8601.min.js @@ -1,2 +1,2 @@ /*! Parser: ISO-8601 date - updated 10/26/2014 (v2.18.0) */ -!function(a){"use strict";var b=/^([0-9]{4})(-([0-9]{2})(-([0-9]{2})(T([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2}):([0-9]{2})))?)?)?)?$/;a.tablesorter.addParser({id:"iso8601date",is:function(a){return!!a&&a.match(b)},format:function(a){var c=a?a.match(b):a;if(c){var d=new Date(c[1],0,1);return c[3]&&d.setMonth(c[3]-1),c[5]&&d.setDate(c[5]),c[7]&&d.setHours(c[7]),c[8]&&d.setMinutes(c[8]),c[10]&&d.setSeconds(c[10]),c[12]&&d.setMilliseconds(1e3*Number("0."+c[12])),d.getTime()}return a},type:"numeric"})}(jQuery); \ No newline at end of file +!function(e){"use strict";var t=/^([0-9]{4})(-([0-9]{2})(-([0-9]{2})(T([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2}):([0-9]{2})))?)?)?)?$/;e.tablesorter.addParser({id:"iso8601date",is:function(e){return!!e&&e.match(t)},format:function(e){var r=e?e.match(t):e;if(r){var s=new Date(r[1],0,1);return r[3]&&s.setMonth(r[3]-1),r[5]&&s.setDate(r[5]),r[7]&&s.setHours(r[7]),r[8]&&s.setMinutes(r[8]),r[10]&&s.setSeconds(r[10]),r[12]&&s.setMilliseconds(1e3*Number("0."+r[12])),s.getTime()}return e},type:"numeric"})}(jQuery); \ No newline at end of file diff --git a/dist/js/parsers/parser-date-month.min.js b/dist/js/parsers/parser-date-month.min.js index 470a4f2d..76313330 100644 --- a/dist/js/parsers/parser-date-month.min.js +++ b/dist/js/parsers/parser-date-month.min.js @@ -1,2 +1,2 @@ /*! Parser: Month - updated 11/22/2015 (v2.24.6) */ -!function(a){"use strict";var b=a.tablesorter;b.dates||(b.dates={}),b.dates.months||(b.dates.months={}),b.dates.months.en={1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"},b.addParser({id:"month",is:function(){return!1},format:function(a,c,d,e){if(a){var f,g,h=c.config,i=h.globalize&&(h.globalize[e]||h.globalize)||{},j=b.dates.months[i.lang||"en"];h.ignoreCase&&(a=a.toLowerCase());for(g in j)if("string"==typeof g&&(f=j[g],h.ignoreCase&&(f=f.toLowerCase()),a.match(f)))return parseInt(g,10)}return a},type:"numeric"})}(jQuery); \ No newline at end of file +!function(e){"use strict";var t=e.tablesorter;t.dates||(t.dates={}),t.dates.months||(t.dates.months={}),t.dates.months.en={1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"},t.addParser({id:"month",is:function(){return!1},format:function(e,n,a,r){if(e){var o,s,i=n.config,u=i.globalize&&(i.globalize[r]||i.globalize)||{},c=t.dates.months[u.lang||"en"];i.ignoreCase&&(e=e.toLowerCase());for(s in c)if("string"==typeof s&&(o=c[s],i.ignoreCase&&(o=o.toLowerCase()),e.match(o)))return parseInt(s,10)}return e},type:"numeric"})}(jQuery); \ No newline at end of file diff --git a/dist/js/parsers/parser-date-range.min.js b/dist/js/parsers/parser-date-range.min.js index ee38e631..f1ed4f39 100644 --- a/dist/js/parsers/parser-date-range.min.js +++ b/dist/js/parsers/parser-date-range.min.js @@ -1,6 +1,6 @@ /*! Parser: date ranges -updated 11/22/2015 (v2.24.6) */ -!function(a){"use strict";var b,c=a.tablesorter,d={mdy:/(\d{1,2}[-\s]\d{1,2}[-\s]\d{4}(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?)/gi,dmy:/(\d{1,2}[-\s]\d{1,2}[-\s]\d{4}(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?)/gi,dmyreplace:/(\d{1,2})[-\s](\d{1,2})[-\s](\d{4})/,ymd:/(\d{4}[-\s]\d{1,2}[-\s]\d{1,2}(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?)/gi,ymdreplace:/(\d{4})[-\s](\d{1,2})[-\s](\d{1,2})/,overall_dMMMyyyy:/(\d{1,2}\s+\w+\s+\d{4}(\s+\d{1,2}:\d{2}(:\d{2})?(\s\w+)?)?)/g,matches_dMMMyyyy:/(\d{1,2})\s+(\w+)\s+(\d{4})/};/*! date-range MMDDYYYY */ -a.tablesorter.addParser({id:"date-range-mdy",is:function(){return!1},format:function(a){var b,c,e,f,g=[];if(c=a.replace(/\s+/g," ").replace(/[\/\-.,]/g,"-").match(d.mdy),f=c&&c.length){for(e=0;e=4&&(j.shift(),i=b(j[1],e.config,g),isNaN(i)||(m[k]=m[k].replace(j[1],i)),h=new Date((""+m[k]).replace(c.regex.shortDateXXY,"$3/$2/$1"))),l.push(h instanceof Date&&isFinite(h)?h.getTime():m[k]);return l.sort().join(" - ")}return a},type:"text"})}(jQuery); \ No newline at end of file +!function(e){"use strict";var t,r=e.tablesorter,a={mdy:/(\d{1,2}[-\s]\d{1,2}[-\s]\d{4}(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?)/gi,dmy:/(\d{1,2}[-\s]\d{1,2}[-\s]\d{4}(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?)/gi,dmyreplace:/(\d{1,2})[-\s](\d{1,2})[-\s](\d{4})/,ymd:/(\d{4}[-\s]\d{1,2}[-\s]\d{1,2}(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?)/gi,ymdreplace:/(\d{4})[-\s](\d{1,2})[-\s](\d{1,2})/,overall_dMMMyyyy:/(\d{1,2}\s+\w+\s+\d{4}(\s+\d{1,2}:\d{2}(:\d{2})?(\s\w+)?)?)/g,matches_dMMMyyyy:/(\d{1,2})\s+(\w+)\s+(\d{4})/};/*! date-range MMDDYYYY */ +e.tablesorter.addParser({id:"date-range-mdy",is:function(){return!1},format:function(e){var t,r,n,s,d=[];if(r=e.replace(/\s+/g," ").replace(/[\/\-.,]/g,"-").match(a.mdy),s=r&&r.length){for(n=0;n=4&&(c.shift(),o=t(c[1],n.config,d),isNaN(o)||(g[y]=g[y].replace(c[1],o)),i=new Date((""+g[y]).replace(r.regex.shortDateXXY,"$3/$2/$1"))),l.push(i instanceof Date&&isFinite(i)?i.getTime():g[y]);return l.sort().join(" - ")}return e},type:"text"})}(jQuery); \ No newline at end of file diff --git a/dist/js/parsers/parser-date-two-digit-year.min.js b/dist/js/parsers/parser-date-two-digit-year.min.js index 09c97050..8fe9f17b 100644 --- a/dist/js/parsers/parser-date-two-digit-year.min.js +++ b/dist/js/parsers/parser-date-two-digit-year.min.js @@ -1,2 +1,2 @@ /*! Parser: two digit year - updated 11/26/2016 (v2.28.0) */ -!function(a){"use strict";var b=a.tablesorter,c=(new Date).getFullYear();b.defaults.dataRange="",b.dates||(b.dates={}),b.dates.regxxxxyy=/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{2})/,b.dates.regyyxxxx=/(\d{2})[\/\s](\d{1,2})[\/\s](\d{1,2})/,b.formatDate=function(a,b,d,e){if(a){var f,g,h=a.replace(/\s+/g," ").replace(/[-.,]/g,"/").replace(b,d),i=new Date(h);if(i instanceof Date&&isFinite(i)){for(f=i.getFullYear(),g=e&&e.config.dateRange||50;c-f>g;)f+=100;return i.setFullYear(f)}}return a},a.tablesorter.addParser({id:"ddmmyy",is:function(){return!1},format:function(a,c){return b.formatDate(a,b.dates.regxxxxyy,"$2/$1/19$3",c)},type:"numeric"}),a.tablesorter.addParser({id:"mmddyy",is:function(){return!1},format:function(a,c){return b.formatDate(a,b.dates.regxxxxyy,"$1/$2/19$3",c)},type:"numeric"}),a.tablesorter.addParser({id:"yymmdd",is:function(){return!1},format:function(a,c){return b.formatDate(a,b.dates.regyyxxxx,"$2/$3/19$1",c)},type:"numeric"})}(jQuery); \ No newline at end of file +!function(e){"use strict";var t=e.tablesorter,r=(new Date).getFullYear();t.defaults.dataRange="",t.dates||(t.dates={}),t.dates.regxxxxyy=/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{2})/,t.dates.regyyxxxx=/(\d{2})[\/\s](\d{1,2})[\/\s](\d{1,2})/,t.formatDate=function(e,t,a,n){if(e){var d,s,i=e.replace(/\s+/g," ").replace(/[-.,]/g,"/").replace(t,a),u=new Date(i);if(u instanceof Date&&isFinite(u)){for(d=u.getFullYear(),s=n&&n.config.dateRange||50;r-d>s;)d+=100;return u.setFullYear(d)}}return e},e.tablesorter.addParser({id:"ddmmyy",is:function(){return!1},format:function(e,r){return t.formatDate(e,t.dates.regxxxxyy,"$2/$1/19$3",r)},type:"numeric"}),e.tablesorter.addParser({id:"mmddyy",is:function(){return!1},format:function(e,r){return t.formatDate(e,t.dates.regxxxxyy,"$1/$2/19$3",r)},type:"numeric"}),e.tablesorter.addParser({id:"yymmdd",is:function(){return!1},format:function(e,r){return t.formatDate(e,t.dates.regyyxxxx,"$2/$3/19$1",r)},type:"numeric"})}(jQuery); \ No newline at end of file diff --git a/dist/js/parsers/parser-date-weekday.min.js b/dist/js/parsers/parser-date-weekday.min.js index a252b08c..509dcd74 100644 --- a/dist/js/parsers/parser-date-weekday.min.js +++ b/dist/js/parsers/parser-date-weekday.min.js @@ -1,2 +1,2 @@ /*! Parser: weekday - updated 11/22/2015 (v2.24.6) */ -!function(a){"use strict";var b=a.tablesorter;b.dates||(b.dates={}),b.dates.weekdays||(b.dates.weekdays={}),b.dates.weekdays.en={sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},b.dates.weekStartList={sun:"1995",mon:"1996",fri:"1999",sat:"2000"},b.dates.weekdaysXref=["sun","mon","tue","wed","thu","fri","sat"],b.addParser({id:"weekday",is:function(){return!1},format:function(c,d,e,f){if(c){var g,h,i,j=d.config,k=j.globalize&&(j.globalize[f]||j.globalize)||{},l=b.dates.weekdays[k.lang||"en"],m=b.dates.weekdaysXref;j.ignoreCase&&(c=c.toLowerCase());for(h in l)if("string"==typeof h&&(g=l[h],j.ignoreCase&&(g=g.toLowerCase()),c.match(g)))return i=a.inArray(h,m),i>-1?i:c}return c},type:"numeric"}),b.addParser({id:"weekday-index",is:function(){return!1},format:function(a,c){if(a){var d=c.config,e=new Date(a);if(e instanceof Date&&isFinite(e))return new Date("1/"+(e.getDay()+1)+"/"+b.dates.weekStartList[d.weekStarts||"sun"])}return a},type:"numeric"})}(jQuery); \ No newline at end of file +!function(e){"use strict";var t=e.tablesorter;t.dates||(t.dates={}),t.dates.weekdays||(t.dates.weekdays={}),t.dates.weekdays.en={sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},t.dates.weekStartList={sun:"1995",mon:"1996",fri:"1999",sat:"2000"},t.dates.weekdaysXref=["sun","mon","tue","wed","thu","fri","sat"],t.addParser({id:"weekday",is:function(){return!1},format:function(a,r,n,s){if(a){var i,d,o,u=r.config,f=u.globalize&&(u.globalize[s]||u.globalize)||{},w=t.dates.weekdays[f.lang||"en"],y=t.dates.weekdaysXref;u.ignoreCase&&(a=a.toLowerCase());for(d in w)if("string"==typeof d&&(i=w[d],u.ignoreCase&&(i=i.toLowerCase()),a.match(i)))return o=e.inArray(d,y),o>-1?o:a}return a},type:"numeric"}),t.addParser({id:"weekday-index",is:function(){return!1},format:function(e,a){if(e){var r=a.config,n=new Date(e);if(n instanceof Date&&isFinite(n))return new Date("1/"+(n.getDay()+1)+"/"+t.dates.weekStartList[r.weekStarts||"sun"])}return e},type:"numeric"})}(jQuery); \ No newline at end of file diff --git a/dist/js/parsers/parser-date.min.js b/dist/js/parsers/parser-date.min.js index 380cd2be..fc60c48d 100644 --- a/dist/js/parsers/parser-date.min.js +++ b/dist/js/parsers/parser-date.min.js @@ -1,4 +1,4 @@ /*! Parser: dates - updated 8/22/2016 (v2.27.5) */ -!function(a){"use strict";/*! Sugar (https://sugarjs.com/docs/#/DateParsing) */ -a.tablesorter.addParser({id:"sugar",is:function(){return!1},format:function(a){var b=Date.create||Sugar.Date.create,c=b?b(a):a?new Date(a):a;return c instanceof Date&&isFinite(c)?c.getTime():a},type:"numeric"}),/*! Datejs (http://www.datejs.com/) */ -a.tablesorter.addParser({id:"datejs",is:function(){return!1},format:function(a){var b=Date.parse?Date.parse(a):a?new Date(a):a;return b instanceof Date&&isFinite(b)?b.getTime():a},type:"numeric"})}(jQuery); \ No newline at end of file +!function(e){"use strict";/*! Sugar (https://sugarjs.com/docs/#/DateParsing) */ +e.tablesorter.addParser({id:"sugar",is:function(){return!1},format:function(e){var t=Date.create||Sugar.Date.create,r=t?t(e):e?new Date(e):e;return r instanceof Date&&isFinite(r)?r.getTime():e},type:"numeric"}),/*! Datejs (http://www.datejs.com/) */ +e.tablesorter.addParser({id:"datejs",is:function(){return!1},format:function(e){var t=Date.parse?Date.parse(e):e?new Date(e):e;return t instanceof Date&&isFinite(t)?t.getTime():e},type:"numeric"})}(jQuery); \ No newline at end of file diff --git a/dist/js/parsers/parser-duration.min.js b/dist/js/parsers/parser-duration.min.js index d335d434..1bcabab2 100644 --- a/dist/js/parsers/parser-duration.min.js +++ b/dist/js/parsers/parser-duration.min.js @@ -1,3 +1,3 @@ /*! Parser: duration & countdown - updated 2/7/2015 (v2.19.0) */ -!function(a){"use strict";a.tablesorter.addParser({id:"duration",is:function(){return!1},format:function(a,b){var c,d,e=b.config,f="",g="",h=e.durationLength||4,i=new Array(h+1).join("0"),j=(e.durationLabels||"(?:years|year|y),(?:days|day|d),(?:hours|hour|h),(?:minutes|minute|min|m),(?:seconds|second|sec|s)").split(/\s*,\s*/),k=j.length;if(!e.durationRegex){for(c=0;c=0&&(d=i+b.substring(h+1,b.length)+i,j.indexOf(d)>=0))for(h in k)if((i+k[h]+i).indexOf(d)>=0)return h+("/"!==g.toString().charAt(0)?f.group_separator:"-")+b;return b},type:"text"}),a.tablesorter.addParser({id:"file-extension",is:function(){return!1},format:function(a){var b,c=a.split(".");return c.length?(b=c.pop(),c.unshift(b),c.join(".")):a},type:"text"})}(jQuery); \ No newline at end of file +!function(t){"use strict";t.tablesorter.fileTypes={separator:"|",equivalents:{"3D Image":"3dm|3ds|dwg|max|obj",Audio:"aif|aac|ape|flac|la|m4a|mid|midi|mp2|mp3|ogg|ra|raw|rm|wav|wma",Compressed:"7z|bin|cab|cbr|gz|gzip|iso|lha|lz|rar|tar|tgz|zip|zipx|zoo",Database:"csv|dat|db|dbf|json|ldb|mdb|myd|pdb|sql|tsv|wdb|wmdb|xlr|xls|xlsx|xml",Development:"asm|c|class|cls|cpp|cc|cs|cxx|cbp|cs|dba|fla|h|java|lua|pl|py|pyc|pyo|sh|sln|r|rb|vb",Document:"doc|docx|odt|ott|pages|pdf|rtf|tex|wpd|wps|wrd|wri",Executable:"apk|app|com|exe|gadget|lnk|msi",Fonts:"eot|fnt|fon|otf|ttf|woff",Icons:"ani|cur|icns|ico",Images:"bmp|gif|jpg|jpeg|jpe|jp2|pic|png|psd|tga|tif|tiff|wmf|webp",Presentation:"pps|ppt",Published:"chp|epub|lit|pub|ppp|fm|mobi",Script:"as|bat|cgi|cmd|jar|js|lua|scpt|scptd|sh|vbs|vb|wsf",Styles:"css|less|sass",Text:"info|log|md|markdown|nfo|tex|text|txt",Vectors:"awg|ai|eps|cdr|ps|svg",Video:"asf|avi|flv|m4v|mkv|mov|mp4|mpe|mpeg|mpg|ogg|rm|rv|swf|vob|wmv",Web:"asp|aspx|cer|cfm|htm|html|php|url|xhtml"}},t.tablesorter.addParser({id:"filetype",is:function(){return!1},format:function(e,s){var a,p=s.config.widgetOptions,r=p.group_separator||"-",i=e.lastIndexOf("."),o=t.tablesorter.fileTypes.separator,n=t.tablesorter.fileTypes.matching,c=t.tablesorter.fileTypes.equivalents;if(n||(a=[],t.each(c,function(t,e){a.push(e)}),n=t.tablesorter.fileTypes.matching=o+a.join(o)+o),i>=0&&(a=o+e.substring(i+1,e.length)+o,n.indexOf(a)>=0))for(i in c)if((o+c[i]+o).indexOf(a)>=0)return i+("/"!==r.toString().charAt(0)?p.group_separator:"-")+e;return e},type:"text"}),t.tablesorter.addParser({id:"file-extension",is:function(){return!1},format:function(t){var e,s=t.split(".");return s.length?(e=s.pop(),s.unshift(e),s.join(".")):t},type:"text"})}(jQuery); \ No newline at end of file diff --git a/dist/js/parsers/parser-globalize.min.js b/dist/js/parsers/parser-globalize.min.js index e6474a7f..e42e5986 100644 --- a/dist/js/parsers/parser-globalize.min.js +++ b/dist/js/parsers/parser-globalize.min.js @@ -1,4 +1,4 @@ /*! Parser: jQuery Globalize - updated 11/2/2015 (v2.24.1) */ -!function(a){"use strict";/*! jQuery Globalize date parser (https://github.com/jquery/globalize#date-module) */ -a.tablesorter.addParser({id:"globalize-date",is:function(){return!1},format:function(a,b,c,d){var e,f,g=b.config,h=g.globalize&&(g.globalize[d]||g.globalize)||{};return Globalize&&(e="object"==typeof h.Globalize?h.Globalize:Globalize(h.lang||"en"),h.Globalize||(h.Globalize=e)),f=e&&e.dateParser?e.dateParser(h)(a):a?new Date(a):a,f instanceof Date&&isFinite(f)?f.getTime():a},type:"numeric"}),/*! jQuery Globalize number parser (https://github.com/jquery/globalize#number-module) */ -a.tablesorter.addParser({id:"globalize-number",is:function(){return!1},format:function(b,c,d,e){var f,g,h=c.config,i=h.globalize&&(h.globalize[e]||h.globalize)||{};return Globalize&&(f="object"==typeof i.Globalize?i.Globalize:Globalize(i.lang||"en"),i.Globalize||(i.Globalize=f)),g=f&&f.numberParser?f.numberParser(i)(b):b?a.tablesorter.formatFloat((b||"").replace(/[^\w,. \-()]/g,""),c):b,b&&"number"==typeof g?g:b},type:"numeric"})}(jQuery); \ No newline at end of file +!function(e){"use strict";/*! jQuery Globalize date parser (https://github.com/jquery/globalize#date-module) */ +e.tablesorter.addParser({id:"globalize-date",is:function(){return!1},format:function(e,l,a,o){var r,i,t=l.config,n=t.globalize&&(t.globalize[o]||t.globalize)||{};return Globalize&&(r="object"==typeof n.Globalize?n.Globalize:Globalize(n.lang||"en"),n.Globalize||(n.Globalize=r)),i=r&&r.dateParser?r.dateParser(n)(e):e?new Date(e):e,i instanceof Date&&isFinite(i)?i.getTime():e},type:"numeric"}),/*! jQuery Globalize number parser (https://github.com/jquery/globalize#number-module) */ +e.tablesorter.addParser({id:"globalize-number",is:function(){return!1},format:function(l,a,o,r){var i,t,n=a.config,b=n.globalize&&(n.globalize[r]||n.globalize)||{};return Globalize&&(i="object"==typeof b.Globalize?b.Globalize:Globalize(b.lang||"en"),b.Globalize||(b.Globalize=i)),t=i&&i.numberParser?i.numberParser(b)(l):l?e.tablesorter.formatFloat((l||"").replace(/[^\w,. \-()]/g,""),a):l,l&&"number"==typeof t?t:l},type:"numeric"})}(jQuery); \ No newline at end of file diff --git a/dist/js/parsers/parser-huge-numbers.min.js b/dist/js/parsers/parser-huge-numbers.min.js index 1c37d623..f570b1a8 100644 --- a/dist/js/parsers/parser-huge-numbers.min.js +++ b/dist/js/parsers/parser-huge-numbers.min.js @@ -1,2 +1,2 @@ /*! Parser: hugeNumbers - updated 3/1/2016 (v2.25.5) */ -!function(a){"use strict";a.tablesorter.addParser({id:"hugeNumbers",is:function(){return!1},format:function(a){return a.replace(/\B(?=(\d{12})+(?!\d))/g,",")},type:"text"})}(jQuery); \ No newline at end of file +!function(e){"use strict";e.tablesorter.addParser({id:"hugeNumbers",is:function(){return!1},format:function(e){return e.replace(/\B(?=(\d{12})+(?!\d))/g,",")},type:"text"})}(jQuery); \ No newline at end of file diff --git a/dist/js/parsers/parser-ignore-articles.min.js b/dist/js/parsers/parser-ignore-articles.min.js index 1021bc1c..1dba2ed3 100644 --- a/dist/js/parsers/parser-ignore-articles.min.js +++ b/dist/js/parsers/parser-ignore-articles.min.js @@ -1,2 +1,2 @@ /*! Parser: ignoreArticles - updated 9/15/2014 (v2.17.8) */ -!function(a){"use strict";var b=a.tablesorter;b.ignoreArticles={en:"the, a, an",de:"der, die, das, des, dem, den, ein, eine, einer, eines, einem, einen",nl:"de, het, de, een",es:"el, la, lo, los, las, un, una, unos, unas",pt:"o, a, os, as, um, uma, uns, umas",fr:"le, la, l'_, les, un, une, des",it:"il, lo, la, l'_, i, gli, le, un', uno, una, un",hu:"a, az, egy"},b.addParser({id:"ignoreArticles",is:function(){return!1},format:function(c,d,e,f){var g,h,i,j=d.config,k=c||"";return j.headers&&j.headers[f]&&j.headers[f].ignoreArticlesRegex||(j.headers||(j.headers={}),j.headers[f]||(j.headers[f]={}),i=b.getData(j.$headers.eq(f),b.getColumnData(d,j.headers,f),"ignoreArticles"),g=(b.ignoreArticles[i]||"the, a, an")+"",j.headers[f].ignoreArticlesRegex=new RegExp("^("+a.trim(g.split(/\s*\,\s*/).join("\\s|")+"\\s").replace("_\\s","")+")","i"),h=b.getData(j.$headers.eq(f),b.getColumnData(d,j.headers,f),"ignoreArticlesExcept"),j.headers[f].ignoreArticlesRegex2=""!==h?new RegExp("^("+h.replace(/\s/g,"\\s")+")","i"):""),g=j.headers[f].ignoreArticlesRegex,!g.test(k)||(h=j.headers[f].ignoreArticlesRegex2)&&h.test(k)?k:k.replace(g,"")},type:"text"})}(jQuery); \ No newline at end of file +!function(e){"use strict";var r=e.tablesorter;r.ignoreArticles={en:"the, a, an",de:"der, die, das, des, dem, den, ein, eine, einer, eines, einem, einen",nl:"de, het, de, een",es:"el, la, lo, los, las, un, una, unos, unas",pt:"o, a, os, as, um, uma, uns, umas",fr:"le, la, l'_, les, un, une, des",it:"il, lo, la, l'_, i, gli, le, un', uno, una, un",hu:"a, az, egy"},r.addParser({id:"ignoreArticles",is:function(){return!1},format:function(s,a,n,i){var t,l,d,o=a.config,g=s||"";return o.headers&&o.headers[i]&&o.headers[i].ignoreArticlesRegex||(o.headers||(o.headers={}),o.headers[i]||(o.headers[i]={}),d=r.getData(o.$headers.eq(i),r.getColumnData(a,o.headers,i),"ignoreArticles"),t=(r.ignoreArticles[d]||"the, a, an")+"",o.headers[i].ignoreArticlesRegex=new RegExp("^("+e.trim(t.split(/\s*\,\s*/).join("\\s|")+"\\s").replace("_\\s","")+")","i"),l=r.getData(o.$headers.eq(i),r.getColumnData(a,o.headers,i),"ignoreArticlesExcept"),o.headers[i].ignoreArticlesRegex2=""!==l?new RegExp("^("+l.replace(/\s/g,"\\s")+")","i"):""),t=o.headers[i].ignoreArticlesRegex,!t.test(g)||(l=o.headers[i].ignoreArticlesRegex2)&&l.test(g)?g:g.replace(t,"")},type:"text"})}(jQuery); \ No newline at end of file diff --git a/dist/js/parsers/parser-image.min.js b/dist/js/parsers/parser-image.min.js index 624029b3..d23f4a92 100644 --- a/dist/js/parsers/parser-image.min.js +++ b/dist/js/parsers/parser-image.min.js @@ -1,2 +1,2 @@ /*! Parser: image - new 7/17/2014 (v2.17.5) */ -!function(a){"use strict";a.tablesorter.addParser({id:"image",is:function(){return!1},format:function(b,c,d){return a(d).find("img").attr(c.config.imgAttr||"alt")||b},parsed:!0,type:"text"})}(jQuery); \ No newline at end of file +!function(t){"use strict";t.tablesorter.addParser({id:"image",is:function(){return!1},format:function(r,e,i){return t(i).find("img").attr(e.config.imgAttr||"alt")||r},parsed:!0,type:"text"})}(jQuery); \ No newline at end of file diff --git a/dist/js/parsers/parser-input-select.min.js b/dist/js/parsers/parser-input-select.min.js index 01128a9e..4552a222 100644 --- a/dist/js/parsers/parser-input-select.min.js +++ b/dist/js/parsers/parser-input-select.min.js @@ -1,2 +1,2 @@ -/*! Parser: input & select - updated 11/26/2016 (v2.28.0) */ -!function(a){"use strict";a.tablesorter.addParser({id:"inputs",is:function(){return!1},format:function(b,c,d){var e=a(d).find("input");return e.length?e.val():b},parsed:!0,type:"text"}),a.tablesorter.addParser({id:"inputs-numeric",is:function(){return!1},format:function(b,c,d){var e=a(d).find("input"),f=e.length?e.val():b,g=a.tablesorter.formatFloat((f||"").replace(/[^\w,. \-()]/g,""),c);return b&&"number"==typeof g?g:b?a.trim(b&&c.config.ignoreCase?b.toLocaleLowerCase():b):b},parsed:!0,type:"numeric"}),a.tablesorter.addParser({id:"checkbox",is:function(){return!1},format:function(b,c,d){var e=a(d),f=c.config.widgetOptions,g=f.group_checkbox?f.group_checkbox:["checked","unchecked"],h=e.find('input[type="checkbox"]'),i=h.length?h[0].checked:"";return h.length?g[i?0:1]:b},parsed:!0,type:"text"}),a.tablesorter.addParser({id:"select",is:function(){return!1},format:function(b,c,d){var e=a(d).find("select");return e.length?e.val():b},parsed:!0,type:"text"}),a.tablesorter.addParser({id:"select-text",is:function(){return!1},format:function(b,c,d){var e=a(d).find("select");return e.length?e.find("option:selected").text()||"":b},parsed:!0,type:"text"}),a.tablesorter.addParser({id:"textarea",is:function(){return!1},format:function(b,c,d){var e=a(d).find("textarea");return e.length?e.val():b},parsed:!0,type:"text"}),a.tablesorter.defaults.checkboxClass="",a.tablesorter.defaults.checkboxVisible="",a(function(){if(a.fn.on){var b=function(a,b,c,d){a.toggleClass(b+"-"+c,d),(a[0].className||"").match(b+"-")?a.addClass(b):a.removeClass(b)},c=function(b,c){var d=window.navigator.userAgent,e=b.children("tbody").children(":visible"),f=e.length;b.children("thead").find('input[type="checkbox"]').each(function(){var b=a(this).closest("td, th").attr("data-column"),g=e.filter("."+c+"-"+b).length,h=g===f&&f>0;0===g||h?(this.checked=h,this.indeterminate=!1):(this.checked=!(d.indexOf("Trident/")>-1||d.indexOf("Edge/")>-1),this.indeterminate=!0)})};a("table").on("tablesorter-initialized updateComplete",function(){this.tablesorterBusy=!1;var d=".parser-forms";a(this).children("tbody").off(d).on("mouseleave"+d,function(b){"TBODY"===b.target.nodeName&&a(":focus").blur()}).on("focus"+d,"select, input:not([type=checkbox]), textarea",function(){a(this).data("ts-original-value",this.value)}).on("blur"+d,"input:not([type=checkbox]), textarea",function(){this.value=a(this).data("ts-original-value")}).on("change keyup ".split(" ").join(d+" "),"select, input, textarea",function(d){if(27===d.which&&("INPUT"!==this.nodeName||"checkbox"!==this.type))return void(this.value=a(this).data("ts-original-value"));if("change"===d.type||"keyup"===d.type&&13===d.which&&("INPUT"===d.target.nodeName||"TEXTAREA"===d.target.nodeName&&d.altKey)){var e,f=a(d.target),g="checkbox"===d.target.type,h=f.closest("td"),i=h.closest("table"),j=h[0].cellIndex,k=i[0].config||!1,l=i.length&&i[0].tablesorterBusy,m=k&&k.$headerIndexed&&k.$headerIndexed[j]||[],n=g?d.target.checked:f.val();if(a.isEmptyObject(k)||!1!==l)return;if(g&&(e=k.checkboxClass||"checked",b(h.closest("tr"),e,j,n),c(i,e)),m.length&&(m.hasClass("parser-false")||m.hasClass("sorter-false")&&m.hasClass("filter-false"))||"change"===d.type&&k.table.isUpdating)return;(k&&n!==f.data("ts-original-value")||g)&&(f.data("ts-original-value",n),i[0].tablesorterBusy=!0,a.tablesorter.updateCell(k,h,void 0,function(){i[0].tablesorterBusy=!1}))}}),a(this).children("thead").find('input[type="checkbox"]')&&a(this).off(d).on("tablesorter-ready"+d,function(){var b,d=a(this),e=d.length&&d[0].config;a.isEmptyObject(e)||(this.tablesorterBusy=!0,b=e&&e.checkboxClass||"checked",c(d,b),this.tablesorterBusy=!1)}).children("thead").off(d).on("click.parser-forms change"+d,'input[type="checkbox"]',function(d){var e,f,g,h,i,j=a(this),k=j.closest("table"),l=k.length&&k[0].config,m=this.checked;return!(!k.length||!l||k[0].tablesorterBusy)&&(f=parseInt(j.closest("td, th").attr("data-column"),10),h="checkbox"===l.parsers[f].id,e=k.length&&l.checkboxVisible,k[0].tablesorterBusy=!0,g=k.children("tbody").children("tr"+(void 0===e||!0===e?":visible":"")).children(":nth-child("+(f+1)+")").find('input[type="checkbox"]').prop("checked",m),i=l.checkboxClass||"checked",g.each(function(){b(a(this).closest("tr"),i,f,m)}),c(k,i),h?a.tablesorter.update(l,void 0,function(){k[0].tablesorterBusy=!1}):k[0].tablesorterBusy=!1,!0)})})}})}(jQuery); \ No newline at end of file +/*! Parser: input & select - updated 5/16/2017 (v2.28.10) */ +!function(e){"use strict";e.tablesorter.addParser({id:"inputs",is:function(){return!1},format:function(t,a,r){var n=e(r).find("input");return n.length?n.val():t},parsed:!0,type:"text"}),e.tablesorter.addParser({id:"inputs-numeric",is:function(){return!1},format:function(t,a,r){var n=e(r).find("input"),i=n.length?n.val():t,s=e.tablesorter.formatFloat((i||"").replace(/[^\w,. \-()]/g,""),a);return t&&"number"==typeof s?s:t?e.trim(t&&a.config.ignoreCase?t.toLocaleLowerCase():t):t},parsed:!0,type:"numeric"}),e.tablesorter.addParser({id:"checkbox",is:function(){return!1},format:function(t,a,r){var n=e(r),i=a.config.widgetOptions,s=i.group_checkbox?i.group_checkbox:["checked","unchecked"],o=n.find('input[type="checkbox"]'),c=o.length?o[0].checked:"";return o.length?s[c?0:1]:t},parsed:!0,type:"text"}),e.tablesorter.addParser({id:"select",is:function(){return!1},format:function(t,a,r){var n=e(r).find("select");return n.length?n.val():t},parsed:!0,type:"text"}),e.tablesorter.addParser({id:"select-text",is:function(){return!1},format:function(t,a,r){var n=e(r).find("select");return n.length?n.find("option:selected").text()||"":t},parsed:!0,type:"text"}),e.tablesorter.addParser({id:"textarea",is:function(){return!1},format:function(t,a,r){var n=e(r).find("textarea");return n.length?n.val():t},parsed:!0,type:"text"}),e.tablesorter.defaults.checkboxClass="",e.tablesorter.defaults.checkboxVisible="",e(function(){if(e.fn.on){var t=function(e,t,a,r){e.toggleClass(t+"-"+a,r),(e[0].className||"").match(t+"-")?e.addClass(t):e.removeClass(t)},a=function(e,t){if("INPUT"!==e[0].nodeName&&(e=e.find('input[type="checkbox"]')),e.length){var a=window.navigator.userAgent;"indeterminate"===t?(e.prop("checked",!(a.indexOf("Trident/")>-1||a.indexOf("Edge/")>-1)),e.prop("indeterminate",!0)):(e.prop("checked",t),e.prop("indeterminate",!1))}},r=function(t,r){var n=t.children("tbody").children(":visible"),i=n.length,s=t[0].config.widgetOptions.$sticky;t.children("thead").find('input[type="checkbox"]').each(function(){var t=e(this).closest("td, th").attr("data-column"),o=s.find('[data-column="'+t+'"]'),c=n.filter("."+r+"-"+t).length,l=c===i&&i>0;0===c||l?(a(e(this),l),o&&a(o,l)):(a(e(this),"indeterminate"),o&&a(o,"indeterminate"))})};e("table").on("tablesorter-initialized updateComplete",function(){this.tablesorterBusy=!1;var n=".parser-forms";e(this).addClass(this.config.namespace.slice(1)).children("tbody").off(n).on("mouseleave"+n,function(t){"TBODY"===t.target.nodeName&&e(":focus").blur()}).on("focus"+n,"select, input:not([type=checkbox]), textarea",function(t){var a=e(t.target).closest("tr"),r=a.closest("table")[0].config;!r||r&&r.ignoreChildRow&&a.hasClass(r.cssChildRow)||e(this).data("ts-original-value",this.value)}).on("blur"+n,"input:not([type=checkbox]), textarea",function(t){var a=e(t.target).closest("tr"),r=a.closest("table")[0].config;!r||r&&r.ignoreChildRow&&a.hasClass(r.cssChildRow)||(this.value=e(this).data("ts-original-value"))}).on("change keyup ".split(" ").join(n+" "),"select, input, textarea",function(a){var n=e(this).closest("tr"),i=n.closest("table")[0].config;if(i&&!(i&&i.ignoreChildRow&&n.hasClass(i.cssChildRow))){if(27===a.which&&("INPUT"!==this.nodeName||"checkbox"!==this.type))return void(this.value=e(this).data("ts-original-value"));if("change"===a.type||"keyup"===a.type&&13===a.which&&("INPUT"===a.target.nodeName||"TEXTAREA"===a.target.nodeName&&a.altKey)){var s,o=e(a.target),c="checkbox"===a.target.type,l=o.closest("td"),d=l[0].cellIndex,h=i.table.tablesorterBusy,u=i.$headerIndexed&&i.$headerIndexed[d]||[],f=c?a.target.checked:o.val();if(e.isEmptyObject(i)||!1!==h)return;if(c&&(s=i.checkboxClass||"checked",t(l.closest("tr"),s,d,f),r(i.$table,s)),u.length&&(u.hasClass("parser-false")||u.hasClass("sorter-false")&&u.hasClass("filter-false"))||"change"===a.type&&i.table.isUpdating)return;(i&&f!==o.data("ts-original-value")||c)&&(o.data("ts-original-value",f),i.table.tablesorterBusy=!0,e.tablesorter.updateCell(i,l,void 0,function(){i.$table,i.table.tablesorterBusy=!1}))}}}),e(this).children("thead").find('input[type="checkbox"]')&&e(this).off(n).on("tablesorter-ready"+n,function(){var t,a=e(this),n=a.length&&a[0].config;e.isEmptyObject(n)||(this.tablesorterBusy=!0,t=n&&n.checkboxClass||"checked",r(a,t),this.tablesorterBusy=!1)}).children("thead").add(this.config.widgetOptions.$sticky).off(n).on("click.parser-forms change"+n,'input[type="checkbox"]',function(n){var i,s,o,c,l,d,h=e(this),u=this.checked,f=h.closest("table"),p=f.length&&f[0].className.match(/(tablesorter\w+)_extra_table/);return p&&(p=p[1],f=e("."+p+":not(."+p+"_extra_table)")),i=f.length&&f[0].config,!(!f.length||!i||f[0].tablesorterBusy)&&(o=parseInt(h.closest("td, th").attr("data-column"),10),l="checkbox"===i.parsers[o].id,s=i.checkboxVisible,f[0].tablesorterBusy=!0,a(c=f.children("tbody").children("tr"+(void 0===s||!0===s?":visible":"")).children(":nth-child("+(o+1)+")"),u),d=i.checkboxClass||"checked",c.each(function(){t(e(this).closest("tr"),d,o,u)}),p?a(f.children("thead").find('[data-column="'+o+'"]'),u):i.widgetOptions.$sticky&&a(i.widgetOptions.$sticky.find("thead").find('[data-column="'+o+'"]'),u),r(f,d),l?e.tablesorter.update(i,void 0,function(){f[0].tablesorterBusy=!1}):f[0].tablesorterBusy=!1,!0)})})}})}(jQuery); \ No newline at end of file diff --git a/dist/js/parsers/parser-leading-zeros.min.js b/dist/js/parsers/parser-leading-zeros.min.js index 16976d46..19cffcfa 100644 --- a/dist/js/parsers/parser-leading-zeros.min.js +++ b/dist/js/parsers/parser-leading-zeros.min.js @@ -1,2 +1,2 @@ /*! Parser: leading zeros - updated 4/2/2017 (v2.28.6) */ -!function(a){"use strict";var b=a.tablesorter;b.addParser({id:"leadingZeros",is:function(){return!1},format:function(a,c){var d=(a||"").replace(b.regex.nondigit,""),e=b.formatFloat(d,c),f=e.toString();return isNaN(e)||e!=d||d.length===f.length||(e-=1e-10*(a.length-f.length)),e},type:"number"})}(jQuery); \ No newline at end of file +!function(e){"use strict";var t=e.tablesorter;t.addParser({id:"leadingZeros",is:function(){return!1},format:function(e,r){var n=(e||"").replace(t.regex.nondigit,""),a=t.formatFloat(n,r),i=a.toString();return isNaN(a)||a!=n||n.length===i.length||(a-=1e-10*(e.length-i.length)),a},type:"number"})}(jQuery); \ No newline at end of file diff --git a/dist/js/parsers/parser-metric.min.js b/dist/js/parsers/parser-metric.min.js index fcf131f9..1c7a2b96 100644 --- a/dist/js/parsers/parser-metric.min.js +++ b/dist/js/parsers/parser-metric.min.js @@ -1,2 +1,2 @@ /*! Parser: metric */ -!function(a){"use strict";var b={"Y|Yotta|yotta":[1e24,Math.pow(1024,8)],"Z|Zetta|zetta":[1e21,Math.pow(1024,7)],"E|Exa|exa":[1e18,Math.pow(1024,6)],"P|Peta|peta":[1e15,Math.pow(1024,5)],"T|Tera|tera":[1e12,Math.pow(1024,4)],"G|Giga|giga":[1e9,Math.pow(1024,3)],"M|Mega|mega":[1e6,Math.pow(1024,2)],"k|Kilo|kilo":[1e3,1024],"h|hecto":[100,100],"da|deka":[10,10],"d|deci":[.1,.1],"c|centi":[.01,.01],"m|milli":[.001,.001],"µ|micro":[1e-6,1e-6],"n|nano":[1e-9,1e-9],"p|pico":[1e-12,1e-12],"f|femto":[1e-15,1e-15],"a|atto":[1e-18,1e-18],"z|zepto":[1e-21,1e-21],"y|yocto":[1e-24,1e-24]},c=/^[b|bit|byte|o|octet]/i;a.tablesorter.addParser({id:"metric",is:function(){return!1},format:function(d,e,f,g){var h,i,j,k,l="m|meter",m=a.tablesorter.formatFloat(d.replace(/[^\w,. \-()]/g,""),e),n=e.config.$headerIndexed[g],o=n.data("metric");if(o||(h=(n.attr("data-metric-name")||l).split("|"),j=n.attr("data-metric-name-full")||"",k=n.attr("data-metric-name-abbr")||"",o=[j||h[1]||h[0].substring(1),k||h[0]],i=c.test(o.join("")),o[2]=new RegExp("(\\d+)(\\s+)?([Zz]etta|[Ee]xa|[Pp]eta|[Tt]era|[Gg]iga|[Mm]ega|kilo|hecto|deka|deci|centi|milli|micro|nano|pico|femto|atto|zepto|yocto)("+((""===j?"":j+"|"+k)||(i?o[0].toLowerCase()+"|"+o[0].toUpperCase():o[0])+"|"+(i?o[1].toLowerCase()+"|"+o[1].toUpperCase():o[1]))+")"),o[3]=new RegExp("(\\d+)(\\s+)?(Z|E|P|T|G|M|k|h|da|d|c|m|µ|n|p|f|a|z|y)("+(k||(i?o[1].toLowerCase()+"|"+o[1].toUpperCase():o[1]))+")"),n.data("metric",o)),h=d.match(o[2])||d.match(o[3]))for(l in b)if(h[3].match(l))return i=c.test(h[4])?1:0,m*b[l][i];return m},type:"numeric"})}(jQuery); \ No newline at end of file +!function(e){"use strict";var t={"Y|Yotta|yotta":[1e24,Math.pow(1024,8)],"Z|Zetta|zetta":[1e21,Math.pow(1024,7)],"E|Exa|exa":[1e18,Math.pow(1024,6)],"P|Peta|peta":[1e15,Math.pow(1024,5)],"T|Tera|tera":[1e12,Math.pow(1024,4)],"G|Giga|giga":[1e9,Math.pow(1024,3)],"M|Mega|mega":[1e6,Math.pow(1024,2)],"k|Kilo|kilo":[1e3,1024],"h|hecto":[100,100],"da|deka":[10,10],"d|deci":[.1,.1],"c|centi":[.01,.01],"m|milli":[.001,.001],"µ|micro":[1e-6,1e-6],"n|nano":[1e-9,1e-9],"p|pico":[1e-12,1e-12],"f|femto":[1e-15,1e-15],"a|atto":[1e-18,1e-18],"z|zepto":[1e-21,1e-21],"y|yocto":[1e-24,1e-24]},a=/^[b|bit|byte|o|octet]/i;e.tablesorter.addParser({id:"metric",is:function(){return!1},format:function(o,r,i,c){var n,m,p,d,s="m|meter",h=e.tablesorter.formatFloat(o.replace(/[^\w,. \-()]/g,""),r),f=r.config.$headerIndexed[c],l=f.data("metric");if(l||(n=(f.attr("data-metric-name")||s).split("|"),p=f.attr("data-metric-name-full")||"",d=f.attr("data-metric-name-abbr")||"",l=[p||n[1]||n[0].substring(1),d||n[0]],m=a.test(l.join("")),l[2]=new RegExp("(\\d+)(\\s+)?([Zz]etta|[Ee]xa|[Pp]eta|[Tt]era|[Gg]iga|[Mm]ega|kilo|hecto|deka|deci|centi|milli|micro|nano|pico|femto|atto|zepto|yocto)("+((""===p?"":p+"|"+d)||(m?l[0].toLowerCase()+"|"+l[0].toUpperCase():l[0])+"|"+(m?l[1].toLowerCase()+"|"+l[1].toUpperCase():l[1]))+")"),l[3]=new RegExp("(\\d+)(\\s+)?(Z|E|P|T|G|M|k|h|da|d|c|m|µ|n|p|f|a|z|y)("+(d||(m?l[1].toLowerCase()+"|"+l[1].toUpperCase():l[1]))+")"),f.data("metric",l)),n=o.match(l[2])||o.match(l[3]))for(s in t)if(n[3].match(s))return m=a.test(n[4])?1:0,h*t[s][m];return h},type:"numeric"})}(jQuery); \ No newline at end of file diff --git a/dist/js/parsers/parser-named-numbers.min.js b/dist/js/parsers/parser-named-numbers.min.js index 250ff8ad..89c9baaf 100644 --- a/dist/js/parsers/parser-named-numbers.min.js +++ b/dist/js/parsers/parser-named-numbers.min.js @@ -1,2 +1,2 @@ /*! Parser: namedNumbers - updated 10/26/2014 (v2.18.0) */ -!function(a){"use strict";var b,c,d={negative:["negative","minus"],numbers:{zero:0,one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12,thirteen:13,fourteen:14,fifteen:15,sixteen:16,seventeen:17,eighteen:18,nineteen:19,twenty:20,thirty:30,forty:40,fourty:40,fifty:50,sixty:60,seventy:70,eighty:80,ninety:90},hundred:"hundred",powers:{thousand:1e3,million:1e6,billion:1e9,trillion:1e12,quadrillion:1e15,quintillion:1e18,sextillion:1e21,septillion:1e24,octillion:1e27,nonillion:1e30,decillion:1e33,undecillion:1e36,duodecillion:1e39,tredecillion:1e42,quattuordecillion:1e45,quindecillion:1e48,sexdecillion:1e51,septendecillion:1e54,octodecillion:1e57,novemdecillion:1e60,vigintillion:1e63,unvigintillion:1e66,duovigintillion:1e69,trevigintillion:1e72,quattuorvigintillion:1e75,quinvigintillion:1e78,sexvigintillion:1e81,septenvigintillion:1e84,octovigintillion:1e87,novemvigintillion:1e90,trigintillion:1e93,untrigintillion:1e96,duotrigintillion:1e99,googl:1e100}},e=new RegExp("("+d.negative.join("|")+")"),f=function(e,f){var g=e.replace(/[,."']/g,""),h=a.tablesorter.formatFloat(e||"",f),i=d.powers.hasOwnProperty(g)?d.powers[g]:null;h="number"==typeof h?h:d.numbers.hasOwnProperty(g)?d.numbers[g]:null,null!==h?c+=h:g===d.hundred?c*=100:null!==i&&(b+=c*i,c=0)};a.tablesorter.addParser({id:"namedNumbers",is:function(){return!1},format:function(g,h){b=0,c=0;var i,j=(g||"").split(/[\s-]+/),k=j.length;for(i=0;i0&&e.alignIndex>0)for(i=Math.min(e.alignIndex,n),h=0,k=0,j=0;h++=0?(t.push(m.substring(0,k)||""),u.push(m.substring(k,m.length)||"")):(t.push(n>=1&&e.alignIndex>=n?"":m||""),u.push(n>=1&&e.alignIndex>=n?m||"":""))}for(p=a.extend([],t).sort(function(a,b){return b.length-a.length})[0],q=a.extend([],u).sort(function(a,b){return b.length-a.length})[0],e.width=e.width||Math.floor(p.length/(p.length+q.length)*100)+e.adjust,p="min-width:"+e.width+"%",q="min-width:"+(100-e.width)+"%",f=0;f'+t[g]+''+(j.length?r+j:"")+"");d.alignChar_initialized=!0}},remove:function(b,c,d){if(!a.isEmptyObject(c.cache)){var e,f,g,h,i,j;for(e=0;e0&&r.alignIndex>0)for(g=Math.min(r.alignIndex,u),h=0,s=0,o=0;h++=0?(b.push(c.substring(0,s)||""),_.push(c.substring(s,c.length)||"")):(b.push(u>=1&&r.alignIndex>=u?"":c||""),_.push(u>=1&&r.alignIndex>=u?c||"":""))}for(m=n.extend([],b).sort(function(n,a){return a.length-n.length})[0],p=n.extend([],_).sort(function(n,a){return a.length-n.length})[0],r.width=r.width||Math.floor(m.length/(m.length+p.length)*100)+r.adjust,m="min-width:"+r.width+"%",p="min-width:"+(100-r.width)+"%",e=0;e'+b[l]+''+(o.length?C+o:"")+"");t.alignChar_initialized=!0}},remove:function(a,i,t){if(!n.isEmptyObject(i.cache)){var r,e,l,h,g;for(r=0;r").appendTo(d),g=f[0],h=e.widgetOptions=a.extend(!0,{},c.defaults,e.widgetOptions),i=h.build_processing,j=h.build_type,k=h.build_source||e.data,l=function(b){var d=a.type(b),f=b instanceof jQuery;if("function"==typeof i&&(b=i(b,h)),e.data=b,f||"string"===d){if(f||/<\s*\/tr\s*>/.test(b))return c.html(g,b,h);try{if(b=a.parseJSON(b||"null"))return c.object(g,b,h)}catch(a){}}return"array"===d||"string"===d||"array"===j||"csv"===j?c.csv(g,b,h):c.object(g,b,h)};if(g.config=e,!b.buildTable.hasOwnProperty(j)&&""!==j)return e.debug&&console.error("aborting build table widget, incorrect build type"),!1;k instanceof jQuery?l(a.trim(k.html())):k&&(k.hasOwnProperty("url")||"json"===j)?a.ajax(h.build_source).done(function(a){l(a)}).fail(function(a,b,c){e.debug&&console.error("aborting build table widget, failed ajax load"),f.html(''+a.status+" "+b+"")}):l(k)};b.defaults.data="",c.defaults={build_type:"",build_source:"",build_processing:null,build_complete:"tablesorter-build-complete",build_headers:{rows:1,classes:[],text:[],widths:[]},build_footers:{rows:1,classes:[],text:[]},build_numbers:{addColumn:!1,sortable:!1},build_csvStartLine:0,build_csvSeparator:",",build_objectRowKey:"rows",build_objectCellKey:"cells",build_objectHeaderKey:"headers",build_objectFooterKey:"footers"},c.build={colgroup:function(b){var c="";return b&&b.length&&(c+="",a.each(b,function(a,b){c+=""}),c+=""),c},cell:function(b,c,d,e,f){var g,h,i=f?a(""):"",j=c.build_headers.classes,k=c.build_headers.widths;if(/string|number/.test(typeof b))h=a("<"+d+(j&&j[e]?' class="'+j[e]+'"':"")+">"+b+""),f&&k&&k[e]&&i.width(k[e]||"");else{h=a("<"+d+">");for(g in b)b.hasOwnProperty(g)&&("text"===g||"html"===g?h[g](b[g]):f&&"width"===g?i.width(b[g]||""):h.attr(g,b[g]))}return[h,i]},header:function(b,c){var d=c.build_headers.text,e=c.build_headers.classes,f=""+(c.build_numbers.addColumn?""+c.build_numbers.addColumn+"":"");return a.each(b,function(a,b){/<\s*\/t(d|h)\s*>/.test(b)?f+=b:f+=""+(d&&d[a]?d[a]:b)+""}),f+""},rows:function(b,c,d,e,f,g){var h=g?"th":"td",i=""+(e.build_numbers.addColumn?"<"+h+">"+(g?"":f)+"":"");return a.each(b,function(a,b){/<\s*\/t(d|h)\s*>/.test(b)?i+=b:i+="<"+(g?h+(d&&d[a]?' class="'+d[a]+'"':""):h)+">"+(g&&c&&c.length&&c[a]?c[a]:b)+""}),i+""}},c.buildComplete=function(c,d){a(c).triggerHandler(d.build_complete),b.setup(c,c.config)},c.array=function(a,b,d){return c.csv(a,b,d)},c.csv=function(b,d,e){var f,g,h,i="csv"===e.build_type||"string"==typeof d,j=a(b),k=i?d.replace("\r","").split("\n"):d,l=k.length,m=0,n=!1,o=e.build_headers.rows+(i?e.build_csvStartLine:0),p=e.build_footers.rows,q=0,r="",s=c.build.colgroup(e.build_headers.widths)+"";a.each(k,function(a,b){a>=l-p&&(n=!0),(!i||a>=e.build_csvStartLine)&&a=o&&(a===o&&(s+=""),h=i?c.splitCSV(b,e.build_csvSeparator):b,n&&p>0&&(s+=(a===l-p?"":"")+(a===l?"":"")),h.length>1&&(m++,h.length!==q&&(r+="error on line "+a+": Item count ("+h.length+") does not match header count ("+q+") \n"),f=n?e.build_footers.classes:"",s+=c.build.rows(h,e.build_footers.text,f,e,m,n)))}),s+=p>0?"":"",r?j.html(r):(j.html(s),c.buildComplete(b,e))},c.splitCSV=function(b,c){var d,e,f=a.trim(b).split(c=c||",");for(d=f.length-1;d>=0;d--)'"'===f[d].replace(/\"\s+$/,'"').charAt(f[d].length-1)?(e=f[d].replace(/^\s+\"/,'"')).length>1&&'"'===e.charAt(0)?f[d]=f[d].replace(/^\s*"|"\s*$/g,"").replace(/""/g,'"'):d?f.splice(d-1,2,[f[d-1],f[d]].join(c)):f=f.shift().split(c).concat(f):f[d].replace(/""/g,'"');return f},c.html=function(b,d,e){var f=a(b);d instanceof jQuery?f.empty().append(d):f.html(d),c.buildComplete(b,e)},c.object=function(b,d,e){var f,g,h,i,j,k,l,m=b.config,n=e.build_objectHeaderKey,o=e.build_objectRowKey,p=d.hasOwnProperty(n)&&!a.isEmptyObject(d.kh)?d.kh:!!d.hasOwnProperty("headers")&&d.headers,q=d.hasOwnProperty(o)&&!a.isEmptyObject(d.kr)?d.kr:!!d.hasOwnProperty("rows")&&d.rows;if(!p||!q||0===p.length||0===q.length)return m.debug&&console.error("aborting build table widget, missing data for object build"),!1;i=a(""),j=a("
"),a.each(p,function(b,d){for(l=a("").appendTo(j.find("thead")),g=d.length,f=0;f"),a.each(q,function(b,d){var f;if((h="object"===a.type(d))&&d.newTbody){k=a("").appendTo(j);for(f in d)d.hasOwnProperty(f)&&"newTbody"!==f&&k.attr(f,d[f])}else{if(0===b&&k.appendTo(j),l=a("").appendTo(k),h){for(f in d)d.hasOwnProperty(f)&&f!==e.build_objectCellKey&&l.attr(f,d[f]);d.hasOwnProperty(e.build_objectCellKey)&&(d=d.cells)}for(g=d.length,f=0;f"+i+"")):(i=a("").appendTo(j),a.each(h,function(b,d){for(l=a("").appendTo(i),g=d.length,f=0;f").appendTo(o),i=n[0],a=l.widgetOptions=e.extend(!0,{},r.defaults,l.widgetOptions),d=a.build_processing,s=a.build_type,u=a.build_source||l.data,c=function(t){var o=e.type(t),n=t instanceof jQuery;if("function"==typeof d&&(t=d(t,a)),l.data=t,n||"string"===o){if(n||/<\s*\/tr\s*>/.test(t))return r.html(i,t,a);try{if(t=e.parseJSON(t||"null"))return r.object(i,t,a)}catch(e){}}return"array"===o||"string"===o||"array"===s||"csv"===s?r.csv(i,t,a):r.object(i,t,a)};if(i.config=l,!t.buildTable.hasOwnProperty(s)&&""!==s)return l.debug&&console.error("aborting build table widget, incorrect build type"),!1;u instanceof jQuery?c(e.trim(u.html())):u&&(u.hasOwnProperty("url")||"json"===s)?e.ajax(a.build_source).done(function(e){c(e)}).fail(function(e,t,r){l.debug&&console.error("aborting build table widget, failed ajax load"),n.html(''+e.status+" "+t+"")}):c(u)};t.defaults.data="",r.defaults={build_type:"",build_source:"",build_processing:null,build_complete:"tablesorter-build-complete",build_headers:{rows:1,classes:[],text:[],widths:[]},build_footers:{rows:1,classes:[],text:[]},build_numbers:{addColumn:!1,sortable:!1},build_csvStartLine:0,build_csvSeparator:",",build_objectRowKey:"rows",build_objectCellKey:"cells",build_objectHeaderKey:"headers",build_objectFooterKey:"footers"},r.build={colgroup:function(t){var r="";return t&&t.length&&(r+="",e.each(t,function(e,t){r+=""}),r+=""),r},cell:function(t,r,o,l,n){var i,a,d=n?e(""):"",s=r.build_headers.classes,u=r.build_headers.widths;if(/string|number/.test(typeof t))a=e("<"+o+(s&&s[l]?' class="'+s[l]+'"':"")+">"+t+""),n&&u&&u[l]&&d.width(u[l]||"");else{a=e("<"+o+">");for(i in t)t.hasOwnProperty(i)&&("text"===i||"html"===i?a[i](t[i]):n&&"width"===i?d.width(t[i]||""):a.attr(i,t[i]))}return[a,d]},header:function(t,r){var o=r.build_headers.text,l=r.build_headers.classes,n=""+(r.build_numbers.addColumn?""+r.build_numbers.addColumn+"":"");return e.each(t,function(e,t){/<\s*\/t(d|h)\s*>/.test(t)?n+=t:n+=""+(o&&o[e]?o[e]:t)+""}),n+""},rows:function(t,r,o,l,n,i){var a=i?"th":"td",d=""+(l.build_numbers.addColumn?"<"+a+">"+(i?"":n)+"":"");return e.each(t,function(e,t){/<\s*\/t(d|h)\s*>/.test(t)?d+=t:d+="<"+(i?a+(o&&o[e]?' class="'+o[e]+'"':""):a)+">"+(i&&r&&r.length&&r[e]?r[e]:t)+""}),d+""}},r.buildComplete=function(r,o){e(r).triggerHandler(o.build_complete),t.setup(r,r.config)},r.array=function(e,t,o){return r.csv(e,t,o)},r.csv=function(t,o,l){var n,i,a,d="csv"===l.build_type||"string"==typeof o,s=e(t),u=d?o.replace("\r","").split("\n"):o,c=u.length,b=0,h=!1,p=l.build_headers.rows+(d?l.build_csvStartLine:0),f=l.build_footers.rows,g=0,y="",_=r.build.colgroup(l.build_headers.widths)+"";e.each(u,function(e,t){e>=c-f&&(h=!0),(!d||e>=l.build_csvStartLine)&&e=p&&(e===p&&(_+=""),a=d?r.splitCSV(t,l.build_csvSeparator):t,h&&f>0&&(_+=(e===c-f?"":"")+(e===c?"":"")),a.length>1&&(b++,a.length!==g&&(y+="error on line "+e+": Item count ("+a.length+") does not match header count ("+g+") \n"),n=h?l.build_footers.classes:"",_+=r.build.rows(a,l.build_footers.text,n,l,b,h)))}),_+=f>0?"":"",y?s.html(y):(s.html(_),r.buildComplete(t,l))},r.splitCSV=function(t,r){var o,l,n=e.trim(t).split(r=r||",");for(o=n.length-1;o>=0;o--)'"'===n[o].replace(/\"\s+$/,'"').charAt(n[o].length-1)?(l=n[o].replace(/^\s+\"/,'"')).length>1&&'"'===l.charAt(0)?n[o]=n[o].replace(/^\s*"|"\s*$/g,"").replace(/""/g,'"'):o?n.splice(o-1,2,[n[o-1],n[o]].join(r)):n=n.shift().split(r).concat(n):n[o].replace(/""/g,'"');return n},r.html=function(t,o,l){var n=e(t);o instanceof jQuery?n.empty().append(o):n.html(o),r.buildComplete(t,l)},r.object=function(t,o,l){var n,i,a,d,s,u,c,b=t.config,h=l.build_objectHeaderKey,p=l.build_objectRowKey,f=o.hasOwnProperty(h)&&!e.isEmptyObject(o.kh)?o.kh:!!o.hasOwnProperty("headers")&&o.headers,g=o.hasOwnProperty(p)&&!e.isEmptyObject(o.kr)?o.kr:!!o.hasOwnProperty("rows")&&o.rows;if(!f||!g||0===f.length||0===g.length)return b.debug&&console.error("aborting build table widget, missing data for object build"),!1;d=e(""),s=e("
"),e.each(f,function(t,o){for(c=e("").appendTo(s.find("thead")),i=o.length,n=0;n"),e.each(g,function(t,o){var n;if((a="object"===e.type(o))&&o.newTbody){u=e("").appendTo(s);for(n in o)o.hasOwnProperty(n)&&"newTbody"!==n&&u.attr(n,o[n])}else{if(0===t&&u.appendTo(s),c=e("").appendTo(u),a){for(n in o)o.hasOwnProperty(n)&&n!==l.build_objectCellKey&&c.attr(n,o[n]);o.hasOwnProperty(l.build_objectCellKey)&&(o=o.cells)}for(i=o.length,n=0;n"+d+"")):(d=e("").appendTo(s),e.each(a,function(t,o){for(c=e("").appendTo(d),i=o.length,n=0;n=0?j.push(e[f]):(g=i[f].getAttribute(c.textAttribute)||i[f].textContent||i.eq(f).text(),j.push(a.trim(g)));l.push(j)}}),l.sort(function(a,c){return 1===d.chart_sort[0][1]?b.sortNatural(c[d.chart_sort[0][0]],a[d.chart_sort[0][0]]):b.sortNatural(a[d.chart_sort[0][0]],c[d.chart_sort[0][0]])}),a.each(l,function(f,l){var m,n=0,o=[],p=l[d.chart_labelCol];o.push(""+p),a.each(l,function(e,f){var l;if(e===d.chart_labelCol)return g.push(f),i.push({label:f}),!0;m=!1,d.chart_useSelector&&b.hasWidget(c.table,"columnSelector")&&!c.selector.auto?c.selector.states[e]&&a.inArray(e,d.chart_ignoreColumns)<0&&(m=""+f):a.inArray(e,d.chart_ignoreColumns)<0&&(m=""+f),!1!==m&&(/s/i.test(""+d.chart_layout[e])?(o.push(m),h[n].data.push(m),j[n].data.push(m)):(l=b.formatFloat(m.replace(k.nonDigit,""),c.table),l=isNaN(l)?m:l,o.push(l),h[n].data.push(l),j[n].data.push({value:l})),n++)}),e.push(o)})},remove:function(a,b){a.$table.off(b.chart_event)}};b.addWidget({id:"chart",options:{chart_incRows:"filtered",chart_useSelector:!1,chart_ignoreColumns:[],chart_parsed:[],chart_layout:{0:"string"},chart_labelCol:0,chart_sort:[[0,0]],chart_event:"chartData"},init:function(a,b,c,d){k.init(c,d)},remove:function(a,b,c){k.remove(b,c)}})}(jQuery); \ No newline at end of file +!function(t){"use strict";var e=t.tablesorter,a=[],r=[],o=[],s=[],n=[],c=[],i=[],h=[],l=e.chart={nonDigit:/[^\d,.\-()]/g,init:function(t,e){t.$table.off(e.chart_event).on(e.chart_event,function(){if(this.hasInitialized){var t=this.config;l.getCols(t,t.widgetOptions),l.getData(t,t.widgetOptions)}})},getCols:function(r,o){var s;for(a=[],c=[],h=[],s=0;s=0?h.push(o[s]):(n=i[s].getAttribute(a.textAttribute)||i[s].textContent||i.eq(s).text(),h.push(t.trim(n)));u.push(h)}}),u.sort(function(t,a){return 1===r.chart_sort[0][1]?e.sortNatural(a[r.chart_sort[0][0]],t[r.chart_sort[0][0]]):e.sortNatural(t[r.chart_sort[0][0]],a[r.chart_sort[0][0]])}),t.each(u,function(s,u){var _,f=0,d=[],g=u[r.chart_labelCol];d.push(""+g),t.each(u,function(o,s){var u;if(o===r.chart_labelCol)return n.push(s),i.push({label:s}),!0;_=!1,r.chart_useSelector&&e.hasWidget(a.table,"columnSelector")&&!a.selector.auto?a.selector.states[o]&&t.inArray(o,r.chart_ignoreColumns)<0&&(_=""+s):t.inArray(o,r.chart_ignoreColumns)<0&&(_=""+s),!1!==_&&(/s/i.test(""+r.chart_layout[o])?(d.push(_),c[f].data.push(_),h[f].data.push(_)):(u=e.formatFloat(_.replace(l.nonDigit,""),a.table),u=isNaN(u)?_:u,d.push(u),c[f].data.push(u),h[f].data.push({value:u})),f++)}),o.push(d)})},remove:function(t,e){t.$table.off(e.chart_event)}};e.addWidget({id:"chart",options:{chart_incRows:"filtered",chart_useSelector:!1,chart_ignoreColumns:[],chart_parsed:[],chart_layout:{0:"string"},chart_labelCol:0,chart_sort:[[0,0]],chart_event:"chartData"},init:function(t,e,a,r){l.init(a,r)},remove:function(t,e,a){l.remove(e,a)}})}(jQuery); \ No newline at end of file diff --git a/dist/js/widgets/widget-columnSelector.min.js b/dist/js/widgets/widget-columnSelector.min.js index 5bb91c93..4161e13d 100644 --- a/dist/js/widgets/widget-columnSelector.min.js +++ b/dist/js/widgets/widget-columnSelector.min.js @@ -1 +1 @@ -!function(a){"use strict";var b=a.tablesorter,c=b.columnSelector={queryAll:"@media only all { [columns] { display: none; } } ",queryBreak:"@media all and (min-width: [size]) { [columns] { display: table-cell; } } ",init:function(b,d,e){var f,g;if(f=a(e.columnSelector_layout),!f.find("input").add(f.filter("input")).length)return void(d.debug&&console.error("ColumnSelector: >> ERROR: Column Selector aborting, no input found in the layout! ***"));d.$table.addClass(d.namespace.slice(1)+"columnselector"),g=d.selector={$container:a(e.columnSelector_container||"
")},g.$style=a("").prop("disabled",!0).appendTo("head"),g.$breakpoints=a("").prop("disabled",!0).appendTo("head"),g.isInitializing=!0,c.setUpColspan(d,e),c.setupSelector(d,e),e.columnSelector_mediaquery&&c.setupBreakpoints(d,e),g.isInitializing=!1,g.$container.length?c.updateCols(d,e):d.debug&&console.warn("ColumnSelector: >> container not found"),d.$table.off("refreshColumnSelector.tscolsel").on("refreshColumnSelector.tscolsel",function(a,b,d){c.refreshColumns(this.config,b,d)})},refreshColumns:function(b,d,e){var f,g,h,i,j=b.selector,k=a.isArray(e||d),l=b.widgetOptions;if(void 0!==d&&null!==d&&j.$container.length){if("selectors"===d&&(j.$container.empty(),c.setupSelector(b,l),c.setupBreakpoints(b,l),void 0===e&&null!==e&&(e=j.auto)),k)for(g=e||d,a.each(g,function(a,b){g[a]=parseInt(b,10)}),f=0;f=0,h=j.$container.find("input[data-column="+f+"]"),h.length&&(h.prop("checked",i),j.states[f]=i);i=!0===e||!0===d||"auto"===d&&!1!==e,h=j.$container.find('input[data-column="auto"]').prop("checked",i),c.updateAuto(b,l,h)}else c.updateBreakpoints(b,l),c.updateCols(b,l);c.saveValues(b,l),c.adjustColspans(b,l)},setupSelector:function(d,e){var f,g,h,i,j,k,l,m=d.selector,n=m.$container,o=e.columnSelector_saveColumns&&b.storage,p=o?b.storage(d.table,"tablesorter-columnSelector"):[],q=o?b.storage(d.table,"tablesorter-columnSelector-auto"):{};for(m.auto=a.isEmptyObject(q)||"boolean"!==a.type(q.auto)?e.columnSelector_mediaqueryState:q.auto,m.states=[],m.$column=[],m.$wrapper=[],m.$checkbox=[],f=0;f0||"disable"===q||e.columnSelector_columns[k]&&"disable"===e.columnSelector_columns[k]?m.states[k]=null:(m.states[k]=p&&void 0!==p[k]&&null!==p[k]?p[k]:void 0!==e.columnSelector_columns[k]&&null!==e.columnSelector_columns[k]?e.columnSelector_columns[k]:"true"===q||"false"!==q,m.$column[k]=a(this),n.length&&(g=h.attr(e.columnSelector_name)||h.text().trim(),"function"==typeof e.columnSelector_layoutCustomizer&&(l=h.find("."+b.css.headerIn),g=e.columnSelector_layoutCustomizer(l.length?l:h,g,parseInt(k,10))),m.$wrapper[k]=a(e.columnSelector_layout.replace(/\{name\}/g,g)).appendTo(n),m.$checkbox[k]=m.$wrapper[k].find("input").add(m.$wrapper[k].filter("input")).attr("data-column",k).toggleClass(e.columnSelector_cssChecked,m.states[k]).prop("checked",m.states[k]).on("change",function(){if(!m.isInitializing){var b=a(this).attr("data-column");if(!c.checkChange(d,this.checked))return this.checked=!this.checked,!1;d.selector.states[b]=this.checked,c.updateCols(d,e)}}).change()))},checkChange:function(a,b){for(var c=a.widgetOptions,d=c.columnSelector_maxVisible,e=c.columnSelector_minVisible,f=a.selector.states,g=f.length,h=0;g-- >=0;)f[g]&&h++;return!(b&null!==d&&h>=d||!b&&null!==e&&h<=e)},setupBreakpoints:function(b,d){var e=b.selector;d.columnSelector_mediaquery&&(e.lastIndex=-1,c.updateBreakpoints(b,d),b.$table.off("updateAll.tscolsel").on("updateAll.tscolsel",function(){c.setupSelector(b,d),c.setupBreakpoints(b,d),c.updateBreakpoints(b,d),c.updateCols(b,d)})),e.$container.length&&(d.columnSelector_mediaquery&&(e.$auto=a(d.columnSelector_layout.replace(/\{name\}/g,d.columnSelector_mediaqueryName)).prependTo(e.$container),e.$auto.find("input").add(e.$auto.filter("input")).attr("data-column","auto").prop("checked",e.auto).toggleClass(d.columnSelector_cssChecked,e.auto).on("change",function(){c.updateAuto(b,d,a(this))}).change()),b.$table.off("update.tscolsel").on("update.tscolsel",function(){c.updateCols(b,d)}))},updateAuto:function(b,d,e){var f=b.selector;f.auto=e.prop("checked")||!1,a.each(f.$checkbox,function(a,b){b&&(b[0].disabled=f.auto,f.$wrapper[a].toggleClass("disabled",f.auto))}),d.columnSelector_mediaquery&&c.updateBreakpoints(b,d),c.updateCols(b,d),b.selector.$popup&&b.selector.$popup.find(".tablesorter-column-selector").html(f.$container.html()).find("input").each(function(){var b=a(this).attr("data-column");a(this).prop("checked","auto"===b?f.auto:f.states[b])}),c.saveValues(b,d),c.adjustColspans(b,d),f.auto&&b.$table.triggerHandler(d.columnSelector_updated)},addSelectors:function(a,b){var c=[],d=" col:nth-child("+b+")";return c.push(a+d+","+a+"_extra_table"+d),d=' tr:not(.hasSpan) th[data-column="'+(b-1)+'"]',c.push(a+d+","+a+"_extra_table"+d),d=" tr:not(.hasSpan) td:nth-child("+b+")",c.push(a+d+","+a+"_extra_table"+d),d=" tr td:not("+a+'HasSpan)[data-column="'+(b-1)+'"]',c.push(a+d+","+a+"_extra_table"+d),c},updateBreakpoints:function(d,e){var f,g,h,i,j=[],k=d.selector,l=d.namespace+"columnselector",m=[],n="";if(e.columnSelector_mediaquery&&!k.auto)return k.$breakpoints.prop("disabled",!0),void k.$style.prop("disabled",!1);if(e.columnSelector_mediaqueryHidden)for(h=0;h1&&(j=!0,k.eq(f).addClass(d.namespace.slice(1)+"columnselectorHasSpan").attr("data-col-span",g),b.computeColumnIndex(k.eq(f).parent().addClass("hasSpan")));j&&e.columnSelector_mediaquery&&(h=d.namespace+"columnselector",i.off(h).on("resize"+h,b.window_resize).on("resizeEnd"+h,function(){i.off("resize"+h,b.window_resize),c.adjustColspans(d,e),i.on("resize"+h,b.window_resize)}))},adjustColspans:function(b,c){var d,e,f,g,h,i,j=b.selector,k=c.filter_filteredRow||"filtered",l=c.columnSelector_mediaquery&&j.auto,m=b.$table.children("thead, tfoot").children().children().add(a(b.namespace+"_extra_table").children("thead, tfoot").children().children()),n=m.length;for(d=0;d1){for(e=f;e'),e=h.selector,f=h.widgetOptions,i.find(".tablesorter-column-selector").html(e.$container.html()).find("input").each(function(){var b=a(this).attr("data-column"),c="auto"===b?e.auto:e.states[b];a(this).toggleClass(f.columnSelector_cssChecked,c).prop("checked",c)}),e.$popup=i.on("change","input",function(){if(!e.isInitializing){if(!c.checkChange(h,this.checked))return this.checked=!this.checked,!1;g=a(this).toggleClass(f.columnSelector_cssChecked,this.checked).attr("data-column"),e.$container.find('input[data-column="'+g+'"]').prop("checked",this.checked).trigger("change")}}))}};b.window_resize=function(){b.timer_resize&&clearTimeout(b.timer_resize),b.timer_resize=setTimeout(function(){a(window).trigger("resizeEnd")},250)},b.addWidget({id:"columnSelector",priority:10,options:{columnSelector_container:null,columnSelector_columns:{},columnSelector_saveColumns:!0,columnSelector_layout:'',columnSelector_layoutCustomizer:null,columnSelector_name:"data-selector-name",columnSelector_mediaquery:!0,columnSelector_mediaqueryName:"Auto: ",columnSelector_mediaqueryState:!0,columnSelector_mediaqueryHidden:!1,columnSelector_maxVisible:null,columnSelector_minVisible:null,columnSelector_breakpoints:["20em","30em","40em","50em","60em","70em"],columnSelector_maxPriorities:6,columnSelector_priority:"data-priority",columnSelector_cssChecked:"checked",columnSelector_updated:"columnUpdate"},init:function(a,b,d,e){c.init(a,d,e)},remove:function(b,c,d,e){var f=c.selector;f&&f.$container.empty(),!e&&f&&(f.$popup&&f.$popup.empty(),f.$style.remove(),f.$breakpoints.remove(),a(c.namespace+"columnselectorHasSpan").removeClass(d.filter_filteredRow||"filtered"),c.$table.off("updateAll.tscolsel update.tscolsel"))}})}(jQuery); \ No newline at end of file +!function(e){"use strict";var t=e.tablesorter,o=t.columnSelector={queryAll:"@media only all { [columns] { display: none; } } ",queryBreak:"@media all and (min-width: [size]) { [columns] { display: table-cell; } } ",init:function(t,l,a){var n,c;if(!(n=e(a.columnSelector_layout)).find("input").add(n.filter("input")).length)return void(l.debug&&console.error("ColumnSelector: >> ERROR: Column Selector aborting, no input found in the layout! ***"));l.$table.addClass(l.namespace.slice(1)+"columnselector"),(c=l.selector={$container:e(a.columnSelector_container||"
")}).$style=e("").prop("disabled",!0).appendTo("head"),c.$breakpoints=e("").prop("disabled",!0).appendTo("head"),c.isInitializing=!0,o.setUpColspan(l,a),o.setupSelector(l,a),a.columnSelector_mediaquery&&o.setupBreakpoints(l,a),c.isInitializing=!1,c.$container.length?o.updateCols(l,a):l.debug&&console.warn("ColumnSelector: >> container not found"),l.$table.off("refreshColumnSelector.tscolsel").on("refreshColumnSelector.tscolsel",function(e,t,l){o.refreshColumns(this.config,t,l)})},refreshColumns:function(t,l,a){var n,c,r,s,i=t.selector,u=e.isArray(a||l),d=t.widgetOptions;if(void 0!==l&&null!==l&&i.$container.length){if("selectors"===l&&(i.$container.empty(),o.setupSelector(t,d),o.setupBreakpoints(t,d),void 0===a&&null!==a&&(a=i.auto)),u)for(c=a||l,e.each(c,function(e,t){c[e]=parseInt(t,10)}),n=0;n=0,(r=i.$container.find("input[data-column="+n+"]")).length&&(r.prop("checked",s),i.states[n]=s);s=!0===a||!0===l||"auto"===l&&!1!==a,r=i.$container.find('input[data-column="auto"]').prop("checked",s),o.updateAuto(t,d,r)}else o.updateBreakpoints(t,d),o.updateCols(t,d);o.saveValues(t,d),o.adjustColspans(t,d)},setupSelector:function(l,a){var n,c,r,s,i,u,d,p=l.selector,m=p.$container,h=a.columnSelector_saveColumns&&t.storage,f=h?t.storage(l.table,"tablesorter-columnSelector"):[],S=h?t.storage(l.table,"tablesorter-columnSelector-auto"):{};for(p.auto=e.isEmptyObject(S)||"boolean"!==e.type(S.auto)?a.columnSelector_mediaqueryState:S.auto,p.states=[],p.$column=[],p.$wrapper=[],p.$checkbox=[],n=0;n0||"disable"===S||a.columnSelector_columns[u]&&"disable"===a.columnSelector_columns[u]?p.states[u]=null:(p.states[u]=f&&void 0!==f[u]&&null!==f[u]?f[u]:void 0!==a.columnSelector_columns[u]&&null!==a.columnSelector_columns[u]?a.columnSelector_columns[u]:"true"===S||"false"!==S,p.$column[u]=e(this),m.length&&(c=r.attr(a.columnSelector_name)||r.text().trim(),"function"==typeof a.columnSelector_layoutCustomizer&&(d=r.find("."+t.css.headerIn),c=a.columnSelector_layoutCustomizer(d.length?d:r,c,parseInt(u,10))),p.$wrapper[u]=e(a.columnSelector_layout.replace(/\{name\}/g,c)).appendTo(m),p.$checkbox[u]=p.$wrapper[u].find("input").add(p.$wrapper[u].filter("input")).attr("data-column",u).toggleClass(a.columnSelector_cssChecked,p.states[u]).prop("checked",p.states[u]).on("change",function(){if(!p.isInitializing){var t=e(this).attr("data-column");if(!o.checkChange(l,this.checked))return this.checked=!this.checked,!1;l.selector.states[t]=this.checked,o.updateCols(l,a)}}).change()))},checkChange:function(e,t){for(var o=e.widgetOptions,l=o.columnSelector_maxVisible,a=o.columnSelector_minVisible,n=e.selector.states,c=n.length,r=0;c-- >=0;)n[c]&&r++;return!(t&null!==l&&r>=l||!t&&null!==a&&r<=a)},setupBreakpoints:function(t,l){var a=t.selector;l.columnSelector_mediaquery&&(a.lastIndex=-1,o.updateBreakpoints(t,l),t.$table.off("updateAll.tscolsel").on("updateAll.tscolsel",function(){o.setupSelector(t,l),o.setupBreakpoints(t,l),o.updateBreakpoints(t,l),o.updateCols(t,l)})),a.$container.length&&(l.columnSelector_mediaquery&&(a.$auto=e(l.columnSelector_layout.replace(/\{name\}/g,l.columnSelector_mediaqueryName)).prependTo(a.$container),a.$auto.find("input").add(a.$auto.filter("input")).attr("data-column","auto").prop("checked",a.auto).toggleClass(l.columnSelector_cssChecked,a.auto).on("change",function(){o.updateAuto(t,l,e(this))}).change()),t.$table.off("update.tscolsel").on("update.tscolsel",function(){o.updateCols(t,l)}))},updateAuto:function(t,l,a){var n=t.selector;n.auto=a.prop("checked")||!1,e.each(n.$checkbox,function(e,t){t&&(t[0].disabled=n.auto,n.$wrapper[e].toggleClass("disabled",n.auto))}),l.columnSelector_mediaquery&&o.updateBreakpoints(t,l),o.updateCols(t,l),t.selector.$popup&&t.selector.$popup.find(".tablesorter-column-selector").html(n.$container.html()).find("input").each(function(){var t=e(this).attr("data-column");e(this).prop("checked","auto"===t?n.auto:n.states[t])}),o.saveValues(t,l),o.adjustColspans(t,l),n.auto&&t.$table.triggerHandler(l.columnSelector_updated)},addSelectors:function(e,t){var o=[],l=" col:nth-child("+t+")";return o.push(e+l+","+e+"_extra_table"+l),l=' tr:not(.hasSpan) th[data-column="'+(t-1)+'"]',o.push(e+l+","+e+"_extra_table"+l),l=" tr:not(.hasSpan) td:nth-child("+t+")",o.push(e+l+","+e+"_extra_table"+l),l=" tr td:not("+e+'HasSpan)[data-column="'+(t-1)+'"]',o.push(e+l+","+e+"_extra_table"+l),o},updateBreakpoints:function(l,a){var n,c,r,s,i=[],u=l.selector,d=l.namespace+"columnselector",p=[],m="";if(a.columnSelector_mediaquery&&!u.auto)return u.$breakpoints.prop("disabled",!0),void u.$style.prop("disabled",!1);if(a.columnSelector_mediaqueryHidden)for(r=0;r1&&(i=!0,u.eq(n).addClass(l.namespace.slice(1)+"columnselectorHasSpan").attr("data-col-span",c),t.computeColumnIndex(u.eq(n).parent().addClass("hasSpan")));i&&a.columnSelector_mediaquery&&(r=l.namespace+"columnselector",s.off(r).on("resize"+r,t.window_resize).on("resizeEnd"+r,function(){s.off("resize"+r,t.window_resize),o.adjustColspans(l,a),s.on("resize"+r,t.window_resize)}))},adjustColspans:function(t,o){var l,a,n,c,r,s,i=t.selector,u=o.filter_filteredRow||"filtered",d=o.columnSelector_mediaquery&&i.auto,p=t.$table.children("thead, tfoot").children().children().add(e(t.namespace+"_extra_table").children("thead, tfoot").children().children()),m=p.length;for(l=0;l1){for(a=n;a'),a=r.selector,n=r.widgetOptions,s.find(".tablesorter-column-selector").html(a.$container.html()).find("input").each(function(){var t=e(this).attr("data-column"),o="auto"===t?a.auto:a.states[t];e(this).toggleClass(n.columnSelector_cssChecked,o).prop("checked",o)}),a.$popup=s.on("change","input",function(){if(!a.isInitializing){if(!o.checkChange(r,this.checked))return this.checked=!this.checked,!1;c=e(this).toggleClass(n.columnSelector_cssChecked,this.checked).attr("data-column"),a.$container.find('input[data-column="'+c+'"]').prop("checked",this.checked).trigger("change")}}))}};t.window_resize=function(){t.timer_resize&&clearTimeout(t.timer_resize),t.timer_resize=setTimeout(function(){e(window).trigger("resizeEnd")},250)},t.addWidget({id:"columnSelector",priority:10,options:{columnSelector_container:null,columnSelector_columns:{},columnSelector_saveColumns:!0,columnSelector_layout:'',columnSelector_layoutCustomizer:null,columnSelector_name:"data-selector-name",columnSelector_mediaquery:!0,columnSelector_mediaqueryName:"Auto: ",columnSelector_mediaqueryState:!0,columnSelector_mediaqueryHidden:!1,columnSelector_maxVisible:null,columnSelector_minVisible:null,columnSelector_breakpoints:["20em","30em","40em","50em","60em","70em"],columnSelector_maxPriorities:6,columnSelector_priority:"data-priority",columnSelector_cssChecked:"checked",columnSelector_updated:"columnUpdate"},init:function(e,t,l,a){o.init(e,l,a)},remove:function(t,o,l,a){var n=o.selector;n&&n.$container.empty(),!a&&n&&(n.$popup&&n.$popup.empty(),n.$style.remove(),n.$breakpoints.remove(),e(o.namespace+"columnselectorHasSpan").removeClass(l.filter_filteredRow||"filtered"),o.$table.off("updateAll.tscolsel update.tscolsel"))}})}(jQuery); \ No newline at end of file diff --git a/dist/js/widgets/widget-columns.min.js b/dist/js/widgets/widget-columns.min.js index f705cd59..440bfedd 100644 --- a/dist/js/widgets/widget-columns.min.js +++ b/dist/js/widgets/widget-columns.min.js @@ -1,2 +1,2 @@ /*! Widget: columns */ -!function(a){"use strict";var b=a.tablesorter||{};b.addWidget({id:"columns",priority:30,options:{columns:["primary","secondary","tertiary"]},format:function(c,d,e){var f,g,h,i,j,k,l,m,n=d.$table,o=d.$tbodies,p=d.sortList,q=p.length,r=e&&e.columns||["primary","secondary","tertiary"],s=r.length-1;for(l=r.join(" "),g=0;g1)))for(m=1;m1)))for(f=1;f0&&n<=c?n:0,z=m?o.children().children():o;m&&f.$table.data("cssStickyHeaderBottom",(s.length?d:0)-(g.cssStickyHeaders_addCaption?b:0)),g.cssStickyHeaders_addCaption&&(z=z.add(p)),u!==g.cssStickyHeaders_addCaption&&((u=g.cssStickyHeaders_addCaption)||x(p,0)),x(z,y)}),k.unbind(("filterEnd"+n).replace(/\s+/g," ")).bind("filterEnd"+n,function(){g.cssStickyHeaders_filteredToTop&&b.scrollTo(0,k.position().top)})},remove:function(c,d,e,f){if(!f){var g=d.namespace+"cssstickyheader ";a(b).unbind("scroll resize ".split(" ").join(g).replace(/\s+/g," ")),d.$table.unbind("filterEnd scroll resize ".split(" ").join(g).replace(/\s+/g," ")).add(d.$table.children("thead").children().children()).children("thead, caption").css({transform:"","-ms-transform":"","-webkit-transform":""})}}})}(jQuery,window); \ No newline at end of file +!function(e,t){"use strict";var s=e.tablesorter;s.addWidget({id:"cssStickyHeaders",priority:10,options:{cssStickyHeaders_offset:0,cssStickyHeaders_addCaption:!1,cssStickyHeaders_attachTo:null,cssStickyHeaders_filteredToTop:!0},init:function(i,a,c,d){var r,o,n,l=c.$table,p=e(d.cssStickyHeaders_attachTo),h="ActiveXObject"in t,f=c.namespace+"cssstickyheader ",k=l.children("thead"),y=l.children("caption"),g=p.length?p:e(t),H=l.parent().closest("table."+s.css.table),S=H.length&&s.hasWidget(H[0],"cssStickyHeaders")?H.children("thead"):[],b=parseInt(l.css("border-top-width"),10)||0,_=d.cssStickyHeaders_addCaption,u=!1,m=!1,C=function(e,t){var s=0===t?"":"translate(0px,"+t+"px)";e.css({transform:s,"-ms-transform":s,"-webkit-transform":s})};y.length&&(r=l.height(),y.hide(),m=l.height()===r,y.show(),o=l.offset().top,C(y,20),u=l.offset().top!==o,C(y,0)),g.unbind("scroll resize ".split(" ").join(f).replace(/\s+/g," ")).bind("scroll resize ".split(" ").join(f),function(){d=c.widgetOptions,u&&(C(y,0),n=l.offset().top);var e=p.length?p.offset().top:g.scrollTop(),t=(y.outerHeight(!0)||0)+(parseInt(l.css("padding-top"),10)||0)+(parseInt(l.css("border-spacing"),10)||0),s=l.height()+(m&&d.cssStickyHeaders_addCaption?t:0)-k.height()-(l.children("tfoot").height()||0)-(d.cssStickyHeaders_addCaption?t:m?0:t),i=S.length?S.height():0,a=S.length?h?H.data("cssStickyHeaderBottom")+i:S.offset().top+i-g.scrollTop():0,r=u?n:l.offset().top,o=e-(m?r-(d.cssStickyHeaders_addCaption?t:0):r)+a+b+(d.cssStickyHeaders_offset||0)-(d.cssStickyHeaders_addCaption?m?t:0:t),f=o>0&&o<=s?o:0,T=h?k.children().children():k;h&&c.$table.data("cssStickyHeaderBottom",(S.length?i:0)-(d.cssStickyHeaders_addCaption?t:0)),d.cssStickyHeaders_addCaption&&(T=T.add(y)),_!==d.cssStickyHeaders_addCaption&&((_=d.cssStickyHeaders_addCaption)||C(y,0)),C(T,f)}),l.unbind(("filterEnd"+f).replace(/\s+/g," ")).bind("filterEnd"+f,function(){d.cssStickyHeaders_filteredToTop&&t.scrollTo(0,l.position().top)})},remove:function(s,i,a,c){if(!c){var d=i.namespace+"cssstickyheader ";e(t).unbind("scroll resize ".split(" ").join(d).replace(/\s+/g," ")),i.$table.unbind("filterEnd scroll resize ".split(" ").join(d).replace(/\s+/g," ")).add(i.$table.children("thead").children().children()).children("thead, caption").css({transform:"","-ms-transform":"","-webkit-transform":""})}}})}(jQuery,window); \ No newline at end of file diff --git a/dist/js/widgets/widget-currentSort.min.js b/dist/js/widgets/widget-currentSort.min.js index 66d07998..464cd559 100644 --- a/dist/js/widgets/widget-currentSort.min.js +++ b/dist/js/widgets/widget-currentSort.min.js @@ -1,2 +1,2 @@ /*! Widget: currentSort - 7/31/2016 (v2.27.0) */ -!function(a){"use strict";var b=a.tablesorter;b.currentSortLanguage={0:"asc",1:"desc",2:"unsorted"},b.currentSort={init:function(a){a.$table.on("sortEnd.tscurrentSort",function(){b.currentSort.update(this.config)})},update:function(a){if(a){var c,d=a.widgetOptions,e=b.currentSortLanguage,f=e[2],g=Array.apply(null,Array(a.columns)).map(String.prototype.valueOf,f),h=a.sortList,i=h.length;for(c=0;c=0;){if(d[g].indexOf("-")>=0)for(f=d[g].split("-"),e=parseInt(f[0],10)||0,f=parseInt(f[1],10)||b.columns-1,e>f&&(h=e,e=f,f=h);e<=f;e++)j.push("td:nth-child("+(e+1)+")");else j.push("td:nth-child("+((parseInt(d[g],10)||0)+1)+")");g--}else if(a.isArray(i))for(g=i.length,e=0;e").wrapInner(d.editable_wrapContent).children().length||a.isFunction(d.editable_wrapContent),m=b.getColumns(c,d).join(",");for(c.$tbodies.find(m).find("[contenteditable]").prop("contenteditable",!1),f=c.$tbodies.find(m).not("."+d.editable_noEdit),h=f.length,g=0;g"+c.html()+"
",c.html(a(b).text().trim()))},0)})},destroy:function(a,c){var d=b.namespace,e=b.getColumns(a,c),f="updateComplete pagerComplete ".split(" ").join(d+" ").replace(/\s+/g," ");a.$table.off(f),f="focus focusout keydown paste ".split(" ").join(d+" ").replace(/\s+/g," "),a.$tbodies.off(f).find(e.join(",")).find("[contenteditable]").prop("contenteditable",!1)}};a.tablesorter.addWidget({id:"editable",options:{editable_columns:[],editable_enterToAccept:!0,editable_autoAccept:!0,editable_autoResort:!1,editable_wrapContent:"
",editable_trimContent:!0,editable_validate:null,editable_focused:null,editable_blur:null,editable_selectAll:!1,editable_noEdit:"no-edit",editable_editComplete:"editComplete"},init:function(a,c,d,e){e.editable_columns.length&&(b.update(d,e),b.bindEvents(d,e))},remove:function(a,c,d,e){e||b.destroy(c,d)}})}(jQuery); \ No newline at end of file +!function(e){"use strict";var t=e.tablesorter.editable={namespace:".tseditable",lastEdited:"tseditable-last-edited-cell",editComplete:function(e,n,i,o){e.$table.find("."+t.lastEdited).removeClass(t.lastEdited).trigger(n.editable_editComplete,[e]),o&&setTimeout(function(){i.focus()},50)},selectAll:function(e){setTimeout(function(){if(document.queryCommandSupported("SelectAll"))document.execCommand("selectAll",!1,null);else{var t,n;document.body.createTextRange?((t=document.body.createTextRange()).moveToElementText(e),t.select()):window.getSelection&&(n=window.getSelection(),(t=document.createRange()).selectNodeContents(e),n.removeAllRanges(),n.addRange(t))}},100)},getColumns:function(t,n){var i,o,a,l,d,s=n.editable_columns,r=[];if("string"==typeof s)for(l=(i=s.replace(/\s+/,"").split(/,/)).length-1;l>=0;){if(i[l].indexOf("-")>=0)for(a=i[l].split("-"),(o=parseInt(a[0],10)||0)>(a=parseInt(a[1],10)||t.columns-1)&&(d=o,o=a,a=d);o<=a;o++)r.push("td:nth-child("+(o+1)+")");else r.push("td:nth-child("+((parseInt(i[l],10)||0)+1)+")");l--}else if(e.isArray(s))for(l=s.length,o=0;o").wrapInner(i.editable_wrapContent).children().length||e.isFunction(i.editable_wrapContent),f=t.getColumns(n,i).join(",");for(n.$tbodies.find(f).find("[contenteditable]").prop("contenteditable",!1),d=(a=n.$tbodies.find(f).not("."+i.editable_noEdit)).length,l=0;l"+n.html()+"
",n.html(e(t).text().trim()))},0)})},destroy:function(e,n){var i=t.namespace,o=t.getColumns(e,n),a="updateComplete pagerComplete ".split(" ").join(i+" ").replace(/\s+/g," ");e.$table.off(a),a="focus focusout keydown paste ".split(" ").join(i+" ").replace(/\s+/g," "),e.$tbodies.off(a).find(o.join(",")).find("[contenteditable]").prop("contenteditable",!1)}};e.tablesorter.addWidget({id:"editable",options:{editable_columns:[],editable_enterToAccept:!0,editable_autoAccept:!0,editable_autoResort:!1,editable_wrapContent:"
",editable_trimContent:!0,editable_validate:null,editable_focused:null,editable_blur:null,editable_selectAll:!1,editable_noEdit:"no-edit",editable_editComplete:"editComplete"},init:function(e,n,i,o){o.editable_columns.length&&(t.update(i,o),t.bindEvents(i,o))},remove:function(e,n,i,o){o||t.destroy(n,i)}})}(jQuery); \ No newline at end of file diff --git a/dist/js/widgets/widget-filter-formatter-html5.min.js b/dist/js/widgets/widget-filter-formatter-html5.min.js index 2633c501..89619be7 100644 --- a/dist/js/widgets/widget-filter-formatter-html5.min.js +++ b/dist/js/widgets/widget-filter-formatter-html5.min.js @@ -1,2 +1,2 @@ /*! Widget: filter, html5 formatter functions - updated 7/17/2014 (v2.17.5) */ -!function(a){"use strict";var b=a.tablesorter||{},c=".compare-select",d=b.filterFormatter=a.extend({},b.filterFormatter,{addCompare:function(b,d,e){if(e.compare&&a.isArray(e.compare)&&e.compare.length>1){var f="",g=[c.slice(1)," "+c.slice(1),""],h=e.cellText?'":"";a.each(e.compare,function(a,b){f+=""}),b.wrapInner('
').prepend(h+'').appendTo(e),l=j.skipTest||"number"===k.attr("type")&&"test"!==k.val(),m=[],n=e.closest("table")[0].config,o=function(b,d){var f=!j.addToggle||e.find(".toggle").is(":checked"),g=e.find(".number").val(),h=(a.isArray(j.compare)?e.find(c).val()||j.compare[j.selected||0]:j.compare)||"",k=!n.$table[0].hasInitialized||(b||j.delayed||"");i.val(!j.addToggle||f?(h||(j.exactMatch?"=":""))+g:"").trigger(d?"":"search",k).end().find(".number").val(g),e.find(".number").length&&(e.find(".number")[0].disabled=j.disabled||!f),m.length&&(m.find(".number").val(g)[0].disabled=j.disabled||!f,m.find(c).val(h),j.addToggle&&(m.find(".toggle")[0].checked=f))};return k.remove(),l&&(h=j.addToggle?'
':"",h+='',e.append(h+'').find(".toggle, .number").bind("change",function(){o()}).closest("thead").find("th[data-column="+f+"]").addClass("filter-parsed").closest("table").bind("filterReset",function(){a.isArray(j.compare)&&e.add(m).find(c).val(j.compare[j.selected||0]),j.addToggle&&(e.find(".toggle")[0].checked=!1,m.length&&(m.find(".toggle")[0].checked=!1)),e.find(".number").val(j.value),setTimeout(function(){o()},0)}),i=e.find("input[type=hidden]").bind("change",function(){e.find(".number").val(this.value),o()}),n.$table.bind("filterFomatterUpdate",function(){var a=d.updateCompare(e,i,j)[0]||j.value;e.find(".number").val(((a||"")+"").replace(/[><=]/g,"")),o(!1,!0),b.filter.formatterUpdated(e,f)}),j.compare&&(d.addCompare(e,f,j),e.find(c).bind("change",function(){o()})),n.$table.bind("stickyHeadersInit",function(){m=n.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(f).empty(),m.append(h).find(".toggle, .number").bind("change",function(){e.find(".number").val(a(this).val()),o()}),j.compare&&(d.addCompare(m,f,j),m.find(c).bind("change",function(){e.find(c).val(a(this).val()),o()})),o()}),o()),l?e.find('input[type="hidden"]'):a('')},html5Range:function(e,f,g){var h,i=a.extend({value:0,min:0,max:100,step:1,delayed:!0,valueToHeader:!0,exactMatch:!0,cellText:"",compare:"",allText:"all",skipTest:!1},g),j=a('').appendTo(e),k=i.skipTest||"range"===j.attr("type")&&"test"!==j.val(),l=[],m=e.closest("table")[0].config,n=function(b,d,g){b=(void 0===b?h.val():b).toString().replace(/[<>=]/g,"")||i.value;var j=(a.isArray(i.compare)?e.find(c).val()||i.compare[i.selected||0]:i.compare)||"",k=" ("+(j?j+b:b==i.min?i.allText:b)+")",n=!m.$table[0].hasInitialized||(d||i.delayed||"");e.find("input[type=hidden]").val(j?j+b:b==i.min?"":(i.exactMatch?"=":"")+b).trigger(g?"":"search",n).end().find(".range").val(b),e.closest("thead").find("th[data-column="+f+"]").find(".curvalue").html(k),l.length&&(l.find(".range").val(b).end().find(c).val(j),l.closest("thead").find("th[data-column="+f+"]").find(".curvalue").html(k))};return j.remove(),k&&(e.html('').closest("thead").find("th[data-column="+f+"]").addClass("filter-parsed").find(".tablesorter-header-inner").append(''),h=e.find("input[type=hidden]").bind("change"+m.namespace+"filter",function(){var b=this.value,d=(a.isArray(i.compare)?e.find(c).val()||i.compare[i.selected||0]:i.compare)||"";b!==this.lastValue&&(this.lastValue=d?d+b:b==i.min?"":(i.exactMatch?"=":"")+b,this.value=this.lastValue,n(b))}),e.find(".range").bind("change",function(){n(this.value)}),m.$table.bind("filterFomatterUpdate",function(){var a=d.updateCompare(e,h,i)[0];e.find(".range").val(a),n(a,!1,!0),b.filter.formatterUpdated(e,f)}),i.compare&&(d.addCompare(e,f,i),e.find(c).bind("change",function(){n()})),m.$table.bind("stickyHeadersInit",function(){l=m.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(f).empty(),l.html('').find(".range").bind("change",function(){n(l.find(".range").val())}),n(),i.compare&&(d.addCompare(l,f,i),l.find(c).bind("change",function(){e.find(c).val(a(this).val()),n()}))}),e.closest("table").bind("filterReset",function(){a.isArray(i.compare)&&e.add(l).find(c).val(i.compare[i.selected||0]),setTimeout(function(){n(i.value,!1,!0)},0)}),n()),k?e.find('input[type="hidden"]'):a('')},html5Color:function(c,d,e){var f,g,h=a.extend({value:"#000000",disabled:!1,addToggle:!0,exactMatch:!0,valueToHeader:!1,skipTest:!1},e),i=a('').appendTo(c),j=h.skipTest||"color"===i.attr("type")&&"test"!==i.val(),k=[],l=c.closest("table")[0].config,m=function(a,b){a=(void 0===a?g.val():a).toString().replace("=","")||h.value;var e=!0,f=" ("+a+")";h.addToggle&&(e=c.find(".toggle").is(":checked")),c.find(".colorpicker").length&&(c.find(".colorpicker").val(a)[0].disabled=h.disabled||!e),g.val(e?a+(h.exactMatch?"=":""):"").trigger(!l.$table[0].hasInitialized||b?"":"search"),h.valueToHeader?c.closest("thead").find("th[data-column="+d+"]").find(".curcolor").html(f):c.find(".currentColor").html(f),k.length&&(k.find(".colorpicker").val(a)[0].disabled=h.disabled||!e,h.addToggle&&(k.find(".toggle")[0].checked=e),h.valueToHeader?k.closest("thead").find("th[data-column="+d+"]").find(".curcolor").html(f):k.find(".currentColor").html(f))};return i.remove(),j&&(f=""+d+Math.round(100*Math.random()),f='
'+(h.addToggle?'
':"")+''+(h.valueToHeader?"":'(#000000)')+"
",c.html(f),h.valueToHeader&&c.closest("thead").find("th[data-column="+d+"]").find(".tablesorter-header-inner").append(''),c.find(".toggle, .colorpicker").bind("change",function(){m(c.find(".colorpicker").val())}),g=c.find("input[type=hidden]").bind("change"+l.namespace+"filter",function(){m(this.value)}),l.$table.bind("filterFomatterUpdate",function(){m(g.val(),!0),b.filter.formatterUpdated(c,d)}),c.closest("table").bind("filterReset",function(){h.addToggle&&(c.find(".toggle")[0].checked=!1),setTimeout(function(){m()},0)}),l.$table.bind("stickyHeadersInit",function(){k=l.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(d),k.html(f).find(".toggle, .colorpicker").bind("change",function(){m(k.find(".colorpicker").val())}),m(k.find(".colorpicker").val())}),m(h.value)),j?c.find('input[type="hidden"]'):a('')}})}(jQuery); \ No newline at end of file +!function(e){"use strict";var t=e.tablesorter||{},a=".compare-select",n=t.filterFormatter=e.extend({},t.filterFormatter,{addCompare:function(t,n,i){if(i.compare&&e.isArray(i.compare)&&i.compare.length>1){var l="",d=[a.slice(1)," "+a.slice(1),""],r=i.cellText?'":"";e.each(i.compare,function(e,t){l+=""}),t.wrapInner('
').prepend(r+'').appendTo(i),p=o.skipTest||"number"===s.attr("type")&&"test"!==s.val(),u=[],f=i.closest("table")[0].config,m=function(t,n){var l=!o.addToggle||i.find(".toggle").is(":checked"),d=i.find(".number").val(),r=(e.isArray(o.compare)?i.find(a).val()||o.compare[o.selected||0]:o.compare)||"",s=!f.$table[0].hasInitialized||(t||o.delayed||"");c.val(!o.addToggle||l?(r||(o.exactMatch?"=":""))+d:"").trigger(n?"":"search",s).end().find(".number").val(d),i.find(".number").length&&(i.find(".number")[0].disabled=o.disabled||!l),u.length&&(u.find(".number").val(d)[0].disabled=o.disabled||!l,u.find(a).val(r),o.addToggle&&(u.find(".toggle")[0].checked=l))};return s.remove(),p&&(r=o.addToggle?'
':"",r+='',i.append(r+'').find(".toggle, .number").bind("change",function(){m()}).closest("thead").find("th[data-column="+l+"]").addClass("filter-parsed").closest("table").bind("filterReset",function(){e.isArray(o.compare)&&i.add(u).find(a).val(o.compare[o.selected||0]),o.addToggle&&(i.find(".toggle")[0].checked=!1,u.length&&(u.find(".toggle")[0].checked=!1)),i.find(".number").val(o.value),setTimeout(function(){m()},0)}),c=i.find("input[type=hidden]").bind("change",function(){i.find(".number").val(this.value),m()}),f.$table.bind("filterFomatterUpdate",function(){var e=n.updateCompare(i,c,o)[0]||o.value;i.find(".number").val(((e||"")+"").replace(/[><=]/g,"")),m(!1,!0),t.filter.formatterUpdated(i,l)}),o.compare&&(n.addCompare(i,l,o),i.find(a).bind("change",function(){m()})),f.$table.bind("stickyHeadersInit",function(){(u=f.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(l).empty()).append(r).find(".toggle, .number").bind("change",function(){i.find(".number").val(e(this).val()),m()}),o.compare&&(n.addCompare(u,l,o),u.find(a).bind("change",function(){i.find(a).val(e(this).val()),m()})),m()}),m()),p?i.find('input[type="hidden"]'):e('')},html5Range:function(i,l,d){var r,c=e.extend({value:0,min:0,max:100,step:1,delayed:!0,valueToHeader:!0,exactMatch:!0,cellText:"",compare:"",allText:"all",skipTest:!1},d),o=e('').appendTo(i),s=c.skipTest||"range"===o.attr("type")&&"test"!==o.val(),p=[],u=i.closest("table")[0].config,f=function(t,n,d){t=(void 0===t?r.val():t).toString().replace(/[<>=]/g,"")||c.value;var o=(e.isArray(c.compare)?i.find(a).val()||c.compare[c.selected||0]:c.compare)||"",s=" ("+(o?o+t:t==c.min?c.allText:t)+")",f=!u.$table[0].hasInitialized||(n||c.delayed||"");i.find("input[type=hidden]").val(o?o+t:t==c.min?"":(c.exactMatch?"=":"")+t).trigger(d?"":"search",f).end().find(".range").val(t),i.closest("thead").find("th[data-column="+l+"]").find(".curvalue").html(s),p.length&&(p.find(".range").val(t).end().find(a).val(o),p.closest("thead").find("th[data-column="+l+"]").find(".curvalue").html(s))};return o.remove(),s&&(i.html('').closest("thead").find("th[data-column="+l+"]").addClass("filter-parsed").find(".tablesorter-header-inner").append(''),r=i.find("input[type=hidden]").bind("change"+u.namespace+"filter",function(){var t=this.value,n=(e.isArray(c.compare)?i.find(a).val()||c.compare[c.selected||0]:c.compare)||"";t!==this.lastValue&&(this.lastValue=n?n+t:t==c.min?"":(c.exactMatch?"=":"")+t,this.value=this.lastValue,f(t))}),i.find(".range").bind("change",function(){f(this.value)}),u.$table.bind("filterFomatterUpdate",function(){var e=n.updateCompare(i,r,c)[0];i.find(".range").val(e),f(e,!1,!0),t.filter.formatterUpdated(i,l)}),c.compare&&(n.addCompare(i,l,c),i.find(a).bind("change",function(){f()})),u.$table.bind("stickyHeadersInit",function(){(p=u.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(l).empty()).html('').find(".range").bind("change",function(){f(p.find(".range").val())}),f(),c.compare&&(n.addCompare(p,l,c),p.find(a).bind("change",function(){i.find(a).val(e(this).val()),f()}))}),i.closest("table").bind("filterReset",function(){e.isArray(c.compare)&&i.add(p).find(a).val(c.compare[c.selected||0]),setTimeout(function(){f(c.value,!1,!0)},0)}),f()),s?i.find('input[type="hidden"]'):e('')},html5Color:function(a,n,i){var l,d,r=e.extend({value:"#000000",disabled:!1,addToggle:!0,exactMatch:!0,valueToHeader:!1,skipTest:!1},i),c=e('').appendTo(a),o=r.skipTest||"color"===c.attr("type")&&"test"!==c.val(),s=[],p=a.closest("table")[0].config,u=function(e,t){var i=!0,l=" ("+(e=(void 0===e?d.val():e).toString().replace("=","")||r.value)+")";r.addToggle&&(i=a.find(".toggle").is(":checked")),a.find(".colorpicker").length&&(a.find(".colorpicker").val(e)[0].disabled=r.disabled||!i),d.val(i?e+(r.exactMatch?"=":""):"").trigger(!p.$table[0].hasInitialized||t?"":"search"),r.valueToHeader?a.closest("thead").find("th[data-column="+n+"]").find(".curcolor").html(l):a.find(".currentColor").html(l),s.length&&(s.find(".colorpicker").val(e)[0].disabled=r.disabled||!i,r.addToggle&&(s.find(".toggle")[0].checked=i),r.valueToHeader?s.closest("thead").find("th[data-column="+n+"]").find(".curcolor").html(l):s.find(".currentColor").html(l))};return c.remove(),o&&(l=""+n+Math.round(100*Math.random()),l='
'+(r.addToggle?'
':"")+''+(r.valueToHeader?"":'(#000000)')+"
",a.html(l),r.valueToHeader&&a.closest("thead").find("th[data-column="+n+"]").find(".tablesorter-header-inner").append(''),a.find(".toggle, .colorpicker").bind("change",function(){u(a.find(".colorpicker").val())}),d=a.find("input[type=hidden]").bind("change"+p.namespace+"filter",function(){u(this.value)}),p.$table.bind("filterFomatterUpdate",function(){u(d.val(),!0),t.filter.formatterUpdated(a,n)}),a.closest("table").bind("filterReset",function(){r.addToggle&&(a.find(".toggle")[0].checked=!1),setTimeout(function(){u()},0)}),p.$table.bind("stickyHeadersInit",function(){(s=p.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(n)).html(l).find(".toggle, .colorpicker").bind("change",function(){u(s.find(".colorpicker").val())}),u(s.find(".colorpicker").val())}),u(r.value)),o?a.find('input[type="hidden"]'):e('')}})}(jQuery); \ No newline at end of file diff --git a/dist/js/widgets/widget-filter-formatter-jui.min.js b/dist/js/widgets/widget-filter-formatter-jui.min.js index 565dc4ad..328142fe 100644 --- a/dist/js/widgets/widget-filter-formatter-jui.min.js +++ b/dist/js/widgets/widget-filter-formatter-jui.min.js @@ -1,2 +1,2 @@ /*! Widget: filter jQuery UI formatter functions - updated 7/17/2014 (v2.17.5) */ -!function(a){"use strict";var b=a.tablesorter||{},c=".compare-select",d=b.filterFormatter=a.extend({},b.filterFormatter,{addCompare:function(b,d,e){if(e.compare&&a.isArray(e.compare)&&e.compare.length>1){var f="",g=[c.slice(1)," "+c.slice(1),""],h=e.cellText?'":"";a.each(e.compare,function(a,b){f+=""}),b.wrapInner('
').prepend(h+'').appendTo(e).bind("change"+i.namespace+"filter",function(){l({value:this.value,delayed:!1})}),k=[],l=function(d,f){var g,j=!0,l=d&&d.value&&b.formatFloat((d.value+"").replace(/[><=]/g,""))||e.find(".spinner").val()||h.value,m=(a.isArray(h.compare)?e.find(c).val()||h.compare[h.selected||0]:h.compare)||"",n=d&&"boolean"==typeof d.delayed?d.delayed:!i.$table[0].hasInitialized||(h.delayed||"");h.addToggle&&(j=e.find(".toggle").is(":checked")),g=h.disabled||!j?"disable":"enable",e.find(".filter").val(j?(m||(h.exactMatch?"=":""))+l:"").trigger(f?"":"search",n).end().find(".spinner").spinner(g).val(l),k.length&&(k.find(".spinner").spinner(g).val(l).end().find(c).val(m),h.addToggle&&(k.find(".toggle")[0].checked=j))};return h.oldcreate=h.create,h.oldspin=h.spin,h.create=function(a,b){l(),"function"==typeof h.oldcreate&&h.oldcreate(a,b)},h.spin=function(a,b){l(b),"function"==typeof h.oldspin&&h.oldspin(a,b)},h.addToggle&&a('
').appendTo(e).find(".toggle").bind("change",function(){l()}),e.closest("thead").find("th[data-column="+f+"]").addClass("filter-parsed"),a('').val(h.value).appendTo(e).spinner(h).bind("change keyup",function(){l()}),i.$table.bind("filterFomatterUpdate",function(){var a=d.updateCompare(e,j,h)[0];e.find(".spinner").val(a),l({value:a},!0),b.filter.formatterUpdated(e,f)}),h.compare&&(d.addCompare(e,f,h),e.find(c).bind("change",function(){l()})),i.$table.bind("stickyHeadersInit",function(){k=i.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(f).empty(),h.addToggle&&a('
').appendTo(k).find(".toggle").bind("change",function(){e.find(".toggle")[0].checked=this.checked,l()}),a('').val(h.value).appendTo(k).spinner(h).bind("change keyup",function(){e.find(".spinner").val(this.value),l()}),h.compare&&(d.addCompare(k,f,h),k.find(c).bind("change",function(){e.find(c).val(a(this).val()),l()}))}),i.$table.bind("filterReset",function(){a.isArray(h.compare)&&e.add(k).find(c).val(h.compare[h.selected||0]),h.addToggle&&(e.find(".toggle")[0].checked=!1),e.find(".spinner").spinner("value",h.value),setTimeout(function(){l()},0)}),l(),j},uiSlider:function(e,f,g){var h=a.extend({delayed:!0,valueToHeader:!1,exactMatch:!0,cellText:"",compare:"",allText:"all",value:0,min:0,max:100,step:1,range:"min"},g),i=e.closest("table")[0].config,j=a('').appendTo(e).bind("change"+i.namespace+"filter",function(){l({value:this.value})}),k=[],l=function(d,g){var j=void 0!==d?b.formatFloat((d.value+"").replace(/[><=]/g,""))||h.value:h.value,l=h.compare?j:j===h.min?h.allText:j,m=(a.isArray(h.compare)?e.find(c).val()||h.compare[h.selected||0]:h.compare)||"",n=m+l,o=d&&"boolean"==typeof d.delayed?d.delayed:!i.$table[0].hasInitialized||(h.delayed||"");h.valueToHeader?e.closest("thead").find("th[data-column="+f+"]").find(".curvalue").html(" ("+n+")"):e.find(".ui-slider-handle").addClass("value-popup").attr("data-value",n),e.find(".filter").val(m?m+j:j===h.min?"":(h.exactMatch?"=":"")+j).trigger(g?"":"search",o).end().find(".slider").slider("value",j),k.length&&(k.find(c).val(m).end().find(".slider").slider("value",j),h.valueToHeader?k.closest("thead").find("th[data-column="+f+"]").find(".curvalue").html(" ("+n+")"):k.find(".ui-slider-handle").addClass("value-popup").attr("data-value",n))};return e.closest("thead").find("th[data-column="+f+"]").addClass("filter-parsed"),h.valueToHeader&&e.closest("thead").find("th[data-column="+f+"]").find(".tablesorter-header-inner").append(''),h.oldcreate=h.create,h.oldslide=h.slide,h.create=function(a,b){l(),"function"==typeof h.oldcreate&&h.oldcreate(a,b)},h.slide=function(a,b){l(b),"function"==typeof h.oldslide&&h.oldslide(a,b)},a('
').appendTo(e).slider(h),i.$table.bind("filterFomatterUpdate",function(){var a=d.updateCompare(e,j,h)[0];e.find(".slider").slider("value",a),l({value:a},!1),b.filter.formatterUpdated(e,f)}),h.compare&&(d.addCompare(e,f,h),e.find(c).bind("change",function(){l({value:e.find(".slider").slider("value")})})),i.$table.bind("filterReset",function(){a.isArray(h.compare)&&e.add(k).find(c).val(h.compare[h.selected||0]),setTimeout(function(){l({value:h.value})},0)}),i.$table.bind("stickyHeadersInit",function(){k=i.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(f).empty(),a('
').val(h.value).appendTo(k).slider(h).bind("change keyup",function(){e.find(".slider").slider("value",this.value),l()}),h.compare&&(d.addCompare(k,f,h),k.find(c).bind("change",function(){e.find(c).val(a(this).val()),l()}))}),j},uiRange:function(c,d,e){var f=a.extend({delayed:!0,valueToHeader:!1,values:[0,100],min:0,max:100,range:!0},e),g=c.closest("table")[0].config,h=a('').appendTo(c).bind("change"+g.namespace+"filter",function(){j()}),i=[],j=function(){var a=h.val(),b=a.split(" - ");""===a&&(b=[f.min,f.max]),b&&b[1]&&k({values:b,delay:!1},!0)},k=function(a,b){var e=a&&a.values||f.values,h=e[0]+" - "+e[1],j=e[0]===f.min&&e[1]===f.max?"":h,k=a&&"boolean"==typeof a.delayed?a.delayed:!g.$table[0].hasInitialized||(f.delayed||"");f.valueToHeader?c.closest("thead").find("th[data-column="+d+"]").find(".currange").html(" ("+h+")"):c.find(".ui-slider-handle").addClass("value-popup").eq(0).attr("data-value",e[0]).end().eq(1).attr("data-value",e[1]),c.find(".filter").val(j).trigger(b?"":"search",k).end().find(".range").slider("values",e),i.length&&(i.find(".range").slider("values",e),f.valueToHeader?i.closest("thead").find("th[data-column="+d+"]").find(".currange").html(" ("+h+")"):i.find(".ui-slider-handle").addClass("value-popup").eq(0).attr("data-value",e[0]).end().eq(1).attr("data-value",e[1]))};return c.closest("thead").find("th[data-column="+d+"]").addClass("filter-parsed"),f.valueToHeader&&c.closest("thead").find("th[data-column="+d+"]").find(".tablesorter-header-inner").append(''),f.oldcreate=f.create,f.oldslide=f.slide,f.create=function(a,b){k(),"function"==typeof f.oldcreate&&f.oldcreate(a,b)},f.slide=function(a,b){k(b),"function"==typeof f.oldslide&&f.oldslide(a,b)},a('
').appendTo(c).slider(f),g.$table.bind("filterFomatterUpdate",function(){j(),b.filter.formatterUpdated(c,d)}),g.$table.bind("filterReset",function(){c.find(".range").slider("values",f.values),setTimeout(function(){k()},0)}),g.$table.bind("stickyHeadersInit",function(){i=g.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(d).empty(),a('
').val(f.value).appendTo(i).slider(f).bind("change keyup",function(){c.find(".range").val(this.value),k()})}),h},uiDateCompare:function(e,f,g){var h,i,j=a.extend({cellText:"",compare:"",endOfDay:!0,defaultDate:"",changeMonth:!0,changeYear:!0,numberOfMonths:1},g),k=e.closest("table")[0].config,l=e.closest("thead").find("th[data-column="+f+"]").addClass("filter-parsed"),m=a('').appendTo(e).bind("change"+k.namespace+"filter",function(){var a=this.value;a&&j.onClose(a)}),n=[],o=function(b){var d,f,g=h.datepicker("getDate")||"",i=(a.isArray(j.compare)?e.find(c).val()||j.compare[j.selected||0]:j.compare)||"",l=!k.$table[0].hasInitialized||(j.delayed||"");h.datepicker("setDate",(""===g?"":g)||null),""===g&&(b=!1),d=h.datepicker("getDate"),f=d?(j.endOfDay&&/<=/.test(i)?d.setHours(23,59,59,999):d.getTime())||"":"",d&&j.endOfDay&&"="===i&&(i="",f+=" - "+d.setHours(23,59,59,999),b=!1),e.find(".dateCompare").val(i+f).trigger(b?"":"search",l).end(),n.length&&n.find(".dateCompare").val(i+f).end().find(c).val(i)};return i='',h=a(i).appendTo(e),j.oldonClose=j.onClose,j.onClose=function(a,b){o(),"function"==typeof j.oldonClose&&j.oldonClose(a,b)},h.datepicker(j),k.$table.bind("filterReset",function(){a.isArray(j.compare)&&e.add(n).find(c).val(j.compare[j.selected||0]),e.add(n).find(".date").val(j.defaultDate).datepicker("setDate",j.defaultDate||null),setTimeout(function(){o()},0)}),k.$table.bind("filterFomatterUpdate",function(){var a,g=m.val();/\s+-\s+/.test(g)?(e.find(c).val("="),a=g.split(/\s+-\s+/)[0],h.datepicker("setDate",a||null)):(a=d.updateCompare(e,m,j)[1].toString()||"",a=""!==a?/\d{5}/g.test(a)?new Date(Number(a)):a||"":""),e.add(n).find(".date").datepicker("setDate",a||null),setTimeout(function(){o(!0),b.filter.formatterUpdated(e,f)},0)}),j.compare&&(d.addCompare(e,f,j),e.find(c).bind("change",function(){o()})),k.$table.bind("stickyHeadersInit",function(){n=k.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(f).empty(),n.append(i).find(".date").datepicker(j),j.compare&&(d.addCompare(n,f,j),n.find(c).bind("change",function(){e.find(c).val(a(this).val()),o()}))}),m.val(j.defaultDate?j.defaultDate:"")},uiDatepicker:function(c,d,e){var f,g,h=a.extend({endOfDay:!0,textFrom:"from",textTo:"to",from:"",to:"",changeMonth:!0,changeYear:!0,numberOfMonths:1},e),i=[],j=c.closest("table")[0].config,k=function(a){return a instanceof Date&&isFinite(a)},l=a('').appendTo(c).bind("change"+j.namespace+"filter",function(){var a=this.value;a.match(" - ")?(a=a.split(" - "),c.find(".dateTo").val(a[1]),g(a[0])):a.match(">=")?g(a.replace(">=","")):a.match("<=")&&g(a.replace("<=",""))}),m=c.closest("thead").find("th[data-column="+d+"]").addClass("filter-parsed");return f="',a(f).appendTo(c),h.oldonClose=h.onClose,g=h.onClose=function(a,b){var d,e=c.find(".dateFrom").datepicker("getDate"),f=c.find(".dateTo").datepicker("getDate");e=k(e)?e.getTime():"",f=k(f)?(h.endOfDay?f.setHours(23,59,59,999):f.getTime())||"":"",d=e?f?e+" - "+f:">="+e:f?"<="+f:"",c.add(i).find(".dateRange").val(d).trigger("search"),e=e?new Date(e):"",f=f?new Date(f):"",/<=/.test(d)?c.add(i).find(".dateFrom").datepicker("option","maxDate",f||null).end().find(".dateTo").datepicker("option","minDate",null).datepicker("setDate",f||null):/>=/.test(d)?c.add(i).find(".dateFrom").datepicker("option","maxDate",null).datepicker("setDate",e||null).end().find(".dateTo").datepicker("option","minDate",e||null):c.add(i).find(".dateFrom").datepicker("option","maxDate",null).datepicker("setDate",e||null).end().find(".dateTo").datepicker("option","minDate",null).datepicker("setDate",f||null),"function"==typeof h.oldonClose&&h.oldonClose(a,b)},h.defaultDate=h.from||"",c.find(".dateFrom").datepicker(h),h.defaultDate=h.to||"+7d",c.find(".dateTo").datepicker(h),j.$table.bind("filterFomatterUpdate",function(){var a=l.val()||"",e="",f="";/\s+-\s+/.test(a)?(a=a.split(/\s+-\s+/)||[],e=a[0]||"",f=a[1]||""):/>=/.test(a)?e=a.replace(/>=/,"")||"":/<=/.test(a)&&(f=a.replace(/<=/,"")||""),e=""!==e?/\d{5}/g.test(e)?new Date(Number(e)):e||"":"",f=""!==f?/\d{5}/g.test(f)?new Date(Number(f)):f||"":"",c.add(i).find(".dateFrom").datepicker("setDate",e||null),c.add(i).find(".dateTo").datepicker("setDate",f||null),setTimeout(function(){g(),b.filter.formatterUpdated(c,d)},0)}),j.$table.bind("stickyHeadersInit",function(){i=j.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(d).empty(),i.append(f),h.defaultDate=h.from||"",i.find(".dateFrom").datepicker(h),h.defaultDate=h.to||"+7d",i.find(".dateTo").datepicker(h)}),c.closest("table").bind("filterReset",function(){c.add(i).find(".dateFrom").val("").datepicker("setDate",h.from||null),c.add(i).find(".dateTo").val("").datepicker("setDate",h.to||null),setTimeout(function(){g()},0)}),l.val(h.from?h.to?h.from+" - "+h.to:">="+h.from:h.to?"<="+h.to:"")}})}(jQuery); \ No newline at end of file +!function(e){"use strict";var a=e.tablesorter||{},t=".compare-select",n=a.filterFormatter=e.extend({},a.filterFormatter,{addCompare:function(a,n,d){if(d.compare&&e.isArray(d.compare)&&d.compare.length>1){var l="",i=[t.slice(1)," "+t.slice(1),""],r=d.cellText?'":"";e.each(d.compare,function(e,a){l+=""}),a.wrapInner('
').prepend(r+'').appendTo(d).bind("change"+o.namespace+"filter",function(){p({value:this.value,delayed:!1})}),c=[],p=function(n,l){var i,s=!0,p=n&&n.value&&a.formatFloat((n.value+"").replace(/[><=]/g,""))||d.find(".spinner").val()||r.value,f=(e.isArray(r.compare)?d.find(t).val()||r.compare[r.selected||0]:r.compare)||"",u=n&&"boolean"==typeof n.delayed?n.delayed:!o.$table[0].hasInitialized||(r.delayed||"");r.addToggle&&(s=d.find(".toggle").is(":checked")),i=r.disabled||!s?"disable":"enable",d.find(".filter").val(s?(f||(r.exactMatch?"=":""))+p:"").trigger(l?"":"search",u).end().find(".spinner").spinner(i).val(p),c.length&&(c.find(".spinner").spinner(i).val(p).end().find(t).val(f),r.addToggle&&(c.find(".toggle")[0].checked=s))};return r.oldcreate=r.create,r.oldspin=r.spin,r.create=function(e,a){p(),"function"==typeof r.oldcreate&&r.oldcreate(e,a)},r.spin=function(e,a){p(a),"function"==typeof r.oldspin&&r.oldspin(e,a)},r.addToggle&&e('
').appendTo(d).find(".toggle").bind("change",function(){p()}),d.closest("thead").find("th[data-column="+l+"]").addClass("filter-parsed"),e('').val(r.value).appendTo(d).spinner(r).bind("change keyup",function(){p()}),o.$table.bind("filterFomatterUpdate",function(){var e=n.updateCompare(d,s,r)[0];d.find(".spinner").val(e),p({value:e},!0),a.filter.formatterUpdated(d,l)}),r.compare&&(n.addCompare(d,l,r),d.find(t).bind("change",function(){p()})),o.$table.bind("stickyHeadersInit",function(){c=o.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(l).empty(),r.addToggle&&e('
').appendTo(c).find(".toggle").bind("change",function(){d.find(".toggle")[0].checked=this.checked,p()}),e('').val(r.value).appendTo(c).spinner(r).bind("change keyup",function(){d.find(".spinner").val(this.value),p()}),r.compare&&(n.addCompare(c,l,r),c.find(t).bind("change",function(){d.find(t).val(e(this).val()),p()}))}),o.$table.bind("filterReset",function(){e.isArray(r.compare)&&d.add(c).find(t).val(r.compare[r.selected||0]),r.addToggle&&(d.find(".toggle")[0].checked=!1),d.find(".spinner").spinner("value",r.value),setTimeout(function(){p()},0)}),p(),s},uiSlider:function(d,l,i){var r=e.extend({delayed:!0,valueToHeader:!1,exactMatch:!0,cellText:"",compare:"",allText:"all",value:0,min:0,max:100,step:1,range:"min"},i),o=d.closest("table")[0].config,s=e('').appendTo(d).bind("change"+o.namespace+"filter",function(){p({value:this.value})}),c=[],p=function(n,i){var s=void 0!==n?a.formatFloat((n.value+"").replace(/[><=]/g,""))||r.value:r.value,p=r.compare?s:s===r.min?r.allText:s,f=(e.isArray(r.compare)?d.find(t).val()||r.compare[r.selected||0]:r.compare)||"",u=f+p,m=n&&"boolean"==typeof n.delayed?n.delayed:!o.$table[0].hasInitialized||(r.delayed||"");r.valueToHeader?d.closest("thead").find("th[data-column="+l+"]").find(".curvalue").html(" ("+u+")"):d.find(".ui-slider-handle").addClass("value-popup").attr("data-value",u),d.find(".filter").val(f?f+s:s===r.min?"":(r.exactMatch?"=":"")+s).trigger(i?"":"search",m).end().find(".slider").slider("value",s),c.length&&(c.find(t).val(f).end().find(".slider").slider("value",s),r.valueToHeader?c.closest("thead").find("th[data-column="+l+"]").find(".curvalue").html(" ("+u+")"):c.find(".ui-slider-handle").addClass("value-popup").attr("data-value",u))};return d.closest("thead").find("th[data-column="+l+"]").addClass("filter-parsed"),r.valueToHeader&&d.closest("thead").find("th[data-column="+l+"]").find(".tablesorter-header-inner").append(''),r.oldcreate=r.create,r.oldslide=r.slide,r.create=function(e,a){p(),"function"==typeof r.oldcreate&&r.oldcreate(e,a)},r.slide=function(e,a){p(a),"function"==typeof r.oldslide&&r.oldslide(e,a)},e('
').appendTo(d).slider(r),o.$table.bind("filterFomatterUpdate",function(){var e=n.updateCompare(d,s,r)[0];d.find(".slider").slider("value",e),p({value:e},!1),a.filter.formatterUpdated(d,l)}),r.compare&&(n.addCompare(d,l,r),d.find(t).bind("change",function(){p({value:d.find(".slider").slider("value")})})),o.$table.bind("filterReset",function(){e.isArray(r.compare)&&d.add(c).find(t).val(r.compare[r.selected||0]),setTimeout(function(){p({value:r.value})},0)}),o.$table.bind("stickyHeadersInit",function(){c=o.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(l).empty(),e('
').val(r.value).appendTo(c).slider(r).bind("change keyup",function(){d.find(".slider").slider("value",this.value),p()}),r.compare&&(n.addCompare(c,l,r),c.find(t).bind("change",function(){d.find(t).val(e(this).val()),p()}))}),s},uiRange:function(t,n,d){var l=e.extend({delayed:!0,valueToHeader:!1,values:[0,100],min:0,max:100,range:!0},d),i=t.closest("table")[0].config,r=e('').appendTo(t).bind("change"+i.namespace+"filter",function(){s()}),o=[],s=function(){var e=r.val(),a=e.split(" - ");""===e&&(a=[l.min,l.max]),a&&a[1]&&c({values:a,delay:!1},!0)},c=function(e,a){var d=e&&e.values||l.values,r=d[0]+" - "+d[1],s=d[0]===l.min&&d[1]===l.max?"":r,c=e&&"boolean"==typeof e.delayed?e.delayed:!i.$table[0].hasInitialized||(l.delayed||"");l.valueToHeader?t.closest("thead").find("th[data-column="+n+"]").find(".currange").html(" ("+r+")"):t.find(".ui-slider-handle").addClass("value-popup").eq(0).attr("data-value",d[0]).end().eq(1).attr("data-value",d[1]),t.find(".filter").val(s).trigger(a?"":"search",c).end().find(".range").slider("values",d),o.length&&(o.find(".range").slider("values",d),l.valueToHeader?o.closest("thead").find("th[data-column="+n+"]").find(".currange").html(" ("+r+")"):o.find(".ui-slider-handle").addClass("value-popup").eq(0).attr("data-value",d[0]).end().eq(1).attr("data-value",d[1]))};return t.closest("thead").find("th[data-column="+n+"]").addClass("filter-parsed"),l.valueToHeader&&t.closest("thead").find("th[data-column="+n+"]").find(".tablesorter-header-inner").append(''),l.oldcreate=l.create,l.oldslide=l.slide,l.create=function(e,a){c(),"function"==typeof l.oldcreate&&l.oldcreate(e,a)},l.slide=function(e,a){c(a),"function"==typeof l.oldslide&&l.oldslide(e,a)},e('
').appendTo(t).slider(l),i.$table.bind("filterFomatterUpdate",function(){s(),a.filter.formatterUpdated(t,n)}),i.$table.bind("filterReset",function(){t.find(".range").slider("values",l.values),setTimeout(function(){c()},0)}),i.$table.bind("stickyHeadersInit",function(){o=i.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(n).empty(),e('
').val(l.value).appendTo(o).slider(l).bind("change keyup",function(){t.find(".range").val(this.value),c()})}),r},uiDateCompare:function(d,l,i){var r,o,s=e.extend({cellText:"",compare:"",endOfDay:!0,defaultDate:"",changeMonth:!0,changeYear:!0,numberOfMonths:1},i),c=d.closest("table")[0].config,p=d.closest("thead").find("th[data-column="+l+"]").addClass("filter-parsed"),f=e('').appendTo(d).bind("change"+c.namespace+"filter",function(){var e=this.value;e&&s.onClose(e)}),u=[],m=function(a){var n,l,i=r.datepicker("getDate")||"",o=(e.isArray(s.compare)?d.find(t).val()||s.compare[s.selected||0]:s.compare)||"",p=!c.$table[0].hasInitialized||(s.delayed||"");r.datepicker("setDate",(""===i?"":i)||null),""===i&&(a=!1),l=(n=r.datepicker("getDate"))?(s.endOfDay&&/<=/.test(o)?n.setHours(23,59,59,999):n.getTime())||"":"",n&&s.endOfDay&&"="===o&&(o="",l+=" - "+n.setHours(23,59,59,999),a=!1),d.find(".dateCompare").val(o+l).trigger(a?"":"search",p).end(),u.length&&u.find(".dateCompare").val(o+l).end().find(t).val(o)};return o='',r=e(o).appendTo(d),s.oldonClose=s.onClose,s.onClose=function(e,a){m(),"function"==typeof s.oldonClose&&s.oldonClose(e,a)},r.datepicker(s),c.$table.bind("filterReset",function(){e.isArray(s.compare)&&d.add(u).find(t).val(s.compare[s.selected||0]),d.add(u).find(".date").val(s.defaultDate).datepicker("setDate",s.defaultDate||null),setTimeout(function(){m()},0)}),c.$table.bind("filterFomatterUpdate",function(){var e,i=f.val();/\s+-\s+/.test(i)?(d.find(t).val("="),e=i.split(/\s+-\s+/)[0],r.datepicker("setDate",e||null)):e=""!==(e=n.updateCompare(d,f,s)[1].toString()||"")?/\d{5}/g.test(e)?new Date(Number(e)):e||"":"",d.add(u).find(".date").datepicker("setDate",e||null),setTimeout(function(){m(!0),a.filter.formatterUpdated(d,l)},0)}),s.compare&&(n.addCompare(d,l,s),d.find(t).bind("change",function(){m()})),c.$table.bind("stickyHeadersInit",function(){(u=c.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(l).empty()).append(o).find(".date").datepicker(s),s.compare&&(n.addCompare(u,l,s),u.find(t).bind("change",function(){d.find(t).val(e(this).val()),m()}))}),f.val(s.defaultDate?s.defaultDate:"")},uiDatepicker:function(t,n,d){var l,i,r=e.extend({endOfDay:!0,textFrom:"from",textTo:"to",from:"",to:"",changeMonth:!0,changeYear:!0,numberOfMonths:1},d),o=[],s=t.closest("table")[0].config,c=function(e){return e instanceof Date&&isFinite(e)},p=e('').appendTo(t).bind("change"+s.namespace+"filter",function(){var e=this.value;e.match(" - ")?(e=e.split(" - "),t.find(".dateTo").val(e[1]),i(e[0])):e.match(">=")?i(e.replace(">=","")):e.match("<=")&&i(e.replace("<=",""))}),f=t.closest("thead").find("th[data-column="+n+"]").addClass("filter-parsed");return l="',e(l).appendTo(t),r.oldonClose=r.onClose,i=r.onClose=function(e,a){var n,d=t.find(".dateFrom").datepicker("getDate"),l=t.find(".dateTo").datepicker("getDate");d=c(d)?d.getTime():"",l=c(l)?(r.endOfDay?l.setHours(23,59,59,999):l.getTime())||"":"",n=d?l?d+" - "+l:">="+d:l?"<="+l:"",t.add(o).find(".dateRange").val(n).trigger("search"),d=d?new Date(d):"",l=l?new Date(l):"",/<=/.test(n)?t.add(o).find(".dateFrom").datepicker("option","maxDate",l||null).end().find(".dateTo").datepicker("option","minDate",null).datepicker("setDate",l||null):/>=/.test(n)?t.add(o).find(".dateFrom").datepicker("option","maxDate",null).datepicker("setDate",d||null).end().find(".dateTo").datepicker("option","minDate",d||null):t.add(o).find(".dateFrom").datepicker("option","maxDate",null).datepicker("setDate",d||null).end().find(".dateTo").datepicker("option","minDate",null).datepicker("setDate",l||null),"function"==typeof r.oldonClose&&r.oldonClose(e,a)},r.defaultDate=r.from||"",t.find(".dateFrom").datepicker(r),r.defaultDate=r.to||"+7d",t.find(".dateTo").datepicker(r),s.$table.bind("filterFomatterUpdate",function(){var e=p.val()||"",d="",l="";/\s+-\s+/.test(e)?(d=(e=e.split(/\s+-\s+/)||[])[0]||"",l=e[1]||""):/>=/.test(e)?d=e.replace(/>=/,"")||"":/<=/.test(e)&&(l=e.replace(/<=/,"")||""),d=""!==d?/\d{5}/g.test(d)?new Date(Number(d)):d||"":"",l=""!==l?/\d{5}/g.test(l)?new Date(Number(l)):l||"":"",t.add(o).find(".dateFrom").datepicker("setDate",d||null),t.add(o).find(".dateTo").datepicker("setDate",l||null),setTimeout(function(){i(),a.filter.formatterUpdated(t,n)},0)}),s.$table.bind("stickyHeadersInit",function(){(o=s.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(n).empty()).append(l),r.defaultDate=r.from||"",o.find(".dateFrom").datepicker(r),r.defaultDate=r.to||"+7d",o.find(".dateTo").datepicker(r)}),t.closest("table").bind("filterReset",function(){t.add(o).find(".dateFrom").val("").datepicker("setDate",r.from||null),t.add(o).find(".dateTo").val("").datepicker("setDate",r.to||null),setTimeout(function(){i()},0)}),p.val(r.from?r.to?r.from+" - "+r.to:">="+r.from:r.to?"<="+r.to:"")}})}(jQuery); \ No newline at end of file diff --git a/dist/js/widgets/widget-filter-formatter-select2.min.js b/dist/js/widgets/widget-filter-formatter-select2.min.js index a4493c37..baa0a5f1 100644 --- a/dist/js/widgets/widget-filter-formatter-select2.min.js +++ b/dist/js/widgets/widget-filter-formatter-select2.min.js @@ -1,2 +1,2 @@ /*! Widget: filter, select2 formatter function - updated 7/11/2016 (v2.26.6) */ -!function(a){"use strict";var b=a.tablesorter||{};b.filterFormatter=b.filterFormatter||{},b.filterFormatter.select2=function(c,d,e){var f,g,h=a.extend({cellText:"",match:!0,value:"",multiple:!0,width:"100%"},e),i=c.addClass("select2col"+d).closest("table")[0].config,j=i.widgetOptions,k=a('').appendTo(c).bind("change"+i.namespace+"filter",function(){var a=q(this.value);i.$table.find(".select2col"+d+" .select2").select2("val",a),r()}),l=i.$headerIndexed[d],m=l.hasClass(j.filter_onlyAvail),n=h.match?"":"^",o=h.match?"":"$",p=j.filter_ignoreCase?"i":"",q=function(a){return a.replace(/^\/\(\^?/,"").replace(/\$\|\^/g,"|").replace(/\$?\)\/i?$/g,"").replace(/\\/g,"").split("|")},r=function(){var b=!1,c=i.$table.find(".select2col"+d+" .select2").select2("val")||h.value||"";a.isArray(c)&&(b=!0,c=c.join("\0")),c=c.replace(/[-[\]{}()*+?.,\/\\^$|#\s]/g,"\\$&"),b&&(c=c.split("\0")),k.val(a.isArray(c)&&c.length&&""!==c.join("")?"/("+n+(c||[]).join(o+"|"+n)+o+")/"+p:"").trigger("search").end().find(".select2").select2("val",c),i.widgetOptions.$sticky&&i.widgetOptions.$sticky.find(".select2col"+d+" .select2").select2("val",c)},s=function(){g=[],f=b.filter.getOptionSource(i.$table[0],d,m)||[],a.each(f,function(a,b){g.push({id:""+b.parsed,text:b.text})}),h.data=g};return l.toggleClass("filter-match",h.match),h.cellText&&c.prepend(""),h.ajax&&!a.isEmptyObject(h.ajax)||h.data||(s(),i.$table.bind("filterEnd",function(){s(),i.$table.find(".select2col"+d).add(i.widgetOptions.$sticky&&i.widgetOptions.$sticky.find(".select2col"+d)).find(".select2").select2(h)})),a('').val(h.value).appendTo(c).select2(h).bind("change",function(){r()}),i.$table.bind("filterFomatterUpdate",function(){var a=q(i.$table.data("lastSearch")[d]||"");c=i.$table.find(".select2col"+d),c.find(".select2").select2("val",a),r(),b.filter.formatterUpdated(c,d)}),i.$table.bind("stickyHeadersInit",function(){var b=i.widgetOptions.$sticky.find(".select2col"+d).empty();a('').val(h.value).appendTo(b).select2(h).bind("change",function(){i.$table.find(".select2col"+d).find(".select2").select2("val",i.widgetOptions.$sticky.find(".select2col"+d+" .select2").select2("val")),r()}),h.cellText&&b.prepend("")}),i.$table.bind("filterReset",function(){i.$table.find(".select2col"+d).find(".select2").select2("val",h.value||""),setTimeout(function(){r()},0)}),r(),k}}(jQuery); \ No newline at end of file +!function(e){"use strict";var t=e.tablesorter||{};t.filterFormatter=t.filterFormatter||{},t.filterFormatter.select2=function(l,c,i){var a,n,s=e.extend({cellText:"",match:!0,value:"",multiple:!0,width:"100%"},i),d=l.addClass("select2col"+c).closest("table")[0].config,r=d.widgetOptions,o=e('').appendTo(l).bind("change"+d.namespace+"filter",function(){var e=v(this.value);d.$table.find(".select2col"+c+" .select2").select2("val",e),g()}),f=d.$headerIndexed[c],p=f.hasClass(r.filter_onlyAvail),u=s.match?"":"^",b=s.match?"":"$",$=r.filter_ignoreCase?"i":"",v=function(e){return e.replace(/^\/\(\^?/,"").replace(/\$\|\^/g,"|").replace(/\$?\)\/i?$/g,"").replace(/\\/g,"").split("|")},g=function(){var t=!1,l=d.$table.find(".select2col"+c+" .select2").select2("val")||s.value||"";e.isArray(l)&&(t=!0,l=l.join("\0")),l=l.replace(/[-[\]{}()*+?.,\/\\^$|#\s]/g,"\\$&"),t&&(l=l.split("\0")),o.val(e.isArray(l)&&l.length&&""!==l.join("")?"/("+u+(l||[]).join(b+"|"+u)+b+")/"+$:"").trigger("search").end().find(".select2").select2("val",l),d.widgetOptions.$sticky&&d.widgetOptions.$sticky.find(".select2col"+c+" .select2").select2("val",l)},h=function(){n=[],a=t.filter.getOptionSource(d.$table[0],c,p)||[],e.each(a,function(e,t){n.push({id:""+t.parsed,text:t.text})}),s.data=n};return f.toggleClass("filter-match",s.match),s.cellText&&l.prepend(""),s.ajax&&!e.isEmptyObject(s.ajax)||s.data||(h(),d.$table.bind("filterEnd",function(){h(),d.$table.find(".select2col"+c).add(d.widgetOptions.$sticky&&d.widgetOptions.$sticky.find(".select2col"+c)).find(".select2").select2(s)})),e('').val(s.value).appendTo(l).select2(s).bind("change",function(){g()}),d.$table.bind("filterFomatterUpdate",function(){var e=v(d.$table.data("lastSearch")[c]||"");(l=d.$table.find(".select2col"+c)).find(".select2").select2("val",e),g(),t.filter.formatterUpdated(l,c)}),d.$table.bind("stickyHeadersInit",function(){var t=d.widgetOptions.$sticky.find(".select2col"+c).empty();e('').val(s.value).appendTo(t).select2(s).bind("change",function(){d.$table.find(".select2col"+c).find(".select2").select2("val",d.widgetOptions.$sticky.find(".select2col"+c+" .select2").select2("val")),g()}),s.cellText&&t.prepend("")}),d.$table.bind("filterReset",function(){d.$table.find(".select2col"+c).find(".select2").select2("val",s.value||""),setTimeout(function(){g()},0)}),g(),o}}(jQuery); \ No newline at end of file diff --git a/dist/js/widgets/widget-filter-type-insideRange.min.js b/dist/js/widgets/widget-filter-type-insideRange.min.js index 1910902a..4e87bb97 100644 --- a/dist/js/widgets/widget-filter-type-insideRange.min.js +++ b/dist/js/widgets/widget-filter-type-insideRange.min.js @@ -1,2 +1,2 @@ /*! Widget: filter, insideRange filter type - updated 12/10/2015 (v2.25.0) */ -!function(a){"use strict";var b=a.tablesorter,c=/\d+/,d=/\s+-\s+/,e=function(a){return isNaN(a)?a:parseFloat(a)};b.filter.types.insideRange=function(a,b){if(!b.anyMatch&&c.test(b.iFilter)&&d.test(b.iExact)){var f,g,h,i,j=b.index,k=b.$cells[j],l=b.iExact.split(d),m=a.parsers[b.index]&&a.parsers[b.index].format;return l&&l.length<2||"function"!=typeof m?null:(h=e(m(l[0],a.table,k,j)),i=e(m(l[1],a.table,k,j)),g=e(m(b.iFilter,a.table,k,j)),i=]/g,query:"(q|query)",wild01:/\?/g,wild0More:/\*/g,quote:/\"/g,isNeg1:/(>=?\s*-\d)/,isNeg2:/(<=?\s*\d)/},types:{or:function(d,e,f){if((c.orTest.test(e.iFilter)||c.orSplit.test(e.filter))&&!c.regex.test(e.filter)){var g,h,i,j,k=a.extend({},e),l=e.filter.split(c.orSplit),m=e.iFilter.split(c.orSplit),n=l.length;for(g=0;g=l:g>l:c.ltTest.test(f.iFilter)&&(h=c.lteTest.test(f.iFilter)?g<=l:g=0)))}return null},exact:function(d,e){if(c.exact.test(e.iFilter)){var f=e.iFilter.replace(c.exact,""),g=b.parseFilter(d,f,e)||"";return e.anyMatch?a.inArray(g,e.rowArray)>=0:g==e.iExact}return null},range:function(a,e){if(c.toTest.test(e.iFilter)){var f,g,h,i,j=a.table,k=e.index,l=e.parsed[k],m=e.iFilter.split(c.toSplit);return g=m[0].replace(d.regex.nondigit,"")||"",h=d.formatFloat(b.parseFilter(a,g,e),j),g=m[1].replace(d.regex.nondigit,"")||"",i=d.formatFloat(b.parseFilter(a,g,e),j),(l||"numeric"===a.parsers[k].type)&&(f=a.parsers[k].format(""+m[0],j,a.$headers.eq(k),k),h=""===f||isNaN(f)?h:f,f=a.parsers[k].format(""+m[1],j,a.$headers.eq(k),k),i=""===f||isNaN(f)?i:f),!l&&"numeric"!==a.parsers[k].type||isNaN(h)||isNaN(i)?(g=isNaN(e.iExact)?e.iExact.replace(d.regex.nondigit,""):e.iExact,f=d.formatFloat(g,j)):f=e.cache,h>i&&(g=h,h=i,i=g),f>=h&&f<=i||""===h||""===i}return null},wild:function(a,d){if(c.wildOrTest.test(d.iFilter)){var e=""+(b.parseFilter(a,d.iFilter,d)||"");!c.wildTest.test(e)&&d.nestedFilters&&(e=d.isMatch?e:"^("+e+")$");try{return new RegExp(e.replace(c.wild01,"\\S{1}").replace(c.wild0More,"\\S*"),a.widgetOptions.filter_ignoreCase?"i":"").test(d.exact)}catch(a){return null}}return null},fuzzy:function(a,d){if(c.fuzzyTest.test(d.iFilter)){var e,f=0,g=d.iExact.length,h=d.iFilter.slice(1),i=b.parseFilter(a,h,d)||"";for(e=0;e]=?/,gtTest:/>/,gteTest:/>=/,ltTest:/'+(j.data("placeholder")||j.attr("data-placeholder")||p.filter_placeholder.select||"")+"":"",l=h,i=h,h.indexOf(p.filter_selectSourceSeparator)>=0&&(l=h.split(p.filter_selectSourceSeparator),i=l[1],l=l[0]),g+="");o.$table.find("thead").find("select."+e.filter+'[data-column="'+k+'"]').append(g),i=p.filter_selectSource,m="function"==typeof i||d.getColumnData(f,i,k),m&&b.buildSelect(o.table,k,"",!0,j.hasClass(p.filter_onlyAvail))}b.buildDefault(f,!0),b.bindSearch(f,o.$table.find("."+e.filter),!0),p.filter_external&&b.bindSearch(f,p.filter_external),p.filter_hideFilters&&b.hideFilters(o),o.showProcessing&&(i="filterStart filterEnd ".split(" ").join(o.namespace+"filter "),o.$table.unbind(i.replace(d.regex.spaces," ")).bind(i,function(b,c){j=c?o.$table.find("."+e.header).filter("[data-column]").filter(function(){return""!==c[a(this).data("column")]}):"",d.isProcessing(f,"filterStart"===b.type,c?j:"")})),o.filteredRows=o.totalRows,i="tablesorter-initialized pagerBeforeInitialized ".split(" ").join(o.namespace+"filter "),o.$table.unbind(i.replace(d.regex.spaces," ")).bind(i,function(){b.completeInit(this)}),o.pager&&o.pager.initialized&&!p.filter_initialized?(o.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){b.filterInitComplete(o)},100)):p.filter_initialized||b.completeInit(f)},completeInit:function(a){var c=a.config,e=c.widgetOptions,f=b.setDefaults(a,c,e)||[];f.length&&(c.delayInit&&""===f.join("")||d.setFilters(a,f,!0)),c.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){e.filter_initialized||b.filterInitComplete(c)},100)},formatterUpdated:function(a,b){var c=a&&a.closest("table")[0].config.widgetOptions;c&&!c.filter_initialized&&(c.filter_formatterInit[b]=1)},filterInitComplete:function(c){var d,e,f=c.widgetOptions,g=0,h=function(){f.filter_initialized=!0,c.lastSearch=c.$table.data("lastSearch"),c.$table.triggerHandler("filterInit",c),b.findRows(c.table,c.lastSearch||[])};if(a.isEmptyObject(f.filter_formatter))h();else{for(e=f.filter_formatterInit.length,d=0;d';for(j=0;j1?'").appendTo(f.$table.children("thead").eq(0)).children("td"),j=0;j").appendTo(h):(o=d.getColumnData(c,g.filter_formatter,j),o?(g.filter_formatterCount++,t=o(h,j),t&&0===t.length&&(t=h.children("input")),t&&(0===t.parent().length||t.parent().length&&t.parent()[0]!==h[0])&&h.append(t)):t=a('').appendTo(h),t&&(p=k.data("placeholder")||k.attr("data-placeholder")||g.filter_placeholder.search||"",t.attr("placeholder",p))),t&&(n=(a.isArray(g.filter_cssFilter)?void 0!==g.filter_cssFilter[j]?g.filter_cssFilter[j]||"":"":g.filter_cssFilter)||"",t.addClass(e.filter+" "+n).attr("data-column",h.attr("data-column")),m&&(t.attr("placeholder","").addClass(e.filterDisabled)[0].disabled=!0)))},bindSearch:function(c,e,g){if(c=a(c)[0],e=a(e),e.length){var h,i=c.config,j=i.widgetOptions,k=i.namespace+"filter",l=j.filter_$externalFilters;!0!==g&&(h=j.filter_anyColumnSelector+","+j.filter_multipleColumnSelector,j.filter_$anyMatch=e.filter(h),l&&l.length?j.filter_$externalFilters=j.filter_$externalFilters.add(e):j.filter_$externalFilters=e,d.setFilters(c,i.$table.data("lastSearch")||[],!1===g)),h="keypress keyup keydown search change input ".split(" ").join(k+" "),e.attr("data-lastSearchTime",(new Date).getTime()).unbind(h.replace(d.regex.spaces," ")).bind("keydown"+k,function(a){if(a.which===f.escape&&!c.config.widgetOptions.filter_resetOnEsc)return!1}).bind("keyup"+k,function(e){j=c.config.widgetOptions;var g=parseInt(a(this).attr("data-column"),10),h="boolean"==typeof j.filter_liveSearch?j.filter_liveSearch:d.getColumnData(c,j.filter_liveSearch,g);if(void 0===h&&(h=j.filter_liveSearch.fallback||!1),a(this).attr("data-lastSearchTime",(new Date).getTime()),e.which===f.escape)this.value=j.filter_resetOnEsc?"":i.lastSearch[g];else{if(!1===h)return;if(""!==this.value&&("number"==typeof h&&this.value.length=f.left&&e.which<=f.down)))return}b.searching(c,!0,!0,g)}).bind("search change keypress input ".split(" ").join(k+" "),function(e){var g=parseInt(a(this).attr("data-column"),10),h="boolean"==typeof j.filter_liveSearch?j.filter_liveSearch:d.getColumnData(c,j.filter_liveSearch,g);!c.config.widgetOptions.filter_initialized||e.which!==f.enter&&"search"!==e.type&&("change"!==e.type&&"input"!==e.type||!0!==h||this.value===i.lastSearch[g])||(e.preventDefault(),a(this).attr("data-lastSearchTime",(new Date).getTime()),b.searching(c,"keypress"!==e.type,!0,g))})}},searching:function(a,c,e,f){var g,h=a.config.widgetOptions;void 0===f?g=!1:void 0===(g="boolean"==typeof h.filter_liveSearch?h.filter_liveSearch:d.getColumnData(a,h.filter_liveSearch,f))&&(g=h.filter_liveSearch.fallback||!1),clearTimeout(h.filter_searchTimer),void 0===c||!0===c?h.filter_searchTimer=setTimeout(function(){b.checkFilters(a,c,e)},g?h.filter_searchDelay:10):b.checkFilters(a,c,e)},equalFilters:function(b,c,d){var e,f=[],g=[],h=b.columns+1;for(c=a.isArray(c)?c:[],d=a.isArray(d)?d:[],e=0;e1?a.trim(b).split(/\s/):[a.trim(b)],h=g.length-1,i=0,j=d;for(h<1&&f>1&&(g[1]=g[0]);e.test(j);)j=j.replace(e,g[i++]||""),e.test(j)&&ih&&(d=g,g=h,h=d),h>=a.columns&&(h=a.columns-1);g<=h;g++)m[m.length]=g;b=b.replace(e[k],"")}if(!c&&/,/.test(b))for(i=b.split(/\s*,\s*/),l=i.length,j=0;j-1})},multipleColumns:function(c,d){var e=c.widgetOptions,f=e.filter_initialized||!d.filter(e.filter_anyColumnSelector).length,g=a.trim(b.getLatestSearch(d).attr("data-column")||"");return b.findRange(c,g,!f)},processTypes:function(c,d,e){var f,g=null,h=null;for(f in b.types)a.inArray(f,e.excludeMatch)<0&&null===h&&null!==(h=b.types[f](c,d,e))&&(g=h);return g},matchType:function(a,b){var c,d=a.widgetOptions,f=a.$headerIndexed[b];return f.hasClass("filter-exact")?c=!1:f.hasClass("filter-match")?c=!0:(d.filter_columnFilters?f=a.$filters.find("."+e.filter).add(d.filter_$externalFilters).filter('[data-column="'+b+'"]'):d.filter_$externalFilters&&(f=d.filter_$externalFilters.filter('[data-column="'+b+'"]')),c=!!f.length&&"match"===a.widgetOptions.filter_matchType[(f[0].nodeName||"").toLowerCase()]),c},processRow:function(e,f,g){var h,i,j,k,l,m=e.widgetOptions,n=!0,o=m.filter_$anyMatch&&m.filter_$anyMatch.length,p=m.filter_$anyMatch&&m.filter_$anyMatch.length?b.multipleColumns(e,m.filter_$anyMatch):[];if(f.$cells=f.$row.children(),f.anyMatchFlag&&p.length>1||f.anyMatchFilter&&!o){if(f.anyMatch=!0,f.isMatch=!0,f.rowArray=f.$cells.map(function(b){if(a.inArray(b,p)>-1||f.anyMatchFilter&&!o)return f.parsed[b]?l=f.cacheArray[b]:(l=f.rawArray[b],l=a.trim(m.filter_ignoreCase?l.toLowerCase():l),e.sortLocaleCompare&&(l=d.replaceAccents(l))),l}).get(),f.filter=f.anyMatchFilter,f.iFilter=f.iAnyMatchFilter,f.exact=f.rowArray.join(" "),f.iExact=m.filter_ignoreCase?f.exact.toLowerCase():f.exact,f.cache=f.cacheArray.slice(0,-1).join(" "),g.excludeMatch=g.noAnyMatch,null!==(i=b.processTypes(e,f,g)))n=i;else if(m.filter_startsWith)for(n=!1,p=Math.min(e.columns,f.rowArray.length);!n&&p>0;)p--,n=n||0===f.rowArray[p].indexOf(f.iFilter);else n=(f.iExact+f.childRowText).indexOf(f.iFilter)>=0;if(f.anyMatch=!1,f.filters.join("")===f.filter)return n}for(p=0;p=0:f.filter===f.exact:"function"==typeof j?i=j(f.exact,f.cache,f.filter,p,f.$row,e,f):"function"==typeof j[k||f.filter]&&(l=k||f.filter,i=j[l](f.exact,f.cache,f.filter,p,f.$row,e,f))),null===i?(i=b.processTypes(e,f,g),null!==i?h=i:(l=(f.iExact+f.childRowText).indexOf(b.parseFilter(e,f.iFilter,f)),h=!m.filter_startsWith&&l>=0||m.filter_startsWith&&0===l)):h=i,n=!!h&&n);return n},findRows:function(e,f,g){if(!b.equalFilters(e.config,e.config.lastSearch,g)&&e.config.widgetOptions.filter_initialized){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E=a.extend([],f),F=e.config,G=F.widgetOptions,H={anyMatch:!1,filters:f,filter_regexCache:[]},I={noAnyMatch:["range","operators"],functions:[],excludeFilter:[],defaultColFilter:[],defaultAnyFilter:d.getColumnData(e,G.filter_defaultFilter,F.columns,!0)||""};for(H.parsed=[],p=0;p1&&(isNaN(B[0])?a.each(F.headerContent,function(a,b){b.toLowerCase().indexOf(B[0])>-1&&(C=a,f[C]=B[1])}):C=parseInt(B[0],10)-1,C>=0&&C")>=0)return l;a.isArray(l)?i=l:"object"===a.type(j)&&l&&(i=l(c,e,f))}return!1===i&&(i=b.getOptions(c,e,f)),b.processOptions(c,e,i)},processOptions:function(b,c,e){if(!a.isArray(e))return!1;b=a(b)[0];var f,g,h,i,j,k,l=b.config,m=void 0!==c&&null!==c&&c>=0&&c'+(s.data("placeholder")||s.attr("data-placeholder")||r.filter_placeholder.select||"")+"",u=q.$table.find("thead").find("select."+e.filter+'[data-column="'+f+'"]').val();if(void 0!==g&&""!==g||(g=b.getOptionSource(d,f,i)),a.isArray(g)){for(j=0;j"}else""+p!="[object Object]"&&(l=p=(""+p).replace(c.quote,"""),k=l,l.indexOf(r.filter_selectSourceSeparator)>=0&&(m=l.split(r.filter_selectSourceSeparator),k=m[0],l=m[1]),t+=""!==p?"":"");g=[]}n=(q.$filters?q.$filters:q.$table.children("thead")).find("."+e.filter),r.filter_$externalFilters&&(n=n&&n.length?n.add(r.filter_$externalFilters):r.filter_$externalFilters),o=n.filter('select[data-column="'+f+'"]'),o.length&&(o[h?"html":"append"](t),a.isArray(g)||o.append(g).val(u),o.val(u))}},buildDefault:function(a,c){var e,f,g,h=a.config,i=h.widgetOptions,j=h.columns;for(e=0;e1&&(j=j.slice(1)),h===m.columns&&(k=j.filter(n.filter_anyColumnSelector),j=k.length?k:j),j.val(f[h]).trigger("change"+m.namespace)):(l[h]=j.val()||"",h===m.columns?j.slice(1).filter('[data-column*="'+j.attr("data-column")+'"]').val(l[h]):j.slice(1).val(l[h])),h===m.columns&&j.length&&(n.filter_$anyMatch=j));return l},d.setFilters=function(c,e,f,g){var h=c?a(c)[0].config:"",i=d.getFilters(c,!0,e,g);return void 0===f&&(f=!0),h&&f&&(h.lastCombinedFilter=null,h.lastSearch=[],b.searching(h.table,e,g),h.$table.triggerHandler("filterFomatterUpdate")),0!==i.length}}(jQuery); \ No newline at end of file +!function(e){"use strict";var t,r,i=e.tablesorter||{},l=i.css,a=i.keyCodes;e.extend(l,{filterRow:"tablesorter-filter-row",filter:"tablesorter-filter",filterDisabled:"disabled",filterRowHide:"hideme"}),e.extend(a,{backSpace:8,escape:27,space:32,left:37,down:40}),i.addWidget({id:"filter",priority:50,options:{filter_cellFilter:"",filter_childRows:!1,filter_childByColumn:!1,filter_childWithSibs:!0,filter_columnAnyMatch:!0,filter_columnFilters:!0,filter_cssFilter:"",filter_defaultAttrib:"data-value",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_matchType:{input:"exact",select:"exact"},filter_onlyAvail:"filter-onlyAvail",filter_placeholder:{search:"",select:""},filter_reset:null,filter_resetOnEsc:!0,filter_saveFilters:!1,filter_searchDelay:300,filter_searchFiltered:!0,filter_selectSource:null,filter_selectSourceSeparator:"|",filter_serversideFiltering:!1,filter_startsWith:!1,filter_useParsedData:!1},format:function(e,r,i){r.$table.hasClass("hasFilters")||t.init(e,r,i)},remove:function(t,r,a,n){var s,o,c=r.$table,f=r.$tbodies,d="addRows updateCell update updateRows updateComplete appendCache filterReset filterAndSortReset filterEnd search ".split(" ").join(r.namespace+"filter ");if(c.removeClass("hasFilters").unbind(d.replace(i.regex.spaces," ")).find("."+l.filterRow).remove(),a.filter_initialized=!1,!n){for(s=0;s=]/g,query:"(q|query)",wild01:/\?/g,wild0More:/\*/g,quote:/\"/g,isNeg1:/(>=?\s*-\d)/,isNeg2:/(<=?\s*\d)/},types:{or:function(i,l,a){if((r.orTest.test(l.iFilter)||r.orSplit.test(l.filter))&&!r.regex.test(l.filter)){var n,s,o,c,f=e.extend({},l),d=l.filter.split(r.orSplit),u=l.iFilter.split(r.orSplit),h=d.length;for(n=0;n=d:n>d:r.ltTest.test(a.iFilter)&&(s=r.lteTest.test(a.iFilter)?n<=d:n=0)))}return null},exact:function(i,l){if(r.exact.test(l.iFilter)){var a=l.iFilter.replace(r.exact,""),n=t.parseFilter(i,a,l)||"";return l.anyMatch?e.inArray(n,l.rowArray)>=0:n==l.iExact}return null},range:function(e,l){if(r.toTest.test(l.iFilter)){var a,n,s,o,c=e.table,f=l.index,d=l.parsed[f],u=l.iFilter.split(r.toSplit);return n=u[0].replace(i.regex.nondigit,"")||"",s=i.formatFloat(t.parseFilter(e,n,l),c),n=u[1].replace(i.regex.nondigit,"")||"",o=i.formatFloat(t.parseFilter(e,n,l),c),(d||"numeric"===e.parsers[f].type)&&(s=""===(a=e.parsers[f].format(""+u[0],c,e.$headers.eq(f),f))||isNaN(a)?s:a,o=""===(a=e.parsers[f].format(""+u[1],c,e.$headers.eq(f),f))||isNaN(a)?o:a),!d&&"numeric"!==e.parsers[f].type||isNaN(s)||isNaN(o)?(n=isNaN(l.iExact)?l.iExact.replace(i.regex.nondigit,""):l.iExact,a=i.formatFloat(n,c)):a=l.cache,s>o&&(n=s,s=o,o=n),a>=s&&a<=o||""===s||""===o}return null},wild:function(e,i){if(r.wildOrTest.test(i.iFilter)){var l=""+(t.parseFilter(e,i.iFilter,i)||"");!r.wildTest.test(l)&&i.nestedFilters&&(l=i.isMatch?l:"^("+l+")$");try{return new RegExp(l.replace(r.wild01,"\\S{1}").replace(r.wild0More,"\\S*"),e.widgetOptions.filter_ignoreCase?"i":"").test(i.exact)}catch(e){return null}}return null},fuzzy:function(e,i){if(r.fuzzyTest.test(i.iFilter)){var l,a=0,n=i.iExact.length,s=i.iFilter.slice(1),o=t.parseFilter(e,s,i)||"";for(l=0;l]=?/,gtTest:/>/,gteTest:/>=/,ltTest:/'+(c.data("placeholder")||c.attr("data-placeholder")||g.filter_placeholder.select||"")+"":"",d=s,o=s,s.indexOf(g.filter_selectSourceSeparator)>=0&&(o=(d=s.split(g.filter_selectSourceSeparator))[1],d=d[0]),n+="");p.$table.find("thead").find("select."+l.filter+'[data-column="'+f+'"]').append(n),(u="function"==typeof(o=g.filter_selectSource)||i.getColumnData(a,o,f))&&t.buildSelect(p.table,f,"",!0,c.hasClass(g.filter_onlyAvail))}t.buildDefault(a,!0),t.bindSearch(a,p.$table.find("."+l.filter),!0),g.filter_external&&t.bindSearch(a,g.filter_external),g.filter_hideFilters&&t.hideFilters(p),p.showProcessing&&(o="filterStart filterEnd ".split(" ").join(p.namespace+"filter "),p.$table.unbind(o.replace(i.regex.spaces," ")).bind(o,function(t,r){c=r?p.$table.find("."+l.header).filter("[data-column]").filter(function(){return""!==r[e(this).data("column")]}):"",i.isProcessing(a,"filterStart"===t.type,r?c:"")})),p.filteredRows=p.totalRows,o="tablesorter-initialized pagerBeforeInitialized ".split(" ").join(p.namespace+"filter "),p.$table.unbind(o.replace(i.regex.spaces," ")).bind(o,function(){t.completeInit(this)}),p.pager&&p.pager.initialized&&!g.filter_initialized?(p.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){t.filterInitComplete(p)},100)):g.filter_initialized||t.completeInit(a)},completeInit:function(e){var r=e.config,l=r.widgetOptions,a=t.setDefaults(e,r,l)||[];a.length&&(r.delayInit&&""===a.join("")||i.setFilters(e,a,!0)),r.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){l.filter_initialized||t.filterInitComplete(r)},100)},formatterUpdated:function(e,t){var r=e&&e.closest("table")[0].config.widgetOptions;r&&!r.filter_initialized&&(r.filter_formatterInit[t]=1)},filterInitComplete:function(r){var i,l,a=r.widgetOptions,n=0,s=function(){a.filter_initialized=!0,r.lastSearch=r.$table.data("lastSearch"),r.$table.triggerHandler("filterInit",r),t.findRows(r.table,r.lastSearch||[])};if(e.isEmptyObject(a.filter_formatter))s();else{for(l=a.filter_formatterInit.length,i=0;i';for(c=0;c<_;c++)a.$headerIndexed[c].length&&(w+=(g=a.$headerIndexed[c]&&a.$headerIndexed[c][0].colSpan||0)>1?'").appendTo(a.$table.children("thead").eq(0)).children("td"),c=0;c<_;c++)u=!1,(f=a.$headerIndexed[c])&&f.length&&(s=t.getColumnElm(a,a.$filters,c),p=i.getColumnData(r,n.filter_functions,c),d=n.filter_functions&&p&&"function"!=typeof p||f.hasClass("filter-select"),o=i.getColumnData(r,a.headers,c),u="false"===i.getData(f[0],o,"filter")||"false"===i.getData(f[0],o,"parser"),d?w=e("').appendTo(s),w&&(g=f.data("placeholder")||f.attr("data-placeholder")||n.filter_placeholder.search||"",w.attr("placeholder",g))),w&&(h=(e.isArray(n.filter_cssFilter)?void 0!==n.filter_cssFilter[c]?n.filter_cssFilter[c]||"":"":n.filter_cssFilter)||"",w.addClass(l.filter+" "+h).attr("data-column",s.attr("data-column")),u&&(w.attr("placeholder","").addClass(l.filterDisabled)[0].disabled=!0)))},bindSearch:function(r,l,n){if(r=e(r)[0],(l=e(l)).length){var s,o=r.config,c=o.widgetOptions,f=o.namespace+"filter",d=c.filter_$externalFilters;!0!==n&&(s=c.filter_anyColumnSelector+","+c.filter_multipleColumnSelector,c.filter_$anyMatch=l.filter(s),d&&d.length?c.filter_$externalFilters=c.filter_$externalFilters.add(l):c.filter_$externalFilters=l,i.setFilters(r,o.$table.data("lastSearch")||[],!1===n)),s="keypress keyup keydown search change input ".split(" ").join(f+" "),l.attr("data-lastSearchTime",(new Date).getTime()).unbind(s.replace(i.regex.spaces," ")).bind("keydown"+f,function(e){if(e.which===a.escape&&!r.config.widgetOptions.filter_resetOnEsc)return!1}).bind("keyup"+f,function(l){c=r.config.widgetOptions;var n=parseInt(e(this).attr("data-column"),10),s="boolean"==typeof c.filter_liveSearch?c.filter_liveSearch:i.getColumnData(r,c.filter_liveSearch,n);if(void 0===s&&(s=c.filter_liveSearch.fallback||!1),e(this).attr("data-lastSearchTime",(new Date).getTime()),l.which===a.escape)this.value=c.filter_resetOnEsc?"":o.lastSearch[n];else{if(!1===s)return;if(""!==this.value&&("number"==typeof s&&this.value.length=a.left&&l.which<=a.down)))return}t.searching(r,!0,!0,n)}).bind("search change keypress input ".split(" ").join(f+" "),function(l){var n=parseInt(e(this).attr("data-column"),10),s="boolean"==typeof c.filter_liveSearch?c.filter_liveSearch:i.getColumnData(r,c.filter_liveSearch,n);!r.config.widgetOptions.filter_initialized||l.which!==a.enter&&"search"!==l.type&&("change"!==l.type&&"input"!==l.type||!0!==s||this.value===o.lastSearch[n])||(l.preventDefault(),e(this).attr("data-lastSearchTime",(new Date).getTime()),t.searching(r,"keypress"!==l.type,!0,n))})}},searching:function(e,r,l,a){var n,s=e.config.widgetOptions;void 0===a?n=!1:void 0===(n="boolean"==typeof s.filter_liveSearch?s.filter_liveSearch:i.getColumnData(e,s.filter_liveSearch,a))&&(n=s.filter_liveSearch.fallback||!1),clearTimeout(s.filter_searchTimer),void 0===r||!0===r?s.filter_searchTimer=setTimeout(function(){t.checkFilters(e,r,l)},n?s.filter_searchDelay:10):t.checkFilters(e,r,l)},equalFilters:function(t,r,i){var l,a=[],n=[],s=t.columns+1;for(r=e.isArray(r)?r:[],i=e.isArray(i)?i:[],l=0;l1?e.trim(t).split(/\s/):[e.trim(t)],s=n.length-1,o=0,c=i;for(s<1&&a>1&&(n[1]=n[0]);l.test(c);)c=c.replace(l,n[o++]||""),l.test(c)&&o(s=parseInt(a[1],10)||e.columns-1)&&(i=n,n=s,s=i),s>=e.columns&&(s=e.columns-1);n<=s;n++)u[u.length]=n;t=t.replace(l[f],"")}if(!r&&/,/.test(t))for(d=(o=t.split(/\s*,\s*/)).length,c=0;c-1})},multipleColumns:function(r,i){var l=r.widgetOptions,a=l.filter_initialized||!i.filter(l.filter_anyColumnSelector).length,n=e.trim(t.getLatestSearch(i).attr("data-column")||"");return t.findRange(r,n,!a)},processTypes:function(r,i,l){var a,n=null,s=null;for(a in t.types)e.inArray(a,l.excludeMatch)<0&&null===s&&null!==(s=t.types[a](r,i,l))&&(n=s);return n},matchType:function(e,t){var r,i=e.widgetOptions,a=e.$headerIndexed[t];return a.hasClass("filter-exact")?r=!1:a.hasClass("filter-match")?r=!0:(i.filter_columnFilters?a=e.$filters.find("."+l.filter).add(i.filter_$externalFilters).filter('[data-column="'+t+'"]'):i.filter_$externalFilters&&(a=i.filter_$externalFilters.filter('[data-column="'+t+'"]')),r=!!a.length&&"match"===e.widgetOptions.filter_matchType[(a[0].nodeName||"").toLowerCase()]),r},processRow:function(l,a,n){var s,o,c,f,d,u=l.widgetOptions,h=!0,p=u.filter_$anyMatch&&u.filter_$anyMatch.length,g=u.filter_$anyMatch&&u.filter_$anyMatch.length?t.multipleColumns(l,u.filter_$anyMatch):[];if(a.$cells=a.$row.children(),a.anyMatchFlag&&g.length>1||a.anyMatchFilter&&!p){if(a.anyMatch=!0,a.isMatch=!0,a.rowArray=a.$cells.map(function(t){if(e.inArray(t,g)>-1||a.anyMatchFilter&&!p)return a.parsed[t]?d=a.cacheArray[t]:(d=a.rawArray[t],d=e.trim(u.filter_ignoreCase?d.toLowerCase():d),l.sortLocaleCompare&&(d=i.replaceAccents(d))),d}).get(),a.filter=a.anyMatchFilter,a.iFilter=a.iAnyMatchFilter,a.exact=a.rowArray.join(" "),a.iExact=u.filter_ignoreCase?a.exact.toLowerCase():a.exact,a.cache=a.cacheArray.slice(0,-1).join(" "),n.excludeMatch=n.noAnyMatch,null!==(o=t.processTypes(l,a,n)))h=o;else if(u.filter_startsWith)for(h=!1,g=Math.min(l.columns,a.rowArray.length);!h&&g>0;)g--,h=h||0===a.rowArray[g].indexOf(a.iFilter);else h=(a.iExact+a.childRowText).indexOf(a.iFilter)>=0;if(a.anyMatch=!1,a.filters.join("")===a.filter)return h}for(g=0;g=0:a.filter===a.exact:"function"==typeof c?o=c(a.exact,a.cache,a.filter,g,a.$row,l,a):"function"==typeof c[f||a.filter]&&(o=c[d=f||a.filter](a.exact,a.cache,a.filter,g,a.$row,l,a))),null===o?null!==(o=t.processTypes(l,a,n))?s=o:(d=(a.iExact+a.childRowText).indexOf(t.parseFilter(l,a.iFilter,a)),s=!u.filter_startsWith&&d>=0||u.filter_startsWith&&0===d):s=o,h=!!s&&h);return h},findRows:function(l,a,n){if(!t.equalFilters(l.config,l.config.lastSearch,n)&&l.config.widgetOptions.filter_initialized){var s,o,c,f,d,u,h,p,g,m,_,y,w,F,x,C,b,v,$,S,R,T,A,O=e.extend([],a),E=l.config,M=E.widgetOptions,I={anyMatch:!1,filters:a,filter_regexCache:[]},D={noAnyMatch:["range","operators"],functions:[],excludeFilter:[],defaultColFilter:[],defaultAnyFilter:i.getColumnData(l,M.filter_defaultFilter,E.columns,!0)||""};for(I.parsed=[],g=0;g1&&(isNaN(R[0])?e.each(E.headerContent,function(e,t){t.toLowerCase().indexOf(R[0])>-1&&(a[T=e]=R[1])}):T=parseInt(R[0],10)-1,T>=0&&T")>=0)return f;e.isArray(f)?s=f:"object"===e.type(o)&&f&&(s=f(r,l,a))}return!1===s&&(s=t.getOptions(r,l,a)),t.processOptions(r,l,s)},processOptions:function(t,r,l){if(!e.isArray(l))return!1;var a,n,s,o,c,f,d=(t=e(t)[0]).config,u=void 0!==r&&null!==r&&r>=0&&r'+(y.data("placeholder")||y.attr("data-placeholder")||_.filter_placeholder.select||"")+"",F=m.$table.find("thead").find("select."+l.filter+'[data-column="'+a+'"]').val();if(void 0!==n&&""!==n||(n=t.getOptionSource(i,a,o)),e.isArray(n)){for(c=0;c"}else""+g!="[object Object]"&&(f=d=g=(""+g).replace(r.quote,"""),d.indexOf(_.filter_selectSourceSeparator)>=0&&(f=(u=d.split(_.filter_selectSourceSeparator))[0],d=u[1]),w+=""!==g?"":"");n=[]}h=(m.$filters?m.$filters:m.$table.children("thead")).find("."+l.filter),_.filter_$externalFilters&&(h=h&&h.length?h.add(_.filter_$externalFilters):_.filter_$externalFilters),(p=h.filter('select[data-column="'+a+'"]')).length&&(p[s?"html":"append"](w),e.isArray(n)||p.append(n).val(F),p.val(F))}},buildDefault:function(e,r){var l,a,n,s=e.config,o=s.widgetOptions,c=s.columns;for(l=0;l1&&(c=c.slice(1)),s===u.columns&&(c=(f=c.filter(h.filter_anyColumnSelector)).length?f:c),c.val(a[s]).trigger("change"+u.namespace)):(d[s]=c.val()||"",s===u.columns?c.slice(1).filter('[data-column*="'+c.attr("data-column")+'"]').val(d[s]):c.slice(1).val(d[s])),s===u.columns&&c.length&&(h.filter_$anyMatch=c));return d},i.setFilters=function(r,l,a,n){var s=r?e(r)[0].config:"",o=i.getFilters(r,!0,l,n);return void 0===a&&(a=!0),s&&a&&(s.lastCombinedFilter=null,s.lastSearch=[],t.searching(s.table,l,n),s.$table.triggerHandler("filterFomatterUpdate")),0!==o.length}}(jQuery); \ No newline at end of file diff --git a/dist/js/widgets/widget-formatter.min.js b/dist/js/widgets/widget-formatter.min.js index 7ab9593a..ebb74b5f 100644 --- a/dist/js/widgets/widget-formatter.min.js +++ b/dist/js/widgets/widget-formatter.min.js @@ -1,2 +1,2 @@ /*! Widget: formatter - 2/9/2015 (v2.19.1) */ -!function(a){"use strict";var b=a.tablesorter;b.formatter={init:function(a){var c=a.widgetOptions.formatter_event+" pagerComplete updateComplete ".split(" ").join(".tsformatter ");a.$table.off(c.replace(/\s+/g," ")).on(c,function(){b.formatter.setup(a)}),b.formatter.setup(a)},setup:function(c){if(!a.isEmptyObject(c.cache)){var d,e,f,g,h,i,j,k=c.widgetOptions,l={config:c,wo:k},m=[],n=[];for(j=0;j1&&""!==d?(f=g?Math.floor(parseFloat(d)/e)*e:Math.ceil(parseFloat(d)/e)*e,f+=" - "+(f+(e-1)*(g?1:-1))):f=parseFloat(d)||d,f},separator:function(b,c,d,e){var f=(d+"").split(b.widgetOptions.group_separator);return a.trim(f[e-1]||"")},text:function(a,b,c){return c},word:function(a,b,c,d){return((c+" ").match(/\w+/g)||[])[d-1]||""},letter:function(a,b,c,d){return c?(c+" ").substring(0,d):""},date:function(a,b,d,e,f){var g,h,i=a.widgetOptions,j=new Date(d||"");return j instanceof Date&&isFinite(j)?(g=j.getFullYear(),h=c.findMonth(i,j.getMonth()),"year"===e?g:"month"===e?h:"monthyear"===e?h+" "+g:"day"===e?h+" "+j.getDate():"week"===e?c.findWeek(i,j.getDay()):"time"===e?c.findTime(i,j):"hour"===e?c.findTime(i,j,"hour"):i.group_dateString(j,a,b)):i.group_dateInvalid}},findMonth:function(a,b){return a.group_months[b+(""===(a.group_months[0]||"")?1:0)]},findWeek:function(b,c){if(a.isArray(b.group_week))return b.group_week[c];if(!a.isEmptyObject(b.group_week)){var d=["sun","mon","tue","wed","thu","fri","sat"];return b.group_week[d[c]]}},findTime:function(a,b,c){var d,e=a.group_time.am&&a.group_time.pm,f=b.getHours(),g=f>=12?1:0,h=a.group_time24Hour&&f>12?f-12:a.group_time24Hour&&0===f?f+12:f,i=("00"+h).slice(-2),j=("00"+b.getMinutes()).slice(-2);return d=a.group_time[e?["am","pm"][g]:g],"hour"===c?i:i+":"+j+(a.group_time24Hour?"":" "+(d||""))},update:function(b){if(!a.isEmptyObject(b.config.cache)){var d=b.config,e=d.widgetOptions,f=void 0!==d.sortList[0],g={},h=a.isArray(e.group_forceColumn)&&void 0!==e.group_forceColumn[0]?e.group_enforceSort&&!f?-1:e.group_forceColumn[0]:f?d.sortList[0][0]:-1;d.$table.find("tr.group-hidden").removeClass("group-hidden").end().find("tr.group-header").remove(),e.group_collapsible&&d.$table.data("pagerSavedHeight",0),h>=0&&h-1,j.toggleClass("collapsed",f),i.toggleClass("group-hidden",f)):c.group_collapsed&&c.group_collapsible&&(j.addClass("collapsed"),i.addClass("group-hidden"))},groupHeaderHTML:function(a,b,c){var d=(c.currentGroup||"").toString().replace(//g,">");return''+(b.group_collapsible?"":"")+''+d+''},saveCurrentGrouping:function(a,c,d){var e,f,g=!1;return c.group_collapsible&&c.group_saveGroups&&(c.group_collapsedGroups=b.storage&&b.storage(a.table,"tablesorter-groups")||{},f="dir"+a.sortList[0][1],e=c.group_collapsedGroup=""+a.sortList[0][0]+f+d.grouping.join(""),c.group_collapsedGroups[e]?g=!0:c.group_collapsedGroups[e]=[]),g},findColumnGroups:function(a,d,e){var f,g,h,i,j=b.hasWidget(a.table,"pager"),k=a.pager||{};for(e.groupIndex=0,f=0;f-1&&f.group_collapsedGroups[f.group_collapsedGroup].splice(h,1),b.storage(d,"tablesorter-groups",f.group_collapsedGroups))}})),a(f.group_saveReset).on("click",function(){c.clearSavedGroups(d)}),e.$table.on("pagerChange.tsgrouping",function(){c.update(d)})},clearSavedGroups:function(a){a&&b.storage&&(b.storage(a,"tablesorter-groups",""),c.update(a))}};b.addWidget({id:"group",priority:100,options:{group_collapsible:!0,group_collapsed:!1,group_saveGroups:!0,group_saveReset:null,group_count:" ({num})",group_separator:"-",group_formatter:null,group_callback:null,group_complete:"groupingComplete",group_forceColumn:[],group_enforceSort:!0,group_checkbox:["checked","unchecked"],group_months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],group_week:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],group_time:["AM","PM"],group_time24Hour:!1,group_dateInvalid:"Invalid Date",group_dateString:function(a){return a.toLocaleString()}},init:function(a,b,d,e){c.bindEvents(a,d,e)},format:function(a,b,d){c.update(a)},remove:function(a,b,c){b.$table.off("click","tr.group-header").off("pagerChange.tsgrouping").find(".group-hidden").removeClass("group-hidden").end().find("tr.group-header").remove()}})}(jQuery); \ No newline at end of file +!function(r){"use strict";var o=r.tablesorter,e=o.grouping={types:{number:function(r,e,u,p){var t,a=e.hasClass(o.css.sortAsc);return p>1&&""!==u?(t=a?Math.floor(parseFloat(u)/p)*p:Math.ceil(parseFloat(u)/p)*p,t+=" - "+(t+(p-1)*(a?1:-1))):t=parseFloat(u)||u,t},separator:function(o,e,u,p){var t=(u+"").split(o.widgetOptions.group_separator);return r.trim(t[p-1]||"")},text:function(r,o,e){return e},word:function(r,o,e,u){return((e+" ").match(/\w+/g)||[])[u-1]||""},letter:function(r,o,e,u){return e?(e+" ").substring(0,u):""},date:function(r,o,u,p,t){var a,n,s=r.widgetOptions,g=new Date(u||"");return g instanceof Date&&isFinite(g)?(a=g.getFullYear(),n=e.findMonth(s,g.getMonth()),"year"===p?a:"month"===p?n:"monthyear"===p?n+" "+a:"day"===p?n+" "+g.getDate():"week"===p?e.findWeek(s,g.getDay()):"time"===p?e.findTime(s,g):"hour"===p?e.findTime(s,g,"hour"):s.group_dateString(g,r,o)):s.group_dateInvalid}},findMonth:function(r,o){return r.group_months[o+(""===(r.group_months[0]||"")?1:0)]},findWeek:function(o,e){if(r.isArray(o.group_week))return o.group_week[e];if(!r.isEmptyObject(o.group_week)){var u=["sun","mon","tue","wed","thu","fri","sat"];return o.group_week[u[e]]}},findTime:function(r,o,e){var u,p=r.group_time.am&&r.group_time.pm,t=o.getHours(),a=t>=12?1:0,n=("00"+(r.group_time24Hour&&t>12?t-12:r.group_time24Hour&&0===t?t+12:t)).slice(-2),s=("00"+o.getMinutes()).slice(-2);return u=r.group_time[p?["am","pm"][a]:a],"hour"===e?n:n+":"+s+(r.group_time24Hour?"":" "+(u||""))},update:function(o){if(!r.isEmptyObject(o.config.cache)){var u=o.config,p=u.widgetOptions,t=void 0!==u.sortList[0],a={},n=r.isArray(p.group_forceColumn)&&void 0!==p.group_forceColumn[0]?p.group_enforceSort&&!t?-1:p.group_forceColumn[0]:t?u.sortList[0][0]:-1;u.$table.find("tr.group-hidden").removeClass("group-hidden").end().find("tr.group-header").remove(),p.group_collapsible&&u.$table.data("pagerSavedHeight",0),n>=0&&n-1,g.toggleClass("collapsed",t),s.toggleClass("group-hidden",t)):e.group_collapsed&&e.group_collapsible&&(g.addClass("collapsed"),s.addClass("group-hidden"))},groupHeaderHTML:function(r,o,e){var u=(e.currentGroup||"").toString().replace(//g,">");return''+(o.group_collapsible?"":"")+''+u+''},saveCurrentGrouping:function(r,e,u){var p,t,a=!1;return e.group_collapsible&&e.group_saveGroups&&(e.group_collapsedGroups=o.storage&&o.storage(r.table,"tablesorter-groups")||{},t="dir"+r.sortList[0][1],p=e.group_collapsedGroup=""+r.sortList[0][0]+t+u.grouping.join(""),e.group_collapsedGroups[p]?a=!0:e.group_collapsedGroups[p]=[]),a},findColumnGroups:function(r,u,p){var t,a,n,s,g=o.hasWidget(r.table,"pager"),l=r.pager||{};for(p.groupIndex=0,t=0;t-1&&t.group_collapsedGroups[t.group_collapsedGroup].splice(n,1),o.storage(u,"tablesorter-groups",t.group_collapsedGroups))}})),r(t.group_saveReset).on("click",function(){e.clearSavedGroups(u)}),p.$table.on("pagerChange.tsgrouping",function(){e.update(u)})},clearSavedGroups:function(r){r&&o.storage&&(o.storage(r,"tablesorter-groups",""),e.update(r))}};o.addWidget({id:"group",priority:100,options:{group_collapsible:!0,group_collapsed:!1,group_saveGroups:!0,group_saveReset:null,group_count:" ({num})",group_separator:"-",group_formatter:null,group_callback:null,group_complete:"groupingComplete",group_forceColumn:[],group_enforceSort:!0,group_checkbox:["checked","unchecked"],group_months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],group_week:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],group_time:["AM","PM"],group_time24Hour:!1,group_dateInvalid:"Invalid Date",group_dateString:function(r){return r.toLocaleString()}},init:function(r,o,u,p){e.bindEvents(r,u,p)},format:function(r,o,u){e.update(r)},remove:function(r,o,e){o.$table.off("click","tr.group-header").off("pagerChange.tsgrouping").find(".group-hidden").removeClass("group-hidden").end().find("tr.group-header").remove()}})}(jQuery); \ No newline at end of file diff --git a/dist/js/widgets/widget-headerTitles.min.js b/dist/js/widgets/widget-headerTitles.min.js index 80a5572b..ac01d8c9 100644 --- a/dist/js/widgets/widget-headerTitles.min.js +++ b/dist/js/widgets/widget-headerTitles.min.js @@ -1,2 +1,2 @@ /*! Widget: headerTitles - updated 11/10/2015 (v2.24.4) */ -!function(a){"use strict";var b=a.tablesorter;b.addWidget({id:"headerTitles",options:{headerTitle_useAria:!1,headerTitle_tooltip:"",headerTitle_cur_text:[" sort: A - Z"," sort: Z - A","ly unsorted"],headerTitle_cur_numeric:[" sort: 0 - 9"," sort: 9 - 0","ly unsorted"],headerTitle_nxt_text:[" sort: A - Z"," sort: Z - A","remove sort"],headerTitle_nxt_numeric:[" sort: 0 - 9"," sort: 9 - 0","remove sort"],headerTitle_output_sorted:"current{current}; activate to {next}",headerTitle_output_unsorted:"current{current}; activate to {next} ",headerTitle_output_nosort:"No sort available",headerTitle_type:[],headerTitle_callback:null},init:function(b,c,d,e){d.$table.on("refreshHeaderTitle",function(){c.format(b,d,e)}),a.isArray(e.headerTitle_tooltip)?d.$headers.each(function(){a(this).addClass(e.headerTitle_tooltip[this.column]||"")}):""!==e.headerTitle_tooltip&&d.$headers.addClass(e.headerTitle_tooltip)},format:function(c,d,e){var f;d.$headers.each(function(){var c=a(this),g=parseInt(c.attr("data-column"),10),h=e.headerTitle_type[g]||d.parsers[g].type||"text",i=c.hasClass(b.css.sortAsc)?0:c.hasClass(b.css.sortDesc)?1:2,j=d.sortVars[g].order[(d.sortVars[g].count+1)%(d.sortReset?3:2)];e.headerTitle_useAria?f=c.attr("aria-label")||e.headerTitle_output_nosort||"":(f=(e.headerTitle_prefix||"")+(c.hasClass("sorter-false")?e.headerTitle_output_nosort:b.isValueInArray(g,d.sortList)>=0?e.headerTitle_output_sorted:e.headerTitle_output_unsorted),f=f.replace(/\{(current|next|name)\}/gi,function(a){return{"{name}":c.text(),"{current}":e["headerTitle_cur_"+h][i]||"","{next}":e["headerTitle_nxt_"+h][j]||""}[a.toLowerCase()]})),c.attr("title",a.isFunction(e.headerTitle_callback)?e.headerTitle_callback(c,f):f)})},remove:function(b,c,d){c.$headers.attr("title",""),c.$table.off("refreshHeaderTitle"),a.isArray(d.headerTitle_tooltip)?c.$headers.each(function(){a(this).removeClass(d.headerTitle_tooltip[this.column]||"")}):""!==d.headerTitle_tooltip&&c.$headers.removeClass(d.headerTitle_tooltip)}})}(jQuery); \ No newline at end of file +!function(e){"use strict";var t=e.tablesorter;t.addWidget({id:"headerTitles",options:{headerTitle_useAria:!1,headerTitle_tooltip:"",headerTitle_cur_text:[" sort: A - Z"," sort: Z - A","ly unsorted"],headerTitle_cur_numeric:[" sort: 0 - 9"," sort: 9 - 0","ly unsorted"],headerTitle_nxt_text:[" sort: A - Z"," sort: Z - A","remove sort"],headerTitle_nxt_numeric:[" sort: 0 - 9"," sort: 9 - 0","remove sort"],headerTitle_output_sorted:"current{current}; activate to {next}",headerTitle_output_unsorted:"current{current}; activate to {next} ",headerTitle_output_nosort:"No sort available",headerTitle_type:[],headerTitle_callback:null},init:function(t,r,a,o){a.$table.on("refreshHeaderTitle",function(){r.format(t,a,o)}),e.isArray(o.headerTitle_tooltip)?a.$headers.each(function(){e(this).addClass(o.headerTitle_tooltip[this.column]||"")}):""!==o.headerTitle_tooltip&&a.$headers.addClass(o.headerTitle_tooltip)},format:function(r,a,o){var s;a.$headers.each(function(){var r=e(this),i=parseInt(r.attr("data-column"),10),l=o.headerTitle_type[i]||a.parsers[i].type||"text",d=r.hasClass(t.css.sortAsc)?0:r.hasClass(t.css.sortDesc)?1:2,n=a.sortVars[i].order[(a.sortVars[i].count+1)%(a.sortReset?3:2)];o.headerTitle_useAria?s=r.attr("aria-label")||o.headerTitle_output_nosort||"":(s=(o.headerTitle_prefix||"")+(r.hasClass("sorter-false")?o.headerTitle_output_nosort:t.isValueInArray(i,a.sortList)>=0?o.headerTitle_output_sorted:o.headerTitle_output_unsorted),s=s.replace(/\{(current|next|name)\}/gi,function(e){return{"{name}":r.text(),"{current}":o["headerTitle_cur_"+l][d]||"","{next}":o["headerTitle_nxt_"+l][n]||""}[e.toLowerCase()]})),r.attr("title",e.isFunction(o.headerTitle_callback)?o.headerTitle_callback(r,s):s)})},remove:function(t,r,a){r.$headers.attr("title",""),r.$table.off("refreshHeaderTitle"),e.isArray(a.headerTitle_tooltip)?r.$headers.each(function(){e(this).removeClass(a.headerTitle_tooltip[this.column]||"")}):""!==a.headerTitle_tooltip&&r.$headers.removeClass(a.headerTitle_tooltip)}})}(jQuery); \ No newline at end of file diff --git a/dist/js/widgets/widget-lazyload.min.js b/dist/js/widgets/widget-lazyload.min.js index 7e59b355..7085fb22 100644 --- a/dist/js/widgets/widget-lazyload.min.js +++ b/dist/js/widgets/widget-lazyload.min.js @@ -1,5 +1,5 @@ /*! Widget: lazyload (BETA) - 4/1/2016 (v2.25.7) */ -!function(a,b){"use strict";var c=a.tablesorter;c.lazyload={init:function(d,e){"scrollstop"!==e.lazyload_event||c.addScrollStopDone||(c.addScrollStop(),c.addScrollStopDone=!0,a.event.special.scrollstop.latency=e.lazyload_latency||250),c.lazyload.update(d,e);var f=d.namespace+"lazyload ",g=[e.lazyload_update,"pagerUpdate",e.columnSelector_updated||"columnUpdate",""].join(f);d.$table.on(g,function(){c.lazyload.update(d,d.widgetOptions)}).on("filterEnd"+f,function(){a(b).scroll()})},update:function(c,d){var e=(/(\.|#)/.test(d.lazyload_imageClass)?"":".")+d.lazyload_imageClass;c.$table.find(e).lazyload({threshold:d.lazyload_threshold,failure_limit:d.lazyload_failure_limit,event:d.lazyload_event,effect:d.lazyload_effect,container:d.lazyload_container,data_attribute:d.lazyload_data_attribute,skip_invisible:d.lazyload_skip_invisible,appear:d.lazyload_appear,load:d.lazyload_load,placeholder:d.lazyload_placeholder}),setTimeout(function(){a(b).scroll()},1)},remove:function(a,b){a.$table.off(a.namespace+"lazyload")}},c.addWidget({id:"lazyload",options:{lazyload_imageClass:"lazy",lazyload_update:"lazyloadUpdate",lazyload_latency:250,lazyload_threshold:0,lazyload_failure_limit:0,lazyload_event:"scrollstop",lazyload_effect:"show",lazyload_container:b,lazyload_data_attribute:"original",lazyload_skip_invisible:!0,lazyload_appear:null,lazyload_load:null,lazyload_placeholder:"data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="},init:function(a,b,d,e){c.lazyload.init(d,e)},remove:function(a,b,d){c.lazyload.remove(b,d)}}),c.addScrollStop=function(){var b=a.event.dispatch||a.event.handle,c=a.event.special,d="D"+ +new Date,e="D"+(+new Date+1);c.scrollstart={setup:function(e){var f,g=a.extend({latency:c.scrollstop.latency},e),h=function(a){var c=this,d=arguments;f?clearTimeout(f):(a.type="scrollstart",b.apply(c,d)),f=setTimeout(function(){f=null},g.latency)};a(this).bind("scroll",h).data(d,h)},teardown:function(){a(this).unbind("scroll",a(this).data(d))}},c.scrollstop={latency:250,setup:function(d){var f,g=a.extend({latency:c.scrollstop.latency},d),h=function(a){var c=this,d=arguments;f&&clearTimeout(f),f=setTimeout(function(){f=null,a.type="scrollstop",b.apply(c,d)},g.latency)};a(this).bind("scroll",h).data(e,h)},teardown:function(){a(this).unbind("scroll",a(this).data(e))}}}}(jQuery,window),/*! +!function(t,e){"use strict";var o=t.tablesorter;o.lazyload={init:function(l,a){"scrollstop"!==a.lazyload_event||o.addScrollStopDone||(o.addScrollStop(),o.addScrollStopDone=!0,t.event.special.scrollstop.latency=a.lazyload_latency||250),o.lazyload.update(l,a);var i=l.namespace+"lazyload ",n=[a.lazyload_update,"pagerUpdate",a.columnSelector_updated||"columnUpdate",""].join(i);l.$table.on(n,function(){o.lazyload.update(l,l.widgetOptions)}).on("filterEnd"+i,function(){t(e).scroll()})},update:function(o,l){var a=(/(\.|#)/.test(l.lazyload_imageClass)?"":".")+l.lazyload_imageClass;o.$table.find(a).lazyload({threshold:l.lazyload_threshold,failure_limit:l.lazyload_failure_limit,event:l.lazyload_event,effect:l.lazyload_effect,container:l.lazyload_container,data_attribute:l.lazyload_data_attribute,skip_invisible:l.lazyload_skip_invisible,appear:l.lazyload_appear,load:l.lazyload_load,placeholder:l.lazyload_placeholder}),setTimeout(function(){t(e).scroll()},1)},remove:function(t,e){t.$table.off(t.namespace+"lazyload")}},o.addWidget({id:"lazyload",options:{lazyload_imageClass:"lazy",lazyload_update:"lazyloadUpdate",lazyload_latency:250,lazyload_threshold:0,lazyload_failure_limit:0,lazyload_event:"scrollstop",lazyload_effect:"show",lazyload_container:e,lazyload_data_attribute:"original",lazyload_skip_invisible:!0,lazyload_appear:null,lazyload_load:null,lazyload_placeholder:"data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="},init:function(t,e,l,a){o.lazyload.init(l,a)},remove:function(t,e,l){o.lazyload.remove(e,l)}}),o.addScrollStop=function(){var e=t.event.dispatch||t.event.handle,o=t.event.special,l="D"+ +new Date,a="D"+(+new Date+1);o.scrollstart={setup:function(a){var i,n=t.extend({latency:o.scrollstop.latency},a),r=function(t){var o=this,l=arguments;i?clearTimeout(i):(t.type="scrollstart",e.apply(o,l)),i=setTimeout(function(){i=null},n.latency)};t(this).bind("scroll",r).data(l,r)},teardown:function(){t(this).unbind("scroll",t(this).data(l))}},o.scrollstop={latency:250,setup:function(l){var i,n=t.extend({latency:o.scrollstop.latency},l),r=function(t){var o=this,l=arguments;i&&clearTimeout(i),i=setTimeout(function(){i=null,t.type="scrollstop",e.apply(o,l)},n.latency)};t(this).bind("scroll",r).data(a,r)},teardown:function(){t(this).unbind("scroll",t(this).data(a))}}}}(jQuery,window),/*! * Lazy Load - jQuery plugin for lazy loading images * * Copyright (c) 2007-2015 Mika Tuupola @@ -13,7 +13,7 @@ * Version: 1.9.7 * */ -function(a,b,c,d){var e=a(b);a.fn.lazyload=function(d){function f(){var b=0;h.each(function(){var c=a(this);if(!i.skip_invisible||c.is(":visible"))if(a.abovethetop(this,i)||a.leftofbegin(this,i));else if(a.belowthefold(this,i)||a.rightoffold(this,i)){if(++b>i.failure_limit)return!1}else c.trigger("appear"),b=0})}var g,h=this,i={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:b,data_attribute:"original",skip_invisible:!1,appear:null,load:null,placeholder:"data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="};/*! +function(t,e,o,l){var a=t(e);t.fn.lazyload=function(l){function i(){var e=0;r.each(function(){var o=t(this);if(!d.skip_invisible||o.is(":visible"))if(t.abovethetop(this,d)||t.leftofbegin(this,d));else if(t.belowthefold(this,d)||t.rightoffold(this,d)){if(++e>d.failure_limit)return!1}else o.trigger("appear"),e=0})}var n,r=this,d={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:e,data_attribute:"original",skip_invisible:!1,appear:null,load:null,placeholder:"data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="};/*! * Lazy Load - jQuery plugin for lazy loading images * * Copyright (c) 2007-2015 Mika Tuupola @@ -27,4 +27,4 @@ function(a,b,c,d){var e=a(b);a.fn.lazyload=function(d){function f(){var b=0;h.ea * Version: 1.9.7 * */ -return d&&(void 0!==d.failurelimit&&(d.failure_limit=d.failurelimit,delete d.failurelimit),void 0!==d.effectspeed&&(d.effect_speed=d.effectspeed,delete d.effectspeed),a.extend(i,d)),g=void 0===i.container||i.container===b?e:a(i.container),0===i.event.indexOf("scroll")&&g.bind(i.event,function(){return f()}),this.each(function(){var b=this,c=a(b);b.loaded=!1,void 0!==c.attr("src")&&!1!==c.attr("src")||c.is("img")&&c.attr("src",i.placeholder),c.one("appear",function(){if(!this.loaded){if(i.appear){var d=h.length;i.appear.call(b,d,i)}a("").bind("load",function(){var d=c.attr("data-"+i.data_attribute);c.hide(),c.is("img")?c.attr("src",d):c.css("background-image","url('"+d+"')"),c[i.effect](i.effect_speed),b.loaded=!0;var e=a.grep(h,function(a){return!a.loaded});if(h=a(e),i.load){var f=h.length;i.load.call(b,f,i)}}).attr("src",c.attr("data-"+i.data_attribute))}}),0!==i.event.indexOf("scroll")&&c.bind(i.event,function(){b.loaded||c.trigger("appear")})}),e.bind("resize",function(){f()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&e.bind("pageshow",function(b){b.originalEvent&&b.originalEvent.persisted&&h.each(function(){a(this).trigger("appear")})}),a(c).ready(function(){f()}),this},a.belowthefold=function(c,d){return(void 0===d.container||d.container===b?(b.innerHeight?b.innerHeight:e.height())+e.scrollTop():a(d.container).offset().top+a(d.container).height())<=a(c).offset().top-d.threshold},a.rightoffold=function(c,d){return(void 0===d.container||d.container===b?e.width()+e.scrollLeft():a(d.container).offset().left+a(d.container).width())<=a(c).offset().left-d.threshold},a.abovethetop=function(c,d){return(void 0===d.container||d.container===b?e.scrollTop():a(d.container).offset().top)>=a(c).offset().top+d.threshold+a(c).height()},a.leftofbegin=function(c,d){return(void 0===d.container||d.container===b?e.scrollLeft():a(d.container).offset().left)>=a(c).offset().left+d.threshold+a(c).width()},a.inviewport=function(b,c){return!(a.rightoffold(b,c)||a.leftofbegin(b,c)||a.belowthefold(b,c)||a.abovethetop(b,c))},a.extend(a.expr[":"],{"below-the-fold":function(b){return a.belowthefold(b,{threshold:0})},"above-the-top":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-screen":function(b){return a.rightoffold(b,{threshold:0})},"left-of-screen":function(b){return!a.rightoffold(b,{threshold:0})},"in-viewport":function(b){return a.inviewport(b,{threshold:0})},"above-the-fold":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-fold":function(b){return a.rightoffold(b,{threshold:0})},"left-of-fold":function(b){return!a.rightoffold(b,{threshold:0})}})}(jQuery,window,document); \ No newline at end of file +return l&&(void 0!==l.failurelimit&&(l.failure_limit=l.failurelimit,delete l.failurelimit),void 0!==l.effectspeed&&(l.effect_speed=l.effectspeed,delete l.effectspeed),t.extend(d,l)),n=void 0===d.container||d.container===e?a:t(d.container),0===d.event.indexOf("scroll")&&n.bind(d.event,function(){return i()}),this.each(function(){var e=this,o=t(e);e.loaded=!1,void 0!==o.attr("src")&&!1!==o.attr("src")||o.is("img")&&o.attr("src",d.placeholder),o.one("appear",function(){if(!this.loaded){if(d.appear){var l=r.length;d.appear.call(e,l,d)}t("").bind("load",function(){var l=o.attr("data-"+d.data_attribute);o.hide(),o.is("img")?o.attr("src",l):o.css("background-image","url('"+l+"')"),o[d.effect](d.effect_speed),e.loaded=!0;var a=t.grep(r,function(t){return!t.loaded});if(r=t(a),d.load){var i=r.length;d.load.call(e,i,d)}}).attr("src",o.attr("data-"+d.data_attribute))}}),0!==d.event.indexOf("scroll")&&o.bind(d.event,function(){e.loaded||o.trigger("appear")})}),a.bind("resize",function(){i()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&a.bind("pageshow",function(e){e.originalEvent&&e.originalEvent.persisted&&r.each(function(){t(this).trigger("appear")})}),t(o).ready(function(){i()}),this},t.belowthefold=function(o,l){return(void 0===l.container||l.container===e?(e.innerHeight?e.innerHeight:a.height())+a.scrollTop():t(l.container).offset().top+t(l.container).height())<=t(o).offset().top-l.threshold},t.rightoffold=function(o,l){return(void 0===l.container||l.container===e?a.width()+a.scrollLeft():t(l.container).offset().left+t(l.container).width())<=t(o).offset().left-l.threshold},t.abovethetop=function(o,l){return(void 0===l.container||l.container===e?a.scrollTop():t(l.container).offset().top)>=t(o).offset().top+l.threshold+t(o).height()},t.leftofbegin=function(o,l){return(void 0===l.container||l.container===e?a.scrollLeft():t(l.container).offset().left)>=t(o).offset().left+l.threshold+t(o).width()},t.inviewport=function(e,o){return!(t.rightoffold(e,o)||t.leftofbegin(e,o)||t.belowthefold(e,o)||t.abovethetop(e,o))},t.extend(t.expr[":"],{"below-the-fold":function(e){return t.belowthefold(e,{threshold:0})},"above-the-top":function(e){return!t.belowthefold(e,{threshold:0})},"right-of-screen":function(e){return t.rightoffold(e,{threshold:0})},"left-of-screen":function(e){return!t.rightoffold(e,{threshold:0})},"in-viewport":function(e){return t.inviewport(e,{threshold:0})},"above-the-fold":function(e){return!t.belowthefold(e,{threshold:0})},"right-of-fold":function(e){return t.rightoffold(e,{threshold:0})},"left-of-fold":function(e){return!t.rightoffold(e,{threshold:0})}})}(jQuery,window,document); \ No newline at end of file diff --git a/dist/js/widgets/widget-mark.min.js b/dist/js/widgets/widget-mark.min.js index 6472d273..2e76ea46 100644 --- a/dist/js/widgets/widget-mark.min.js +++ b/dist/js/widgets/widget-mark.min.js @@ -1,2 +1,2 @@ /*! Widget: mark.js - updated 9/23/2016 (v2.27.7) */ -!function(a){"use strict";var b=a.tablesorter;b.mark={init:function(c){if("function"==typeof a.fn.mark){var d,e=c.widgetOptions.mark_tsUpdate;c.$table.on("filterEnd.tsmark pagerComplete.tsmark"+(e?" "+e:""),function(a,d){b.mark.update(c,a.type===e?d:"")}),d="(?:<|=|>|\\||\"|\\'|\\s+(?:&&|-|"+(b.language.and||"and")+"|"+(b.language.or||"or")+"|"+(b.language.to||"to")+")\\s+)",b.mark.regex.filter=new RegExp(d,"gim")}else console.warn('Widget-mark not initialized: missing "jquery.mark.js"')},regex:{mark:/^mark_(.+)$/,pure:/^\/((?:\\\/|[^\/])+)\/([mig]{0,3})?$/},checkRegex:function(a){if(a instanceof RegExp){var b="".match(a);return null===b||b.length<5}return!1},cleanMatches:function(a){for(var b=[],c=a&&a.length||0;c--;)""!==a[c]&&(b[b.length]=a[c]);return b},ignoreColumns:function(b){for(var c=b.widgetOptions,d=b.columns,e=[];d--;)(c.mark_tsIgnore[d]||a(b.$headerIndexed[d]).hasClass("mark-ignore"))&&(e[e.length]=":nth-child("+(d+1)+")");return e.length?":not("+e.join(",")+")":""},update:function(c,d){var e={},f=c.widgetOptions,g=b.mark.regex,h=c.$table.find("tbody tr").unmark().not("."+(c.widgetOptions.filter_filteredRow||"filtered"));d=d||a.tablesorter.getFilters(c.$table),a.each(c.widgetOptions,function(a,b){var c=a.match(g.mark);c&&void 0!==c[1]&&(e[c[1]]=b)}),a.each(d,function(d,i){if(i&&!a(c.$headerIndexed[d]).hasClass("mark-ignore")&&!f.mark_tsIgnore[d]){var j=null,k=i,l=!1,m=d===c.columns?b.mark.ignoreColumns(c):":nth-child("+(d+1)+")";if(g.pure.test(i)){k=g.pure.exec(i),".*"===k[1]&&(k[1]="");try{j=new RegExp(k[1],"gim"),k=new RegExp(k[1],k[2])}catch(a){k=null}return void(b.mark.checkRegex(j)&&h.children(m).markRegExp(k,e))}0===i.indexOf("~")?(l=!0,k=i.replace(/~/g,"").split("")):(i.indexOf("?")>-1&&(l=!0,i=i.replace(/\?/g,"\\S{1}")),i.indexOf("*")>-1&&(l=!0,i=i.replace(/\*/g,"\\S*")),k=i.split(g.filter)),l&&k&&k.length?(k=new RegExp(b.mark.cleanMatches(k).join(".*"),"gm"),b.mark.checkRegex(k)&&h.children(m).markRegExp(k,e)):h.children(m).mark(b.mark.cleanMatches(k),e)}})}},b.addWidget({id:"mark",options:{mark_tsUpdate:"markUpdate",mark_tsIgnore:{}},init:function(a,c,d,e){b.mark.init(d,e)},remove:function(a,b){var c=b.widgetOptions.mark_tsUpdate;b.$table.off("filterEnd.tsmark pagerComplete.tsmark"+(c?" "+c:""))}})}(jQuery); \ No newline at end of file +!function(e){"use strict";var t=e.tablesorter;t.mark={init:function(r){if("function"==typeof e.fn.mark){var n,a=r.widgetOptions.mark_tsUpdate;r.$table.on("filterEnd.tsmark pagerComplete.tsmark"+(a?" "+a:""),function(e,n){t.mark.update(r,e.type===a?n:"")}),n="(?:<|=|>|\\||\"|\\'|\\s+(?:&&|-|"+(t.language.and||"and")+"|"+(t.language.or||"or")+"|"+(t.language.to||"to")+")\\s+)",t.mark.regex.filter=new RegExp(n,"gim")}else console.warn('Widget-mark not initialized: missing "jquery.mark.js"')},regex:{mark:/^mark_(.+)$/,pure:/^\/((?:\\\/|[^\/])+)\/([mig]{0,3})?$/},checkRegex:function(e){if(e instanceof RegExp){var t="".match(e);return null===t||t.length<5}return!1},cleanMatches:function(e){for(var t=[],r=e&&e.length||0;r--;)""!==e[r]&&(t[t.length]=e[r]);return t},ignoreColumns:function(t){for(var r=t.widgetOptions,n=t.columns,a=[];n--;)(r.mark_tsIgnore[n]||e(t.$headerIndexed[n]).hasClass("mark-ignore"))&&(a[a.length]=":nth-child("+(n+1)+")");return a.length?":not("+a.join(",")+")":""},update:function(r,n){var a={},i=r.widgetOptions,o=t.mark.regex,l=r.$table.find("tbody tr").unmark().not("."+(r.widgetOptions.filter_filteredRow||"filtered"));n=n||e.tablesorter.getFilters(r.$table),e.each(r.widgetOptions,function(e,t){var r=e.match(o.mark);r&&void 0!==r[1]&&(a[r[1]]=t)}),e.each(n,function(n,g){if(g&&!e(r.$headerIndexed[n]).hasClass("mark-ignore")&&!i.mark_tsIgnore[n]){var m=null,s=g,c=!1,d=n===r.columns?t.mark.ignoreColumns(r):":nth-child("+(n+1)+")";if(o.pure.test(g)){".*"===(s=o.pure.exec(g))[1]&&(s[1]="");try{m=new RegExp(s[1],"gim"),s=new RegExp(s[1],s[2])}catch(e){s=null}return void(t.mark.checkRegex(m)&&l.children(d).markRegExp(s,a))}0===g.indexOf("~")?(c=!0,s=g.replace(/~/g,"").split("")):(g.indexOf("?")>-1&&(c=!0,g=g.replace(/\?/g,"\\S{1}")),g.indexOf("*")>-1&&(c=!0,g=g.replace(/\*/g,"\\S*")),s=g.split(o.filter)),c&&s&&s.length?(s=new RegExp(t.mark.cleanMatches(s).join(".*"),"gm"),t.mark.checkRegex(s)&&l.children(d).markRegExp(s,a)):l.children(d).mark(t.mark.cleanMatches(s),a)}})}},t.addWidget({id:"mark",options:{mark_tsUpdate:"markUpdate",mark_tsIgnore:{}},init:function(e,r,n,a){t.mark.init(n,a)},remove:function(e,t){var r=t.widgetOptions.mark_tsUpdate;t.$table.off("filterEnd.tsmark pagerComplete.tsmark"+(r?" "+r:""))}})}(jQuery); \ No newline at end of file diff --git a/dist/js/widgets/widget-math.min.js b/dist/js/widgets/widget-math.min.js index 83d03bcb..807a3dd6 100644 --- a/dist/js/widgets/widget-math.min.js +++ b/dist/js/widgets/widget-math.min.js @@ -1,2 +1,2 @@ /*! Widget: math - updated 5/3/2017 (v2.28.9) */ -!function(a){"use strict";var b=a.tablesorter,c={error:{0:"Infinity result: Divide by zero",1:"Need more than one element to make this calculation",undef:"No elements found"},invalid:function(a,b,d){return console.warn(b,c.error[d]),a&&a.widgetOptions.math_none||""},events:"tablesorter-initialized update updateAll updateRows addRows updateCell filterReset ".split(" ").join(".tsmath "),processText:function(d,e){var f,g=b.getElementText(d,e,c.getCellIndex(e)),h=d.widgetOptions.math_prefix;return/"+h+"
").text().replace(/\{content\}/g,"").trim(),g=g.replace(f,"")),g=b.formatFloat(g.replace(/[^\w,. \-()]/g,""),d.table)||0,isNaN(g)?0:g},getRow:function(b,d,e){var f,g=b.widgetOptions,h=[],i=d.closest("tr"),j=i.hasClass(g.filter_filteredRow||"filtered");return e&&(i=i.filter(e)),!e&&j||(f=i.children().not("["+g.math_dataAttrib+"=ignore]"),g.math_ignore.length&&(f=f.filter(function(){return-1===a.inArray(c.getCellIndex(a(this)),g.math_ignore)})),h=f.not(d).map(function(){return c.processText(b,a(this))}).get()),h},getColumn:function(b,d,e,f){var g,h,i,j,k,l,m=b.widgetOptions,n=[],o=d.closest("tr"),p=m.math_dataAttrib,q="["+p+"=ignore]",r=m.filter_filteredRow||"filtered",s=c.getCellIndex(d),t=b.$table.children("tbody").children(),u=["["+p+"^=above]","["+p+"^=below]","["+p+"^=col]","["+p+"^=all]"];if("above"===e)for(j=t.index(o),g=j;g>=0;)i=t.eq(g),l=i.children().filter(u[0]).length,f&&(i=i.filter(f)),h=i.children().filter(function(){return c.getCellIndex(a(this))===s}),((f||!i.hasClass(r))&&i.not(q).length&&g!==j||l&&g!==j)&&(l?g=0:h.length&&(n[n.length]=c.processText(b,h))),g--;else if("below"===e)for(j=t.length,g=t.index(o)+1;g0;if(e>1?(e--,f=!0):e<1&&(e=1),d.children("[rowspan]").length>0)for(b=this.cells,c=0;c0?a.substring(0,v):"",x=w;if(c&&(x=/\{content\}/.test(c||"")?(c||"").replace(/\{content\}/g,w||""):(c||"")+w),s=a.split("").reverse().join(""),r=s.search(/[0-9\-\+#]/),q=u-r,q+="."===a.substring(q,q+1)?1:0,w=r>0?a.substring(q,u):"",t=w,d&&(t=/\{content\}/.test(d||"")?(d||"").replace(/\{content\}/g,w||""):w+(d||"")),a=a.substring(v,q),b="-"==a.charAt(0)?-b:+b,e=b<0?b=-b:0,f=a.match(/[^\d\-\+#]/g),g=f&&f[f.length-1]||".",h=f&&f[1]&&f[0]||",",a=a.split(g),b=b.toFixed(a[1]&&a[1].length),b=+b+"",j=a[1]&&a[1].lastIndexOf("0"),l=b.split("."),(!l[1]||l[1]&&l[1].length<=j)&&(b=(+b).toFixed(j+1)),m=a[0].split(h),a[0]=m.join(""),(i=a[0]&&a[0].indexOf("0"))>-1)for(;l[0].length1?(a.sort(function(a,b){return a-b}),d=Math.floor(e/2),e%2?a[d]:(a[d-1]+a[d])/2):c.invalid(b,"median",1)},mode:function(a){var b,c,d,e={},f=1,g=[a[0]];for(b=0;bf?(g=[c],f=d):d===f&&(g[g.length]=c,f=d);return g.sort(function(a,b){return a-b})},max:function(a){return Math.max.apply(Math,a)},min:function(a){return Math.min.apply(Math,a)},range:function(a){var b=a.sort(function(a,b){return a-b});return b[a.length-1]-b[0]},variance:function(a,d,e){for(var f,g=b.equations.mean(a),h=0,i=a.length;i--;)h+=Math.pow(a[i]-g,2);return 0===(f=a.length-(d?0:1))?c.invalid(e,"variance",0):h/=f},varp:function(a,c){return b.equations.variance(a,!0,c)},vars:function(a,c){return b.equations.variance(a,!1,c)},stdevs:function(a,c){var d=b.equations.variance(a,!1,c);return Math.sqrt(d)},stdevp:function(a,c){var d=b.equations.variance(a,!0,c);return Math.sqrt(d)}},b.addWidget({id:"math",priority:100,options:{math_data:"math",math_debug:!1,math_ignore:[],math_mask:"#,##0.00",math_complete:null,math_completed:function(a){},math_priority:["row","above","below","col"],math_prefix:"",math_suffix:"",math_none:"N/A",math_event:"recalculate",math_rowFilter:""},init:function(a,d,e,f){var g=(b.hasWidget(a,"filter")?"filterEnd":"updateComplete")+".tsmath";c.events+=(b.hasWidget(a,"pager")?"pagerComplete":"filterEnd")+".tsmath ",e.$table.off((c.events+"updateComplete.tsmath "+f.math_event).replace(/\s+/g," ")).on(c.events+f.math_event,function(a){if(this.hasInitialized){var b="tablesorter-initialized"===a.type;f.math_isUpdating&&!b||(/filter/.test(a.type)||b||c.setColumnIndexes(e),c.recalculate(e,f,b))}}).on(g,function(){setTimeout(function(){c.updateComplete(e)},40)}),f.math_isUpdating=!1,a.hasInitialized&&c.recalculate(e,f,!0)},remove:function(a,b,d,e){e||b.$table.off((c.events+" updateComplete.tsmath "+d.math_event).replace(/\s+/g," ")).children().children("tr").children("[data-"+d.math_data+"]").empty()}})}(jQuery); \ No newline at end of file +!function(t){"use strict";var e=t.tablesorter,n={error:{0:"Infinity result: Divide by zero",1:"Need more than one element to make this calculation",undef:"No elements found"},invalid:function(t,e,a){return console.warn(e,n.error[a]),t&&t.widgetOptions.math_none||""},events:"tablesorter-initialized update updateAll updateRows addRows updateCell filterReset ".split(" ").join(".tsmath "),processText:function(a,r){var i,l=e.getElementText(a,r,n.getCellIndex(r)),o=a.widgetOptions.math_prefix;return/"+o+"
").text().replace(/\{content\}/g,"").trim(),l=l.replace(i,"")),l=e.formatFloat(l.replace(/[^\w,. \-()]/g,""),a.table)||0,isNaN(l)?0:l},getRow:function(e,a,r){var i,l=e.widgetOptions,o=[],h=a.closest("tr"),s=h.hasClass(l.filter_filteredRow||"filtered");return r&&(h=h.filter(r)),!r&&s||(i=h.children().not("["+l.math_dataAttrib+"=ignore]"),l.math_ignore.length&&(i=i.filter(function(){return-1===t.inArray(n.getCellIndex(t(this)),l.math_ignore)})),o=i.not(a).map(function(){return n.processText(e,t(this))}).get()),o},getColumn:function(e,a,r,i){var l,o,h,s,d,u,c=e.widgetOptions,g=[],f=a.closest("tr"),m=c.math_dataAttrib,p="["+m+"=ignore]",_=c.filter_filteredRow||"filtered",b=n.getCellIndex(a),v=e.$table.children("tbody").children(),x=["["+m+"^=above]","["+m+"^=below]","["+m+"^=col]","["+m+"^=all]"];if("above"===r)for(l=s=v.index(f);l>=0;)u=(h=v.eq(l)).children().filter(x[0]).length,i&&(h=h.filter(i)),o=h.children().filter(function(){return n.getCellIndex(t(this))===b}),((i||!h.hasClass(_))&&h.not(p).length&&l!==s||u&&l!==s)&&(u?l=0:o.length&&(g[g.length]=n.processText(e,o))),l--;else if("below"===r)for(s=v.length,l=v.index(f)+1;l0;if(a>1?(a--,i=!0):a<1&&(a=1),r.children("[rowspan]").length>0)for(e=this.cells,n=0;n0?t.substring(0,w):"",y=C;if(n&&(y=/\{content\}/.test(n||"")?(n||"").replace(/\{content\}/g,C||""):(n||"")+C),b=t.split("").reverse().join(""),_=b.search(/[0-9\-\+#]/),p=x-_,p+="."===t.substring(p,p+1)?1:0,C=_>0?t.substring(p,x):"",v=C,a&&(v=/\{content\}/.test(a||"")?(a||"").replace(/\{content\}/g,C||""):C+(a||"")),t=t.substring(w,p),e="-"==t.charAt(0)?-e:+e,r=e<0?e=-e:0,i=t.match(/[^\d\-\+#]/g),l=i&&i[i.length-1]||".",o=i&&i[1]&&i[0]||",",t=t.split(l),e=e.toFixed(t[1]&&t[1].length),e=+e+"",s=t[1]&&t[1].lastIndexOf("0"),(!(u=e.split("."))[1]||u[1]&&u[1].length<=s)&&(e=(+e).toFixed(s+1)),c=t[0].split(o),t[0]=c.join(""),(h=t[0]&&t[0].indexOf("0"))>-1)for(;u[0].length1?(t.sort(function(t,e){return t-e}),a=Math.floor(r/2),r%2?t[a]:(t[a-1]+t[a])/2):n.invalid(e,"median",1)},mode:function(t){var e,n,a,r={},i=1,l=[t[0]];for(e=0;ei?(l=[n],i=a):a===i&&(l[l.length]=n,i=a);return l.sort(function(t,e){return t-e})},max:function(t){return Math.max.apply(Math,t)},min:function(t){return Math.min.apply(Math,t)},range:function(t){var e=t.sort(function(t,e){return t-e});return e[t.length-1]-e[0]},variance:function(t,a,r){for(var i,l=e.equations.mean(t),o=0,h=t.length;h--;)o+=Math.pow(t[h]-l,2);return 0===(i=t.length-(a?0:1))?n.invalid(r,"variance",0):o/=i},varp:function(t,n){return e.equations.variance(t,!0,n)},vars:function(t,n){return e.equations.variance(t,!1,n)},stdevs:function(t,n){var a=e.equations.variance(t,!1,n);return Math.sqrt(a)},stdevp:function(t,n){var a=e.equations.variance(t,!0,n);return Math.sqrt(a)}},e.addWidget({id:"math",priority:100,options:{math_data:"math",math_debug:!1,math_ignore:[],math_mask:"#,##0.00",math_complete:null,math_completed:function(t){},math_priority:["row","above","below","col"],math_prefix:"",math_suffix:"",math_none:"N/A",math_event:"recalculate",math_rowFilter:""},init:function(t,a,r,i){var l=(e.hasWidget(t,"filter")?"filterEnd":"updateComplete")+".tsmath";n.events+=(e.hasWidget(t,"pager")?"pagerComplete":"filterEnd")+".tsmath ",r.$table.off((n.events+"updateComplete.tsmath "+i.math_event).replace(/\s+/g," ")).on(n.events+i.math_event,function(t){if(this.hasInitialized){var e="tablesorter-initialized"===t.type;i.math_isUpdating&&!e||(/filter/.test(t.type)||e||n.setColumnIndexes(r),n.recalculate(r,i,e))}}).on(l,function(){setTimeout(function(){n.updateComplete(r)},40)}),i.math_isUpdating=!1,t.hasInitialized&&n.recalculate(r,i,!0)},remove:function(t,e,a,r){r||e.$table.off((n.events+" updateComplete.tsmath "+a.math_event).replace(/\s+/g," ")).children().children("tr").children("[data-"+a.math_data+"]").empty()}})}(jQuery); \ No newline at end of file diff --git a/dist/js/widgets/widget-output.min.js b/dist/js/widgets/widget-output.min.js index 9717e2a5..78a56231 100644 --- a/dist/js/widgets/widget-output.min.js +++ b/dist/js/widgets/widget-output.min.js @@ -1,2 +1,2 @@ /*! Widget: output - updated 4/2/2017 (v2.28.6) */ -!function(a){"use strict";var b=a.tablesorter,c=b.output={event:"outputTable",noDblClick:600,lastEvent:0,busy:!1,regexQuote:/([\n\t\x09\x0d\x0a]|<[^<]+>)/,regexBR:/(|\n)/g,regexIMG:/]+alt\s*=\s*['"]([^'"]+)['"][^>]*>/i,regexHTML:/<[^<]+>/g,replaceCR:"\r\n",replaceTab:"\t",popupTitle:"Output",popupStyle:"width:100%;height:100%;margin:0;resize:none;",message:"Your device does not support downloading. Please try again in desktop browser.",init:function(a){a.$table.off(c.event).on(c.event,function(b){b.stopPropagation(),!c.busy&&b.timeStamp-c.lastEvent>c.noDblClick&&(c.lastEvent=b.timeStamp,c.busy=!0,c.process(a,a.widgetOptions))})},processRow:function(d,e,f,g){var h,i,j,k,l,m,n,o,p,q,r=d.widgetOptions,s=[],t=r.output_duplicateSpans,u=f&&g&&r.output_headerRows&&a.isFunction(r.output_callbackJSON),v=0,w=e.length;for(k=0;k-1||!e.output_hiddenColumns&&"none"===d.$headerIndexed[o].css("display")&&!d.$headerIndexed[o].hasClass("tablesorter-scroller-hidden-column");if(g=u.children("thead").children("tr").not("."+(b.css.filterRow||"tablesorter-filter-row")).filter(function(){return e.output_hiddenColumns||"none"!==a(this).css("display")}),i=c.processRow(d,g,!0,q),h=u.children("tbody").children("tr").not(d.selectorRemove),h="function"==typeof t?h.filter(t):/^f/.test(t)?h.not("."+(e.filter_filteredRow||"filtered")):/^v/.test(t)?h.filter(":visible"):/^[.#:\[]/.test(t)?h.filter(t):h,j=c.processRow(d,h),e.output_includeFooter&&(j=j.concat(c.processRow(d,u.children("tfoot").children("tr:visible")))),k=i.length,q){for(p=[],l=j.length,o=0;o1&&e.output_headerRows?o%k:k-1],p.push(c.row2Hash(m,j[o]));f=n?JSON.stringify(p):p}else e.output_includeHeader?(m=[i[k>1&&e.output_headerRows?o%k:k-1]],p=c.row2CSV(e,e.output_headerRows?i:m,r).concat(c.row2CSV(e,j,r))):p=c.row2CSV(e,j,r),f=r&&n?JSON.stringify(p):p.join("\n");if(a.isFunction(e.output_callback)){if(!1===(m=e.output_callback(d,f,d.pager&&d.pager.ajaxObject.url||null)))return;"string"==typeof m&&(f=m)}/p/i.test(e.output_delivery||"")?c.popup(f,e.output_popupStyle,q||r):c.download(d,e,f),c.busy=!1},row2CSV:function(a,b,c){var d,e,f=[],g=b.length;for(e=0;e0&&""!==d&&(f[f.length]=c?b[e]:b[e].join(a.output_separator));return f},row2Hash:function(a,b){var c,d={},e=b.length;for(c=0;c"+c.popupTitle+'"),e.document.close(),e.focus()}catch(f){return e.close(),c.popup(a,b,d)}return!0},download:function(a,b,d){if("function"==typeof b.output_savePlugin)return b.output_savePlugin(a,b,d);var e,f,g,h,i=window.navigator,j=document.createElement("a");if(/(iP)/g.test(i.userAgent))return alert(c.message),!1;try{g=!!new Blob}catch(a){g=!1}return g?(window.URL=window.URL||window.webkitURL,h=/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(b.output_encoding)?["\ufeff",d]:[d],f=new Blob(h,{type:b.output_encoding}),i.msSaveBlob?i.msSaveBlob(f,b.output_saveFileName):(j.href=window.URL.createObjectURL(f),j.download=b.output_saveFileName,document.createEvent&&(e=document.createEvent("MouseEvents"),e.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),j.dispatchEvent(e))),!1):(window.open(b.output_encoding+encodeURIComponent(d)+"?download","_self"),!0)},remove:function(a){a.$table.off(c.event)}};b.addWidget({id:"output",options:{output_separator:",",output_ignoreColumns:[],output_hiddenColumns:!1,output_includeFooter:!1,output_includeHeader:!0,output_headerRows:!1,output_dataAttrib:"data-name",output_delivery:"popup",output_saveRows:"filtered",output_duplicateSpans:!0,output_replaceQuote:"“;",output_includeHTML:!1,output_trimSpaces:!0,output_wrapQuotes:!1,output_popupStyle:"width=500,height=300",output_saveFileName:"mytable.csv",output_formatContent:null,output_callback:function(a,b){return!0},output_callbackJSON:function(a,b,c){return b+"("+c+")"},output_encoding:"data:application/octet-stream;charset=utf8,",output_savePlugin:null},init:function(a,b,d){c.init(d)},remove:function(a,b){c.remove(b)}})}(jQuery); \ No newline at end of file +!function(t){"use strict";var e=t.tablesorter,o=e.output={event:"outputTable",noDblClick:600,lastEvent:0,busy:!1,regexQuote:/([\n\t\x09\x0d\x0a]|<[^<]+>)/,regexBR:/(|\n)/g,regexIMG:/]+alt\s*=\s*['"]([^'"]+)['"][^>]*>/i,regexHTML:/<[^<]+>/g,replaceCR:"\r\n",replaceTab:"\t",popupTitle:"Output",popupStyle:"width:100%;height:100%;margin:0;resize:none;",message:"Your device does not support downloading. Please try again in desktop browser.",init:function(t){t.$table.off(o.event).on(o.event,function(e){e.stopPropagation(),!o.busy&&e.timeStamp-o.lastEvent>o.noDblClick&&(o.lastEvent=e.timeStamp,o.busy=!0,o.process(t,t.widgetOptions))})},processRow:function(u,n,r,a){var p,i,l,s,c,d,f,_,w,g,h=u.widgetOptions,m=[],v=h.output_duplicateSpans,b=r&&a&&h.output_headerRows&&t.isFunction(h.output_callbackJSON),y=0,S=n.length;for(s=0;s-1||!n.output_hiddenColumns&&"none"===u.$headerIndexed[_].css("display")&&!u.$headerIndexed[_].hasClass("tablesorter-scroller-hidden-column");if(a=b.children("thead").children("tr").not("."+(e.css.filterRow||"tablesorter-filter-row")).filter(function(){return n.output_hiddenColumns||"none"!==t(this).css("display")}),i=o.processRow(u,a,!0,g),p=b.children("tbody").children("tr").not(u.selectorRemove),p="function"==typeof v?p.filter(v):/^f/.test(v)?p.not("."+(n.filter_filteredRow||"filtered")):/^v/.test(v)?p.filter(":visible"):/^[.#:\[]/.test(v)?p.filter(v):p,l=o.processRow(u,p),n.output_includeFooter&&(l=l.concat(o.processRow(u,b.children("tfoot").children("tr:visible")))),s=i.length,g){for(w=[],c=l.length,_=0;_1&&n.output_headerRows?_%s:s-1],w.push(o.row2Hash(d,l[_]));r=f?JSON.stringify(w):w}else n.output_includeHeader?(d=[i[s>1&&n.output_headerRows?_%s:s-1]],w=o.row2CSV(n,n.output_headerRows?i:d,h).concat(o.row2CSV(n,l,h))):w=o.row2CSV(n,l,h),r=h&&f?JSON.stringify(w):w.join("\n");if(t.isFunction(n.output_callback)){if(!1===(d=n.output_callback(u,r,u.pager&&u.pager.ajaxObject.url||null)))return;"string"==typeof d&&(r=d)}/p/i.test(n.output_delivery||"")?o.popup(r,n.output_popupStyle,g||h):o.download(u,n,r),o.busy=!1},row2CSV:function(t,e,o){var u,n,r=[],a=e.length;for(n=0;n0&&""!==u&&(r[r.length]=o?e[n]:e[n].join(t.output_separator));return r},row2Hash:function(t,e){var o,u={},n=e.length;for(o=0;o"+o.popupTitle+'"),n.document.close(),n.focus()}catch(r){return n.close(),o.popup(t,e,u)}return!0},download:function(t,e,u){if("function"==typeof e.output_savePlugin)return e.output_savePlugin(t,e,u);var n,r,a,p,i=window.navigator,l=document.createElement("a");if(/(iP)/g.test(i.userAgent))return alert(o.message),!1;try{a=!!new Blob}catch(t){a=!1}return a?(window.URL=window.URL||window.webkitURL,p=/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.output_encoding)?["\ufeff",u]:[u],r=new Blob(p,{type:e.output_encoding}),i.msSaveBlob?i.msSaveBlob(r,e.output_saveFileName):(l.href=window.URL.createObjectURL(r),l.download=e.output_saveFileName,document.createEvent&&((n=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),l.dispatchEvent(n))),!1):(window.open(e.output_encoding+encodeURIComponent(u)+"?download","_self"),!0)},remove:function(t){t.$table.off(o.event)}};e.addWidget({id:"output",options:{output_separator:",",output_ignoreColumns:[],output_hiddenColumns:!1,output_includeFooter:!1,output_includeHeader:!0,output_headerRows:!1,output_dataAttrib:"data-name",output_delivery:"popup",output_saveRows:"filtered",output_duplicateSpans:!0,output_replaceQuote:"“;",output_includeHTML:!1,output_trimSpaces:!0,output_wrapQuotes:!1,output_popupStyle:"width=500,height=300",output_saveFileName:"mytable.csv",output_formatContent:null,output_callback:function(t,e){return!0},output_callbackJSON:function(t,e,o){return e+"("+o+")"},output_encoding:"data:application/octet-stream;charset=utf8,",output_savePlugin:null},init:function(t,e,u){o.init(u)},remove:function(t,e){o.remove(e)}})}(jQuery); \ No newline at end of file diff --git a/dist/js/widgets/widget-pager.min.js b/dist/js/widgets/widget-pager.min.js index 1db491fb..d85b3785 100644 --- a/dist/js/widgets/widget-pager.min.js +++ b/dist/js/widgets/widget-pager.min.js @@ -1,2 +1,2 @@ /*! Widget: Pager - updated 4/18/2017 (v2.28.8) */ -!function(a){"use strict";var b,c=a.tablesorter;c.addWidget({id:"pager",priority:55,options:{pager_output:"{startRow} to {endRow} of {totalRows} rows",pager_updateArrows:!0,pager_startPage:0,pager_pageReset:0,pager_size:10,pager_maxOptionSize:20,pager_savePages:!0,pager_storageKey:"tablesorter-pager",pager_fixedHeight:!1,pager_countChildRows:!1,pager_removeRows:!1,pager_ajaxUrl:null,pager_customAjaxUrl:function(a,b){return b},pager_ajaxError:null,pager_ajaxObject:{dataType:"json"},pager_processAjaxOnInit:!0,pager_ajaxProcessing:function(a){return[0,[],null]},pager_css:{container:"tablesorter-pager",errorRow:"tablesorter-errorRow",disabled:"disabled"},pager_selectors:{container:".pager",first:".first",prev:".prev",next:".next",last:".last",gotoPage:".gotoPage",pageDisplay:".pagedisplay",pageSize:".pagesize"}},init:function(a){b.init(a)},format:function(a,c){if(!c.pager||!c.pager.initialized)return b.initComplete(c);b.moveToPage(c,c.pager,!1)},remove:function(a,c,d,e){b.destroyPager(c,e)}}),b=c.pager={init:function(d){if(!(d.hasInitialized&&d.config.pager&&d.config.pager.initialized)){var e,f=d.config,g=f.widgetOptions,h=g.pager_selectors,i=f.pager=a.extend({totalPages:0,filteredRows:0,filteredPages:0,currentFilters:[],page:g.pager_startPage,startRow:0,endRow:0,ajaxCounter:0,$size:null,last:{},setSize:g.pager_size,setPage:g.pager_startPage},f.pager);i.isInitializing||(i.isInitializing=!0,f.debug&&console.log("Pager: Initializing"),i.size=a.data(d,"pagerLastSize")||g.pager_size,i.$container=a(h.container).addClass(g.pager_css.container).show(),i.totalRows=f.$tbodies.eq(0).children("tr").not(g.pager_countChildRows?"":"."+f.cssChildRow).length,i.oldAjaxSuccess=i.oldAjaxSuccess||g.pager_ajaxObject.success,f.appender=b.appender,i.initializing=!0,g.pager_savePages&&c.storage&&(e=c.storage(d,g.pager_storageKey)||{},i.page=(isNaN(e.page)?i.page:e.page)||i.setPage||0,i.size="all"===e.size?e.size:(isNaN(e.size)?i.size:e.size)||i.setSize||10,b.setPageSize(f,i.size)),i.regexRows=new RegExp("("+(g.filter_filteredRow||"filtered")+"|"+f.selectorRemove.slice(1)+"|"+f.cssChildRow+")"),i.regexFiltered=new RegExp(g.filter_filteredRow||"filtered"),i.initialized=!1,f.$table.triggerHandler("pagerBeforeInitialized",f),b.enablePager(f,!1),i.ajaxObject=g.pager_ajaxObject,i.ajaxObject.url=g.pager_ajaxUrl,"string"==typeof g.pager_ajaxUrl?(i.ajax=!0,g.filter_serversideFiltering=!0,f.serverSideSorting=!0,b.moveToPage(f,i)):(i.ajax=!1,c.appendCache(f,!0)))}},initComplete:function(a){var d=a.pager;b.bindEvents(a),d.ajax||b.hideRowsSetup(a),d.initialized=!0,d.initializing=!1,d.isInitializing=!1,b.setPageSize(a,d.size),a.debug&&console.log("Pager: Triggering pagerInitialized"),a.$table.triggerHandler("pagerInitialized",a),a.widgetOptions.filter_initialized&&c.hasWidget(a.table,"filter")||b.updatePageDisplay(a,!d.ajax)},bindEvents:function(d){var e,f,g,h=d.pager,i=d.widgetOptions,j=d.namespace+"pager",k=i.pager_selectors;d.$table.off(j).on("filterInit filterStart ".split(" ").join(j+" "),function(b,e){h.currentFilters=a.isArray(e)?e:d.$table.data("lastSearch");var f;f=c.filter.equalFilters?c.filter.equalFilters(d,d.lastSearch,h.currentFilters):(d.lastSearch||[]).join("")!==(h.currentFilters||[]).join(""),"filterStart"!==b.type||!1===i.pager_pageReset||f||(h.page=i.pager_pageReset)}).on("filterEnd sortEnd ".split(" ").join(j+" "),function(){h.currentFilters=d.$table.data("lastSearch"),(h.initialized||h.initializing)&&(d.delayInit&&d.rowsCopy&&0===d.rowsCopy.length&&b.updateCache(d),b.updatePageDisplay(d,!1),c.applyWidget(d.table))}).on("disablePager"+j,function(a){a.stopPropagation(),b.showAllRows(d)}).on("enablePager"+j,function(a){a.stopPropagation(),b.enablePager(d,!0)}).on("destroyPager"+j,function(a,b){a.stopPropagation(),c.removeWidget(d.table,"pager",!1)}).on("updateComplete"+j,function(a,e,f){if(a.stopPropagation(),e&&!f&&!h.ajax){var g=d.$tbodies.eq(0).children("tr").not(d.selectorRemove);h.totalRows=g.length-(i.pager_countChildRows?0:g.filter("."+d.cssChildRow).length),h.totalPages="all"===h.size?1:Math.ceil(h.totalRows/h.size),g.length&&d.rowsCopy&&0===d.rowsCopy.length&&b.updateCache(d),h.page>=h.totalPages&&b.moveToLastPage(d,h),b.hideRows(d),b.changeHeight(d),b.updatePageDisplay(d,!1),c.applyWidget(e),b.updatePageDisplay(d)}}).on("pageSize refreshComplete ".split(" ").join(j+" "),function(a,c){a.stopPropagation(),b.setPageSize(d,b.parsePageSize(d,c,"get")),b.moveToPage(d,h,!0),b.hideRows(d),b.updatePageDisplay(d,!1)}).on("pageSet pagerUpdate ".split(" ").join(j+" "),function(a,c){a.stopPropagation(),"pagerUpdate"===a.type&&(c=void 0===c?h.page+1:c,h.last.page=!0),h.page=(parseInt(c,10)||1)-1,b.moveToPage(d,h,!0),b.updatePageDisplay(d,!1)}).on("pageAndSize"+j,function(a,c,e){a.stopPropagation(),h.page=(parseInt(c,10)||1)-1,b.setPageSize(d,b.parsePageSize(d,e,"get")),b.moveToPage(d,h,!0),b.hideRows(d),b.updatePageDisplay(d,!1)}),e=[k.first,k.prev,k.next,k.last],f=["moveToFirstPage","moveToPrevPage","moveToNextPage","moveToLastPage"],d.debug&&!h.$container.length&&console.warn("Pager: >> Container not found"),h.$container.find(e.join(",")).attr("tabindex",0).off("click"+j).on("click"+j,function(c){c.stopPropagation();var g,j=a(this),k=e.length;if(!j.hasClass(i.pager_css.disabled))for(g=0;g> Goto selector not found"),g=h.$container.find(i.pager_selectors.pageSize),g.length?(g.find("option").removeAttr("selected"),g.off("change"+j).on("change"+j,function(){if(!a(this).hasClass(i.pager_css.disabled)){var c=a(this).val();h.$container.find(i.pager_selectors.pageSize).val(c),b.setPageSize(d,c),b.moveToPage(d,h,!0),b.changeHeight(d)}return!1})):d.debug&&console.warn("Pager: >> Size selector not found")},pagerArrows:function(a,c){var d=a.pager,e=!!c,f=e||0===d.page,g=b.getTotalPages(a,d),h=e||d.page===g-1||0===g,i=a.widgetOptions,j=i.pager_selectors;i.pager_updateArrows&&(d.$container.find(j.first+","+j.prev).toggleClass(i.pager_css.disabled,f).prop("aria-disabled",f),d.$container.find(j.next+","+j.last).toggleClass(i.pager_css.disabled,h).prop("aria-disabled",h))},calcFilters:function(b){var c,d,e,f=b.widgetOptions,g=b.pager,h=b.$table.hasClass("hasFilters");if(h&&!g.ajax)if(a.isEmptyObject(b.cache))g.filteredRows=g.totalRows=b.$tbodies.eq(0).children("tr").not(f.pager_countChildRows?"":"."+b.cssChildRow).length;else for(g.filteredRows=0,c=b.cache[0].normalized,e=c.length,d=0;d=0){if(g=q*o.page>o.filteredRows&&e,o.page=g?n.pager_pageReset||0:o.page,o.startRow=g?q*o.page+1:0===o.filteredRows?0:q*o.page+1,o.endRow=Math.min(o.filteredRows,o.totalRows,q*(o.page+1)),h=o.$container.find(n.pager_selectors.pageDisplay),"function"==typeof n.pager_output?f=n.pager_output(m,o):(l=h.attr("data-pager-output"+(o.filteredRows'):e.length>1&&f&&f[e[0]]?f[e[0]][e[1]]:o[d]||(f?f[d]:g)||g})),o.$container.find(n.pager_selectors.gotoPage).length){for(g="",i=b.buildPageSelect(d,o),k=i.length,j=0;j'+i[j]+"";o.$container.find(n.pager_selectors.gotoPage).html(g).val(o.page+1)}h.length&&(h["INPUT"===h[0].nodeName?"val":"html"](f),h.find(".ts-startRow, .ts-page").off("change"+p).on("change"+p,function(){var b=a(this).val(),c=a(this).hasClass("ts-startRow")?Math.floor(b/q)+1:b;d.$table.triggerHandler("pageSet"+p,[c])}))}b.pagerArrows(d),b.fixHeight(d),o.initialized&&!1!==e&&(d.debug&&console.log("Pager: Triggering pagerComplete"),d.$table.triggerHandler("pagerComplete",d),n.pager_savePages&&c.storage&&c.storage(m,n.pager_storageKey,{page:o.page,size:q===o.totalRows?"all":q}))}},buildPageSelect:function(c,d){var e,f,g,h,i,j,k=c.widgetOptions,l=b.getTotalPages(c,d)||1,m=5*Math.ceil(l/k.pager_maxOptionSize/5),n=l>k.pager_maxOptionSize,o=d.page+1,p=m,q=l-m,r=[1],s=n?m:1;for(e=s;e<=l;)r[r.length]=e,e+=n?m:1;if(r[r.length]=l,n){for(g=[],f=Math.max(Math.floor(k.pager_maxOptionSize/m)-1,5),p=o-f,p<1&&(p=1),q=o+f,q>l&&(q=l),e=p;e<=q;e++)g[g.length]=e;r=a.grep(r,function(b,c){return a.inArray(b,r)===c}),i=r.length,j=g.length,i-j>m/2&&i+j>k.pager_maxOptionSize&&(h=Math.floor(i/2)-Math.floor(j/2),Array.prototype.splice.apply(r,[h,j])),r=r.concat(g)}return r=a.grep(r,function(b,c){return a.inArray(b,r)===c}).sort(function(a,b){return a-b})},fixHeight:function(b){var c,d,e=b.table,f=b.pager,g=b.widgetOptions,h=b.$tbodies.eq(0);h.find("tr.pagerSavedHeightSpacer").remove(),g.pager_fixedHeight&&!f.isDisabled&&(d=a.data(e,"pagerSavedHeight"))&&(c=d-h.height())>5&&a.data(e,"pagerLastSize")===f.size&&h.children("tr:visible").length<("all"===f.size?f.totalRows:f.size)&&h.append('')},changeHeight:function(c){var d,e=c.table,f=c.pager,g="all"===f.size?f.totalRows:f.size,h=c.$tbodies.eq(0);h.find("tr.pagerSavedHeightSpacer").remove(),h.children("tr:visible").length||h.append(' '),d=h.children("tr").eq(0).height()*g,a.data(e,"pagerSavedHeight",d),b.fixHeight(c),a.data(e,"pagerLastSize",f.size)},hideRows:function(a){if(!a.widgetOptions.pager_ajaxUrl){var b,d,e,f,g,h=(a.table,a.pager),i=a.widgetOptions,j=a.$tbodies.length,k="all"===h.size?h.totalRows:h.size,l=h.page*k,m=l+k,n=0,o=0;for(h.cacheIndex=[],b=0;b=l&&o=l&&o0&&e[g].className.match(c.css.cssHasChild))for(;++g> Ajax Error",f,g,h),c.showError(i,f,g,h),e.$tbodies.eq(0).children("tr").detach(),j.totalRows=0;else{if(a.isArray(C)?(n=isNaN(C[0])&&!isNaN(C[1]),x=C[n?1:0],j.totalRows=isNaN(x)?j.totalRows||0:x,e.totalRows=e.filteredRows=j.filteredRows=j.totalRows,v=0===j.totalRows?[]:C[n?0:1]||[],u=C[2]):(j.ajaxData=C,e.totalRows=j.totalRows=C.total,e.filteredRows=j.filteredRows=void 0!==C.filteredRows?C.filteredRows:C.total,u=C.headers,v=C.rows||[]),w=v&&v.length,v instanceof jQuery)k.pager_processAjaxOnInit&&(e.$tbodies.eq(0).empty(),e.$tbodies.eq(0).append(v));else if(w){for(l=0;l",m=0;m"+v[l][m]+"";B+=""}k.pager_processAjaxOnInit&&e.$tbodies.eq(0).html(B)}if(k.pager_processAjaxOnInit=!0,u){for(o=A.hasClass("hasStickyHeaders"),q=o?k.$sticky.children("thead:first").children("tr:not(."+e.cssIgnoreRow+")").children():"",p=A.find("tfoot tr:first").children(),r=e.$headers.filter("th"),y=r.length,m=0;m> No rows for pager to render"));if(j.page>=j.totalPages)return b.moveToLastPage(a,j);if(j.cacheIndex=[],j.isDisabled=!1,j.initialized&&(a.debug&&console.log("Pager: Triggering pagerChange"),a.$table.triggerHandler("pagerChange",a)),k.pager_removeRows){for(c.clearTableBody(i),e=c.processTbody(i,a.$tbodies.eq(0),!0),f=l?0:o,g=l?0:o,h=0;ho&&h<=n&&(h++,j.cacheIndex[j.cacheIndex.length]=f,e.append(d[f])),f++;c.processTbody(i,e,!1)}else b.hideRows(a);b.updatePageDisplay(a),k.pager_startPage=j.page,k.pager_size=j.size,i.isUpdating&&(a.debug&&console.log("Pager: Triggering updateComplete"),a.$table.triggerHandler("updateComplete",[i,!0]))},showAllRows:function(d){var e,f,g,h=d.table,i=d.pager,j=d.widgetOptions;for(i.ajax?b.pagerArrows(d,!0):(a.data(h,"pagerLastPage",i.page),a.data(h,"pagerLastSize",i.size),i.page=0,i.size=i.totalPages,i.totalPages=1,d.$table.addClass("pagerDisabled").removeAttr("aria-describedby").find("tr.pagerSavedHeightSpacer").remove(),b.renderTable(d,d.rowsCopy),i.isDisabled=!0,c.applyWidget(h),d.debug&&console.log("Pager: Disabled")),f=i.$container.find(j.pager_selectors.pageSize+","+j.pager_selectors.gotoPage+",.ts-startRow, .ts-page"),g=f.length,e=0;ed&&d>=0&&(c.page=d),c.page},parsePageSize:function(a,b,c){var d=a.pager,e=a.widgetOptions,f=parseInt(b,10)||d.size||e.pager_size||10;return d.initialized&&(/all/i.test(f+" "+b)||f===d.totalRows)?d.$container.find(e.pager_selectors.pageSize+' option[value="all"]').length?"all":d.totalRows:"get"===c?f:d.size},setPageSize:function(c,d){var e=c.pager,f=c.table;e.size=b.parsePageSize(c,d,"get"),e.$container.find(c.widgetOptions.pager_selectors.pageSize).val(e.size),a.data(f,"pagerLastPage",b.parsePageNumber(c,e)),a.data(f,"pagerLastSize",e.size),e.totalPages="all"===e.size?1:Math.ceil(e.totalRows/e.size),e.filteredPages="all"===e.size?1:Math.ceil(e.filteredRows/e.size)},moveToFirstPage:function(a,c){c.page=0,b.moveToPage(a,c,!0)},moveToLastPage:function(a,c){c.page=b.getTotalPages(a,c)-1,b.moveToPage(a,c,!0)},moveToNextPage:function(a,c){c.page++;var d=b.getTotalPages(a,c)-1;c.page>=d&&(c.page=d),b.moveToPage(a,c,!0)},moveToPrevPage:function(a,c){c.page--,c.page<=0&&(c.page=0),b.moveToPage(a,c,!0)},destroyPager:function(a,d){var e=a.table,f=a.pager,g=a.widgetOptions.pager_selectors||{},h=[g.first,g.prev,g.next,g.last,g.gotoPage,g.pageSize].join(","),i=a.namespace+"pager";if(f){if(f.initialized=!1,a.$table.off(i),f.$container.hide().find(h).off(i),d)return;a.appender=null,b.showAllRows(a),c.storage&&c.storage(e,a.widgetOptions.pager_storageKey,""),f.$container=null,a.pager=null,a.rowsCopy=null}},enablePager:function(d,e){var f,g,h=d.table,i=d.pager,j=d.widgetOptions,k=i.$container.find(j.pager_selectors.pageSize);i.isDisabled=!1,i.page=a.data(h,"pagerLastPage")||i.page||0,g=k.find("option[selected]").val(),i.size=a.data(h,"pagerLastSize")||b.parsePageSize(d,g,"get"),b.setPageSize(d,i.size),i.totalPages="all"===i.size?1:Math.ceil(b.getTotalPages(d,i)/i.size),d.$table.removeClass("pagerDisabled"),h.id&&!d.$table.attr("aria-describedby")&&(k=i.$container.find(j.pager_selectors.pageDisplay),f=k.attr("id"),f||(f=h.id+"_pager_info",k.attr("id",f)),d.$table.attr("aria-describedby",f)),b.changeHeight(d),e&&(c.update(d),b.setPageSize(d,i.size),b.moveToPage(d,i,!0),b.hideRowsSetup(d),d.debug&&console.log("Pager: Enabled"))},appender:function(c,d){var e=c.config,f=e.widgetOptions,g=e.pager;g.ajax?b.moveToPage(e,g,!0):(e.rowsCopy=d,g.totalRows=f.pager_countChildRows?e.$tbodies.eq(0).children("tr").length:d.length,g.size=a.data(c,"pagerLastSize")||g.size||f.pager_size||g.setSize||10,g.totalPages="all"===g.size?1:Math.ceil(g.totalRows/g.size),b.moveToPage(e,g),b.updatePageDisplay(e,!1))}},c.showError=function(b,c,d,e){var f=a(b),g=f[0].config,h=g&&g.widgetOptions,i=g.pager&&g.pager.cssErrorRow||h&&h.pager_css&&h.pager_css.errorRow||"tablesorter-errorRow",j=typeof c,k=!0,l="",m=function(){g.$table.find("thead").find("."+i).remove()};if(!f.length)return void console.error("tablesorter showError: no table parameter passed");if("function"==typeof g.pager.ajaxError){if(!1===(k=g.pager.ajaxError(g,c,d,e)))return m();l=k}else if("function"==typeof h.pager_ajaxError){if(!1===(k=h.pager_ajaxError(g,c,d,e)))return m();l=k}if(""===l)if("object"===j)l=0===c.status?"Not connected, verify Network":404===c.status?"Requested page not found [404]":500===c.status?"Internal Server Error [500]":"parsererror"===e?"Requested JSON parse failed":"timeout"===e?"Time out error":"abort"===e?"Ajax Request aborted":"Uncaught error: "+c.statusText+" ["+c.status+"]";else{if("string"!==j)return m();l=c}a(/tr\>/.test(l)?l:''+l+"").click(function(){a(this).remove()}).appendTo(g.$table.find("thead:first")).addClass(i+" "+g.selectorRemove.slice(1)).attr({role:"alert","aria-live":"assertive"})}}(jQuery); \ No newline at end of file +!function(e){"use strict";var a,t=e.tablesorter;t.addWidget({id:"pager",priority:55,options:{pager_output:"{startRow} to {endRow} of {totalRows} rows",pager_updateArrows:!0,pager_startPage:0,pager_pageReset:0,pager_size:10,pager_maxOptionSize:20,pager_savePages:!0,pager_storageKey:"tablesorter-pager",pager_fixedHeight:!1,pager_countChildRows:!1,pager_removeRows:!1,pager_ajaxUrl:null,pager_customAjaxUrl:function(e,a){return a},pager_ajaxError:null,pager_ajaxObject:{dataType:"json"},pager_processAjaxOnInit:!0,pager_ajaxProcessing:function(e){return[0,[],null]},pager_css:{container:"tablesorter-pager",errorRow:"tablesorter-errorRow",disabled:"disabled"},pager_selectors:{container:".pager",first:".first",prev:".prev",next:".next",last:".last",gotoPage:".gotoPage",pageDisplay:".pagedisplay",pageSize:".pagesize"}},init:function(e){a.init(e)},format:function(e,t){if(!t.pager||!t.pager.initialized)return a.initComplete(t);a.moveToPage(t,t.pager,!1)},remove:function(e,t,r,i){a.destroyPager(t,i)}}),a=t.pager={init:function(r){if(!(r.hasInitialized&&r.config.pager&&r.config.pager.initialized)){var i,s=r.config,o=s.widgetOptions,g=o.pager_selectors,n=s.pager=e.extend({totalPages:0,filteredRows:0,filteredPages:0,currentFilters:[],page:o.pager_startPage,startRow:0,endRow:0,ajaxCounter:0,$size:null,last:{},setSize:o.pager_size,setPage:o.pager_startPage},s.pager);n.isInitializing||(n.isInitializing=!0,s.debug&&console.log("Pager: Initializing"),n.size=e.data(r,"pagerLastSize")||o.pager_size,n.$container=e(g.container).addClass(o.pager_css.container).show(),n.totalRows=s.$tbodies.eq(0).children("tr").not(o.pager_countChildRows?"":"."+s.cssChildRow).length,n.oldAjaxSuccess=n.oldAjaxSuccess||o.pager_ajaxObject.success,s.appender=a.appender,n.initializing=!0,o.pager_savePages&&t.storage&&(i=t.storage(r,o.pager_storageKey)||{},n.page=(isNaN(i.page)?n.page:i.page)||n.setPage||0,n.size="all"===i.size?i.size:(isNaN(i.size)?n.size:i.size)||n.setSize||10,a.setPageSize(s,n.size)),n.regexRows=new RegExp("("+(o.filter_filteredRow||"filtered")+"|"+s.selectorRemove.slice(1)+"|"+s.cssChildRow+")"),n.regexFiltered=new RegExp(o.filter_filteredRow||"filtered"),n.initialized=!1,s.$table.triggerHandler("pagerBeforeInitialized",s),a.enablePager(s,!1),n.ajaxObject=o.pager_ajaxObject,n.ajaxObject.url=o.pager_ajaxUrl,"string"==typeof o.pager_ajaxUrl?(n.ajax=!0,o.filter_serversideFiltering=!0,s.serverSideSorting=!0,a.moveToPage(s,n)):(n.ajax=!1,t.appendCache(s,!0)))}},initComplete:function(e){var r=e.pager;a.bindEvents(e),r.ajax||a.hideRowsSetup(e),r.initialized=!0,r.initializing=!1,r.isInitializing=!1,a.setPageSize(e,r.size),e.debug&&console.log("Pager: Triggering pagerInitialized"),e.$table.triggerHandler("pagerInitialized",e),e.widgetOptions.filter_initialized&&t.hasWidget(e.table,"filter")||a.updatePageDisplay(e,!r.ajax)},bindEvents:function(r){var i,s,o,g=r.pager,n=r.widgetOptions,l=r.namespace+"pager",p=n.pager_selectors;r.$table.off(l).on("filterInit filterStart ".split(" ").join(l+" "),function(a,i){g.currentFilters=e.isArray(i)?i:r.$table.data("lastSearch");var s;s=t.filter.equalFilters?t.filter.equalFilters(r,r.lastSearch,g.currentFilters):(r.lastSearch||[]).join("")!==(g.currentFilters||[]).join(""),"filterStart"!==a.type||!1===n.pager_pageReset||s||(g.page=n.pager_pageReset)}).on("filterEnd sortEnd ".split(" ").join(l+" "),function(){g.currentFilters=r.$table.data("lastSearch"),(g.initialized||g.initializing)&&(r.delayInit&&r.rowsCopy&&0===r.rowsCopy.length&&a.updateCache(r),a.updatePageDisplay(r,!1),t.applyWidget(r.table))}).on("disablePager"+l,function(e){e.stopPropagation(),a.showAllRows(r)}).on("enablePager"+l,function(e){e.stopPropagation(),a.enablePager(r,!0)}).on("destroyPager"+l,function(e,a){e.stopPropagation(),t.removeWidget(r.table,"pager",!1)}).on("updateComplete"+l,function(e,i,s){if(e.stopPropagation(),i&&!s&&!g.ajax){var o=r.$tbodies.eq(0).children("tr").not(r.selectorRemove);g.totalRows=o.length-(n.pager_countChildRows?0:o.filter("."+r.cssChildRow).length),g.totalPages="all"===g.size?1:Math.ceil(g.totalRows/g.size),o.length&&r.rowsCopy&&0===r.rowsCopy.length&&a.updateCache(r),g.page>=g.totalPages&&a.moveToLastPage(r,g),a.hideRows(r),a.changeHeight(r),a.updatePageDisplay(r,!1),t.applyWidget(i),a.updatePageDisplay(r)}}).on("pageSize refreshComplete ".split(" ").join(l+" "),function(e,t){e.stopPropagation(),a.setPageSize(r,a.parsePageSize(r,t,"get")),a.moveToPage(r,g,!0),a.hideRows(r),a.updatePageDisplay(r,!1)}).on("pageSet pagerUpdate ".split(" ").join(l+" "),function(e,t){e.stopPropagation(),"pagerUpdate"===e.type&&(t=void 0===t?g.page+1:t,g.last.page=!0),g.page=(parseInt(t,10)||1)-1,a.moveToPage(r,g,!0),a.updatePageDisplay(r,!1)}).on("pageAndSize"+l,function(e,t,i){e.stopPropagation(),g.page=(parseInt(t,10)||1)-1,a.setPageSize(r,a.parsePageSize(r,i,"get")),a.moveToPage(r,g,!0),a.hideRows(r),a.updatePageDisplay(r,!1)}),i=[p.first,p.prev,p.next,p.last],s=["moveToFirstPage","moveToPrevPage","moveToNextPage","moveToLastPage"],r.debug&&!g.$container.length&&console.warn("Pager: >> Container not found"),g.$container.find(i.join(",")).attr("tabindex",0).off("click"+l).on("click"+l,function(t){t.stopPropagation();var o,l=e(this),p=i.length;if(!l.hasClass(n.pager_css.disabled))for(o=0;o> Goto selector not found"),(o=g.$container.find(n.pager_selectors.pageSize)).length?(o.find("option").removeAttr("selected"),o.off("change"+l).on("change"+l,function(){if(!e(this).hasClass(n.pager_css.disabled)){var t=e(this).val();g.$container.find(n.pager_selectors.pageSize).val(t),a.setPageSize(r,t),a.moveToPage(r,g,!0),a.changeHeight(r)}return!1})):r.debug&&console.warn("Pager: >> Size selector not found")},pagerArrows:function(e,t){var r=e.pager,i=!!t,s=i||0===r.page,o=a.getTotalPages(e,r),g=i||r.page===o-1||0===o,n=e.widgetOptions,l=n.pager_selectors;n.pager_updateArrows&&(r.$container.find(l.first+","+l.prev).toggleClass(n.pager_css.disabled,s).prop("aria-disabled",s),r.$container.find(l.next+","+l.last).toggleClass(n.pager_css.disabled,g).prop("aria-disabled",g))},calcFilters:function(a){var t,r,i,s=a.widgetOptions,o=a.pager,g=a.$table.hasClass("hasFilters");if(g&&!o.ajax)if(e.isEmptyObject(a.cache))o.filteredRows=o.totalRows=a.$tbodies.eq(0).children("tr").not(s.pager_countChildRows?"":"."+a.cssChildRow).length;else for(o.filteredRows=0,i=(t=a.cache[0].normalized).length,r=0;r=0){if(o=w*u.page>u.filteredRows&&i,u.page=o?f.pager_pageReset||0:u.page,u.startRow=o?w*u.page+1:0===u.filteredRows?0:w*u.page+1,u.endRow=Math.min(u.filteredRows,u.totalRows,w*(u.page+1)),g=u.$container.find(f.pager_selectors.pageDisplay),"function"==typeof f.pager_output?s=f.pager_output(c,u):(d=g.attr("data-pager-output"+(u.filteredRows'):i.length>1&&s&&s[i[0]]?s[i[0]][i[1]]:u[r]||(s?s[r]:o)||o})),u.$container.find(f.pager_selectors.gotoPage).length){for(o="",p=(n=a.buildPageSelect(r,u)).length,l=0;l'+n[l]+"";u.$container.find(f.pager_selectors.gotoPage).html(o).val(u.page+1)}g.length&&(g["INPUT"===g[0].nodeName?"val":"html"](s),g.find(".ts-startRow, .ts-page").off("change"+h).on("change"+h,function(){var a=e(this).val(),t=e(this).hasClass("ts-startRow")?Math.floor(a/w)+1:a;r.$table.triggerHandler("pageSet"+h,[t])}))}a.pagerArrows(r),a.fixHeight(r),u.initialized&&!1!==i&&(r.debug&&console.log("Pager: Triggering pagerComplete"),r.$table.triggerHandler("pagerComplete",r),f.pager_savePages&&t.storage&&t.storage(c,f.pager_storageKey,{page:u.page,size:w===u.totalRows?"all":w}))}},buildPageSelect:function(t,r){var i,s,o,g,n,l,p=t.widgetOptions,d=a.getTotalPages(t,r)||1,c=5*Math.ceil(d/p.pager_maxOptionSize/5),f=d>p.pager_maxOptionSize,u=r.page+1,h=c,w=d-c,P=[1];for(i=f?c:1;i<=d;)P[P.length]=i,i+=f?c:1;if(P[P.length]=d,f){for(o=[],(h=u-(s=Math.max(Math.floor(p.pager_maxOptionSize/c)-1,5)))<1&&(h=1),(w=u+s)>d&&(w=d),i=h;i<=w;i++)o[o.length]=i;(n=(P=e.grep(P,function(a,t){return e.inArray(a,P)===t})).length)-(l=o.length)>c/2&&n+l>p.pager_maxOptionSize&&(g=Math.floor(n/2)-Math.floor(l/2),Array.prototype.splice.apply(P,[g,l])),P=P.concat(o)}return P=e.grep(P,function(a,t){return e.inArray(a,P)===t}).sort(function(e,a){return e-a})},fixHeight:function(a){var t,r,i=a.table,s=a.pager,o=a.widgetOptions,g=a.$tbodies.eq(0);g.find("tr.pagerSavedHeightSpacer").remove(),o.pager_fixedHeight&&!s.isDisabled&&(r=e.data(i,"pagerSavedHeight"))&&(t=r-g.height())>5&&e.data(i,"pagerLastSize")===s.size&&g.children("tr:visible").length<("all"===s.size?s.totalRows:s.size)&&g.append('')},changeHeight:function(t){var r,i=t.table,s=t.pager,o="all"===s.size?s.totalRows:s.size,g=t.$tbodies.eq(0);g.find("tr.pagerSavedHeightSpacer").remove(),g.children("tr:visible").length||g.append(' '),r=g.children("tr").eq(0).height()*o,e.data(i,"pagerSavedHeight",r),a.fixHeight(t),e.data(i,"pagerLastSize",s.size)},hideRows:function(e){if(!e.widgetOptions.pager_ajaxUrl){e.table;var a,r,i,s,o,g=e.pager,n=e.widgetOptions,l=e.$tbodies.length,p="all"===g.size?g.totalRows:g.size,d=g.page*p,c=d+p,f=0,u=0;for(g.cacheIndex=[],a=0;a=d&&u=d&&u0&&i[o].className.match(t.css.cssHasChild))for(;++o> Ajax Error",s,o,g),t.showError(n,s,o,g),i.$tbodies.eq(0).children("tr").detach(),l.totalRows=0;else{if(e.isArray(C)?(j=C[(f=isNaN(C[0])&&!isNaN(C[1]))?1:0],l.totalRows=isNaN(j)?l.totalRows||0:j,i.totalRows=i.filteredRows=l.filteredRows=l.totalRows,v=0===l.totalRows?[]:C[f?0:1]||[],R=C[2]):(l.ajaxData=C,i.totalRows=l.totalRows=C.total,i.filteredRows=l.filteredRows=void 0!==C.filteredRows?C.filteredRows:C.total,R=C.headers,v=C.rows||[]),m=v&&v.length,v instanceof jQuery)p.pager_processAjaxOnInit&&(i.$tbodies.eq(0).empty(),i.$tbodies.eq(0).append(v));else if(m){for(d=0;d",c=0;c"+v[d][c]+"";S+=""}p.pager_processAjaxOnInit&&i.$tbodies.eq(0).html(S)}if(p.pager_processAjaxOnInit=!0,R){for(w=(u=y.hasClass("hasStickyHeaders"))?p.$sticky.children("thead:first").children("tr:not(."+i.cssIgnoreRow+")").children():"",h=y.find("tfoot tr:first").children(),x=(P=i.$headers.filter("th")).length,c=0;c> No rows for pager to render"));if(l.page>=l.totalPages)return a.moveToLastPage(e,l);if(l.cacheIndex=[],l.isDisabled=!1,l.initialized&&(e.debug&&console.log("Pager: Triggering pagerChange"),e.$table.triggerHandler("pagerChange",e)),p.pager_removeRows){for(t.clearTableBody(n),i=t.processTbody(n,e.$tbodies.eq(0),!0),s=d?0:u,o=d?0:u,g=0;gu&&g<=f&&(g++,l.cacheIndex[l.cacheIndex.length]=s,i.append(r[s])),s++;t.processTbody(n,i,!1)}else a.hideRows(e);a.updatePageDisplay(e),p.pager_startPage=l.page,p.pager_size=l.size,n.isUpdating&&(e.debug&&console.log("Pager: Triggering updateComplete"),e.$table.triggerHandler("updateComplete",[n,!0]))},showAllRows:function(r){var i,s,o,g=r.table,n=r.pager,l=r.widgetOptions;for(n.ajax?a.pagerArrows(r,!0):(e.data(g,"pagerLastPage",n.page),e.data(g,"pagerLastSize",n.size),n.page=0,n.size=n.totalPages,n.totalPages=1,r.$table.addClass("pagerDisabled").removeAttr("aria-describedby").find("tr.pagerSavedHeightSpacer").remove(),a.renderTable(r,r.rowsCopy),n.isDisabled=!0,t.applyWidget(g),r.debug&&console.log("Pager: Disabled")),o=(s=n.$container.find(l.pager_selectors.pageSize+","+l.pager_selectors.gotoPage+",.ts-startRow, .ts-page")).length,i=0;ir&&r>=0&&(t.page=r),t.page},parsePageSize:function(e,a,t){var r=e.pager,i=e.widgetOptions,s=parseInt(a,10)||r.size||i.pager_size||10;return r.initialized&&(/all/i.test(s+" "+a)||s===r.totalRows)?r.$container.find(i.pager_selectors.pageSize+' option[value="all"]').length?"all":r.totalRows:"get"===t?s:r.size},setPageSize:function(t,r){var i=t.pager,s=t.table;i.size=a.parsePageSize(t,r,"get"),i.$container.find(t.widgetOptions.pager_selectors.pageSize).val(i.size),e.data(s,"pagerLastPage",a.parsePageNumber(t,i)),e.data(s,"pagerLastSize",i.size),i.totalPages="all"===i.size?1:Math.ceil(i.totalRows/i.size),i.filteredPages="all"===i.size?1:Math.ceil(i.filteredRows/i.size)},moveToFirstPage:function(e,t){t.page=0,a.moveToPage(e,t,!0)},moveToLastPage:function(e,t){t.page=a.getTotalPages(e,t)-1,a.moveToPage(e,t,!0)},moveToNextPage:function(e,t){t.page++;var r=a.getTotalPages(e,t)-1;t.page>=r&&(t.page=r),a.moveToPage(e,t,!0)},moveToPrevPage:function(e,t){--t.page<=0&&(t.page=0),a.moveToPage(e,t,!0)},destroyPager:function(e,r){var i=e.table,s=e.pager,o=e.widgetOptions.pager_selectors||{},g=[o.first,o.prev,o.next,o.last,o.gotoPage,o.pageSize].join(","),n=e.namespace+"pager";if(s){if(s.initialized=!1,e.$table.off(n),s.$container.hide().find(g).off(n),r)return;e.appender=null,a.showAllRows(e),t.storage&&t.storage(i,e.widgetOptions.pager_storageKey,""),s.$container=null,e.pager=null,e.rowsCopy=null}},enablePager:function(r,i){var s,o,g=r.table,n=r.pager,l=r.widgetOptions,p=n.$container.find(l.pager_selectors.pageSize);n.isDisabled=!1,n.page=e.data(g,"pagerLastPage")||n.page||0,o=p.find("option[selected]").val(),n.size=e.data(g,"pagerLastSize")||a.parsePageSize(r,o,"get"),a.setPageSize(r,n.size),n.totalPages="all"===n.size?1:Math.ceil(a.getTotalPages(r,n)/n.size),r.$table.removeClass("pagerDisabled"),g.id&&!r.$table.attr("aria-describedby")&&((s=(p=n.$container.find(l.pager_selectors.pageDisplay)).attr("id"))||(s=g.id+"_pager_info",p.attr("id",s)),r.$table.attr("aria-describedby",s)),a.changeHeight(r),i&&(t.update(r),a.setPageSize(r,n.size),a.moveToPage(r,n,!0),a.hideRowsSetup(r),r.debug&&console.log("Pager: Enabled"))},appender:function(t,r){var i=t.config,s=i.widgetOptions,o=i.pager;o.ajax?a.moveToPage(i,o,!0):(i.rowsCopy=r,o.totalRows=s.pager_countChildRows?i.$tbodies.eq(0).children("tr").length:r.length,o.size=e.data(t,"pagerLastSize")||o.size||s.pager_size||o.setSize||10,o.totalPages="all"===o.size?1:Math.ceil(o.totalRows/o.size),a.moveToPage(i,o),a.updatePageDisplay(i,!1))}},t.showError=function(a,t,r,i){var s=e(a),o=s[0].config,g=o&&o.widgetOptions,n=o.pager&&o.pager.cssErrorRow||g&&g.pager_css&&g.pager_css.errorRow||"tablesorter-errorRow",l=typeof t,p=!0,d="",c=function(){o.$table.find("thead").find("."+n).remove()};if(!s.length)return void console.error("tablesorter showError: no table parameter passed");if("function"==typeof o.pager.ajaxError){if(!1===(p=o.pager.ajaxError(o,t,r,i)))return c();d=p}else if("function"==typeof g.pager_ajaxError){if(!1===(p=g.pager_ajaxError(o,t,r,i)))return c();d=p}if(""===d)if("object"===l)d=0===t.status?"Not connected, verify Network":404===t.status?"Requested page not found [404]":500===t.status?"Internal Server Error [500]":"parsererror"===i?"Requested JSON parse failed":"timeout"===i?"Time out error":"abort"===i?"Ajax Request aborted":"Uncaught error: "+t.statusText+" ["+t.status+"]";else{if("string"!==l)return c();d=t}e(/tr\>/.test(d)?d:''+d+"").click(function(){e(this).remove()}).appendTo(o.$table.find("thead:first")).addClass(n+" "+o.selectorRemove.slice(1)).attr({role:"alert","aria-live":"assertive"})}}(jQuery); \ No newline at end of file diff --git a/dist/js/widgets/widget-print.min.js b/dist/js/widgets/widget-print.min.js index ed2377a0..d1fa6e00 100644 --- a/dist/js/widgets/widget-print.min.js +++ b/dist/js/widgets/widget-print.min.js @@ -1 +1 @@ -!function(a){"use strict";var b=a.tablesorter,c=b.printTable={event:"printTable",basicStyle:"table, tr, td, th { border : solid 1px black; border-collapse : collapse; } td, th { padding: 2px; }",popupStyle:"width=500,height=300,scrollbars=1,resizable=1",init:function(a){a.$table.unbind(c.event).bind(c.event,function(){return c.process(a,a.widgetOptions),!1})},process:function(d,e){var f,g,h=a("
").append(d.$table.clone()),i=c.basicStyle+"table { width: 100%; }."+(b.css.filterRow||"tablesorter-filter-row")+", ."+(e.filter_filteredRow||"filtered")+" { display: none; }."+(b.css.header||"tablesorter-header")+" { background-image: none !important; }@media print { .print_widget_hidden { display: none; } }";h.find("["+e.print_dataAttrib+"]").each(function(){f=a(this),f.text(f.attr(e.print_dataAttrib))}),g="data-"+(e.lazyload_data_attribute||"original"),h.find("img["+g+"]").each(function(){f=a(this),f.attr("src",f.attr(g))}),/^f/i.test(e.print_rows)?i+="tbody tr:not(."+(e.filter_filteredRow||"filtered")+") { display: table-row !important; }":/^a/i.test(e.print_rows)?i+="tbody tr { display: table-row !important; }":/^[.#:\[]/.test(e.print_rows)&&(i+="tbody tr"+e.print_rows+" { display: table-row !important; }"),/s/i.test(e.print_columns)&&d.selector&&b.hasWidget(d.table,"columnSelector")?i+=e.columnSelector_mediaquery&&d.selector.auto?"":d.selector.$style.text():/a/i.test(e.print_columns)&&(i+="td, th { display: table-cell !important; }"),i+=e.print_extraCSS,a.isFunction(e.print_callback)?e.print_callback(d,h,i):c.printOutput(d,h.html(),i)},printOutput:function(a,d,e){var f=a.widgetOptions,g=b.language,h=window.open("",f.print_title,c.popupStyle),i=f.print_title||a.$table.find("caption").text()||a.$table[0].id||document.title||"table",j=f.print_now?"":'";return h.document.write(""+i+""+(f.print_styleSheet?'':"")+""+j+d+""),h.document.close(),f.print_now&&setTimeout(function(){h.print(),h.close()},10),!0},remove:function(a){a.$table.off(c.event)}};b.language.button_close="Close",b.language.button_print="Print",b.addWidget({id:"print",options:{print_title:"",print_dataAttrib:"data-name",print_rows:"filtered",print_columns:"selected",print_extraCSS:"",print_styleSheet:"",print_now:!0,print_callback:null},init:function(a,b,d){c.init(d)},remove:function(a,b){c.remove(b)}})}(jQuery); \ No newline at end of file +!function(t){"use strict";var e=t.tablesorter,i=e.printTable={event:"printTable",basicStyle:"table, tr, td, th { border : solid 1px black; border-collapse : collapse; } td, th { padding: 2px; }",popupStyle:"width=500,height=300,scrollbars=1,resizable=1",init:function(t){t.$table.unbind(i.event).bind(i.event,function(){return i.process(t,t.widgetOptions),!1})},process:function(n,r){var o,a,l=t("
").append(n.$table.clone()),p=i.basicStyle+"table { width: 100%; }."+(e.css.filterRow||"tablesorter-filter-row")+", ."+(r.filter_filteredRow||"filtered")+" { display: none; }."+(e.css.header||"tablesorter-header")+" { background-image: none !important; }@media print { .print_widget_hidden { display: none; } }";l.find("["+r.print_dataAttrib+"]").each(function(){(o=t(this)).text(o.attr(r.print_dataAttrib))}),a="data-"+(r.lazyload_data_attribute||"original"),l.find("img["+a+"]").each(function(){(o=t(this)).attr("src",o.attr(a))}),/^f/i.test(r.print_rows)?p+="tbody tr:not(."+(r.filter_filteredRow||"filtered")+") { display: table-row !important; }":/^a/i.test(r.print_rows)?p+="tbody tr { display: table-row !important; }":/^[.#:\[]/.test(r.print_rows)&&(p+="tbody tr"+r.print_rows+" { display: table-row !important; }"),/s/i.test(r.print_columns)&&n.selector&&e.hasWidget(n.table,"columnSelector")?p+=r.columnSelector_mediaquery&&n.selector.auto?"":n.selector.$style.text():/a/i.test(r.print_columns)&&(p+="td, th { display: table-cell !important; }"),p+=r.print_extraCSS,t.isFunction(r.print_callback)?r.print_callback(n,l,p):i.printOutput(n,l.html(),p)},printOutput:function(t,n,r){var o=t.widgetOptions,a=e.language,l=window.open("",o.print_title,i.popupStyle),p=o.print_title||t.$table.find("caption").text()||t.$table[0].id||document.title||"table",s=o.print_now?"":'";return l.document.write(""+p+""+(o.print_styleSheet?'':"")+""+s+n+""),l.document.close(),o.print_now&&setTimeout(function(){l.print(),l.close()},10),!0},remove:function(t){t.$table.off(i.event)}};e.language.button_close="Close",e.language.button_print="Print",e.addWidget({id:"print",options:{print_title:"",print_dataAttrib:"data-name",print_rows:"filtered",print_columns:"selected",print_extraCSS:"",print_styleSheet:"",print_now:!0,print_callback:null},init:function(t,e,n){i.init(n)},remove:function(t,e){i.remove(e)}})}(jQuery); \ No newline at end of file diff --git a/dist/js/widgets/widget-reflow.min.js b/dist/js/widgets/widget-reflow.min.js index d0091753..57bf0571 100644 --- a/dist/js/widgets/widget-reflow.min.js +++ b/dist/js/widgets/widget-reflow.min.js @@ -1 +1 @@ -!function(a){"use strict";var b=a.tablesorter,c={init:function(b,d,e){var f,g=e.reflow_dataAttrib,h=e.reflow_headerAttrib,i=[];d.$table.addClass(e.reflow_className).off("refresh.tsreflow updateComplete.tsreflow2").on("refresh.tsreflow updateComplete.tsreflow2",function(){c.init(b,d,e)}),d.$headers.each(function(){f=a(this),i.push(a.trim(f.attr(h)||f.text()))}),d.$tbodies.children().each(function(){a(this).children().each(function(b){a(this).attr(g,i[b])})})},init2:function(d,e,f){var g,h,i,j,k,l,m=e.columns,n=f.reflow2_headerAttrib,o=[];for(e.$table.addClass(f.reflow2_className).off("refresh.tsreflow2 updateComplete.tsreflow2").on("refresh.tsreflow2 updateComplete.tsreflow2",function(){c.init2(d,e,f)}),i=0;i1?(k=[],j.each(function(){g=a(this),g.hasClass(f.reflow2_classIgnore)||k.push(g.attr(n)||g.text())})):k=[j.attr(n)||j.text()],o.push(k);k='=0;)g.prepend(k+(0===i&&l>1?" "+f.reflow2_labelTop:"")+'">'+o[b][i]+""),i--}),b.processTbody(d,h,!1)})},remove:function(a,b,c){b.$table.removeClass(c.reflow_className)},remove2:function(a,b,c){b.$table.removeClass(c.reflow2_className)}};b.addWidget({id:"reflow",options:{reflow_className:"ui-table-reflow",reflow_headerAttrib:"data-name",reflow_dataAttrib:"data-title"},init:function(a,b,d,e){c.init(a,d,e)},remove:function(a,b,d){c.remove(a,b,d)}}),b.addWidget({id:"reflow2",options:{reflow2_className:"ui-table-reflow",reflow2_classIgnore:"ui-table-reflow-ignore",reflow2_headerAttrib:"data-name",reflow2_labelClass:"ui-table-cell-label",reflow2_labelTop:"ui-table-cell-label-top"},init:function(a,b,d,e){c.init2(a,d,e)},remove:function(a,b,d){c.remove2(a,b,d)}})}(jQuery); \ No newline at end of file +!function(e){"use strict";var t=e.tablesorter,l={init:function(t,o,r){var a,s=r.reflow_dataAttrib,i=r.reflow_headerAttrib,n=[];o.$table.addClass(r.reflow_className).off("refresh.tsreflow updateComplete.tsreflow2").on("refresh.tsreflow updateComplete.tsreflow2",function(){l.init(t,o,r)}),o.$headers.each(function(){a=e(this),n.push(e.trim(a.attr(i)||a.text()))}),o.$tbodies.children().each(function(){e(this).children().each(function(t){e(this).attr(s,n[t])})})},init2:function(o,r,a){var s,i,n,f,c,d,u=r.columns,h=a.reflow2_headerAttrib,w=[];for(r.$table.addClass(a.reflow2_className).off("refresh.tsreflow2 updateComplete.tsreflow2").on("refresh.tsreflow2 updateComplete.tsreflow2",function(){l.init2(o,r,a)}),n=0;n1?(c=[],f.each(function(){(s=e(this)).hasClass(a.reflow2_classIgnore)||c.push(s.attr(h)||s.text())})):c=[f.attr(h)||f.text()],w.push(c);c='=0;)s.prepend(c+(0===n&&d>1?" "+a.reflow2_labelTop:"")+'">'+w[t][n]+""),n--}),t.processTbody(o,i,!1)})},remove:function(e,t,l){t.$table.removeClass(l.reflow_className)},remove2:function(e,t,l){t.$table.removeClass(l.reflow2_className)}};t.addWidget({id:"reflow",options:{reflow_className:"ui-table-reflow",reflow_headerAttrib:"data-name",reflow_dataAttrib:"data-title"},init:function(e,t,o,r){l.init(e,o,r)},remove:function(e,t,o){l.remove(e,t,o)}}),t.addWidget({id:"reflow2",options:{reflow2_className:"ui-table-reflow",reflow2_classIgnore:"ui-table-reflow-ignore",reflow2_headerAttrib:"data-name",reflow2_labelClass:"ui-table-cell-label",reflow2_labelTop:"ui-table-cell-label-top"},init:function(e,t,o,r){l.init2(e,o,r)},remove:function(e,t,o){l.remove2(e,t,o)}})}(jQuery); \ No newline at end of file diff --git a/dist/js/widgets/widget-repeatheaders.min.js b/dist/js/widgets/widget-repeatheaders.min.js index 24d9552a..c6c6f3de 100644 --- a/dist/js/widgets/widget-repeatheaders.min.js +++ b/dist/js/widgets/widget-repeatheaders.min.js @@ -1,2 +1,2 @@ /*! Widget: repeatHeaders - updated 9/23/2016 (v2.27.7) */ -!function(a){"use strict";a.tablesorter.addWidget({id:"repeatHeaders",priority:10,options:{rowsToSkip:4},format:function(b,c,d){var e,f,g,h,i="";if(!d.repeatHeaders){for(i='',e=0;e"+a.trim(c.$headers.eq(e).html())+"";d.repeatHeaders=i+""}for(h=d&&d.rowsToSkip||4,c.$table.find("tr.repeated-header").remove(),f=c.$tbodies.find("tr"),g=f.length,e=h;e',o=0;o"+e.trim(t.$headers.eq(o).html())+"";a.repeatHeaders=n+""}for(s=a&&a.rowsToSkip||4,t.$table.find("tr.repeated-header").remove(),i=(d=t.$tbodies.find("tr")).length,o=s;o";a("head").append(b)}),c.resizable={init:function(b,d){if(!b.$table.hasClass("hasResizable")){b.$table.addClass("hasResizable");var e,f,g,h,i=b.$table,j=i.parent(),k=parseInt(i.css("margin-top"),10),l=d.resizable_vars={useStorage:c.storage&&!1!==d.resizable,$wrap:j,mouseXPosition:0,$target:null,$next:null,overflow:"auto"===j.css("overflow")||"scroll"===j.css("overflow")||"auto"===j.css("overflow-x")||"scroll"===j.css("overflow-x"),storedSizes:[]};for(c.resizableReset(b.table,!0),l.tableWidth=i.width(),l.fullWidth=Math.abs(j.width()-l.tableWidth)<20,l.useStorage&&l.overflow&&(c.storage(b.table,"tablesorter-table-original-css-width",l.tableWidth),h=c.storage(b.table,"tablesorter-table-resized-width")||"auto",c.resizable.setWidth(i,h,!0)),d.resizable_vars.storedSizes=g=(l.useStorage?c.storage(b.table,c.css.resizableStorage):[])||[],c.resizable.setWidths(b,d,g),c.resizable.updateStoredSizes(b,d),d.$resizable_container=a('
').css({top:k}).insertBefore(i),f=0;f').appendTo(d.$resizable_container).attr({"data-column":f,unselectable:"on"}).data("header",e).bind("selectstart",!1);c.resizable.bindings(b,d)}},updateStoredSizes:function(a,b){var c,d,e=a.columns,f=b.resizable_vars;for(f.storedSizes=[],c=0;c0){for(h.storedSizes[h.target]+=k,c.resizable.setWidth(h.$target,h.storedSizes[h.target],!0),f=0;f";e("head").append(t)}),s.resizable={init:function(t,a){if(!t.$table.hasClass("hasResizable")){t.$table.addClass("hasResizable");var i,r,l,o,n=t.$table,d=n.parent(),b=parseInt(n.css("margin-top"),10),c=a.resizable_vars={useStorage:s.storage&&!1!==a.resizable,$wrap:d,mouseXPosition:0,$target:null,$next:null,overflow:"auto"===d.css("overflow")||"scroll"===d.css("overflow")||"auto"===d.css("overflow-x")||"scroll"===d.css("overflow-x"),storedSizes:[]};for(s.resizableReset(t.table,!0),c.tableWidth=n.width(),c.fullWidth=Math.abs(d.width()-c.tableWidth)<20,c.useStorage&&c.overflow&&(s.storage(t.table,"tablesorter-table-original-css-width",c.tableWidth),o=s.storage(t.table,"tablesorter-table-resized-width")||"auto",s.resizable.setWidth(n,o,!0)),a.resizable_vars.storedSizes=l=(c.useStorage?s.storage(t.table,s.css.resizableStorage):[])||[],s.resizable.setWidths(t,a,l),s.resizable.updateStoredSizes(t,a),a.$resizable_container=e('
').css({top:b}).insertBefore(n),r=0;r').appendTo(a.$resizable_container).attr({"data-column":r,unselectable:"on"}).data("header",i).bind("selectstart",!1);s.resizable.bindings(t,a)}},updateStoredSizes:function(e,t){var s,a,i=e.columns,r=t.resizable_vars;for(r.storedSizes=[],s=0;s0){for(o.storedSizes[o.target]+=b,s.resizable.setWidth(o.$target,o.storedSizes[o.target],!0),r=0;r0?d.sortList=k:c.hasInitialized&&k&&k.length>0&&b.sortOn(d,k))},remove:function(a,c){c.$table.removeClass("hasSaveSort"),b.storage&&b.storage(a,"tablesorter-savesort","")}})}(jQuery); \ No newline at end of file +!function(t){"use strict";var s=t.tablesorter||{};s.addWidget({id:"saveSort",priority:20,options:{saveSort:!0},init:function(t,s,o,e){s.format(t,o,e,!0)},format:function(o,e,r,a){var i,n,l=e.$table,g=!1!==r.saveSort,v={sortList:e.sortList};e.debug&&(n=new Date),l.hasClass("hasSaveSort")?g&&o.hasInitialized&&s.storage&&(s.storage(o,"tablesorter-savesort",v),e.debug&&console.log("saveSort widget: Saving last sort: "+e.sortList+s.benchmark(n))):(l.addClass("hasSaveSort"),v="",s.storage&&(v=(i=s.storage(o,"tablesorter-savesort"))&&i.hasOwnProperty("sortList")&&t.isArray(i.sortList)?i.sortList:"",e.debug&&console.log('saveSort: Last sort loaded: "'+v+'"'+s.benchmark(n)),l.bind("saveSortReset",function(t){t.stopPropagation(),s.storage(o,"tablesorter-savesort","")})),a&&v&&v.length>0?e.sortList=v:o.hasInitialized&&v&&v.length>0&&s.sortOn(e,v))},remove:function(t,o){o.$table.removeClass("hasSaveSort"),s.storage&&s.storage(t,"tablesorter-savesort","")}})}(jQuery); \ No newline at end of file diff --git a/dist/js/widgets/widget-scroller.min.js b/dist/js/widgets/widget-scroller.min.js index cec309d4..cb2debc3 100644 --- a/dist/js/widgets/widget-scroller.min.js +++ b/dist/js/widgets/widget-scroller.min.js @@ -1,2 +1,2 @@ /*! Widget: scroller - updated 4/18/2017 (v2.28.8) */ -!function(a,b){"use strict";var c=a.tablesorter,d=c.css;a.extend(c.css,{scrollerWrap:"tablesorter-scroller",scrollerHeader:"tablesorter-scroller-header",scrollerTable:"tablesorter-scroller-table",scrollerFooter:"tablesorter-scroller-footer",scrollerFixed:"tablesorter-scroller-fixed",scrollerFixedPanel:"tablesorter-scroller-fixed-panel",scrollerHasFix:"tablesorter-scroller-has-fixed-columns",scrollerHideColumn:"tablesorter-scroller-hidden-column",scrollerHideElement:"tablesorter-scroller-hidden",scrollerSpacerRow:"tablesorter-scroller-spacer",scrollerBarSpacer:"tablesorter-scroller-bar-spacer",scrollerAddedHeight:"tablesorter-scroller-added-height",scrollerHack:"tablesorter-scroller-scrollbar-hack",scrollerRtl:"ts-scroller-rtl"}),c.addWidget({id:"scroller",priority:60,options:{scroller_height:300,scroller_jumpToHeader:!0,scroller_upAfterSort:!0,scroller_fixedColumns:0,scroller_rowHighlight:"hover",scroller_addFixedOverlay:!1,scroller_barWidth:null},format:function(a,b,d){b.isScrolling?c.scroller.resize(b,d):c.scroller.setup(b,d)},remove:function(a,b,d){c.scroller.remove(b,d)}}),c.window_resize=function(){c.timer_resize&&clearTimeout(c.timer_resize),c.timer_resize=setTimeout(function(){a(b).trigger("resizeEnd")},250)},a(function(){var b="";a("head").append(b)}),c.scroller={isFirefox:navigator.userAgent.toLowerCase().indexOf("firefox")>-1,isOldIE:document.all&&!b.atob,isIE:document.all&&!b.atob||navigator.appVersion.indexOf("Trident/")>0,isSafari:navigator.userAgent.toLowerCase().indexOf("safari")>-1&&-1===navigator.userAgent.toLowerCase().indexOf("chrome"),hasScrollBar:function(a,b){return b?a.get(0).scrollWidth>a.width():a.get(0).scrollHeight>a.height()},setWidth:function(a,b){a.css({width:b,"min-width":b,"max-width":b})},getBarWidth:function(){var b=a("
").css({position:"absolute",top:"-9999px",left:0,width:"100px",height:"100px",overflow:"scroll",visibility:"hidden"}).appendTo("body"),c=b[0],d=c.offsetWidth-c.clientWidth;return b.remove(),d},setup:function(e,f){var g,h,i,j,k,l,m,n,o=a(b),p=c.scroller,q=e.namespace+"tsscroller",r=a(),s=e.namespace.slice(1)+"tsscroller",t=e.$table;e.widthFixed=!0,f.scroller_calcWidths=[],f.scroller_saved=[0,0],f.scroller_isBusy=!0,null!==f.scroller_barWidth?f.scroller_barSetWidth=f.scroller_barWidth:(n=p.getBarWidth(),f.scroller_barSetWidth=null!==n?n:15),m=t.children("caption"),h=a(''+(m.length?m[0].outerHTML:"")+t.children("thead")[0].outerHTML+"
"),f.scroller_$header=h.addClass(e.namespace.slice(1)+"_extra_table"),i=t.children("tfoot"),i.length&&(r=a('
').addClass(e.namespace.slice(1)+"_extra_table").append(i.clone(!0)).wrap('
'),r.children("tfoot").eq(0).children("tr").children()),f.scroller_$footer=r,t.wrap('
').before(h).find("."+d.filterRow).addClass(d.filterRowHide),f.scroller_$container=t.parent(),r.length&&t.after(r.parent()),j=h.wrap('
').find("."+d.header),t.wrap('
':'">')),k=t.parent(),c.bindEvents(e.table,j),t.hasClass("hasFilters")&&c.filter.bindSearch(t,h.find("."+d.filter)),t.children("thead, caption").addClass(d.scrollerHideElement),g=k.parent().height(),k.off("scroll"+q).on("scroll"+q,function(){if(f.scroller_jumpToHeader){var b=o.scrollTop()-h.offset().top;0!==a(this).scrollTop()&&b0&&o.scrollTop(h.offset().top)}h.parent().add(r.parent()).scrollLeft(a(this).scrollLeft())}),l=((c.hasWidget(e.table,"filter")?"filterEnd":"tablesorter-initialized updateComplete")+" sortEnd pagerComplete columnUpdate ").split(" ").join(q+" "),t.off(q).on("sortEnd filterEnd".split(" ").join(q+" "),function(a){"sortEnd"===a.type&&f.scroller_upAfterSort?k.animate({scrollTop:0},"fast"):f.scroller_fixedColumns&&setTimeout(function(){k.scrollTop(f.scroller_saved[1]).scrollLeft(f.scroller_saved[0]),p.updateFixed(e,f)},0)}).on("setFixedColumnSize"+q,function(a,b){var c=f.scroller_$container;void 0===b||isNaN(b)||(f.scroller_fixedColumns=parseInt(b,10)),p.removeFixed(e,f),b=f.scroller_fixedColumns,b>0&&b0&&p.updateFixed(e,f),p.resize(e,f))}),o.off("resize resizeEnd ".split(" ").join(q+" ")).on("resize"+q,c.window_resize).on("resizeEnd"+q,function(){o.off("resize"+q,c.window_resize),p.resize(e,f),o.on("resize"+q,c.window_resize),k.trigger("scroll"+q)}),e.isScrolling=!0,p.updateFixed(e,f),e.table.hasInitialized&&e.isScrolling&&setTimeout(function(){c.scroller.resize(e,f)},50)},resize:function(e,f){if(!f.scroller_isBusy){var g,h,i,j,k,l=c.scroller,m=f.scroller_$container,n=e.$table,o=n.parent(),p=f.scroller_$header,q=f.scroller_$footer,r=a(b),s=[r.scrollLeft(),r.scrollTop()],t=e.namespace.slice(1)+"tsscroller",u=a("div."+d.scrollerWrap+'[id!="'+t+'"]').addClass(d.scrollerHideElement),v="padding:0;margin:0;border:0;height:0;max-height:0;min-height:0;",w='';for(f.scroller_calcWidths=[],l.removeFixed(e,f),m.find("."+d.scrollerSpacerRow).remove(),m.find("."+c.css.colgroup).remove(),n.find("."+d.scrollerHideElement).removeClass(d.scrollerHideElement),h=parseInt(n.css("border-left-width"),10),j=e.$headerIndexed,g=0;g',f.scroller_calcWidths[g]=i;w+="",e.$tbodies.eq(0).append(w),p.children("thead").append(w),q.children("tfoot").append(w),c.fixColumnWidth(e.table),w=e.$table.children("colgroup")[0].outerHTML,p.append(w),q.append(w),v=o.parent().innerWidth()-(l.hasScrollBar(o)?f.scroller_barSetWidth:0),o.width(v),v=(l.hasScrollBar(o)?f.scroller_barSetWidth:0)+h,i=o.innerWidth()-v,p.parent().add(q.parent()).width(i),o.width(i+v),n.children("thead, caption").addClass(d.scrollerHideElement),l.updateFixed(e,f),u.removeClass(d.scrollerHideElement),o.scrollTop(f.scroller_saved[1]),f.scroller_$container.find("."+d.scrollerFixed).find("."+d.scrollerTable).scrollTop(f.scroller_saved[1]),r.scrollLeft(s[0]),r.scrollTop(s[1]),setTimeout(function(){e.$table.triggerHandler("resizableUpdate"),e.$table.triggerHandler("scrollerComplete")},100)}},setupFixed:function(a,b){var e,f,g,h,i,j,k,l=a.$table,m=b.scroller_$container,n=b.scroller_fixedColumns;for(j=m.addClass(d.scrollerHasFix).clone().addClass(d.scrollerFixed).removeClass(d.scrollerWrap).attr("id",""),j.find("caption").html(" "),b.scroller_addFixedOverlay&&j.append('
'),k=j.find("."+d.scrollerTable),k.children("table").addClass(a.namespace.slice(1)+"_extra_table").attr("id","").children("thead, tfoot").remove(),b.scroller_$fixedColumns=j,l.hasClass(d.scrollerRtl)&&j.addClass(d.scrollerRtl),g=j.find("tr"),h=g.length,e=0;e')},throttle:function(a,b,c){b=b||50;var d,e;return function(){var f=c||this,g=+new Date,h=arguments;d&&g tr").on(h,"tbody > tr",function(a){var c=b.$table.children("tbody").children("tr").index(this);i.children("table").children("tbody").children("tr").eq(c).add(this).toggleClass(e.scroller_rowHighlight,"mouseover"===a.type)}),i.find("table").off(h,"tbody > tr").on(h,"tbody > tr",function(a){var c=i.children("table").children("tbody").children("tr"),d=c.index(this);b.$table.children("tbody").children("tr").eq(d).add(this).toggleClass(e.scroller_rowHighlight,"mouseover"===a.type)}))},adjustWidth:function(a,b,e,f,g){var h=b.scroller_$container;h.children("."+d.scrollerTable).css(g?"right":"left",e),h.children("."+d.scrollerHeader+", ."+d.scrollerFooter).css(g?"right":"left",e+(g&&c.scroller.isSafari?f:0))},updateFixed:function(b,e){var f,g,h=e.scroller_$container,i=e.scroller_$header,j=e.scroller_$footer,k=b.$table,l=k.parent(),m=e.scroller_barSetWidth,n=k.hasClass(d.scrollerRtl);if(0===e.scroller_fixedColumns)return e.scroller_isBusy=!1,c.scroller.removeFixed(b,e),f=h.width(),l.width(f),g=c.scroller.hasScrollBar(l)?m:0,void i.parent().add(j.parent()).width(f-g);if(b.isScrolling){e.scroller_isBusy=!0,h.find("."+d.scrollerFixed).length||c.scroller.setupFixed(b,e);var o,p,q,r,s,t,u,v=e.scroller_$container.children("."+d.scrollerTable).children("table").children("tbody"),w=e.scroller_$header.children("thead").children("."+d.headerRow),x=e.scroller_$fixedColumns.addClass(d.scrollerHideElement),y=x.find("."+d.scrollerTable).children("table"),z=y.children("tbody"),A=c.scroller,B=e.scroller_fixedColumns,C=k.find("tbody td"),D=parseInt(C.css("border-right-width"),10)||1,E=parseInt((C.css("border-spacing")||"").split(/\s/)[0],10)/2||0,F=parseInt(k.css("padding-left"),10)+parseInt(k.css("padding-right"),10)-D,G=e.scroller_calcWidths;for(c.scroller.removeFixed(b,e,!1),o=0;o').css("height",g+"px"),x.find("."+d.scrollerTable).append(C)):f||x.find("."+d.scrollerBarSpacer).remove(),c.scroller.updateRowHeight(b,e),x.height(h.height()),x.removeClass(d.scrollerHideElement),x.find("caption").height(e.scroller_$header.find("caption").height()),e.scroller_isBusy=!1}},fixHeight:function(a,b){var c,e,f,g,h,i=d.scrollerAddedHeight,j=a.length;for(c=0;cf?h.addClass(i).height(e):e div { pointer-events: all; }."+o.scrollerWrap+" ."+o.scrollerFixed+" { position: absolute; top: 0; z-index: 1; left: 0 } ."+o.scrollerWrap+" ."+o.scrollerFixed+"."+o.scrollerRtl+" { left: auto; right: 0 } ."+o.scrollerWrap+"."+o.scrollerHasFix+" > ."+o.scrollerTable+" { overflow: auto; }."+o.scrollerFixed+" ."+o.scrollerFooter+" { position: absolute; bottom: 0; }."+o.scrollerFixed+" ."+o.scrollerTable+" { position: relative; left: 0; overflow: auto; -ms-overflow-style: none; }."+o.scrollerFixed+" ."+o.scrollerTable+"::-webkit-scrollbar { display: none; }."+o.scrollerWrap+" ."+o.scrollerFixedPanel+" { position: absolute; top: 0; bottom: 0; z-index: 2; left: 0; right: 0; } ";e("head").append(r)}),l.scroller={isFirefox:navigator.userAgent.toLowerCase().indexOf("firefox")>-1,isOldIE:document.all&&!r.atob,isIE:document.all&&!r.atob||navigator.appVersion.indexOf("Trident/")>0,isSafari:navigator.userAgent.toLowerCase().indexOf("safari")>-1&&-1===navigator.userAgent.toLowerCase().indexOf("chrome"),hasScrollBar:function(e,r){return r?e.get(0).scrollWidth>e.width():e.get(0).scrollHeight>e.height()},setWidth:function(e,r){e.css({width:r,"min-width":r,"max-width":r})},getBarWidth:function(){var r=e("
").css({position:"absolute",top:"-9999px",left:0,width:"100px",height:"100px",overflow:"scroll",visibility:"hidden"}).appendTo("body"),l=r[0],o=l.offsetWidth-l.clientWidth;return r.remove(),o},setup:function(s,t){var i,d,a,c,n,h,f,p,b=e(r),u=l.scroller,m=s.namespace+"tsscroller",g=e(),v=s.namespace.slice(1)+"tsscroller",x=s.$table;s.widthFixed=!0,t.scroller_calcWidths=[],t.scroller_saved=[0,0],t.scroller_isBusy=!0,null!==t.scroller_barWidth?t.scroller_barSetWidth=t.scroller_barWidth:(p=u.getBarWidth(),t.scroller_barSetWidth=null!==p?p:15),f=x.children("caption"),d=e(''+(f.length?f[0].outerHTML:"")+x.children("thead")[0].outerHTML+"
"),t.scroller_$header=d.addClass(s.namespace.slice(1)+"_extra_table"),(a=x.children("tfoot")).length&&(g=e('
').addClass(s.namespace.slice(1)+"_extra_table").append(a.clone(!0)).wrap('
')).children("tfoot").eq(0).children("tr").children(),t.scroller_$footer=g,x.wrap('
').before(d).find("."+o.filterRow).addClass(o.filterRowHide),t.scroller_$container=x.parent(),g.length&&x.after(g.parent()),c=d.wrap('
').find("."+o.header),x.wrap('
':'">')),n=x.parent(),l.bindEvents(s.table,c),x.hasClass("hasFilters")&&l.filter.bindSearch(x,d.find("."+o.filter)),x.children("thead, caption").addClass(o.scrollerHideElement),i=n.parent().height(),n.off("scroll"+m).on("scroll"+m,function(){if(t.scroller_jumpToHeader){var r=b.scrollTop()-d.offset().top;0!==e(this).scrollTop()&&r0&&b.scrollTop(d.offset().top)}d.parent().add(g.parent()).scrollLeft(e(this).scrollLeft())}),h=((l.hasWidget(s.table,"filter")?"filterEnd":"tablesorter-initialized updateComplete")+" sortEnd pagerComplete columnUpdate ").split(" ").join(m+" "),x.off(m).on("sortEnd filterEnd".split(" ").join(m+" "),function(e){"sortEnd"===e.type&&t.scroller_upAfterSort?n.animate({scrollTop:0},"fast"):t.scroller_fixedColumns&&setTimeout(function(){n.scrollTop(t.scroller_saved[1]).scrollLeft(t.scroller_saved[0]),u.updateFixed(s,t)},0)}).on("setFixedColumnSize"+m,function(e,r){var l=t.scroller_$container;void 0===r||isNaN(r)||(t.scroller_fixedColumns=parseInt(r,10)),u.removeFixed(s,t),(r=t.scroller_fixedColumns)>0&&r0&&u.updateFixed(s,t),u.resize(s,t))}),b.off("resize resizeEnd ".split(" ").join(m+" ")).on("resize"+m,l.window_resize).on("resizeEnd"+m,function(){b.off("resize"+m,l.window_resize),u.resize(s,t),b.on("resize"+m,l.window_resize),n.trigger("scroll"+m)}),s.isScrolling=!0,u.updateFixed(s,t),s.table.hasInitialized&&s.isScrolling&&setTimeout(function(){l.scroller.resize(s,t)},50)},resize:function(s,t){if(!t.scroller_isBusy){var i,d,a,c,n,h=l.scroller,f=t.scroller_$container,p=s.$table,b=p.parent(),u=t.scroller_$header,m=t.scroller_$footer,g=e(r),v=[g.scrollLeft(),g.scrollTop()],x=s.namespace.slice(1)+"tsscroller",_=e("div."+o.scrollerWrap+'[id!="'+x+'"]').addClass(o.scrollerHideElement),w="padding:0;margin:0;border:0;height:0;max-height:0;min-height:0;",C='';for(t.scroller_calcWidths=[],h.removeFixed(s,t),f.find("."+o.scrollerSpacerRow).remove(),f.find("."+l.css.colgroup).remove(),p.find("."+o.scrollerHideElement).removeClass(o.scrollerHideElement),d=parseInt(p.css("border-left-width"),10),c=s.$headerIndexed,i=0;i',t.scroller_calcWidths[i]=a;C+="",s.$tbodies.eq(0).append(C),u.children("thead").append(C),m.children("tfoot").append(C),l.fixColumnWidth(s.table),C=s.$table.children("colgroup")[0].outerHTML,u.append(C),m.append(C),w=b.parent().innerWidth()-(h.hasScrollBar(b)?t.scroller_barSetWidth:0),b.width(w),w=(h.hasScrollBar(b)?t.scroller_barSetWidth:0)+d,a=b.innerWidth()-w,u.parent().add(m.parent()).width(a),b.width(a+w),p.children("thead, caption").addClass(o.scrollerHideElement),h.updateFixed(s,t),_.removeClass(o.scrollerHideElement),b.scrollTop(t.scroller_saved[1]),t.scroller_$container.find("."+o.scrollerFixed).find("."+o.scrollerTable).scrollTop(t.scroller_saved[1]),g.scrollLeft(v[0]),g.scrollTop(v[1]),setTimeout(function(){s.$table.triggerHandler("resizableUpdate"),s.$table.triggerHandler("scrollerComplete")},100)}},setupFixed:function(e,r){var s,t,i,d,a,c,n,h=e.$table,f=r.scroller_$container,p=r.scroller_fixedColumns;for((c=f.addClass(o.scrollerHasFix).clone().addClass(o.scrollerFixed).removeClass(o.scrollerWrap).attr("id","")).find("caption").html(" "),r.scroller_addFixedOverlay&&c.append('
'),(n=c.find("."+o.scrollerTable)).children("table").addClass(e.namespace.slice(1)+"_extra_table").attr("id","").children("thead, tfoot").remove(),r.scroller_$fixedColumns=c,h.hasClass(o.scrollerRtl)&&c.addClass(o.scrollerRtl),d=(i=c.find("tr")).length,s=0;s')},throttle:function(e,r,l){r=r||50;var o,s;return function(){var t=l||this,i=+new Date,d=arguments;o&&i tr").on(d,"tbody > tr",function(e){var l=r.$table.children("tbody").children("tr").index(this);a.children("table").children("tbody").children("tr").eq(l).add(this).toggleClass(s.scroller_rowHighlight,"mouseover"===e.type)}),a.find("table").off(d,"tbody > tr").on(d,"tbody > tr",function(e){var l=a.children("table").children("tbody").children("tr").index(this);r.$table.children("tbody").children("tr").eq(l).add(this).toggleClass(s.scroller_rowHighlight,"mouseover"===e.type)}))},adjustWidth:function(e,r,s,t,i){var d=r.scroller_$container;d.children("."+o.scrollerTable).css(i?"right":"left",s),d.children("."+o.scrollerHeader+", ."+o.scrollerFooter).css(i?"right":"left",s+(i&&l.scroller.isSafari?t:0))},updateFixed:function(r,s){var t,i,d=s.scroller_$container,a=s.scroller_$header,c=s.scroller_$footer,n=r.$table,h=n.parent(),f=s.scroller_barSetWidth,p=n.hasClass(o.scrollerRtl);if(0===s.scroller_fixedColumns)return s.scroller_isBusy=!1,l.scroller.removeFixed(r,s),t=d.width(),h.width(t),i=l.scroller.hasScrollBar(h)?f:0,void a.parent().add(c.parent()).width(t-i);if(r.isScrolling){s.scroller_isBusy=!0,d.find("."+o.scrollerFixed).length||l.scroller.setupFixed(r,s);var b,u,m,g,v,x,_,w=s.scroller_$container.children("."+o.scrollerTable).children("table").children("tbody"),C=s.scroller_$header.children("thead").children("."+o.headerRow),F=s.scroller_$fixedColumns.addClass(o.scrollerHideElement),H=F.find("."+o.scrollerTable).children("table"),T=H.children("tbody"),$=l.scroller,y=s.scroller_fixedColumns,W=n.find("tbody td"),S=parseInt(W.css("border-right-width"),10)||1,E=parseInt((W.css("border-spacing")||"").split(/\s/)[0],10)/2||0,z=parseInt(n.css("padding-left"),10)+parseInt(n.css("padding-right"),10)-S,B=s.scroller_calcWidths;for(l.scroller.removeFixed(r,s,!1),b=0;b').css("height",i+"px"),F.find("."+o.scrollerTable).append(W)):t||F.find("."+o.scrollerBarSpacer).remove(),l.scroller.updateRowHeight(r,s),F.height(d.height()),F.removeClass(o.scrollerHideElement),F.find("caption").height(s.scroller_$header.find("caption").height()),s.scroller_isBusy=!1}},fixHeight:function(e,r){var l,s,t,i,d,a=o.scrollerAddedHeight,c=e.length;for(l=0;l(t=d.height())?d.addClass(a).height(s):sk.totalPages?k.totalPages-1:g,i=k.size=parseInt(c.decodeHash(d,e,"size"),10)),b.hasWidget(j,"filter")&&(f=c.decodeHash(d,e,"filter"))&&(f=f.split(e.sort2Hash_separator),d.$table.one("tablesorter-ready",function(){setTimeout(function(){d.$table.one("filterEnd",function(){a(this).triggerHandler("pageAndSize",[h,i])}),a.tablesorter.setFilters(j,f,!0)},100)})),f||d.$table.one("tablesorter-ready",function(){d.$table.triggerHandler("pageAndSize",[h,i])}),d.$table.on("sortEnd.sort2hash filterEnd.sort2hash pagerComplete.sort2Hash",function(){this.hasInitialized&&c.setHash(this.config,this.config.widgetOptions)})},getTableId:function(b,c){return c.sort2Hash_tableId||b.table.id||"table"+a("table").index(b.$table)},regexEscape:function(a){return a.replace(/([\.\^\$\*\+\-\?\(\)\[\]\{\}\\\|])/g,"\\$1")},convertString2Sort:function(a,b,d){for(var e,f,g,h,i,j,k=d.split(b.sort2Hash_separator),l=0,m=k.length,n=[];la.columns)for(e=new RegExp("("+c.regexEscape(f)+")","i"),i=0;i-1?1:0),n.push([f,g]))}n.length&&(a.sortList=n)},convertSort2String:function(b,c){var d,e,f,g,h=[],i=b.sortList||[],j=i.length;for(d=0;dc.totalPages?c.totalPages-1:n,h=c.size=parseInt(a.decodeHash(r,o,"size"),10)),t.hasWidget(d,"filter")&&(s=a.decodeHash(r,o,"filter"))&&(s=s.split(o.sort2Hash_separator),r.$table.one("tablesorter-ready",function(){setTimeout(function(){r.$table.one("filterEnd",function(){e(this).triggerHandler("pageAndSize",[i,h])}),e.tablesorter.setFilters(d,s,!0)},100)})),s||r.$table.one("tablesorter-ready",function(){r.$table.triggerHandler("pageAndSize",[i,h])}),r.$table.on("sortEnd.sort2hash filterEnd.sort2hash pagerComplete.sort2Hash",function(){this.hasInitialized&&a.setHash(this.config,this.config.widgetOptions)})},getTableId:function(t,a){return a.sort2Hash_tableId||t.table.id||"table"+e("table").index(t.$table)},regexEscape:function(e){return e.replace(/([\.\^\$\*\+\-\?\(\)\[\]\{\}\\\|])/g,"\\$1")},convertString2Sort:function(e,t,r){for(var o,s,n,i,h,d,c=r.split(t.sort2Hash_separator),l=0,H=c.length,g=[];le.columns)for(o=new RegExp("("+a.regexEscape(s)+")","i"),h=0;h-1?1:0),g.push([s,n]))}g.length&&(e.sortList=g)},convertSort2String:function(t,a){var r,o,s,n,i=[],h=t.sortList||[],d=h.length;for(r=0;r=g?g:j<0?0:j)!==d.eq(i).index()&&(l=!0,f=d.eq(i).detach(),j>=g?f.appendTo(k):0===j?f.prependTo(k):f.insertBefore(k.children("tbody:eq("+j+")")));m++}k.show()}},b.addWidget({id:"sortTbody",priority:40,options:{sortTbody_lockHead:!1,sortTbody_primaryRow:null,sortTbody_sortRows:!1,sortTbody_noSort:"tablesorter-no-sort-tbody"},init:function(a,c,d,e){b.sortTbodies.init(d,e)},remove:function(a,b,c,d){b.$table.unbind("sortBegin updateComplete ".split(" ").join(b.namespace+"sortTbody ")),b.serverSideSorting=c.sortTbody_original_serverSideSorting,b.cssInfoBlock=c.sortTbody_original_cssInfoBlock}})}(jQuery); \ No newline at end of file +!function(t){"use strict";var o=t.tablesorter;o.sortTbodies={init:function(r,e){var s,n,i,d,a,b=r.namespace+"sortTbody",l=r.$table.children("tbody"),c=l.length;for(e.sortTbody_original_serverSideSorting=r.serverSideSorting,e.sortTbody_original_cssInfoBlock=r.cssInfoBlock,r.cssInfoBlock=e.sortTbody_noSort,o.sortTbodies.setTbodies(r,e),s=0;s=i?i:b<0?0:b)!==e.eq(a).index()&&(c=!0,n=e.eq(a).detach(),b>=i?n.appendTo(l):0===b?n.prependTo(l):n.insertBefore(l.children("tbody:eq("+b+")")));y++}l.show()}},o.addWidget({id:"sortTbody",priority:40,options:{sortTbody_lockHead:!1,sortTbody_primaryRow:null,sortTbody_sortRows:!1,sortTbody_noSort:"tablesorter-no-sort-tbody"},init:function(t,r,e,s){o.sortTbodies.init(e,s)},remove:function(t,o,r,e){o.$table.unbind("sortBegin updateComplete ".split(" ").join(o.namespace+"sortTbody ")),o.serverSideSorting=r.sortTbody_original_serverSideSorting,o.cssInfoBlock=r.sortTbody_original_cssInfoBlock}})}(jQuery); \ No newline at end of file diff --git a/dist/js/widgets/widget-staticRow.min.js b/dist/js/widgets/widget-staticRow.min.js index 45b5d86f..f7ff6a38 100644 --- a/dist/js/widgets/widget-staticRow.min.js +++ b/dist/js/widgets/widget-staticRow.min.js @@ -1,2 +1,2 @@ /*! widget: staticRow - updated 10/31/2015 (v2.24.0) */ -!function(a){"use strict";var b=a.tablesorter,c=function(b){var c,d,e,f,g,h=b.config;h&&(d=h.widgetOptions,h.$tbodies.each(function(){c=a(this).children(),g=c.length,c.filter(d.staticRow_class).each(function(){c=a(this),f=c.data(d.staticRow_index),void 0!==f?(e=parseFloat(f),f=/%/.test(f)?Math.round(e/100*g):e):f=c.index(),c.data(d.staticRow_data,f)})}))};b.addWidget({id:"staticRow",options:{staticRow_class:".static",staticRow_data:"static-index",staticRow_index:"row-index",staticRow_event:"staticRowsRefresh"},init:function(a,d,e,f){c(a),e.$table.unbind(("updateComplete.tsstaticrows "+f.staticRow_event).replace(/\s+/g," ")).bind("updateComplete.tsstaticrows "+f.staticRow_event,function(){c(a),b.applyWidget(a)})},format:function(b,c,d){var e,f,g,h,i,j,k,l;c.$tbodies.each(function(){for(i=a.tablesorter.processTbody(b,a(this),!0),j=!0,g=0,k=i.children(d.staticRow_class),h=i.children("tr").length-1,l=k.length;j&&g=h?h:e<0?0:e)!==a(this).index()&&(j=!0,f=a(this).detach(),e>=h?f.appendTo(i):0===e?f.prependTo(i):f.insertBefore(i.find("tr:eq("+e+")")))}),g++;a.tablesorter.processTbody(b,i,!1)}),c.$table.triggerHandler("staticRowsComplete",b)},remove:function(a,b,c){b.$table.unbind(("updateComplete.tsstaticrows "+c.staticRow_event).replace(/\s+/g," "))}})}(jQuery); \ No newline at end of file +!function(t){"use strict";var e=t.tablesorter,i=function(e){var i,a,s,o,n,c=e.config;c&&(a=c.widgetOptions,c.$tbodies.each(function(){i=t(this).children(),n=i.length,i.filter(a.staticRow_class).each(function(){i=t(this),void 0!==(o=i.data(a.staticRow_index))?(s=parseFloat(o),o=/%/.test(o)?Math.round(s/100*n):s):o=i.index(),i.data(a.staticRow_data,o)})}))};e.addWidget({id:"staticRow",options:{staticRow_class:".static",staticRow_data:"static-index",staticRow_index:"row-index",staticRow_event:"staticRowsRefresh"},init:function(t,a,s,o){i(t),s.$table.unbind(("updateComplete.tsstaticrows "+o.staticRow_event).replace(/\s+/g," ")).bind("updateComplete.tsstaticrows "+o.staticRow_event,function(){i(t),e.applyWidget(t)})},format:function(e,i,a){var s,o,n,c,d,r,l,p;i.$tbodies.each(function(){for(d=t.tablesorter.processTbody(e,t(this),!0),r=!0,n=0,l=d.children(a.staticRow_class),c=d.children("tr").length-1,p=l.length;r&&n=c?c:s<0?0:s)!==t(this).index()&&(r=!0,o=t(this).detach(),s>=c?o.appendTo(d):0===s?o.prependTo(d):o.insertBefore(d.find("tr:eq("+s+")")))}),n++;t.tablesorter.processTbody(e,d,!1)}),i.$table.triggerHandler("staticRowsComplete",e)},remove:function(t,e,i){e.$table.unbind(("updateComplete.tsstaticrows "+i.staticRow_event).replace(/\s+/g," "))}})}(jQuery); \ No newline at end of file diff --git a/dist/js/widgets/widget-stickyHeaders.min.js b/dist/js/widgets/widget-stickyHeaders.min.js index 08e226fc..9994b7e3 100644 --- a/dist/js/widgets/widget-stickyHeaders.min.js +++ b/dist/js/widgets/widget-stickyHeaders.min.js @@ -1,2 +1,2 @@ /*! Widget: stickyHeaders - updated 1/6/2017 (v2.28.4) */ -!function(a,b){"use strict";var c=a.tablesorter||{};a.extend(c.css,{sticky:"tablesorter-stickyHeader",stickyVis:"tablesorter-sticky-visible",stickyHide:"tablesorter-sticky-hidden",stickyWrap:"tablesorter-sticky-wrapper"}),c.addHeaderResizeEvent=function(b,c,d){if(b=a(b)[0],b.config){var e={timer:250},f=a.extend({},e,d),g=b.config,h=g.widgetOptions,i=function(a){var b,c,d,e,f,i,j=g.$headers.length;for(h.resize_flag=!0,c=[],b=0;b=0&&!e.$table.hasClass("hasFilters"))){var g,h,i,j,k=e.$table,l=a(f.stickyHeaders_attachTo),m=e.namespace+"stickyheaders ",n=a(f.stickyHeaders_yScroll||f.stickyHeaders_attachTo||b),o=a(f.stickyHeaders_xScroll||f.stickyHeaders_attachTo||b),p=k.children("thead:first"),q=p.children("tr").not(".sticky-false").children(),r=k.children("tfoot"),s=isNaN(f.stickyHeaders_offset)?a(f.stickyHeaders_offset):"",t=s.length?s.height()||0:parseInt(f.stickyHeaders_offset,10)||0,u=k.parent().closest("."+c.css.table).hasClass("hasStickyHeaders")?k.parent().closest("table.tablesorter")[0].config.widgetOptions.$sticky.parent():[],v=u.length?u.height():0,w=f.$sticky=k.clone().addClass("containsStickyHeaders "+c.css.sticky+" "+f.stickyHeaders+" "+e.namespace.slice(1)+"_extra_table").wrap('
'),x=w.parent().addClass(c.css.stickyHide).css({position:l.length?"absolute":"fixed",padding:parseInt(w.parent().parent().css("padding-left"),10),top:t+v,left:0,visibility:"hidden",zIndex:f.stickyHeaders_zIndex||2}),y=w.children("thead:first"),z="",A=0,B=function(a,c){var d,e,f,g,h,i=a.filter(":visible"),j=i.length;for(d=0;dd.top&&j=0&&e.$filters&&e.$filters.eq(g).find("a, select, input").filter(":visible").focus())}),c.filter.bindSearch(k,j.find("."+c.css.filter)),f.filter_hideFilters&&c.filter.hideFilters(e,w)),f.stickyHeaders_addResizeEvent&&k.bind("resize"+e.namespace+"stickyheaders",function(){C()}),k.triggerHandler("stickyHeadersInit")}},remove:function(d,e,f){var g=e.namespace+"stickyheaders ";e.$table.removeClass("hasStickyHeaders").unbind("pagerComplete resize filterEnd stickyHeadersUpdate ".split(" ").join(g).replace(/\s+/g," ")).next("."+c.css.stickyWrap).remove(),f.$sticky&&f.$sticky.length&&f.$sticky.remove(),a(b).add(f.stickyHeaders_xScroll).add(f.stickyHeaders_yScroll).add(f.stickyHeaders_attachTo).unbind("scroll resize ".split(" ").join(g).replace(/\s+/g," ")),c.addHeaderResizeEvent(d,!0)}})}(jQuery,window); \ No newline at end of file +!function(e,s){"use strict";var t=e.tablesorter||{};e.extend(t.css,{sticky:"tablesorter-stickyHeader",stickyVis:"tablesorter-sticky-visible",stickyHide:"tablesorter-sticky-hidden",stickyWrap:"tablesorter-sticky-wrapper"}),t.addHeaderResizeEvent=function(s,t,i){if((s=e(s)[0]).config){var r={timer:250},a=e.extend({},r,i),d=s.config,c=d.widgetOptions,l=function(e){var s,t,i,r,a,l,n=d.$headers.length;for(c.resize_flag=!0,t=[],s=0;s=0&&!r.$table.hasClass("hasFilters"))){var d,c,l,n,o=r.$table,f=e(a.stickyHeaders_attachTo),h=r.namespace+"stickyheaders ",p=e(a.stickyHeaders_yScroll||a.stickyHeaders_attachTo||s),y=e(a.stickyHeaders_xScroll||a.stickyHeaders_attachTo||s),k=o.children("thead:first").children("tr").not(".sticky-false").children(),g=o.children("tfoot"),H=isNaN(a.stickyHeaders_offset)?e(a.stickyHeaders_offset):"",b=H.length?H.height()||0:parseInt(a.stickyHeaders_offset,10)||0,_=o.parent().closest("."+t.css.table).hasClass("hasStickyHeaders")?o.parent().closest("table.tablesorter")[0].config.widgetOptions.$sticky.parent():[],u=_.length?_.height():0,v=a.$sticky=o.clone().addClass("containsStickyHeaders "+t.css.sticky+" "+a.stickyHeaders+" "+r.namespace.slice(1)+"_extra_table").wrap('
'),m=v.parent().addClass(t.css.stickyHide).css({position:f.length?"absolute":"fixed",padding:parseInt(v.parent().parent().css("padding-left"),10),top:b+u,left:0,visibility:"hidden",zIndex:a.stickyHeaders_zIndex||2}),z=v.children("thead:first"),C="",w=0,T=function(e,t){var i,r,a,d,c,l=e.filter(":visible"),n=l.length;for(i=0;ii.top&&n=0&&r.$filters&&r.$filters.eq(d).find("a, select, input").filter(":visible").focus())}),t.filter.bindSearch(o,n.find("."+t.css.filter)),a.filter_hideFilters&&t.filter.hideFilters(r,v)),a.stickyHeaders_addResizeEvent&&o.bind("resize"+r.namespace+"stickyheaders",function(){S()}),o.triggerHandler("stickyHeadersInit")}},remove:function(i,r,a){var d=r.namespace+"stickyheaders ";r.$table.removeClass("hasStickyHeaders").unbind("pagerComplete resize filterEnd stickyHeadersUpdate ".split(" ").join(d).replace(/\s+/g," ")).next("."+t.css.stickyWrap).remove(),a.$sticky&&a.$sticky.length&&a.$sticky.remove(),e(s).add(a.stickyHeaders_xScroll).add(a.stickyHeaders_yScroll).add(a.stickyHeaders_attachTo).unbind("scroll resize ".split(" ").join(d).replace(/\s+/g," ")),t.addHeaderResizeEvent(i,!0)}})}(jQuery,window); \ No newline at end of file diff --git a/dist/js/widgets/widget-storage.min.js b/dist/js/widgets/widget-storage.min.js index d69cb866..80cfc3b4 100644 --- a/dist/js/widgets/widget-storage.min.js +++ b/dist/js/widgets/widget-storage.min.js @@ -1,2 +1,2 @@ /*! Widget: storage - updated 4/18/2017 (v2.28.8) */ -!function(a,b,c){"use strict";var d=a.tablesorter||{};a.extend(!0,d.defaults,{fixedUrl:"",widgetOptions:{storage_fixedUrl:"",storage_group:"",storage_page:"",storage_storageType:"",storage_tableId:"",storage_useSessionStorage:""}}),d.storage=function(d,e,f,g){d=a(d)[0];var h,i,j,k=!1,l={},m=d.config,n=m&&m.widgetOptions,o=(g&&g.storageType||n&&n.storage_storageType).toString().charAt(0).toLowerCase(),p=o?"":g&&g.useSessionStorage||n&&n.storage_useSessionStorage,q=a(d),r=g&&g.id||q.attr(g&&g.group||n&&n.storage_group||"data-table-group")||n&&n.storage_tableId||d.id||a(".tablesorter").index(q),s=g&&g.url||q.attr(g&&g.page||n&&n.storage_page||"data-table-page")||n&&n.storage_fixedUrl||m&&m.fixedUrl||b.location.pathname;if("c"!==o&&(o="s"===o||p?"sessionStorage":"localStorage")in b)try{b[o].setItem("_tmptest","temp"),k=!0,b[o].removeItem("_tmptest")}catch(a){m&&m.debug&&console.warn(o+" is not supported in this browser")}if(m.debug&&console.log("Storage widget using",k?o:"cookies"),a.parseJSON&&(k?l=a.parseJSON(b[o][e]||"null")||{}:(i=c.cookie.split(/[;\s|=]/),h=a.inArray(e,i)+1,l=0!==h?a.parseJSON(i[h]||"null")||{}:{})),void 0===f||!b.JSON||!JSON.hasOwnProperty("stringify"))return l&&l[s]?l[s][r]:"";l[s]||(l[s]={}),l[s][r]=f,k?b[o][e]=JSON.stringify(l):(j=new Date,j.setTime(j.getTime()+31536e6),c.cookie=e+"="+JSON.stringify(l).replace(/\"/g,'"')+"; expires="+j.toGMTString()+"; path=/")}}(jQuery,window,document); \ No newline at end of file +!function(e,t,r){"use strict";var o=e.tablesorter||{};e.extend(!0,o.defaults,{fixedUrl:"",widgetOptions:{storage_fixedUrl:"",storage_group:"",storage_page:"",storage_storageType:"",storage_tableId:"",storage_useSessionStorage:""}}),o.storage=function(o,s,a,i){var g,n,p,l=!1,d={},u=(o=e(o)[0]).config,S=u&&u.widgetOptions,c=(i&&i.storageType||S&&S.storage_storageType).toString().charAt(0).toLowerCase(),_=c?"":i&&i.useSessionStorage||S&&S.storage_useSessionStorage,f=e(o),m=i&&i.id||f.attr(i&&i.group||S&&S.storage_group||"data-table-group")||S&&S.storage_tableId||o.id||e(".tablesorter").index(f),w=i&&i.url||f.attr(i&&i.page||S&&S.storage_page||"data-table-page")||S&&S.storage_fixedUrl||u&&u.fixedUrl||t.location.pathname;if("c"!==c&&(c="s"===c||_?"sessionStorage":"localStorage")in t)try{t[c].setItem("_tmptest","temp"),l=!0,t[c].removeItem("_tmptest")}catch(e){u&&u.debug&&console.warn(c+" is not supported in this browser")}if(u.debug&&console.log("Storage widget using",l?c:"cookies"),e.parseJSON&&(l?d=e.parseJSON(t[c][s]||"null")||{}:(n=r.cookie.split(/[;\s|=]/),d=0!==(g=e.inArray(s,n)+1)?e.parseJSON(n[g]||"null")||{}:{})),void 0===a||!t.JSON||!JSON.hasOwnProperty("stringify"))return d&&d[w]?d[w][m]:"";d[w]||(d[w]={}),d[w][m]=a,l?t[c][s]=JSON.stringify(d):((p=new Date).setTime(p.getTime()+31536e6),r.cookie=s+"="+JSON.stringify(d).replace(/\"/g,'"')+"; expires="+p.toGMTString()+"; path=/")}}(jQuery,window,document); \ No newline at end of file diff --git a/dist/js/widgets/widget-toggle.min.js b/dist/js/widgets/widget-toggle.min.js index f9aefc95..0643899b 100644 --- a/dist/js/widgets/widget-toggle.min.js +++ b/dist/js/widgets/widget-toggle.min.js @@ -2,4 +2,4 @@ * Requires tablesorter v2.24.4+ & jQuery 1.7+ * by Rob Garrison */ -!function(a){"use strict";var b=a.tablesorter,c=b.toggleTS={init:function(a,b){b.toggleTS_isEnabled=!0,b.toggleTS_areDisabled={headers:[],filters:[]},a.$table.on("enable.toggleTS disable.toggleTS",function(a){c.toggle(this.config,this.config.widgetOptions,"enable"===a.type)})},toggle:function(a,c,d){if(c.toggleTS_isEnabled!==d){c.toggleTS_isEnabled=d;var e,f,g=a.$headers.length;for(e=0;e
')}),d.cssIcon&&u.find("."+b.css.icon).removeClass(r?[o.icons,q].join(" "):"").addClass(w.icons||""),b.hasWidget(d.table,"filter")&&(g=function(){t.children("thead").children("."+b.css.filterRow).removeClass(r?o.filterRow||"":"").addClass(w.filterRow||"")},e.filter_initialized?g():t.one("filterInit",function(){g()}))),f=0;f
')}),s.cssIcon&&g.find("."+o.css.icon).removeClass(b?[p.icons,f].join(" "):"").addClass(j.icons||""),o.hasWidget(s.table,"filter")&&(a=function(){w.children("thead").children("."+o.css.filterRow).removeClass(b?p.filterRow||"":"").addClass(j.filterRow||"")},r.filter_initialized?a():w.one("filterInit",function(){a()}))),i=0;i0&&a(c.view_caption).text(b.$table.find("caption").text())},removeCaption:function(b,c){a(c.view_caption).empty()},buildToolBar:function(b,c){g.removeToolBar(b,c),g.copyCaption(b,c);var d=a(c.view_toolbar);a.each(c.view_layouts,function(b,e){var f=c.view_switcher_class;b==c.view_layout&&(f+=" active");var g=a("",{href:"#",class:f,"data-view-type":b,title:e.title});g.append(a("",{class:e.icon})),d.append(g)}),d.find("."+c.view_switcher_class).on("click",function(e){if(e.preventDefault(),a(this).hasClass("active"))return!1;d.find("."+c.view_switcher_class).removeClass("active"),a(this).addClass("active"),c.view_layout=a(this).attr("data-view-type"),!0===c.view_layouts[c.view_layout].raw?(g.remove(b,c),g.buildToolBar(b,c)):(!1===f&&g.hideTable(b,c),g.buildView(b,c))})},removeToolBar:function(b,c){a(c.view_toolbar).empty(),g.removeCaption(b,c)},buildView:function(b,c){g.removeView(b,c);var d=c.view_layouts[c.view_layout],f=a(d.container,{class:c.view_layout});e.getColumnText(b.$table,0,function(b){var c=d.tmpl;a.each(a(b.$row).find("td"),function(b,d){var e={},f="{col"+b+"}";a.each(d.attributes,function(a,b){e[b.nodeName]=b.nodeValue});var g=a(d).html(),h=a("").append(a("",e).append(g));c=c.replace(new RegExp(f,"g"),h.html()),f="{col"+b+":raw}",c=c.replace(new RegExp(f,"g"),a(d).text())});var e=a(c);a.each(b.$row[0].attributes,function(a,b){"class"==b.nodeName?e.attr(b.nodeName,e.attr(b.nodeName)+" "+b.nodeValue):e.attr(b.nodeName,b.nodeValue)}),f.append(e)}),a(c.view_container).append(f),b.$table.triggerHandler("viewComplete")},removeView:function(b,c){a(c.view_container).empty()},hideTable:function(a,e){b=a.$table.css("position"),c=a.$table.css("bottom"),d=a.$table.css("left"),a.$table.css({position:"absolute",top:"-10000px",left:"-10000px"}),f=!0},init:function(a,b){!1!==b.view_layout&&void 0!==b.view_layouts[b.view_layout]&&(!1===f&&g.hideTable(a,b),a.$table.on("tablesorter-ready",function(){g.buildToolBar(a,b),g.buildView(a,b)}))},remove:function(a,e){g.removeToolBar(a,e),g.removeView(a,e),a.$table.css({position:b,top:c,left:d}),f=!1}};e.addWidget({id:"view",options:{view_toolbar:"#ts-view-toolbar",view_container:"#ts-view",view_caption:"#ts-view-caption",view_switcher_class:"ts-view-switcher",view_layout:!1,view_layouts:{}},init:function(a,b,c,d){g.init(c,d)},remove:function(a,b,c){g.remove(b,c)}})}(jQuery); \ No newline at end of file +!function(e){"use strict";var t,i,a,o=e.tablesorter,n=!1,l=o.view={copyCaption:function(t,i){l.removeCaption(t,i),t.$table.find("caption").length>0&&e(i.view_caption).text(t.$table.find("caption").text())},removeCaption:function(t,i){e(i.view_caption).empty()},buildToolBar:function(t,i){l.removeToolBar(t,i),l.copyCaption(t,i);var a=e(i.view_toolbar);e.each(i.view_layouts,function(t,o){var n=i.view_switcher_class;t==i.view_layout&&(n+=" active");var l=e("",{href:"#",class:n,"data-view-type":t,title:o.title});l.append(e("",{class:o.icon})),a.append(l)}),a.find("."+i.view_switcher_class).on("click",function(o){if(o.preventDefault(),e(this).hasClass("active"))return!1;a.find("."+i.view_switcher_class).removeClass("active"),e(this).addClass("active"),i.view_layout=e(this).attr("data-view-type"),!0===i.view_layouts[i.view_layout].raw?(l.remove(t,i),l.buildToolBar(t,i)):(!1===n&&l.hideTable(t,i),l.buildView(t,i))})},removeToolBar:function(t,i){e(i.view_toolbar).empty(),l.removeCaption(t,i)},buildView:function(t,i){l.removeView(t,i);var a=i.view_layouts[i.view_layout],n=e(a.container,{class:i.view_layout});o.getColumnText(t.$table,0,function(t){var i=a.tmpl;e.each(e(t.$row).find("td"),function(t,a){var o={},n="{col"+t+"}";e.each(a.attributes,function(e,t){o[t.nodeName]=t.nodeValue});var l=e(a).html(),r=e("").append(e("",o).append(l));i=i.replace(new RegExp(n,"g"),r.html()),n="{col"+t+":raw}",i=i.replace(new RegExp(n,"g"),e(a).text())});var o=e(i);e.each(t.$row[0].attributes,function(e,t){"class"==t.nodeName?o.attr(t.nodeName,o.attr(t.nodeName)+" "+t.nodeValue):o.attr(t.nodeName,t.nodeValue)}),n.append(o)}),e(i.view_container).append(n),t.$table.triggerHandler("viewComplete")},removeView:function(t,i){e(i.view_container).empty()},hideTable:function(e,o){t=e.$table.css("position"),i=e.$table.css("bottom"),a=e.$table.css("left"),e.$table.css({position:"absolute",top:"-10000px",left:"-10000px"}),n=!0},init:function(e,t){!1!==t.view_layout&&void 0!==t.view_layouts[t.view_layout]&&(!1===n&&l.hideTable(e,t),e.$table.on("tablesorter-ready",function(){l.buildToolBar(e,t),l.buildView(e,t)}))},remove:function(e,o){l.removeToolBar(e,o),l.removeView(e,o),e.$table.css({position:t,top:i,left:a}),n=!1}};o.addWidget({id:"view",options:{view_toolbar:"#ts-view-toolbar",view_container:"#ts-view",view_caption:"#ts-view-caption",view_switcher_class:"ts-view-switcher",view_layout:!1,view_layouts:{}},init:function(e,t,i,a){l.init(i,a)},remove:function(e,t,i){l.remove(t,i)}})}(jQuery); \ No newline at end of file diff --git a/js/jquery.tablesorter.combined.js b/js/jquery.tablesorter.combined.js index fcc927f5..fc6dbe7d 100644 --- a/js/jquery.tablesorter.combined.js +++ b/js/jquery.tablesorter.combined.js @@ -4,7 +4,7 @@ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██ █████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀ */ -/*! tablesorter (FORK) - updated 05-03-2017 (v2.28.9)*/ +/*! tablesorter (FORK) - updated 05-16-2017 (v2.28.10)*/ /* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */ (function(factory) { if (typeof define === 'function' && define.amd) { @@ -16,7 +16,7 @@ } }(function(jQuery) { -/*! TableSorter (FORK) v2.28.9 *//* +/*! TableSorter (FORK) v2.28.10 *//* * Client-side table sorting with ease! * @requires jQuery v1.2.6+ * @@ -40,7 +40,7 @@ 'use strict'; var ts = $.tablesorter = { - version : '2.28.9', + version : '2.28.10', parsers : [], widgets : [], @@ -272,11 +272,6 @@ if ( !/tablesorter\-/.test( $table.attr( 'class' ) ) ) { tmp = ( c.theme !== '' ? ' tablesorter-' + c.theme : '' ); } - c.table = table; - c.$table = $table - .addClass( ts.css.table + ' ' + c.tableClass + tmp ) - .attr( 'role', 'grid' ); - c.$headers = $table.find( c.selectorHeaders ); // give the table a unique id, which will be used in namespace binding if ( !c.namespace ) { @@ -286,6 +281,14 @@ c.namespace = '.' + c.namespace.replace( ts.regex.nonWord, '' ); } + c.table = table; + c.$table = $table + // add namespace to table to allow bindings on extra elements to target + // the parent table (e.g. parser-input-select) + .addClass( ts.css.table + ' ' + c.tableClass + tmp + ' ' + c.namespace.slice(1) ) + .attr( 'role', 'grid' ); + c.$headers = $table.find( c.selectorHeaders ); + c.$table.children().children( 'tr' ).attr( 'role', 'row' ); c.$tbodies = $table.children( 'tbody:not(.' + c.cssInfoBlock + ')' ).attr({ 'aria-live' : 'polite', @@ -1304,6 +1307,12 @@ }, updateCell : function( c, cell, resort, callback ) { + // updateCell for child rows is a mess - we'll ignore them for now + // eventually I'll break out the "update" row cache code to make everything consistent + if ( $( cell ).closest( 'tr' ).hasClass( c.cssChildRow ) ) { + console.warn('Tablesorter Warning! "updateCell" for child row content has been disabled, use "update" instead'); + return; + } if ( ts.isEmptyObject( c.cache ) ) { // empty table, do an update instead - fixes #1099 ts.updateHeader( c ); @@ -2522,6 +2531,7 @@ .unbind( ( 'mousedown mouseup keypress '.split( ' ' ).join( c.namespace + ' ' ) ).replace( ts.regex.spaces, ' ' ) ); ts.restoreHeaders( table ); $t.toggleClass( ts.css.table + ' ' + c.tableClass + ' tablesorter-' + c.theme, removeClasses === false ); + $t.removeClass(c.namespace.slice(1)); // clear flag in case the plugin is initialized again table.hasInitialized = false; delete table.config.cache; diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js index f5f8be34..884d76f4 100644 --- a/js/jquery.tablesorter.js +++ b/js/jquery.tablesorter.js @@ -1,4 +1,4 @@ -/*! TableSorter (FORK) v2.28.9 *//* +/*! TableSorter (FORK) v2.28.10 *//* * Client-side table sorting with ease! * @requires jQuery v1.2.6+ * @@ -22,7 +22,7 @@ 'use strict'; var ts = $.tablesorter = { - version : '2.28.9', + version : '2.28.10', parsers : [], widgets : [], diff --git a/js/jquery.tablesorter.widgets.js b/js/jquery.tablesorter.widgets.js index 3b5f9c17..6aebadfa 100644 --- a/js/jquery.tablesorter.widgets.js +++ b/js/jquery.tablesorter.widgets.js @@ -4,7 +4,7 @@ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██ █████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀ */ -/*! tablesorter (FORK) - updated 05-03-2017 (v2.28.9)*/ +/*! tablesorter (FORK) - updated 05-16-2017 (v2.28.10)*/ /* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */ (function(factory) { if (typeof define === 'function' && define.amd) { diff --git a/package.json b/package.json index c0ac0b83..b175eaa1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "tablesorter", "title": "tablesorter", - "version": "2.28.9", + "version": "2.28.10", "description": "tablesorter (FORK) is a jQuery plugin for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes. tablesorter can successfully parse and sort many types of data including linked data in a cell.", "author": { "name": "Christian Bach", diff --git a/tablesorter.jquery.json b/tablesorter.jquery.json index e23f8b3a..a7bb0186 100644 --- a/tablesorter.jquery.json +++ b/tablesorter.jquery.json @@ -1,7 +1,7 @@ { "name": "tablesorter", "title": "tablesorter", - "version": "2.28.9", + "version": "2.28.10", "description": "tablesorter is a jQuery plugin for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes. tablesorter can successfully parse and sort many types of data including linked data in a cell.\n\nThis forked version adds lots of new enhancements including: alphanumeric sorting, pager callback functons, multiple widgets providing column styling, ui theme application, sticky headers, column filters and resizer, as well as extended documentation with a lot more demos.", "author": { "name": "Christian Bach",