Skip to content

Commit d2445b1

Browse files
committed
[REVIEW] Align sort lookup call for table in tile mode
The Scout JS implementation of the sort lookup call for tables in tile mode uses lookup row icons to indicate whether a selected entry sorts ascending or descending while the Scout Classic implementation has added these icons to its text. Align these two implementations and use the style from Scout JS as it looks cleaner. 379008
1 parent 5eb20d2 commit d2445b1

5 files changed

Lines changed: 15 additions & 3 deletions

File tree

‎org.eclipse.scout.rt.client/src/main/java/org/eclipse/scout/rt/client/ui/basic/table/AbstractTileTableHeader.java‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2010, 2023 BSI Business Systems Integration AG
2+
* Copyright (c) 2010, 2026 BSI Business Systems Integration AG
33
*
44
* This program and the accompanying materials are made
55
* available under the terms of the Eclipse Public License 2.0
@@ -29,6 +29,7 @@
2929
import org.eclipse.scout.rt.platform.util.CollectionUtility;
3030
import org.eclipse.scout.rt.platform.util.ImmutablePair;
3131
import org.eclipse.scout.rt.platform.util.ObjectUtility;
32+
import org.eclipse.scout.rt.shared.AbstractIcons;
3233
import org.eclipse.scout.rt.shared.data.basic.FontSpec;
3334
import org.eclipse.scout.rt.shared.services.lookup.ILookupCall;
3435
import org.eclipse.scout.rt.shared.services.lookup.ILookupRow;
@@ -307,8 +308,11 @@ protected List<? extends ILookupRow<ImmutablePair<IColumn, Boolean>>> execCreate
307308
for (IColumn col : getTable().getColumns()) {
308309
if (col.isVisible() && isColumnTypeAllowedForSorting(col)) {
309310
String colLabel = ObjectUtility.nvl(col.getHeaderCell().getText(), col.getHeaderCell().getTooltipText());
310-
lookupRows.add(new LookupRow<>(new ImmutablePair<>(col, true), colLabel + " ↑")); // U+2191
311-
lookupRows.add(new LookupRow<>(new ImmutablePair<>(col, false), colLabel + " ↓")); // U+2193
311+
lookupRows.add(new LookupRow<>(new ImmutablePair<>(col, true), colLabel + " (" + TEXTS.get("ascending") + ")")
312+
.withIconId(AbstractIcons.LongArrowUpBold));
313+
lookupRows.add(new LookupRow<>(new ImmutablePair<>(col, false), colLabel + " (" + TEXTS.get("descending") + ")")
314+
.withIconId(AbstractIcons.LongArrowDownBold)
315+
);
312316
}
313317
}
314318

‎org.eclipse.scout.rt.nls/src/main/resources/org/eclipse/scout/rt/nls/texts/ScoutTexts.properties‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,5 +351,7 @@ YearToDateTwoYearsBefore=two years ago
351351
Yes=Yes
352352
YesButton=Yes
353353
and=and
354+
ascending=ascending
355+
descending=descending
354356
from=from
355357
to=to

‎org.eclipse.scout.rt.nls/src/main/resources/org/eclipse/scout/rt/nls/texts/ScoutTexts_de.properties‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,5 +351,7 @@ YearToDateTwoYearsBefore=vor zwei Jahren
351351
Yes=Ja
352352
YesButton=Ja
353353
and=und
354+
ascending=aufsteigend
355+
descending=absteigend
354356
from=von
355357
to=bis

‎org.eclipse.scout.rt.nls/src/main/resources/org/eclipse/scout/rt/nls/texts/ScoutTexts_fr.properties‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,5 +351,7 @@ YearToDateTwoYearsBefore=il y a deux ans
351351
Yes=Oui
352352
YesButton=Oui
353353
and=et
354+
ascending=croissant
355+
descending=décroissant
354356
from=de
355357
to=à

‎org.eclipse.scout.rt.nls/src/main/resources/org/eclipse/scout/rt/nls/texts/ScoutTexts_it.properties‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,5 +351,7 @@ YearToDateTwoYearsBefore=due anni fa
351351
Yes=Sì
352352
YesButton=Sì
353353
and=e
354+
ascending=crescente
355+
descending=decrescente
354356
from=da
355357
to=a

0 commit comments

Comments
 (0)