Permalink
Browse files

CI-status has a tooltip with links to the logfiles

  • Loading branch information...
1 parent c2e5afb commit ec4e9b805ae6e575d81fd51d185039230891f8a9 @yoricksijsling yoricksijsling committed Sep 13, 2011
Showing with 38 additions and 0 deletions.
  1. +5 −0 css/screen.css
  2. +1 −0 index.php
  3. +15 −0 js/jquery.qtip.min.js
  4. +17 −0 js/kanban.js
View
@@ -139,4 +139,9 @@ a:hover {
img.gravatar {
float: right;
+}
+
+.qtip-content ul {
+ margin: 0;
+ padding: 0;
}
View
@@ -3,6 +3,7 @@
<head>
<title>Kanban</title>
<script src="js/jquery.min.js"></script>
+ <script src="js/jquery.qtip.min.js" type="text/javascript"></script>
<script src="js/kanban.js"></script>
<link rel="stylesheet" type="text/css" href="css/screen.css" />
<script type="text/javascript" charset="utf-8">
View
View
@@ -112,6 +112,23 @@ function addTicket(ticket) {
.attr('style', 'border-top: 2px solid ' + ticketPriority.colour + ';')
.append($('<h3 />').attr('title', ticket.summary).text(ticketSummary))
.append(bodyDiv);
+
+ var tipItems = "";
+ $.each(ticketBranches, function(projectName, branch) {
+ $.each(branch.urls.logs, function(i, url) {
+ var urlparts = url.match(/([a-f0-9]{7})[a-f0-9]{30}([a-f0-9]{3}.*$)/);
+ tipItems += '<li><a href="'+settings.ciUrl+url+'">'+urlparts[1]+'...'+urlparts[2]+'</a></li>';
+ });
+ });
+ if (tipItems) {
+ $('.ci-status', bodyDiv).qtip({
+ content: { text: '<ul>'+tipItems+'</ul>' },
+ show: { delay: 0 },
+ hide: { fixed: true },
+ position: { corner: { target: 'bottomLeft', tooltip: 'topLeft' } },
+ style: { }
+ });
+ }
$('#status-' + ticket['status-id']).append(div);
}

0 comments on commit ec4e9b8

Please sign in to comment.