v2 up handler 20iavij

This commit is contained in:
2018-12-02 10:21:23 +01:00
parent 49249b8314
commit 34f9d3bd94
3 changed files with 10 additions and 14 deletions

View File

@@ -1124,8 +1124,6 @@ class AutomaticDispose {
missionID: self.MissionID,
runner: self.MyRunner,
done: 'false'
}).and(function (item) {
return item.next_check <= Math.floor(new Date().getTime() / 1000)
}).limit(1)
}
}).then((Wunsch) => {
@@ -1137,12 +1135,12 @@ class AutomaticDispose {
});
} else {
self.RemoveMissionsFromQueue(self.MissionID)
return tellParent(`console.log('done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
return tellParent(`console.log('wunsch:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
}
});
} else {
self.RemoveMissionsFromQueue(self.MissionID)
return tellParent(`console.log('done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
return tellParent(`console.log('wunsch:2000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
}
})
}, 1500);
@@ -1154,12 +1152,12 @@ class AutomaticDispose {
if (includesString($('#iframe-inside-container > div.missionNotFound > div.missionNotFoundText').text(), 'Der Einsatz wurde erfolgreich abgeschlossen.')) {
console.log("DONE!");
self.RemoveMissionsFromQueue(self.MissionID)
return tellParent(`console.log('done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // delete Mission here as completed
return tellParent(`console.log('handler:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // 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");
self.UpdateMissionsToDone(self.MissionID);
return tellParent(`console.log('update:${window.name}:${self.MissionID}');`); // update Mission here as updated or full
return tellParent(`console.log('handler:2000:update:${window.name}:${self.MissionID}');`); // update Mission here as updated or full
} else {
setTimeout(function () {
if (['adis-ownmissions', 'adis-krankentransporte'].indexOf(window.name) != -1) {