mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-26 09:35:38 -05:00
listbox and select box (#23504)
* listbox * select box * fix tests * one more test
This commit is contained in:
@@ -13,7 +13,6 @@ import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { localize } from 'vs/nls';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { attachSelectBoxStyler } from 'sql/platform/theme/common/vsstyler';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import * as strings from 'vs/base/common/strings';
|
||||
import { IClipboardService } from 'sql/platform/clipboard/common/clipboardService';
|
||||
@@ -33,6 +32,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { Deferred } from 'sql/base/common/promise';
|
||||
import { defaultButtonStyles, defaultInputBoxStyles } from 'vs/platform/theme/browser/defaultStyles';
|
||||
import { defaultSelectBoxStyles } from 'sql/platform/theme/browser/defaultStyles';
|
||||
|
||||
/**
|
||||
* This function adds one year to the current date and returns it in the UTC format.
|
||||
@@ -120,7 +120,7 @@ export class BackupRestoreUrlBrowserDialog extends Modal {
|
||||
tableContainer.setAttribute('role', 'presentation');
|
||||
|
||||
let azureAccountLabel = localize('backupRestoreUrlBrowserDialog.account', "Azure Account");
|
||||
this._accountSelectorBox = this._register(new SelectBox([''], '', this._contextViewService, null, { ariaLabel: azureAccountLabel }));
|
||||
this._accountSelectorBox = this._register(new SelectBox([''], '', defaultSelectBoxStyles, this._contextViewService, null, { ariaLabel: azureAccountLabel }));
|
||||
this._accountSelectorBox.disable();
|
||||
let accountSelector = DialogHelper.appendRow(tableContainer, azureAccountLabel, 'url-input-label', 'url-input-box', null, true);
|
||||
DialogHelper.appendInputSelectBox(accountSelector, this._accountSelectorBox);
|
||||
@@ -151,25 +151,25 @@ export class BackupRestoreUrlBrowserDialog extends Modal {
|
||||
linkAccountButton.appendChild(linkAccount.el);
|
||||
|
||||
let tenantLabel = localize('backupRestoreUrlBrowserDialog.tenant', "Azure AD Tenant");
|
||||
this._tenantSelectorBox = this._register(new SelectBox([], '', this._contextViewService, null, { ariaLabel: tenantLabel }));
|
||||
this._tenantSelectorBox = this._register(new SelectBox([], '', defaultSelectBoxStyles, this._contextViewService, null, { ariaLabel: tenantLabel }));
|
||||
this._tenantSelectorBox.disable();
|
||||
let tenantSelector = DialogHelper.appendRow(tableContainer, tenantLabel, 'url-input-label', 'url-input-box', null, true);
|
||||
DialogHelper.appendInputSelectBox(tenantSelector, this._tenantSelectorBox);
|
||||
|
||||
let subscriptionLabel = localize('backupRestoreUrlBrowserDialog.subscription', "Azure subscription");
|
||||
this._subscriptionSelectorBox = this._register(new SelectBox([], '', this._contextViewService, null, { ariaLabel: subscriptionLabel }));
|
||||
this._subscriptionSelectorBox = this._register(new SelectBox([], '', defaultSelectBoxStyles, this._contextViewService, null, { ariaLabel: subscriptionLabel }));
|
||||
this._subscriptionSelectorBox.disable();
|
||||
let subscriptionSelector = DialogHelper.appendRow(tableContainer, subscriptionLabel, 'url-input-label', 'url-input-box', null, true);
|
||||
DialogHelper.appendInputSelectBox(subscriptionSelector, this._subscriptionSelectorBox);
|
||||
|
||||
let storageAccountLabel = localize('backupRestoreUrlBrowserDialog.storageAccount', "Storage account");
|
||||
this._storageAccountSelectorBox = this._register(new SelectBox([], '', this._contextViewService, null, { ariaLabel: storageAccountLabel }));
|
||||
this._storageAccountSelectorBox = this._register(new SelectBox([], '', defaultSelectBoxStyles, this._contextViewService, null, { ariaLabel: storageAccountLabel }));
|
||||
this._storageAccountSelectorBox.disable();
|
||||
let storageAccountSelector = DialogHelper.appendRow(tableContainer, storageAccountLabel, 'url-input-label', 'url-input-box', null, true);
|
||||
DialogHelper.appendInputSelectBox(storageAccountSelector, this._storageAccountSelectorBox);
|
||||
|
||||
let blobContainerLabel = localize('backupRestoreUrlBrowserDialog.blobContainer', "Blob container");
|
||||
this._blobContainerSelectorBox = this._register(new SelectBox([], '', this._contextViewService, null, { ariaLabel: blobContainerLabel }));
|
||||
this._blobContainerSelectorBox = this._register(new SelectBox([], '', defaultSelectBoxStyles, this._contextViewService, null, { ariaLabel: blobContainerLabel }));
|
||||
this._blobContainerSelectorBox.disable();
|
||||
let blobContainerSelector = DialogHelper.appendRow(tableContainer, blobContainerLabel, 'url-input-label', 'url-input-box', null, true);
|
||||
DialogHelper.appendInputSelectBox(blobContainerSelector, this._blobContainerSelectorBox);
|
||||
@@ -194,7 +194,7 @@ export class BackupRestoreUrlBrowserDialog extends Modal {
|
||||
let backupFileLabel = localize('backupRestoreUrlBrowserDialog.backupFile', "Backup file");
|
||||
|
||||
if (this._restoreDialog) {
|
||||
this._backupFileSelectorBox = this._register(new SelectBox([], '', this._contextViewService, null, { ariaLabel: backupFileLabel }));
|
||||
this._backupFileSelectorBox = this._register(new SelectBox([], '', defaultSelectBoxStyles, this._contextViewService, null, { ariaLabel: backupFileLabel }));
|
||||
let backupFileSelector = DialogHelper.appendRow(tableContainer, backupFileLabel, 'url-input-label', 'url-input-box', null, true);
|
||||
DialogHelper.appendInputSelectBox(backupFileSelector, this._backupFileSelectorBox);
|
||||
this._backupFileSelectorBox.setOptions([]);
|
||||
@@ -440,15 +440,6 @@ export class BackupRestoreUrlBrowserDialog extends Modal {
|
||||
|
||||
|
||||
private registerThemeStylers(): void {
|
||||
this._register(attachSelectBoxStyler(this._tenantSelectorBox, this._themeService));
|
||||
this._register(attachSelectBoxStyler(this._accountSelectorBox, this._themeService));
|
||||
this._register(attachSelectBoxStyler(this._subscriptionSelectorBox, this._themeService));
|
||||
this._register(attachSelectBoxStyler(this._storageAccountSelectorBox, this._themeService));
|
||||
this._register(attachSelectBoxStyler(this._blobContainerSelectorBox, this._themeService));
|
||||
if (this._backupFileSelectorBox) {
|
||||
this._register(attachSelectBoxStyler(this._backupFileSelectorBox, this._themeService));
|
||||
}
|
||||
|
||||
this._register(this._sasButton);
|
||||
this._register(this._okButton);
|
||||
this._register(this._cancelButton);
|
||||
|
||||
@@ -27,6 +27,7 @@ import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IErrorMessageService } from 'sql/platform/errorMessage/common/errorMessageService';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { defaultInputBoxStyles } from 'vs/platform/theme/browser/defaultStyles';
|
||||
import { defaultSelectBoxStyles } from 'sql/platform/theme/browser/defaultStyles';
|
||||
|
||||
/**
|
||||
* Connection Widget clas for CMS Connections
|
||||
@@ -55,7 +56,7 @@ export class CmsConnectionWidget extends ConnectionWidget {
|
||||
if (authTypeOption) {
|
||||
let authTypeDefault = this.getAuthTypeDefault(authTypeOption, OS);
|
||||
let authTypeDefaultDisplay = this.getAuthTypeDisplayName(authTypeDefault);
|
||||
this._authTypeSelectBox = new SelectBox(authTypeOption.categoryValues.map(c => c.displayName), authTypeDefaultDisplay, this._contextViewService, undefined, { ariaLabel: authTypeOption.displayName });
|
||||
this._authTypeSelectBox = new SelectBox(authTypeOption.categoryValues.map(c => c.displayName), authTypeDefaultDisplay, defaultSelectBoxStyles, this._contextViewService, undefined, { ariaLabel: authTypeOption.displayName });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ import { ICapabilitiesService } from 'sql/platform/capabilities/common/capabilit
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { FieldSet } from 'sql/base/browser/ui/fieldset/fieldset';
|
||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { defaultSelectBoxStyles } from 'sql/platform/theme/browser/defaultStyles';
|
||||
|
||||
export interface OnShowUIResponse {
|
||||
selectedProviderDisplayName: string;
|
||||
@@ -191,7 +192,7 @@ export class ConnectionDialogWidget extends Modal {
|
||||
this._body = DOM.append(container, DOM.$('.connection-dialog'));
|
||||
|
||||
const connectTypeLabel = localize('connectType', "Connection type");
|
||||
this._providerTypeSelectBox = new SelectBox(this.providerDisplayNameOptions, this.selectedProviderType, this.contextViewService, undefined, { ariaLabel: connectTypeLabel });
|
||||
this._providerTypeSelectBox = new SelectBox(this.providerDisplayNameOptions, this.selectedProviderType, defaultSelectBoxStyles, this.contextViewService, undefined, { ariaLabel: connectTypeLabel });
|
||||
// Recent connection tab
|
||||
const recentConnectionTab = DOM.$('.connection-recent-tab');
|
||||
const recentConnectionContainer = DOM.append(recentConnectionTab, DOM.$('.connection-recent', { id: 'recentConnection' }));
|
||||
@@ -279,8 +280,6 @@ export class ConnectionDialogWidget extends Modal {
|
||||
}
|
||||
|
||||
private registerListeners(): void {
|
||||
// Theme styler
|
||||
this._register(styler.attachSelectBoxStyler(this._providerTypeSelectBox, this._themeService));
|
||||
this._register(this._providerTypeSelectBox.onDidSelect(selectedProviderType => {
|
||||
this.onProviderTypeSelected(selectedProviderType.selected);
|
||||
}));
|
||||
|
||||
@@ -15,7 +15,6 @@ import { IConnectionProfile, ServiceOptionType } from 'sql/platform/connection/c
|
||||
import { ConnectionOptionSpecialType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
import { ConnectionProfileGroup, IConnectionProfileGroup } from 'sql/platform/connection/common/connectionProfileGroup';
|
||||
import { IConnectionManagementService } from 'sql/platform/connection/common/connectionManagement';
|
||||
import * as styler from 'sql/platform/theme/common/styler';
|
||||
import { IAccountManagementService } from 'sql/platform/accounts/common/interfaces';
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
@@ -46,7 +45,7 @@ import { isMssqlAuthProviderEnabled } from 'sql/workbench/services/connection/br
|
||||
import { RequiredIndicatorClassName } from 'sql/base/browser/ui/label/label';
|
||||
import { FieldSet } from 'sql/base/browser/ui/fieldset/fieldset';
|
||||
import { defaultButtonStyles, defaultInputBoxStyles } from 'vs/platform/theme/browser/defaultStyles';
|
||||
import { defaultCheckboxStyles, defaultEditableDropdownStyles } from 'sql/platform/theme/browser/defaultStyles';
|
||||
import { defaultCheckboxStyles, defaultEditableDropdownStyles, defaultSelectBoxStyles } from 'sql/platform/theme/browser/defaultStyles';
|
||||
|
||||
const ConnectionStringText = localize('connectionWidget.connectionString', "Connection string");
|
||||
|
||||
@@ -144,7 +143,7 @@ export class ConnectionWidget extends lifecycle.Disposable {
|
||||
if (authTypeOption) {
|
||||
let authTypeDefault = this.getAuthTypeDefault(authTypeOption, OS);
|
||||
let authTypeDefaultDisplay = this.getAuthTypeDisplayName(authTypeDefault);
|
||||
this._authTypeSelectBox = new SelectBox(authTypeOption.categoryValues.map(c => c.displayName), authTypeDefaultDisplay, this._contextViewService, undefined, { ariaLabel: authTypeOption.displayName });
|
||||
this._authTypeSelectBox = new SelectBox(authTypeOption.categoryValues.map(c => c.displayName), authTypeDefaultDisplay, defaultSelectBoxStyles, this._contextViewService, undefined, { ariaLabel: authTypeOption.displayName });
|
||||
this._register(this._authTypeSelectBox);
|
||||
}
|
||||
this._providerName = providerName;
|
||||
@@ -177,7 +176,7 @@ export class ConnectionWidget extends lifecycle.Disposable {
|
||||
|
||||
public createConnectionWidget(container: HTMLElement, authTypeChanged: boolean = false): void {
|
||||
this._serverGroupOptions = [this.DefaultServerGroup];
|
||||
this._serverGroupSelectBox = new SelectBox(this._serverGroupOptions.map(g => g.name), this.DefaultServerGroup.name, this._contextViewService, undefined, { ariaLabel: this._serverGroupDisplayString });
|
||||
this._serverGroupSelectBox = new SelectBox(this._serverGroupOptions.map(g => g.name), this.DefaultServerGroup.name, defaultSelectBoxStyles, this._contextViewService, undefined, { ariaLabel: this._serverGroupDisplayString });
|
||||
this._register(this._serverGroupSelectBox);
|
||||
this._previousGroupOption = this._serverGroupSelectBox.value;
|
||||
this._container = DOM.append(container, DOM.$('div.connection-table'));
|
||||
@@ -299,9 +298,8 @@ export class ConnectionWidget extends lifecycle.Disposable {
|
||||
return { text: v.displayName, value: v.value } as SelectOptionItemSQL;
|
||||
});
|
||||
|
||||
this._customOptionWidgets[i] = new SelectBox(options, selectedValue, this._contextViewService, customOptionsContainer, { ariaLabel: option.displayName }, option.name);
|
||||
this._customOptionWidgets[i] = new SelectBox(options, selectedValue, defaultSelectBoxStyles, this._contextViewService, customOptionsContainer, { ariaLabel: option.displayName }, option.name);
|
||||
DialogHelper.appendInputSelectBox(customOptionsContainer, this._customOptionWidgets[i] as SelectBox);
|
||||
this._register(styler.attachSelectBoxStyler(this._customOptionWidgets[i] as SelectBox, this._themeService));
|
||||
break;
|
||||
default:
|
||||
this._customOptionWidgets[i] = new InputBox(customOptionsContainer, this._contextViewService, {
|
||||
@@ -442,7 +440,7 @@ export class ConnectionWidget extends lifecycle.Disposable {
|
||||
// Azure account picker
|
||||
let accountLabel = localize('connection.azureAccountDropdownLabel', "Account");
|
||||
let accountDropdown = DialogHelper.appendRow(this._tableContainer, accountLabel, 'connection-label', 'connection-input', 'azure-account-row');
|
||||
this._azureAccountDropdown = new SelectBox([], undefined, this._contextViewService, accountDropdown, { ariaLabel: accountLabel });
|
||||
this._azureAccountDropdown = new SelectBox([], undefined, defaultSelectBoxStyles, this._contextViewService, accountDropdown, { ariaLabel: accountLabel });
|
||||
this._register(this._azureAccountDropdown);
|
||||
DialogHelper.appendInputSelectBox(accountDropdown, this._azureAccountDropdown);
|
||||
let refreshCredentials = DialogHelper.appendRow(this._tableContainer, '', 'connection-label', 'connection-input', ['azure-account-row', 'refresh-credentials-link']);
|
||||
@@ -452,7 +450,7 @@ export class ConnectionWidget extends lifecycle.Disposable {
|
||||
// Azure tenant picker
|
||||
let tenantLabel = localize('connection.azureTenantDropdownLabel', "Azure AD tenant");
|
||||
let tenantDropdown = DialogHelper.appendRow(this._tableContainer, tenantLabel, 'connection-label', 'connection-input', ['azure-account-row', 'azure-tenant-row']);
|
||||
this._azureTenantDropdown = new SelectBox([], undefined, this._contextViewService, tenantDropdown, { ariaLabel: tenantLabel });
|
||||
this._azureTenantDropdown = new SelectBox([], undefined, defaultSelectBoxStyles, this._contextViewService, tenantDropdown, { ariaLabel: tenantLabel });
|
||||
this._register(this._azureTenantDropdown);
|
||||
DialogHelper.appendInputSelectBox(tenantDropdown, this._azureTenantDropdown);
|
||||
}
|
||||
@@ -540,10 +538,7 @@ export class ConnectionWidget extends lifecycle.Disposable {
|
||||
}
|
||||
|
||||
protected registerListeners(): void {
|
||||
// Theme styler
|
||||
this._register(styler.attachSelectBoxStyler(this._azureAccountDropdown, this._themeService));
|
||||
if (this._serverGroupSelectBox) {
|
||||
this._register(styler.attachSelectBoxStyler(this._serverGroupSelectBox, this._themeService));
|
||||
this._register(this._serverGroupSelectBox.onDidSelect(selectedGroup => {
|
||||
this.onGroupSelected(selectedGroup.selected);
|
||||
}));
|
||||
@@ -577,8 +572,6 @@ export class ConnectionWidget extends lifecycle.Disposable {
|
||||
}
|
||||
|
||||
if (this._authTypeSelectBox) {
|
||||
// Theme styler
|
||||
this._register(styler.attachSelectBoxStyler(this._authTypeSelectBox, this._themeService));
|
||||
this._register(this._authTypeSelectBox.onDidSelect(selectedAuthType => {
|
||||
this.onAuthTypeSelected(selectedAuthType.selected, true);
|
||||
this.setConnectButton();
|
||||
@@ -586,14 +579,12 @@ export class ConnectionWidget extends lifecycle.Disposable {
|
||||
}
|
||||
|
||||
if (this._azureAccountDropdown) {
|
||||
this._register(styler.attachSelectBoxStyler(this._azureAccountDropdown, this._themeService));
|
||||
this._register(this._azureAccountDropdown.onDidSelect(() => {
|
||||
this.onAzureAccountSelected().catch(err => this._logService.error(`Unexpected error handling Azure Account dropdown click : ${err}`));
|
||||
}));
|
||||
}
|
||||
|
||||
if (this._azureTenantDropdown) {
|
||||
this._register(styler.attachSelectBoxStyler(this._azureTenantDropdown, this._themeService));
|
||||
this._register(this._azureTenantDropdown.onDidSelect((selectInfo) => {
|
||||
this.onAzureTenantSelected(selectInfo.index);
|
||||
}));
|
||||
|
||||
@@ -20,7 +20,6 @@ import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { localize } from 'vs/nls';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { attachSelectBoxStyler } from 'sql/platform/theme/common/vsstyler';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import * as strings from 'vs/base/common/strings';
|
||||
import { IClipboardService } from 'sql/platform/clipboard/common/clipboardService';
|
||||
@@ -32,6 +31,7 @@ import { attachModalDialogStyler } from 'sql/workbench/common/styler';
|
||||
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfiguration';
|
||||
import { defaultInputBoxStyles } from 'vs/platform/theme/browser/defaultStyles';
|
||||
import { defaultSelectBoxStyles } from 'sql/platform/theme/browser/defaultStyles';
|
||||
|
||||
export class FileBrowserDialog extends Modal {
|
||||
private _viewModel: FileBrowserViewModel;
|
||||
@@ -95,7 +95,7 @@ export class FileBrowserDialog extends Modal {
|
||||
});
|
||||
|
||||
let filterLabel = localize('fileFilter', "Files of type");
|
||||
this._fileFilterSelectBox = new SelectBox(['*'], '*', this._contextViewService);
|
||||
this._fileFilterSelectBox = new SelectBox(['*'], '*', defaultSelectBoxStyles, this._contextViewService);
|
||||
this._fileFilterSelectBox.setAriaLabel(filterLabel);
|
||||
let filterBuilder = DialogHelper.appendRow(tableContainer, filterLabel, 'file-input-label', 'file-input-box');
|
||||
DialogHelper.appendInputSelectBox(filterBuilder, this._fileFilterSelectBox);
|
||||
@@ -225,10 +225,6 @@ export class FileBrowserDialog extends Modal {
|
||||
this._register(this._filePathInputBox.onLoseFocus((params: OnLoseFocusParams) => {
|
||||
this.onFilePathBlur(params).catch(err => onUnexpectedError(err));
|
||||
}));
|
||||
|
||||
// Theme styler
|
||||
this._register(attachSelectBoxStyler(this._fileFilterSelectBox, this._themeService));
|
||||
|
||||
this._register(this._themeService.onDidColorThemeChange(e => this.updateTheme()));
|
||||
}
|
||||
|
||||
|
||||
@@ -32,8 +32,8 @@ import Severity from 'vs/base/common/severity';
|
||||
import { status } from 'vs/base/browser/ui/aria/aria';
|
||||
import { IErrorMessageService } from 'sql/platform/errorMessage/common/errorMessageService';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { defaultInputBoxStyles, defaultSelectBoxStyles } from 'vs/platform/theme/browser/defaultStyles';
|
||||
import { defaultEditableDropdownStyles } from 'sql/platform/theme/browser/defaultStyles';
|
||||
import { defaultInputBoxStyles } from 'vs/platform/theme/browser/defaultStyles';
|
||||
import { defaultEditableDropdownStyles, defaultSelectBoxStyles } from 'sql/platform/theme/browser/defaultStyles';
|
||||
|
||||
// strings for filter dialog
|
||||
const OkButtonText = localize('objectExplorer.okButtonText', "OK");
|
||||
|
||||
@@ -15,7 +15,6 @@ import { localize } from 'vs/nls';
|
||||
import { ProfilerInput } from 'sql/workbench/browser/editor/profiler/profilerInput';
|
||||
import { InputBox } from 'sql/base/browser/ui/inputBox/inputBox';
|
||||
import { SelectBox } from 'sql/base/browser/ui/selectBox/selectBox';
|
||||
import { attachSelectBoxStyler } from 'sql/platform/theme/common/vsstyler';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
@@ -29,6 +28,7 @@ import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfiguration';
|
||||
import * as aria from 'vs/base/browser/ui/aria/aria';
|
||||
import { defaultInputBoxStyles } from 'vs/platform/theme/browser/defaultStyles';
|
||||
import { defaultSelectBoxStyles } from 'sql/platform/theme/browser/defaultStyles';
|
||||
|
||||
const ClearText: string = localize('profilerFilterDialog.clear', "Clear all");
|
||||
const ApplyText: string = localize('profilerFilterDialog.apply', "Apply");
|
||||
@@ -187,9 +187,8 @@ export class ProfilerFilterDialog extends Modal {
|
||||
}
|
||||
|
||||
private createSelectBox(container: HTMLElement, options: string[], selectedOption: string, ariaLabel: string): SelectBox {
|
||||
const dropdown = new SelectBox(options, selectedOption, this.contextViewService, undefined, { ariaLabel: ariaLabel });
|
||||
const dropdown = new SelectBox(options, selectedOption, defaultSelectBoxStyles, this.contextViewService, undefined, { ariaLabel: ariaLabel });
|
||||
dropdown.render(container);
|
||||
this._register(attachSelectBoxStyler(dropdown, this._themeService));
|
||||
return dropdown;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import { Table } from 'sql/base/browser/ui/table/table';
|
||||
import { TableDataView } from 'sql/base/browser/ui/table/tableDataView';
|
||||
import * as DialogHelper from 'sql/workbench/browser/modal/dialogHelper';
|
||||
import { HideReason, Modal } from 'sql/workbench/browser/modal/modal';
|
||||
import { attachTableStyler, attachSelectBoxStyler } from 'sql/platform/theme/common/styler';
|
||||
import { attachTableStyler } from 'sql/platform/theme/common/styler';
|
||||
import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys';
|
||||
import { RestoreViewModel, RestoreOptionParam, SouceDatabaseNamesParam } from 'sql/workbench/services/restore/browser/restoreViewModel';
|
||||
import * as FileValidationConstants from 'sql/workbench/services/fileBrowser/common/fileValidationServiceConstants';
|
||||
@@ -51,7 +51,7 @@ import { IAccessibilityService } from 'vs/platform/accessibility/common/accessib
|
||||
import { IQuickInputService } from 'vs/platform/quickinput/common/quickInput';
|
||||
import { IComponentContextService } from 'sql/workbench/services/componentContext/browser/componentContextService';
|
||||
import { defaultButtonStyles, defaultInputBoxStyles } from 'vs/platform/theme/browser/defaultStyles';
|
||||
import { defaultCheckboxStyles, defaultEditableDropdownStyles } from 'sql/platform/theme/browser/defaultStyles';
|
||||
import { defaultCheckboxStyles, defaultEditableDropdownStyles, defaultSelectBoxStyles } from 'sql/platform/theme/browser/defaultStyles';
|
||||
|
||||
interface FileListElement {
|
||||
logicalFileName: string;
|
||||
@@ -520,7 +520,6 @@ export class RestoreDialog extends Modal {
|
||||
break;
|
||||
case ServiceOptionType.category:
|
||||
propertyWidget = this.createSelectBoxHelper(container, option.description, option.categoryValues.map(c => c.displayName), DialogHelper.getCategoryDisplayName(option.categoryValues, option.defaultValue)!);
|
||||
this._register(attachSelectBoxStyler(propertyWidget, this._themeService));
|
||||
this._register(propertyWidget.onDidSelect(selectedDatabase => {
|
||||
this.onCatagoryOptionChanged(optionName);
|
||||
}));
|
||||
@@ -567,7 +566,7 @@ export class RestoreDialog extends Modal {
|
||||
const inputContainer = DOM.append(container, DOM.$('.dialog-input-section'));
|
||||
DOM.append(inputContainer, DOM.$('.dialog-label')).innerText = label;
|
||||
const inputCellContainer = DOM.append(inputContainer, DOM.$('.dialog-input'));
|
||||
const selectBox = this._register(new SelectBox(options, selectedOption, this._contextViewService, inputCellContainer, { ariaLabel: label }));
|
||||
const selectBox = this._register(new SelectBox(options, selectedOption, defaultSelectBoxStyles, this._contextViewService, inputCellContainer, { ariaLabel: label }));
|
||||
selectBox.render(inputCellContainer);
|
||||
return selectBox;
|
||||
}
|
||||
@@ -662,9 +661,6 @@ export class RestoreDialog extends Modal {
|
||||
}
|
||||
|
||||
private registerListeners(): void {
|
||||
// Theme styler
|
||||
this._register(attachSelectBoxStyler(this._restoreFromSelectBox!, this._themeService));
|
||||
this._register(attachSelectBoxStyler(this._sourceDatabaseSelectBox!, this._themeService));
|
||||
this._register(this._browseFileButton!);
|
||||
this._register(this._browseUrlButton!);
|
||||
this._register(this._scriptButton!);
|
||||
|
||||
Reference in New Issue
Block a user