Skip to content

Commit

Permalink
Merge pull request #21 from krwalker/links-into-consoleFull
Browse files Browse the repository at this point in the history
[JENKINS-18518] Link into consoleFull*
  • Loading branch information
rsandell committed Jun 10, 2014
2 parents 88bec15 + 3600702 commit c51a580
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
Expand Up @@ -64,7 +64,11 @@ public String getAfter() {
* @param id the id for the line, to refer to in links.
*/
public void addFocus(String id) {
this.before += "<span id=\"" + id + "\">";
// This style should shift the anchor down below the header so that it's visible.
// "&nbsp;" may be required to make this work for WebKit-based browsers.
this.before += "<a id=\"" + id + "\" style=\""
+ "display:block;position:relative;top:-2em;visibility:hidden"
+ "\">&nbsp;</a>";
}

/**
Expand Down
Expand Up @@ -66,7 +66,6 @@ private void addToHelperMap(FoundFailureCause cause) {
AnnotationHelper matchingHelper = helperMap.get(matchingString);
if (matchingHelper == null) {
matchingHelper = new AnnotationHelper();
matchingHelper.addAfter("</span>");
}
matchingHelper.addTitle(cause.getName());
matchingHelper.addFocus(indication.getMatchingHash() + cause.getId());
Expand Down
Expand Up @@ -119,7 +119,7 @@ def displayCauses(cause, indent, links) {
br {}
cause.getIndications().each { indication ->
if (links?.buildUrl != null) {
a(href: "${rootURL}/${links.buildUrl}" + "consoleFull"
a(href: "${rootURL}/${links.buildUrl}" + "consoleFull#" + indication.matchingHash + cause.id
, class: "model-link") {
text(_("Indication") + " " + (index++))
}
Expand Down
Expand Up @@ -128,7 +128,7 @@ def displayCauses(cause, run, indent, links) {
}
br {}
cause.getIndications().each { indication ->
a(href: "${rootURL}/${links.buildUrl}" + "consoleFull"
a(href: "${rootURL}/${links.buildUrl}" + "consoleFull#" + indication.matchingHash + cause.id
, class: "model-link") {
text(_("Indication") + " " + (index++))
}
Expand Down

0 comments on commit c51a580

Please sign in to comment.