*
* @author Christian Bach/christian.bach@polyester.se
*/
-( function ( $, mw ) {
+( function () {
var ts,
parsers = [];
// Loop through all the dom cells of the thead
$tableRows.each( function ( rowIndex, row ) {
+ // eslint-disable-next-line no-restricted-properties
$.each( row.cells, function ( columnIndex, cell ) {
var matrixRowIndex,
matrixColumnIndex;
if ( ts.collationTable ) {
// Build array of key names
for ( key in ts.collationTable ) {
- // Check hasOwn to be safe
- if ( ts.collationTable.hasOwnProperty( key ) ) {
- keys.push( mw.RegExp.escape( key ) );
- }
+ keys.push( mw.RegExp.escape( key ) );
}
if ( keys.length ) {
ts.collationRegex = new RegExp( keys.join( '|' ), 'ig' );
function convertSortList( sortObjects ) {
var sortList = [];
sortObjects.forEach( function ( sortObject ) {
+ // eslint-disable-next-line no-restricted-properties
$.each( sortObject, function ( columnIndex, order ) {
var orderIndex = ( order === 'desc' ) ? 1 : 0;
sortList.push( [ parseInt( columnIndex, 10 ), orderIndex ] );
// Get the CSS class names, could be done elsewhere
sortCSS = [ config.cssAsc, config.cssDesc ];
- // Messages tell the the user what the *next* state will be
+ // Messages tell the user what the *next* state will be
// so are in reverse order to the CSS classes.
sortMsg = [ mw.msg( 'sort-descending' ), mw.msg( 'sort-ascending' ) ];
// Build the cache for the tbody cells
// to share between calculations for this sort action.
- // Re-calculated each time a sort action is performed due to possiblity
+ // Re-calculated each time a sort action is performed due to possibility
// that sort values change. Shouldn't be too expensive, but if it becomes
// too slow an event based system should be implemented somehow where
// cells get event .change() and bubbles up to the <table> here
type: 'numeric'
} );
-}( jQuery, mediaWiki ) );
+}() );