Merge "Improve readability of SpecialBlock::checkUnblockSelf"
[lhc/web/wiklou.git] / resources / src / mediawiki.widgets / mw.widgets.ComplexTitleInputWidget.js
index ddae9b1..2c4044d 100644 (file)
@@ -4,7 +4,7 @@
  * @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
  * @license The MIT License (MIT); see LICENSE.txt
  */
-( function ( $, mw ) {
+( function () {
 
        /**
         * Like TitleInputWidget, but the namespace has to be input through a separate dropdown field.
@@ -51,7 +51,6 @@
        OO.inheritClass( mw.widgets.ComplexTitleInputWidget, OO.ui.Widget );
 
        /* Static Methods */
-       /*jshint -W024*/
 
        /**
         * @inheritdoc
@@ -85,8 +84,6 @@
                return state;
        };
 
-       /*jshint +W024*/
-
        /* Methods */
 
        /**
                this.title.restorePreInfuseState( state.title );
        };
 
-}( jQuery, mediaWiki ) );
+       /**
+        * @inheritdoc
+        */
+       mw.widgets.ComplexTitleInputWidget.prototype.setDisabled = function ( disabled ) {
+               mw.widgets.ComplexTitleInputWidget.parent.prototype.setDisabled.call( this, disabled );
+               if ( this.namespace ) {
+                       this.namespace.setDisabled( disabled );
+               }
+
+               if ( this.title ) {
+                       this.title.setDisabled( disabled );
+               }
+               return this;
+       };
+
+}() );