Use remote file dialog for database and server properties dialogs (#24390)

This commit is contained in:
Cory Rivera
2023-09-13 10:49:10 -07:00
committed by GitHub
parent 4f155423dc
commit 08ded51e75
31 changed files with 108 additions and 97 deletions

View File

@@ -62,16 +62,20 @@ export class AttachDatabaseDialog extends ObjectManagementDialogBase<Database, D
const buttonContainer = this.addButtonsForTable(this._databasesTable, addButton, removeButton);
this._nameField = this.createInputBox(async newValue => {
let selectedRow = this._databasesTable.selectedRows[0];
let dbFile = this._databasesToAttach[selectedRow];
dbFile.databaseName = newValue;
if (this._databasesTable.selectedRows?.length > 0) {
let selectedRow = this._databasesTable.selectedRows[0];
let dbFile = this._databasesToAttach[selectedRow];
dbFile.databaseName = newValue;
}
}, {});
this._nameContainer = this.createLabelInputContainer(loc.AttachAsText, this._nameField);
this._ownerDropdown = this.createDropdown(loc.OwnerText, async newValue => {
let selectedRow = this._databasesTable.selectedRows[0];
let dbFile = this._databasesToAttach[selectedRow];
dbFile.owner = newValue;
if (this._databasesTable.selectedRows?.length > 0) {
let selectedRow = this._databasesTable.selectedRows[0];
let dbFile = this._databasesToAttach[selectedRow];
dbFile.owner = newValue;
}
}, this.viewInfo.loginNames.options, this.viewInfo.loginNames.options[this.viewInfo.loginNames.defaultValueIndex]);
this._ownerContainer = this.createLabelInputContainer(loc.OwnerText, this._ownerDropdown);