custom asyncSeries() is gone

This commit is contained in:
Johannes Zellner
2020-06-03 23:08:05 +02:00
parent 0410ba51ca
commit eeac846f5a
3 changed files with 8 additions and 24 deletions
-16
View File
@@ -62,22 +62,6 @@ function asyncForEach(items, handler, callback) {
})();
}
function asyncSeries(funcs, callback) {
var cur = 0;
if (funcs.length === 0) return callback();
(function iterator() {
funcs[cur](function (error) {
if (error) return callback(error);
if (cur >= funcs.length-1) return callback();
++cur;
iterator();
});
})();
}
// create main application module
var app = angular.module('Application', ['ngFitText', 'ngRoute', 'ngAnimate', 'ngSanitize', 'angular-md5', 'base64', 'slick', 'ui-notification', 'ui.bootstrap', 'ui.bootstrap-slider', 'ngTld', 'ui.multiselect']);
+2 -2
View File
@@ -2,7 +2,7 @@
/* global angular */
/* global $ */
/* global asyncSeries */
/* global async */
/* global asyncForEach */
/* global RSTATES */
/* global ISTATES */
@@ -1580,7 +1580,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
$scope.setView($scope.app.error ? 'repair' : 'display', true /* skipViewShow */);
}
asyncSeries([
async.series([
fetchUsers,
fetchGroups,
getDomains,
+6 -6
View File
@@ -1,10 +1,10 @@
'use strict';
/* global angular:false */
/* global Clipboard:false */
/* global asyncForEachParallel:false */
/* global asyncSeries:false */
/* global $:false */
/* global angular */
/* global Clipboard */
/* global asyncForEachParallel */
/* global async */
/* global $ */
angular.module('Application').controller('UsersController', ['$scope', '$location', '$timeout', 'Client', function ($scope, $location, $timeout, Client) {
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastUserManager) $location.path('/'); });
@@ -167,7 +167,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
var groupIds = $scope.useradd.selectedGroups.map(function (g) { return g.id; });
var NOOP = function (next) { next(); };
asyncSeries([
async.series([
Client.setGroups.bind(Client, newUserInfo.id, groupIds),
$scope.useradd.sendInvite ? Client.createInvite.bind(Client, newUserInfo.id) : NOOP,
$scope.useradd.sendInvite ? Client.sendInvite.bind(Client, newUserInfo.id) : NOOP