From b12b4c21e1b441f5cedd359c86418f86a006c66e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Fr=C3=B6hle?= Date: Mon, 3 Dec 2018 14:23:57 +0100 Subject: [PATCH] v2 up 9ugoisgjicpl --- dist/autoloader.js | 2 +- dist/autoloaderV2.js | 43 +++++++++++++------------------------------ src/autoloaderV2.js | 41 ++++++++++++----------------------------- 3 files changed, 26 insertions(+), 60 deletions(-) diff --git a/dist/autoloader.js b/dist/autoloader.js index 7bafd96..acc3285 100755 --- a/dist/autoloader.js +++ b/dist/autoloader.js @@ -1,4 +1,4 @@ -/*Generated on:Mon Dec 03 2018 14:00:09 GMT+0100 (CET)*/ +/*Generated on:Mon Dec 03 2018 14:23:57 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(); diff --git a/dist/autoloaderV2.js b/dist/autoloaderV2.js index 95af069..2b77929 100644 --- a/dist/autoloaderV2.js +++ b/dist/autoloaderV2.js @@ -1,4 +1,4 @@ -/*Generated on:Mon Dec 03 2018 14:00:09 GMT+0100 (CET)*/ +/*Generated on:Mon Dec 03 2018 14:23:57 GMT+0100 (CET)*/ /* * Dexie.js - a minimalistic wrapper for IndexedDB * =============================================== @@ -17831,7 +17831,6 @@ class AutomaticDispose { this.Collect_Jails(); } else { let MissionID = document.location.pathname.substr(document.location.pathname.lastIndexOf("/") + 1); - console.log('Check_Call_Police_Active', MissionID) this.RemovePoliceSprechwunschFromQueue(MissionID).then((deleteCount) => { $("#adis-sprechwunsch-police-frame").attr("src", ""); $("#adis-sprechwunsch-police-frame").attr("mission_id", "empty"); @@ -18709,21 +18708,20 @@ class AutomaticDispose { } else { self.MissionType = null; } - console.log("MissionID", self.MissionID); - console.log("MissionType", self.MissionType); - console.log("Window", window.name); - console.log("self.MyRunner", self.MyRunner); - console.log("self.MyRunnerSettings", self.MyRunnerSettings); + // console.log("MissionID", self.MissionID); + // console.log("MissionType", self.MissionType); + // console.log("Window", window.name); + // console.log("self.MyRunner", self.MyRunner); + // console.log("self.MyRunnerSettings", self.MyRunnerSettings); return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions], () => { self.ADSettings().then((setting) => { if (setting[self.MyRunnerSettings] === 'true') { - let where = { missionID: self.MissionID, runner: self.MyRunner, done: 'false' } - console.log(where); + // console.log(where); return self.ADisDB.ADisMissions.where(where).and(function (item) { return item.next_check <= Math.floor(new Date().getTime() / 1000) }).limit(1) @@ -18755,14 +18753,12 @@ class AutomaticDispose { MainHandler() { const self = this; if (self.includesString($('#iframe-inside-container > div.missionNotFound > div.missionNotFoundText').text(), 'Der Einsatz wurde erfolgreich abgeschlossen.')) { - console.log("DONE!"); console.log("DONE: " + self.MissionID); return self.RemoveMissionsFromQueue(self.MissionID).then(() => { return tellParent(`console.log('handler:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // delete Mission here as completed }) } if (self.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"); console.log("SEND: " + self.MissionID); return self.UpdateMissionsToDone(self.MissionID).then(() => { return tellParent(`console.log('handler:2000:update:${window.name}:${self.MissionID}');`); // update Mission here as updated or full @@ -18770,7 +18766,6 @@ class AutomaticDispose { } else { setTimeout(function () { if (['adis-ownmissions', 'adis-plannedeventss', 'adis-krankentransporte'].indexOf(window.name) != -1) { - console.log("WILL SEND?") self.CheckMissionAutomatic(); } else if (['adis-verbandmission', 'adis-verbandmission-event'].indexOf(window.name) != -1) { self.WorkVerbandMission(); @@ -18888,7 +18883,7 @@ class AutomaticDispose { }).then((availableMission) => { if (availableMission != undefined && availableMission.jsondata) { self.MissionConfig = availableMission.jsondata; - console.log('MissionConfig: ', MissionType.toString(), JSON.stringify(self.MissionConfig, null, 2)) + // console.log('MissionConfig: ', MissionType.toString(), JSON.stringify(self.MissionConfig, null, 2)) self.StartAlarmProcess(); } else { var updateData = { @@ -18906,50 +18901,40 @@ class AutomaticDispose { StartAlarmProcess() { const self = this; setTimeout(function () { - console.log('StartAlarmProcess') Promise.resolve().then(async () => { - console.log('PrepareVehicleNeedList') return await self.PrepareVehicleNeedList(); }).then(async () => { - console.log('CollectInvolvedVehicles') return await self.CollectInvolvedVehicles(); }).then(async () => { - console.log('CollectPatients') return await self.CollectPatients(); }) .then(async () => { - console.log('ProcessEmergencyMedicalService') return await self.ProcessEmergencyMedicalService() }) .then(async () => { - console.log('ProcessFireDepartment') return await self.ProcessFireDepartment() }) .then(async () => { - console.log('ProcessPoliceDepartment') return await self.ProcessPoliceDepartment() }) .then(async () => { - console.log('ProcessTechnicalEmergencyService') return await self.ProcessTechnicalEmergencyService() }) .then(async () => { - console.log('ProcessWaterRescue') return await self.ProcessWaterRescue() }).then(() => { - console.log('OweSecure?') if (self.OweSecure) { 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('MissionConfig.share?') + // TODO check cars driving or already there if (self.MissionConfig.share){ - console.log('self.MissionConfig.share',self.MissionConfig.share) + // console.log('self.MissionConfig.share',self.MissionConfig.share) const elems = $('#vehicle_show_table_all tr input[type="checkbox"]:checked') - console.log('elems', elems) + // console.log('elems', elems) for (let i = 0; i < elems.length; i++) { if (i === 0) { continue; @@ -18958,10 +18943,8 @@ class AutomaticDispose { } } - console.log('MissionConfig.share - after') - - 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") + // 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);`); diff --git a/src/autoloaderV2.js b/src/autoloaderV2.js index 549ef23..1bdd912 100644 --- a/src/autoloaderV2.js +++ b/src/autoloaderV2.js @@ -473,7 +473,6 @@ class AutomaticDispose { this.Collect_Jails(); } else { let MissionID = document.location.pathname.substr(document.location.pathname.lastIndexOf("/") + 1); - console.log('Check_Call_Police_Active', MissionID) this.RemovePoliceSprechwunschFromQueue(MissionID).then((deleteCount) => { $("#adis-sprechwunsch-police-frame").attr("src", ""); $("#adis-sprechwunsch-police-frame").attr("mission_id", "empty"); @@ -1117,21 +1116,20 @@ class AutomaticDispose { } else { self.MissionType = null; } - console.log("MissionID", self.MissionID); - console.log("MissionType", self.MissionType); - console.log("Window", window.name); - console.log("self.MyRunner", self.MyRunner); - console.log("self.MyRunnerSettings", self.MyRunnerSettings); + // console.log("MissionID", self.MissionID); + // console.log("MissionType", self.MissionType); + // console.log("Window", window.name); + // console.log("self.MyRunner", self.MyRunner); + // console.log("self.MyRunnerSettings", self.MyRunnerSettings); return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions], () => { self.ADSettings().then((setting) => { if (setting[self.MyRunnerSettings] === 'true') { - let where = { missionID: self.MissionID, runner: self.MyRunner, done: 'false' } - console.log(where); + // console.log(where); return self.ADisDB.ADisMissions.where(where).and(function (item) { return item.next_check <= Math.floor(new Date().getTime() / 1000) }).limit(1) @@ -1163,14 +1161,12 @@ class AutomaticDispose { MainHandler() { const self = this; if (self.includesString($('#iframe-inside-container > div.missionNotFound > div.missionNotFoundText').text(), 'Der Einsatz wurde erfolgreich abgeschlossen.')) { - console.log("DONE!"); console.log("DONE: " + self.MissionID); return self.RemoveMissionsFromQueue(self.MissionID).then(() => { return tellParent(`console.log('handler:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // delete Mission here as completed }) } if (self.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"); console.log("SEND: " + self.MissionID); return self.UpdateMissionsToDone(self.MissionID).then(() => { return tellParent(`console.log('handler:2000:update:${window.name}:${self.MissionID}');`); // update Mission here as updated or full @@ -1178,7 +1174,6 @@ class AutomaticDispose { } else { setTimeout(function () { if (['adis-ownmissions', 'adis-plannedeventss', 'adis-krankentransporte'].indexOf(window.name) != -1) { - console.log("WILL SEND?") self.CheckMissionAutomatic(); } else if (['adis-verbandmission', 'adis-verbandmission-event'].indexOf(window.name) != -1) { self.WorkVerbandMission(); @@ -1296,7 +1291,7 @@ class AutomaticDispose { }).then((availableMission) => { if (availableMission != undefined && availableMission.jsondata) { self.MissionConfig = availableMission.jsondata; - console.log('MissionConfig: ', MissionType.toString(), JSON.stringify(self.MissionConfig, null, 2)) + // console.log('MissionConfig: ', MissionType.toString(), JSON.stringify(self.MissionConfig, null, 2)) self.StartAlarmProcess(); } else { var updateData = { @@ -1314,50 +1309,40 @@ class AutomaticDispose { StartAlarmProcess() { const self = this; setTimeout(function () { - console.log('StartAlarmProcess') Promise.resolve().then(async () => { - console.log('PrepareVehicleNeedList') return await self.PrepareVehicleNeedList(); }).then(async () => { - console.log('CollectInvolvedVehicles') return await self.CollectInvolvedVehicles(); }).then(async () => { - console.log('CollectPatients') return await self.CollectPatients(); }) .then(async () => { - console.log('ProcessEmergencyMedicalService') return await self.ProcessEmergencyMedicalService() }) .then(async () => { - console.log('ProcessFireDepartment') return await self.ProcessFireDepartment() }) .then(async () => { - console.log('ProcessPoliceDepartment') return await self.ProcessPoliceDepartment() }) .then(async () => { - console.log('ProcessTechnicalEmergencyService') return await self.ProcessTechnicalEmergencyService() }) .then(async () => { - console.log('ProcessWaterRescue') return await self.ProcessWaterRescue() }).then(() => { - console.log('OweSecure?') if (self.OweSecure) { 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('MissionConfig.share?') + // TODO check cars driving or already there if (self.MissionConfig.share){ - console.log('self.MissionConfig.share',self.MissionConfig.share) + // console.log('self.MissionConfig.share',self.MissionConfig.share) const elems = $('#vehicle_show_table_all tr input[type="checkbox"]:checked') - console.log('elems', elems) + // console.log('elems', elems) for (let i = 0; i < elems.length; i++) { if (i === 0) { continue; @@ -1366,10 +1351,8 @@ class AutomaticDispose { } } - console.log('MissionConfig.share - after') - - 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") + // 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);`);