Move app error handling to simply show the app configure view

This commit is contained in:
Johannes Zellner
2019-09-18 15:54:19 +02:00
parent 14dd1103eb
commit 300ff09a47
3 changed files with 7 additions and 37 deletions

View File

@@ -3,7 +3,7 @@
/* global angular:false */
/* global $:false */
angular.module('Application').controller('AppsController', ['$scope', '$timeout', '$interval', 'Client', function ($scope, $timeout, $interval, Client) {
angular.module('Application').controller('AppsController', ['$scope', '$timeout', '$interval', '$location', 'Client', function ($scope, $timeout, $interval, $location, Client) {
var ALL_DOMAINS_DOMAIN = { _alldomains: true, domain: 'All Domains' }; // dummy record for the single select filter
$scope.installedApps = Client.getInstalledApps();
@@ -41,18 +41,8 @@ angular.module('Application').controller('AppsController', ['$scope', '$timeout'
}
};
$scope.appError = {
app: null,
show: function (app) {
$scope.reset();
$scope.appError.app = app;
$('#appErrorModal').modal('show');
return false; // prevent propagation and default
}
$scope.showAppDebug = function (app) {
$location.path('/app/' + app.id);
};
$scope.appUpdate = {
@@ -91,7 +81,6 @@ angular.module('Application').controller('AppsController', ['$scope', '$timeout'
$scope.reset = function () {
// close all dialogs
$('#appErrorModal').modal('hide');
$('#appUpdateModal').modal('hide');
$('#appPostInstallConfirmModal').modal('hide');
@@ -131,7 +120,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$timeout'
});
// setup all the dialog focus handling
['appUpdateModal', 'appErrorModal'].forEach(function (id) {
['appUpdateModal'].forEach(function (id) {
$('#' + id).on('shown.bs.modal', function () {
$(this).find("[autofocus]:first").focus();
});