From: Bill Erickson Date: Thu, 10 Sep 2020 19:06:24 +0000 (-0400) Subject: LP1846042 Angular grid filters display streamlining X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=dfa5de2f6418a885d5c4c385041f34709207b045;p=evergreen%2Fpines.git LP1846042 Angular grid filters display streamlining Moves all grid filter inputs and actions into a dropdown menu accessed by clicking on the 'Filter' text-and-icon along the top of each grid column (when filters are enabled). Moving the actions into the drop-down means the filter inputs, etc. are only visible when accessed and have minimal impact on the primary grid display. Signed-off-by: Bill Erickson Signed-off-by: Tiffany Little Signed-off-by: Michele Morgan --- diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid-filter-control.component.html b/Open-ILS/src/eg2/src/app/share/grid/grid-filter-control.component.html index 052de1cef7..964d6b310a 100644 --- a/Open-ILS/src/eg2/src/app/share/grid/grid-filter-control.component.html +++ b/Open-ILS/src/eg2/src/app/share/grid/grid-filter-control.component.html @@ -1,285 +1,311 @@ + + + + Filter + + filter_list + + + create + + + + + +
+ + + +
+
+ + + + + +
-
- +
+ + +
-
-
- +
+ + +
-
-
- +
+ + +
-
-
- +
+ + +
-
-
- +
+ + +
-
-
- +
+ + +
-
-
- +
+ + +
+
-
-
-
- + +
+ + + +
- -
- - -
-
- +
+ + +
-
I don't know how to filter {{col.name}} - {{col.datatype}}
+
diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid-filter-control.component.ts b/Open-ILS/src/eg2/src/app/share/grid/grid-filter-control.component.ts index 8ed77f7c7d..da23710484 100644 --- a/Open-ILS/src/eg2/src/app/share/grid/grid-filter-control.component.ts +++ b/Open-ILS/src/eg2/src/app/share/grid/grid-filter-control.component.ts @@ -164,6 +164,12 @@ export class GridFilterControlComponent implements OnInit { date_filt['-or'].push(filt2_a); filters.push(date_filt); } else if (col.filterOperator === 'between') { + + if (!endDateStr) { + // User has not applied the second date yet. + return; + } + date1 = date; date2 = this.localDateFromYmd(endDateStr); @@ -194,6 +200,11 @@ export class GridFilterControlComponent implements OnInit { col.isFiltered = true; this.context.reload(); } + + // The date filter has autoClose=false so that interacting with + // date selectors won't result in closing the dropdown. Once + // we've successfully applied a filter, force it closed. + this.closeDropdown(); } clearDateFilter(col: GridColumn) { delete this.context.dataSource.filters[col.name];