Give some busy indicator while email configs are fetching

This commit is contained in:
Johannes Zellner
2018-01-25 18:28:11 +01:00
parent c3ce6ef9f0
commit d97268dfa7
2 changed files with 11 additions and 4 deletions

View File

@@ -162,6 +162,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
$scope.useredit = {
busy: false,
busyFetching: false,
error: {},
userInfo: {},
email: '',
@@ -172,6 +173,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
superuser: false,
show: function (userInfo) {
$scope.useredit.busyFetching = true;
$scope.useredit.error = {};
$scope.useredit.email = userInfo.email;
$scope.useredit.fallbackEmail = userInfo.fallbackEmail;
@@ -200,7 +202,11 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
callback();
});
});
}, function () {
}, function (error) {
$scope.useredit.busyFetching = false;
if (error) return console.error(error);
// we need this copy as angular multiselect cannot deal with dynamic arrays!
$scope.useredit.emailAddresses = tmp;
});