build: Upgrade grunt-eslint from 19.0.0 to 20.0.0
[lhc/web/wiklou.git] / resources / src / jquery / jquery.tablesorter.js
index 4da05e6..ec91773 100644 (file)
@@ -63,7 +63,7 @@
                var $node = $( node ),
                        // Use data-sort-value attribute.
                        // Use data() instead of attr() so that live value changes
-                       // are processed as well (bug 38152).
+                       // are processed as well (T40152).
                        data = $node.data( 'sortValue' );
 
                if ( data !== null && data !== undefined ) {
 
                // We allow a trailing percent sign, which we just strip. This works fine
                // if percents and regular numbers aren't being mixed.
-               ts.numberRegex = new RegExp( '^(' + '[-+\u2212]?[0-9][0-9,]*(\\.[0-9,]*)?(E[-+\u2212]?[0-9][0-9,]*)?' + // Fortran-style scientific
-               '|' + '[-+\u2212]?' + digitClass + '+[\\s\\xa0]*%?' + // Generic localised
-               ')$', 'i' );
+               ts.numberRegex = new RegExp(
+                       '^(' +
+                               '[-+\u2212]?[0-9][0-9,]*(\\.[0-9,]*)?(E[-+\u2212]?[0-9][0-9,]*)?' + // Fortran-style scientific
+                               '|' +
+                               '[-+\u2212]?' + digitClass + '+[\\s\\xa0]*%?' + // Generic localised
+                       ')$',
+                       'i'
+               );
        }
 
        function buildDateTable() {
 
                // Build RegEx
                // Any date formated with . , ' - or /
-               ts.dateRegex[ 0 ] = new RegExp( /^\s*(\d{1,2})[\,\.\-\/'\s]{1,2}(\d{1,2})[\,\.\-\/'\s]{1,2}(\d{2,4})\s*?/i );
+               ts.dateRegex[ 0 ] = new RegExp( /^\s*(\d{1,2})[,.\-/'\s]{1,2}(\d{1,2})[,.\-/'\s]{1,2}(\d{2,4})\s*?/i );
 
                // Written Month name, dmy
-               ts.dateRegex[ 1 ] = new RegExp( '^\\s*(\\d{1,2})[\\,\\.\\-\\/\'\\s]+(' + regex + ')' + '[\\,\\.\\-\\/\'\\s]+(\\d{2,4})\\s*$', 'i' );
+               ts.dateRegex[ 1 ] = new RegExp(
+                       '^\\s*(\\d{1,2})[\\,\\.\\-\\/\'\\s]+(' +
+                               regex +
+                       ')' +
+                       '[\\,\\.\\-\\/\'\\s]+(\\d{2,4})\\s*$',
+                       'i'
+               );
 
                // Written Month name, mdy
-               ts.dateRegex[ 2 ] = new RegExp( '^\\s*(' + regex + ')' + '[\\,\\.\\-\\/\'\\s]+(\\d{1,2})[\\,\\.\\-\\/\'\\s]+(\\d{2,4})\\s*$', 'i' );
+               ts.dateRegex[ 2 ] = new RegExp(
+                       '^\\s*(' + regex + ')' +
+                       '[\\,\\.\\-\\/\'\\s]+(\\d{1,2})[\\,\\.\\-\\/\'\\s]+(\\d{2,4})\\s*$',
+                       'i'
+               );
 
        }
 
                        }
 
                        columnToCell = [];
-                       cellsInRow = ( $row[ 0 ].cells.length ) || 0;  // all cells in this row
+                       cellsInRow = ( $row[ 0 ].cells.length ) || 0; // all cells in this row
                        index = 0; // real cell index in this row
                        for ( j = 0; j < columns; index++ ) {
                                if ( index === cellsInRow ) {
                }
                ts.rgx = {
                        IPAddress: [
-                               new RegExp( /^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/ )
+                               new RegExp( /^\d{1,3}[.]\d{1,3}[.]\d{1,3}[.]\d{1,3}$/ )
                        ],
                        currency: [
                                new RegExp( /(^[£$€¥]|[£$€¥]$)/ ),
                                new RegExp( /(https?|ftp|file):\/\// )
                        ],
                        isoDate: [
-                               new RegExp( /^([-+]?\d{1,4})-([01]\d)-([0-3]\d)([T\s]((([01]\d|2[0-3])(:?[0-5]\d)?|24:?00)?(:?([0-5]\d|60))?([.,]\d+)?)([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?/ ),
+                               new RegExp( /^([-+]?\d{1,4})-([01]\d)-([0-3]\d)([T\s]((([01]\d|2[0-3])(:?[0-5]\d)?|24:?00)?(:?([0-5]\d|60))?([.,]\d+)?)([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?/ ),
                                new RegExp( /^([-+]?\d{1,4})-([01]\d)-([0-3]\d)/ )
                        ],
                        usLongDate: [
                                s = out;
                        }
                        i = parseFloat( s.replace( /[, ]/g, '' ).replace( '\u2212', '-' ) );
-                       return isNaN( i ) ? 0 : i;
+                       return isNaN( i ) ? -Infinity : i;
                },
 
                formatFloat: function ( s ) {
                        var i = parseFloat( s );
-                       return isNaN( i ) ? 0 : i;
+                       return isNaN( i ) ? -Infinity : i;
                },
 
                formatInt: function ( s ) {
                        var i = parseInt( s, 10 );
-                       return isNaN( i ) ? 0 : i;
+                       return isNaN( i ) ? -Infinity : i;
                },
 
                clearTableBody: function ( table ) {
                        return getParserById( id );
                },
 
-               getParsers: function () {  // for table diagnosis
+               getParsers: function () { // for table diagnosis
                        return parsers;
                }
        };