Merge "Chinese Conversion Table Update 2017-6"
[lhc/web/wiklou.git] / resources / src / mediawiki.rcfilters / ui / mw.rcfilters.ui.RclTargetPageWidget.js
index d14681b..527d790 100644 (file)
 
                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
@@ -68,6 +71,9 @@
         * 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 ) );