Prevent DataTable-Error when clicking Locator too fast
这个提交包含在:
父节点
2f976798a3
当前提交
e066b8b86d
共有 3 个文件被更改,包括 9 次插入 和 3 次删除
|
|
@ -147,6 +147,7 @@
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var gridsquaremap = true;
|
var gridsquaremap = true;
|
||||||
|
var modalloading = false;
|
||||||
var type = "worked";
|
var type = "worked";
|
||||||
<?php if ($visitor == true) { ?>
|
<?php if ($visitor == true) { ?>
|
||||||
var visitor = true;
|
var visitor = true;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
L.Maidenhead = L.LayerGroup.extend({
|
L.Maidenhead = L.LayerGroup.extend({
|
||||||
|
|
||||||
|
|
||||||
options: {
|
options: {
|
||||||
// Line and label color
|
// Line and label color
|
||||||
color: 'rgba(255, 0, 0, 0.4)',
|
color: 'rgba(255, 0, 0, 0.4)',
|
||||||
|
|
@ -131,7 +130,10 @@ L.Maidenhead = L.LayerGroup.extend({
|
||||||
}
|
}
|
||||||
if (typeof gridsquaremap !== 'undefined' && gridsquaremap == true) {
|
if (typeof gridsquaremap !== 'undefined' && gridsquaremap == true) {
|
||||||
marker.on('click', function(event) {
|
marker.on('click', function(event) {
|
||||||
|
if (!(modalloading)) {
|
||||||
|
modalloading=true;
|
||||||
spawnGridsquareModal(locator);
|
spawnGridsquareModal(locator);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return marker;
|
return marker;
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ function spawnGridsquareModal(loc_4char) {
|
||||||
nl2br: false,
|
nl2br: false,
|
||||||
message: html,
|
message: html,
|
||||||
onshown: function(dialog) {
|
onshown: function(dialog) {
|
||||||
|
modalloading=false;
|
||||||
$('[data-bs-toggle="tooltip"]').tooltip();
|
$('[data-bs-toggle="tooltip"]').tooltip();
|
||||||
$('.contacttable').DataTable({
|
$('.contacttable').DataTable({
|
||||||
"pageLength": 25,
|
"pageLength": 25,
|
||||||
|
|
@ -172,6 +172,9 @@ function spawnGridsquareModal(loc_4char) {
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
error: function(e) {
|
||||||
|
modalloading=false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用