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:
Chris Houseknecht 2014-02-06 18:16:23 -05:00
parent e9d308c927
commit 2ef38adf26
3 changed files with 10 additions and 5 deletions

View File

@ -100,7 +100,9 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', 'H
job = jobs[j];
html += "<tr>\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";
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";

View File

@ -207,7 +207,7 @@ textarea {
}
.tooltip {
z-index: 1050;
z-index: 2050;
opacity: 1.0;
}

View File

@ -252,10 +252,8 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Job
if (attrs.tipWatch) {
// Add dataTipWatch: 'variable_name'
console.log('adding watch');
scope.$watch(attrs.tipWatch, function(newVal, oldVal) {
if (newVal !== oldVal) {
console.log('switch');
// Where did fixTitle come frome?:
// http://stackoverflow.com/questions/9501921/change-twitter-bootstrap-tooltip-content-on-click
$(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
$(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');
$('.popover').each(function() {