' )
+ .css({ top : marginTop })
+ .insertBefore( $table );
+ // add container
+ for ( column = 0; column < c.columns; column++ ) {
+ $header = c.$headerIndexed[ column ];
+ tmp = ts.getColumnData( c.table, c.headers, column );
+ noResize = ts.getData( $header, tmp, 'resizable' ) === 'false';
+ if ( !noResize ) {
+ $( '
' )
+ .appendTo( wo.$resizable_container )
+ .attr({
+ 'data-column' : column,
+ 'unselectable' : 'on'
+ })
+ .data( 'header', $header )
+ .bind( 'selectstart', false );
+ }
+ }
+ ts.resizable.bindings( c, wo );
+ },
+
+ updateStoredSizes : function( c, wo ) {
+ var column, $header,
+ len = c.columns,
+ vars = wo.resizable_vars;
+ vars.storedSizes = [];
+ for ( column = 0; column < len; column++ ) {
+ $header = c.$headerIndexed[ column ];
+ vars.storedSizes[ column ] = $header.is(':visible') ? $header.width() : 0;
+ }
+ },
+
+ setWidth : function( $el, width, overflow ) {
+ // overflow tables need min & max width set as well
+ $el.css({
+ 'width' : width,
+ 'min-width' : overflow ? width : '',
+ 'max-width' : overflow ? width : ''
+ });
+ },
+
+ setWidths : function( c, wo, storedSizes ) {
+ var column, $temp,
+ vars = wo.resizable_vars,
+ $extra = $( c.namespace + '_extra_headers' ),
+ $col = c.$table.children( 'colgroup' ).children( 'col' );
+ storedSizes = storedSizes || vars.storedSizes || [];
+ // process only if table ID or url match
+ if ( storedSizes.length ) {
+ for ( column = 0; column < c.columns; column++ ) {
+ // set saved resizable widths
+ ts.resizable.setWidth( c.$headerIndexed[ column ], storedSizes[ column ], vars.overflow );
+ if ( $extra.length ) {
+ // stickyHeaders needs to modify min & max width as well
+ $temp = $extra.eq( column ).add( $col.eq( column ) );
+ ts.resizable.setWidth( $temp, storedSizes[ column ], vars.overflow );
+ }
+ }
+ $temp = $( c.namespace + '_extra_table' );
+ if ( $temp.length && !ts.hasWidget( c.table, 'scroller' ) ) {
+ ts.resizable.setWidth( $temp, c.$table.outerWidth(), vars.overflow );
+ }
+ }
+ },
+
+ setHandlePosition : function( c, wo ) {
+ var startPosition,
+ tableHeight = c.$table.height(),
+ $handles = wo.$resizable_container.children(),
+ handleCenter = Math.floor( $handles.width() / 2 );
+
+ if ( ts.hasWidget( c.table, 'scroller' ) ) {
+ tableHeight = 0;
+ c.$table.closest( '.' + ts.css.scrollerWrap ).children().each(function(){
+ var $this = $(this);
+ // center table has a max-height set
+ tableHeight += $this.filter('[style*="height"]').length ? $this.height() : $this.children('table').height();
+ });
+ }
+ // subtract out table left position from resizable handles. Fixes #864
+ startPosition = c.$table.position().left;
+ $handles.each( function() {
+ var $this = $(this),
+ column = parseInt( $this.attr( 'data-column' ), 10 ),
+ columns = c.columns - 1,
+ $header = $this.data( 'header' );
+ if ( !$header ) { return; } // see #859
+ if ( !$header.is(':visible') ) {
+ $this.hide();
+ } else if ( column < columns || column === columns && wo.resizable_addLastColumn ) {
+ $this.css({
+ display: 'inline-block',
+ height : tableHeight,
+ left : $header.position().left - startPosition + $header.outerWidth() - handleCenter
+ });
+ }
+ });
+ },
+
+ // prevent text selection while dragging resize bar
+ toggleTextSelection : function( c, wo, toggle ) {
+ var namespace = c.namespace + 'tsresize';
+ wo.resizable_vars.disabled = toggle;
+ $( 'body' ).toggleClass( ts.css.resizableNoSelect, toggle );
+ if ( toggle ) {
+ $( 'body' )
+ .attr( 'unselectable', 'on' )
+ .bind( 'selectstart' + namespace, false );
+ } else {
+ $( 'body' )
+ .removeAttr( 'unselectable' )
+ .unbind( 'selectstart' + namespace );
+ }
+ },
+
+ bindings : function( c, wo ) {
+ var namespace = c.namespace + 'tsresize';
+ wo.$resizable_container.children().bind( 'mousedown', function( event ) {
+ // save header cell and mouse position
+ var column,
+ vars = wo.resizable_vars,
+ $extras = $( c.namespace + '_extra_headers' ),
+ $header = $( event.target ).data( 'header' );
+
+ column = parseInt( $header.attr( 'data-column' ), 10 );
+ vars.$target = $header = $header.add( $extras.filter('[data-column="' + column + '"]') );
+ vars.target = column;
+
+ // if table is not as wide as it's parent, then resize the table
+ vars.$next = event.shiftKey || wo.resizable_targetLast ?
+ $header.parent().children().not( '.resizable-false' ).filter( ':last' ) :
+ $header.nextAll( ':not(.resizable-false)' ).eq( 0 );
+
+ column = parseInt( vars.$next.attr( 'data-column' ), 10 );
+ vars.$next = vars.$next.add( $extras.filter('[data-column="' + column + '"]') );
+ vars.next = column;
+
+ vars.mouseXPosition = event.pageX;
+ ts.resizable.updateStoredSizes( c, wo );
+ ts.resizable.toggleTextSelection(c, wo, true );
+ });
+
+ $( document )
+ .bind( 'mousemove' + namespace, function( event ) {
+ var vars = wo.resizable_vars;
+ // ignore mousemove if no mousedown
+ if ( !vars.disabled || vars.mouseXPosition === 0 || !vars.$target ) { return; }
+ if ( wo.resizable_throttle ) {
+ clearTimeout( vars.timer );
+ vars.timer = setTimeout( function() {
+ ts.resizable.mouseMove( c, wo, event );
+ }, isNaN( wo.resizable_throttle ) ? 5 : wo.resizable_throttle );
+ } else {
+ ts.resizable.mouseMove( c, wo, event );
+ }
+ })
+ .bind( 'mouseup' + namespace, function() {
+ if (!wo.resizable_vars.disabled) { return; }
+ ts.resizable.toggleTextSelection( c, wo, false );
+ ts.resizable.stopResize( c, wo );
+ ts.resizable.setHandlePosition( c, wo );
+ });
+
+ // resizeEnd event triggered by scroller widget
+ $( window ).bind( 'resize' + namespace + ' resizeEnd' + namespace, function() {
+ ts.resizable.setHandlePosition( c, wo );
+ });
+
+ // right click to reset columns to default widths
+ c.$table
+ .bind( 'columnUpdate' + namespace, function() {
+ ts.resizable.setHandlePosition( c, wo );
+ })
+ .find( 'thead:first' )
+ .add( $( c.namespace + '_extra_table' ).find( 'thead:first' ) )
+ .bind( 'contextmenu' + namespace, function() {
+ // $.isEmptyObject() needs jQuery 1.4+; allow right click if already reset
+ var allowClick = wo.resizable_vars.storedSizes.length === 0;
+ ts.resizableReset( c.table );
+ ts.resizable.setHandlePosition( c, wo );
+ wo.resizable_vars.storedSizes = [];
+ return allowClick;
+ });
+
+ },
+
+ mouseMove : function( c, wo, event ) {
+ if ( wo.resizable_vars.mouseXPosition === 0 || !wo.resizable_vars.$target ) { return; }
+ // resize columns
+ var column,
+ total = 0,
+ vars = wo.resizable_vars,
+ $next = vars.$next,
+ tar = vars.storedSizes[ vars.target ],
+ leftEdge = event.pageX - vars.mouseXPosition;
+ if ( vars.overflow ) {
+ if ( tar + leftEdge > 0 ) {
+ vars.storedSizes[ vars.target ] += leftEdge;
+ ts.resizable.setWidth( vars.$target, vars.storedSizes[ vars.target ], true );
+ // update the entire table width
+ for ( column = 0; column < c.columns; column++ ) {
+ total += vars.storedSizes[ column ];
+ }
+ ts.resizable.setWidth( c.$table.add( $( c.namespace + '_extra_table' ) ), total );
+ }
+ if ( !$next.length ) {
+ // if expanding right-most column, scroll the wrapper
+ vars.$wrap[0].scrollLeft = c.$table.width();
+ }
+ } else if ( vars.fullWidth ) {
+ vars.storedSizes[ vars.target ] += leftEdge;
+ vars.storedSizes[ vars.next ] -= leftEdge;
+ ts.resizable.setWidths( c, wo );
+ } else {
+ vars.storedSizes[ vars.target ] += leftEdge;
+ ts.resizable.setWidths( c, wo );
+ }
+ vars.mouseXPosition = event.pageX;
+ // dynamically update sticky header widths
+ c.$table.triggerHandler('stickyHeadersUpdate');
+ },
+
+ stopResize : function( c, wo ) {
+ var vars = wo.resizable_vars;
+ ts.resizable.updateStoredSizes( c, wo );
+ if ( vars.useStorage ) {
+ // save all column widths
+ ts.storage( c.table, ts.css.resizableStorage, vars.storedSizes );
+ ts.storage( c.table, 'tablesorter-table-resized-width', c.$table.width() );
+ }
+ vars.mouseXPosition = 0;
+ vars.$target = vars.$next = null;
+ // will update stickyHeaders, just in case, see #912
+ c.$table.triggerHandler('stickyHeadersUpdate');
+ }
+ };
+
+ // this widget saves the column widths if
+ // $.tablesorter.storage function is included
+ // **************************
+ ts.addWidget({
+ id: 'resizable',
+ priority: 40,
+ options: {
+ resizable : true, // save column widths to storage
+ resizable_addLastColumn : false,
+ resizable_widths : [],
+ resizable_throttle : false, // set to true (5ms) or any number 0-10 range
+ resizable_targetLast : false,
+ resizable_fullWidth : null
+ },
+ init: function(table, thisWidget, c, wo) {
+ ts.resizable.init( c, wo );
+ },
+ format: function( table, c, wo ) {
+ ts.resizable.setHandlePosition( c, wo );
+ },
+ remove: function( table, c, wo, refreshing ) {
+ if (wo.$resizable_container) {
+ var namespace = c.namespace + 'tsresize';
+ c.$table.add( $( c.namespace + '_extra_table' ) )
+ .removeClass('hasResizable')
+ .children( 'thead' )
+ .unbind( 'contextmenu' + namespace );
+
+ wo.$resizable_container.remove();
+ ts.resizable.toggleTextSelection( c, wo, false );
+ ts.resizableReset( table, refreshing );
+ $( document ).unbind( 'mousemove' + namespace + ' mouseup' + namespace );
+ }
+ }
+ });
+
+ ts.resizableReset = function( table, refreshing ) {
+ $( table ).each(function(){
+ var index, $t,
+ c = this.config,
+ wo = c && c.widgetOptions,
+ vars = wo.resizable_vars;
+ if ( table && c && c.$headerIndexed.length ) {
+ // restore the initial table width
+ if ( vars.overflow && vars.tableWidth ) {
+ ts.resizable.setWidth( c.$table, vars.tableWidth, true );
+ if ( vars.useStorage ) {
+ ts.storage( table, 'tablesorter-table-resized-width', 'auto' );
+ }
+ }
+ for ( index = 0; index < c.columns; index++ ) {
+ $t = c.$headerIndexed[ index ];
+ if ( wo.resizable_widths && wo.resizable_widths[ index ] ) {
+ ts.resizable.setWidth( $t, wo.resizable_widths[ index ], vars.overflow );
+ } else if ( !$t.hasClass( 'resizable-false' ) ) {
+ // don't clear the width of any column that is not resizable
+ ts.resizable.setWidth( $t, '', vars.overflow );
+ }
+ }
+
+ // reset stickyHeader widths
+ c.$table.triggerHandler( 'stickyHeadersUpdate' );
+ if ( ts.storage && !refreshing ) {
+ ts.storage( this, ts.css.resizableStorage, {} );
+ }
+ }
+ });
+ };
+
+})( jQuery, window );
+
+/*! Widget: saveSort - updated 10/31/2015 (v2.24.0) *//*
+* Requires tablesorter v2.16+
+* by Rob Garrison
+*/
+;(function ($) {
+ 'use strict';
+ var ts = $.tablesorter || {};
+
+ // this widget saves the last sort only if the
+ // saveSort widget option is true AND the
+ // $.tablesorter.storage function is included
+ // **************************
+ ts.addWidget({
+ id: 'saveSort',
+ priority: 20,
+ options: {
+ saveSort : true
+ },
+ init: function(table, thisWidget, c, wo) {
+ // run widget format before all other widgets are applied to the table
+ thisWidget.format(table, c, wo, true);
+ },
+ format: function(table, c, wo, init) {
+ var stored, time,
+ $table = c.$table,
+ saveSort = wo.saveSort !== false, // make saveSort active/inactive; default to true
+ sortList = { 'sortList' : c.sortList };
+ if (c.debug) {
+ time = new Date();
+ }
+ if ($table.hasClass('hasSaveSort')) {
+ if (saveSort && table.hasInitialized && ts.storage) {
+ ts.storage( table, 'tablesorter-savesort', sortList );
+ if (c.debug) {
+ console.log('saveSort widget: Saving last sort: ' + c.sortList + ts.benchmark(time));
+ }
+ }
+ } else {
+ // set table sort on initial run of the widget
+ $table.addClass('hasSaveSort');
+ sortList = '';
+ // get data
+ if (ts.storage) {
+ stored = ts.storage( table, 'tablesorter-savesort' );
+ sortList = (stored && stored.hasOwnProperty('sortList') && $.isArray(stored.sortList)) ? stored.sortList : '';
+ if (c.debug) {
+ console.log('saveSort: Last sort loaded: "' + sortList + '"' + ts.benchmark(time));
+ }
+ $table.bind('saveSortReset', function(event) {
+ event.stopPropagation();
+ ts.storage( table, 'tablesorter-savesort', '' );
+ });
+ }
+ // init is true when widget init is run, this will run this widget before all other widgets have initialized
+ // this method allows using this widget in the original tablesorter plugin; but then it will run all widgets twice.
+ if (init && sortList && sortList.length > 0) {
+ c.sortList = sortList;
+ } else if (table.hasInitialized && sortList && sortList.length > 0) {
+ // update sort change
+ ts.sortOn( c, sortList );
+ }
+ }
+ },
+ remove: function(table, c) {
+ c.$table.removeClass('hasSaveSort');
+ // clear storage
+ if (ts.storage) { ts.storage( table, 'tablesorter-savesort', '' ); }
+ }
+ });
+
+})(jQuery);
+
+return $.tablesorter;
+}));
diff --git a/webif/html/lib/jquery.plugin/tablesorter2/jquery.tablesorter.widgets.min.js b/webif/html/lib/jquery.plugin/tablesorter2/jquery.tablesorter.widgets.min.js
deleted file mode 100644
index aa6944a4..00000000
--- a/webif/html/lib/jquery.plugin/tablesorter2/jquery.tablesorter.widgets.min.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/*! tableSorter (FORK) 2.16+ widgets - updated 12/22/2014 (v2.18.4) */
-;(function(k,A){
-var e=k.tablesorter=k.tablesorter||{};
-e.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",footerRow:"",footerCells:"",icons:"",sortNone:"bootstrap-icon-unsorted",sortAsc:"icon-chevron-up glyphicon glyphicon-chevron-up",sortDesc:"icon-chevron-down glyphicon glyphicon-chevron-down",active:"",hover:"",filterRow:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",caption:"ui-widget-content",header:"ui-widget-header ui-corner-all ui-state-default", footerRow:"",footerCells:"",icons:"ui-icon",sortNone:"ui-icon-carat-2-n-s",sortAsc:"ui-icon-carat-1-n",sortDesc:"ui-icon-carat-1-s",active:"ui-state-active",hover:"ui-state-hover",filterRow:"",even:"ui-widget-content",odd:"ui-state-default"}};k.extend(e.css,{filterRow:"tablesorter-filter-row",filter:"tablesorter-filter",wrapper:"tablesorter-wrapper",resizer:"tablesorter-resizer",sticky:"tablesorter-stickyHeader",stickyVis:"tablesorter-sticky-visible",stickyWrap:"tablesorter-sticky-wrapper"});
-e.storage= function(c,a,b,d){c=k(c)[0];var e,h,g=!1;e={};h=c.config;var m=k(c);c=d&&d.id||m.attr(d&&d.group||"data-table-group")||c.id||k(".tablesorter").index(m);d=d&&d.url||m.attr(d&&d.page||"data-table-page")||h&&h.fixedUrl||A.location.pathname;if("localStorage"in A)try{A.localStorage.setItem("_tmptest","temp"),g=!0,A.localStorage.removeItem("_tmptest")}catch(n){}k.parseJSON&&(g?e=k.parseJSON(localStorage[a]||"{}"):(h=document.cookie.split(/[;\s|=]/),e=k.inArray(a,h)+1,e=0!==e?k.parseJSON(h[e]||"{}"):{})); if((b||""===b)&&A.JSON&&JSON.hasOwnProperty("stringify"))e[d]||(e[d]={}),e[d][c]=b,g?localStorage[a]=JSON.stringify(e):(b=new Date,b.setTime(b.getTime()+31536E6),document.cookie=a+"="+JSON.stringify(e).replace(/\"/g,'"')+"; expires="+b.toGMTString()+"; path=/");else return e&&e[d]?e[d][c]:""};
-e.addHeaderResizeEvent=function(c,a,b){c=k(c)[0];var d;b=k.extend({},{timer:250},b);var e=c.config,h=e.widgetOptions,g=function(a){h.resize_flag=!0;d=[];e.$headers.each(function(){var a=k(this),b=a.data("savedSizes")|| [0,0],c=this.offsetWidth,e=this.offsetHeight;if(c!==b[0]||e!==b[1])a.data("savedSizes",[c,e]),d.push(this)});d.length&&!1!==a&&e.$table.trigger("resize",[d]);h.resize_flag=!1};g(!1);clearInterval(h.resize_timer);if(a)return h.resize_flag=!1;h.resize_timer=setInterval(function(){h.resize_flag||g()},b.timer)};
-e.addWidget({id:"uitheme",priority:10,format:function(c,a,b){var d,f,h,g=e.themes;d=a.$table;var m=a.$headers,n=a.theme||"jui",p=g[n]||g.jui,g=[p.sortNone,p.sortDesc,p.sortAsc,p.active].join(" "); a.debug&&(f=new Date);d.hasClass("tablesorter-"+n)&&a.theme===a.appliedTheme&&c.hasInitialized||(h=(c=p[a.appliedTheme]||{},[c.sortNone,c.sortDesc,c.sortAsc,c.active].join(" ")),c&&(b.zebra[0]=b.zebra[0].replace(" "+c.even,""),b.zebra[1]=b.zebra[1].replace(" "+c.odd,"")),""!==p.even&&(b.zebra[0]+=" "+p.even),""!==p.odd&&(b.zebra[1]+=" "+p.odd),d.children("caption").removeClass(c.caption).addClass(p.caption),b=d.removeClass(a.appliedTheme?"tablesorter-"+(a.appliedTheme||""):"").addClass("tablesorter-"+ n+" "+p.table).children("tfoot"),b.length&&b.children("tr").removeClass(c.footerRow||"").addClass(p.footerRow).children("th, td").removeClass(c.footerCells||"").addClass(p.footerCells),m.add(a.$extraHeaders).removeClass(c.header+" "+c.hover+" "+h).addClass(p.header).not(".sorter-false").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(a){k(this)["mouseenter"===a.type?"addClass":"removeClass"](p.hover)}),m.find("."+e.css.wrapper).length||m.wrapInner('
'), a.cssIcon&&m.find("."+e.css.icon).removeClass(c.icons+" "+h).addClass(p.icons),d.hasClass("hasFilters")&&d.children("thead").children("."+e.css.filterRow).removeClass(c.filterRow).addClass(p.filterRow),a.appliedTheme=a.theme);for(d=0;d
=]/g,query:"(q|query)"},types:{regex:function(c,a){if(e.filter.regex.regex.test(a.iFilter)){var b,d=e.filter.regex.regex.exec(a.iFilter);try{b=(new RegExp(d[1],d[2])).test(a.iExact)}catch(f){b=!1}return b}return null},operators:function(c,a){if(/^[<>]=?/.test(a.iFilter)){var b,d;b=c.table;var f=a.index,h=a.parsed[f],g=e.formatFloat(a.iFilter.replace(e.filter.regex.operators,""),b),m= c.parsers[f],n=g;if(h||"numeric"===m.type)d=e.filter.parseFilter(c,k.trim(""+a.iFilter.replace(e.filter.regex.operators,"")),f,h,!0),g="number"!==typeof d||""===d||isNaN(d)?g:d;b=!h&&"numeric"!==m.type||isNaN(g)||"undefined"===typeof a.cache?isNaN(a.iExact)?e.formatFloat(a.iExact.replace(e.filter.regex.nondigit,""),b):e.formatFloat(a.iExact,b):a.cache;/>/.test(a.iFilter)&&(d=/>=/.test(a.iFilter)?b>=g:b>g);/n&&(d=k,k=n,n=d);return b>=k&&b<=n||""===k||""===n}return null},wild:function(c,a){if(/[\?\*\|]/.test(a.iFilter)||e.filter.regex.orReplace.test(a.filter)){var b=a.index,d=a.parsed[b],d=e.filter.parseFilter(c,a.iFilter.replace(e.filter.regex.orReplace,"|"),b,d);!c.$headers.filter('[data-column="'+b+'"]:last').hasClass("filter-match")&&/\|/.test(d)&&("|"===d[d.length-1]&&(d+="*"),d=a.anyMatch&&k.isArray(a.rowArray)?"("+d+")":"^("+d+")$");return(new RegExp(d.replace(/\?/g,"\\S{1}").replace(/\*/g, "\\S*"))).test(a.iExact)}return null},fuzzy:function(c,a){if(/^~/.test(a.iFilter)){var b,d=0,f=a.iExact.length,h=e.filter.parseFilter(c,a.iFilter.slice(1),a.index,a.parsed[a.index]);for(b=0;b'+(g.data("placeholder")||g.attr("data-placeholder")||b.filter_placeholder.select||"")+"":"",h=p=f,0<=f.indexOf(b.filter_selectSourceSeparator)&&(p=f.split(b.filter_selectSourceSeparator),h=p[1],p=p[0]),d+="");a.$table.find("thead").find("select."+ e.css.filter+'[data-column="'+m+'"]').append(d)}e.filter.buildDefault(c,!0);e.filter.bindSearch(c,a.$table.find("."+e.css.filter),!0);b.filter_external&&e.filter.bindSearch(c,b.filter_external);b.filter_hideFilters&&e.filter.hideFilters(c,a);a.showProcessing&&a.$table.bind("filterStart"+a.namespace+"filter filterEnd"+a.namespace+"filter",function(b,d){g=d?a.$table.find("."+e.css.header).filter("[data-column]").filter(function(){return""!==d[k(this).data("column")]}):"";e.isProcessing(c,"filterStart"=== b.type,d?g:"")});a.filteredRows=a.totalRows;a.$table.bind("tablesorter-initialized pagerBeforeInitialized",function(){var b=this.config.widgetOptions;n=e.filter.setDefaults(c,a,b)||[];n.length&&(a.delayInit&&""===n.join("")||e.setFilters(c,n,!0));a.$table.trigger("filterFomatterUpdate");setTimeout(function(){b.filter_initialized||e.filter.filterInitComplete(a)},100)});a.pager&&a.pager.initialized&&!b.filter_initialized&&(a.$table.trigger("filterFomatterUpdate"),setTimeout(function(){e.filter.filterInitComplete(a)}, 100))},formatterUpdated:function(c,a){var b=c.closest("table")[0].config.widgetOptions;b.filter_initialized||(b.filter_formatterInit[a]=1)},filterInitComplete:function(c){var a=c.widgetOptions,b=0,d=function(){a.filter_initialized=!0;c.$table.trigger("filterInit",c);e.filter.findRows(c.table,c.$table.data("lastSearch")||[])};k.isEmptyObject(a.filter_formatter)?d():(k.each(a.filter_formatterInit,function(a,c){1===c&&b++}),clearTimeout(a.filter_initTimer),a.filter_initialized||b!==a.filter_formatterCount)? a.filter_initialized||(a.filter_initTimer=setTimeout(function(){d()},500)):d()},setDefaults:function(c,a,b){var d,f=e.getFilters(c)||[];b.filter_saveFilters&&e.storage&&(d=e.storage(c,"tablesorter-filters")||[],(c=k.isArray(d))&&""===d.join("")||!c||(f=d));if(""===f.join(""))for(c=0;c';for(f=0;f"):g+(" | ");a.$filters=k(g+"").appendTo(a.$table.children("thead").eq(0)).find("td");for(f=0;f").appendTo(a.$filters.eq(f)):((g=e.getColumnData(c,b.filter_formatter,f))?(b.filter_formatterCount++,(g=g(a.$filters.eq(f),f))&&0===g.length&&(g=a.$filters.eq(f).children("input")),g&&(0===g.parent().length||g.parent().length&&g.parent()[0]!==a.$filters[f])&&a.$filters.eq(f).append(g)):g=k('').appendTo(a.$filters.eq(f)), g&&g.attr("placeholder",h.data("placeholder")||h.attr("data-placeholder")||b.filter_placeholder.search||"")),g&&(h=(k.isArray(b.filter_cssFilter)?"undefined"!==typeof b.filter_cssFilter[f]?b.filter_cssFilter[f]||"":"":b.filter_cssFilter)||"",g.addClass(e.css.filter+" "+h).attr("data-column",f),d&&(g.attr("placeholder","").addClass("disabled")[0].disabled=!0))},bindSearch:function(c,a,b){c=k(c)[0];a=k(a);if(a.length){var d=c.config,f=d.widgetOptions,h=f.filter_$externalFilters;!0!==b&&(f.filter_$anyMatch= a.filter(f.filter_anyColumnSelector+","+f.filter_multipleColumnSelector),f.filter_$externalFilters=h&&h.length?f.filter_$externalFilters.add(a):a,e.setFilters(c,d.$table.data("lastSearch")||[],!1===b));a.attr("data-lastSearchTime",(new Date).getTime()).unbind(["keypress","keyup","search","change",""].join(d.namespace+"filter ")).bind("keyup"+d.namespace+"filter",function(a){k(this).attr("data-lastSearchTime",(new Date).getTime());if(27===a.which)this.value="";else if(!1===f.filter_liveSearch||""!== this.value&&("number"===typeof f.filter_liveSearch&&this.value.lengtha.which||37<=a.which&&40>=a.which)))return;e.filter.searching(c,!0,!0)}).bind(["search","change","keypress",""].join(d.namespace+"filter "),function(a){var b=k(this).data("column");if(13===a.which||"search"===a.type||"change"===a.type&&this.value!==d.lastSearch[b])a.preventDefault(),k(this).attr("data-lastSearchTime",(new Date).getTime()),e.filter.searching(c,!1,!0)})}},searching:function(c, a,b){var d=c.config.widgetOptions;clearTimeout(d.searchTimer);"undefined"===typeof a||!0===a?d.searchTimer=setTimeout(function(){e.filter.checkFilters(c,a,b)},d.filter_liveSearch?d.filter_searchDelay:10):e.filter.checkFilters(c,a,b)},checkFilters:function(c,a,b){var d=c.config,f=d.widgetOptions,h=k.isArray(a),g=h?a:e.getFilters(c,!0),m=(g||[]).join("");if(k.isEmptyObject(d.cache))d.delayInit&&d.pager&&d.pager.initialized&&d.$table.trigger("updateCache",[function(){e.filter.checkFilters(c,!1,b)}]); else if(h&&(e.setFilters(c,g,!1,!0!==b),f.filter_initialized||(d.lastCombinedFilter="")),f.filter_hideFilters&&d.$table.find("."+e.css.filterRow).trigger(""===m?"mouseleave":"mouseenter"),d.lastCombinedFilter!==m||!1===a)if(!1===a&&(d.lastCombinedFilter=null,d.lastSearch=[]),f.filter_initialized&&d.$table.trigger("filterStart",[g]),d.showProcessing)setTimeout(function(){e.filter.findRows(c,g,m);return!1},30);else return e.filter.findRows(c,g,m),!1},hideFilters:function(c,a){var b,d,f;k(c).find("."+ e.css.filterRow).addClass("hideme").bind("mouseenter mouseleave",function(c){b=k(this);clearTimeout(f);f=setTimeout(function(){/enter|over/.test(c.type)?b.removeClass("hideme"):k(document.activeElement).closest("tr")[0]!==b[0]&&""===a.lastCombinedFilter&&b.addClass("hideme")},200)}).find("input, select").bind("focus blur",function(b){d=k(this).closest("tr");clearTimeout(f);f=setTimeout(function(){if(""===e.getFilters(a.$table).join(""))d["focus"===b.type?"removeClass":"addClass"]("hideme")},200)})}, defaultFilter:function(c,a){if(""===c)return c;var b=e.filter.regex.iQuery,d=a.match(e.filter.regex.igQuery).length,f=1h&&1f&&(d=e,e=f,f=d);for(f>=c.columns&&(f=c.columns-1);e<=f;e++)h.push(e);g=g.replace(b,"")}));f&&/,/.test(g)&&(b=g.split(/\s*,\s*/),k.each(b,function(a,b){""!==b&&(d=parseInt(b,10),d=?\s*-\d)/.test(z)||/(<=?\s*\d)/.test(z))&&!(""!==z&&q.$filters&&q.$filters.eq(n).find("select").length&&!q.$headers.filter('[data-column="'+n+'"]:last').hasClass("filter-match"));z=f.not("."+v.filter_filteredRow).length;B&&0===z&&(B=!1);q.debug&&e.log("Searching through "+(B&&zk.inArray(a,J)&&(t=b(q,l),null!==t))return C=t,!1});if(null!==C)y=C;else if(v.filter_startsWith)for(y=!1,r=q.columns;!y&&0k.inArray(a,G)&&(t=b(q,l),null!==t))return C=t,!1}),null!==C?u=C:(l.exact=(l.iExact+l.childRowText).indexOf(e.filter.parseFilter(q,l.iFilter,r,l.parsed[r])),u=!v.filter_startsWith&&0<=l.exact||v.filter_startsWith&& 0===l.exact)),y=u?y:!1);f.eq(h).toggle(y).toggleClass(v.filter_filteredRow,!y);w.length&&w.toggleClass(v.filter_filteredRow,!y)}}q.filteredRows+=f.not("."+v.filter_filteredRow).length;q.totalRows+=f.length;e.processTbody(c,m,!1)}q.lastCombinedFilter=b;q.lastSearch=a;q.$table.data("lastSearch",a);v.filter_saveFilters&&e.storage&&e.storage(c,"tablesorter-filters",a);q.debug&&e.benchmark("Completed filter widget search",A);v.filter_initialized&&q.$table.trigger("filterEnd",q);setTimeout(function(){q.$table.trigger("applyWidgets")}, 0)}},getOptionSource:function(c,a,b){var d,f=c.config,h=[],g=!1,m=f.widgetOptions.filter_selectSource,n=f.$table.data("lastSearch")||[],p=k.isFunction(m)?!0:e.getColumnData(c,m,a);b&&""!==n[a]&&(b=!1);if(!0===p)g=m(c,a,b);else{if(p instanceof k||"string"===k.type(p)&&0<=p.indexOf(""))return p;k.isArray(p)?g=p:"object"===k.type(m)&&p&&(g=p(c,a,b))}!1===g&&(g=e.filter.getOptions(c,a,b));g=k.grep(g,function(a,b){return k.inArray(a,g)===b});f.$headers.filter('[data-column="'+a+'"]:last').hasClass("filter-select-nosort")|| (k.each(g,function(b,d){h.push({t:d,p:f.parsers&&f.parsers[a].format(d,c,[],a)})}),d=f.textSorter||"",h.sort(function(b,f){var g=b.p.toString(),h=f.p.toString();return k.isFunction(d)?d(g,h,!0,a,c):"object"===typeof d&&d.hasOwnProperty(a)?d[a](g,h,!0,a,c):e.sortNatural?e.sortNatural(g,h):!0}),g=[],k.each(h,function(a,b){g.push(b.t)}));return g},getOptions:function(c,a,b){var d,e,h,g,m=c.config,n=m.widgetOptions,p=m.$table.children("tbody"),r=[];for(d=0;d'+(n.data("placeholder")||n.attr("data-placeholder")||m.filter_placeholder.select||"")+"",p=g.$table.find("thead").find("select."+e.css.filter+'[data-column="'+a+'"]').val();if("undefined"===typeof b||""===b)b=e.filter.getOptionSource(c,a,f);if(k.isArray(b)){for(c=0;c'+h+"":"";b=[]}g=(g.$filters?g.$filters:g.$table.children("thead")).find("."+e.css.filter);m.filter_$externalFilters&&(g=g&&g.length?g.add(m.filter_$externalFilters):m.filter_$externalFilters);a=g.filter('select[data-column="'+a+'"]');a.length&&(a[d?"html":"append"](n),k.isArray(b)||a.append(b).val(p),a.val(p))}},buildDefault:function(c,a){var b,d,f,h=c.config,g=h.widgetOptions,k=h.columns;for(b= 0;b'),y=u.parent().css({position:f.length? "absolute":"fixed",padding:parseInt(u.parent().parent().css("padding-left"),10),top:w+t,left:0,visibility:"hidden",zIndex:b.stickyHeaders_zIndex||2}),E=u.children("thead:first"),z,B="",C=0,G=function(a,b){a.filter(":visible").each(function(a){var d;a=b.filter(":visible").eq(a);var c=k(this);"border-box"===c.css("box-sizing")?d=c.outerWidth():"collapse"===a.css("border-collapse")?A.getComputedStyle?d=parseFloat(A.getComputedStyle(this,null).width):(d=parseFloat(c.css("border-width")),d=c.outerWidth()- parseFloat(c.css("padding-left"))-parseFloat(c.css("padding-right"))-d):d=c.width();a.css({"min-width":d,"max-width":d})})},D=function(){w=r.length?r.height()||0:parseInt(b.stickyHeaders_offset,10)||0;C=0;y.css({left:f.length?parseInt(f.css("padding-left"),10)||0:d.offset().left-parseInt(d.css("margin-left"),10)-m.scrollLeft()-C,width:d.outerWidth()});G(d,u);G(n,z)};u.attr("id")&&(u[0].id+=b.stickyHeaders_cloneId);u.find("thead:gt(0), tr.sticky-false").hide();u.find("tbody, tfoot").remove();u.find("caption").toggle(b.stickyHeaders_includeCaption); z=E.children().children();u.css({height:0,width:0,margin:0});z.find("."+e.css.resizer).remove();d.addClass("hasStickyHeaders").bind("pagerComplete"+h,function(){D()});e.bindEvents(c,E.children().children(".tablesorter-header"));d.after(y);a.onRenderHeader&&E.children("tr").children().each(function(b){a.onRenderHeader.apply(k(this),[b,a,u])});m.add(g).unbind(["scroll","resize",""].join(h)).bind(["scroll","resize",""].join(h),function(a){if(d.is(":visible")){t=x.length?x.offset().top-g.scrollTop()+ x.height():0;var b=d.offset(),c=k.isWindow(g[0]),e=k.isWindow(m[0]),h=(f.length?c?g.scrollTop():g.offset().top:g.scrollTop())+w+t,l=d.height()-(y.height()+(p.height()||0)),b=h>b.top&&hMath.abs(p.parent().width()-p.width()),E=function(a){if(0!==x&&t){var b=a.pageX-x,c=t.width();t.width(c+b);t.width()!==c&&y?u.width(u.width()-b):w&&(p.width(function(a,c){return c+b}),u.length|| (r[0].scrollLeft=p.width()));x=a.pageX}},z=function(){e.storage&&t&&u&&(n={},n[t.index()]=t.width(),n[u.index()]=u.width(),t.width(n[t.index()]),u.width(n[u.index()]),!1!==b.resizable&&e.storage(c,"tablesorter-resizable",a.$headers.map(function(){return k(this).width()}).get()));x=0;t=u=null;k(A).trigger("resize")};if(n=e.storage&&!1!==b.resizable?e.storage(c,"tablesorter-resizable"):{})for(g in n)!isNaN(g)&&g');b.resizable_addLastColumn||(h=h.slice(0,-1));f=f?f.add(h):h});f.each(function(){var a= k(this),b=parseInt(a.css("padding-right"),10)+10;a.find("."+e.css.wrapper).append('
')}).find("."+e.css.resizer).bind("mousedown",function(b){t=k(b.target).closest("th");var c=a.$headers.filter('[data-column="'+t.attr("data-column")+'"]');1