diff --git a/src/theme.scss b/src/theme.scss
index 8aa49ec99..c9338eef3 100644
--- a/src/theme.scss
+++ b/src/theme.scss
@@ -433,10 +433,12 @@ multiselect {
// ----------------------------
.task-indicator {
+ font-size: 18px;
position: fixed;
right: 20px;
- top: 65px;
- background: white;
+ bottom: 45px;
+ background: $brand-primary;
+ color: white;
padding: 10px;
box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
@@ -448,7 +450,7 @@ multiselect {
.app-configure-links {
position: fixed;
left: 20px;
- top: 65px;
+ top: 100px;
div {
cursor: pointer;
diff --git a/src/views/app.html b/src/views/app.html
index 3ef53336e..ec0023d41 100644
--- a/src/views/app.html
+++ b/src/views/app.html
@@ -9,7 +9,7 @@
-
+
{{ app | installationStateLabel:user }}
@@ -25,16 +25,17 @@
Backups
-
-
-
- {{ app.label || app.location || app.fqdn }}
-
-
-
+
+
+
+
+ {{ app.label || app.location || app.fqdn }}
+
+
+
| Status |
@@ -91,18 +92,14 @@
-
+
diff --git a/src/views/app.js b/src/views/app.js
index 422560f3f..0289899db 100644
--- a/src/views/app.js
+++ b/src/views/app.js
@@ -70,23 +70,19 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
$scope.display.label = $scope.app.label || '';
$scope.display.icon = { data: null };
-
- $('#iconFileInput').get(0).onchange = function (event) {
- var fr = new FileReader();
- fr.onload = function () {
- $scope.$apply(function () {
- // var file = event.target.files[0];
- $scope.display.icon.data = fr.result;
- });
- };
- fr.readAsDataURL(event.target.files[0]);
- };
},
submit: function () {
$scope.display.busy = true;
$scope.display.error = {};
+ function done() {
+ $scope.display.busy = false;
+ $scope.display.success = true;
+ $scope.displayForm.$setPristine();
+ refreshApp($scope.display.show);
+ }
+
// TODO break those apart
Client.configureApp($scope.app.id, 'label', { label: $scope.display.label }, function (error) {
if (error) return Client.error(error);
@@ -97,11 +93,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
if (error) return Client.error(error);
// skip if icon is unchanged
- if ($scope.display.icon.data === null) {
- $scope.display.busy = false;
- $scope.display.success = true;
- return;
- }
+ if ($scope.display.icon.data === null) return done();
var icon;
if ($scope.display.icon.data === '__original__') { // user reset the icon
@@ -112,9 +104,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
Client.configureApp($scope.app.id, 'icon', { icon: icon }, function (error) {
if (error) return Client.error(error);
-
- $scope.display.busy = false;
- $scope.display.success = true;
+ done();
});
});
});
@@ -447,6 +437,16 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
});
}
+ function refreshApp(callback) {
+ Client.getApp(appId, function (error, app) {
+ if (error) return callback(error);
+
+ $scope.app = app;
+
+ callback();
+ });
+ }
+
function trackAppTask() {
Client.getApp(appId, function (error, app) {
if (error) Client.error(error);
@@ -486,8 +486,19 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
});
});
+ $('#iconFileInput').get(0).onchange = function (event) {
+ var fr = new FileReader();
+ fr.onload = function () {
+ $scope.$apply(function () {
+ // var file = event.target.files[0];
+ $scope.display.icon.data = fr.result;
+ });
+ };
+ fr.readAsDataURL(event.target.files[0]);
+ };
+
// setup all the dialog focus handling
- ['appConfigureModal', 'appUninstallModal', 'appUpdateModal', 'appRestoreModal', 'appInfoModal', 'appErrorModal'].forEach(function (id) {
+ ['appUninstallModal', 'appUpdateModal', 'appRestoreModal'].forEach(function (id) {
$('#' + id).on('shown.bs.modal', function () {
$(this).find("[autofocus]:first").focus();
});