mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Prevent DataTable-Error when clicking Locator too fast
This commit is contained in:
@@ -147,6 +147,7 @@
|
||||
</div>
|
||||
<script>
|
||||
var gridsquaremap = true;
|
||||
var modalloading = false;
|
||||
var type = "worked";
|
||||
<?php if ($visitor == true) { ?>
|
||||
var visitor = true;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
L.Maidenhead = L.LayerGroup.extend({
|
||||
|
||||
|
||||
options: {
|
||||
// Line and label color
|
||||
color: 'rgba(255, 0, 0, 0.4)',
|
||||
@@ -131,7 +130,10 @@ L.Maidenhead = L.LayerGroup.extend({
|
||||
}
|
||||
if (typeof gridsquaremap !== 'undefined' && gridsquaremap == true) {
|
||||
marker.on('click', function(event) {
|
||||
if (!(modalloading)) {
|
||||
modalloading=true;
|
||||
spawnGridsquareModal(locator);
|
||||
}
|
||||
});
|
||||
}
|
||||
return marker;
|
||||
|
||||
@@ -145,7 +145,7 @@ function spawnGridsquareModal(loc_4char) {
|
||||
nl2br: false,
|
||||
message: html,
|
||||
onshown: function(dialog) {
|
||||
|
||||
modalloading=false;
|
||||
$('[data-bs-toggle="tooltip"]').tooltip();
|
||||
$('.contacttable').DataTable({
|
||||
"pageLength": 25,
|
||||
@@ -172,7 +172,10 @@ function spawnGridsquareModal(loc_4char) {
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function(e) {
|
||||
modalloading=false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user