1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 01:21:21 +03:00

Fixed stuck host add/edit dialog

The dialog would not go away after clicking save. Issue was bad applicaiton of code from 1.4.11. Also fixed missing fa-cut icon.
This commit is contained in:
Chris Houseknecht 2014-06-06 13:43:18 -04:00
parent 3a5db149e9
commit e96444ac8f
2 changed files with 11 additions and 12 deletions

View File

@ -615,19 +615,15 @@ function($rootScope, $location, $log, $routeParams, Rest, Alert, HostForm, Gener
scope.removeSaveCompleted();
}
scope.removeSaveCompleted = scope.$on('saveCompleted', function() {
if (scope.removeSaveCompleted) {
scope.removeSaveCompleted();
try {
$('#host-modal-dialog').dialog('close');
}
scope.removeSaveCompleted = scope.$on('saveCompleted', function() {
try {
$('#host-modal-dialog').dialog('close');
}
catch(err) {
// ignore
}
group_scope.refreshHosts();
scope.$destroy();
});
catch(err) {
// ignore
}
console.log('calling refreshHosts()');
group_scope.refreshHosts();
scope.$destroy();
});
// Save changes to the parent

View File

@ -150,6 +150,9 @@ angular.module('GeneratorHelpers', [])
case 'job_details':
icon = 'fa-list-ul';
break;
case 'copy':
icon = "fa-cut";
break;
}
icon += (size) ? " " + size : "";
return Icon(icon);