mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Advanced Description On Bottom (#4836)
* move description to the bottom * formatting
This commit is contained in:
@@ -419,6 +419,12 @@ export class ScrollableSplitView extends HeightMap implements IDisposable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clear(): void {
|
||||||
|
for (let i = this.viewItems.length - 1; i >= 0; i--) {
|
||||||
|
this.removeView(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
removeView(index: number, sizing?: Sizing): IView {
|
removeView(index: number, sizing?: Sizing): IView {
|
||||||
if (this.state !== State.Idle) {
|
if (this.state !== State.Idle) {
|
||||||
throw new Error('Cant modify splitview');
|
throw new Error('Cant modify splitview');
|
||||||
|
|||||||
@@ -120,7 +120,10 @@ export class OptionsDialog extends Modal {
|
|||||||
|
|
||||||
this._dividerBuilder = append(this._body, $('div'));
|
this._dividerBuilder = append(this._body, $('div'));
|
||||||
|
|
||||||
let descriptionContainer = append(this._body, $('div.optionsDialog-description'));
|
this._optionGroups = append(this._body, $('div.optionsDialog-options-groups.monaco-panel-view'));
|
||||||
|
this.splitview = new ScrollableSplitView(this._optionGroups, { enableResizing: false, scrollDebounce: 0 });
|
||||||
|
|
||||||
|
const descriptionContainer = append(this._body, $('div.optionsDialog-description'));
|
||||||
|
|
||||||
this._optionTitle = append(descriptionContainer, $('div.modal-title'));
|
this._optionTitle = append(descriptionContainer, $('div.modal-title'));
|
||||||
this._optionDescription = append(descriptionContainer, $('div.optionsDialog-description-content'));
|
this._optionDescription = append(descriptionContainer, $('div.optionsDialog-description-content'));
|
||||||
@@ -208,7 +211,6 @@ export class OptionsDialog extends Modal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public close() {
|
public close() {
|
||||||
this._optionGroups.remove();
|
|
||||||
this.dispose();
|
this.dispose();
|
||||||
this.hide();
|
this.hide();
|
||||||
this._onCloseEvent.fire();
|
this._onCloseEvent.fire();
|
||||||
@@ -217,8 +219,7 @@ export class OptionsDialog extends Modal {
|
|||||||
public open(options: azdata.ServiceOption[], optionValues: { [name: string]: any }) {
|
public open(options: azdata.ServiceOption[], optionValues: { [name: string]: any }) {
|
||||||
this._optionValues = optionValues;
|
this._optionValues = optionValues;
|
||||||
let firstOption: string;
|
let firstOption: string;
|
||||||
this._optionGroups = $('div.optionsDialog-options-groups.monaco-panel-view');
|
this.splitview.clear();
|
||||||
this.splitview = new ScrollableSplitView(this._optionGroups, { enableResizing: false, scrollDebounce: 0 });
|
|
||||||
let categoryMap = OptionsDialogHelper.groupOptionsByCategory(options);
|
let categoryMap = OptionsDialogHelper.groupOptionsByCategory(options);
|
||||||
for (let category in categoryMap) {
|
for (let category in categoryMap) {
|
||||||
let serviceOptions: azdata.ServiceOption[] = categoryMap[category];
|
let serviceOptions: azdata.ServiceOption[] = categoryMap[category];
|
||||||
@@ -238,7 +239,6 @@ export class OptionsDialog extends Modal {
|
|||||||
if (this.height) {
|
if (this.height) {
|
||||||
this.splitview.layout(this.height - 120);
|
this.splitview.layout(this.height - 120);
|
||||||
}
|
}
|
||||||
append(this._body, this._optionGroups);
|
|
||||||
this.show();
|
this.show();
|
||||||
let firstOptionWidget = this._optionElements[firstOption].optionWidget;
|
let firstOptionWidget = this._optionElements[firstOption].optionWidget;
|
||||||
this.registerStyling();
|
this.registerStyling();
|
||||||
|
|||||||
Reference in New Issue
Block a user