diff --git a/client/app/components/filters.html b/client/app/components/filters.html index 58971ab6..662ea3fd 100644 --- a/client/app/components/filters.html +++ b/client/app/components/filters.html @@ -1,20 +1,34 @@
- - {{filter.friendlyName}}: {{$select.selected | filterValue:filter}} + +
+
+
+
+ + {{$select.selected | filterValue:filter}} {{value | filterValue:filter }} - - {{filter.friendlyName}}: {{$item | filterValue:filter}} - - {{value | filterValue:filter }} + + {{$item | filterValue:filter}} + + + Select All + + + Clear + + + {{value | filterValue:filter }} +
-
- + \ No newline at end of file diff --git a/client/app/components/filters.js b/client/app/components/filters.js index 93d9c929..7c83736b 100644 --- a/client/app/components/filters.js +++ b/client/app/components/filters.js @@ -12,6 +12,14 @@ const FiltersComponent = { this.filterChangeListener = (filter, modal) => { this.onChange({ filter, $modal: modal }); }; + + this.itemGroup = (item) => { + if (item === '*' || item === '-') { + return ''; + } + + return 'Values'; + }; }, }; diff --git a/client/app/services/query-result.js b/client/app/services/query-result.js index 9f7666e6..1ebe00b3 100644 --- a/client/app/services/query-result.js +++ b/client/app/services/query-result.js @@ -214,16 +214,11 @@ function QueryResultService($resource, $timeout, $q) { if (filters) { filters.forEach((filter) => { if (filter.multiple && includes(filter.current, ALL_VALUES)) { - filter.current = filter.values.slice(1); - } - - if (filter.current.length === (filter.values.length - 1)) { - filter.values[0] = NONE_VALUES; + filter.current = filter.values.slice(2); } if (filter.multiple && includes(filter.current, NONE_VALUES)) { filter.current = []; - filter.values[0] = ALL_VALUES; } }); @@ -399,6 +394,7 @@ function QueryResultService($resource, $timeout, $q) { filters.forEach((filter) => { if (filter.multiple) { filter.values.unshift(ALL_VALUES); + filter.values.unshift(NONE_VALUES); } });