From 0bfa172543d98d1b879dca6cd755294415ac6b55 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 20 Jan 2014 17:03:16 -0500 Subject: [PATCH] Better UX feedback when deleting repos --- static/js/controllers.js | 4 ++++ static/partials/repo-admin.html | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/static/js/controllers.js b/static/js/controllers.js index c0564a122..c0424d444 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -622,6 +622,7 @@ function RepoAdminCtrl($scope, Restangular, ApiService, $routeParams, $rootScope $scope.permissions = {'team': [], 'user': []}; $scope.logsShown = 0; + $scope.deleting = false; $scope.loadLogs = function() { $scope.logsShown++; @@ -777,6 +778,7 @@ function RepoAdminCtrl($scope, Restangular, ApiService, $routeParams, $rootScope 'repository': namespace + '/' + name }; + $scope.deleting = true; ApiService.deleteRepository(null, params).then(function() { $scope.repo = null; @@ -784,6 +786,7 @@ function RepoAdminCtrl($scope, Restangular, ApiService, $routeParams, $rootScope document.location = '/repository/'; }, 1000); }, function() { + $scope.deleting = true; $('#cannotchangeModal').modal({}); }); }; @@ -1479,6 +1482,7 @@ function OrgAdminCtrl($rootScope, $scope, Restangular, $routeParams, UserService $scope.changeEmailForm.$setPristine(); $scope.organization = org; }, function(resp) { + $scope.changingOrganization = false; $scope.changeEmailError = result.data.message; $timeout(function() { $('#changeEmailForm').popover('show'); diff --git a/static/partials/repo-admin.html b/static/partials/repo-admin.html index c6e33b6b6..d84ec726d 100644 --- a/static/partials/repo-admin.html +++ b/static/partials/repo-admin.html @@ -1,5 +1,6 @@ +
-
+