Merge "mw.htmlform: Fix hiding of the textbox for 'selectorother' fields on page...
[lhc/web/wiklou.git] / resources / src / mediawiki / htmlform / hide-if.js
index 157ac06..6d3c9fd 100644 (file)
@@ -20,7 +20,7 @@
         */
        function hideIfGetField( $el, name ) {
                var $found, $p, $widget,
-                       suffix = name.replace( /^([^\[]+)/, '[$1]' );
+                       suffix = name.replace( /^([^[]+)/, '[$1]' );
 
                function nameFilter() {
                        return this.name === name ||
@@ -66,7 +66,7 @@
                                funcs = [];
                                fields = [];
                                for ( i = 1; i < l; i++ ) {
-                                       if ( !$.isArray( spec[ i ] ) ) {
+                                       if ( !Array.isArray( spec[ i ] ) ) {
                                                throw new Error( op + ' parameters must be arrays' );
                                        }
                                        v = hideIfParse( $el, spec[ i ] );
                                if ( l !== 2 ) {
                                        throw new Error( 'NOT takes exactly one parameter' );
                                }
-                               if ( !$.isArray( spec[ 1 ] ) ) {
+                               if ( !Array.isArray( spec[ 1 ] ) ) {
                                        throw new Error( 'NOT parameters must be arrays' );
                                }
                                v = hideIfParse( $el, spec[ 1 ] );