diff --git a/src/views/apps.html b/src/views/apps.html index 8553edd18..d1d7c26ce 100644 --- a/src/views/apps.html +++ b/src/views/apps.html @@ -488,7 +488,7 @@ @@ -575,7 +575,7 @@ -
+
diff --git a/src/views/apps.js b/src/views/apps.js index ddf9c973d..0111951a8 100644 --- a/src/views/apps.js +++ b/src/views/apps.js @@ -496,7 +496,33 @@ angular.module('Application').controller('AppsController', ['$scope', '$location error: {}, app: {}, manifest: {}, - portBindings: {} + portBindings: {}, + + show: function (app, updateManifest) { + $scope.reset(); + + $scope.appUpdate.app = app; + $scope.appUpdate.manifest = angular.copy(updateManifest); + + $('#appUpdateModal').modal('show'); + }, + + submit: function () { + $scope.appUpdate.busy = true; + + Client.updateApp($scope.appUpdate.app.id, $scope.appUpdate.manifest, function (error) { + if (error) { + Client.error(error); + } else { + $scope.appUpdate.app = {}; + $('#appUpdateModal').modal('hide'); + } + + $scope.appUpdate.busy = false; + + Client.refreshAppCache($scope.appUpdate.app.id); // reflect the new app state immediately + }); + } }; $scope.reset = function () { @@ -609,32 +635,6 @@ angular.module('Application').controller('AppsController', ['$scope', '$location return false; // prevent propagation and default }; - $scope.showUpdate = function (app, updateManifest) { - $scope.reset(); - - $scope.appUpdate.app = app; - $scope.appUpdate.manifest = angular.copy(updateManifest); - - $('#appUpdateModal').modal('show'); - }; - - $scope.doUpdate = function () { - $scope.appUpdate.busy = true; - - Client.updateApp($scope.appUpdate.app.id, $scope.appUpdate.manifest, function (error) { - if (error) { - Client.error(error); - } else { - $scope.appUpdate.app = {}; - $('#appUpdateModal').modal('hide'); - } - - $scope.appUpdate.busy = false; - - Client.refreshAppCache($scope.appUpdate.app.id); // reflect the new app state immediately - }); - }; - $scope.renderAccessRestrictionUser = function (userId) { var user = $scope.users.filter(function (u) { return u.id === userId; })[0];