Merge pull request #599 from wknet123/master

Update for toggling admin options check.
This commit is contained in:
kun wang 2016-07-28 12:13:20 +08:00 committed by GitHub
commit 5e38e84c89
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@
<td width="20%">//u.email//</td>
<td width="35%">//u.creation_time | dateL : 'YYYY-MM-DD HH:mm:ss'//</td>
<td width="15%">
<toggle-admin has-admin-role="u.has_admin_role == 1" user-id="//u.user_id//"></toggle-admin>
<toggle-admin has-admin-role="u.has_admin_role" user-id="//u.user_id//"></toggle-admin>
</td>
<td width="20%">
&nbsp;&nbsp;<a href="javascript:void(0)" ng-click="vm.confirmToDelete(u.user_id, u.username)"><span class="glyphicon glyphicon-trash"></span></a>

View File

@ -25,7 +25,7 @@
function ToggleAdminController($scope, ToggleAdminService, $filter, trFilter) {
var vm = this;
vm.isAdmin = (Number(vm.hasAdminRole) === 1);
vm.isAdmin = (vm.hasAdminRole === 1);
vm.enabled = vm.isAdmin ? 0 : 1;
vm.toggle = toggle;