mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
Adding id's to the various parts of the tooltip to help the qa team with selinium testing
This commit is contained in:
@@ -488,7 +488,13 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Job
|
|||||||
var placement = (attrs.placement !== undefined && attrs.placement !== null) ? attrs.placement : 'left',
|
var placement = (attrs.placement !== undefined && attrs.placement !== null) ? attrs.placement : 'left',
|
||||||
title = (attrs.title) ? attrs.title : (attrs.popoverTitle) ? attrs.popoverTitle : 'Help',
|
title = (attrs.title) ? attrs.title : (attrs.popoverTitle) ? attrs.popoverTitle : 'Help',
|
||||||
container = (attrs.container !== undefined) ? attrs.container : false,
|
container = (attrs.container !== undefined) ? attrs.container : false,
|
||||||
trigger = (attrs.trigger !== undefined) ? attrs.trigger : 'manual';
|
trigger = (attrs.trigger !== undefined) ? attrs.trigger : 'manual',
|
||||||
|
template = '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>';
|
||||||
|
|
||||||
|
if (element[0].id) {
|
||||||
|
template = '<div id="' + element[0].id + '_popover_container" class="popover" role="tooltip"><div class="arrow"></div><h3 id="' + element[0].id + '_popover_title" class="popover-title"></h3><div id="' + element[0].id + '_popover_content" class="popover-content"></div></div>';
|
||||||
|
}
|
||||||
|
|
||||||
if (attrs.awPopOverWatch) {
|
if (attrs.awPopOverWatch) {
|
||||||
$(element).popover({
|
$(element).popover({
|
||||||
placement: placement,
|
placement: placement,
|
||||||
@@ -499,7 +505,8 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Job
|
|||||||
},
|
},
|
||||||
trigger: trigger,
|
trigger: trigger,
|
||||||
html: true,
|
html: true,
|
||||||
container: container
|
container: container,
|
||||||
|
template: template
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$(element).popover({
|
$(element).popover({
|
||||||
@@ -509,7 +516,8 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Job
|
|||||||
content: attrs.awPopOver,
|
content: attrs.awPopOver,
|
||||||
trigger: trigger,
|
trigger: trigger,
|
||||||
html: true,
|
html: true,
|
||||||
container: container
|
container: container,
|
||||||
|
template: template
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$(element).attr('tabindex',-1);
|
$(element).attr('tabindex',-1);
|
||||||
|
|||||||
Reference in New Issue
Block a user