Hygiene: Discourage use of $.each
[lhc/web/wiklou.git] / resources / src / mediawiki.widgets / mw.widgets.CheckMatrixWidget.js
index 21b4f10..64b7592 100644 (file)
                $headRow.append( $( '<td>' ).text( '\u00A0' ) );
 
                // Iterate over the columns object (ignore the value)
+               // eslint-disable-next-line no-restricted-properties
                $.each( this.columns, function ( columnLabel ) {
                        $headRow.append( $( '<td>' ).html( columnLabel ) );
                } );
                $table.append( $headRow );
 
                // Build table
+               // eslint-disable-next-line no-restricted-properties
                $.each( this.rows, function ( rowLabel, rowTag ) {
                        var $row = $( '<tr>' ),
                                labelField = new OO.ui.FieldLayout(
@@ -61,6 +63,7 @@
                        $row.append( $( '<td>' ).append( labelField.$element ) );
 
                        // Columns
+                       // eslint-disable-next-line no-restricted-properties
                        $.each( widget.columns, function ( columnLabel, columnTag ) {
                                var thisTag = columnTag + '-' + rowTag,
                                        checkbox = new OO.ui.CheckboxInputWidget( {
                // setDisabled sometimes gets called before the widget is ready
                if ( this.checkboxes && Object.keys( this.checkboxes ).length > 0 ) {
                        // Propagate to all checkboxes and update their disabled state
+                       // eslint-disable-next-line no-restricted-properties
                        $.each( this.checkboxes, function ( name, checkbox ) {
                                checkbox.setDisabled( widget.isTagDisabled( name ) );
                        } );