Patch up the addon memory configuration

This commit is contained in:
Johannes Zellner
2018-11-21 15:57:26 +01:00
parent 3c3383ac03
commit 77d29c3728
2 changed files with 16 additions and 13 deletions
+4 -4
View File
@@ -62,7 +62,7 @@ angular.module('Application').controller('AddonsController', ['$scope', '$locati
$scope.addonConfigure.memoryTicks = [];
var npow2 = Math.pow(2, Math.ceil(Math.log($scope.config.memory)/Math.log(2)));
for (var i = 256; i <= (npow2*2/1024/1024); i *= 2) {
if (i >= (addon.config.memory/1024/1024 || 0)) $scope.addonConfigure.memoryTicks.push(i * 1024 * 1024);
$scope.addonConfigure.memoryTicks.push(i * 1024 * 1024);
}
$('#addonConfigureModal').modal('show');
@@ -79,11 +79,11 @@ angular.module('Application').controller('AddonsController', ['$scope', '$locati
return;
}
$('#addonConfigureModal').modal('hide');
$scope.addonConfigure.reset();
// reload the addon
refresh($scope.addonConfigure.addon.name);
$('#addonConfigureModal').modal('hide');
$scope.addonConfigure.reset();
});
},