v2 up share einsätze

This commit is contained in:
2018-12-03 10:58:20 +01:00
parent cf89b1178b
commit 7f146d2c41
6 changed files with 1310 additions and 11 deletions

View File

@@ -1337,18 +1337,33 @@ class AutomaticDispose {
}).then(() => {
if (self.OweSecure) {
if ($('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]:not(:checked)').size() > 0) {
if ($('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]:not(:checked)').length > 0) {
$('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]:not(:checked)')[0].click();
}
}
console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').size(), $('#vehicle_show_table_all input[type="checkbox"]:checked'));
// TODO check cars driving or already there
if (self.MissionConfig.share){
let elem = $('#vehicle_show_table_all tr input[type="checkbox"]:checked')
for (let i = 0; 1 < elem.length; i++) {
if (i === 0) {
continue;
}
elem[i].click();
}
}
console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').length, $('#vehicle_show_table_all input[type="checkbox"]:checked'));
console.log("WILL KLICK SEND")
setTimeout(() => {
self.UpdateMissionsToDone(self.MissionID).then(() => {
tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');},500);`);
window.$('#mission_alarm_btn').click();
if (window.$("a[title='Alarmieren, im Verband freigeben und nächsten Einsatz aufrufen']").length > 0 && self.MissionConfig.share) {
window.$("a[title='Alarmieren, im Verband freigeben und nächsten Einsatz aufrufen']")[0].click();
} else {
window.$('#mission_alarm_btn').click();
}
});
}, 250);