mirror of
https://github.com/ansible/awx.git
synced 2026-02-17 11:10:03 -03:30
Merge pull request #75 from jlmitch5/popover_bug_fix
fixing popover bug
This commit is contained in:
@@ -534,15 +534,23 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Job
|
|||||||
|
|
||||||
$(element).one('click', showPopover);
|
$(element).one('click', showPopover);
|
||||||
|
|
||||||
$(element).on('shown.bs.popover', function() {
|
function bindPopoverDismiss() {
|
||||||
$('body').one('click.popover' + id_to_close, function(e) {
|
$('body').one('click.popover' + id_to_close, function(e) {
|
||||||
if ($(e.target).parents(id_to_close).length === 0) {
|
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');
|
$(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);
|
$(document).on('keydown.popover', dismissOnEsc);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(element).on('hidden.bs.popover', function() {
|
$(element).on('hidden.bs.popover', function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user