diff --git a/dist/autoloader.js b/dist/autoloader.js index dfed8a3..6d7577f 100755 --- a/dist/autoloader.js +++ b/dist/autoloader.js @@ -1,4 +1,4 @@ -/*Generated on:Tue Nov 27 2018 13:25:02 GMT+0100 (CET)*/ +/*Generated on:Tue Nov 27 2018 13:41: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(); @@ -17132,10 +17132,12 @@ ADisDB.on("ready", () => { window.ADis_MissionDelete = function ADis_MissionDelete(WindowName, MissionID) { if (['adis-krankentransporte'].indexOf(WindowName) !== -1) { ADis_RemoveKrankentransportFromQueue(MissionID); + ADis_OpenNextKrankentransporte(); } else if (['adis-plannedevents'].indexOf(WindowName) !== -1) { ADis_RemovePlannedEventsFromQueue(MissionID); } else if (['adis-ownmissions'].indexOf(WindowName) !== -1) { ADis_RemoveOwnMissionsFromQueue(MissionID); + ADis_OpenNextKrankentransporte(); } else if (['adis-verbandmission'].indexOf(WindowName) !== -1) { ADis_RemoveVerbandMissionsFromQueue(MissionID); } else if (['adis-verbandmission-event'].indexOf(WindowName) !== -1) { @@ -17700,12 +17702,12 @@ ADisDB.on("ready", () => { 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 + console.log("DONE!"); + return tellParent(`setTimeout(function(){console.log('done:${window.name}:${MissionID}');ADis_MissionDelete('${window.name}', '${MissionID}');},500);`); // 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 + return tellParent(`setTimeout(function(){console.log('update:${window.name}:${MissionID}');ADis_MissionUpdateDone('${window.name}', '${MissionID}');},500);`); // update Mission here as updated or full } else { setTimeout(function () { if (['adis-ownmissions', 'adis-krankentransporte'].indexOf(window.name) != -1) { diff --git a/dist/standalone.js b/dist/standalone.js index c77d3c4..03f0ce0 100644 --- a/dist/standalone.js +++ b/dist/standalone.js @@ -1,4 +1,4 @@ -/*Generated on:Tue Nov 27 2018 13:25:02 GMT+0100 (CET)*/ +/*Generated on:Tue Nov 27 2018 13:41:34 GMT+0100 (CET)*/ function includesString(string1, string2) { return string1.toLowerCase().includes(string2.toLowerCase()); } diff --git a/script/mission.js b/script/mission.js index 1f4ef13..b8adb04 100644 --- a/script/mission.js +++ b/script/mission.js @@ -85,10 +85,12 @@ window.ADis_MissionUpdate = function ADis_MissionUpdate(WindowName, UpdateData) window.ADis_MissionDelete = function ADis_MissionDelete(WindowName, MissionID) { if (['adis-krankentransporte'].indexOf(WindowName) !== -1) { ADis_RemoveKrankentransportFromQueue(MissionID); + ADis_OpenNextKrankentransporte(); } else if (['adis-plannedevents'].indexOf(WindowName) !== -1) { ADis_RemovePlannedEventsFromQueue(MissionID); } else if (['adis-ownmissions'].indexOf(WindowName) !== -1) { ADis_RemoveOwnMissionsFromQueue(MissionID); + ADis_OpenNextKrankentransporte(); } else if (['adis-verbandmission'].indexOf(WindowName) !== -1) { ADis_RemoveVerbandMissionsFromQueue(MissionID); } else if (['adis-verbandmission-event'].indexOf(WindowName) !== -1) { diff --git a/script/mission/handler.js b/script/mission/handler.js index e791dc7..d6a1119 100755 --- a/script/mission/handler.js +++ b/script/mission/handler.js @@ -48,12 +48,12 @@ $(document).ready(function () { 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 + console.log("DONE!"); + return tellParent(`setTimeout(function(){console.log('done:${window.name}:${MissionID}');ADis_MissionDelete('${window.name}', '${MissionID}');},500);`); // 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 + return tellParent(`setTimeout(function(){console.log('update:${window.name}:${MissionID}');ADis_MissionUpdateDone('${window.name}', '${MissionID}');},500);`); // update Mission here as updated or full } else { setTimeout(function () { if (['adis-ownmissions', 'adis-krankentransporte'].indexOf(window.name) != -1) {