removeSite()

This commit is contained in:
Szekeres Bálint
2019-01-06 16:52:04 +01:00
parent b397b91110
commit 14546c941d
5 changed files with 23 additions and 8 deletions

View File

@@ -407,6 +407,16 @@
$scope.site = $scope.data.sites.length - 1;
};
$scope.removeSite = function(site) {
$scope.data.sites.splice(site, 1);
if ($scope.data.sites[$scope.site] === undefined) {
$scope.site--;
}
$timeout(calculateChanges);
};
$scope.setSite = function(site) {
$scope.site = site;
$timeout(calculateChanges);