this.titleSearch = new mw.widgets.TitleInputWidget( {
validate: false,
- placeholder: mw.msg( 'rcfilters-target-page-placeholder' )
+ placeholder: mw.msg( 'rcfilters-target-page-placeholder' ),
+ showImages: true,
+ showDescriptions: true,
+ addQueryInput: false
} );
// Events
* Respond to the model being updated
*/
mw.rcfilters.ui.RclTargetPageWidget.prototype.updateUiBasedOnModel = function () {
- this.titleSearch.setValue( this.model.getValue() );
+ var title = mw.Title.newFromText( this.model.getValue() ),
+ text = title ? title.toText() : this.model.getValue();
+ this.titleSearch.setValue( text );
+ this.titleSearch.setTitle( text );
};
}( mediaWiki ) );