mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-12-03 14:51:05 +01:00
Fix bug with modal's event handling
This commit is contained in:
parent
49c315f7cd
commit
e050f53e70
@ -105,10 +105,12 @@ define(['controllers/projects/taskRunner'], function () {
|
||||
scope.repositories = $scope.repos;
|
||||
scope.environment = $scope.environment;
|
||||
|
||||
$modal.open({
|
||||
var modal = $modal.open({
|
||||
templateUrl: '/tpl/projects/templates/add.html',
|
||||
scope: scope
|
||||
}).result.then(function (opts) {
|
||||
});
|
||||
|
||||
modal.result.then(function (opts) {
|
||||
if (opts.remove) {
|
||||
return $scope.remove(template);
|
||||
}
|
||||
@ -119,7 +121,9 @@ define(['controllers/projects/taskRunner'], function () {
|
||||
}).catch(function (response) {
|
||||
swal('error', 'could not add template:' + response.status, 'error');
|
||||
});
|
||||
}).closed.then(function () {
|
||||
});
|
||||
|
||||
modal.closed.then(function () {
|
||||
$scope.reload();
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user