Merge "SpecialMovepage: Convert form to use OOUI controls"
[lhc/web/wiklou.git] / resources / src / mediawiki.widgets / mw.widgets.TitleInputWidget.js
index ee9583d..d5a7abc 100644 (file)
 
        /* Methods */
 
+       /**
+        * Get the namespace to prepend to titles in suggestions, if any.
+        *
+        * @return {number|null} Namespace number
+        */
+       mw.widgets.TitleInputWidget.prototype.getNamespace = function () {
+               return this.namespace;
+       };
+
+       /**
+        * Set the namespace to prepend to titles in suggestions, if any.
+        *
+        * @param {number|null} namespace Namespace number
+        */
+       mw.widgets.TitleInputWidget.prototype.setNamespace = function ( namespace ) {
+               this.namespace = namespace;
+               this.lookupCache = {};
+               this.closeLookupMenu();
+       };
+
        /**
         * @inheritdoc
         */