Merge "Pass $overlay to widgets that need it"

This commit is contained in:
jenkins-bot 2014-10-28 17:30:57 +00:00 committed by Gerrit Code Review
commit 78b2a2885c
3 changed files with 8 additions and 2 deletions

View file

@ -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, {

View file

@ -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;
};

View file

@ -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',