mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 11:20:39 -03:30
Merge pull request #75 from jlmitch5/popover_bug_fix
fixing popover bug
This commit is contained in:
commit
1de3077bdc
@ -534,15 +534,23 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Job
|
||||
|
||||
$(element).one('click', showPopover);
|
||||
|
||||
$(element).on('shown.bs.popover', function() {
|
||||
function bindPopoverDismiss() {
|
||||
$('body').one('click.popover' + id_to_close, function(e) {
|
||||
if ($(e.target).parents(id_to_close).length === 0) {
|
||||
// case: you clicked to open the popover and then you
|
||||
// clicked outside of it...hide it.
|
||||
$(element).popover('hide');
|
||||
} else {
|
||||
// case: you clicked to open the popover and then you
|
||||
// clicked inside the popover
|
||||
bindPopoverDismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(element).on('shown.bs.popover', function() {
|
||||
bindPopoverDismiss();
|
||||
$(document).on('keydown.popover', dismissOnEsc);
|
||||
|
||||
});
|
||||
|
||||
$(element).on('hidden.bs.popover', function() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user