Add a modal error dialog to the home index template and JavaScript
This commit is contained in:
parent
4f622923fd
commit
46c8220e16
|
@ -12,6 +12,18 @@ function getUrlListId() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showErrorDialog(title, html, buttons) {
|
||||||
|
var errorDialog = $("#errorDialog");
|
||||||
|
errorDialog.find('.modal-title').text(title);
|
||||||
|
errorDialog.find('.modal-body').html(html);
|
||||||
|
if (buttons) {
|
||||||
|
errorDialog.find('.modal-footer').show();
|
||||||
|
} else {
|
||||||
|
errorDialog.find('.modal-footer').hide();
|
||||||
|
}
|
||||||
|
errorDialog.modal();
|
||||||
|
}
|
||||||
|
|
||||||
function initLists() {
|
function initLists() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/lists',
|
url: '/lists',
|
||||||
|
|
|
@ -80,6 +80,24 @@ Horizontale lijn<pre>"></textarea>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="modal" tabindex="-1" role="dialog" id="errorDialog">
|
||||||
|
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header bg-dark text-light">
|
||||||
|
<h5 class="modal-title"></h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span class="text-light" aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<p></p>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-primary" data-dismiss="modal">OK</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
||||||
{% block script %}
|
{% block script %}
|
||||||
|
|
Loading…
Reference in New Issue