diff --git a/dashboard/src/theme.scss b/dashboard/src/theme.scss index 9b91ca632..ef6bec354 100644 --- a/dashboard/src/theme.scss +++ b/dashboard/src/theme.scss @@ -177,16 +177,7 @@ html, body { } .view-header-filter-bar { - position: absolute; - right: 14px; - margin-top: 5px; - padding: 5px; - padding-top: 0; - background-color: #fff; - background-clip: padding-box; - border: 1px solid rgba(0,0,0,.15); - border-radius: 2px; - box-shadow: 0 6px 12px rgba(0,0,0,.175); + text-align: right; } .view-header-search-bar { diff --git a/dashboard/src/views/apps.html b/dashboard/src/views/apps.html index 01bd5cf78..45e5c834c 100644 --- a/dashboard/src/views/apps.html +++ b/dashboard/src/views/apps.html @@ -130,30 +130,31 @@ -

+

{{ 'apps.title' | tr }} -
-
- - - - - -
-

+
+
+ + + + + +
+
+
diff --git a/dashboard/src/views/apps.js b/dashboard/src/views/apps.js index b09705707..993fe1160 100644 --- a/dashboard/src/views/apps.js +++ b/dashboard/src/views/apps.js @@ -80,6 +80,19 @@ angular.module('Application').controller('AppsController', ['$scope', '$translat localStorage.appsView = $scope.view; }; + $scope.toggleFilter = function () { + $scope.showFilter = !$scope.showFilter; + localStorage.appsShowFilter = $scope.showFilter; + + // clear on hide + if (!$scope.showFilter) { + $scope.selectedState = $scope.states[0]; + $scope.selectedTags = []; + $scope.selectedGroup = GROUP_ACCESS_UNSET; + $scope.selectedDomain = ALL_DOMAINS_DOMAIN; + } + }; + $scope.$watch('selectedTags', function (newVal, oldVal) { if (newVal === oldVal) return; @@ -109,13 +122,6 @@ angular.module('Application').controller('AppsController', ['$scope', '$translat $scope.onAppClick = function (app, $event) { onAppClick(app, $event, $scope.isOperator(app), $scope); }; - $scope.clearAllFilter = function () { - $scope.selectedState = $scope.states[0]; - $scope.selectedTags = []; - $scope.selectedGroup = GROUP_ACCESS_UNSET; - $scope.selectedDomain = ALL_DOMAINS_DOMAIN; - }; - $scope.appPostInstallConfirm = { app: {}, message: '', @@ -290,6 +296,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$translat $scope.orderBy = localStorage.appsOrderBy; $scope.orderByReverse = !!localStorage.appsOrderByReverse; + $scope.showFilter = !!localStorage.appsShowFilter; if (!$scope.user.isAtLeastAdmin) return;