Skip to content
Snippets Groups Projects
Commit 5dd5e044 authored by Andreas Valder's avatar Andreas Valder
Browse files

closes #237

parent 34cbf9bb
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,10 @@ var moderator = { ...@@ -2,7 +2,10 @@ var moderator = {
api: { api: {
csrf_token: '', csrf_token: '',
init: function () { init: function () {
$("#modal_apierror").on('hidden.bs.modal', function () {
$(".modal-body", $("#modal_apierror"))[0].innerHTML = '';
$(".modal-body", $("#modal_apierror"))[0].innerHTML = '';
});
}, },
set: function(path,value,reload) { set: function(path,value,reload) {
var req = {}; var req = {};
...@@ -43,6 +46,8 @@ var moderator = { ...@@ -43,6 +46,8 @@ var moderator = {
}, },
handleapierror: function(jqXHR, textStatus, errorThrow) { handleapierror: function(jqXHR, textStatus, errorThrow) {
console.log("Fehler: "+errorThrow) console.log("Fehler: "+errorThrow)
$(".modal-body", $("#modal_apierror"))[0].innerHTML += "<p>" + errorThrow + ": " + textStatus + "</p>";
$("#modal_apierror").modal()
}, },
gethttp: function (url){ gethttp: function (url){
$.ajax({ $.ajax({
...@@ -247,7 +252,9 @@ var moderator = { ...@@ -247,7 +252,9 @@ var moderator = {
} }
}; };
$( document ).ready( function () { moderator.init(); } ); $( document ).ready( function () {
moderator.init();
} );
$( document ).ready( function () { $( document ).ready( function () {
var l = $(".plot-view"); var l = $(".plot-view");
......
...@@ -154,6 +154,22 @@ ...@@ -154,6 +154,22 @@
</div> </div>
</footer> </footer>
{% endblock %} {% endblock %}
{% block modals %}
<div class="modal fade" id="modal_apierror" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 style="color:red;"><span class="glyphicon glyphicon-exclamation-sign"></span> Error</h4>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
{% endblock %}
</body> </body>
{% if ismod() %} {% if ismod() %}
<script> <script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment