display post install message after installation

fixes #19
This commit is contained in:
Girish Ramakrishnan
2016-09-07 12:36:49 -07:00
parent a52f1e07ee
commit b4c030b02b
2 changed files with 31 additions and 9 deletions

View File

@@ -71,6 +71,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
$('#collapseInstallForm').collapse('hide');
$('#collapseResourceConstraint').collapse('hide');
$('#collapseMediaLinksCarousel').collapse('show');
$('#postInstallMessage').collapse('hide');
if ($scope.appInstallForm) {
$scope.appInstallForm.$setPristine();
@@ -174,15 +175,30 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
$scope.appInstall.busy = false;
// wait for dialog to be fully closed to avoid modal behavior breakage when moving to a different view already
$('#appInstallModal').on('hidden.bs.modal', function () {
$scope.appInstall.reset();
$('#appInstallModal').off('hidden.bs.modal');
$location.path('/apps');
});
$('#appInstallModal').modal('hide');
$scope.appInstall.postInstall();
});
},
postInstall: function () {
if ($scope.appInstall.app.manifest.postInstallMessage) {
$scope.appInstall.state = 'postInstall';
$('#collapseInstallForm').collapse('hide');
$('#postInstallMessage').collapse('show');
return;
}
$scope.appInstall.switchToAppsView();
},
switchToAppsView: function () {
// wait for dialog to be fully closed to avoid modal behavior breakage when moving to a different view already
$('#appInstallModal').on('hidden.bs.modal', function () {
$scope.appInstall.reset();
$('#appInstallModal').off('hidden.bs.modal');
$location.path('/apps');
});
$('#appInstallModal').modal('hide');
}
};