Push ownership of the sidebar down into the two-pane layout

Leaves a reference in the TemplateDialog so that we can slowly
migrate the many usages.

Makes no other changes to how the sidebar is managed (yet!).

Bug: T311069
Change-Id: I45403cd32e3adbe357ebad7bbc851f60d92751e5
This commit is contained in:
Adam Wight 2022-06-21 15:46:21 +02:00 committed by Awight
parent b14f3a5965
commit 90179c48ed
2 changed files with 3 additions and 1 deletions

View file

@ -322,8 +322,9 @@ ve.ui.MWTemplateDialog.prototype.initialize = function () {
// Properties
this.bookletLayout = new ve.ui.MWTwoPaneTransclusionDialogLayout( this.constructor.static.bookletLayoutConfig );
// TODO: Remove once all references are gone.
this.sidebar = this.bookletLayout.sidebar;
this.sidebar = new ve.ui.MWTransclusionOutlineWidget();
this.sidebar.connect( this, {
focusPageByName: 'focusPart',
filterPagesByName: 'onFilterPagesByName',

View file

@ -32,6 +32,7 @@ ve.ui.MWTwoPaneTransclusionDialogLayout = function VeUiMWTwoPaneTransclusionDial
expanded: this.expanded
} );
this.setContentPanel( this.stackLayout );
this.sidebar = new ve.ui.MWTransclusionOutlineWidget();
this.autoFocus = config.autoFocus === undefined || !!config.autoFocus;
this.outlineVisible = false;
this.outlined = !!config.outlined;