Fix VehicleID for Rescue Handler

This commit is contained in:
2018-11-24 15:38:35 +01:00
parent df57183f30
commit ac2f75b884
4 changed files with 18 additions and 6 deletions
+9 -3
View File
@@ -1,4 +1,4 @@
/*Generated on:Sat Nov 24 2018 15:26:12 GMT+0100 (CET)*/ /*Generated on:Sat Nov 24 2018 15:38:34 GMT+0100 (CET)*/
var AutomaticDispose_Branch = "master"; var AutomaticDispose_Branch = "master";
var AutomaticDispose_URL = "https://jf.git.rest/Jomaar/automatic-dispose/raw/branch/"; var AutomaticDispose_URL = "https://jf.git.rest/Jomaar/automatic-dispose/raw/branch/";
var da_lss_adis_time = new Date().getTime(); var da_lss_adis_time = new Date().getTime();
@@ -6494,12 +6494,18 @@ ADisDB.on("ready", () => {
$(document).ready(function () { $(document).ready(function () {
setTimeout(function () { setTimeout(function () {
ADis_Check_Call_Active(); ADis_Check_Call_Active();
}, 500); }, 250);
}); });
function ADis_Check_Call_Active() { function ADis_Check_Call_Active() {
if ($("h4:contains('Eigene Krankenhäuser')").length > 0 || $("h4:contains('Verbandskrankenhäuser')").length > 0) { if ($("h4:contains('Eigene Krankenhäuser')").length > 0 || $("h4:contains('Verbandskrankenhäuser')").length > 0) {
ADis_Collect_Hospitals(); ADis_Collect_Hospitals();
} else {
VehicleID = document.location.pathname.substr(document.location.pathname.lastIndexOf("/") + 1);
ADis_RemoveRescueSprechwunschFromQueue(VehicleID).then((deleteCount) => {
$("#adis-sprechwunsch-rescue-frame").attr("src", "");
$("#adis-sprechwunsch-rescue-frame").attr("vehicle_id", "empty");
});
} }
} }
@@ -6596,7 +6602,7 @@ ADisDB.on("ready", () => {
$(document).ready(function () { $(document).ready(function () {
setTimeout(function () { setTimeout(function () {
ADis_Check_Call_Police_Active(); ADis_Check_Call_Police_Active();
}, 500); }, 250);
}); });
function ADis_Check_Call_Police_Active() { function ADis_Check_Call_Police_Active() {
+1 -1
View File
@@ -1,4 +1,4 @@
/*Generated on:Sat Nov 24 2018 15:26:12 GMT+0100 (CET)*/ /*Generated on:Sat Nov 24 2018 15:38:34 GMT+0100 (CET)*/
function includesString(string1, string2) { function includesString(string1, string2) {
return string1.toLowerCase().includes(string2.toLowerCase()); return string1.toLowerCase().includes(string2.toLowerCase());
} }
+1 -1
View File
@@ -1,7 +1,7 @@
$(document).ready(function () { $(document).ready(function () {
setTimeout(function () { setTimeout(function () {
ADis_Check_Call_Police_Active(); ADis_Check_Call_Police_Active();
}, 500); }, 250);
}); });
function ADis_Check_Call_Police_Active() { function ADis_Check_Call_Police_Active() {
+7 -1
View File
@@ -1,12 +1,18 @@
$(document).ready(function () { $(document).ready(function () {
setTimeout(function () { setTimeout(function () {
ADis_Check_Call_Active(); ADis_Check_Call_Active();
}, 500); }, 250);
}); });
function ADis_Check_Call_Active() { function ADis_Check_Call_Active() {
if ($("h4:contains('Eigene Krankenhäuser')").length > 0 || $("h4:contains('Verbandskrankenhäuser')").length > 0) { if ($("h4:contains('Eigene Krankenhäuser')").length > 0 || $("h4:contains('Verbandskrankenhäuser')").length > 0) {
ADis_Collect_Hospitals(); ADis_Collect_Hospitals();
} else {
VehicleID = document.location.pathname.substr(document.location.pathname.lastIndexOf("/") + 1);
ADis_RemoveRescueSprechwunschFromQueue(VehicleID).then((deleteCount) => {
$("#adis-sprechwunsch-rescue-frame").attr("src", "");
$("#adis-sprechwunsch-rescue-frame").attr("vehicle_id", "empty");
});
} }
} }