mapva2
This commit is contained in:
Vendored
+58
-48
@@ -1,4 +1,4 @@
|
|||||||
/*Generated on:Tue Nov 27 2018 12:32:59 GMT+0100 (CET)*/
|
/*Generated on:Tue Nov 27 2018 13:25:02 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();
|
||||||
@@ -17405,18 +17405,10 @@ ADisDB.on("ready", () => {
|
|||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
return Wunsch.each((myWunsch) => {
|
return Wunsch.each((myWunsch) => {
|
||||||
let MissionID = myWunsch.missionID;
|
let MissionID = myWunsch.missionID;
|
||||||
myWunsch.next_check = Math.floor(new Date().getTime() / 1000) + 300;
|
if ($("#adis-ownmissions-frame").attr("mission_id") == "empty") {
|
||||||
|
$("#adis-ownmissions-frame").attr("src", "https://www.leitstellenspiel.de/missions/" + MissionID);
|
||||||
return ADis_UpdateOwnMissions(myWunsch).then(() => {
|
$("#adis-ownmissions-frame").attr("mission_id", MissionID);
|
||||||
if ($("#adis-ownmissions-frame").attr("mission_id") == "empty") {
|
}
|
||||||
$("#adis-ownmissions-frame").attr("src", "https://www.leitstellenspiel.de/missions/" + MissionID);
|
|
||||||
$("#adis-ownmissions-frame").attr("mission_id", MissionID);
|
|
||||||
|
|
||||||
setTimeout(ADis_OpenNextOwnMissions, 5000);
|
|
||||||
} else {
|
|
||||||
setTimeout(ADis_OpenNextOwnMissions, 5000);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return setTimeout(ADis_OpenNextOwnMissions, 5000);
|
return setTimeout(ADis_OpenNextOwnMissions, 5000);
|
||||||
@@ -17604,22 +17596,10 @@ ADisDB.on("ready", () => {
|
|||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
return Wunsch.each((myWunsch) => {
|
return Wunsch.each((myWunsch) => {
|
||||||
let MissionID = myWunsch.missionID;
|
let MissionID = myWunsch.missionID;
|
||||||
myWunsch.last_check = Math.floor(new Date().getTime() / 1000);
|
if ($("#adis-krankentransporte-frame").attr("mission_id") == "empty") {
|
||||||
myWunsch.next_check = Math.floor(new Date().getTime() / 1000) + 300;
|
$("#adis-krankentransporte-frame").attr("src", "https://www.leitstellenspiel.de/missions/" + MissionID);
|
||||||
return ADis_UpdateKrankentransport(myWunsch).then(() => {
|
$("#adis-krankentransporte-frame").attr("mission_id", MissionID);
|
||||||
if ($("#adis-krankentransporte-frame").attr("mission_id") == "empty") {
|
}
|
||||||
$("#adis-krankentransporte-frame").attr("src", "https://www.leitstellenspiel.de/missions/" + MissionID);
|
|
||||||
$("#adis-krankentransporte-frame").attr("mission_id", MissionID);
|
|
||||||
|
|
||||||
KrankentransportFrameWatchDog = setTimeout(async function () {
|
|
||||||
$("#adis-krankentransporte-frame").attr("src", "");
|
|
||||||
$("#adis-krankentransporte-frame").attr("mission_id", "empty");
|
|
||||||
setTimeout(ADis_OpenNextKrankentransporte, 1000);
|
|
||||||
}, 5000);
|
|
||||||
} else {
|
|
||||||
setTimeout(ADis_OpenNextKrankentransporte, 5000);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return setTimeout(ADis_OpenNextKrankentransporte, 5000);
|
return setTimeout(ADis_OpenNextKrankentransporte, 5000);
|
||||||
@@ -17680,34 +17660,64 @@ ADisDB.on("ready", () => {
|
|||||||
var re = /\d+$/i;
|
var re = /\d+$/i;
|
||||||
var found = MissionType.match(re);
|
var found = MissionType.match(re);
|
||||||
MissionType = Number(found[0]);
|
MissionType = Number(found[0]);
|
||||||
|
} else {
|
||||||
|
MissionType = null;
|
||||||
}
|
}
|
||||||
CurrentTime = Math.floor(new Date().getTime() / 1000);
|
CurrentTime = Math.floor(new Date().getTime() / 1000);
|
||||||
console.log("MissionID", MissionID);
|
console.log("MissionID", MissionID);
|
||||||
console.log("MissionType", MissionType);
|
console.log("MissionType", MissionType);
|
||||||
console.log("CurrentTime", CurrentTime);
|
console.log("CurrentTime", CurrentTime);
|
||||||
if (MissionType !== null) {
|
ADisSettings().then((setting) => {
|
||||||
if (includesString($('#iframe-inside-container > div.alert.fade.in.alert-success').text(), "wurde erfolgreich informiert") /*|| $('#vehicle_show_table_all input[type="checkbox"]:checked').size() > 0*/) {
|
if (setting['MissionsOwn-Automatic'] != 'true' && ['adis-ownmissions'].indexOf(window.name) != -1) {
|
||||||
console.log("SEND");
|
return ADisDB.ADisMissionsOwn.where({
|
||||||
return ADis_MissionUpdateDone(MissionID); // update Mission here as updated or full
|
missionID: MissionID,
|
||||||
} else {
|
done: 'false'
|
||||||
setTimeout(function () {
|
}).and(function (item) {
|
||||||
if (['adis-ownmissions', 'adis-krankentransporte'].indexOf(window.name) != -1) {
|
return item.next_check <= Math.floor(new Date().getTime() / 1000)
|
||||||
console.log("WILL SEND?")
|
}).limit(1)
|
||||||
ADis_CheckMissionAutomatic();
|
} else if (setting['MissionsOwn-Automatic'] != 'true' && ['adis-krankentransporte'].indexOf(window.name) != -1) {
|
||||||
} else if (['adis-verbandmission', 'adis-verbandmission-event'].indexOf(window.name) != -1) {
|
return ADisDB.ADisKrankentransport.where({
|
||||||
ADis_WorkVerbandMission();
|
missionID: MissionID,
|
||||||
|
done: 'false'
|
||||||
|
}).and(function (item) {
|
||||||
|
return item.next_check <= Math.floor(new Date().getTime() / 1000)
|
||||||
|
}).limit(1)
|
||||||
|
}
|
||||||
|
}).then((Wunsch) => {
|
||||||
|
if (Wunsch !== undefined) {
|
||||||
|
return Wunsch.count(function (count) {
|
||||||
|
if (count > 0) {
|
||||||
|
Wunsch.each((mywunsch) => {
|
||||||
|
MainHandler()
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}, 250);
|
});
|
||||||
}
|
}
|
||||||
} else {
|
})
|
||||||
if (includesString($('#iframe-inside-container > div.missionNotFound > div.missionNotFoundText').text(), 'Der Einsatz wurde erfolgreich abgeschlossen.')) {
|
|
||||||
console.log("DONE!")
|
|
||||||
return ADis_MissionDelete(MissionID); // delete Mission here as completed
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, 2000);
|
}, 2000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function MainHandler(){
|
||||||
|
if (includesString($('#iframe-inside-container > div.missionNotFound > div.missionNotFoundText').text(), 'Der Einsatz wurde erfolgreich abgeschlossen.')) {
|
||||||
|
console.log("DONE!")
|
||||||
|
return ADis_MissionDelete(MissionID); // delete Mission here as completed
|
||||||
|
}
|
||||||
|
if (includesString($('#iframe-inside-container > div.alert.fade.in.alert-success').text(), "wurde erfolgreich informiert") /*|| $('#vehicle_show_table_all input[type="checkbox"]:checked').size() > 0*/ ) {
|
||||||
|
console.log("SEND");
|
||||||
|
return ADis_MissionUpdateDone(MissionID); // update Mission here as updated or full
|
||||||
|
} else {
|
||||||
|
setTimeout(function () {
|
||||||
|
if (['adis-ownmissions', 'adis-krankentransporte'].indexOf(window.name) != -1) {
|
||||||
|
console.log("WILL SEND?")
|
||||||
|
ADis_CheckMissionAutomatic();
|
||||||
|
} else if (['adis-verbandmission', 'adis-verbandmission-event'].indexOf(window.name) != -1) {
|
||||||
|
ADis_WorkVerbandMission();
|
||||||
|
}
|
||||||
|
}, 250);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
// - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||||
// -
|
// -
|
||||||
// - Grab Run Verbands Missions
|
// - Grab Run Verbands Missions
|
||||||
@@ -17809,7 +17819,7 @@ ADisDB.on("ready", () => {
|
|||||||
}).then((availableMission) => {
|
}).then((availableMission) => {
|
||||||
if (availableMission != undefined && availableMission.jsondata) {
|
if (availableMission != undefined && availableMission.jsondata) {
|
||||||
MissionConfig = availableMission.jsondata;
|
MissionConfig = availableMission.jsondata;
|
||||||
console.log('MissionConfig: ', MissionType.toString(), JSON.stringify(MissionConfig,null,2))
|
console.log('MissionConfig: ', MissionType.toString(), JSON.stringify(MissionConfig, null, 2))
|
||||||
AD_StartAlarmProcess();
|
AD_StartAlarmProcess();
|
||||||
} else {
|
} else {
|
||||||
var updateData = {
|
var updateData = {
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
/*Generated on:Tue Nov 27 2018 12:32:59 GMT+0100 (CET)*/
|
/*Generated on:Tue Nov 27 2018 13:25:02 GMT+0100 (CET)*/
|
||||||
function includesString(string1, string2) {
|
function includesString(string1, string2) {
|
||||||
return string1.toLowerCase().includes(string2.toLowerCase());
|
return string1.toLowerCase().includes(string2.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|||||||
+49
-19
@@ -8,34 +8,64 @@ $(document).ready(function () {
|
|||||||
var re = /\d+$/i;
|
var re = /\d+$/i;
|
||||||
var found = MissionType.match(re);
|
var found = MissionType.match(re);
|
||||||
MissionType = Number(found[0]);
|
MissionType = Number(found[0]);
|
||||||
|
} else {
|
||||||
|
MissionType = null;
|
||||||
}
|
}
|
||||||
CurrentTime = Math.floor(new Date().getTime() / 1000);
|
CurrentTime = Math.floor(new Date().getTime() / 1000);
|
||||||
console.log("MissionID", MissionID);
|
console.log("MissionID", MissionID);
|
||||||
console.log("MissionType", MissionType);
|
console.log("MissionType", MissionType);
|
||||||
console.log("CurrentTime", CurrentTime);
|
console.log("CurrentTime", CurrentTime);
|
||||||
if (MissionType !== null) {
|
ADisSettings().then((setting) => {
|
||||||
if (includesString($('#iframe-inside-container > div.alert.fade.in.alert-success').text(), "wurde erfolgreich informiert") /*|| $('#vehicle_show_table_all input[type="checkbox"]:checked').size() > 0*/) {
|
if (setting['MissionsOwn-Automatic'] != 'true' && ['adis-ownmissions'].indexOf(window.name) != -1) {
|
||||||
console.log("SEND");
|
return ADisDB.ADisMissionsOwn.where({
|
||||||
return ADis_MissionUpdateDone(MissionID); // update Mission here as updated or full
|
missionID: MissionID,
|
||||||
} else {
|
done: 'false'
|
||||||
setTimeout(function () {
|
}).and(function (item) {
|
||||||
if (['adis-ownmissions', 'adis-krankentransporte'].indexOf(window.name) != -1) {
|
return item.next_check <= Math.floor(new Date().getTime() / 1000)
|
||||||
console.log("WILL SEND?")
|
}).limit(1)
|
||||||
ADis_CheckMissionAutomatic();
|
} else if (setting['MissionsOwn-Automatic'] != 'true' && ['adis-krankentransporte'].indexOf(window.name) != -1) {
|
||||||
} else if (['adis-verbandmission', 'adis-verbandmission-event'].indexOf(window.name) != -1) {
|
return ADisDB.ADisKrankentransport.where({
|
||||||
ADis_WorkVerbandMission();
|
missionID: MissionID,
|
||||||
|
done: 'false'
|
||||||
|
}).and(function (item) {
|
||||||
|
return item.next_check <= Math.floor(new Date().getTime() / 1000)
|
||||||
|
}).limit(1)
|
||||||
|
}
|
||||||
|
}).then((Wunsch) => {
|
||||||
|
if (Wunsch !== undefined) {
|
||||||
|
return Wunsch.count(function (count) {
|
||||||
|
if (count > 0) {
|
||||||
|
Wunsch.each((mywunsch) => {
|
||||||
|
MainHandler()
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}, 250);
|
});
|
||||||
}
|
}
|
||||||
} else {
|
})
|
||||||
if (includesString($('#iframe-inside-container > div.missionNotFound > div.missionNotFoundText').text(), 'Der Einsatz wurde erfolgreich abgeschlossen.')) {
|
|
||||||
console.log("DONE!")
|
|
||||||
return ADis_MissionDelete(MissionID); // delete Mission here as completed
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, 2000);
|
}, 2000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function MainHandler(){
|
||||||
|
if (includesString($('#iframe-inside-container > div.missionNotFound > div.missionNotFoundText').text(), 'Der Einsatz wurde erfolgreich abgeschlossen.')) {
|
||||||
|
console.log("DONE!")
|
||||||
|
return ADis_MissionDelete(MissionID); // delete Mission here as completed
|
||||||
|
}
|
||||||
|
if (includesString($('#iframe-inside-container > div.alert.fade.in.alert-success').text(), "wurde erfolgreich informiert") /*|| $('#vehicle_show_table_all input[type="checkbox"]:checked').size() > 0*/ ) {
|
||||||
|
console.log("SEND");
|
||||||
|
return ADis_MissionUpdateDone(MissionID); // update Mission here as updated or full
|
||||||
|
} else {
|
||||||
|
setTimeout(function () {
|
||||||
|
if (['adis-ownmissions', 'adis-krankentransporte'].indexOf(window.name) != -1) {
|
||||||
|
console.log("WILL SEND?")
|
||||||
|
ADis_CheckMissionAutomatic();
|
||||||
|
} else if (['adis-verbandmission', 'adis-verbandmission-event'].indexOf(window.name) != -1) {
|
||||||
|
ADis_WorkVerbandMission();
|
||||||
|
}
|
||||||
|
}, 250);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
// - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||||
// -
|
// -
|
||||||
// - Grab Run Verbands Missions
|
// - Grab Run Verbands Missions
|
||||||
@@ -137,7 +167,7 @@ function AD_GetMissionConfiguration(MissionType) {
|
|||||||
}).then((availableMission) => {
|
}).then((availableMission) => {
|
||||||
if (availableMission != undefined && availableMission.jsondata) {
|
if (availableMission != undefined && availableMission.jsondata) {
|
||||||
MissionConfig = availableMission.jsondata;
|
MissionConfig = availableMission.jsondata;
|
||||||
console.log('MissionConfig: ', MissionType.toString(), JSON.stringify(MissionConfig,null,2))
|
console.log('MissionConfig: ', MissionType.toString(), JSON.stringify(MissionConfig, null, 2))
|
||||||
AD_StartAlarmProcess();
|
AD_StartAlarmProcess();
|
||||||
} else {
|
} else {
|
||||||
var updateData = {
|
var updateData = {
|
||||||
|
|||||||
@@ -72,22 +72,10 @@ function ADis_OpenNextKrankentransporte() {
|
|||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
return Wunsch.each((myWunsch) => {
|
return Wunsch.each((myWunsch) => {
|
||||||
let MissionID = myWunsch.missionID;
|
let MissionID = myWunsch.missionID;
|
||||||
myWunsch.last_check = Math.floor(new Date().getTime() / 1000);
|
if ($("#adis-krankentransporte-frame").attr("mission_id") == "empty") {
|
||||||
myWunsch.next_check = Math.floor(new Date().getTime() / 1000) + 300;
|
$("#adis-krankentransporte-frame").attr("src", "https://www.leitstellenspiel.de/missions/" + MissionID);
|
||||||
return ADis_UpdateKrankentransport(myWunsch).then(() => {
|
$("#adis-krankentransporte-frame").attr("mission_id", MissionID);
|
||||||
if ($("#adis-krankentransporte-frame").attr("mission_id") == "empty") {
|
}
|
||||||
$("#adis-krankentransporte-frame").attr("src", "https://www.leitstellenspiel.de/missions/" + MissionID);
|
|
||||||
$("#adis-krankentransporte-frame").attr("mission_id", MissionID);
|
|
||||||
|
|
||||||
KrankentransportFrameWatchDog = setTimeout(async function () {
|
|
||||||
$("#adis-krankentransporte-frame").attr("src", "");
|
|
||||||
$("#adis-krankentransporte-frame").attr("mission_id", "empty");
|
|
||||||
setTimeout(ADis_OpenNextKrankentransporte, 1000);
|
|
||||||
}, 5000);
|
|
||||||
} else {
|
|
||||||
setTimeout(ADis_OpenNextKrankentransporte, 5000);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return setTimeout(ADis_OpenNextKrankentransporte, 5000);
|
return setTimeout(ADis_OpenNextKrankentransporte, 5000);
|
||||||
|
|||||||
@@ -73,18 +73,10 @@ function ADis_OpenNextOwnMissions() {
|
|||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
return Wunsch.each((myWunsch) => {
|
return Wunsch.each((myWunsch) => {
|
||||||
let MissionID = myWunsch.missionID;
|
let MissionID = myWunsch.missionID;
|
||||||
myWunsch.next_check = Math.floor(new Date().getTime() / 1000) + 300;
|
if ($("#adis-ownmissions-frame").attr("mission_id") == "empty") {
|
||||||
|
$("#adis-ownmissions-frame").attr("src", "https://www.leitstellenspiel.de/missions/" + MissionID);
|
||||||
return ADis_UpdateOwnMissions(myWunsch).then(() => {
|
$("#adis-ownmissions-frame").attr("mission_id", MissionID);
|
||||||
if ($("#adis-ownmissions-frame").attr("mission_id") == "empty") {
|
}
|
||||||
$("#adis-ownmissions-frame").attr("src", "https://www.leitstellenspiel.de/missions/" + MissionID);
|
|
||||||
$("#adis-ownmissions-frame").attr("mission_id", MissionID);
|
|
||||||
|
|
||||||
setTimeout(ADis_OpenNextOwnMissions, 5000);
|
|
||||||
} else {
|
|
||||||
setTimeout(ADis_OpenNextOwnMissions, 5000);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return setTimeout(ADis_OpenNextOwnMissions, 5000);
|
return setTimeout(ADis_OpenNextOwnMissions, 5000);
|
||||||
|
|||||||
Reference in New Issue
Block a user