diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/LeaderboardPanel.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/LeaderboardPanel.java index a5aef54b2ce..eece7b67a02 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/LeaderboardPanel.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/LeaderboardPanel.java @@ -168,7 +168,7 @@ public class LeaderboardPanel extends FormPanel { @Override public Header getHeader() { return new SortableExpandableColumnHeader(/* title */ raceName, - /* iconURL */ medalRace ? "/images/medal.png" : null, + /* iconURL */ medalRace ? "/images/medal_small.png" : null, LeaderboardPanel.this, this, stringConstants); } } diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SortableExpandableColumnHeader.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SortableExpandableColumnHeader.java index e59af091916..44b584dcad6 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SortableExpandableColumnHeader.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SortableExpandableColumnHeader.java @@ -48,6 +48,37 @@ public class SortableExpandableColumnHeader extends Header { private static Cell constructCell(final String title, final String iconURL, boolean isExpansionEnabled, final LeaderboardPanel leaderboardPanel, final ExpandableSortableColumn column, final StringConstants stringConstants) { final List> cells = new ArrayList>(3); + // add the cell rendering the expand/collapse button: + if (isExpansionEnabled) { + cells.add(new HasCell() { + @Override + public Cell getCell() { + return new ActionCell(column.isExpanded() ? stringConstants.collapse() : stringConstants.expand(), + new ExpandCollapseButtonAction(column)) { + /** + * carry out event logic, hence call the delegate's execute(...) operation, then stop + * propagation to avoid the column being sorted when the expand button is pressed + */ + @Override + public void onBrowserEvent(Context context, Element parent, SafeHtml value, NativeEvent event, + ValueUpdater valueUpdater) { + column.suppressSortingOnce(); + super.onBrowserEvent(context, parent, value, event, valueUpdater); + } + }; + } + + @Override + public FieldUpdater getFieldUpdater() { + return null; // no updates possible in a header cell + } + + @Override + public SafeHtml getValue(SafeHtml object) { + return null; + } + }); + } // if it's a medal race, add the cell rendering the medal image if (iconURL != null) { cells.add(new HasCell() { @@ -82,37 +113,6 @@ public class SortableExpandableColumnHeader extends Header { return new SafeHtmlBuilder().appendEscaped(title).toSafeHtml(); } }); - // add the cell rendering the expand/collapse button: - if (isExpansionEnabled) { - cells.add(new HasCell() { - @Override - public Cell getCell() { - return new ActionCell(column.isExpanded() ? stringConstants.collapse() : stringConstants.expand(), - new ExpandCollapseButtonAction(column)) { - /** - * carry out event logic, hence call the delegate's execute(...) operation, then stop - * propagation to avoid the column being sorted when the expand button is pressed - */ - @Override - public void onBrowserEvent(Context context, Element parent, SafeHtml value, NativeEvent event, - ValueUpdater valueUpdater) { - column.suppressSortingOnce(); - super.onBrowserEvent(context, parent, value, event, valueUpdater); - } - }; - } - - @Override - public FieldUpdater getFieldUpdater() { - return null; // no updates possible in a header cell - } - - @Override - public SafeHtml getValue(SafeHtml object) { - return null; - } - }); - } return new CompositeCell(cells) { /** * Redefining this method because when a table column is sorted, GWT wraps a div element diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringConstants.properties b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringConstants.properties index 3a63210e09d..86d83ee91cf 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringConstants.properties +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringConstants.properties @@ -22,7 +22,7 @@ delayHelp=Leave empty to replay at arbitrary times; enter seconds (e.g., "60" fo speedInKnots=Speed (kn) fromDeg=From (deg) noRacesYet=No Races Yet -total=Total +total=\u03A3 carry=Accumulated competitor=Competitor defaultLeaderboard=Default Leaderboard diff --git a/java/com.sap.sailing.gwt.ui/war/Leaderboard.css b/java/com.sap.sailing.gwt.ui/war/Leaderboard.css index c0f235046a6..acf62af4368 100755 --- a/java/com.sap.sailing.gwt.ui/war/Leaderboard.css +++ b/java/com.sap.sailing.gwt.ui/war/Leaderboard.css @@ -2,6 +2,7 @@ * { font-family: Arial; + font-size-adjust: 0.5; } @@ -54,3 +55,8 @@ h1 { position: relative; vertical-align: middle; } + +/** grey background for table header */ +.GALD-WOPD > thead { + background-color: #e5e5e5; +} diff --git a/java/com.sap.sailing.gwt.ui/war/images/medal_small.png b/java/com.sap.sailing.gwt.ui/war/images/medal_small.png new file mode 100755 index 00000000000..f1a77dc2ca8 Binary files /dev/null and b/java/com.sap.sailing.gwt.ui/war/images/medal_small.png differ