File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,6 @@ <h3 class="text-dark mb-0">Services</h3>
111
111
$ ( '#deleteModal' ) . data ( 'id' , idelem ) . data ( 'serviceid' , id ) . modal ( 'show' ) ;
112
112
//$("#deleteModal .modal-body").text("Do you really want to remove the service?");
113
113
} ) ;
114
-
115
114
// catch delete-"YES" from modal window
116
115
$ ( "body" ) . on ( 'click' , '#btnDeleteYes' , function ( ) {
117
116
// read data-id from modal window
@@ -140,8 +139,11 @@ <h3 class="text-dark mb-0">Services</h3>
140
139
// todo someday: replace with datatable json reload function
141
140
window . setInterval ( 'refresh()' , 30000 ) ;
142
141
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
+ }
145
147
}
146
148
</ script >
147
149
{{template "footer" .}}
You can’t perform that action at this time.
0 commit comments