Selaa lähdekoodia

small tweak to new panel edit menu

Torkel Ödegaard 11 vuotta sitten
vanhempi
commit
622c1a1dad
2 muutettua tiedostoa jossa 11 lisäystä ja 26 poistoa
  1. 1 3
      src/app/directives/panelMenu.js
  2. 10 23
      src/app/services/panelSrv.js

+ 1 - 3
src/app/directives/panelMenu.js

@@ -40,8 +40,6 @@ function (angular, $, _) {
           template += item.text + '</a>';
           template += item.text + '</a>';
         });
         });
 
 
-        template += '<a class="panel-menu-link">share</a>';
-
         template += '</div>';
         template += '</div>';
         template += '</div>';
         template += '</div>';
         template += '</div>';
         template += '</div>';
@@ -123,7 +121,7 @@ function (angular, $, _) {
             $(".panel-container").removeClass('panel-highlight');
             $(".panel-container").removeClass('panel-highlight');
             $panelContainer.toggleClass('panel-highlight');
             $panelContainer.toggleClass('panel-highlight');
 
 
-            dismiss(2000);
+            dismiss(2500);
           };
           };
 
 
           $link.click(showMenu);
           $link.click(showMenu);

+ 10 - 23
src/app/services/panelSrv.js

@@ -15,47 +15,34 @@ function (angular, _) {
       var menu = [
       var menu = [
         {
         {
           text: "view",
           text: "view",
+          icon: "icon-eye-open",
           click: 'toggleFullscreen(false)',
           click: 'toggleFullscreen(false)',
           condition: $scope.panelMeta.fullscreenView
           condition: $scope.panelMeta.fullscreenView
         },
         },
         {
         {
           text: 'edit',
           text: 'edit',
+          icon: 'icon-cogs',
           click: 'editPanel()',
           click: 'editPanel()',
           condition: true,
           condition: true,
         },
         },
         {
         {
           text: 'duplicate',
           text: 'duplicate',
+          icon: 'icon-copy',
           click: 'duplicatePanel(panel)',
           click: 'duplicatePanel(panel)',
           condition: true
           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',
           text: 'json',
+          icon: 'icon-code',
           click: 'editPanelJson()',
           click: 'editPanelJson()',
           condition: true
           condition: true
         },
         },
-        // {
-        //   text: 'remove',
-        //   click: 'remove_panel_from_row(row, panel)',
-        //   condition: true
-        // }
+        {
+          text: 'share',
+          icon: 'icon-share',
+          click: 'sharePanel()',
+          condition: true
+        },
       ];
       ];
 
 
       $scope.inspector = {};
       $scope.inspector = {};