mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 17:23:10 -05:00
Merge VS Code 1.23.1 (#1520)
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user