Build: add combined file with selected widgets & parsers. See #855

NOTE: the core js/jquery.tablesorter.js file is no longer UMD wrapped!; this is done by the build process now

Updated various parser & widget comments
This commit is contained in:
Mottie 2015-03-28 15:03:50 -05:00
parent bde0a33f3c
commit 263aa97e66
82 changed files with 9189 additions and 349 deletions

View File

@ -24,12 +24,49 @@ module.exports = function( grunt ) {
'resizable',
'saveSort'
// 'addResizeEvent', // included with stickyHeaders widget
// 'zeba' // included in core
]
// 'zebra' // included in core
],
standardWidgetFileName: 'jquery.tablesorter.widgets.js',
wrappers : {
widgetPrefix: 'js/widgets/widget-',
widgetSuffix: '.js',
parserPrefix: 'js/parsers/parser-',
parserSuffix: '.js'
},
wrapperUMD: {
// tablesorter core
coreBanner: '(function(factory) {\n' +
" if (typeof define === 'function' && define.amd) {\n" +
" define(['jquery'], factory);\n" +
" } else if (typeof module === 'object' && typeof module.exports === 'object') {\n" +
" module.exports = factory(require('jquery'));\n" +
' } else {\n' +
' factory(jQuery);\n' +
' }\n' +
'}(function($) {\n\n',
// widgets wrapper & combined wrapper - may need a separate entry when this wrapper is redefined to make
// widgets a dependency of the core (see https://github.com/Mottie/tablesorter/issues/855)
banner: '<%= pkg.banner %>/* Includes widgets ( <%= pkg.selectedWidgets %> <%= pkg.selectedParsers %>) */\n' +
'(function(factory) {\n' +
" if (typeof define === 'function' && define.amd) {\n" +
" define(['jquery'], factory);\n" +
" } else if (typeof module === 'object' && typeof module.exports === 'object') {\n" +
" module.exports = factory(require('jquery'));\n" +
' } else {\n' +
' factory(jQuery);\n' +
' }\n' +
'}(function($) {\n\n',
footer: '\nreturn $.tablesorter;\n}));\n'
},
noModBanner: '/*** This file is dynamically generated ***\n' +
'█████▄ ▄████▄ █████▄ ▄████▄ ██████ ███████▄ ▄████▄ █████▄ ██ ██████ ██ ██\n' +
'██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██\n' +
'██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀▀██\n' +
'█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀\n*/\n'
},
// example widgets = [ 'pager','column', 'filter', 'stickyHeaders' ];
addWidgetDependencies = function(widgets) {
// example widgets = [ 'pager', 'column', 'filter', 'stickyHeaders' ];
addWidgetDependencies = function( widgets ) {
var indx, dep,
maxDeps = 40, // just in case (there are currently 27 widgets)
len = widgets.length,
@ -37,11 +74,11 @@ module.exports = function( grunt ) {
for ( dep in deps ) {
if ( typeof dep === 'string' ) {
for ( indx = 0; indx < len; indx++ ) {
// make sure indexOf is not matching "column" instead of "columnSelector" with surrounding spaces
if ( (' ' + dep + ' ').indexOf(' ' + widgets[indx] + ' ') >= 0 && widgets.indexOf( deps[dep] ) < 0 ) {
widgets.push( deps[dep] );
// keep checking newly added widgets, in case "filter" is added and "storage" hasn't been
if (len < maxDeps) { len++; }
// make sure indexOf is not matching 'column' instead of 'columnSelector' with surrounding spaces
if ( ( ' ' + dep + ' ' ).indexOf( ' ' + widgets[indx] + ' ' ) >= 0 && widgets.indexOf( deps[ dep ] ) < 0 ) {
widgets.push( deps[ dep ] );
// keep checking newly added widgets, in case 'filter' is added and 'storage' hasn't been
if ( len < maxDeps ) { len++; }
continue;
}
}
@ -49,22 +86,33 @@ module.exports = function( grunt ) {
}
return widgets;
},
formFileNames = function(){
formFileNames = function() {
var wrap = defaults.wrappers;
// add widget path & file extension
pkg.processedWidgets = ( widgetFilePrefix +
pkg.selectedWidgets.join( widgetFileSuffix + ',' + widgetFilePrefix ) +
widgetFileSuffix ).split( ',' );
pkg.processedWidgets = ( wrap.widgetPrefix +
pkg.selectedWidgets.join( wrap.widgetSuffix + ',' + wrap.widgetPrefix ) +
wrap.widgetSuffix ).split( ',' );
console.info( 'Creating a widgets file with: ' + pkg.selectedWidgets.join(', ') );
if ( pkg.selectedParsers ) {
// parser path & file extension
pkg.processedParsers = ( wrap.parserPrefix +
pkg.selectedParsers.join( wrap.parserSuffix + ',' + wrap.parserPrefix ) +
wrap.parserSuffix ).split( ',' );
console.info( 'Creating a combined file with selected widgets & these parsers: ' + pkg.selectedParsers.join(', ') );
// make this look nice for the banner
pkg.selectedParsers = ') & parsers ( ' + pkg.selectedParsers + ' ';
}
console.info( pkg.processedParsers );
};
// minified banner template - updated ##/##/20## (v2.##.##)
pkg.banner = '/*! <%= pkg.name %> (FORK) widgets - updated ' +
pkg.banner = '/*! <%= pkg.name %> (FORK) - updated ' +
'<%= grunt.template.today("mm-dd-yyyy") %> (v<%= pkg.version %>)*/\n';
widgetFilePrefix = 'js/widgets/widget-';
widgetFileSuffix = '.js';
pkg.buildWidget = 'jquery.tablesorter.widgets.js';
pkg.buildWidget = defaults.standardWidgetFileName;
pkg.buildCombined = 'jquery.tablesorter.combined.js';
pkg.processedParsers = '!js/parsers/*.js';
// Project configuration.
grunt.initConfig({
@ -80,26 +128,16 @@ module.exports = function( grunt ) {
},
copy: {
main: {
expand: true,
src: [
'js/jquery.*.js',
'!js/_test-*.js',
'!js/*.min.js',
],
dest: 'dist/',
filter: 'isFile'
},
css: {
files : [{
expand: true,
dot: true,
flatten: true,
src: ['css/*.css', 'addons/pager/*.css'],
src: [ 'css/*.css', 'addons/pager/*.css' ],
dest: 'dist/css/',
rename: function(dest, src) {
if (/black-ice/.test(src)) {
src = src.replace(/-/, '');
rename: function( dest, src ) {
if ( /black-ice/.test( src ) ) {
src = src.replace( /-/, '' );
}
return dest + src;
}
@ -120,19 +158,18 @@ module.exports = function( grunt ) {
},
concat: {
main: {
options: {
banner: defaults.wrapperUMD.coreBanner,
footer: defaults.wrapperUMD.footer
},
src: [ 'js/jquery.tablesorter.js' ],
dest: 'dist/js/jquery.tablesorter.js'
},
widgets: {
options: {
banner: '<%= pkg.banner %>/* Includes: <%= pkg.selectedWidgets %> */\n' +
"(function(factory) {\n" +
" if (typeof define === 'function' && define.amd) {\n" +
" define(['jquery'], factory);\n" +
" } else if (typeof module === 'object' && typeof module.exports === 'object') {\n" +
" module.exports = factory(require('jquery'));\n" +
" } else {\n" +
" factory(jQuery);\n" +
" }\n" +
"}(function($) {\n\n",
footer: "\n\n return $.tablesorter;\n}));\n"
banner: defaults.wrapperUMD.banner,
footer: defaults.wrapperUMD.footer
},
src: [
'<%= pkg.processedWidgets %>',
@ -141,43 +178,60 @@ module.exports = function( grunt ) {
],
dest: 'dist/js/<%= pkg.buildWidget %>'
},
// keep all the existing jsFiddle demos from breaking
copyback: {
everything: {
options: {
banner: '/*** This file is dynamically generated ***\n' +
'█████▄ ▄████▄ █████▄ ▄████▄ ██████ ███████▄ ▄████▄ █████▄ ██ ██████ ██ ██\n' +
'██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██\n' +
'██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀▀██\n' +
'█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀\n*/\n'
banner: defaults.wrapperUMD.banner,
footer: defaults.wrapperUMD.footer
},
src: [
'js/jquery.tablesorter.js',
'<%= pkg.processedWidgets %>',
'<%= pkg.processedParsers %>',
'!js/widgets/_test-*.js',
'!js/widgets/*.min.js'
],
dest: 'dist/js/<%= pkg.buildCombined %>'
},
// keep all the existing jsFiddle demos from breaking
copybackWidgets: {
options: {
banner: defaults.noModBanner
},
src : ['dist/js/<%= pkg.buildWidget %>'],
dest: 'js/<%= pkg.buildWidget %>'
},
copybackCombined: {
options: {
banner: defaults.noModBanner
},
src : ['dist/js/<%= pkg.buildCombined %>'],
dest: 'js/<%= pkg.buildCombined %>'
}
},
jshint: {
files: {
src: [
'addons/pager/*.js',
'!addons/pager/*.min.js',
'js/jquery.*.js',
'js/**/*.js',
'!js/_test-*.js',
'!js/**/_test-*.js',
'!js/*.min.js',
'!js/**/semver*.js'
'addons/pager/*.js',
'!addons/pager/*.min.js',
'js/jquery.*.js',
'js/**/*.js',
'!js/_test-*.js',
'!js/**/_test-*.js',
'!js/*.min.js',
'!js/**/semver*.js'
]
},
options: {
globals: {
"localStorage": false,
"navigator": false,
"console": false,
"alert": false
'localStorage': false,
'navigator': false,
'console': false,
'alert': false
},
"loopfunc": true,
"jquery": true,
"browser": true
'loopfunc': true,
'jquery': true,
'browser': true
}
},
@ -191,8 +245,8 @@ module.exports = function( grunt ) {
expand: true,
cwd: './js/', // Src matches are relative to this path.
src: [
'*.js',
'**/*.js',
'!jquery.tablesorter.js',
'!_test-*.js',
'!**/_test-*.js',
'!*.min.js',
@ -200,7 +254,19 @@ module.exports = function( grunt ) {
],
dest: 'dist/js/',
ext: '.min.js', // Dist files will have this extension.
extDot: 'last' // Extensions in filenames begin after the first dot
extDot: 'last' // Extensions in filenames begin after this dot
}]
},
// jquery.tablesorter.min.js is being minified from js/jquery.tablesorter.js
// so it doesn't include the UMD wrapper! Point to the dist/js/ version
main: {
files : [{
expand: true,
cwd: './dist/js/',
src: [ 'jquery.tablesorter.js' ],
dest: 'dist/js/',
ext: '.min.js', // Dist files will have this extension.
extDot: 'last' // Extensions in filenames begin after this dot
}]
},
pageraddon: {
@ -216,7 +282,7 @@ module.exports = function( grunt ) {
expand: true,
flatten: true,
cwd: 'dist/css',
src: ['*.css'],
src: ['*.css', '!_test-*.css'],
dest: 'dist/css',
ext: '.min.css',
extDot: 'last'
@ -264,31 +330,37 @@ module.exports = function( grunt ) {
];
// basic = same as before: core, widgets, filterformatter all separate
grunt.registerTask( 'default', 'Default build', function(){
grunt.registerTask( 'default', 'Default build', function() {
pkg.selectedWidgets = addWidgetDependencies( defaults.standardWidgets );
formFileNames();
grunt.task.run(tasks);
});
// enter "grunt custom:{filename}" (not including the ".json")
// enter 'grunt custom:{filename}' (not including the '.json')
// to load in a custom json file
// the expected JSON format is (with custom widgets in a string):
// { "widgets" : "columnHighlight filter resizable saveSort stickyHeaders uitheme" }
grunt.registerTask( 'custom', 'Custom build', function(file){
var temp, widgets, deps = true;
grunt.registerTask( 'custom', 'Custom build', function(file) {
var temp, widgets,
parsers = '',
deps = true;
/* Allow developer to set up a custom widget build (json file will have settings)*/
try {
temp = grunt.file.readJSON( file );
if (temp) {
if ( temp ) {
parsers = temp.parsers;
// include dependencies?
deps = ('includeDependencies' in temp) ? temp.includeDependencies : true;
// custom file name?
pkg.buildWidget = ('destFileName' in temp) ? temp.destFileName : "jquery.tablesorter.custom-widgets.js";
pkg.buildWidget = ('destFileName' in temp) ? temp.destFileName : 'jquery.tablesorter.custom-widgets.js';
// widgets to include
widgets = (temp.widgets || '');
if (widgets.replace(/\s+/g,'') === '') {
grunt.fail.warn('Aborting... No widgets found in custom build file.');
grunt.log.error('No widgets found in custom build file.');
console.info('Continuing build with default widgets...');
temp = defaults.standardWidgets;
pkg.buildWidget = defaults.standardWidgetFileName;
} else {
temp = widgets.split(/\s+/);
}
@ -300,6 +372,7 @@ module.exports = function( grunt ) {
}
// add dependencies
pkg.selectedWidgets = deps ? addWidgetDependencies( temp ) : temp;
pkg.selectedParsers = parsers.split( /\s+/ );
formFileNames();
grunt.task.run(tasks);
});
@ -311,7 +384,7 @@ module.exports = function( grunt ) {
len = projectFile.length;
for ( i = 0; i < len; i++ ) {
if ( !grunt.file.exists( projectFile[ i ] ) ) {
grunt.log.error( "file " + projectFile[ i ] + " not found" );
grunt.log.error( 'file ' + projectFile[ i ] + ' not found' );
return true; // return false to abort the execution
}
project = grunt.file.readJSON( projectFile[ i ] ); // get file as json object

View File

@ -5,7 +5,6 @@
"jquery": ">=1.2.6"
},
"main": [
"js/jquery.tablesorter.js",
"js/jquery.tablesorter.widgets.js"
"dist/js/jquery.tablesorter.combined.js"
]
}

4436
dist/js/jquery.tablesorter.combined.js vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,13 @@
(function(factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = factory(require('jquery'));
} else {
factory(jQuery);
}
}(function($) {
/*! TableSorter (FORK) v2.21.3 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
@ -18,15 +28,7 @@
*/
/*jshint browser:true, jquery:true, unused:false, expr: true */
/*global console:false, alert:false, require:false, define:false, module:false */
(function(factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = factory(require('jquery'));
} else {
factory(jQuery);
}
}(function($) {
;(function($){
'use strict';
$.extend({
/*jshint supernew:true */
@ -2092,5 +2094,7 @@
}
});
return ts;
})(jQuery);
return $.tablesorter;
}));

File diff suppressed because one or more lines are too long

View File

@ -1,13 +1,13 @@
/*! tablesorter (FORK) widgets - updated 03-26-2015 (v2.21.3)*/
/* Includes: storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort */
/*! tablesorter (FORK) - updated 03-28-2015 (v2.21.3)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = factory(require('jquery'));
} else {
factory(jQuery);
}
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = factory(require('jquery'));
} else {
factory(jQuery);
}
}(function($) {
/*! Widget: storage - updated 3/26/2015 (v2.21.3) */
@ -2344,6 +2344,5 @@ ts.addWidget({
})(jQuery);
return $.tablesorter;
return $.tablesorter;
}));

File diff suppressed because one or more lines are too long

View File

@ -1,18 +1,6 @@
/*!
* Extract out date parsers
* 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 (ignore any other text)
* e.g. "Sue's Birthday! Jun 26, 2004 7:22 AM (8# 2oz)"
* demo: http://jsfiddle.net/Mottie/abkNM/4165/
*/
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 (ignore any other text)
* demo: http://jsfiddle.net/Mottie/abkNM/4166/
*/
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 (ignore any other text)
* demo: http://jsfiddle.net/Mottie/abkNM/4167/
*/
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 (ignore any other text)
* demo: http://jsfiddle.net/Mottie/abkNM/4168/
*/
/*! 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);

View File

@ -1,7 +1,2 @@
/*! ISO-8601 date parser - 10/26/2014 (v2.18.0)
* This parser will work with dates in ISO8601 format
* 2013-02-18T18:18:44+00:00
* Written by Sean Ellingham :https://github.com/seanellingham
* See https://github.com/Mottie/tablesorter/issues/247
*/
/*! 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):!1},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);

View File

@ -1,4 +1,2 @@
/*! Month parser - 10/26/2014 (v2.18.0)
* Demo: http://jsfiddle.net/Mottie/abkNM/4169/
*/
/*! Parser: Month - updated 10/26/2014 (v2.18.0) */
!function(a){"use strict";var b=a.tablesorter;b.dates=a.extend({},b.dates,{monthCased:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),b.dates.monthLower=b.dates.monthCased.join(",").toLocaleLowerCase().split(","),b.addParser({id:"month",is:function(){return!1},format:function(c,d){if(c){var e=-1,f=d.config,g=f.ignoreCase?c.toLocaleLowerCase():c;return a.each(b.dates["month"+(f.ignoreCase?"Lower":"Cased")],function(a,b){return 0>e&&g.match(b)?(e=a,!1):void 0}),0>e?c:e}return c},type:"numeric"})}(jQuery);

View File

@ -1,7 +1,4 @@
/*!
* Range date parsers
* 2/23/2015 (v2.21.0)
*/
/*! Parser: date ranges - updated 2/23/2015 (v2.21.0) */
!function(a){"use strict";var b={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})/};/*! date-range MMDDYYYY */
a.tablesorter.addParser({id:"date-range-mdy",is:function(){return!1},format:function(a){var c,d,e,f,g=[];if(d=a.replace(/\s+/g," ").replace(/[\/\-.,]/g,"-").match(b.mdy),f=d&&d.length){for(e=0;f>e;e++)c=new Date(d[e]),g.push(c instanceof Date&&isFinite(c)?c.getTime():d[e]);return g.sort().join(" - ")}return a},type:"text"}),/*! date-range DDMMYYYY */
a.tablesorter.addParser({id:"date-range-dmy",is:function(){return!1},format:function(a){var c,d,e,f,g=[];if(d=a.replace(/\s+/g," ").replace(/[\/\-.,]/g,"-").match(b.dmy),f=d&&d.length){for(e=0;f>e;e++)c=new Date((""+d[e]).replace(b.dmyreplace,"$2/$1/$3")),g.push(c instanceof Date&&isFinite(c)?c.getTime():d[e]);return g.sort().join(" - ")}return a},type:"text"}),/*! date-range DDMMYYYY */

View File

@ -1,4 +1,2 @@
/*! Two digit year parser - 10/26/2014 (v2.18.0)
* Demo: http://mottie.github.io/tablesorter/docs/example-parsers-dates.html
*/
/*! Parser: two digit year - updated 10/26/2014 (v2.18.0) */
!function(a){"use strict";var b=50,c=a.tablesorter,d=(new Date).getFullYear();c.dates=a.extend({},c.dates,{regxxxxyy:/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{2})/,regyyxxxx:/(\d{2})[\/\s](\d{1,2})[\/\s](\d{1,2})/}),c.formatDate=function(a,c,e,f){if(a){var g,h,i=a.replace(/\s+/g," ").replace(/[-.,]/g,"/").replace(c,e),j=new Date(i);if(j instanceof Date&&isFinite(j)){for(g=j.getFullYear(),h=f&&f.config.dateRange||b;d-g>h;)g+=100;return j.setFullYear(g)}}return a},a.tablesorter.addParser({id:"ddmmyy",is:function(){return!1},format:function(a,b){return c.formatDate(a,c.dates.regxxxxyy,"$2/$1/19$3",b)},type:"numeric"}),a.tablesorter.addParser({id:"mmddyy",is:function(){return!1},format:function(a,b){return c.formatDate(a,c.dates.regxxxxyy,"$1/$2/19$3",b)},type:"numeric"}),a.tablesorter.addParser({id:"yymmdd",is:function(){return!1},format:function(a,b){return c.formatDate(a,c.dates.regyyxxxx,"$2/$3/19$1",b)},type:"numeric"})}(jQuery);

View File

@ -1,4 +1,2 @@
/*! Weekday parser - 10/26/2014 (v2.18.0)
* Demo: http://jsfiddle.net/Mottie/abkNM/4169/
*/
/*! Parser: weekday - updated 10/26/2014 (v2.18.0) */
!function(a){"use strict";var b=a.tablesorter;b.dates=a.extend({},b.dates,{weekdayCased:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}),b.dates.weekdayLower=b.dates.weekdayCased.join(",").toLocaleLowerCase().split(","),b.addParser({id:"weekday",is:function(){return!1},format:function(c,d){if(c){var e=-1,f=d.config;return c=f.ignoreCase?c.toLocaleLowerCase():c,a.each(b.dates["weekday"+(f.ignoreCase?"Lower":"Cased")],function(a,b){return 0>e&&c.match(b)?(e=a,!1):void 0}),0>e?c:e}return c},type:"numeric"})}(jQuery);

View File

@ -1,11 +1,4 @@
/*!
* Extract dates using popular natural language date parsers
* 10/26/2014 (v2.18.0)
*/
!function(a){"use strict";/*! Sugar (http://sugarjs.com/dates#comparing_dates)
* demo: http://jsfiddle.net/Mottie/abkNM/4163/
*/
a.tablesorter.addParser({id:"sugar",is:function(){return!1},format:function(a){var b=Date.create?Date.create(a):a?new Date(a):a;return b instanceof Date&&isFinite(b)?b.getTime():a},type:"numeric"}),/*! Datejs (http://www.datejs.com/)
* demo: http://jsfiddle.net/Mottie/abkNM/4164/
*/
/*! Parser: dates - updated 10/26/2014 (v2.18.0) */
!function(a){"use strict";/*! Sugar (http://sugarjs.com/dates#comparing_dates) */
a.tablesorter.addParser({id:"sugar",is:function(){return!1},format:function(a){var b=Date.create?Date.create(a):a?new Date(a):a;return b instanceof Date&&isFinite(b)?b.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);

View File

@ -1,3 +1,3 @@
/*! Duration parser */
/*! 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;k>c;c++)f+="(?:(\\d+)\\s*"+j[c]+"\\s*)?";e.durationRegex=new RegExp(f,"i")}for(d=(e.usNumberFormat?a.replace(/,/g,""):a.replace(/(\d)(?:\.|\s*)(\d)/g,"$1$2")).match(e.durationRegex),c=1;k+1>c;c++)g+=(i+(d[c]||0)).slice(-h);return g},type:"text"}),/*! Countdown parser ( hh:mm:ss ) */
a.tablesorter.addParser({id:"countdown",is:function(){return!1},format:function(a,b){for(var c=b.config.durationLength||4,d=new Array(c+1).join("0"),e=a.split(/\s*:\s*/),f=e.length,g=[];f;)g.push((d+(e[--f]||0)).slice(-c));return g.length?g.reverse().join(""):a},type:"text"})}(jQuery);

View File

@ -1,6 +1,2 @@
/*! Distance parser
* This parser will parser numbers like 5'10" (5 foot 10 inches)
* and 31½ into sortable values.
* Demo: http://jsfiddle.net/Mottie/abkNM/154/
*/
/*! Parser: distance */
!function(a){"use strict";var b=a.tablesorter;b.symbolRegex=/[\u215b\u215c\u215d\u215e\u00bc\u00bd\u00be]/g,b.processFractions=function(c,d){if(c){var e,f=0;c=a.trim(c.replace(/\"/,"")),/\s/.test(c)&&(f=b.formatFloat(c.split(" ")[0],d),c=a.trim(c.substring(c.indexOf(" "),c.length))),/\//g.test(c)?(e=c.split("/"),c=f+parseInt(e[0],10)/parseInt(e[1]||1,10)):b.symbolRegex.test(c)&&(c=f+c.replace(b.symbolRegex,function(a){return{"⅛":".125","⅜":".375","⅝":".625","⅞":".875","¼":".25","½":".5","¾":".75"}[a]}))}return c||0},a.tablesorter.addParser({id:"distance",is:function(){return!1},format:function(a,c){if(""===a)return"";var d=/^\s*\S*(\s+\S+)?\s*\'/.test(a)?a.split("'"):[0,a],e=b.processFractions(d[0],c),f=b.processFractions(d[1],c);return/[\'\"]/.test(a)?parseFloat(e)+(parseFloat(f)/12||0):parseFloat(e)+parseFloat(f)},type:"numeric"})}(jQuery);

View File

@ -1,5 +1,2 @@
/*! File Type parser
* When a file type extension is found, the equivalent name is
* prefixed into the parsed data, so sorting occurs in groups
*/
/*! Parser: filetype */
!function(a){"use strict";a.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"}},a.tablesorter.addParser({id:"filetype",is:function(){return!1},format:function(b,c){var d,e=c.config,f=e.widgetOptions,g=b.lastIndexOf("."),h=a.tablesorter.fileTypes.separator,i=a.tablesorter.fileTypes.matching,j=a.tablesorter.fileTypes.equivalents;if(i||(d=[],a.each(j,function(a,b){d.push(b)}),i=a.tablesorter.fileTypes.matching=h+d.join(h)+h),g>=0&&(d=h+b.substring(g+1,b.length)+h,i.indexOf(d)>=0))for(g in j)if((h+j[g]+h).indexOf(d)>=0)return g+(f.group_separator?f.group_separator:"-")+b;return b},type:"text"})}(jQuery);

View File

@ -1,6 +1,2 @@
/*! Title parser - updated 9/15/2014 (v2.17.8)
* This parser will remove "The", "A" and "An" from the beginning of a book
* or movie title, so it sorts by the second word or number
* Demo: http://jsfiddle.net/Mottie/abkNM/5/
*/
/*! 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&&h.test(k))?k:k.replace(g,"")},type:"text"})}(jQuery);

View File

@ -1,4 +1,2 @@
/*! image alt attribute parser for jQuery 1.7+ & tablesorter 2.7.11+
* New 7/17/2014 (v2.17.5)
*/
/*! 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);

View File

@ -1,2 +1,2 @@
/*! parser: input & select - updated 3/26/2015 (v2.21.3) */
/*! Parser: input & select - updated 3/26/2015 (v2.21.3) */
!function(a){"use strict";var b=function(){};a.tablesorter.addParser({id:"inputs",is:function(){return!1},format:function(b,c,d){return a(d).find("input").val()||b},parsed:!0,type:"text"}),a.tablesorter.addParser({id:"checkbox",is:function(){return!1},format:function(b,c,d,e){var f=a(d),g=c.config.widgetOptions,h=g.group_checkbox?g.group_checkbox:["checked","unchecked"],i=f.find('input[type="checkbox"]'),j=i.length?i[0].checked:"";return f.closest("tr").toggleClass("checked-"+e,j),i.length?h[j?0:1]:b},parsed:!0,type:"text"}),a.tablesorter.addParser({id:"select",is:function(){return!1},format:function(b,c,d){return a(d).find("select").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){return a(d).find("textarea").val()||b},parsed:!0,type:"text"}),a(function(){a("table").on("tablesorter-initialized",function(){var c=function(b){b&&a(":focus").blur()};a(this).children("tbody").on("mouseleave",function(a){c("TBODY"===a.target.nodeName)}).on("focus","select, input, textarea",function(){a(this).data("ts-original-value",this.value)}).on("blur","input, textarea",function(){this.value=a(this).data("ts-original-value")}).on("change keyup","select, input, textarea",function(d){if(27===d.which)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=f.closest("td"),h=g.closest("table"),i=g[0].cellIndex,j=h[0].config||!1,k=j&&j.$headers&&j.$headers.eq(i);if(!j||k&&k.length&&(k.hasClass("parser-false")||k.hasClass("sorter-false")&&k.hasClass("filter-false")))return c();(f.val()!==f.data("ts-original-value")||"checkbox"===d.target.type)&&(f.data("ts-original-value",f.val()),h.trigger("updateCell",[f.closest("td"),e,function(){b(d,h,f)}]))}})})})}(jQuery);

View File

@ -1,7 +1,2 @@
/*! Metric parser
* Demo: http://jsfiddle.net/Mottie/abkNM/382/
* Set the metric name in the header (defaults to "m|meter"), e.g.
* <th data-metric-name="b|byte">HDD Size</th>
* <th data-metric-name="m|meter">Distance</th>
*/
/*! 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="(\\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)(",d="(\\d+)(\\s+)?(Z|E|P|T|G|M|k|h|da|d|c|m|µ|n|p|f|a|z|y)(";a.tablesorter.addParser({id:"metric",is:function(){return!1},format:function(e,f,g,h){var i,j,k="m|meter",l=a.tablesorter.formatFloat(e.replace(/[^\w,. \-()]/g,""),f),m=f.config.$headerIndexed[h],n=m.data("metric");if(n||(j=(m.attr("data-metric-name")||k).split("|"),n=[j[1]||j[0].substring(1),j[0]],n[2]=new RegExp(c+n[0]+"|"+n[1]+")"),n[3]=new RegExp(d+n[1]+")"),m.data("metric",n)),j=e.match(n[2])||e.match(n[3]))for(k in b)if(j[3].match(k))return i=/^[b|bit|byte|o|octet]/.test(j[4])?1:0,l*b[k][i];return l},type:"numeric"})}(jQuery);

View File

@ -1,4 +1,2 @@
/*! Named Numbers Parser - 10/26/2014 (v2.18.0)
* code modified from http://stackoverflow.com/a/12014376/145346
*/
/*! 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=d.numbers.hasOwnProperty(e)?d.numbers[e]:null,h=d.powers.hasOwnProperty(e)?d.powers[e]:null;g||isNaN(e)||(g=a.tablesorter.formatFloat(e||"",f)),null!==g?c+=g:e===d.hundred?c*=100:null!==h&&(b+=c*h,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;k>i;i++)f(j[i].toLowerCase(),h);return b=(b+c)*(g.match(e)?-1:1),b||d.numbers.hasOwnProperty(g)?b:a.tablesorter.formatFloat(g||"",h)},type:"numeric"})}(jQuery);

View File

@ -1,8 +1,5 @@
/*! Network parsers - IPv4, IPv6 and MAC Addresses - 10/26/2014 (v2.18.0) */
!function(a){"use strict";var b,c,d=a.tablesorter;/*! IPv6 Address parser (WIP)
* IPv6 Address (ffff:0000:0000:0000:0000:0000:0000:0000)
* needs to support short versions like "::8" or "1:2::7:8"
* and "::00:192.168.10.184" (embedded IPv4 address)
* see http://www.intermapper.com/support/tools/IPV6-Validator.aspx
*/
a.extend(d.regex,{},{ipv4Validate:/((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})/,ipv4Extract:/([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/,ipv6Validate:/^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/i}),d.addParser({id:"ipv6Address",is:function(a){return d.regex.ipv6Validate.test(a)},format:function(a,b){var c,e,f,g,h,i=b?"boolean"==typeof b?b:b&&b.config.ipv6HexFormat||!1:!1,j="",k="",l=8;if(a=a.replace(/\s*/g,""),d.regex.ipv4Validate.test(a)){for(g=a.match(d.regex.ipv4Extract),e="",c=1;c<g.length;c++)e+=("00"+parseInt(g[c],10).toString(16)).slice(-2)+(2===c?":":"");a=a.replace(d.regex.ipv4Extract,e)}if(-1==a.indexOf("::"))j=a;else{for(f=a.split("::"),h=0,c=0;c<f.length;c++)h+=f[c].split(":").length;for(j+=f[0]+":",c=0;l-h>c;c++)j+="0000:";j+=f[1]}for(g=j.split(":"),c=0;l>c;c++)g[c]=i?("0000"+g[c]).slice(-4):("00000"+(parseInt(g[c],16)||0)).slice(-5),k+=c!=l-1?g[c]+":":g[c];return i?k:k.replace(/:/g,"")},type:"numeric"}),c=function(a){return/^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/.test(a)},b=function(a,b){var c,e=a?a.split("."):"",f="",g=e.length;for(c=0;g>c;c++)f+=("000"+e[c]).slice(-3);return a?d.formatFloat(f,b):a},d.addParser({id:"ipAddress",is:c,format:b,type:"numeric"}),d.addParser({id:"ipv4Address",is:c,format:b,type:"numeric"}),d.addParser({id:"MAC",is:function(a){return d.regex.ipv6Validate.test(a)},format:function(b){var c="",d=b.replace(/[:.-]/g,"").match(/\w{2}/g);return a.each(d,function(a,b){c+=("000"+parseInt(b,16)).slice(-3)}),c},type:"numeric"})}(jQuery);
/*! Parser: network - updated 10/26/2014 (v2.18.0) */
!function(a){"use strict";var b,c,d=a.tablesorter;/*! IPv6 Address parser (WIP) */
a.extend(d.regex,{},{ipv4Validate:/((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})/,ipv4Extract:/([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/,ipv6Validate:/^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/i}),d.addParser({id:"ipv6Address",is:function(a){return d.regex.ipv6Validate.test(a)},format:function(a,b){var c,e,f,g,h,i=b?"boolean"==typeof b?b:b&&b.config.ipv6HexFormat||!1:!1,j="",k="",l=8;if(a=a.replace(/\s*/g,""),d.regex.ipv4Validate.test(a)){for(g=a.match(d.regex.ipv4Extract),e="",c=1;c<g.length;c++)e+=("00"+parseInt(g[c],10).toString(16)).slice(-2)+(2===c?":":"");a=a.replace(d.regex.ipv4Extract,e)}if(-1==a.indexOf("::"))j=a;else{for(f=a.split("::"),h=0,c=0;c<f.length;c++)h+=f[c].split(":").length;for(j+=f[0]+":",c=0;l-h>c;c++)j+="0000:";j+=f[1]}for(g=j.split(":"),c=0;l>c;c++)g[c]=i?("0000"+g[c]).slice(-4):("00000"+(parseInt(g[c],16)||0)).slice(-5),k+=c!=l-1?g[c]+":":g[c];return i?k:k.replace(/:/g,"")},type:"numeric"}),c=function(a){return/^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/.test(a)},b=function(a,b){var c,e=a?a.split("."):"",f="",g=e.length;for(c=0;g>c;c++)f+=("000"+e[c]).slice(-3);return a?d.formatFloat(f,b):a},/*! Parser: ipv4Address (a.k.a. ipAddress) */
d.addParser({id:"ipAddress",is:c,format:b,type:"numeric"}),d.addParser({id:"ipv4Address",is:c,format:b,type:"numeric"}),/*! Parser: MAC address */
d.addParser({id:"MAC",is:function(a){return d.regex.ipv6Validate.test(a)},format:function(b){var c="",d=b.replace(/[:.-]/g,"").match(/\w{2}/g);return a.each(d,function(a,b){c+=("000"+parseInt(b,16)).slice(-3)}),c},type:"numeric"})}(jQuery);

View File

@ -1,6 +1,2 @@
/*! Roman numeral parsers
* code modified from both:
* Steven Levithan @ http://blog.stevenlevithan.com/archives/javascript-roman-numeral-converter
* Jonathan Snook comment @ http://blog.stevenlevithan.com/archives/javascript-roman-numeral-converter#comment-16140
*/
/*! Parser: roman - updated 6/28/MMXIV (v2.17.3) */
!function(a){"use strict";var b=/^M*(?:D?C{0,3}|C[MD])(?:L?X{0,3}|X[CL])(?:V?I{0,3}|I[XV])$/i,c=/\b([MCDLXVI]+\b)/gi,d={I:1,V:5,X:10,L:50,C:100,D:500,M:1e3};a.tablesorter.addParser({id:"roman",is:function(){return!1},format:function(a){var c,e=a.toUpperCase().split(""),f=0;if(!a||!b.test(a))return a;for(;e.length;)c=d[e.shift()],f+=c*(c<d[e[0]]?-1:1);return f},type:"numeric"}),a.tablesorter.addParser({id:"roman-ignore",is:function(){return!1},format:function(e,f,g,h){var i,j,k=f.config,l=a.isArray(k.roman_ignore)?k.roman_ignore[h]:0,m=a.trim(isNaN(l)?e.replace(l,""):e.substring(0,e.length-l)).match(c),n=b.test(m),o=0;if(!n)return e;for(j=m[0],m=j.toUpperCase().split("");m.length;)i=d[m.shift()],i&&(o+=i*(i<d[m[0]]?-1:1));return o?e.replace(j,o):e},type:"text"}),a.tablesorter.addParser({id:"roman-extract",is:function(){return!1},format:function(e){var f,g=a.grep(e.split(/\b/),function(a){return b.test(a)?a:""}).join("").match(c),h=g?b.test(g):0,i=0;if(!h)return e;for(g=g[0].toUpperCase().split("");g.length;)f=d[g.shift()],f&&(i+=f*(f<d[g[0]]?-1:1));return i?i:e},type:"numeric"})}(jQuery);

View File

@ -1,5 +1,2 @@
/*! tablesorter Align Character widget - updated 2/7/2015 (v2.19.0)
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
/*! Widget: alignChar - updated 2/7/2015 (v2.19.0) */
!function(a){"use strict";var b=a.tablesorter;b.alignChar={init:function(c,d,e){d.$headers.filter("["+e.alignChar_charAttrib+"]").each(function(){var f=a(this),g={column:this.column,align:f.attr(e.alignChar_charAttrib),alignIndex:parseInt(f.attr(e.alignChar_indexAttrib)||0,10),adjust:parseFloat(f.attr(e.alignChar_adjustAttrib))||0};g.regex=new RegExp("\\"+g.align,"g"),"undefined"!=typeof g.align&&(e.alignChar_savedVars[this.column]=g,b.alignChar.setup(c,d,e,g))})},setup:function(b,c,d,e){if(!a.isEmptyObject(c.cache)){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t=[],u=[];for(f=0;f<c.$tbodies.length;f++)for(l=c.cache[f],o=l.normalized.length,g=0;o>g;g++){if(s=l.row?l.row[g]:l.normalized[g][c.columns].$row,m=s.find("td").eq(e.column).text().replace(/[ ]/g," "),n=(m.match(e.regex)||[]).length,n>0&&e.alignIndex>0)for(i=Math.min(e.alignIndex,n),h=0,k=0,j=0;h++<i;)j=m.indexOf(e.align,j+1),k=0>j?k:j;else k=m.indexOf(e.align);k>=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<c.$tbodies.length;f++)for(l=c.cache[f],o=l.normalized.length,g=0;o>g;g++)r=a(d.alignChar_wrap).length?a(d.alignChar_wrap).html(e.align)[0].outerHTML:e.align,s=l.row?l.row[g]:l.normalized[g][c.columns].$row,j=u[g].slice(e.align.length),s.find("td").eq(e.column).html('<span class="ts-align-wrap"><span class="ts-align-left" style="'+p+'">'+t[g]+'</span><span class="ts-align-right" style="'+q+'">'+(j.length?r+j:"")+"</span></span>");d.alignChar_initialized=!0}},remove:function(b,c,d){if(!a.isEmptyObject(c.cache)){var e,f,g,h,i,j;for(e=0;e<c.$tbodies.length;e++)for(h=c.cache[e],g=h.normalized.length,f=0;g>f;f++)i=h.row?h.row[f]:h.normalized[f][c.columns].$row,j=i.find("td").eq(d),j.html(j.text().replace(/\s/g," "))}}},b.addWidget({id:"alignChar",priority:100,options:{alignChar_wrap:"",alignChar_charAttrib:"data-align-char",alignChar_indexAttrib:"data-align-index",alignChar_adjustAttrib:"data-align-adjust"},init:function(a,c,d,e){e.alignChar_initialized=!1,e.alignChar_savedVars=[],b.alignChar.init(a,d,e),d.$table.on("pagerEnd refreshAlign",function(){d.$headers.filter("["+e.alignChar_charAttrib+"]").each(function(){b.alignChar.remove(a,d,this.column)}),b.alignChar.init(a,d,e)})},format:function(a,b,c){c.alignChar_initialized||b.$table.trigger("refreshAlign")},remove:function(a,c,d,e){e||(c.$headers.filter("["+d.alignChar_charAttrib+"]").each(function(){b.alignChar.remove(a,c,this.column)}),d.alignChar_initialized=!1)}})}(jQuery);

View File

@ -1,4 +1,2 @@
/*! tablesorter CSS Sticky Headers widget - updated 2/9/2015 (v2.19.1)
* Requires a modern browser, tablesorter v2.8+
*/
/*! Widget: cssStickyHeaders - updated 2/9/2015 (v2.19.1) */
!function(a,b){"use strict";var c=a.tablesorter;c.addWidget({id:"cssStickyHeaders",priority:10,options:{cssStickyHeaders_offset:0,cssStickyHeaders_addCaption:!1,cssStickyHeaders_attachTo:null,cssStickyHeaders_filteredToTop:!0},init:function(d,e,f,g){var h,i,j,k=f.$table,l=a(g.cssStickyHeaders_attachTo),m="ActiveXObject"in b,n=f.namespace+"cssstickyheader ",o=k.children("thead"),p=k.children("caption"),q=l.length?l:a(b),r=k.parent().closest("table."+c.css.table),s=r.length&&c.hasWidget(r[0],"cssStickyHeaders")?r.children("thead"):[],t=parseInt(k.css("border-top-width"),10)||0,u=g.cssStickyHeaders_addCaption,v=!1,w=!1,x=function(a,b){var c=0===b?"":"translate(0px,"+b+"px)";a.css({transform:c,"-ms-transform":c,"-webkit-transform":c})};p.length&&(h=k.height(),p.hide(),w=k.height()===h,p.show(),i=k.offset().top,x(p,20),v=k.offset().top!==i,x(p,0)),q.unbind("scroll resize ".split(" ").join(n).replace(/\s+/g," ")).bind("scroll resize ".split(" ").join(n),function(){g=f.widgetOptions,v&&(x(p,0),j=k.offset().top);var a=l.length?l.offset().top:q.scrollTop(),b=(p.outerHeight(!0)||0)+(parseInt(k.css("padding-top"),10)||0)+(parseInt(k.css("border-spacing"),10)||0),c=k.height()+(w&&g.cssStickyHeaders_addCaption?b:0)-o.height()-(k.children("tfoot").height()||0)-(g.cssStickyHeaders_addCaption?b:w?0:b),d=s.length?s.height():0,e=s.length?m?r.data("cssStickyHeaderBottom")+d:s.offset().top+d-q.scrollTop():0,h=v?j:k.offset().top,i=w?h-(g.cssStickyHeaders_addCaption?b:0):h,n=a-i+e+t+(g.cssStickyHeaders_offset||0)-(g.cssStickyHeaders_addCaption?w?b:0:b),y=n>0&&c>=n?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,u||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);

View File

@ -1,5 +1,2 @@
/*! tablesorter Editable Content widget - updated 2/9/2015 (v2.19.1)
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
/*! Widget: editable - updated 2/9/2015 (v2.19.1) */
!function(a){"use strict";var b=a.tablesorter.editable={editComplete:function(a,b,c,d){c.removeClass("tseditable-last-edited-cell").trigger(b.editable_editComplete,[a]),d&&setTimeout(function(){c.focus()},50)},selectAll:function(a){setTimeout(function(){var b,c=document.createRange();c.selectNodeContents(a),b=window.getSelection(),b.removeAllRanges(),b.addRange(c)},100)},update:function(b,c){var d,e,f,g=[],h=[];if(!c.editable_columnsArray&&"string"===a.type(c.editable_columns)&&c.editable_columns.indexOf("-")>=0)for(e=c.editable_columns.split(/\s*-\s*/),d=parseInt(e[0],10)||0,e=parseInt(e[1],10)||b.columns-1,e>b.columns&&(e=b.columns-1);e>=d;d++)g.push(d),h.push("td:nth-child("+(d+1)+")");else a.isArray(c.editable_columns)&&a.each(c.editable_columnsArray||c.editable_columns,function(a,c){c<b.columns&&(g.push(c),h.push("td:nth-child("+(c+1)+")"))});c.editable_columnsArray||(c.editable_columnsArray=g,c.editable_columnsArray.sort(function(a,b){return a-b})),e=a("<div>").wrapInner(c.editable_wrapContent).children().length||a.isFunction(c.editable_wrapContent),b.$tbodies.find(h.join(",")).not("."+c.editable_noEdit).each(function(){f=a(this),e&&0===f.children().length&&f.wrapInner(c.editable_wrapContent),f.children().length?f.children().not("."+c.editable_noEdit).each(function(){var b=a(this);c.editable_trimContent&&b.text(function(b,c){return a.trim(c)}),b.prop("contenteditable",!0)}):(c.editable_trimContent&&f.text(function(b,c){return a.trim(c)}),f.prop("contenteditable",!0))})},bindEvents:function(c,d){c.$table.off("updateComplete pagerComplete ".split(" ").join(".tseditable ").replace(/\s+/g," ")).on("updateComplete pagerComplete ".split(" ").join(".tseditable "),function(){b.update(c,c.widgetOptions)}),c.$tbodies.off("mouseleave focus blur focusout keydown ".split(" ").join(".tseditable ").replace(/\s+/g," ")).on("mouseleave.tseditable",function(){c.$table.data("contentFocused")&&(c.$table.data("contentFocused",!0),a(":focus").trigger("focusout"))}).on("focus.tseditable","[contenteditable]",function(e){clearTimeout(a(this).data("timer")),c.$table.data("contentFocused",e.target);var f=a(this),g=d.editable_selectAll,h=f.closest("td").index(),i=a.trim(f.text());d.editable_enterToAccept&&f.on("keydown.tseditable",function(a){13===a.which&&a.preventDefault()}),f.data({before:i,original:i}),"function"==typeof d.editable_focused&&d.editable_focused(i,h,f),g&&("function"==typeof g?g(i,h,f)&&b.selectAll(f[0]):b.selectAll(f[0]))}).on("blur focusout keydown ".split(" ").join(".tseditable "),"[contenteditable]",function(e){if(c.$table.data("contentFocused")){var f,g,h=!1,i=a(e.target),j=a.trim(i.text()),k=i.closest("td").index();if(27===e.which)return i.html(a.trim(i.data("original"))).trigger("blur.tseditable"),c.$table.data("contentFocused",!1),!1;if(f=13===e.which&&(d.editable_enterToAccept||e.altKey)||d.editable_autoAccept&&"keydown"!==e.type,f&&i.data("before")!==j){if(g=d.editable_validate,h=j,"function"==typeof g?h=g(j,i.data("original"),k,i):"function"==typeof(g=a.tablesorter.getColumnData(c.table,g,k))&&(h=g(j,i.data("original"),k,i)),f&&h!==!1)return c.$table.find(".tseditable-last-edited-cell").removeClass("tseditable-last-edited-cell"),i.addClass("tseditable-last-edited-cell").html(a.trim(h)).data("before",h).data("original",h).trigger("change"),c.$table.trigger("updateCell",[i.closest("td"),!1,function(){d.editable_autoResort?setTimeout(function(){c.$table.trigger("sorton",[c.sortList,function(){b.editComplete(c,d,c.$table.find(".tseditable-last-edited-cell"),!0)},!0])},10):b.editComplete(c,d,c.$table.find(".tseditable-last-edited-cell"))}]),!1}else h||"keydown"===e.type||(clearTimeout(i.data("timer")),i.data("timer",setTimeout(function(){a.isFunction(d.editable_blur)&&d.editable_blur(a.trim(i.text()),k,i)},100)),i.html(a.trim(i.data("original"))))}})}};a.tablesorter.addWidget({id:"editable",options:{editable_columns:[],editable_enterToAccept:!0,editable_autoAccept:!0,editable_autoResort:!1,editable_wrapContent:"<div>",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))}})}(jQuery);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
/*! Widget: Filter formatter function select2 - updated 3/26/2015 (v2.21.3) */
/*! Widget: filter, select2 formatter function - updated 3/26/2015 (v2.21.3) */
!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.closest("table")[0].config,j=i.widgetOptions,k=a('<input class="filter" type="hidden">').appendTo(c).bind("change"+i.namespace+"filter",function(){var a=this.value;a=a.replace(/[/()$^]/g,"").split("|"),c.find(".select2").select2("val",a),q()}),l=i.$headerIndexed[d],m=l.hasClass(j.filter_onlyAvail),n=[],o=h.match?"":"^",p=h.match?"":"$",q=function(){var b=!1,d=c.find(".select2").select2("val")||h.value||"";a.isArray(d)&&(b=!0,d=d.join("\x00")),d=d.replace(/[-[\]{}()*+?.,/\\^$|#\s]/g,"\\$&"),b&&(d=d.split("\x00")),k.val(a.isArray(d)&&d.length&&""!==d.join("")?"/("+o+(d||[]).join(p+"|"+o)+p+")/":"").trigger("search").end().find(".select2").select2("val",d),n.length&&n.find(".select2").select2("val",d)},r=function(){g=[],f=b.filter.getOptionSource(i.$table[0],d,m)||[],a.each(f,function(a,b){g.push({id:b,text:b})}),h.data=g};return l.toggleClass("filter-match",h.match),h.cellText&&c.prepend("<label>"+h.cellText+"</label>"),h.ajax&&!a.isEmptyObject(h.ajax)||h.data||(r(),m&&i.$table.bind("filterEnd",function(){r(),c.add(n).find(".select2").select2(h)})),a('<input class="select2 select2-'+d+'" type="hidden" />').val(h.value).appendTo(c).select2(h).bind("change",function(){q()}),i.$table.bind("filterFomatterUpdate",function(){var a=i.$table.data("lastSearch")[d]||"";a=a.replace(/^\/\(\^?/,"").replace(/\$\|\^/g,"|").replace(/\$?\)\/$/g,"").split("|"),c.find(".select2").select2("val",a),q(),b.filter.formatterUpdated(c,d)}),i.$table.bind("stickyHeadersInit",function(){n=i.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(d).empty(),a('<input class="select2 select2-'+d+'" type="hidden">').val(h.value).appendTo(n).select2(h).bind("change",function(){c.find(".select2").select2("val",n.find(".select2").select2("val")),q()}),h.cellText&&n.prepend("<label>"+h.cellText+"</label>")}),i.$table.bind("filterReset",function(){c.find(".select2").select2("val",h.value||""),setTimeout(function(){q()},0)}),q(),k}}(jQuery);

View File

@ -1,5 +1,2 @@
/*!
* insideRange filter type
* 2/23/2015 (v2.21.0)
*/
/*! Widget: filter, insideRange filter type - updated 2/23/2015 (v2.21.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(c.test(b.iFilter)&&d.test(b.iExact)){var f,g,h,i,j=b.iExact.split(d),k=a.parsers[b.index].format;return j&&j.length<2?null:(h=e(k(j[0],a.table)),i=e(k(j[1],a.table)),g=e(k(b.iFilter,a.table)),h>i&&(f=i,i=h,h=f),g>=h&&i>=g)}return null}}(jQuery);

View File

@ -1,5 +1,2 @@
/*! tablesorter Formatter widget - 2/9/2015 (v2.19.1)
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
/*! 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;j<c.columns;j++)n[j]=c.$headerIndexed[j],m[j]=b.getColumnData(c.table,k.formatter_column,j)||!1;for(e=0;e<c.$tbodies.length;e++){for(d=b.processTbody(c.table,c.$tbodies.eq(e),!0),g=c.cache[e],i=g.normalized.length,f=0;i>f;f++)for(l.$row=g.normalized[f][c.columns].$row,l.$cells=l.$row.children("th, td"),j=0;j<c.columns;j++)m[j]&&(l.columnIndex=j,l.$header=n[j],l.$cell=l.$cells.eq(j),h=l.$cell[0],l.text=h.getAttribute(c.textAttribute)||h.textContent||l.$cell.text(),h.innerHTML=m[j](l.text,l));b.processTbody(c.table,d,!1)}}}},b.addWidget({id:"formatter",priority:100,options:{formatter_column:{},formatter_event:"applyFormatter"},init:function(a){b.formatter.init(a.config)}})}(jQuery);

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,2 @@
/*! tablesorter headerTitles widget - updated 3/5/2014 (core v2.15.6)
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
/*! Widget: headerTitles - updated 3/5/2014 (v2.15.6) */
!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=this,g=a(this),h=e.headerTitle_type[c.column]||d.parsers[c.column].type||"text",i=g.hasClass(b.css.sortAsc)?0:g.hasClass(b.css.sortDesc)?1:2,j=c.order[(c.count+1)%(d.sortReset?3:2)];e.headerTitle_useAria?f=g.hasClass("sorter-false")?e.headerTitle_output_nosort:g.attr("aria-label")||"":(f=(e.headerTitle_prefix||"")+(g.hasClass("sorter-false")?e.headerTitle_output_nosort:b.isValueInArray(c.column,d.sortList)>=0?e.headerTitle_output_sorted:e.headerTitle_output_unsorted),f=f.replace(/\{(current|next|name)\}/gi,function(a){return{"{name}":g.text(),"{current}":e["headerTitle_cur_"+h][i]||"","{next}":e["headerTitle_nxt_"+h][j]||""}[a.toLowerCase()]})),g.attr("title",a.isFunction(e.headerTitle_callback)?e.headerTitle_callback(g,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);

View File

@ -1,7 +1,4 @@
/*! tablesorter math widget - updated 2/9/2015 (v2.19.1)
* Requires tablesorter v2.16+ and jQuery 1.7+
* by Rob Garrison
*/
/*! Widget: math - updated 2/9/2015 (v2.19.1) */
!function(a){"use strict";var b=a.tablesorter,c={events:"tablesorter-initialized update updateAll updateRows addRows updateCell filterReset filterEnd ".split(" ").join(".tsmath "),getRow:function(c,d,e,f){var g,h,i=c.config,j=[],k=e.closest("tr"),l=k.children();return k.hasClass(d.filter_filteredRow||"filtered")||(d.math_ignore.length&&(l=l.not("["+f+"=ignore]").not("[data-column="+d.math_ignore.join("],[data-column=")+"]")),j=l.not(e).map(function(){return g=a(this),h=g.attr(i.textAttribute),"undefined"==typeof h&&(h=this.textContent||g.text()),h=b.formatFloat(h.replace(/[^\w,. \-()]/g,""),c),isNaN(h)?0:h}).get()),j},getColumn:function(c,d,e,f,g){var h,i,j,k,l,m=[],n=c.config,o=d.filter_filteredRow||"filtered",p=parseInt(e.attr("data-column"),10),q=n.$table.children("tbody").children(),r=e.closest("tr");if("above"===f)for(k=q.index(r),h=k;h>=0;)j=q.eq(h).children().filter("[data-column="+p+"]"),l=j.filter("["+g+"^=above]").length,(!q.eq(h).hasClass(o)&&q.eq(h).not("["+g+"=ignore]").length&&h!==k||l&&h!==k)&&(l?h=0:j.length&&(i=j.attr(n.textAttribute),"undefined"==typeof i&&(i=j[0].textContent||j.text()),i=b.formatFloat(i.replace(/[^\w,. \-()]/g,""),c),m.push(isNaN(i)?0:i))),h--;else q.each(function(){j=a(this).children().filter("[data-column="+p+"]"),a(this).hasClass(o)||!j.not("["+g+"^=above],["+g+"^=col]").length||j.is(e)||(i=j.attr(n.textAttribute),"undefined"==typeof i&&(i=(j[0]?j[0].textContent:"")||j.text()),i=b.formatFloat(i.replace(/[^\w,. \-()]/g,""),c),m.push(isNaN(i)?0:i))});return m},getAll:function(c,d,e){var f,g,h,i=[],j=c.config,k=d.filter_filteredRow||"filtered",l=j.$table.children("tbody").children();return l.each(function(){a(this).hasClass(k)||a(this).children().each(function(){g=a(this),h=parseInt(g.attr("data-column"),10),!g.filter("["+e+"]").length&&a.inArray(h,d.math_ignore)<0&&(f=g.attr(j.textAttribute),"undefined"==typeof f&&(f=(g[0]?g[0].textContent:"")||g.text()),f=b.formatFloat(f.replace(/[^\w,. \-()]/g,""),c),i.push(isNaN(f)?0:f))})}),i},recalculate:function(a,d,e,f){if(d&&(!e.math_isUpdating||f)){f&&b.computeColumnIndex(d.$table.children("tbody").children());var g="data-"+(e.math_data||"math"),h=d.$tbodies.find("["+g+"]");c.mathType(a,e,h,e.math_priority,g),h=d.$table.find("."+d.cssInfoBlock+", tfoot").find("["+g+"]"),c.mathType(a,e,h,e.math_priority,g),c.mathType(a,e,d.$table.find("["+g+"^=all]"),["all"],g),e.math_isUpdating=!0,d.$table.trigger("update")}},mathType:function(d,e,f,g,h){if(f.length){var i,j,k,l,m,n=b.equations;"all"===g[0]&&(m=c.getAll(d,e,h)),a.each(g,function(b,g){f.filter("["+h+"^="+g+"]").each(function(){k=a(this),i=(k.attr(h)||"").replace(g+"-",""),l="row"===g?c.getRow(d,e,k,h):"all"===g?m:c.getColumn(d,e,k,g,h),n[i]&&(j=n[i](l),d.config.debug&&console&&console.log&&console.log(k.attr(h),l,"=",j),c.output(k,e,j,l))})})}},output:function(c,d,e,f){var g=b.formatMask(c.attr("data-"+d.math_data+"-mask")||d.math_mask,e,d.math_wrapPrefix,d.math_wrapSuffix);a.isFunction(d.math_complete)&&(g=d.math_complete(c,d,g,e,f)),g!==!1&&c.html(g)}};/**
* @preserve IntegraXor Web SCADA - JavaScript Number Formatter
* http:// www.integraxor.com/

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,2 @@
/*! tablesorter repeatHeaders widget - updated 2/7/2015 (v2.19.0)
* Requires tablesorter v2.8+ and jQuery 1.7+
* Original by Christian Bach from the example-widgets.html demo
*/
/*! Widget: repeatHeaders - updated 2/7/2015 (v2.19.0) */
!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='<tr class="repeated-header remove-me">',e=0;e<c.columns;e++)i+="<th>"+a.trim(c.$headers.eq(e).text())+"</th>";d.repeatHeaders=i+"</tr>"}for(h=d&&d.rowsToSkip||4,c.$table.find("tr.repeated-header").remove(),f=c.$tbodies.find("tr"),g=f.length,e=h;g>e;e+=h)f.eq(e).before(d.repeatHeaders)},remove:function(a,b,c){c.repeatHeaders="",b.$table.find("tr.repeated-header").remove()}})}(jQuery);

View File

@ -1 +1,2 @@
/*! widget: staticRow - updated 2/9/2015 (v2.19.1) */
!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),"undefined"!=typeof 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,b,d,e){c(a),d.$table.unbind(("updateComplete.tsstaticrows "+e.staticRow_event).replace(/\s+/g," ")).bind("updateComplete.tsstaticrows "+e.staticRow_event,function(){c(a),d.$table.trigger("applyWidgets")})},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&&l>g;)j=!1,k.each(function(){e=a(this).data(d.staticRow_data),e=e>=h?h:0>e?0:e,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.trigger("staticRowsComplete",b)},remove:function(a,b,c){b.$table.unbind(("updateComplete.tsstaticrows "+c.staticRow_event).replace(/\s+/g," "))}})}(jQuery);

View File

@ -71,7 +71,7 @@
<div id="main">
<p class="tip">
<em>NOTE!</em>
<em>NOTE!</em>
<ul>
<li>This method does not use a parser nor a widget, it uses <code>semver.js</code> to allow the sorting of <a href="http://semver.org/">semantic version numbers</a>.</li>
<li>But this method requires a slightly modified version of <a href="https://github.com/isaacs/node-semver">semver.js for node</a>. All modifications are signified within the file to ease updating.</li>

View File

@ -24,17 +24,16 @@
<!-- Tablesorter: required -->
<link href="../css/theme.blue.css" rel="stylesheet">
<script src="../dist/js/jquery.tablesorter.js"></script>
<script src="../dist/js/jquery.tablesorter.widgets.js"></script>
<script src="../js/jquery.tablesorter.combined.js"></script>
<script>
$(function() {
$.extend( $.tablesorter.defaults, {
theme: 'blue',
widthFixed: true
});
$(".compatibility").tablesorter();
$("#tablesorter-demo").tablesorter({widgets:['zebra']});
$("table.options, table.api").tablesorter({widgets:['stickyHeaders']});
$('.compatibility').tablesorter();
$('#tablesorter-demo').tablesorter({widgets:['zebra']});
$('table.options, table.api').tablesorter({widgets:['stickyHeaders']});
});
</script>
@ -631,8 +630,7 @@
<td></td>
<td>This is an entirely new row, but attached to the row above while sorting<br>
cssChildRow Example HTML:
<pre class="prettyprint lang-html">
&lt;table width=&quot;100%&quot; border=&quot;1&quot;&gt;
<pre class="prettyprint lang-html">&lt;table width=&quot;100%&quot; border=&quot;1&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item #&lt;/th&gt;
@ -667,8 +665,7 @@
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
</pre>
&lt;/table&gt;</pre>
</td>
<td></td>
</tr>
@ -6075,7 +6072,7 @@ $.each( p.cacheIndex, function(i, v) {
<!-- non-sorting tbody -->
<tbody id="pager-removed" class="tablesorter-infoOnly">
<tr><th colspan="5">Removed Variables</th></tr>
<tr><th colspan="4">Removed Variables</th></tr>
</tbody>
<tbody>

View File

@ -1,5 +1,6 @@
{
"widgets" : "filter stickyHeaders uitheme",
"parsers" : "ignore-articles network",
"includeDependencies" : false,
"destFileName" : "jquery.tablesorter.custom-widgets.js"
}

File diff suppressed because it is too large Load Diff

View File

@ -18,15 +18,7 @@
*/
/*jshint browser:true, jquery:true, unused:false, expr: true */
/*global console:false, alert:false, require:false, define:false, module:false */
(function(factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = factory(require('jquery'));
} else {
factory(jQuery);
}
}(function($) {
;(function($){
'use strict';
$.extend({
/*jshint supernew:true */
@ -2092,5 +2084,4 @@
}
});
return ts;
}));
})(jQuery);

View File

@ -4,16 +4,16 @@
*/
/*! tablesorter (FORK) widgets - updated 03-26-2015 (v2.21.3)*/
/* Includes: storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort */
/*! tablesorter (FORK) - updated 03-28-2015 (v2.21.3)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = factory(require('jquery'));
} else {
factory(jQuery);
}
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = factory(require('jquery'));
} else {
factory(jQuery);
}
}(function($) {
/*! Widget: storage - updated 3/26/2015 (v2.21.3) */
@ -2350,6 +2350,5 @@ ts.addWidget({
})(jQuery);
return $.tablesorter;
return $.tablesorter;
}));

View File

@ -1,7 +1,4 @@
/*!
* Extract out date parsers
* 10/26/2014 (v2.18.0)
*/
/*! Parser: Extract out date - updated 10/26/2014 (v2.18.0) */
/*jshint jquery:true */
;(function($){
"use strict";
@ -17,10 +14,9 @@
ymdreplace : /(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/
};
/*! extract US Long Date (ignore any other text)
/*! extract US Long Date *//* (ignore any other text)
* e.g. "Sue's Birthday! Jun 26, 2004 7:22 AM (8# 2oz)"
* demo: http://jsfiddle.net/Mottie/abkNM/4165/
*/
* demo: http://jsfiddle.net/Mottie/abkNM/4165/ */
$.tablesorter.addParser({
id: "extractUSLongDate",
is: function () {
@ -39,9 +35,8 @@
type: "numeric"
});
/*! extract MMDDYYYY (ignore any other text)
* demo: http://jsfiddle.net/Mottie/abkNM/4166/
*/
/*! extract MMDDYYYY *//* (ignore any other text)
* demo: http://jsfiddle.net/Mottie/abkNM/4166/ */
$.tablesorter.addParser({
id: "extractMMDDYYYY",
is: function () {
@ -60,9 +55,8 @@
type: "numeric"
});
/*! extract DDMMYYYY (ignore any other text)
* demo: http://jsfiddle.net/Mottie/abkNM/4167/
*/
/*! extract DDMMYYYY *//* (ignore any other text)
* demo: http://jsfiddle.net/Mottie/abkNM/4167/ */
$.tablesorter.addParser({
id: "extractDDMMYYYY",
is: function () {
@ -81,9 +75,8 @@
type: "numeric"
});
/*! extract YYYYMMDD (ignore any other text)
* demo: http://jsfiddle.net/Mottie/abkNM/4168/
*/
/*! extract YYYYMMDD *//* (ignore any other text)
* demo: http://jsfiddle.net/Mottie/abkNM/4168/ */
$.tablesorter.addParser({
id: "extractYYYYMMDD",
is: function () {

View File

@ -1,5 +1,5 @@
/*! ISO-8601 date parser - 10/26/2014 (v2.18.0)
* This parser will work with dates in ISO8601 format
/*! Parser: ISO-8601 date - updated 10/26/2014 (v2.18.0) */
/* This parser works with dates in ISO8601 format
* 2013-02-18T18:18:44+00:00
* Written by Sean Ellingham :https://github.com/seanellingham
* See https://github.com/Mottie/tablesorter/issues/247

View File

@ -1,13 +1,12 @@
/*! Month parser - 10/26/2014 (v2.18.0)
* Demo: http://jsfiddle.net/Mottie/abkNM/4169/
*/
/*! Parser: Month - updated 10/26/2014 (v2.18.0) */
/* Demo: http://jsfiddle.net/Mottie/abkNM/4169/ */
/*jshint jquery:true */
;(function($){
"use strict";
var ts = $.tablesorter;
ts.dates = $.extend({}, ts.dates, {
// *** modify this array to change match the language ***
// *** modify this array to match the desired language ***
monthCased : [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ]
});
ts.dates.monthLower = ts.dates.monthCased.join(',').toLocaleLowerCase().split(',');

View File

@ -1,8 +1,5 @@
/*!
* Range date parsers
* 2/23/2015 (v2.21.0)
*/
/* Include the widget-filter-type-insideRange.js to filter ranges */
/*! Parser: date ranges - updated 2/23/2015 (v2.21.0) */
/* Include the 'widget-filter-type-insideRange.js' to filter ranges */
/*jshint jquery:true */
;(function($){
'use strict';

View File

@ -1,6 +1,5 @@
/*! Two digit year parser - 10/26/2014 (v2.18.0)
* Demo: http://mottie.github.io/tablesorter/docs/example-parsers-dates.html
*/
/*! Parser: two digit year - updated 10/26/2014 (v2.18.0) */
/* Demo: http://mottie.github.io/tablesorter/docs/example-parsers-dates.html */
/*jshint jquery:true */
;(function($){
"use strict";

View File

@ -1,6 +1,5 @@
/*! Weekday parser - 10/26/2014 (v2.18.0)
* Demo: http://jsfiddle.net/Mottie/abkNM/4169/
*/
/*! Parser: weekday - updated 10/26/2014 (v2.18.0) */
/* Demo: http://jsfiddle.net/Mottie/abkNM/4169/ */
/*jshint jquery:true */
;(function($){
"use strict";

View File

@ -1,14 +1,11 @@
/*!
* Extract dates using popular natural language date parsers
* 10/26/2014 (v2.18.0)
*/
/*! Parser: dates - updated 10/26/2014 (v2.18.0) */
/* Extract dates using popular natural language date parsers */
/*jshint jquery:true */
;(function($){
"use strict";
/*! Sugar (http://sugarjs.com/dates#comparing_dates)
* demo: http://jsfiddle.net/Mottie/abkNM/4163/
*/
/*! Sugar (http://sugarjs.com/dates#comparing_dates) */
/* demo: http://jsfiddle.net/Mottie/abkNM/4163/ */
$.tablesorter.addParser({
id: "sugar",
is: function() {
@ -21,9 +18,8 @@
type: "numeric"
});
/*! Datejs (http://www.datejs.com/)
* demo: http://jsfiddle.net/Mottie/abkNM/4164/
*/
/*! Datejs (http://www.datejs.com/) */
/* demo: http://jsfiddle.net/Mottie/abkNM/4164/ */
$.tablesorter.addParser({
id: "datejs",
is: function() {

View File

@ -1,4 +1,4 @@
/*! Duration parser */
/*! Parser: duration & countdown - updated 2/7/2015 (v2.19.0) */
/*jshint jquery:true, unused:false */
;(function($){
'use strict';

View File

@ -1,4 +1,4 @@
/*! Distance parser
/*! Parser: distance *//*
* This parser will parser numbers like 5'10" (5 foot 10 inches)
* and 31½ into sortable values.
* Demo: http://jsfiddle.net/Mottie/abkNM/154/

View File

@ -1,4 +1,4 @@
/*! File Type parser
/*! Parser: filetype *//*
* When a file type extension is found, the equivalent name is
* prefixed into the parsed data, so sorting occurs in groups
*/

View File

@ -1,4 +1,4 @@
/*! Title parser - updated 9/15/2014 (v2.17.8)
/*! Parser: ignoreArticles - updated 9/15/2014 (v2.17.8) *//*
* This parser will remove "The", "A" and "An" from the beginning of a book
* or movie title, so it sorts by the second word or number
* Demo: http://jsfiddle.net/Mottie/abkNM/5/

View File

@ -1,6 +1,5 @@
/*! image alt attribute parser for jQuery 1.7+ & tablesorter 2.7.11+
* New 7/17/2014 (v2.17.5)
*/
/*! Parser: image - new 7/17/2014 (v2.17.5) */
/* alt attribute parser for jQuery 1.7+ & tablesorter 2.7.11+ */
/*jshint jquery:true, unused:false */
;(function($){
"use strict";

View File

@ -1,4 +1,4 @@
/*! parser: input & select - updated 3/26/2015 (v2.21.3) *//*
/*! Parser: input & select - updated 3/26/2015 (v2.21.3) *//*
* for jQuery 1.7+ & tablesorter 2.7.11+
* Demo: http://mottie.github.com/tablesorter/docs/example-widget-grouping.html
*/

View File

@ -1,4 +1,4 @@
/*! Metric parser
/*! Parser: metric *//*
* Demo: http://jsfiddle.net/Mottie/abkNM/382/
* Set the metric name in the header (defaults to "m|meter"), e.g.
* <th data-metric-name="b|byte">HDD Size</th>

View File

@ -1,4 +1,4 @@
/*! Named Numbers Parser - 10/26/2014 (v2.18.0)
/*! Parser: namedNumbers - updated 10/26/2014 (v2.18.0) *//*
* code modified from http://stackoverflow.com/a/12014376/145346
*/
/*jshint jquery:true */

View File

@ -1,4 +1,5 @@
/*! Network parsers - IPv4, IPv6 and MAC Addresses - 10/26/2014 (v2.18.0) */
/*! Parser: network - updated 10/26/2014 (v2.18.0) */
/* IPv4, IPv6 and MAC Addresses */
/*global jQuery: false */
;(function($){
"use strict";
@ -7,7 +8,7 @@
ipv4Format,
ipv4Is;
/*! IPv6 Address parser (WIP)
/*! IPv6 Address parser (WIP) *//*
* IPv6 Address (ffff:0000:0000:0000:0000:0000:0000:0000)
* needs to support short versions like "::8" or "1:2::7:8"
* and "::00:192.168.10.184" (embedded IPv4 address)
@ -17,8 +18,8 @@
ipv4Validate : /((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})/,
ipv4Extract : /([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/,
// simplified regex from http://www.intermapper.com/support/tools/IPV6-Validator.aspx
// (specifically from http://download.dartware.com/thirdparty/ipv6validator.js)
// simplified regex from http://www.intermapper.com/support/tools/IPV6-Validator.aspx
// (specifically from http://download.dartware.com/thirdparty/ipv6validator.js)
ipv6Validate : /^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/i
});
@ -83,14 +84,15 @@
};
ipv4Format = function(s, table) {
var i, a = s ? s.split('.') : '',
r = '',
l = a.length;
r = '',
l = a.length;
for (i = 0; i < l; i++) {
r += ('000' + a[i]).slice(-3);
}
return s ? ts.formatFloat(r, table) : s;
};
/*! Parser: ipv4Address (a.k.a. ipAddress) */
// duplicate "ipAddress" as "ipv4Address" (to maintain backwards compatility)
ts.addParser({
id: 'ipAddress',
@ -105,6 +107,7 @@
type: 'numeric'
});
/*! Parser: MAC address */
ts.addParser({
id: 'MAC',
is: function(s) {

View File

@ -1,4 +1,4 @@
/*! Roman numeral parsers
/*! Parser: roman - updated 6/28/MMXIV (v2.17.3) *//*
* code modified from both:
* Steven Levithan @ http://blog.stevenlevithan.com/archives/javascript-roman-numeral-converter
* Jonathan Snook comment @ http://blog.stevenlevithan.com/archives/javascript-roman-numeral-converter#comment-16140

View File

@ -1,5 +1,5 @@
/*! tablesorter Align Character widget - updated 2/7/2015 (v2.19.0)
* Requires tablesorter v2.8+ and jQuery 1.7+
/*! Widget: alignChar - updated 2/7/2015 (v2.19.0) *//*
* Align Characters, Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
/*jshint browser:true, jquery:true, unused:false */

View File

@ -1,4 +1,4 @@
/* Chart widget (beta) for TableSorter 2/7/2015 (v2.19.0)
/* Widget: chart (beta) - updated 2/7/2015 (v2.19.0) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
*/
/*jshint browser:true, jquery:true, unused:false */

View File

@ -1,4 +1,4 @@
/* Column Selector/Responsive table widget for TableSorter - 3/5/2015 (v2.21.0)
/* Widget: columnSelector (responsive table widget) - updated 3/5/2015 (v2.21.0) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Justin Hallett & Rob Garrison
*/

View File

@ -1,4 +1,4 @@
/*! tablesorter CSS Sticky Headers widget - updated 2/9/2015 (v2.19.1)
/*! Widget: cssStickyHeaders - updated 2/9/2015 (v2.19.1) *//*
* Requires a modern browser, tablesorter v2.8+
*/
/*jshint jquery:true, unused:false */

View File

@ -1,4 +1,4 @@
/*! tablesorter Editable Content widget - updated 2/9/2015 (v2.19.1)
/*! Widget: editable - updated 2/9/2015 (v2.19.1) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/

View File

@ -1,4 +1,4 @@
/*! Filter widget formatter html5 functions *//* updated 7/17/2014 (v2.17.5)
/*! Widget: filter, html5 formatter functions - updated 7/17/2014 (v2.17.5) *//*
* requires: tableSorter (FORK) 2.15+ and jQuery 1.4.3+
*
* html5Number (spinner)

View File

@ -1,4 +1,4 @@
/*! Filter widget formatter jQuery UI functions *//* updated 7/17/2014 (v2.17.5)
/*! Widget: filter jQuery UI formatter functions - updated 7/17/2014 (v2.17.5) *//*
* requires: tableSorter (FORK) 2.15+ and jQuery 1.4.3+
*
* uiSpinner (jQuery UI spinner)

View File

@ -1,4 +1,4 @@
/*! Widget: Filter formatter function select2 - updated 3/26/2015 (v2.21.3) *//*
/*! Widget: filter, select2 formatter function - updated 3/26/2015 (v2.21.3) *//*
* requires: jQuery 1.7.2+, tableSorter (FORK) 2.16+, filter widget 2.16+ and select2 v3.4.6+ plugin
*/
/*jshint browser:true, jquery:true, unused:false */

View File

@ -1,7 +1,4 @@
/*!
* insideRange filter type
* 2/23/2015 (v2.21.0)
*/
/*! Widget: filter, insideRange filter type - updated 2/23/2015 (v2.21.0) */
;(function($){
'use strict';

View File

@ -1,4 +1,4 @@
/*! tablesorter Formatter widget - 2/9/2015 (v2.19.1)
/*! Widget: formatter - 2/9/2015 (v2.19.1) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/

View File

@ -1,4 +1,4 @@
/*! tablesorter Grouping widget - updated 3/5/2015 (v2.21.0) *//*
/*! Widget: grouping - updated 3/5/2015 (v2.21.0) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/

View File

@ -1,4 +1,4 @@
/*! tablesorter headerTitles widget - updated 3/5/2014 (core v2.15.6)
/*! Widget: headerTitles - updated 3/5/2014 (v2.15.6) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/

View File

@ -1,4 +1,4 @@
/*! tablesorter math widget - updated 2/9/2015 (v2.19.1)
/*! Widget: math - updated 2/9/2015 (v2.19.1) *//*
* Requires tablesorter v2.16+ and jQuery 1.7+
* by Rob Garrison
*/

View File

@ -1,4 +1,4 @@
/*! Widget: Output - updated 3/26/2015 (v2.21.3) *//*
/*! Widget: output - updated 3/26/2015 (v2.21.3) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* Modified from:
* HTML Table to CSV: http://www.kunalbabre.com/projects/table2CSV.php (License unknown?)

View File

@ -1,4 +1,4 @@
/* Print widget for TableSorter 2/7/2015 (v2.19.0)
/* Widget: print - updated 2/7/2015 (v2.19.0) *//*
* Requires tablesorter v2.8+ and jQuery 1.2.6+
*/
/*jshint browser:true, jquery:true, unused:false */

View File

@ -1,4 +1,4 @@
/* table reflow widget for TableSorter 2/7/2015 (v2.19.0)
/* Widget: reflow - updated 2/7/2015 (v2.19.0) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* Also, this widget requires the following default css (modify as desired)

View File

@ -1,4 +1,4 @@
/*! tablesorter repeatHeaders widget - updated 2/7/2015 (v2.19.0)
/*! Widget: repeatHeaders - updated 2/7/2015 (v2.19.0) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* Original by Christian Bach from the example-widgets.html demo
*/

View File

@ -1,4 +1,4 @@
/* StaticRow widget for jQuery TableSorter 2.0 - updated 2/9/2015 (v2.19.1)
/*! widget: staticRow - updated 2/9/2015 (v2.19.1) *//*
* Version 1.2 mod by Rob Garrison (requires tablesorter v2.16+)
* Requires:
* jQuery v1.4+

View File

@ -39,14 +39,11 @@
"natural",
"jquery-plugin"
],
"main": "js/jquery.tablesorter.js",
"main": "dist/js/jquery.tablesorter.combined.js",
"files": [
"dist/css/theme.default.css",
"dist/js/jquery.tablesorter.js",
"dist/js/jquery.tablesorter.min.js",
"dist/js/jquery.tablesorter.widgets.js",
"dist/js/jquery.tablesorter.widgets.min.js",
"dist/js/extras/jquery.tablesorter.pager.min.js"
"dist/js/jquery.tablesorter.combined.js",
"dist/js/jquery.tablesorter.combined.min.js"
],
"repository": {
"type": "git",

View File

@ -42,7 +42,6 @@
"main": "dist/js/jquery.tablesorter.js",
"files": [
"dist/css/theme.default.min.css",
"dist/js/jquery.tablesorter.min.js",
"dist/js/jquery.tablesorter.widgets.min.js"
"dist/js/jquery.tablesorter.combined.min.js"
]
}