X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.htmlform%2Fhide-if.js;h=c8f8cc914513ecd87add19eed6edb56bf30b4bac;hb=928a1e6f718724ea7e65e62129740b34551648c9;hp=6d3c9fd18960a8434eea84647531cf542cc9b97f;hpb=c004cfc116eb8c677c346f3db561fc3593a8fd99;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki.htmlform/hide-if.js b/resources/src/mediawiki.htmlform/hide-if.js index 6d3c9fd189..c8f8cc9145 100644 --- a/resources/src/mediawiki.htmlform/hide-if.js +++ b/resources/src/mediawiki.htmlform/hide-if.js @@ -2,7 +2,7 @@ * HTMLForm enhancements: * Set up 'hide-if' behaviors for form fields that have them. */ -( function ( mw, $ ) { +( function () { /** * Helper function for hide-if to find the nearby form field. @@ -154,7 +154,7 @@ } v = spec[ 2 ]; - if ( !( field instanceof jQuery ) ) { + if ( !( field instanceof $ ) ) { // field is a OO.ui.Widget if ( field.supports( 'isSelected' ) ) { getVal = function () { @@ -252,7 +252,7 @@ // It is impossible to submit a form with hidden fields failing validation, e.g. one that // is required. However, validity is not checked for disabled fields, as these are not // submitted with the form. So we should also disable fields when hiding them. - if ( self instanceof jQuery ) { + if ( self instanceof $ ) { // This also finds elements inside any nested fields (in case of HTMLFormFieldCloner), // which is problematic. But it works because: // * HTMLFormFieldCloner::createFieldsForKey() copies 'hide-if' rules to nested fields @@ -292,4 +292,4 @@ } ); } ); -}( mediaWiki, jQuery ) ); +}() );