Use ES5 String.prototype.trim() instead of jQuery.trim()
[lhc/web/wiklou.git] / resources / src / jquery / jquery.tablesorter.js
index 6d67ade..5ca866e 100644 (file)
                                if ( rowIndex !== lastRowIndex ) {
                                        lastRowIndex = rowIndex;
                                        cellIndex = $( rows[ rowIndex ] ).data( 'columnToCell' )[ column ];
-                                       nodeValue = $.trim( getElementSortKey( rows[ rowIndex ].cells[ cellIndex ] ) );
+                                       nodeValue = getElementSortKey( rows[ rowIndex ].cells[ cellIndex ] ).trim();
                                }
                        } else {
                                nodeValue = '';
                },
                format: function ( s ) {
                        var tsc;
-                       s = $.trim( s.toLowerCase() );
+                       s = s.toLowerCase().trim();
                        if ( ts.collationRegex ) {
                                tsc = ts.collationTable;
                                s = s.replace( ts.collationRegex, function ( match ) {
                        return ts.rgx.url[ 0 ].test( s );
                },
                format: function ( s ) {
-                       return $.trim( s.replace( ts.rgx.url[ 1 ], '' ) );
+                       return s.replace( ts.rgx.url[ 1 ], '' ).trim();
                },
                type: 'text'
        } );
                },
                format: function ( s ) {
                        var match, y;
-                       s = $.trim( s.toLowerCase() );
+                       s = s.toLowerCase().trim();
 
                        if ( ( match = s.match( ts.dateRegex[ 0 ] ) ) !== null ) {
                                if ( mw.config.get( 'wgDefaultDateFormat' ) === 'mdy' || mw.config.get( 'wgPageContentLanguage' ) === 'en' ) {
        ts.addParser( {
                id: 'number',
                is: function ( s ) {
-                       return $.tablesorter.numberRegex.test( $.trim( s ) );
+                       return $.tablesorter.numberRegex.test( s.trim() );
                },
                format: function ( s ) {
                        return $.tablesorter.formatDigit( s );