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

12
dist/autoloader.js vendored
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_URL = "https://jf.git.rest/Jomaar/automatic-dispose/raw/branch/";
var da_lss_adis_time = new Date().getTime();
@@ -6494,12 +6494,18 @@ ADisDB.on("ready", () => {
$(document).ready(function () {
setTimeout(function () {
ADis_Check_Call_Active();
}, 500);
}, 250);
});
function ADis_Check_Call_Active() {
if ($("h4:contains('Eigene Krankenhäuser')").length > 0 || $("h4:contains('Verbandskrankenhäuser')").length > 0) {
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 () {
setTimeout(function () {
ADis_Check_Call_Police_Active();
}, 500);
}, 250);
});
function ADis_Check_Call_Police_Active() {

2
dist/standalone.js vendored
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) {
return string1.toLowerCase().includes(string2.toLowerCase());
}

View File

@@ -1,7 +1,7 @@
$(document).ready(function () {
setTimeout(function () {
ADis_Check_Call_Police_Active();
}, 500);
}, 250);
});
function ADis_Check_Call_Police_Active() {

View File

@@ -1,12 +1,18 @@
$(document).ready(function () {
setTimeout(function () {
ADis_Check_Call_Active();
}, 500);
}, 250);
});
function ADis_Check_Call_Active() {
if ($("h4:contains('Eigene Krankenhäuser')").length > 0 || $("h4:contains('Verbandskrankenhäuser')").length > 0) {
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");
});
}
}