Add deletion UI for repos
This commit is contained in:
parent
01240dbf87
commit
c75bd732ce
4 changed files with 61 additions and 4 deletions
|
@ -293,6 +293,23 @@ function RepoAdminCtrl($scope, Restangular, $routeParams, $rootScope) {
|
|||
});
|
||||
};
|
||||
|
||||
$scope.askDelete = function() {
|
||||
$('#confirmdeleteModal').modal({});
|
||||
};
|
||||
|
||||
$scope.deleteRepo = function() {
|
||||
$('#confirmdeleteModal').modal('hide');
|
||||
|
||||
var deleteAction = Restangular.one('repository/' + namespace + '/' + name);
|
||||
deleteAction.customDELETE().then(function() {
|
||||
setTimeout(function() {
|
||||
document.location = '/#/repository';
|
||||
}, 1000);
|
||||
}, function() {
|
||||
$('#cannotchangeModal').modal({});
|
||||
});
|
||||
};
|
||||
|
||||
// Fetch the repository information.
|
||||
var repositoryFetch = Restangular.one('repository/' + namespace + '/' + name);
|
||||
repositoryFetch.get().then(function(repo) {
|
||||
|
|
Reference in a new issue