Resend selectBox change to on against master. PR against nativeNotebook was approved already. (#3215)

This commit is contained in:
Yurong He
2018-11-14 13:48:41 -08:00
committed by GitHub
parent d7d4c7236c
commit 5889c600fa
6 changed files with 82 additions and 36 deletions

View File

@@ -19,7 +19,7 @@ import { CommonServiceInterface } from 'sql/services/common/commonServiceInterfa
import { AngularDisposable } from 'sql/base/common/lifecycle';
import { CellTypes, CellType, NotebookChangeType } from 'sql/parts/notebook/models/contracts';
import { ICellModel, INotebookModel, IModelFactory, INotebookModelOptions } from 'sql/parts/notebook/models/modelInterfaces';
import { ICellModel, IModelFactory } from 'sql/parts/notebook/models/modelInterfaces';
import { IConnectionManagementService } from 'sql/parts/connection/common/connectionManagement';
import { INotebookService, INotebookParams, INotebookManager } from 'sql/services/notebook/notebookService';
import { IBootstrapParams } from 'sql/services/bootstrap/bootstrapService';
@@ -193,21 +193,15 @@ export class NotebookComponent extends AngularDisposable implements OnInit {
}
protected initActionBar() {
let kernelInfoText = document.createElement('div');
kernelInfoText.className = 'notebook-info-label';
kernelInfoText.innerText = 'Kernel: ';
let kernelContainer = document.createElement('div');
let kernelDropdown = new KernelsDropdown(kernelContainer, this.contextViewService, this.modelRegistered);
kernelDropdown.render(kernelContainer);
attachSelectBoxStyler(kernelDropdown, this.themeService);
let kernelsDropdown = new KernelsDropdown(this.contextViewService, this.modelRegistered);
let kernelsDropdownTemplateContainer = document.createElement('div');
kernelsDropdownTemplateContainer.className = 'notebook-toolbar-dropdown';
kernelsDropdown.render(kernelsDropdownTemplateContainer);
attachSelectBoxStyler(kernelsDropdown, this.themeService);
let attachToDropdown = new AttachToDropdown(this.contextViewService);
let attachToDropdownTemplateContainer = document.createElement('div');
attachToDropdownTemplateContainer.className = 'notebook-toolbar-dropdown';
attachToDropdown.render(attachToDropdownTemplateContainer);
attachSelectBoxStyler(attachToDropdown, this.themeService);
let attachToContainer = document.createElement('div');
let attachTodropdwon = new AttachToDropdown(attachToContainer, this.contextViewService);
attachTodropdwon.render(attachToContainer);
attachSelectBoxStyler(attachTodropdwon, this.themeService);
let attachToInfoText = document.createElement('div');
attachToInfoText.className = 'notebook-info-label';
@@ -223,10 +217,8 @@ export class NotebookComponent extends AngularDisposable implements OnInit {
this._actionBar = new Taskbar(taskbar, this.contextMenuService);
this._actionBar.context = this;
this._actionBar.setContent([
{ element: kernelInfoText },
{ element: kernelsDropdownTemplateContainer },
{ element: attachToInfoText },
{ element: attachToDropdownTemplateContainer },
{ element: kernelContainer },
{ element: attachToContainer },
{ action: addCodeCellButton},
{ action: addTextCellButton}
]);