LP#1825578: reverse direction of sort-order arrows in eg-grid
authorGalen Charlton <gmc@equinoxinitiative.org>
Fri, 19 Apr 2019 21:20:42 +0000 (17:20 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Wed, 24 Apr 2019 19:17:12 +0000 (15:17 -0400)
This patch adjusts the arrow icons used to indicate if a column
in the Angular eg-grid is sorted to use the following convention:

  sort order ascending == display _up_ arrow
  sort order descending == display _descending_ arrow

To test
-------
[1] Apply the patch.
[2] In a grid with a sortable column (as can be found in /eg2/en-US/staff/sandbox),
    click on the heading to sort it. Verify that ascending sort displays
    the upwards arrow and descending sort the downwards.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>

Open-ILS/src/eg2/src/app/share/grid/grid-header.component.html

index 0662f54..98a6fbf 100644 (file)
@@ -24,9 +24,9 @@
       (click)="sortOneColumn(col)">
       <span class="eg-grid-header-cell-sort-label">{{col.label}}</span>
       <span class="material-icons eg-grid-header-cell-sort-arrow"
-        *ngIf="isColumnSorting(col, 'ASC')">arrow_downwards</span>
+        *ngIf="isColumnSorting(col, 'ASC')">arrow_upwards</span>
       <span class="material-icons eg-grid-header-cell-sort-arrow"
-        *ngIf="isColumnSorting(col, 'DESC')">arrow_upwards</span>
+        *ngIf="isColumnSorting(col, 'DESC')">arrow_downwards</span>
     </a>
     <span *ngIf="!col.isSortable">{{col.label}}</span>
   </div>