Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improved fix for Hudson-9023 (Display job description when hovering o…

…n job in list of build jobs), added processing of HTML tags.
  • Loading branch information...
commit 7ffd4ae8901a26e158e4743921c4b54b5a640baa 1 parent 2284f91
@antkozak authored
View
25 hudson-core/src/main/resources/hudson/views/JobColumn/column.jelly
@@ -23,7 +23,28 @@ THE SOFTWARE.
-->
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
- <td style="${indenter.getCss(job)}">
- <a href="${jobBaseUrl}${job.shortUrl}" title="${job.description!=null? job.description :''}"> ${job.displayName}</a>
+ <td class="jobDescription"
+ style="${indenter.getCss(job)}"
+ onmouseover="this.className='jobDescription hover';return true;"
+ onmouseout="this.className='jobDescription';return true;">
+ <a href="${jobBaseUrl}${job.shortUrl}">${job.displayName}</a>
+ <j:if test="${!empty(job.description)}">
+ <div class="jobDescriptionDetails">
+ <table border="0">
+ <thead>
+ <tr>
+ <th>${%Description}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ ${app.markupFormatter.translate(job.description)}
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </j:if>
</td>
</j:jelly>
View
23 hudson-war/src/main/webapp/css/style.css
@@ -1050,3 +1050,26 @@ table.configure {
table.configure > td {
padding: 0px;
}
+
+/* ======================= Job Description Hover ============================ */
+.jobDescription a {
+ text-decoration: none;
+}
+.jobDescription div.jobDescriptionDetails {
+ display: none;
+}
+.jobDescription:hover, .jobDescription.hover {
+ background: transparent;
+}
+.jobDescription:hover div.jobDescriptionDetails, .jobDescription.hover div.jobDescriptionDetails {
+ display: block;
+ position: absolute;
+ border: 1px solid #bbb;
+ background-color: white;
+ margin-left: 32px;
+ z-index: 26;
+}
+.jobDescription div.jobDescriptionDetails table {
+ border-collapse: collapse;
+ width: 450px;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.