diff --git a/src/views/app.html b/src/views/app.html index 9506bc2fd..c37653680 100644 --- a/src/views/app.html +++ b/src/views/app.html @@ -31,6 +31,38 @@ } + + + -
-
-
-
-
-
-
-
{{ app.message }}
-
-
-
diff --git a/src/views/app.js b/src/views/app.js index e3cfcd9a0..07b785b93 100644 --- a/src/views/app.js +++ b/src/views/app.js @@ -687,6 +687,29 @@ angular.module('Application').controller('AppController', ['$scope', '$location' } } + $scope.postInstallConfirm = { + message: '', + confirmed: false, + + show: function () { + $scope.postInstallConfirm.message = $scope.app.manifest.postInstallMessage; + $scope.postInstallConfirm.confirmed = false; + + $('#postInstallConfirmModal').modal('show'); + + return false; // prevent propagation and default + }, + + submit: function () { + if (!$scope.postInstallConfirm.confirmed) return; + + $scope.app.pendingPostInstallConfirmation = false; + delete localStorage['confirmPostInstall_' + $scope.app.id]; + + $('#postInstallConfirmModal').modal('hide'); + } + }; + function fetchUsers(callback) { Client.getUsers(function (error, users) { if (error) return callback(error);