mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-05 09:35:39 -05:00
Refresh master with initial release/0.24 snapshot (#332)
* Initial port of release/0.24 source code * Fix additional headers * Fix a typo in launch.json
This commit is contained in:
@@ -4,14 +4,14 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
import { SelectBox } from 'sql/base/browser/ui/selectBox/selectBox';
|
||||
import { Button } from 'sql/base/browser/ui/button/button';
|
||||
|
||||
import { Builder } from 'vs/base/browser/builder';
|
||||
import { SelectBox } from 'sql/base/browser/ui/selectBox/selectBox';
|
||||
import { Button } from 'vs/base/browser/ui/button/button';
|
||||
import { Checkbox } from 'sql/base/browser/ui/checkbox/checkbox';
|
||||
import * as data from 'data';
|
||||
import * as types from 'vs/base/common/types';
|
||||
|
||||
import * as data from 'data';
|
||||
|
||||
export function appendRow(container: Builder, label: string, labelClass: string, cellContainerClass: string): Builder {
|
||||
let cellContainer: Builder;
|
||||
container.element('tr', {}, (rowContainer) => {
|
||||
@@ -47,35 +47,11 @@ export function appendRowLink(container: Builder, label: string, labelClass: str
|
||||
return new Builder(rowButton.getElement());
|
||||
}
|
||||
|
||||
export function createCheckBox(container: Builder, label: string, checkboxClass: string, isChecked: boolean, onCheck?: (viaKeyboard: boolean) => void): Checkbox {
|
||||
let checkbox = new Checkbox({
|
||||
actionClassName: checkboxClass,
|
||||
title: label,
|
||||
isChecked: isChecked,
|
||||
onChange: (viaKeyboard) => {
|
||||
if (onCheck) {
|
||||
onCheck(viaKeyboard);
|
||||
}
|
||||
}
|
||||
});
|
||||
container.getHTMLElement().appendChild(checkbox.domNode);
|
||||
container.div({}, (labelContainer) => {
|
||||
labelContainer.innerHtml(label);
|
||||
});
|
||||
|
||||
return checkbox;
|
||||
}
|
||||
|
||||
export function appendInputSelectBox(container: Builder, selectBox: SelectBox): SelectBox {
|
||||
selectBox.render(container.getHTMLElement());
|
||||
return selectBox;
|
||||
}
|
||||
|
||||
export function isNullOrWhiteSpace(value: string): boolean {
|
||||
// returns true if the string is null or contains white space/tab chars only
|
||||
return !value || value.trim().length === 0;
|
||||
}
|
||||
|
||||
export function getBooleanValueFromStringOrBoolean(value: any): boolean {
|
||||
if (types.isBoolean(value)) {
|
||||
return value;
|
||||
|
||||
Reference in New Issue
Block a user