mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Cleaned up code for Add cell button in both main toolbar and cell toolbar. Corrected toolip to read: Add cell. (#10829)
This commit is contained in:
@@ -57,7 +57,6 @@ export class CellToolbarComponent {
|
|||||||
this._actionBar.context = context;
|
this._actionBar.context = context;
|
||||||
|
|
||||||
let addCellsButton = new AddCellAction('notebook.AddCodeCell', localize('codeCellsPreview', "Add cell"), 'notebook-button masked-pseudo code');
|
let addCellsButton = new AddCellAction('notebook.AddCodeCell', localize('codeCellsPreview', "Add cell"), 'notebook-button masked-pseudo code');
|
||||||
addCellsButton.cellType = CellTypes.Code;
|
|
||||||
|
|
||||||
let addCodeCellButton = new AddCellAction('notebook.AddCodeCell', localize('codePreview', "Code cell"), 'notebook-button masked-pseudo code');
|
let addCodeCellButton = new AddCellAction('notebook.AddCodeCell', localize('codePreview', "Code cell"), 'notebook-button masked-pseudo code');
|
||||||
addCodeCellButton.cellType = CellTypes.Code;
|
addCodeCellButton.cellType = CellTypes.Code;
|
||||||
|
|||||||
@@ -417,13 +417,14 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
|||||||
let spacerElement = document.createElement('li');
|
let spacerElement = document.createElement('li');
|
||||||
spacerElement.style.marginLeft = 'auto';
|
spacerElement.style.marginLeft = 'auto';
|
||||||
|
|
||||||
|
let addCellsButton = new AddCellAction('notebook.AddCodeCell', localize('codeCellsPreview', "Add cell"), 'notebook-button masked-pseudo code');
|
||||||
|
|
||||||
let addCodeCellButton = new AddCellAction('notebook.AddCodeCell', localize('codePreview', "Code cell"), 'notebook-button masked-pseudo code');
|
let addCodeCellButton = new AddCellAction('notebook.AddCodeCell', localize('codePreview', "Code cell"), 'notebook-button masked-pseudo code');
|
||||||
addCodeCellButton.cellType = CellTypes.Code;
|
addCodeCellButton.cellType = CellTypes.Code;
|
||||||
|
|
||||||
let addTextCellButton = new AddCellAction('notebook.AddTextCell', localize('textPreview', "Text cell"), 'notebook-button masked-pseudo markdown');
|
let addTextCellButton = new AddCellAction('notebook.AddTextCell', localize('textPreview', "Text cell"), 'notebook-button masked-pseudo markdown');
|
||||||
addTextCellButton.cellType = CellTypes.Markdown;
|
addTextCellButton.cellType = CellTypes.Markdown;
|
||||||
|
|
||||||
|
|
||||||
this._runAllCellsAction = this.instantiationService.createInstance(RunAllCellsAction, 'notebook.runAllCells', localize('runAllPreview', "Run all"), 'notebook-button masked-pseudo start-outline');
|
this._runAllCellsAction = this.instantiationService.createInstance(RunAllCellsAction, 'notebook.runAllCells', localize('runAllPreview', "Run all"), 'notebook-button masked-pseudo start-outline');
|
||||||
|
|
||||||
let collapseCellsAction = this.instantiationService.createInstance(CollapseCellsAction, 'notebook.collapseCells', true);
|
let collapseCellsAction = this.instantiationService.createInstance(CollapseCellsAction, 'notebook.collapseCells', true);
|
||||||
@@ -441,7 +442,7 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
|||||||
let buttonDropdownContainer = DOM.$('li.action-item');
|
let buttonDropdownContainer = DOM.$('li.action-item');
|
||||||
buttonDropdownContainer.setAttribute('role', 'presentation');
|
buttonDropdownContainer.setAttribute('role', 'presentation');
|
||||||
let dropdownMenuActionViewItem = new DropdownMenuActionViewItem(
|
let dropdownMenuActionViewItem = new DropdownMenuActionViewItem(
|
||||||
addCodeCellButton,
|
addCellsButton,
|
||||||
[addCodeCellButton, addTextCellButton],
|
[addCodeCellButton, addTextCellButton],
|
||||||
this.contextMenuService,
|
this.contextMenuService,
|
||||||
undefined,
|
undefined,
|
||||||
|
|||||||
Reference in New Issue
Block a user