This commit is contained in:
2018-11-24 21:34:13 +01:00
parent 8f747e4215
commit 1c6640bb21
3 changed files with 24 additions and 14 deletions

15
dist/autoloader.js vendored
View File

@@ -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(`
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);
}
})

2
dist/standalone.js vendored
View File

@@ -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());
}

View File

@@ -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(`
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);
}
})