mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 09:35:37 -05:00
Merge VS Code 1.23.1 (#1520)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { Widget } from 'vs/base/browser/ui/widget';
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import { EventType as GestureEventType } from 'vs/base/browser/touch';
|
||||
import { List } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { Builder } from 'vs/base/browser/builder';
|
||||
|
||||
import { Button } from 'sql/base/browser/ui/button/button';
|
||||
import { attachButtonStyler } from 'sql/common/theme/styler';
|
||||
@@ -58,9 +59,9 @@ export class DropdownList extends Dropdown {
|
||||
attachButtonStyler(button, this._themeService);
|
||||
}
|
||||
|
||||
DOM.append(this.element.getHTMLElement(), DOM.$('div.dropdown-icon'));
|
||||
DOM.append(this.element, DOM.$('div.dropdown-icon'));
|
||||
|
||||
this.toDispose.push(this.element.on([DOM.EventType.CLICK, DOM.EventType.MOUSE_DOWN, GestureEventType.Tap], (e: Event) => {
|
||||
this.toDispose.push(new Builder(this.element).on([DOM.EventType.CLICK, DOM.EventType.MOUSE_DOWN, GestureEventType.Tap], (e: Event) => {
|
||||
DOM.EventHelper.stop(e, true); // prevent default click behaviour to trigger
|
||||
}).on([DOM.EventType.MOUSE_DOWN, GestureEventType.Tap], (e: Event) => {
|
||||
// We want to show the context menu on dropdown so that as a user you can press and hold the
|
||||
@@ -82,11 +83,11 @@ export class DropdownList extends Dropdown {
|
||||
|
||||
this.toDispose.push(this._list.onSelectionChange(() => {
|
||||
// focus on the dropdown label then hide the dropdown list
|
||||
this.element.getHTMLElement().focus();
|
||||
this.element.focus();
|
||||
this.hide();
|
||||
}));
|
||||
|
||||
this.element.getHTMLElement().setAttribute('tabindex', '0');
|
||||
this.element.setAttribute('tabindex', '0');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -94,7 +95,7 @@ export class DropdownList extends Dropdown {
|
||||
*/
|
||||
protected renderContents(container: HTMLElement): IDisposable {
|
||||
let div = DOM.append(container, this._contentContainer);
|
||||
div.style.width = DOM.getTotalWidth(this.element.getHTMLElement()) + 'px';
|
||||
div.style.width = DOM.getTotalWidth(this.element) + 'px';
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -103,22 +104,22 @@ export class DropdownList extends Dropdown {
|
||||
*/
|
||||
public renderLabel(): void {
|
||||
if (this._options.labelRenderer) {
|
||||
this._options.labelRenderer(this.label.getHTMLElement());
|
||||
this._options.labelRenderer(this.label);
|
||||
}
|
||||
}
|
||||
|
||||
protected onEvent(e: Event, activeElement: HTMLElement): void {
|
||||
// If there is an event outside dropdown label and dropdown list, hide the dropdown list
|
||||
if (!DOM.isAncestor(<HTMLElement>e.target, this.element.getHTMLElement()) && !DOM.isAncestor(<HTMLElement>e.target, this._contentContainer)) {
|
||||
if (!DOM.isAncestor(<HTMLElement>e.target, this.element) && !DOM.isAncestor(<HTMLElement>e.target, this._contentContainer)) {
|
||||
// focus on the dropdown label then hide the dropdown list
|
||||
this.element.getHTMLElement().focus();
|
||||
this.element.focus();
|
||||
this.hide();
|
||||
// If there is an keyboard event inside the list and key code is escape, hide the dropdown list
|
||||
} else if (DOM.isAncestor(<HTMLElement>e.target, this._list.getHTMLElement()) && e instanceof KeyboardEvent) {
|
||||
let event = new StandardKeyboardEvent(e);
|
||||
if (event.equals(KeyCode.Escape)) {
|
||||
// focus on the dropdown label then hide the dropdown list
|
||||
this.element.getHTMLElement().focus();
|
||||
this.element.focus();
|
||||
this.hide();
|
||||
e.stopPropagation();
|
||||
}
|
||||
@@ -138,7 +139,7 @@ export class DropdownList extends Dropdown {
|
||||
const border = this.borderColor ? this.borderColor.toString() : null;
|
||||
this.applyStylesOnElement(this._contentContainer, background, foreground, border);
|
||||
if (this.label) {
|
||||
this.applyStylesOnElement(this.element.getHTMLElement(), background, foreground, border);
|
||||
this.applyStylesOnElement(this.element, background, foreground, border);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
.dropdown {
|
||||
.monaco-dropdown {
|
||||
width: 100%;
|
||||
/* TODO: Determine a more permanent fix; vs/dropdown is overwriting this selector in packaged builds */
|
||||
display: flex !important;
|
||||
@@ -11,15 +11,15 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.dropdown > .dropdown-label {
|
||||
.monaco-dropdown > .dropdown-label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dropdown > .dropdown-label:not(:empty) {
|
||||
.monaco-dropdown > .dropdown-label:not(:empty) {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.dropdown > .dropdown-icon {
|
||||
.monaco-dropdown > .dropdown-icon {
|
||||
flex: 0 0 15px;
|
||||
height: 10px;
|
||||
width: 10px;
|
||||
@@ -28,7 +28,7 @@
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.vs-dark .dropdown > .dropdown-icon,
|
||||
.hc-black .dropdown > .dropdown-icon {
|
||||
.vs-dark .monaco-dropdown > .dropdown-icon,
|
||||
.hc-black .monaco-dropdown > .dropdown-icon {
|
||||
content: url("dropdownarrow_inverse.svg");
|
||||
}
|
||||
@@ -19,7 +19,7 @@ import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
import { Color } from 'vs/base/common/color';
|
||||
import * as nls from 'vs/nls';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { Tree } from 'vs/base/parts/tree/browser/treeImpl';
|
||||
@@ -110,14 +110,14 @@ export class Dropdown extends Disposable {
|
||||
super();
|
||||
this._contextView = new ContextView(document.body);
|
||||
this._options = mixin(opt, defaults, false) as IDropdownOptions;
|
||||
this.$el = $('.dropdown').style('width', '100%').appendTo(container);
|
||||
this.$el = $('.monaco-dropdown').style('width', '100%').appendTo(container);
|
||||
|
||||
this.$input = $('.dropdown-input').style('width', '100%').appendTo(this.$el);
|
||||
this.$treeContainer = $('.dropdown-tree');
|
||||
|
||||
this._toggleAction = new ToggleDropdownAction(() => {
|
||||
this._showList();
|
||||
this._tree.DOMFocus();
|
||||
this._tree.domFocus();
|
||||
this._tree.focusFirst();
|
||||
});
|
||||
|
||||
@@ -168,7 +168,7 @@ export class Dropdown extends Disposable {
|
||||
if (!this.$treeContainer.getHTMLElement().parentElement) {
|
||||
this._showList();
|
||||
}
|
||||
this._tree.DOMFocus();
|
||||
this._tree.domFocus();
|
||||
this._tree.focusFirst();
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
@@ -195,17 +195,7 @@ export class Dropdown extends Disposable {
|
||||
this._input.onDidChange(e => {
|
||||
if (this._dataSource.options) {
|
||||
this._filter.filterString = e;
|
||||
let filteredLength = this._dataSource.options.reduce((p, i) => {
|
||||
if (this._filter.isVisible(undefined, i)) {
|
||||
return p + 1;
|
||||
} else {
|
||||
return p;
|
||||
}
|
||||
}, 0);
|
||||
let height = filteredLength * this._renderer.getHeight(undefined, undefined) > this._options.maxHeight ? this._options.maxHeight : filteredLength * this._renderer.getHeight(undefined, undefined);
|
||||
this.$treeContainer.style('height', height + 'px').style('width', DOM.getContentWidth(this.$input.getHTMLElement()) - 2 + 'px');
|
||||
this._tree.layout(parseInt(this.$treeContainer.style('height')));
|
||||
this._tree.refresh();
|
||||
this._layoutTree();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -221,11 +211,12 @@ export class Dropdown extends Disposable {
|
||||
private _showList(): void {
|
||||
if (this._input.isEnabled) {
|
||||
this._onFocus.fire();
|
||||
this._filter.filterString = '';
|
||||
this._contextView.show({
|
||||
getAnchor: () => this.$input.getHTMLElement(),
|
||||
render: container => {
|
||||
this.$treeContainer.appendTo(container);
|
||||
this._tree.layout(parseInt(this.$treeContainer.style('height')));
|
||||
this._layoutTree();
|
||||
return { dispose: () => { } };
|
||||
},
|
||||
onDOMEvent: (e, activeElement) => {
|
||||
@@ -239,6 +230,20 @@ export class Dropdown extends Disposable {
|
||||
}
|
||||
}
|
||||
|
||||
private _layoutTree(): void {
|
||||
let filteredLength = this._dataSource.options.reduce((p, i) => {
|
||||
if (this._filter.isVisible(undefined, i)) {
|
||||
return p + 1;
|
||||
} else {
|
||||
return p;
|
||||
}
|
||||
}, 0);
|
||||
let height = filteredLength * this._renderer.getHeight(undefined, undefined) > this._options.maxHeight ? this._options.maxHeight : filteredLength * this._renderer.getHeight(undefined, undefined);
|
||||
this.$treeContainer.style('height', height + 'px').style('width', DOM.getContentWidth(this.$input.getHTMLElement()) - 2 + 'px');
|
||||
this._tree.layout(parseInt(this.$treeContainer.style('height')));
|
||||
this._tree.refresh();
|
||||
}
|
||||
|
||||
public set values(vals: string[]) {
|
||||
if (vals) {
|
||||
this._filter.filterString = '';
|
||||
|
||||
@@ -9,7 +9,7 @@ import { Promise, TPromise } from 'vs/base/common/winjs.base';
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { $ } from 'vs/base/browser/builder';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
|
||||
export interface Template {
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
background-image: url("dropdownarrow_inverse.svg");
|
||||
}
|
||||
|
||||
.dropdown .monaco-action-bar .action-label.icon.dropdown-arrow {
|
||||
.monaco-dropdown .monaco-action-bar .action-label.icon.dropdown-arrow {
|
||||
padding: 0;
|
||||
background-size: 10px;
|
||||
background-position: 50%;
|
||||
}
|
||||
|
||||
.dropdown .monaco-action-bar .action-item {
|
||||
.monaco-dropdown .monaco-action-bar .action-item {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.connection-input .dropdown .monaco-action-bar .action-label.icon.dropdown-arrow {
|
||||
.connection-input .monaco-dropdown .monaco-action-bar .action-label.icon.dropdown-arrow {
|
||||
background-position: 50%;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import { InputBox as vsInputBox, IInputOptions, IInputBoxStyles as vsIInputBoxStyles } from 'vs/base/browser/ui/inputbox/inputBox';
|
||||
import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview';
|
||||
import { Color } from 'vs/base/common/color';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
|
||||
export interface OnLoseFocusParams {
|
||||
value: string;
|
||||
|
||||
@@ -144,13 +144,11 @@ export class ListBox extends SelectBox {
|
||||
|
||||
for (let i = 0; i < indexes.length; i++) {
|
||||
this.selectElement.remove(indexes[i]);
|
||||
this.options.splice(indexes[i], 1);
|
||||
}
|
||||
}
|
||||
|
||||
public add(option: string): void {
|
||||
this.selectElement.add(this.createOption(option));
|
||||
this.options.push(option);
|
||||
}
|
||||
|
||||
// Allow copy to clipboard
|
||||
|
||||
@@ -119,7 +119,8 @@
|
||||
color: #3C3C3C;
|
||||
}
|
||||
|
||||
.modal .select-box {
|
||||
.modal .select-box,
|
||||
.modal .monaco-select-box {
|
||||
width: 100%;
|
||||
height: 25px;
|
||||
color: #6C6C6C;
|
||||
|
||||
@@ -11,7 +11,7 @@ import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
|
||||
import { mixin } from 'vs/base/common/objects';
|
||||
import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { Builder, $, withElementById } from 'vs/base/browser/builder';
|
||||
import { Builder, $ } from 'vs/base/browser/builder';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
@@ -285,7 +285,7 @@ export abstract class Modal extends Disposable implements IThemable {
|
||||
*/
|
||||
protected show() {
|
||||
this._modalShowingContext.get().push(this._staticKey);
|
||||
this._builder.appendTo(withElementById(this._partService.getWorkbenchElementId()).getHTMLElement().parentElement);
|
||||
this._builder.appendTo(document.getElementById(this._partService.getWorkbenchElementId()).parentElement);
|
||||
|
||||
this.setFocusableElements();
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import { attachButtonStyler, attachModalDialogStyler } from 'sql/common/theme/st
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import { IPartService } from 'vs/workbench/services/part/common/partService';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
|
||||
@@ -25,7 +25,7 @@ export interface IOptionElement {
|
||||
export function createOptionElement(option: sqlops.ServiceOption, rowContainer: Builder, options: { [name: string]: any },
|
||||
optionsMap: { [optionName: string]: IOptionElement }, contextViewService: IContextViewService, onFocus: (name) => void): void {
|
||||
let possibleInputs: string[] = [];
|
||||
let optionValue = this.getOptionValueAndCategoryValues(option, options, possibleInputs);
|
||||
let optionValue = getOptionValueAndCategoryValues(option, options, possibleInputs);
|
||||
let optionWidget: any;
|
||||
let inputElement: HTMLElement;
|
||||
let missingErrorMessage = localize('optionsDialog.missingRequireField', ' is required.');
|
||||
@@ -47,11 +47,11 @@ export function createOptionElement(option: sqlops.ServiceOption, rowContainer:
|
||||
ariaLabel: option.displayName
|
||||
});
|
||||
optionWidget.value = optionValue;
|
||||
inputElement = this.findElement(rowContainer, 'input');
|
||||
inputElement = findElement(rowContainer, 'input');
|
||||
} else if (option.valueType === ServiceOptionType.category || option.valueType === ServiceOptionType.boolean) {
|
||||
optionWidget = new SelectBox(possibleInputs, optionValue.toString(), contextViewService);
|
||||
DialogHelper.appendInputSelectBox(rowContainer, optionWidget);
|
||||
inputElement = this.findElement(rowContainer, 'select-box');
|
||||
inputElement = findElement(rowContainer, 'monaco-select-box');
|
||||
} else if (option.valueType === ServiceOptionType.string || option.valueType === ServiceOptionType.password) {
|
||||
optionWidget = new InputBox(rowContainer.getHTMLElement(), contextViewService, {
|
||||
validationOptions: {
|
||||
@@ -63,7 +63,7 @@ export function createOptionElement(option: sqlops.ServiceOption, rowContainer:
|
||||
if (option.valueType === ServiceOptionType.password) {
|
||||
optionWidget.inputElement.type = 'password';
|
||||
}
|
||||
inputElement = this.findElement(rowContainer, 'input');
|
||||
inputElement = findElement(rowContainer, 'input');
|
||||
}
|
||||
optionsMap[option.name] = { optionWidget: optionWidget, option: option, optionValue: optionValue };
|
||||
inputElement.onfocus = () => onFocus(option.name);
|
||||
@@ -74,10 +74,10 @@ export function getOptionValueAndCategoryValues(option: sqlops.ServiceOption, op
|
||||
if (options[option.name]) {
|
||||
// if the value type is boolean, the option value can be either boolean or string
|
||||
if (option.valueType === ServiceOptionType.boolean) {
|
||||
if (options[option.name] === true || options[option.name] === this.trueInputValue) {
|
||||
optionValue = this.trueInputValue;
|
||||
if (options[option.name] === true || options[option.name] === trueInputValue) {
|
||||
optionValue = trueInputValue;
|
||||
} else {
|
||||
optionValue = this.falseInputValue;
|
||||
optionValue = falseInputValue;
|
||||
}
|
||||
} else {
|
||||
optionValue = options[option.name];
|
||||
@@ -91,7 +91,7 @@ export function getOptionValueAndCategoryValues(option: sqlops.ServiceOption, op
|
||||
}
|
||||
|
||||
if (option.valueType === ServiceOptionType.boolean) {
|
||||
possibleInputs.push(this.trueInputValue, this.falseInputValue);
|
||||
possibleInputs.push(trueInputValue, falseInputValue);
|
||||
} else {
|
||||
option.categoryValues.map(c => possibleInputs.push(c.name));
|
||||
}
|
||||
@@ -136,7 +136,7 @@ export function updateOptions(options: { [optionName: string]: any }, optionsMap
|
||||
}
|
||||
if (optionElement.optionWidget.value) {
|
||||
if (optionElement.option.valueType === ServiceOptionType.boolean) {
|
||||
options[optionName] = (optionElement.optionWidget.value === this.trueInputValue) ? true : false;
|
||||
options[optionName] = (optionElement.optionWidget.value === trueInputValue) ? true : false;
|
||||
} else {
|
||||
options[optionName] = optionElement.optionWidget.value;
|
||||
}
|
||||
|
||||
@@ -13,15 +13,15 @@ import { attachButtonStyler, attachModalDialogStyler } from 'sql/common/theme/st
|
||||
import { Builder } from 'vs/base/browser/builder';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { IPartService, Parts } from 'vs/workbench/services/part/common/partService';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||
import { localize } from 'vs/nls';
|
||||
import { Webview } from 'vs/workbench/parts/html/browser/webview';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { IDisposable, toDisposable } from 'vs/base/common/lifecycle';
|
||||
import { WebviewElement } from 'vs/workbench/parts/webview/electron-browser/webviewElement';
|
||||
|
||||
export class WebViewDialog extends Modal {
|
||||
|
||||
@@ -29,7 +29,7 @@ export class WebViewDialog extends Modal {
|
||||
private _okButton: Button;
|
||||
private _okLabel: string;
|
||||
private _closeLabel: string;
|
||||
private _webview: Webview;
|
||||
private _webview: WebviewElement;
|
||||
private _html: string;
|
||||
private _headerTitle: string;
|
||||
|
||||
@@ -89,8 +89,7 @@ export class WebViewDialog extends Modal {
|
||||
protected renderBody(container: HTMLElement) {
|
||||
new Builder(container).div({ 'class': 'webview-dialog' }, (bodyBuilder) => {
|
||||
this._body = bodyBuilder.getHTMLElement();
|
||||
this._webview = new Webview(
|
||||
this._body,
|
||||
this._webview = new WebviewElement(
|
||||
this._webViewPartService.getContainer(Parts.EDITOR_PART),
|
||||
this._themeService,
|
||||
this._environmentService,
|
||||
@@ -102,6 +101,7 @@ export class WebViewDialog extends Modal {
|
||||
enableWrappedPostMessage: true
|
||||
}
|
||||
);
|
||||
this._webview.mountTo(this._body);
|
||||
|
||||
this._webview.style(this._themeService.getTheme());
|
||||
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
|
||||
import { IThemable } from 'vs/platform/theme/common/styler';
|
||||
import * as objects from 'sql/base/common/objects';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Dimension, $, Builder } from 'vs/base/browser/builder';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { Dimension } from 'vs/base/browser/dom';
|
||||
import { $, Builder } from 'vs/base/browser/builder';
|
||||
import { EventType } from 'vs/base/browser/dom';
|
||||
import { IAction } from 'vs/base/common/actions';
|
||||
import { IActionOptions, ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
@@ -62,7 +63,7 @@ export class TabbedPanel extends Disposable implements IThemable {
|
||||
this.$tabList.style('height', this.headersize + 'px');
|
||||
this.$header.append(this.$tabList);
|
||||
let actionbarcontainer = $('.title-actions');
|
||||
this._actionbar = new ActionBar(actionbarcontainer);
|
||||
this._actionbar = new ActionBar(actionbarcontainer.getHTMLElement());
|
||||
this.$header.append(actionbarcontainer);
|
||||
this.$parent.append(this.$header);
|
||||
this.$body = $('tabBody');
|
||||
|
||||
@@ -8,7 +8,7 @@ import * as DOM from 'vs/base/browser/dom';
|
||||
import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview';
|
||||
import { Color } from 'vs/base/common/color';
|
||||
import { InputBox } from 'vs/base/browser/ui/inputbox/inputBox';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { Widget } from 'vs/base/browser/ui/widget';
|
||||
|
||||
export interface IRadioButtonOptions {
|
||||
|
||||
@@ -14,7 +14,7 @@ import numbers = require('vs/base/common/numbers');
|
||||
import sash = require('vs/base/browser/ui/sash/sash');
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { Color } from 'vs/base/common/color';
|
||||
|
||||
export enum Orientation {
|
||||
|
||||
@@ -12,7 +12,6 @@ import * as DOM from 'vs/base/browser/dom';
|
||||
import { Color } from 'vs/base/common/color';
|
||||
import { mixin } from 'vs/base/common/objects';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { Dimension } from 'vs/base/browser/builder';
|
||||
import { Orientation } from 'vs/base/browser/ui/splitview/splitview';
|
||||
import { Widget } from 'vs/base/browser/ui/widget';
|
||||
|
||||
@@ -136,7 +135,7 @@ export class Table<T extends Slick.SlickData> extends Widget implements IThemabl
|
||||
onSelectedRowsChanged(fn: any): IDisposable {
|
||||
this._grid.onSelectedRowsChanged.subscribe(fn);
|
||||
return {
|
||||
dispose() {
|
||||
dispose: () => {
|
||||
if (this._grid && this._grid.onSelectedRowsChanged) {
|
||||
this._grid.onSelectedRowsChanged.unsubscribe(fn);
|
||||
}
|
||||
@@ -149,7 +148,7 @@ export class Table<T extends Slick.SlickData> extends Widget implements IThemabl
|
||||
onContextMenu(fn: any): IDisposable {
|
||||
this._grid.onContextMenu.subscribe(fn);
|
||||
return {
|
||||
dispose() {
|
||||
dispose: () => {
|
||||
this._grid.onContextMenu.unsubscribe(fn);
|
||||
}
|
||||
};
|
||||
@@ -186,10 +185,10 @@ export class Table<T extends Slick.SlickData> extends Widget implements IThemabl
|
||||
this._grid.resizeCanvas();
|
||||
}
|
||||
|
||||
layout(dimension: Dimension): void;
|
||||
layout(dimension: DOM.Dimension): void;
|
||||
layout(size: number, orientation: Orientation): void;
|
||||
layout(sizing: number | Dimension, orientation?: Orientation): void {
|
||||
if (sizing instanceof Dimension) {
|
||||
layout(sizing: number | DOM.Dimension, orientation?: Orientation): void {
|
||||
if (sizing instanceof DOM.Dimension) {
|
||||
this._container.style.width = sizing.width + 'px';
|
||||
this._container.style.height = sizing.height + 'px';
|
||||
this._tableContainer.style.width = sizing.width + 'px';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Observer } from 'rxjs/Observer';
|
||||
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import * as types from 'vs/base/common/types';
|
||||
|
||||
|
||||
@@ -280,7 +280,7 @@ export abstract class CollapsibleView extends AbstractCollapsibleView implements
|
||||
}
|
||||
|
||||
// Pass Focus to Viewer
|
||||
this.tree.DOMFocus();
|
||||
this.tree.domFocus();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import Event from 'vs/base/common/event';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { Command } from 'vs/editor/common/modes';
|
||||
|
||||
export type TreeViewItemHandleArg = {
|
||||
|
||||
Reference in New Issue
Block a user