Skip to content

Commit

Permalink
[JENKINS-23492] Fixed auth/login links in top navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
tfennelly committed Jul 14, 2014
1 parent 65d3799 commit a277b73
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
3 changes: 3 additions & 0 deletions core/src/main/resources/lib/layout/breadcrumbs.css
Expand Up @@ -83,6 +83,9 @@
cursor: pointer;
z-index: 2000;
}
#menuSelector.inverse {
background-image: url(menu_down_arrow2.png);
}

A.model-link.inside, #breadcrumbs A.inside {/* additional 'inside' class allows pre-allocation of the context menu space */
padding-right: 16px;
Expand Down
8 changes: 8 additions & 0 deletions core/src/main/resources/lib/layout/breadcrumbs.js
Expand Up @@ -103,8 +103,16 @@ var breadcrumbs = (function() {
*/
menuSelector.show = function(target) {
var xy = Dom.getXY(target);

if ($(target).hasClassName("inside"))
xy[0] -= this.offsetWidth; // show the menu selector inside the text

if ($(target).hasClassName("inverse")) {
menuSelector.addClassName("inverse");
} else {
menuSelector.removeClassName("inverse");
}

xy[0] += target.offsetWidth;
xy[1] += target.offsetHeight/2 - this.offsetHeight/2;
Dom.setXY(this, xy);
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/layout/layout.jelly
Expand Up @@ -170,7 +170,7 @@ ${h.initPageVariables(context)}
</j:otherwise>
</j:choose>
<span style="white-space:nowrap">
<a href="${rootURL}/user/${user.id}" class="model-link inside"><b>${userName}</b></a>
<a href="${rootURL}/user/${user.id}" class="model-link inside inverse"><b>${userName}</b></a>
<j:if test="${app.securityRealm.canLogOut()}">
|
<a href="${rootURL}/logout"><b>${%logout}</b></a>
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions war/src/main/webapp/css/style.css
Expand Up @@ -184,13 +184,14 @@ dt {
}

#header .login {
position: relative;
top: 8px;
color: white;
margin-right: 10px;
}

#header .login a {
position: relative;
top: 10px;
#header .login a, #header .login a:visited {
color: white;
}

a:link {
Expand Down

0 comments on commit a277b73

Please sign in to comment.