v2 up ia90afi09

This commit is contained in:
2018-12-03 21:55:31 +01:00
parent 537f48db96
commit bb0db92ef9
3 changed files with 22 additions and 12 deletions

View File

@@ -1186,12 +1186,15 @@ class AutomaticDispose {
// -
// - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
WorkVerbandMission() {
WorkVerbandMission(myself) {
if (typeof myself === 'undefined') {
myself=false
}
const self = this;
self.ADSettings().then((setting) => {
return self.ADSettings().then((setting) => {
var title = document.getElementById('missionH1');
var isVerband = title.innerText.toLowerCase().includes("[verband]");
if (setting['Alliance-Automatic'] == 'true' && isVerband) {
if ((setting['Alliance-Automatic'] == 'true' && isVerband) || myself) {
if ([52, 55, 129, 203].indexOf(self.MissionType) !== -1 && $('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]').size() > 0) {
$('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]')[0].click();
} else if ([53, 130, 202].indexOf(self.MissionType) !== -1) {
@@ -1230,7 +1233,7 @@ class AutomaticDispose {
}
}
// Todo add alternative cars, please no LF because of Mülltonne....
if ($('#vehicle_show_table_all input[type="checkbox"]:checked').size() > 0) {
if ($('#vehicle_show_table_all input[type="checkbox"]:checked').size() > 0 && myself == false) {
$('#mission_alarm_btn').click();
}
}
@@ -1352,9 +1355,11 @@ class AutomaticDispose {
// 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(() => {
self.UpdateMissionsToDone(self.MissionID).then( async () => {
tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');},500);`);
if (window.$("a[title='Alarmieren, im Verband freigeben und nächsten Einsatz aufrufen']").length > 0 && self.MissionConfig.share) {
window.$('input[type=checkbox]').prop('checked',false);
await self.WorkVerbandMission(true);
window.$("a[title='Alarmieren, im Verband freigeben und nächsten Einsatz aufrufen']")[0].click();
} else {
window.$('#mission_alarm_btn').click();