Skip to content

Commit 51de5f2

Browse files
committed
- don't refresh dashboard, if modal is shown
1 parent 62232fb commit 51de5f2

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

templates/services.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ <h3 class="text-dark mb-0">Services</h3>
111111
$('#deleteModal').data('id', idelem).data('serviceid', id).modal('show');
112112
//$("#deleteModal .modal-body").text("Do you really want to remove the service?");
113113
});
114-
115114
// catch delete-"YES" from modal window
116115
$("body").on('click', '#btnDeleteYes', function() {
117116
// read data-id from modal window
@@ -140,8 +139,11 @@ <h3 class="text-dark mb-0">Services</h3>
140139
// todo someday: replace with datatable json reload function
141140
window.setInterval('refresh()', 30000);
142141
function refresh() {
143-
// todo, if the modal is visible, dont reload
144-
window.location.reload(true);
142+
if($('.modal.show').length) {
143+
//
144+
} else {
145+
window.location.reload(true);
146+
}
145147
}
146148
</script>
147149
{{template "footer" .}}

unfolded.sqlite

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)