Make appstore feedback form a modal dialog

This commit is contained in:
Johannes Zellner
2015-08-09 14:48:00 +02:00
parent c4c463cbc2
commit 2739d54cc1
2 changed files with 31 additions and 16 deletions

View File

@@ -46,6 +46,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
$scope.feedback.error = error;
} else {
$scope.feedback.success = true;
$('#feedbackModal').modal('hide');
resetFeedback();
}
@@ -53,6 +54,10 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
});
};
$scope.showFeedbackModal = function () {
$('#feedbackModal').modal('show');
};
$scope.activateFeedbackForm = function () {
$('#feedbackDescriptionTextarea').focus();
};
@@ -240,7 +245,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
refresh();
// setup all the dialog focus handling
['appInstallModal'].forEach(function (id) {
['appInstallModal', 'feedbackModal'].forEach(function (id) {
$('#' + id).on('shown.bs.modal', function () {
$(this).find("[autofocus]:first").focus();
});