Dist update

This commit is contained in:
Mottie 2015-09-05 09:28:33 -05:00
parent 60666279e2
commit d8b4434446
10 changed files with 39 additions and 45 deletions

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 09-01-2015 (v2.23.3)*/
/*! tablesorter (FORK) - updated 09-05-2015 (v2.23.3)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -1804,13 +1804,12 @@
ts.applyWidgetOptions = function( table, c ){
var indx, widget,
len = c.widgets.length,
wo = c.widgetOptions;
len = c.widgets.length;
if (len) {
for (indx = 0; indx < len; indx++) {
widget = ts.getWidgetById( c.widgets[indx] );
if ( widget && 'options' in widget ) {
wo = table.config.widgetOptions = $.extend( true, {}, widget.options, wo );
c.widgetOptions = $.extend( true, {}, widget.options, c.widgetOptions );
}
}
}
@ -1820,7 +1819,6 @@
table = $(table)[0]; // in case this is called externally
var indx, len, names, widget, name, applied,
c = table.config,
wo = c.widgetOptions,
tableClass = ' ' + c.table.className + ' ',
widgets = [],
time, time2, w, wd;
@ -1878,14 +1876,14 @@
c.widgetInit[ name ] = true;
if (table.hasInitialized) {
// don't reapply widget options on tablesorter init
ts.applyWidgetOptions( table, c );
ts.applyWidgetOptions( table, table.config );
}
if ( 'init' in widget ) {
applied = true;
if (c.debug) {
console[ console.group ? 'group' : 'log' ]( 'Initializing ' + name + ' widget' );
}
widget.init(table, widget, c, wo);
widget.init(table, widget, table.config, table.config.widgetOptions);
}
}
if ( !init && 'format' in widget ) {
@ -1893,7 +1891,7 @@
if (c.debug) {
console[ console.group ? 'group' : 'log' ]( 'Updating ' + name + ' widget' );
}
widget.format(table, c, wo, false);
widget.format(table, table.config, table.config.widgetOptions, false);
}
if (c.debug) {
if (applied) {
@ -3071,7 +3069,7 @@
c.$table.addClass( 'hasFilters' );
// define timers so using clearTimeout won't cause an undefined error
wo.searchTimer = null;
wo.filter_searchTimer = null;
wo.filter_initTimer = null;
wo.filter_formatterCount = 0;
wo.filter_formatterInit = [];
@ -3483,10 +3481,10 @@
},
searching: function( table, filter, skipFirst ) {
var wo = table.config.widgetOptions;
clearTimeout( wo.searchTimer );
clearTimeout( wo.filter_searchTimer );
if ( typeof filter === 'undefined' || filter === true ) {
// delay filtering
wo.searchTimer = setTimeout( function() {
wo.filter_searchTimer = setTimeout( function() {
tsf.checkFilters( table, filter, skipFirst );
}, wo.filter_liveSearch ? wo.filter_searchDelay : 10 );
} else {

File diff suppressed because one or more lines are too long

View File

@ -1802,13 +1802,12 @@
ts.applyWidgetOptions = function( table, c ){
var indx, widget,
len = c.widgets.length,
wo = c.widgetOptions;
len = c.widgets.length;
if (len) {
for (indx = 0; indx < len; indx++) {
widget = ts.getWidgetById( c.widgets[indx] );
if ( widget && 'options' in widget ) {
wo = table.config.widgetOptions = $.extend( true, {}, widget.options, wo );
c.widgetOptions = $.extend( true, {}, widget.options, c.widgetOptions );
}
}
}
@ -1818,7 +1817,6 @@
table = $(table)[0]; // in case this is called externally
var indx, len, names, widget, name, applied,
c = table.config,
wo = c.widgetOptions,
tableClass = ' ' + c.table.className + ' ',
widgets = [],
time, time2, w, wd;
@ -1876,14 +1874,14 @@
c.widgetInit[ name ] = true;
if (table.hasInitialized) {
// don't reapply widget options on tablesorter init
ts.applyWidgetOptions( table, c );
ts.applyWidgetOptions( table, table.config );
}
if ( 'init' in widget ) {
applied = true;
if (c.debug) {
console[ console.group ? 'group' : 'log' ]( 'Initializing ' + name + ' widget' );
}
widget.init(table, widget, c, wo);
widget.init(table, widget, table.config, table.config.widgetOptions);
}
}
if ( !init && 'format' in widget ) {
@ -1891,7 +1889,7 @@
if (c.debug) {
console[ console.group ? 'group' : 'log' ]( 'Updating ' + name + ' widget' );
}
widget.format(table, c, wo, false);
widget.format(table, table.config, table.config.widgetOptions, false);
}
if (c.debug) {
if (applied) {

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 09-01-2015 (v2.23.3)*/
/*! tablesorter (FORK) - updated 09-05-2015 (v2.23.3)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -725,7 +725,7 @@
c.$table.addClass( 'hasFilters' );
// define timers so using clearTimeout won't cause an undefined error
wo.searchTimer = null;
wo.filter_searchTimer = null;
wo.filter_initTimer = null;
wo.filter_formatterCount = 0;
wo.filter_formatterInit = [];
@ -1137,10 +1137,10 @@
},
searching: function( table, filter, skipFirst ) {
var wo = table.config.widgetOptions;
clearTimeout( wo.searchTimer );
clearTimeout( wo.filter_searchTimer );
if ( typeof filter === 'undefined' || filter === true ) {
// delay filtering
wo.searchTimer = setTimeout( function() {
wo.filter_searchTimer = setTimeout( function() {
tsf.checkFilters( table, filter, skipFirst );
}, wo.filter_liveSearch ? wo.filter_searchDelay : 10 );
} else {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -6,4 +6,4 @@
* (c)2011 ecava
* Dual licensed under the MIT or GPL Version 2 licenses.
*/
b.formatMask=function(a,b,c,d){if(!a||isNaN(+b))return b;var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t="",u=a.length,v=a.search(/[0-9\-\+#]/),w=v>0?a.substring(0,v):"",x=w;if(v>0&&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,""!==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=0>b?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"),i>-1)for(;l[0].length<a[0].length-i;)l[0]="0"+l[0];else 0===+l[0]&&(l[0]="");if(b=b.split("."),b[0]=l[0],k=m[1]&&m[m.length-1].length){for(n=b[0],o="",p=n.length%k,u=n.length,q=0;u>q;q++)o+=n.charAt(q),!((q-p+1)%k)&&u-k>q&&(o+=h);b[0]=o}return b[1]=a[1]&&b[1]?g+b[1]:"",x+((e?"-":"")+b[0]+b[1])+t},b.equations={count:function(a){return a.length},sum:function(a){var b,c=a.length,d=0;for(b=0;c>b;b++)d+=a[b];return d},mean:function(a){var c=b.equations.sum(a);return c/a.length},median:function(a){var b,d=a.length;return d>1?(a.sort(function(a,b){return a-b}),b=Math.floor(d/2),d%2?a[b]:(a[b-1]+a[b])/2):c.invalid("median",1)},mode:function(a){var b,c,d,e={},f=1,g=[a[0]];for(b=0;b<a.length;b++)c=a[b],e[c]=e[c]?e[c]+1:1,d=e[c],d>f?(g=[c],f=d):d===f&&(g.push(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){for(var e,f=b.equations.mean(a),g=0,h=a.length;h--;)g+=Math.pow(a[h]-f,2);return e=a.length-(d?0:1),0===e?c.invalid("variance",0):g/=e},varp:function(a){return b.equations.variance(a,!0)},vars:function(a){return b.equations.variance(a)},stdevs:function(a){var c=b.equations.variance(a);return Math.sqrt(c)},stdevp:function(a){var c=b.equations.variance(a,!0);return Math.sqrt(c)}},b.addWidget({id:"math",priority:100,options:{math_data:"math",math_ignore:[],math_mask:"#,##0.00",math_complete:null,math_priority:["row","above","col"],math_prefix:"",math_suffix:"",math_event:"recalculate"},init:function(a,d,e,f){var g=b.hasWidget(a,"filter")?"filterEnd":"updateComplete";e.$table.off((c.events+" updateComplete.tsmath "+f.math_event).replace(/\s+/g," ")).on(c.events+" "+f.math_event,function(a){var d="tablesorter-initialized"===a.type;(!f.math_isUpdating||d)&&(/filter/.test(a.type)||b.computeColumnIndex(e.$table.children("tbody").children()),c.recalculate(e,f,d))}).on(g+".tsmath",function(){setTimeout(function(){f.math_isUpdating&&e.debug&&console.groupEnd&&console.groupEnd(),f.math_isUpdating=!1},40)}),f.math_isUpdating=!1},remove:function(a,b,d,e){e||b.$table.off((c.events+" updateComplete.tsmath "+d.math_event).replace(/\s+/g," ")).find("[data-"+d.math_data+"]").empty()}})}(jQuery);
b.formatMask=function(a,b,c,d){if(!a||isNaN(+b))return b;var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t="",u=a.length,v=a.search(/[0-9\-\+#]/),w=v>0?a.substring(0,v):"",x=w;if(v>0&&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,""!==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=0>b?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"),i>-1)for(;l[0].length<a[0].length-i;)l[0]="0"+l[0];else 0===+l[0]&&(l[0]="");if(b=b.split("."),b[0]=l[0],k=m[1]&&m[m.length-1].length){for(n=b[0],o="",p=n.length%k,u=n.length,q=0;u>q;q++)o+=n.charAt(q),!((q-p+1)%k)&&u-k>q&&(o+=h);b[0]=o}return b[1]=a[1]&&b[1]?g+b[1]:"",x+((e?"-":"")+b[0]+b[1])+t},b.equations={count:function(a){return a.length},sum:function(a){var b,c=a.length,d=0;for(b=0;c>b;b++)d+=a[b];return d},mean:function(a){var c=b.equations.sum(a);return c/a.length},median:function(a){var b,d=a.length;return d>1?(a.sort(function(a,b){return a-b}),b=Math.floor(d/2),d%2?a[b]:(a[b-1]+a[b])/2):c.invalid("median",1)},mode:function(a){var b,c,d,e={},f=1,g=[a[0]];for(b=0;b<a.length;b++)c=a[b],e[c]=e[c]?e[c]+1:1,d=e[c],d>f?(g=[c],f=d):d===f&&(g.push(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){for(var e,f=b.equations.mean(a),g=0,h=a.length;h--;)g+=Math.pow(a[h]-f,2);return e=a.length-(d?0:1),0===e?c.invalid("variance",0):g/=e},varp:function(a){return b.equations.variance(a,!0)},vars:function(a){return b.equations.variance(a)},stdevs:function(a){var c=b.equations.variance(a);return Math.sqrt(c)},stdevp:function(a){var c=b.equations.variance(a,!0);return Math.sqrt(c)}},b.addWidget({id:"math",priority:100,options:{math_data:"math",math_ignore:[],math_mask:"#,##0.00",math_complete:null,math_priority:["row","above","col"],math_prefix:"",math_suffix:"",math_event:"recalculate"},init:function(a,d,e,f){var g=b.hasWidget(a,"filter")?"filterEnd":"updateComplete";e.$table.off((c.events+" updateComplete.tsmath "+f.math_event).replace(/\s+/g," ")).on(c.events+" "+f.math_event,function(a){var d="tablesorter-initialized"===a.type;(!f.math_isUpdating||d)&&(/filter/.test(a.type)||b.computeColumnIndex(e.$table.children("tbody").children()),c.recalculate(e,f,d))}).on(g+".tsmath",function(){setTimeout(function(){f.math_isUpdating&&e.debug&&console.groupEnd&&console.groupEnd(),f.math_isUpdating=!1},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," ")).find("[data-"+d.math_data+"]").empty()}})}(jQuery);

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 09-01-2015 (v2.23.3)*/
/*! tablesorter (FORK) - updated 09-05-2015 (v2.23.3)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -1810,13 +1810,12 @@
ts.applyWidgetOptions = function( table, c ){
var indx, widget,
len = c.widgets.length,
wo = c.widgetOptions;
len = c.widgets.length;
if (len) {
for (indx = 0; indx < len; indx++) {
widget = ts.getWidgetById( c.widgets[indx] );
if ( widget && 'options' in widget ) {
wo = table.config.widgetOptions = $.extend( true, {}, widget.options, wo );
c.widgetOptions = $.extend( true, {}, widget.options, c.widgetOptions );
}
}
}
@ -1826,7 +1825,6 @@
table = $(table)[0]; // in case this is called externally
var indx, len, names, widget, name, applied,
c = table.config,
wo = c.widgetOptions,
tableClass = ' ' + c.table.className + ' ',
widgets = [],
time, time2, w, wd;
@ -1884,14 +1882,14 @@
c.widgetInit[ name ] = true;
if (table.hasInitialized) {
// don't reapply widget options on tablesorter init
ts.applyWidgetOptions( table, c );
ts.applyWidgetOptions( table, table.config );
}
if ( 'init' in widget ) {
applied = true;
if (c.debug) {
console[ console.group ? 'group' : 'log' ]( 'Initializing ' + name + ' widget' );
}
widget.init(table, widget, c, wo);
widget.init(table, widget, table.config, table.config.widgetOptions);
}
}
if ( !init && 'format' in widget ) {
@ -1899,7 +1897,7 @@
if (c.debug) {
console[ console.group ? 'group' : 'log' ]( 'Updating ' + name + ' widget' );
}
widget.format(table, c, wo, false);
widget.format(table, table.config, table.config.widgetOptions, false);
}
if (c.debug) {
if (applied) {
@ -3077,7 +3075,7 @@
c.$table.addClass( 'hasFilters' );
// define timers so using clearTimeout won't cause an undefined error
wo.searchTimer = null;
wo.filter_searchTimer = null;
wo.filter_initTimer = null;
wo.filter_formatterCount = 0;
wo.filter_formatterInit = [];
@ -3489,10 +3487,10 @@
},
searching: function( table, filter, skipFirst ) {
var wo = table.config.widgetOptions;
clearTimeout( wo.searchTimer );
clearTimeout( wo.filter_searchTimer );
if ( typeof filter === 'undefined' || filter === true ) {
// delay filtering
wo.searchTimer = setTimeout( function() {
wo.filter_searchTimer = setTimeout( function() {
tsf.checkFilters( table, filter, skipFirst );
}, wo.filter_liveSearch ? wo.filter_searchDelay : 10 );
} else {

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 09-01-2015 (v2.23.3)*/
/*! tablesorter (FORK) - updated 09-05-2015 (v2.23.3)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -731,7 +731,7 @@
c.$table.addClass( 'hasFilters' );
// define timers so using clearTimeout won't cause an undefined error
wo.searchTimer = null;
wo.filter_searchTimer = null;
wo.filter_initTimer = null;
wo.filter_formatterCount = 0;
wo.filter_formatterInit = [];
@ -1143,10 +1143,10 @@
},
searching: function( table, filter, skipFirst ) {
var wo = table.config.widgetOptions;
clearTimeout( wo.searchTimer );
clearTimeout( wo.filter_searchTimer );
if ( typeof filter === 'undefined' || filter === true ) {
// delay filtering
wo.searchTimer = setTimeout( function() {
wo.filter_searchTimer = setTimeout( function() {
tsf.checkFilters( table, filter, skipFirst );
}, wo.filter_liveSearch ? wo.filter_searchDelay : 10 );
} else {