mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-08 05:11:04 +00:00
added smaller medal icon; use Sigma for totals; made Arial font smaller
This commit is contained in:
1 parent
5b183eebcd
commit
0aaab446e7
5 files changed
+39
-33
No files matched your search
+1
-1
@@ -168,7 +168,7 @@ public class LeaderboardPanel extends FormPanel {
|
||||
@Override
|
||||
public Header<SafeHtml> getHeader() {
|
||||
return new SortableExpandableColumnHeader(/* title */ raceName,
|
||||
/* iconURL */ medalRace ? "/images/medal.png" : null,
|
||||
/* iconURL */ medalRace ? "/images/medal_small.png" : null,
|
||||
LeaderboardPanel.this, this, stringConstants);
|
||||
}
|
||||
}
|
||||
|
||||
+31
-31
@@ -48,6 +48,37 @@ public class SortableExpandableColumnHeader extends Header<SafeHtml> {
|
||||
private static <T> Cell<SafeHtml> constructCell(final String title, final String iconURL, boolean isExpansionEnabled,
|
||||
final LeaderboardPanel leaderboardPanel, final ExpandableSortableColumn<?> column, final StringConstants stringConstants) {
|
||||
final List<HasCell<SafeHtml, ?>> cells = new ArrayList<HasCell<SafeHtml, ?>>(3);
|
||||
// add the cell rendering the expand/collapse button:
|
||||
if (isExpansionEnabled) {
|
||||
cells.add(new HasCell<SafeHtml, SafeHtml>() {
|
||||
@Override
|
||||
public Cell<SafeHtml> getCell() {
|
||||
return new ActionCell<SafeHtml>(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<SafeHtml> valueUpdater) {
|
||||
column.suppressSortingOnce();
|
||||
super.onBrowserEvent(context, parent, value, event, valueUpdater);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public FieldUpdater<SafeHtml, SafeHtml> 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<SafeHtml, String>() {
|
||||
@@ -82,37 +113,6 @@ public class SortableExpandableColumnHeader extends Header<SafeHtml> {
|
||||
return new SafeHtmlBuilder().appendEscaped(title).toSafeHtml();
|
||||
}
|
||||
});
|
||||
// add the cell rendering the expand/collapse button:
|
||||
if (isExpansionEnabled) {
|
||||
cells.add(new HasCell<SafeHtml, SafeHtml>() {
|
||||
@Override
|
||||
public Cell<SafeHtml> getCell() {
|
||||
return new ActionCell<SafeHtml>(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<SafeHtml> valueUpdater) {
|
||||
column.suppressSortingOnce();
|
||||
super.onBrowserEvent(context, parent, value, event, valueUpdater);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public FieldUpdater<SafeHtml, SafeHtml> getFieldUpdater() {
|
||||
return null; // no updates possible in a header cell
|
||||
}
|
||||
|
||||
@Override
|
||||
public SafeHtml getValue(SafeHtml object) {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
return new CompositeCell<SafeHtml>(cells) {
|
||||
/**
|
||||
* Redefining this method because when a table column is sorted, GWT wraps a div element
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 906 B |
Reference in new issue
Block a user