From e3124088551009a5000035afc998d3677743358a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 2 Aug 2017 09:22:22 +0200 Subject: [PATCH] updated --- public/app/features/panel/panel_ctrl.ts | 16 ++++-- public/app/features/panel/panel_header.ts | 62 +++++++++++++++++++++-- public/sass/components/_dropdown.scss | 4 +- public/sass/pages/_dashboard.scss | 2 - 4 files changed, 73 insertions(+), 11 deletions(-) diff --git a/public/app/features/panel/panel_ctrl.ts b/public/app/features/panel/panel_ctrl.ts index 5ed2b3abffb..b02520f4c41 100644 --- a/public/app/features/panel/panel_ctrl.ts +++ b/public/app/features/panel/panel_ctrl.ts @@ -140,12 +140,18 @@ export class PanelCtrl { getMenu() { let menu = []; - menu.push({text: 'View', click: 'ctrl.viewPanel(); dismiss();'}); - menu.push({text: 'Edit', click: 'ctrl.editPanel(); dismiss();', role: 'Editor'}); - if (!this.fullscreen) { // duplication is not supported in fullscreen mode - menu.push({ text: 'Duplicate', click: 'ctrl.duplicate()', role: 'Editor' }); + menu.push({text: 'View', click: 'ctrl.viewPanel();', icon: "fa fa-fw fa-eye", shortcut: "v"}); + menu.push({text: 'Edit', click: 'ctrl.editPanel();', role: 'Editor', icon: "fa fa-fw fa-edit", shortcut: "e"}); + menu.push({text: 'Share', click: 'ctrl.sharePanel();', icon: "fa fa-fw fa-share", shortcut: "p s"}); + + let extendedMenu = this.getExtendedMenu(); + menu.push({text: 'Actions', click: 'ctrl.removePanel();', icon: "fa fa-fw fa-cube", submenu: extendedMenu}); + + if (!this.fullscreen) { + menu.push({ text: 'Duplicate', click: 'ctrl.duplicate()', role: 'Editor', icon: "fa fa-fw fa-copy" }); } - menu.push({text: 'Share', click: 'ctrl.sharePanel(); dismiss();'}); + + menu.push({text: 'Remove', click: 'ctrl.removePanel();', icon: "fa fa-fw fa-trash", shortcut: "p r"}); return menu; } diff --git a/public/app/features/panel/panel_header.ts b/public/app/features/panel/panel_header.ts index 359a5cc4125..a19dbcb15ff 100644 --- a/public/app/features/panel/panel_header.ts +++ b/public/app/features/panel/panel_header.ts @@ -16,8 +16,6 @@ var template = ` Edit e -
  • View
  • -
  • Share