Allow to refresh users without showing busy state

This commit is contained in:
Johannes Zellner
2020-03-05 16:14:03 -08:00
parent 6180c0dc69
commit 256676cb9d

View File

@@ -248,7 +248,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
if (error) return console.error('Unable to update groups for user:', error);
refresh();
refreshUsers(false);
$('#userEditModal').modal('hide');
});
@@ -616,8 +616,8 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
});
}
function refreshUsers() {
$scope.userRefreshBusy = true;
function refreshUsers(showBusy) {
if (showBusy) $scope.userRefreshBusy = true;
getUsers(function (error, result) {
if (error) return console.error('Unable to get user listing.', error);
@@ -639,7 +639,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
$scope.groupsById[result[i].id] = result[i];
}
refreshUsers();
refreshUsers(true);
});
}