dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mw.special.apisandbox: Pass $overlay to PopupButtonWidgets to fix overlaps
[lhc/web/wiklou.git]
/
resources
/
src
/
mediawiki.special
/
mediawiki.special.apisandbox.js
diff --git
a/resources/src/mediawiki.special/mediawiki.special.apisandbox.js
b/resources/src/mediawiki.special/mediawiki.special.apisandbox.js
index
ad58583
..
7687fd8
100644
(file)
--- a/
resources/src/mediawiki.special/mediawiki.special.apisandbox.js
+++ b/
resources/src/mediawiki.special/mediawiki.special.apisandbox.js
@@
-1156,6
+1156,7
@@
booklet.setPage( '|results|' );
} ).setDisabled( !paramsAreForced ) ).$element,
new OO.ui.PopupButtonWidget( {
booklet.setPage( '|results|' );
} ).setDisabled( !paramsAreForced ) ).$element,
new OO.ui.PopupButtonWidget( {
+ $overlay: $( '#mw-apisandbox-ui' ),
framed: false,
icon: 'info',
popup: {
framed: false,
icon: 'info',
popup: {
@@
-1355,7
+1356,7
@@
Util.fetchModuleInfo( this.apiModule )
.done( function ( pi ) {
Util.fetchModuleInfo( this.apiModule )
.done( function ( pi ) {
- var prefix, i, j, d
l
, widget, $widgetLabel, widgetField, helpField, tmp, flag, count,
+ var prefix, i, j, d
escriptionContainer
, widget, $widgetLabel, widgetField, helpField, tmp, flag, count,
items = [],
deprecatedItems = [],
buttons = [],
items = [],
deprecatedItems = [],
buttons = [],
@@
-1414,6
+1415,7
@@
if ( pi.helpurls.length ) {
buttons.push( new OO.ui.PopupButtonWidget( {
if ( pi.helpurls.length ) {
buttons.push( new OO.ui.PopupButtonWidget( {
+ $overlay: $( '#mw-apisandbox-ui' ),
label: mw.message( 'apisandbox-helpurls' ).text(),
icon: 'help',
popup: {
label: mw.message( 'apisandbox-helpurls' ).text(),
icon: 'help',
popup: {
@@
-1430,6
+1432,7
@@
if ( pi.examples.length ) {
buttons.push( new OO.ui.PopupButtonWidget( {
if ( pi.examples.length ) {
buttons.push( new OO.ui.PopupButtonWidget( {
+ $overlay: $( '#mw-apisandbox-ui' ),
label: mw.message( 'apisandbox-examples' ).text(),
icon: 'code',
popup: {
label: mw.message( 'apisandbox-examples' ).text(),
icon: 'code',
popup: {
@@
-1462,14
+1465,14
@@
that.tokenWidget = widget;
}
that.tokenWidget = widget;
}
- d
l = $( '<dl
>' );
- d
l.append( $( '<dd
>', {
+ d
escriptionContainer = $( '<div
>' );
+ d
escriptionContainer.append( $( '<div
>', {
addClass: 'description',
append: Util.parseHTML( pi.parameters[ i ].description )
} ) );
if ( pi.parameters[ i ].info && pi.parameters[ i ].info.length ) {
for ( j = 0; j < pi.parameters[ i ].info.length; j++ ) {
addClass: 'description',
append: Util.parseHTML( pi.parameters[ i ].description )
} ) );
if ( pi.parameters[ i ].info && pi.parameters[ i ].info.length ) {
for ( j = 0; j < pi.parameters[ i ].info.length; j++ ) {
- d
l.append( $( '<dd
>', {
+ d
escriptionContainer.append( $( '<div
>', {
addClass: 'info',
append: Util.parseHTML( pi.parameters[ i ].info[ j ] )
} ) );
addClass: 'info',
append: Util.parseHTML( pi.parameters[ i ].info[ j ] )
} ) );
@@
-1485,7
+1488,7
@@
case 'limit':
if ( pi.parameters[ i ].highmax !== undefined ) {
case 'limit':
if ( pi.parameters[ i ].highmax !== undefined ) {
- d
l.append( $( '<dd
>', {
+ d
escriptionContainer.append( $( '<div
>', {
addClass: 'info',
append: [
Util.parseMsg(
addClass: 'info',
append: [
Util.parseMsg(
@@
-1496,7
+1499,7
@@
]
} ) );
} else {
]
} ) );
} else {
- d
l.append( $( '<dd
>', {
+ d
escriptionContainer.append( $( '<div
>', {
addClass: 'info',
append: [
Util.parseMsg( 'api-help-param-limit', pi.parameters[ i ].max ),
addClass: 'info',
append: [
Util.parseMsg( 'api-help-param-limit', pi.parameters[ i ].max ),
@@
-1516,7
+1519,7
@@
tmp += 'max';
}
if ( tmp !== '' ) {
tmp += 'max';
}
if ( tmp !== '' ) {
- d
l.append( $( '<dd
>', {
+ d
escriptionContainer.append( $( '<div
>', {
addClass: 'info',
append: Util.parseMsg(
'api-help-param-integer-' + tmp,
addClass: 'info',
append: Util.parseMsg(
'api-help-param-integer-' + tmp,
@@
-1552,7
+1555,7
@@
);
}
if ( tmp.length ) {
);
}
if ( tmp.length ) {
- d
l.append( $( '<dd
>', {
+ d
escriptionContainer.append( $( '<div
>', {
addClass: 'info',
append: Util.parseHTML( tmp.join( ' ' ) )
} ) );
addClass: 'info',
append: Util.parseHTML( tmp.join( ' ' ) )
} ) );
@@
-1565,7
+1568,7
@@
} ), {
align: 'inline',
classes: [ 'mw-apisandbox-help-field' ],
} ), {
align: 'inline',
classes: [ 'mw-apisandbox-help-field' ],
- label: d
l
+ label: d
escriptionContainer
}
);
}
);