diff --git a/dist/autoloader.js b/dist/autoloader.js index 50dff26..e6da37e 100755 --- a/dist/autoloader.js +++ b/dist/autoloader.js @@ -1,4 +1,4 @@ -/*Generated on:Sat Nov 24 2018 21:15:15 GMT+0100 (CET)*/ +/*Generated on:Sat Nov 24 2018 21:34:12 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(); @@ -17683,21 +17683,24 @@ ADisDB.on("ready", () => { console.log("CurrentTime", CurrentTime); if (MissionType !== null) { 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 } 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(); } - }, 1000); + }, 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 } } - }, 250); + }, 2000); }); // - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- @@ -17835,14 +17838,16 @@ ADisDB.on("ready", () => { last_check: CurrentTime, next_check: CurrentTime + 60 }; - tellParent(` - console.log('ok:${window.name}:${MissionID}'); - ADis_MissionUpdateDone('${window.name}', '${MissionID}'); + tellParent(`setTimeout(function(){ + console.log('ok:${window.name}:${MissionID}'); + ADis_MissionUpdateDone('${window.name}', '${MissionID}'); + },1000); `); console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').size(), $('#vehicle_show_table_all input[type="checkbox"]:checked')); if (['adis-ownmissions', 'adis-krankentransporte', 'adis-verbandmission'].indexOf(window.name) !== -1) { + console.log("WILL KLICK SEND") setTimeout(() => { - $('#mission-form > div.pull-right > div:nth-child(1) > input').click(); + $('#mission_alarm_btn').click(); }, 250); } }) diff --git a/dist/standalone.js b/dist/standalone.js index 52cb40e..15fcfca 100644 --- a/dist/standalone.js +++ b/dist/standalone.js @@ -1,4 +1,4 @@ -/*Generated on:Sat Nov 24 2018 21:15:15 GMT+0100 (CET)*/ +/*Generated on:Sat Nov 24 2018 21:34:12 GMT+0100 (CET)*/ function includesString(string1, string2) { return string1.toLowerCase().includes(string2.toLowerCase()); } diff --git a/script/mission/handler.js b/script/mission/handler.js index 929720c..574670b 100755 --- a/script/mission/handler.js +++ b/script/mission/handler.js @@ -14,21 +14,24 @@ $(document).ready(function () { console.log("CurrentTime", CurrentTime); if (MissionType !== null) { 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 } 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(); } - }, 1000); + }, 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 } } - }, 250); + }, 2000); }); // - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- @@ -166,14 +169,16 @@ function AD_StartAlarmProcess() { last_check: CurrentTime, next_check: CurrentTime + 60 }; - tellParent(` - console.log('ok:${window.name}:${MissionID}'); - ADis_MissionUpdateDone('${window.name}', '${MissionID}'); + tellParent(`setTimeout(function(){ + console.log('ok:${window.name}:${MissionID}'); + ADis_MissionUpdateDone('${window.name}', '${MissionID}'); + },1000); `); console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').size(), $('#vehicle_show_table_all input[type="checkbox"]:checked')); if (['adis-ownmissions', 'adis-krankentransporte', 'adis-verbandmission'].indexOf(window.name) !== -1) { + console.log("WILL KLICK SEND") setTimeout(() => { - $('#mission-form > div.pull-right > div:nth-child(1) > input').click(); + $('#mission_alarm_btn').click(); }, 250); } })