v2 up a9g0a9u094ut98ujoijc

This commit is contained in:
2018-12-17 20:13:23 +01:00
parent b5cbdc236f
commit 59b95b1807
3 changed files with 116 additions and 34 deletions

75
dist/autoloaderV2.js vendored
View File

@@ -1,4 +1,4 @@
/*Generated on:Mon Dec 17 2018 20:07:30 GMT+0100 (CET)*/
/*Generated on:Mon Dec 17 2018 20:13:22 GMT+0100 (CET)*/
/*
* Dexie.js - a minimalistic wrapper for IndexedDB
* ===============================================
@@ -18969,7 +18969,8 @@ class AutomaticDispose {
StartAlarmProcess() {
const self = this;
setTimeout(function () {
const alarming = function alarming(self) {
Promise.resolve().then(async () => {
return await self.PrepareVehicleNeedList();
}).then(async () => {
@@ -19008,28 +19009,68 @@ class AutomaticDispose {
if (i === 0) {
continue;
}
elems[i].click();
$(elems[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(() => {
console.log("Clicked Vehicles:"+self.MissionID+":"+self.MissionConfig.type+" ", $('#vehicle_show_table_all input[type="checkbox"]:checked').length, $('#vehicle_show_table_all input[type="checkbox"]:checked'));
console.table(self.MissionData)
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();
}
//tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},2500);`);
//if (window.$("a.btn.btn-success.btn-sm.alert_notify_alliance").length > 0 && self.MissionConfig.share) {
// window.$('input[type=checkbox]').prop('checked', false);
// await self.WorkVerbandMission(true);
// window.$('#allianceShareText').val('Kein RD, die Patiernten gehören mir! Anonsten kann nach 2h geschlossen werden. Danke für die Aufmerksamkeit!')
// window.$("a.btn.btn-success.btn-sm.alert_notify_alliance").click();
//} else {
if ($('#vehicle_show_table_all input[type="checkbox"]:checked').length){
console.log('send now')
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();
}
tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},500);`);
} else {
tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},500);`);
}
//}
});
}, 250);
})
}, 500);
}
}
setTimeout(function () {
var $div = $("#mission-form > div:nth-child(7) > a");
var isShow = $div.is(':hidden');
//console.log($div, isShow);
if ($div.length && isShow) {
var observer = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) {
if (mutation.attributeName === "style") {
setTimeout(function () {
alarming(self)
}, 750);
}
});
});
observer.observe($div[0], {
attributes: true
});
$div.click();
} else {
setTimeout(function () {
alarming(self)
}, 250);
}
}, 150);
}
// - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
// -