mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-08 06:01:22 +00:00
GUAC-897 Using a spinner instead of a distracting modal.
This commit is contained in:
@@ -36,10 +36,8 @@ angular.module('manage').controller('manageController', ['$scope', '$injector',
|
||||
var userService = $injector.get('userService');
|
||||
|
||||
// Set status to loading until we have all the connections, groups, and users have loaded
|
||||
$scope.showStatus({
|
||||
title : 'status.loadingTitle',
|
||||
text : 'status.loadingText'
|
||||
});
|
||||
$scope.loadingUsers = true;
|
||||
$scope.loadingConnections = true;
|
||||
|
||||
// All the connections and connection groups in root
|
||||
$scope.connectionsAndGroups = [];
|
||||
@@ -47,15 +45,6 @@ angular.module('manage').controller('manageController', ['$scope', '$injector',
|
||||
// All users that the current user has permission to edit
|
||||
$scope.users = [];
|
||||
|
||||
// Hide the status message once users, groups, and connections have fully loaded
|
||||
var usersLoaded = false;
|
||||
var connectionsAndGroupsLoaded = false;
|
||||
function checkLoadStatus() {
|
||||
if(usersLoaded && connectionsAndGroupsLoaded) {
|
||||
$scope.showStatus(false);
|
||||
}
|
||||
}
|
||||
|
||||
$scope.basicPermissionsLoaded.then(function basicPermissionsHaveBeenLoaded() {
|
||||
connectionGroupService.getAllGroupsAndConnections([], undefined, true, true).then(function filterConnectionsAndGroups(rootGroupList) {
|
||||
$scope.rootGroup = rootGroupList[0];
|
||||
@@ -73,8 +62,7 @@ angular.module('manage').controller('manageController', ['$scope', '$injector',
|
||||
);
|
||||
}
|
||||
|
||||
connectionsAndGroupsLoaded = true;
|
||||
checkLoadStatus();
|
||||
$scope.loadingConnections = false;
|
||||
});
|
||||
|
||||
userDAO.getUsers().success(function filterEditableUsers(users) {
|
||||
@@ -89,8 +77,7 @@ angular.module('manage').controller('manageController', ['$scope', '$injector',
|
||||
);
|
||||
}
|
||||
|
||||
usersLoaded = true;
|
||||
checkLoadStatus();
|
||||
$scope.loadingUsers = false;
|
||||
});
|
||||
});
|
||||
|
||||
|
@@ -62,7 +62,7 @@ THE SOFTWARE.
|
||||
</div>
|
||||
|
||||
<!-- List of users this user has access to -->
|
||||
<div class="user-list">
|
||||
<div class="user-list" ng-class="{loading: loadingUsers}">
|
||||
<div ng-click="editUser(user)" ng-repeat="user in users | orderBy : 'username'" class="list-item">
|
||||
<div class="caption">
|
||||
<div class="icon user"></div>
|
||||
@@ -84,7 +84,7 @@ THE SOFTWARE.
|
||||
</div>
|
||||
|
||||
<!-- List of connections and groups this user has access to -->
|
||||
<div class="connection-list">
|
||||
<div class="connection-list" ng-class="{loading: loadingConnections}">
|
||||
<div class="list-item" ng-repeat="item in connectionsAndGroups | orderBy : 'name'" ng-include="'nestedGroup.html'"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user