diff --git a/src/app/features/dashboard/dashboardNavCtrl.js b/src/app/features/dashboard/dashboardNavCtrl.js index 90ace81c502..64c24ec5404 100644 --- a/src/app/features/dashboard/dashboardNavCtrl.js +++ b/src/app/features/dashboard/dashboardNavCtrl.js @@ -39,17 +39,11 @@ function (angular, _, moment, config, store) { $location.search(search); }; - $scope.saveForSharing = function() { - var clone = angular.copy($scope.dashboard); - clone.temp = true; - $scope.db.saveDashboard(clone) - .then(function(result) { - - $scope.share = { url: result.url, title: result.title }; - - }, function(err) { - alertSrv.set('Save for sharing failed', err, 'error',5000); - }); + $scope.shareDashboard = function() { + $scope.appEvent('show-modal', { + src: './app/features/dashboard/partials/shareModal.html', + scope: $scope.$new(), + }); }; $scope.passwordCache = function(pwd) { diff --git a/src/app/features/dashboard/panelSrv.js b/src/app/features/dashboard/panelSrv.js index 3cc945624b3..2f475c249c0 100644 --- a/src/app/features/dashboard/panelSrv.js +++ b/src/app/features/dashboard/panelSrv.js @@ -24,7 +24,7 @@ function (angular, _) { $scope.sharePanel = function() { $scope.appEvent('show-modal', { - src: './app/partials/share-panel.html', + src: './app/features/dashboard/partials/shareModal.html', scope: $scope.$new() }); }; diff --git a/src/app/partials/share-panel.html b/src/app/features/dashboard/partials/shareModal.html similarity index 59% rename from src/app/partials/share-panel.html rename to src/app/features/dashboard/partials/shareModal.html index 413845f5d29..478ae3a1151 100644 --- a/src/app/partials/share-panel.html +++ b/src/app/features/dashboard/partials/shareModal.html @@ -1,21 +1,21 @@ -
-