mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-04 01:25:38 -05:00
Remove builder references from options dialog (#4774)
* remove more builder references; remove $ from declarations * fix jquery references * formatting * fixing backup * fix backup box
This commit is contained in:
@@ -6,50 +6,38 @@
|
||||
'use strict';
|
||||
import { SelectBox } from 'sql/base/browser/ui/selectBox/selectBox';
|
||||
import { Button } from 'sql/base/browser/ui/button/button';
|
||||
import { append, $, addClass, addClasses } from 'vs/base/browser/dom';
|
||||
|
||||
import { Builder } from 'sql/base/browser/builder';
|
||||
import * as types from 'vs/base/common/types';
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
export function appendRow(container: Builder, label: string, labelClass: string, cellContainerClass: string, rowContainerClass?: string): Builder {
|
||||
let cellContainer: Builder;
|
||||
let rowAttributes = rowContainerClass ? { class: rowContainerClass } : {};
|
||||
container.element('tr', rowAttributes, (rowContainer) => {
|
||||
rowContainer.element('td', { class: labelClass }, (labelCellContainer) => {
|
||||
labelCellContainer.div({}, (labelContainer) => {
|
||||
labelContainer.text(label);
|
||||
});
|
||||
});
|
||||
rowContainer.element('td', { class: cellContainerClass }, (inputCellContainer) => {
|
||||
cellContainer = inputCellContainer;
|
||||
});
|
||||
});
|
||||
export function appendRow(container: HTMLElement, label: string, labelClass: string, cellContainerClass: string, rowContainerClass?: string | Array<string>): HTMLElement {
|
||||
let rowContainer = append(container, $('tr'));
|
||||
if (rowContainerClass) {
|
||||
if (types.isString(rowContainerClass)) {
|
||||
addClass(rowContainer, rowContainerClass);
|
||||
} else {
|
||||
addClasses(rowContainer, ...rowContainerClass);
|
||||
}
|
||||
}
|
||||
append(append(rowContainer, $(`td.${labelClass}`)), $('div')).innerText = label;
|
||||
let inputCellContainer = append(rowContainer, $(`td.${cellContainerClass}`));
|
||||
|
||||
return cellContainer;
|
||||
return inputCellContainer;
|
||||
}
|
||||
|
||||
export function appendRowLink(container: Builder, label: string, labelClass: string, cellContainerClass: string): Builder {
|
||||
let rowButton: Button;
|
||||
container.element('tr', {}, (rowContainer) => {
|
||||
rowContainer.element('td', { class: labelClass }, (labelCellContainer) => {
|
||||
labelCellContainer.div({}, (labelContainer) => {
|
||||
labelContainer.text(label);
|
||||
});
|
||||
});
|
||||
rowContainer.element('td', { class: cellContainerClass }, (inputCellContainer) => {
|
||||
inputCellContainer.element('div', {}, (rowContainer) => {
|
||||
rowButton = new Button(rowContainer.getHTMLElement());
|
||||
export function appendRowLink(container: HTMLElement, label: string, labelClass: string, cellContainerClass: string): HTMLElement {
|
||||
let rowContainer = append(container, $('tr'));
|
||||
append(append(rowContainer, $(`td.${labelClass}`)), $('div')).innerText = label;
|
||||
let buttonContainer = append(append(rowContainer, $(`td.${cellContainerClass}`)), $('div'));
|
||||
let rowButton = new Button(buttonContainer);
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
return new Builder(rowButton.element);
|
||||
return rowButton.element;
|
||||
}
|
||||
|
||||
export function appendInputSelectBox(container: Builder, selectBox: SelectBox): SelectBox {
|
||||
selectBox.render(container.getHTMLElement());
|
||||
export function appendInputSelectBox(container: HTMLElement, selectBox: SelectBox): SelectBox {
|
||||
selectBox.render(container);
|
||||
return selectBox;
|
||||
}
|
||||
|
||||
@@ -80,4 +68,4 @@ export function getCategoryName(categories: azdata.CategoryValue[], categoryDisp
|
||||
}
|
||||
});
|
||||
return categoryName;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user