Fixing the way filters were toggled. (#345)

This commit is contained in:
kevgliss 2016-06-03 09:24:17 -07:00
parent dc198fec8c
commit 42001be9ec
16 changed files with 32 additions and 50 deletions

View File

@ -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,

View File

@ -9,13 +9,15 @@
<button class="btn btn-primary" ng-click="create()">Create</button>
</div>
<div class="btn-group">
<button ng-click="toggleFilter(authoritiesTable)" class="btn btn-default">Filter</button>
<button ng-model="showFilter" class="btn btn-default" uib-btn-checkbox
btn-checkbox-true="1"
btn-checkbox-false="0">Filter</button>
</div>
<div class="clearfix"></div>
</div>
<div class="table-responsive">
<table ng-table="authoritiesTable" class="table table-striped" template-pagination="angular/pager.html"
show-filter="false">
show-filter="showFilter">
<tbody>
<tr ng-repeat-start="authority in $data track by $index">
<td data-title="'Name'" sortable="'name'" filter="{ 'name': 'text' }">

View File

@ -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,

View File

@ -13,13 +13,15 @@
</button>
</div>
<div class="btn-group">
<button ng-click="toggleFilter(certificateTable)" class="btn btn-default">Filter</button>
<button ng-model="showFilter" class="btn btn-default" uib-btn-checkbox
btn-checkbox-true="1"
btn-checkbox-false="0">Filter</button>
</div>
<!--<select class="form-control" ng-model="show" ng-options="item.value as item.title for item in fields"></select>-->
<div class="clearfix"></div>
</div>
<div class="table-responsive">
<table ng-table="certificateTable" class="table" show-filter="false" template-pagination="angular/pager.html">
<table ng-table="certificateTable" class="table" show-filter="showFilter" template-pagination="angular/pager.html">
<tbody>
<tr ng-class="{'even-row': $even }" ng-repeat-start="certificate in $data track by $index">
<td data-title="'Name'" sortable="'name'" filter="{ 'name': 'text' }">

View File

@ -81,8 +81,4 @@ angular.module('lemur')
};
$scope.toggleFilter = function (params) {
params.settings().$scope.show_filter = !params.settings().$scope.show_filter;
};
});

View File

@ -8,12 +8,14 @@
<button ng-click="create()" class="btn btn-primary">Create</button>
</div>
<div class="btn-group">
<button ng-click="toggleFilter(destinationsTable)" class="btn btn-default">Filter</button>
<button ng-model="showFilter" class="btn btn-default" uib-btn-checkbox
btn-checkbox-true="1"
btn-checkbox-false="0">Filter</button>
</div>
<div class="clearfix"></div>
</div>
<div class="table-responsive">
<table ng-table="destinationsTable" class="table table-striped" show-filter="false" template-pagination="angular/pager.html" >
<table ng-table="destinationsTable" class="table table-striped" show-filter="showFilter" template-pagination="angular/pager.html" >
<tbody>
<tr ng-repeat="destination in $data track by $index">
<td data-title="'Label'" sortable="'label'" filter="{ 'label': 'text' }">

View File

@ -64,8 +64,4 @@ angular.module('lemur')
};
$scope.toggleFilter = function (params) {
params.settings().$scope.show_filter = !params.settings().$scope.show_filter;
};
});

View File

@ -8,12 +8,14 @@
<button ng-click="create()" class="btn btn-primary">Create</button>
</div>
<div class="btn-group">
<button ng-click="toggleFilter(domainsTable)" class="btn btn-default">Filter</button>
<button ng-model="showFilter" class="btn btn-default" uib-btn-checkbox
btn-checkbox-true="1"
btn-checkbox-false="0">Filter</button>
</div>
<div class="clearfix"></div>
</div>
<div class="table-responsive">
<table ng-table="domainsTable" class="table table-striped" show-filter="false" template-pagination="angular/pager.html">
<table ng-table="domainsTable" class="table table-striped" show-filter="showFilter" template-pagination="angular/pager.html">
<tbody>
<tr ng-repeat="domain in $data track by $index">
<td data-title="'Name'" sortable="'name'" filter="{ 'name': 'text' }">

