Skip to content

Commit

Permalink
add error popup and some triggers #35
Browse files Browse the repository at this point in the history
  • Loading branch information
nesnoj committed May 14, 2019
1 parent 15a2312 commit 6cad150
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
7 changes: 7 additions & 0 deletions static/stemp_abw/foundation/css/app.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions static/stemp_abw/js/data_functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -87,6 +89,7 @@ function ctrlSimulate() {
},
error: function(page) {
console.log('error');
showErrorPopup();
}
}).done(function(returned_data){
//updateSimProgressBar(25);
Expand Down Expand Up @@ -146,6 +149,10 @@ function getSimulationResults() {
Highcharts.charts[idx2].hideLoading();
};
},
error: function(page) {
console.log('error');
showErrorPopup();
},
cache: false
});
}
7 changes: 6 additions & 1 deletion static/stemp_abw/js/ui_helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,9 @@ $('.openEnergyTab').on('click', openEnergyTab);
//
//$('.tabs-title').click( function () {
// $('#' + $(this).attr('id') + ' > a').removeClass('tab-highlighted');
//});
//});

// Show a popup with error message
function showErrorPopup() {
$('#errorMessage').foundation('open');
}
5 changes: 5 additions & 0 deletions templates/stemp_abw/map.html
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,11 @@ <h2 class="tabs-title__head">Ergebnisse</h2>
</div>
</footer>

<div class="tiny reveal" id="errorMessage" data-reveal>
<h2>Fehler</h2>
<p>Es ist ein Fehler aufgetreten. Bitte starten Sie das Tool neu.</p>
</div>

<!-- START POP-UP RESULTS -->
<div class="large reveal" id="resultsModal" data-reveal>
<button class="close-button" data-close aria-label="Close modal" type="button">
Expand Down

0 comments on commit 6cad150

Please sign in to comment.