From 0f791c9fa8d16f37ae60e209533341e25f9f0811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sun, 29 Mar 2015 14:30:03 +0200 Subject: [PATCH] Refactoring of share modal --- public/app/features/dashboard/all.js | 2 +- .../features/dashboard/dashboardNavCtrl.js | 2 +- .../{shareDashboard.html => shareModal.html} | 91 +++++++++++-------- .../dashboard/partials/sharePanel.html | 65 ------------- .../dashboard/partials/snapshotTopNav.html | 6 ++ .../{sharePanelCtrl.js => shareModalCtrl.js} | 14 ++- .../features/dashboard/shareSnapshotCtrl.js | 1 + .../features/dashboard/snapshotTopNavCtrl.js | 7 ++ public/app/features/panel/panelSrv.js | 2 +- ...lCtrl-specs.js => shareModalCtrl-specs.js} | 4 +- public/test/test-main.js | 2 +- 11 files changed, 88 insertions(+), 108 deletions(-) rename public/app/features/dashboard/partials/{shareDashboard.html => shareModal.html} (58%) delete mode 100644 public/app/features/dashboard/partials/sharePanel.html rename public/app/features/dashboard/{sharePanelCtrl.js => shareModalCtrl.js} (84%) rename public/test/specs/{sharePanelCtrl-specs.js => shareModalCtrl-specs.js} (95%) diff --git a/public/app/features/dashboard/all.js b/public/app/features/dashboard/all.js index 1380034dd19..a279e9f3078 100644 --- a/public/app/features/dashboard/all.js +++ b/public/app/features/dashboard/all.js @@ -5,7 +5,7 @@ define([ './saveDashboardAsCtrl', './playlistCtrl', './rowCtrl', - './sharePanelCtrl', + './shareModalCtrl', './shareSnapshotCtrl', './submenuCtrl', './dashboardSrv', diff --git a/public/app/features/dashboard/dashboardNavCtrl.js b/public/app/features/dashboard/dashboardNavCtrl.js index 6c017ae856e..5334852d967 100644 --- a/public/app/features/dashboard/dashboardNavCtrl.js +++ b/public/app/features/dashboard/dashboardNavCtrl.js @@ -37,7 +37,7 @@ function (angular, _) { $scope.shareDashboard = function() { $scope.appEvent('show-modal', { - src: './app/features/dashboard/partials/shareDashboard.html', + src: './app/features/dashboard/partials/shareModal.html', scope: $scope.$new(), }); }; diff --git a/public/app/features/dashboard/partials/shareDashboard.html b/public/app/features/dashboard/partials/shareModal.html similarity index 58% rename from public/app/features/dashboard/partials/shareDashboard.html rename to public/app/features/dashboard/partials/shareModal.html index 295ac71e0f5..b6b722465f9 100644 --- a/public/app/features/dashboard/partials/shareDashboard.html +++ b/public/app/features/dashboard/partials/shareModal.html @@ -1,12 +1,12 @@ -