mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-07 12:51:02 +00:00
Set Tool tips for "Home" and jump-to-leaderboard buttons
see bug 672
This commit is contained in:
1 parent
b1fb4245d2
commit
1592611680
1 file changed
+6
-4
+6
-4
@@ -36,9 +36,9 @@ public class GlobalNavigationPanel extends FlowPanel {
|
||||
if(showHomeNavigation) {
|
||||
if (leaderboardGroupName != null && !leaderboardGroupName.isEmpty()) {
|
||||
String leaderBoardGroupLink = spectatorViewLink + "?leaderboardGroupName=" + leaderboardGroupName;
|
||||
addNavigationLink(leaderboardGroupName, leaderBoardGroupLink, "leaderBoardGroup");
|
||||
addNavigationLink(leaderboardGroupName, leaderBoardGroupLink, "leaderBoardGroup", "Go to the Event overview.");
|
||||
} else {
|
||||
addNavigationLink(stringMessages.home(), homeLink, "home");
|
||||
addNavigationLink(stringMessages.home(), homeLink, "home", "Go to the Event overview.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,11 +47,12 @@ public class GlobalNavigationPanel extends FlowPanel {
|
||||
if (leaderboardGroupName != null && !leaderboardGroupName.isEmpty()) {
|
||||
leaderBoardLink += "&leaderboardGroupName=" + leaderboardGroupName;
|
||||
}
|
||||
addNavigationLink(leaderboardName, leaderBoardLink, "leaderBoard");
|
||||
addNavigationLink(leaderboardName, leaderBoardLink, "leaderBoard", "Go to the overview and see all Races in one Leaderboard");
|
||||
}
|
||||
}
|
||||
|
||||
private void addNavigationLink(String linkName, String linkUrl, String styleNameExtension) {
|
||||
private void addNavigationLink(String linkName, String linkUrl, String styleNameExtension, String htmlTitle) {
|
||||
String setHtmlTitle = htmlTitle;
|
||||
String url = linkUrl;
|
||||
if(debugParam != null && !debugParam.isEmpty()) {
|
||||
url += url.contains("?") ? "&" : "?";
|
||||
@@ -60,6 +61,7 @@ public class GlobalNavigationPanel extends FlowPanel {
|
||||
|
||||
HTML linkHtml = new HTML(ANCHORTEMPLATE.anchor(URLFactory.INSTANCE.encode(url), linkName));
|
||||
linkHtml.addStyleName(STYLE_NAME_PREFIX + styleNameExtension);
|
||||
linkHtml.setTitle(setHtmlTitle);
|
||||
add(linkHtml);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user