X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.special%2Fmediawiki.special.apisandbox.js;h=7029116cdcc508ea8c95c46222225ac6c0d87c20;hb=3b4c53b79540e1ab4519cb7781d3da6cdf8af7b7;hp=7e9ad7f6053b5f086e68ce2316b9ac93af00686f;hpb=bad0cb2a9f53b67e49d84323d835a5040676fd1e;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki.special/mediawiki.special.apisandbox.js b/resources/src/mediawiki.special/mediawiki.special.apisandbox.js index 7e9ad7f605..7029116cdc 100644 --- a/resources/src/mediawiki.special/mediawiki.special.apisandbox.js +++ b/resources/src/mediawiki.special/mediawiki.special.apisandbox.js @@ -194,7 +194,7 @@ multi: function () { var map = this.paramInfo.submodules, v = this.isDisabled() ? this.paramInfo[ 'default' ] : this.getApiValue(); - return v === undefined || v === '' ? [] : $.map( String( v ).split( '|' ), function ( v ) { + return v === undefined || v === '' ? [] : String( v ).split( '|' ).map( function ( v ) { return { value: v, path: map[ v ] }; } ); } @@ -488,7 +488,7 @@ throw new Error( 'Unknown parameter type ' + pi.type ); } - items = $.map( pi.type, function ( v ) { + items = pi.type.map( function ( v ) { var config = { data: String( v ), label: String( v ), @@ -1072,7 +1072,7 @@ selectedLabel = selectedLabel.text(); } menu.clearItems().addItems( formatItems ); - menu.chooseItem( menu.getItemFromLabel( selectedLabel ) || menu.getFirstSelectableItem() ); + menu.chooseItem( menu.getItemFromLabel( selectedLabel ) || menu.findFirstSelectableItem() ); // Fire the event to update field visibilities Util.onFormatDropdownChange();