From 622c1a1dada5d6e931962ca191b2d7dfd5149704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 24 Sep 2014 11:58:02 +0200 Subject: [PATCH] small tweak to new panel edit menu --- src/app/directives/panelMenu.js | 4 +--- src/app/services/panelSrv.js | 33 ++++++++++----------------------- 2 files changed, 11 insertions(+), 26 deletions(-) diff --git a/src/app/directives/panelMenu.js b/src/app/directives/panelMenu.js index d0ee044c571..4ffb5c5cb81 100644 --- a/src/app/directives/panelMenu.js +++ b/src/app/directives/panelMenu.js @@ -40,8 +40,6 @@ function (angular, $, _) { template += item.text + ''; }); - template += 'share'; - template += ''; template += ''; template += ''; @@ -123,7 +121,7 @@ function (angular, $, _) { $(".panel-container").removeClass('panel-highlight'); $panelContainer.toggleClass('panel-highlight'); - dismiss(2000); + dismiss(2500); }; $link.click(showMenu); diff --git a/src/app/services/panelSrv.js b/src/app/services/panelSrv.js index e526b937336..7ee45027b2b 100644 --- a/src/app/services/panelSrv.js +++ b/src/app/services/panelSrv.js @@ -15,47 +15,34 @@ function (angular, _) { var menu = [ { text: "view", + icon: "icon-eye-open", click: 'toggleFullscreen(false)', condition: $scope.panelMeta.fullscreenView }, { text: 'edit', + icon: 'icon-cogs', click: 'editPanel()', condition: true, }, { text: 'duplicate', + icon: 'icon-copy', click: 'duplicatePanel(panel)', condition: true }, - // { - // text: 'span', - // submenu: [ - // { text: '1', click: 'updateColumnSpan(1)' }, - // { text: '2', click: 'updateColumnSpan(2)' }, - // { text: '3', click: 'updateColumnSpan(3)' }, - // { text: '4', click: 'updateColumnSpan(4)' }, - // { text: '5', click: 'updateColumnSpan(5)' }, - // { text: '6', click: 'updateColumnSpan(6)' }, - // { text: '7', click: 'updateColumnSpan(7)' }, - // { text: '8', click: 'updateColumnSpan(8)' }, - // { text: '9', click: 'updateColumnSpan(9)' }, - // { text: '10', click: 'updateColumnSpan(10)' }, - // { text: '11', click: 'updateColumnSpan(11)' }, - // { text: '12', click: 'updateColumnSpan(12)' }, - // ], - // condition: true - // }, { text: 'json', + icon: 'icon-code', click: 'editPanelJson()', condition: true }, - // { - // text: 'remove', - // click: 'remove_panel_from_row(row, panel)', - // condition: true - // } + { + text: 'share', + icon: 'icon-share', + click: 'sharePanel()', + condition: true + }, ]; $scope.inspector = {};