View File

@ -87,10 +87,6 @@ angular.module('lemur')
};
$scope.toggleFilter = function (params) {
params.settings().$scope.show_filter = !params.settings().$scope.show_filter;
};
$scope.notificationService = NotificationService;
});

View File

@ -8,12 +8,14 @@
<button ng-click="create()" class="btn btn-primary">Create</button>
</div>
<div class="btn-group">
<button ng-click="toggleFilter(notificationsTable)" class="btn btn-default">Filter</button>
<button ng-model="showFilter" class="btn btn-default" uib-btn-checkbox
btn-checkbox-true="1"
btn-checkbox-false="0">Filter</button>
</div>
<div class="clearfix"></div>
</div>
<div class="table-responsive">
<table ng-table="notificationsTable" class="table table-striped" show-filter="false" template-pagination="angular/pager.html" >
<table ng-table="notificationsTable" class="table table-striped" show-filter="showFilter" template-pagination="angular/pager.html" >
<tbody>
<tr ng-repeat="notification in $data track by $index">
<td data-title="'Label'" sortable="'label'" filter="{ 'label': 'text' }">

View File

@ -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,

View File

@ -8,12 +8,14 @@
<button ng-click="create()" class="btn btn-primary">Create</button>
</div>
<div class="btn-group">
<button ng-click="toggleFilter(rolesTable)" class="btn btn-default">Filter</button>
<button ng-model="showFilter" class="btn btn-default" uib-btn-checkbox
btn-checkbox-true="1"
btn-checkbox-false="0">Filter</button>
</div>
<div class="clearfix"></div>
</div>
<div class="table-responsive">
<table ng-table="rolesTable" class="table table-striped" show-filter="false" template-pagination="angular/pager.html">
<table ng-table="rolesTable" class="table table-striped" show-filter="showFilter" template-pagination="angular/pager.html">
<tbody>
<tr ng-repeat="role in $data track by $index">
<td data-title="'Name'" sortable="'name'" filter="{ 'name': 'text' }">

View File

@ -81,8 +81,4 @@ angular.module('lemur')
};
$scope.toggleFilter = function (params) {
params.settings().$scope.show_filter = !params.settings().$scope.show_filter;
};
});

View File

@ -8,12 +8,14 @@
<button ng-click="create()" class="btn btn-primary">Create</button>
</div>
<div class="btn-group">
<button ng-click="toggleFilter(sourcesTable)" class="btn btn-default">Filter</button>
<button ng-model="showFilter" class="btn btn-default" uib-btn-checkbox
btn-checkbox-true="1"
btn-checkbox-false="0">Filter</button>
</div>
<div class="clearfix"></div>
</div>
<div class="table-responsive">
<table ng-table="sourcesTable" class="table table-striped" show-filter="false" template-pagination="angular/pager.html" >
<table ng-table="sourcesTable" class="table table-striped" show-filter="showFilter" template-pagination="angular/pager.html" >
<tbody>
<tr ng-repeat="source in $data track by $index">
<td data-title="'Label'" sortable="'label'" filter="{ 'label': 'text' }">

View File

@ -72,8 +72,4 @@ angular.module('lemur')
};
$scope.toggleFilter = function (params) {
params.settings().$scope.show_filter = !params.settings().$scope.show_filter;
};
});

View File

@ -8,12 +8,14 @@
<button ng-click="create()" class="btn btn-primary">Create</button>
</div>
<div class="btn-group">
<button ng-click="toggleFilter(usersTable)" class="btn btn-default">Filter</button>
<button ng-model="showFilter" class="btn btn-default" uib-btn-checkbox
btn-checkbox-true="1"
btn-checkbox-false="0">Filter</button>
</div>
<div class="clearfix"></div>
</div>
<div class="table-responsive">
<table ng-table="usersTable" class="table table-striped" show-filter="false" template-pagination="angular/pager.html">
<table ng-table="usersTable" class="table table-striped" show-filter="showFilter" template-pagination="angular/pager.html">
<tbody>
<tr ng-repeat="user in $data track by $index">
<td data-title="'Name'" sortable="'user'" filter="{ 'username': 'text' }">