From 9e5c6afaac0b317c002a24e4739163c012bb3224 Mon Sep 17 00:00:00 2001 From: baku Date: Fri, 17 Feb 2017 10:38:56 +0100 Subject: [PATCH] Styling all-tabs menu #181 --- index.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 142dce8..e95137f 100644 --- a/index.js +++ b/index.js @@ -907,6 +907,7 @@ ContainerWindow.prototype = { this._configurePlusButtonMenu(), this._configureActiveTab(), this._configureFileMenu(), + this._configureAllTabsMenu(), this._configureContextMenu(), this._configureTabStyle(), ]); @@ -1038,6 +1039,16 @@ ContainerWindow.prototype = { }); }, + _configureAllTabsMenu() { + return this._configureMenu("alltabs_containersTab", null, e => { + const userContextId = parseInt(e.target.getAttribute("data-usercontextid"), 10); + ContainerService.openTab({ + userContextId: userContextId, + source: "alltabs-menu" + }); + }); + }, + _configureContextMenu() { return this._configureMenu("context-openlinkinusercontext-menu", () => { @@ -1056,7 +1067,6 @@ ContainerWindow.prototype = { // Generic menu configuration. _configureMenu(menuId, excludedContainerCb, clickCb) { const menu = this._window.document.getElementById(menuId); - this._disableElement(menu); if (!this._disableElement(menu)) { // Delete stale menu that isn't native elements while (menu.firstChild) { @@ -1150,6 +1160,7 @@ ContainerWindow.prototype = { this._shutdownPlusButtonMenu(); this._shutdownFileMenu(); + this._shutdownAllTabsMenu(); this._shutdownContextMenu(); }, @@ -1171,6 +1182,10 @@ ContainerWindow.prototype = { this._shutdownMenu("menu_newUserContext"); }, + _shutdownAllTabsMenu() { + this._shutdownMenu("alltabs_containersTab"); + }, + _shutdownContextMenu() { this._shutdownMenu("context-openlinkinusercontext-menu"); },