Replace deprecated `setIconTitle` with `setTitle`
authorVolker E <volker.e@wikimedia.org>
Thu, 3 Jan 2019 20:43:50 +0000 (12:43 -0800)
committerVolkerE <volker.e@wikimedia.org>
Thu, 17 Jan 2019 06:04:52 +0000 (06:04 +0000)
Bug: T76638
Change-Id: Ia51cbfaff7325f5eef385cc00e801ede69e78954

resources/src/mediawiki.special.apisandbox/apisandbox.js

index 83a39d4..19eac98 100644 (file)
                                } ).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 );
                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()
                );
        };
                                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()
                                        );
                                }