From 42001be9ecc76456979201ca8b4fcfa9886beb0f Mon Sep 17 00:00:00 2001 From: kevgliss Date: Fri, 3 Jun 2016 09:24:17 -0700 Subject: [PATCH] Fixing the way filters were toggled. (#345) --- lemur/static/app/angular/authorities/view/view.js | 4 ---- lemur/static/app/angular/authorities/view/view.tpl.html | 6 ++++-- lemur/static/app/angular/certificates/view/view.js | 5 ----- lemur/static/app/angular/certificates/view/view.tpl.html | 6 ++++-- lemur/static/app/angular/destinations/view/view.js | 4 ---- lemur/static/app/angular/destinations/view/view.tpl.html | 6 ++++-- lemur/static/app/angular/domains/view/view.js | 4 ---- lemur/static/app/angular/domains/view/view.tpl.html | 6 ++++-- lemur/static/app/angular/notifications/view/view.js | 4 ---- lemur/static/app/angular/notifications/view/view.tpl.html | 6 ++++-- lemur/static/app/angular/roles/view/view.js | 5 ----- lemur/static/app/angular/roles/view/view.tpl.html | 6 ++++-- lemur/static/app/angular/sources/view/view.js | 4 ---- lemur/static/app/angular/sources/view/view.tpl.html | 6 ++++-- lemur/static/app/angular/users/view/view.js | 4 ---- lemur/static/app/angular/users/view/view.tpl.html | 6 ++++-- 16 files changed, 32 insertions(+), 50 deletions(-) diff --git a/lemur/static/app/angular/authorities/view/view.js b/lemur/static/app/angular/authorities/view/view.js index 24de86a8..0e7c0b8f 100644 --- a/lemur/static/app/angular/authorities/view/view.js +++ b/lemur/static/app/angular/authorities/view/view.js @@ -217,10 +217,6 @@ angular.module('lemur') return def; }; - $scope.toggleFilter = function (params) { - params.settings().$scope.show_filter = !params.settings().$scope.show_filter; - }; - $scope.edit = function (authorityId) { var uibModalInstance = $uibModal.open({ animation: true, diff --git a/lemur/static/app/angular/authorities/view/view.tpl.html b/lemur/static/app/angular/authorities/view/view.tpl.html index 75365b84..688f854e 100644 --- a/lemur/static/app/angular/authorities/view/view.tpl.html +++ b/lemur/static/app/angular/authorities/view/view.tpl.html @@ -9,13 +9,15 @@
- +
+ show-filter="showFilter">
diff --git a/lemur/static/app/angular/certificates/view/view.js b/lemur/static/app/angular/certificates/view/view.js index 63d20a20..e4877d97 100644 --- a/lemur/static/app/angular/certificates/view/view.js +++ b/lemur/static/app/angular/certificates/view/view.js @@ -106,11 +106,6 @@ angular.module('lemur') $scope.fields = [{title: 'Current User', value: 'currentUser'}, {title: 'All', value: 'all'}]; - - $scope.toggleFilter = function (params) { - params.settings().$scope.show_filter = !params.settings().$scope.show_filter; - }; - $scope.create = function () { var uibModalInstance = $uibModal.open({ animation: true, diff --git a/lemur/static/app/angular/certificates/view/view.tpl.html b/lemur/static/app/angular/certificates/view/view.tpl.html index d380059c..c9d9a062 100644 --- a/lemur/static/app/angular/certificates/view/view.tpl.html +++ b/lemur/static/app/angular/certificates/view/view.tpl.html @@ -13,13 +13,15 @@
- +
- +
diff --git a/lemur/static/app/angular/destinations/view/view.js b/lemur/static/app/angular/destinations/view/view.js index b4447a3f..3d035a61 100644 --- a/lemur/static/app/angular/destinations/view/view.js +++ b/lemur/static/app/angular/destinations/view/view.js @@ -81,8 +81,4 @@ angular.module('lemur') }; - $scope.toggleFilter = function (params) { - params.settings().$scope.show_filter = !params.settings().$scope.show_filter; - }; - }); diff --git a/lemur/static/app/angular/destinations/view/view.tpl.html b/lemur/static/app/angular/destinations/view/view.tpl.html index b3615b3c..8b4d0a45 100644 --- a/lemur/static/app/angular/destinations/view/view.tpl.html +++ b/lemur/static/app/angular/destinations/view/view.tpl.html @@ -8,12 +8,14 @@
- +
- +
diff --git a/lemur/static/app/angular/domains/view/view.js b/lemur/static/app/angular/domains/view/view.js index 1787cb29..ffce0d2f 100644 --- a/lemur/static/app/angular/domains/view/view.js +++ b/lemur/static/app/angular/domains/view/view.js @@ -64,8 +64,4 @@ angular.module('lemur') }; - $scope.toggleFilter = function (params) { - params.settings().$scope.show_filter = !params.settings().$scope.show_filter; - }; - }); diff --git a/lemur/static/app/angular/domains/view/view.tpl.html b/lemur/static/app/angular/domains/view/view.tpl.html index f1bff7e2..d202ffbd 100644 --- a/lemur/static/app/angular/domains/view/view.tpl.html +++ b/lemur/static/app/angular/domains/view/view.tpl.html @@ -8,12 +8,14 @@
- +
- +
diff --git a/lemur/static/app/angular/notifications/view/view.js b/lemur/static/app/angular/notifications/view/view.js index 512ddc9d..5803983f 100644 --- a/lemur/static/app/angular/notifications/view/view.js +++ b/lemur/static/app/angular/notifications/view/view.js @@ -87,10 +87,6 @@ angular.module('lemur') }; - $scope.toggleFilter = function (params) { - params.settings().$scope.show_filter = !params.settings().$scope.show_filter; - }; - $scope.notificationService = NotificationService; }); diff --git a/lemur/static/app/angular/notifications/view/view.tpl.html b/lemur/static/app/angular/notifications/view/view.tpl.html index ca648788..05a5fe51 100644 --- a/lemur/static/app/angular/notifications/view/view.tpl.html +++ b/lemur/static/app/angular/notifications/view/view.tpl.html @@ -8,12 +8,14 @@
- +
- +
diff --git a/lemur/static/app/angular/roles/view/view.js b/lemur/static/app/angular/roles/view/view.js index 8dc05e14..7fe88055 100644 --- a/lemur/static/app/angular/roles/view/view.js +++ b/lemur/static/app/angular/roles/view/view.js @@ -36,11 +36,6 @@ angular.module('lemur') }); }; - $scope.toggleFilter = function (params) { - params.settings().$scope.show_filter = !params.settings().$scope.show_filter; - }; - - $scope.edit = function (roleId) { var uibModalInstance = $uibModal.open({ animation: true, diff --git a/lemur/static/app/angular/roles/view/view.tpl.html b/lemur/static/app/angular/roles/view/view.tpl.html index 90490de3..ad74a6ef 100644 --- a/lemur/static/app/angular/roles/view/view.tpl.html +++ b/lemur/static/app/angular/roles/view/view.tpl.html @@ -8,12 +8,14 @@
- +
- +
diff --git a/lemur/static/app/angular/sources/view/view.js b/lemur/static/app/angular/sources/view/view.js index d5eaf916..09b33dd0 100644 --- a/lemur/static/app/angular/sources/view/view.js +++ b/lemur/static/app/angular/sources/view/view.js @@ -81,8 +81,4 @@ angular.module('lemur') }; - $scope.toggleFilter = function (params) { - params.settings().$scope.show_filter = !params.settings().$scope.show_filter; - }; - }); diff --git a/lemur/static/app/angular/sources/view/view.tpl.html b/lemur/static/app/angular/sources/view/view.tpl.html index 6cfc2c34..d5095c66 100644 --- a/lemur/static/app/angular/sources/view/view.tpl.html +++ b/lemur/static/app/angular/sources/view/view.tpl.html @@ -8,12 +8,14 @@
- +
- +
diff --git a/lemur/static/app/angular/users/view/view.js b/lemur/static/app/angular/users/view/view.js index 708302e9..bd7dfac7 100644 --- a/lemur/static/app/angular/users/view/view.js +++ b/lemur/static/app/angular/users/view/view.js @@ -72,8 +72,4 @@ angular.module('lemur') }; - $scope.toggleFilter = function (params) { - params.settings().$scope.show_filter = !params.settings().$scope.show_filter; - }; - }); diff --git a/lemur/static/app/angular/users/view/view.tpl.html b/lemur/static/app/angular/users/view/view.tpl.html index ee5485b4..239e619a 100644 --- a/lemur/static/app/angular/users/view/view.tpl.html +++ b/lemur/static/app/angular/users/view/view.tpl.html @@ -8,12 +8,14 @@
- +
- +