v2 uagf98oi

This commit is contained in:
2018-12-19 16:12:05 +01:00
parent 72d3566254
commit 16838dae86
3 changed files with 26 additions and 20 deletions

View File

@@ -1246,6 +1246,9 @@ class AutomaticDispose {
WorkVerbandMission() {
const self = this;
const runnerID = self.ADisSettings.runner_iframesName.indexOf(window.name);
self.MyRunner = self.ADisSettings.runner[runnerID];
self.MyRunnerSettings = self.ADisSettings.runner_settings[runnerID];
self.ADSettings().then((setting) => {
var title = document.getElementById('missionH1');
var isVerband = title.innerText.toLowerCase().includes("[verband]");
@@ -1303,15 +1306,13 @@ class AutomaticDispose {
CheckMissionAutomatic() {
const self = this;
var setOpt;
if (window.name == 'adis-ownmissions' || window.name == 'adis-plannedevents') {
setOpt = 'MissionsOwn-Automatic';
} else if (window.name == 'adis-krankentransporte') {
setOpt = 'Krankentransport-Automatic';
}
if (setOpt && self.MyRunner) {
self.ADSettings().then((setting) => {
if (setting[setOpt] == 'true') {
const runnerID = self.ADisSettings.runner_iframesName.indexOf(window.name);
self.MyRunner = self.ADisSettings.runner[runnerID];
self.MyRunnerSettings = self.ADisSettings.runner_settings[runnerID];
if (self.MyRunnerSettings && self.MyRunner) {
self.ADSettings().then((setting) => {
if (setting[self.MyRunnerSettings] === 'true') {
let where = {
missionID: self.MissionID,
runner: self.MyRunner,
@@ -1336,6 +1337,8 @@ class AutomaticDispose {
tellParent(`console.log('config:1000:update:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // update Mission here as updated or full
}
});
} else {
tellParent(`console.log('config:2000:update:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // update Mission here as updated or full
}
}