mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 19:26:46 +00:00
Pass $overlay to widgets that need it
Also change this.$overlay (which doesn't even exist) to config.$overlay in MWTemplatePlaceholderPage and document it. Compensates for I39df86373ea in oojs-ui. Change-Id: I4a233c058439d6cfb38d80ece890c8fe57d58f49
This commit is contained in:
parent
0dad360036
commit
61e8115e8b
|
@ -83,6 +83,7 @@ ve.ui.MWReferencesListDialog.prototype.initialize = function () {
|
||||||
|
|
||||||
this.groupInput = new ve.ui.MWReferenceGroupInputWidget( {
|
this.groupInput = new ve.ui.MWReferenceGroupInputWidget( {
|
||||||
$: this.$,
|
$: this.$,
|
||||||
|
$overlay: this.$overlay,
|
||||||
emptyGroupName: ve.msg( 'visualeditor-dialog-reference-options-group-placeholder' )
|
emptyGroupName: ve.msg( 'visualeditor-dialog-reference-options-group-placeholder' )
|
||||||
} );
|
} );
|
||||||
this.groupField = new OO.ui.FieldLayout( this.groupInput, {
|
this.groupField = new OO.ui.FieldLayout( this.groupInput, {
|
||||||
|
|
|
@ -254,7 +254,11 @@ ve.ui.MWTemplateDialog.prototype.getPageFromPart = function ( part ) {
|
||||||
if ( part instanceof ve.dm.MWTemplateModel ) {
|
if ( part instanceof ve.dm.MWTemplateModel ) {
|
||||||
return new ve.ui.MWTemplatePage( part, part.getId(), { $: this.$ } );
|
return new ve.ui.MWTemplatePage( part, part.getId(), { $: this.$ } );
|
||||||
} else if ( part instanceof ve.dm.MWTemplatePlaceholderModel ) {
|
} else if ( part instanceof ve.dm.MWTemplatePlaceholderModel ) {
|
||||||
return new ve.ui.MWTemplatePlaceholderPage( part, part.getId(), { $: this.$ } );
|
return new ve.ui.MWTemplatePlaceholderPage(
|
||||||
|
part,
|
||||||
|
part.getId(),
|
||||||
|
{ $: this.$, $overlay: this.$overlay }
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
* @param {ve.dm.MWTemplatePlaceholderModel} placeholder Template placeholder
|
* @param {ve.dm.MWTemplatePlaceholderModel} placeholder Template placeholder
|
||||||
* @param {string} name Unique symbolic name of page
|
* @param {string} name Unique symbolic name of page
|
||||||
* @param {Object} [config] Configuration options
|
* @param {Object} [config] Configuration options
|
||||||
|
* @cfg {jQuery} [$overlay] Overlay for dropdowns
|
||||||
*/
|
*/
|
||||||
ve.ui.MWTemplatePlaceholderPage = function VeUiMWTemplatePlaceholderPage( placeholder, name, config ) {
|
ve.ui.MWTemplatePlaceholderPage = function VeUiMWTemplatePlaceholderPage( placeholder, name, config ) {
|
||||||
// Configuration initialization
|
// Configuration initialization
|
||||||
|
@ -29,7 +30,7 @@ ve.ui.MWTemplatePlaceholderPage = function VeUiMWTemplatePlaceholderPage( placeh
|
||||||
this.placeholder = placeholder;
|
this.placeholder = placeholder;
|
||||||
|
|
||||||
this.addTemplateInput = new ve.ui.MWTitleInputWidget( {
|
this.addTemplateInput = new ve.ui.MWTitleInputWidget( {
|
||||||
$: this.$, $overlay: this.$overlay, namespace: 10
|
$: this.$, $overlay: config.$overlay, namespace: 10
|
||||||
} )
|
} )
|
||||||
.connect( this, {
|
.connect( this, {
|
||||||
change: 'onTemplateInputChange',
|
change: 'onTemplateInputChange',
|
||||||
|
|
Loading…
Reference in a new issue