|
7 | 7 | <span class="caret"></span> |
8 | 8 | </button> |
9 | 9 | <ul uib-dropdown-menu> |
10 | | - <li ng-repeat="item in $ctrl.config.fields"> |
| 10 | + <li ng-repeat="item in $ctrl.config.fields" |
| 11 | + ng-class="{'selected': item === $ctrl.currentField}"> |
11 | 12 | <a class="filter-field" role="menuitem" tabindex="-1" ng-click="$ctrl.selectField(item)"> |
12 | 13 | {{item.title}} |
13 | 14 | </a> |
|
22 | 23 | <div ng-if="$ctrl.currentField.filterType === 'select'"> |
23 | 24 | <div class="btn-group bootstrap-select form-control filter-select" uib-dropdown > |
24 | 25 | <button type="button" uib-dropdown-toggle class="btn btn-default dropdown-toggle"> |
25 | | - <span class="filter-option pull-left">{{$ctrl.currentValue || $ctrl.currentField.placeholder}}</span> |
| 26 | + <span class="filter-option pull-left">{{$ctrl.currentValue.title || $ctrl.currentValue || $ctrl.currentField.placeholder}}</span> |
26 | 27 | <span class="caret"></span> |
27 | 28 | </button> |
28 | 29 | <ul uib-dropdown-menu class="dropdown-menu-right" role="menu"> |
|
32 | 33 | </a> |
33 | 34 | </li> |
34 | 35 | <li ng-repeat="filterValue in $ctrl.currentField.filterValues" |
35 | | - ng-class="{'selected': (filterValue === $ctrl.currentValue || filterValue.id === $ctrl.currentValue)}"> |
36 | | - <a role="menuitem" tabindex="-1" ng-click="$ctrl.selectValue(filterValue.id || filterValue)"> |
| 36 | + ng-class="{'selected': (filterValue === $ctrl.currentValue)}"> |
| 37 | + <a role="menuitem" tabindex="-1" ng-click="$ctrl.selectValue(filterValue)"> |
37 | 38 | {{filterValue.title || filterValue}} |
38 | 39 | </a> |
39 | 40 | </li> |
|
44 | 45 |
|
45 | 46 | <div class="btn-group bootstrap-select form-control filter-select" uib-dropdown > |
46 | 47 | <button type="button" uib-dropdown-toggle class="btn btn-default dropdown-toggle"> |
47 | | - <span class="filter-option pull-left">{{$ctrl.filterCategory || $ctrl.currentField.placeholder}}</span> |
| 48 | + <span class="filter-option pull-left">{{$ctrl.filterCategory.title || $ctrl.filterCategory || $ctrl.currentField.placeholder}}</span> |
48 | 49 | <span class="caret"></span> |
49 | 50 | </button> |
50 | 51 | <ul uib-dropdown-menu class="dropdown-menu-right" role="menu"> |
|
54 | 55 | </a> |
55 | 56 | </li> |
56 | 57 | <li ng-repeat="filterCategory in $ctrl.currentField.filterValues" |
57 | | - ng-class="{'selected': (filterCategory === $ctrl.filterCategory || filterCategory.id === $ctrl.filterCategory)}"> |
58 | | - <a role="menuitem" tabindex="-1" ng-click="$ctrl.selectValue(filterCategory.id ||filterCategory, 'filter-category')"> |
| 58 | + ng-class="{'selected': (filterCategory == $ctrl.filterCategory)}"> |
| 59 | + <a role="menuitem" tabindex="-1" ng-click="$ctrl.selectValue(filterCategory, 'filter-category')"> |
59 | 60 | {{filterCategory.title ||filterCategory}} |
60 | 61 | </a> |
61 | 62 | </li> |
|
64 | 65 |
|
65 | 66 | <div class="btn-group bootstrap-select form-control filter-select " uib-dropdown > |
66 | 67 | <button type="button" uib-dropdown-toggle class="btn btn-default dropdown-toggle category-select-value"> |
67 | | - <span class="filter-option pull-left">{{$ctrl.filterValue || $ctrl.currentField.filterCategoriesPlaceholder}}</span> |
| 68 | + <span class="filter-option pull-left">{{$ctrl.filterValue.title || $ctrl.filterValue || $ctrl.currentField.filterCategoriesPlaceholder}}</span> |
68 | 69 | <span class="caret"></span> |
69 | 70 | </button> |
70 | 71 | <ul uib-dropdown-menu class="dropdown-menu-right" role="menu"> |
|
73 | 74 | {{$ctrl.currentField.filterCategoriesPlaceholder}} |
74 | 75 | </a> |
75 | 76 | </li> |
76 | | - <li ng-repeat="filterValue in $ctrl.currentField.filterCategories[$ctrl.filterCategory.toLowerCase()].filterValues" |
77 | | - ng-class="{'selected': (filterValue === $ctrl.filterValue || filterValue.id === $ctrl.filterValue)}"> |
78 | | - <a role="menuitem" tabindex="-1" ng-click="$ctrl.selectValue(filterValue.id || filterValue, 'filter-value')"> |
| 77 | + <li ng-repeat="filterValue in $ctrl.currentField.filterCategories[$ctrl.filterCategory.id.toLowerCase() || $ctrl.filterCategory.toLowerCase() ].filterValues" |
| 78 | + ng-class="{'selected': filterValue === $ctrl.filterValue}"> |
| 79 | + <a role="menuitem" tabindex="-1" ng-click="$ctrl.selectValue(filterValue, 'filter-value')"> |
79 | 80 | {{filterValue.title || filterValue}} |
80 | 81 | </a> |
81 | 82 | </li> |
|
0 commit comments