} ).done( function ( ok ) {
ok = ok || suppressErrors;
that.setIcon( ok ? null : 'alert' );
- that.setIconTitle( ok ? '' : mw.message( 'apisandbox-alert-field' ).plain() );
+ that.setTitle( ok ? '' : mw.message( 'apisandbox-alert-field' ).plain() );
} );
}
},
apiCheckValid: function () {
var ok = this.getApiValue() !== undefined || suppressErrors;
this.setIcon( ok ? null : 'alert' );
- this.setIconTitle( ok ? '' : mw.message( 'apisandbox-alert-field' ).plain() );
+ this.setTitle( ok ? '' : mw.message( 'apisandbox-alert-field' ).plain() );
return $.Deferred().resolve( ok ).promise();
}
},
}
this.setIcon( ok ? null : 'alert' );
- this.setIconTitle( ok ? '' : mw.message( 'apisandbox-alert-field' ).plain() );
+ this.setTitle( ok ? '' : mw.message( 'apisandbox-alert-field' ).plain() );
return $.Deferred().resolve( ok ).promise();
},
createTagItemWidget: function ( data, label ) {
apiCheckValid: function () {
var ok = this.getValue() !== null || suppressErrors;
this.setIcon( ok ? null : 'alert' );
- this.setIconTitle( ok ? '' : mw.message( 'apisandbox-alert-field' ).plain() );
+ this.setTitle( ok ? '' : mw.message( 'apisandbox-alert-field' ).plain() );
return $.Deferred().resolve( ok ).promise();
}
}
isInteger: true
} );
widget.setIcon = widget.input.setIcon.bind( widget.input );
- widget.setIconTitle = widget.input.setIconTitle.bind( widget.input );
+ widget.setTitle = widget.input.setTitle.bind( widget.input );
widget.getValidity = widget.input.getValidity.bind( widget.input );
widget.paramInfo = pi;
$.extend( widget, WidgetMethods.textInputWidget );
break;
case 'namespace':
- // eslint-disable-next-line jquery/no-map-util
+ // eslint-disable-next-line no-jquery/no-map-util
items = $.map( mw.config.get( 'wgFormattedNamespaces' ), function ( name, ns ) {
if ( ns === '0' ) {
name = mw.message( 'blanknamespace' ).text();
// OO.ui.ButtonWidget doesn't take focus itself (T128054)
$focus = $( '#mw-apisandbox-ui' ).find( document.activeElement );
if ( $focus.length ) {
- // eslint-disable-next-line jquery/no-event-shorthand
$focus[ 0 ].blur();
}
this.outlineItem.setLevel( this.indentLevel );
this.outlineItem.setLabel( this.displayText );
this.outlineItem.setIcon( this.apiIsValid || suppressErrors ? null : 'alert' );
- this.outlineItem.setIconTitle(
+ this.outlineItem.setTitle(
this.apiIsValid || suppressErrors ? '' : mw.message( 'apisandbox-alert-page' ).plain()
);
};
}
toRemove = {};
- // eslint-disable-next-line jquery/no-each-util
+ // eslint-disable-next-line no-jquery/no-each-util
$.each( this.templatedItemsCache, function ( k, el ) {
if ( el.widget.isElementAttached() ) {
toRemove[ k ] = el;
}
} else {
newVars = {};
- // eslint-disable-next-line jquery/no-each-util
+ // eslint-disable-next-line no-jquery/no-each-util
$.each( p.vars, function ( k, v ) {
newVars[ k ] = v.replace( placeholder, value );
} );
};
while ( toProcess.length ) {
p = toProcess.shift();
- // eslint-disable-next-line jquery/no-each-util
+ // eslint-disable-next-line no-jquery/no-each-util
$.each( p.vars, doProcess );
}
- // eslint-disable-next-line jquery/no-map-util
+ // eslint-disable-next-line no-jquery/no-map-util
toRemove = $.map( toRemove, function ( el, name ) {
delete that.widgets[ name ];
return [ el.widgetField, el.helpField ];
}
that.deprecatedItemsFieldset = new OO.ui.FieldsetLayout().addItems( deprecatedItems ).toggle( false );
- // eslint-disable-next-line jquery/no-animate-toggle
tmp = $( '<fieldset>' )
.toggle( !that.deprecatedItemsFieldset.isEmpty() )
.append(
if ( this.paramInfo === null ) {
return [];
} else {
- // eslint-disable-next-line jquery/no-map-util
+ // eslint-disable-next-line no-jquery/no-map-util
promises = $.map( this.widgets, function ( widget ) {
return widget.apiCheckValid();
} );
that.apiIsValid = Array.prototype.indexOf.call( arguments, false ) === -1;
if ( that.getOutlineItem() ) {
that.getOutlineItem().setIcon( that.apiIsValid || suppressErrors ? null : 'alert' );
- that.getOutlineItem().setIconTitle(
+ that.getOutlineItem().setTitle(
that.apiIsValid || suppressErrors ? '' : mw.message( 'apisandbox-alert-page' ).plain()
);
}
if ( this.paramInfo === null ) {
this.loadFromQueryParams = params;
} else {
- // eslint-disable-next-line jquery/no-each-util
+ // eslint-disable-next-line no-jquery/no-each-util
$.each( this.widgets, function ( name, widget ) {
var v = Object.prototype.hasOwnProperty.call( params, name ) ? params[ name ] : undefined;
widget.setApiValue( v );
* @param {Object} displayParams Write query parameters for display into this object
*/
ApiSandbox.PageLayout.prototype.getQueryParams = function ( params, displayParams ) {
- // eslint-disable-next-line jquery/no-each-util
+ // eslint-disable-next-line no-jquery/no-each-util
$.each( this.widgets, function ( name, widget ) {
var value = widget.getApiValue();
if ( value !== undefined ) {
*/
ApiSandbox.PageLayout.prototype.getSubpages = function () {
var ret = [];
- // eslint-disable-next-line jquery/no-each-util
+ // eslint-disable-next-line no-jquery/no-each-util
$.each( this.widgets, function ( name, widget ) {
var submodules, i;
if ( typeof widget.getSubmodules === 'function' ) {