diff --git a/static/stemp_abw/foundation/css/app.css b/static/stemp_abw/foundation/css/app.css index 4fcb1246..f503700f 100644 --- a/static/stemp_abw/foundation/css/app.css +++ b/static/stemp_abw/foundation/css/app.css @@ -1888,6 +1888,13 @@ footer.map-footer { #saveSimulation p { font-weight: 700; } +#errorMessage { + text-align: center;} + #errorMessage h2 { + color: #ff0000;} + #errorMessage p { + font-weight: 700;} + #results-wrap { margin-top: 1.55rem; } #results-wrap .tabs { diff --git a/static/stemp_abw/js/data_functions.js b/static/stemp_abw/js/data_functions.js index 5c58f088..af224721 100644 --- a/static/stemp_abw/js/data_functions.js +++ b/static/stemp_abw/js/data_functions.js @@ -24,6 +24,7 @@ function ctrlScenario(element_id) { }, error: function(page) { console.log('error'); + showErrorPopup(); } }).done(function(returned_data) { if (element_id == 'select-scn-frm') { @@ -59,6 +60,7 @@ function ctrlScenarioPost(element_id, data) { }, error: function(page) { console.log('error'); + showErrorPopup(); } }).done(function(returned_data) { data = JSON.parse(returned_data); @@ -87,6 +89,7 @@ function ctrlSimulate() { }, error: function(page) { console.log('error'); + showErrorPopup(); } }).done(function(returned_data){ //updateSimProgressBar(25); @@ -146,6 +149,10 @@ function getSimulationResults() { Highcharts.charts[idx2].hideLoading(); }; }, + error: function(page) { + console.log('error'); + showErrorPopup(); + }, cache: false }); } diff --git a/static/stemp_abw/js/ui_helpers.js b/static/stemp_abw/js/ui_helpers.js index f377c95e..dabae1ef 100644 --- a/static/stemp_abw/js/ui_helpers.js +++ b/static/stemp_abw/js/ui_helpers.js @@ -102,4 +102,9 @@ $('.openEnergyTab').on('click', openEnergyTab); // //$('.tabs-title').click( function () { // $('#' + $(this).attr('id') + ' > a').removeClass('tab-highlighted'); -//}); \ No newline at end of file +//}); + +// Show a popup with error message +function showErrorPopup() { + $('#errorMessage').foundation('open'); +} \ No newline at end of file diff --git a/templates/stemp_abw/map.html b/templates/stemp_abw/map.html index 2dd0e952..40686f61 100644 --- a/templates/stemp_abw/map.html +++ b/templates/stemp_abw/map.html @@ -455,6 +455,11 @@

Ergebnisse

+
+

Fehler

+

Es ist ein Fehler aufgetreten. Bitte starten Sie das Tool neu.

+
+