mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 11:16:51 +00:00
Merge "Pass $overlay to widgets that need it"
This commit is contained in:
commit
78b2a2885c
|
@ -83,6 +83,7 @@ ve.ui.MWReferencesListDialog.prototype.initialize = function () {
|
|||
|
||||
this.groupInput = new ve.ui.MWReferenceGroupInputWidget( {
|
||||
$: this.$,
|
||||
$overlay: this.$overlay,
|
||||
emptyGroupName: ve.msg( 'visualeditor-dialog-reference-options-group-placeholder' )
|
||||
} );
|
||||
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 ) {
|
||||
return new ve.ui.MWTemplatePage( part, part.getId(), { $: this.$ } );
|
||||
} 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;
|
||||
};
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
* @param {ve.dm.MWTemplatePlaceholderModel} placeholder Template placeholder
|
||||
* @param {string} name Unique symbolic name of page
|
||||
* @param {Object} [config] Configuration options
|
||||
* @cfg {jQuery} [$overlay] Overlay for dropdowns
|
||||
*/
|
||||
ve.ui.MWTemplatePlaceholderPage = function VeUiMWTemplatePlaceholderPage( placeholder, name, config ) {
|
||||
// Configuration initialization
|
||||
|
@ -29,7 +30,7 @@ ve.ui.MWTemplatePlaceholderPage = function VeUiMWTemplatePlaceholderPage( placeh
|
|||
this.placeholder = placeholder;
|
||||
|
||||
this.addTemplateInput = new ve.ui.MWTitleInputWidget( {
|
||||
$: this.$, $overlay: this.$overlay, namespace: 10
|
||||
$: this.$, $overlay: config.$overlay, namespace: 10
|
||||
} )
|
||||
.connect( this, {
|
||||
change: 'onTemplateInputChange',
|
||||
|
|
Loading…
Reference in a new issue