mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 11:00:03 -03:30
Merge pull request #5921 from mabashian/5895-job-results-modal
Navigate back to the jobDetails state when the user clicks outside the host event modal.
This commit is contained in:
commit
64d2d6970b
@ -9,7 +9,7 @@
|
||||
</a>
|
||||
<span class="HostEvent-title">{{event.host_name}}</span>
|
||||
<!-- close -->
|
||||
<button ui-sref="jobDetail" type="button" class="close">
|
||||
<button ng-click="closeHostEvent()" type="button" class="close">
|
||||
<i class="fa fa-times-circle"></i>
|
||||
</button>
|
||||
</div>
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
<!-- controls -->
|
||||
<div class="HostEvent-controls">
|
||||
<button ui-sref="jobDetail" class="btn btn-sm btn-default HostEvent-close">Close</button>
|
||||
<button ng-click="closeHostEvent()" class="btn btn-sm btn-default HostEvent-close">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -45,6 +45,12 @@
|
||||
return $scope.hostResults.indexOf(result[0]);
|
||||
};
|
||||
|
||||
$scope.closeHostEvent = function() {
|
||||
// Unbind the listener so it doesn't fire when we close the modal via navigation
|
||||
$('#HostEvent').off('hidden.bs.modal');
|
||||
$state.go('jobDetail');
|
||||
};
|
||||
|
||||
var init = function(){
|
||||
hostEvent.event_name = hostEvent.event;
|
||||
$scope.event = _.cloneDeep(hostEvent);
|
||||
@ -98,6 +104,10 @@
|
||||
}
|
||||
}
|
||||
$('#HostEvent').modal('show');
|
||||
|
||||
$('#HostEvent').on('hidden.bs.modal', function () {
|
||||
$scope.closeHostEvent();
|
||||
});
|
||||
};
|
||||
init();
|
||||
}];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user