Fixing the way filters were toggled. (#345)
This commit is contained in:
parent
dc198fec8c
commit
42001be9ec
@ -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,
|
||||
|
@ -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' }">
|
||||
|
@ -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,
|
||||
|
@ -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' }">
|
||||
|
@ -81,8 +81,4 @@ angular.module('lemur')
|
||||
|
||||
};
|
||||
|
||||
$scope.toggleFilter = function (params) {
|
||||
params.settings().$scope.show_filter = !params.settings().$scope.show_filter;
|
||||
};
|
||||
|
||||
});
|
||||
|
@ -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' }">
|
||||
|
@ -64,8 +64,4 @@ angular.module('lemur')
|
||||
|
||||
};
|
||||
|
||||
$scope.toggleFilter = function (params) {
|
||||
params.settings().$scope.show_filter = !params.settings().$scope.show_filter;
|
||||
};
|
||||
|
||||
});
|
||||
|
@ -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' }">
|
||||
|
@ -87,10 +87,6 @@ angular.module('lemur')
|
||||
|
||||
};
|
||||
|
||||
$scope.toggleFilter = function (params) {
|
||||
params.settings().$scope.show_filter = !params.settings().$scope.show_filter;
|
||||
};
|
||||
|
||||
$scope.notificationService = NotificationService;
|
||||
|
||||
});
|
||||
|
@ -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' }">
|
||||
|
5
lemur/static/app/angular/roles/view/view.js
vendored
5
lemur/static/app/angular/roles/view/view.js
vendored
@ -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,
|
||||
|
@ -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' }">
|
||||
|
@ -81,8 +81,4 @@ angular.module('lemur')
|
||||
|
||||
};
|
||||
|
||||
$scope.toggleFilter = function (params) {
|
||||
params.settings().$scope.show_filter = !params.settings().$scope.show_filter;
|
||||
};
|
||||
|
||||
});
|
||||
|
@ -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' }">
|
||||
|
4
lemur/static/app/angular/users/view/view.js
vendored
4
lemur/static/app/angular/users/view/view.js
vendored
@ -72,8 +72,4 @@ angular.module('lemur')
|
||||
|
||||
};
|
||||
|
||||
$scope.toggleFilter = function (params) {
|
||||
params.settings().$scope.show_filter = !params.settings().$scope.show_filter;
|
||||
};
|
||||
|
||||
});
|
||||
|
@ -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' }">
|
||||
|
Loading…
Reference in New Issue
Block a user