From 6fe850e2c116faeb01bec8e4de9b10d6ef880fff Mon Sep 17 00:00:00 2001 From: Matt Toback Date: Fri, 29 Jan 2016 11:48:57 -0500 Subject: [PATCH] New dropdown menu to surface the snapshot feature, basic styling in place. Want to extend menu to include summary text of each feature --- public/app/features/dashboard/dashnav/dashnav.html | 12 ++++++++++-- public/app/features/dashboard/dashnav/dashnav.ts | 7 +++++-- public/app/features/dashboard/shareModalCtrl.js | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/public/app/features/dashboard/dashnav/dashnav.html b/public/app/features/dashboard/dashnav/dashnav.html index bd084050c77..af84bf5c587 100644 --- a/public/app/features/dashboard/dashnav/dashnav.html +++ b/public/app/features/dashboard/dashnav/dashnav.html @@ -24,8 +24,16 @@ -
  • - +
  • diff --git a/public/app/features/dashboard/dashnav/dashnav.ts b/public/app/features/dashboard/dashnav/dashnav.ts index 1b1424018f9..9df3ea03eb2 100644 --- a/public/app/features/dashboard/dashnav/dashnav.ts +++ b/public/app/features/dashboard/dashnav/dashnav.ts @@ -42,10 +42,13 @@ export class DashNavCtrl { } }; - $scope.shareDashboard = function() { + $scope.shareDashboard = function(tabIndex) { + var modalScope = $scope.$new(); + modalScope.tabIndex = tabIndex; + $scope.appEvent('show-modal', { src: './app/features/dashboard/partials/shareModal.html', - scope: $scope.$new(), + scope: modalScope }); }; diff --git a/public/app/features/dashboard/shareModalCtrl.js b/public/app/features/dashboard/shareModalCtrl.js index b723660abe7..336600975dc 100644 --- a/public/app/features/dashboard/shareModalCtrl.js +++ b/public/app/features/dashboard/shareModalCtrl.js @@ -12,7 +12,7 @@ function (angular, _, require, config) { module.controller('ShareModalCtrl', function($scope, $rootScope, $location, $timeout, timeSrv, $element, templateSrv, linkSrv) { $scope.options = { forCurrent: true, includeTemplateVars: true, theme: 'current' }; - $scope.editor = { index: 0 }; + $scope.editor = { index: $scope.tabIndex || 0}; $scope.init = function() { $scope.modeSharePanel = $scope.panel ? true : false;