diff --git a/res/app/control-panes/dashboard/upload/activities/activities.jade b/res/app/control-panes/dashboard/upload/activities/activities.jade index 8ecb6ada..51042e26 100644 --- a/res/app/control-panes/dashboard/upload/activities/activities.jade +++ b/res/app/control-panes/dashboard/upload/activities/activities.jade @@ -1,2 +1,2 @@ div(ng-controller='ActivitiesCtrl') -h1 Activities \ No newline at end of file +h3 Activities diff --git a/res/app/control-panes/dashboard/upload/upload-controller.js b/res/app/control-panes/dashboard/upload/upload-controller.js index 7b76922f..0aebea31 100644 --- a/res/app/control-panes/dashboard/upload/upload-controller.js +++ b/res/app/control-panes/dashboard/upload/upload-controller.js @@ -2,6 +2,8 @@ module.exports = function UploadCtrl($scope, $rootScope, SettingsService, gettex $scope.upload = null $scope.installation = null + $scope.installEnabled = true + $scope.launchEnabled = true $scope.clear = function () { $scope.upload = null @@ -17,31 +19,33 @@ module.exports = function UploadCtrl($scope, $rootScope, SettingsService, gettex var upload = $rootScope.control.upload($files) $scope.installation = null return upload.promise - .progressed(function(uploadResult) { - $scope.$apply(function() { + .progressed(function (uploadResult) { + $scope.$apply(function () { $scope.upload = uploadResult }) }) - .then(function(uploadResult) { - $scope.$apply(function() { + .then(function (uploadResult) { + $scope.$apply(function () { $scope.upload = uploadResult }) if (uploadResult.success) { - var install = $rootScope.control.install(uploadResult.body) - return install.promise - .progressed(function(installResult) { - $scope.$apply(function() { - installResult.manifest = uploadResult.body.manifest - $scope.installation = installResult + if ($scope.installEnabled) { + var install = $rootScope.control.install(uploadResult.body) + return install.promise + .progressed(function (installResult) { + $scope.$apply(function () { + installResult.manifest = uploadResult.body.manifest + $scope.installation = installResult + }) }) - }) - .then(function(installResult) { - $scope.$apply(function() { - installResult.manifest = uploadResult.body.manifest - $scope.treeData = installResult.manifest - $scope.installation = installResult + .then(function (installResult) { + $scope.$apply(function () { + installResult.manifest = uploadResult.body.manifest + $scope.treeData = installResult.manifest + $scope.installation = installResult + }) }) - }) + } } }) } diff --git a/res/app/control-panes/dashboard/upload/upload.jade b/res/app/control-panes/dashboard/upload/upload.jade index 2d2cad65..837adbf0 100644 --- a/res/app/control-panes/dashboard/upload/upload.jade +++ b/res/app/control-panes/dashboard/upload/upload.jade @@ -7,7 +7,7 @@ input(type='checkbox', ng-model='launchEnabled', ng-disabled='true') span Launch label.checkbox-inline.pull-right - input(type='checkbox', ng-model='installEnabled', ng-disabled='true') + input(type='checkbox', ng-model='installEnabled') span Install .widget-content.padded @@ -32,6 +32,8 @@ //treecontrol.tree-classic(tree-model='treeData', options='treeOptions') span employee: {{node.name}} age {{node.age}} + pre(ng-if='upload.error') Error: {{ upload.error }} + .upload-status(ng-if='upload && !upload.settled') div(ng-switch='upload.lastData')