mirror of
https://github.com/ansible/awx.git
synced 2026-03-03 17:51:06 -03:30
AC-1016 Added tool-tip to status icon on host status fly-out. Changed z-index on tooltips to be greater than that of pop-overs. Made sure all tooltips when a pop-over opens.
This commit is contained in:
@@ -100,7 +100,9 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', 'H
|
|||||||
job = jobs[j];
|
job = jobs[j];
|
||||||
html += "<tr>\n";
|
html += "<tr>\n";
|
||||||
html += "<td><a href=\"/#/jobs/" + job.id + "\">" + job.id + "</a></td>\n";
|
html += "<td><a href=\"/#/jobs/" + job.id + "\">" + job.id + "</a></td>\n";
|
||||||
html += "<td class=\"text-center\"><a ng-click=\"showJobSummary(" + job.id + ")\"><i class=\"fa icon-job-" +
|
html += "<td class=\"text-center\"><a ng-click=\"showJobSummary(" + job.id + ")\" " +
|
||||||
|
"aw-tool-tip=\"" + job.status.charAt(0).toUpperCase() + job.status.slice(1) +
|
||||||
|
". Click for details\" data-placement=\"top\"><i class=\"fa icon-job-" +
|
||||||
job.status + "\"></i></a></td>\n";
|
job.status + "\"></i></a></td>\n";
|
||||||
html += "<td><a href=\"/#/jobs/" + job.id + "/job_events/?host=" + encodeURI(host.name) + "\">Events</a> " +
|
html += "<td><a href=\"/#/jobs/" + job.id + "/job_events/?host=" + encodeURI(host.name) + "\">Events</a> " +
|
||||||
"<a href=\"/#/jobs/" + job.id + "/job_host_summaries/?host_name=" + encodeURI(host.name) + "\">Hosts</a></td>\n";
|
"<a href=\"/#/jobs/" + job.id + "/job_host_summaries/?host_name=" + encodeURI(host.name) + "\">Hosts</a></td>\n";
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ textarea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tooltip {
|
.tooltip {
|
||||||
z-index: 1050;
|
z-index: 2050;
|
||||||
opacity: 1.0;
|
opacity: 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -252,10 +252,8 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Job
|
|||||||
|
|
||||||
if (attrs.tipWatch) {
|
if (attrs.tipWatch) {
|
||||||
// Add dataTipWatch: 'variable_name'
|
// Add dataTipWatch: 'variable_name'
|
||||||
console.log('adding watch');
|
|
||||||
scope.$watch(attrs.tipWatch, function(newVal, oldVal) {
|
scope.$watch(attrs.tipWatch, function(newVal, oldVal) {
|
||||||
if (newVal !== oldVal) {
|
if (newVal !== oldVal) {
|
||||||
console.log('switch');
|
|
||||||
// Where did fixTitle come frome?:
|
// Where did fixTitle come frome?:
|
||||||
// http://stackoverflow.com/questions/9501921/change-twitter-bootstrap-tooltip-content-on-click
|
// http://stackoverflow.com/questions/9501921/change-twitter-bootstrap-tooltip-content-on-click
|
||||||
$(element).tooltip('hide').attr('data-original-title', newVal).tooltip('fixTitle');
|
$(element).tooltip('hide').attr('data-original-title', newVal).tooltip('fixTitle');
|
||||||
@@ -293,7 +291,12 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Job
|
|||||||
// remove lingering popover <div>. Seems to be a bug in TB3 RC1
|
// remove lingering popover <div>. Seems to be a bug in TB3 RC1
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
});
|
});
|
||||||
$(this).tooltip('hide'); // hide a tooltip, if there is one associated with the element
|
|
||||||
|
$('.tooltip').each( function() {
|
||||||
|
// close any lingering tool tipss
|
||||||
|
$(this).hide();
|
||||||
|
});
|
||||||
|
|
||||||
$(this).popover('toggle');
|
$(this).popover('toggle');
|
||||||
|
|
||||||
$('.popover').each(function() {
|
$('.popover').each(function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user