v2 update
This commit is contained in:
Vendored
+2
@@ -0,0 +1,2 @@
|
|||||||
|
{
|
||||||
|
}
|
||||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
/*Generated on:Wed Nov 28 2018 19:29:19 GMT+0100 (CET)*/
|
/*Generated on:Wed Nov 28 2018 20:04:00 GMT+0100 (CET)*/
|
||||||
var AutomaticDispose_Branch = "master";
|
var AutomaticDispose_Branch = "master";
|
||||||
var AutomaticDispose_URL = "https://jf.git.rest/Jomaar/automatic-dispose/raw/branch/";
|
var AutomaticDispose_URL = "https://jf.git.rest/Jomaar/automatic-dispose/raw/branch/";
|
||||||
var da_lss_adis_time = new Date().getTime();
|
var da_lss_adis_time = new Date().getTime();
|
||||||
|
|||||||
Vendored
+62
-71
@@ -1,4 +1,4 @@
|
|||||||
/*Generated on:Wed Nov 28 2018 19:29:19 GMT+0100 (CET)*/
|
/*Generated on:Wed Nov 28 2018 20:04:00 GMT+0100 (CET)*/
|
||||||
/*
|
/*
|
||||||
* Dexie.js - a minimalistic wrapper for IndexedDB
|
* Dexie.js - a minimalistic wrapper for IndexedDB
|
||||||
* ===============================================
|
* ===============================================
|
||||||
@@ -4556,23 +4556,23 @@ class AutomaticDispose {
|
|||||||
ADisMissionsVerbandEvent: "++missionID,type,name,last_check,next_check,available,done",
|
ADisMissionsVerbandEvent: "++missionID,type,name,last_check,next_check,available,done",
|
||||||
});
|
});
|
||||||
this.ADisDB.on("populate", function () {
|
this.ADisDB.on("populate", function () {
|
||||||
ADisDB.ADisSettings.add({
|
that.ADisDB.ADisSettings.add({
|
||||||
name: "Krankentransport-Automatic",
|
name: "Krankentransport-Automatic",
|
||||||
value: 'true'
|
value: 'true'
|
||||||
});
|
});
|
||||||
ADisDB.ADisSettings.add({
|
that.ADisDB.ADisSettings.add({
|
||||||
name: "Sprechwunsch-Automatic",
|
name: "Sprechwunsch-Automatic",
|
||||||
value: 'true'
|
value: 'true'
|
||||||
});
|
});
|
||||||
ADisDB.ADisSettings.add({
|
that.ADisDB.ADisSettings.add({
|
||||||
name: "MissionsOwn-Automatic",
|
name: "MissionsOwn-Automatic",
|
||||||
value: 'true'
|
value: 'true'
|
||||||
});
|
});
|
||||||
ADisDB.ADisSettings.add({
|
that.ADisDB.ADisSettings.add({
|
||||||
name: "Alliance-Automatic",
|
name: "Alliance-Automatic",
|
||||||
value: 'false'
|
value: 'false'
|
||||||
});
|
});
|
||||||
ADisDB.ADisSettings.add({
|
that.ADisDB.ADisSettings.add({
|
||||||
name: "AllianceEvent-Automatic",
|
name: "AllianceEvent-Automatic",
|
||||||
value: 'false'
|
value: 'false'
|
||||||
});
|
});
|
||||||
@@ -7090,6 +7090,7 @@ class AutomaticDispose {
|
|||||||
// - Index Page Loader
|
// - Index Page Loader
|
||||||
// -
|
// -
|
||||||
IndexPage() {
|
IndexPage() {
|
||||||
|
let that = this;
|
||||||
// -
|
// -
|
||||||
// - Google Font
|
// - Google Font
|
||||||
// -
|
// -
|
||||||
@@ -7298,14 +7299,11 @@ class AutomaticDispose {
|
|||||||
box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.32);
|
box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.32);
|
||||||
transition: all 200ms;
|
transition: all 200ms;
|
||||||
}
|
}
|
||||||
</style>
|
</style>`)
|
||||||
|
$("#adis-dashboard").css({
|
||||||
<script>
|
display: "none",
|
||||||
//
|
opacity: "0"
|
||||||
// Setting-Events
|
});
|
||||||
//
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Click Events
|
// Click Events
|
||||||
@@ -7314,54 +7312,54 @@ class AutomaticDispose {
|
|||||||
$("#adis-setting-krankentransport-automatic").click(function () {
|
$("#adis-setting-krankentransport-automatic").click(function () {
|
||||||
var tf = $(this).hasClass("active");
|
var tf = $(this).hasClass("active");
|
||||||
console.log(tf);
|
console.log(tf);
|
||||||
ADisDB.ADisSettings.put({
|
that.ADisDB.ADisSettings.put({
|
||||||
name: "Krankentransport-Automatic",
|
name: "Krankentransport-Automatic",
|
||||||
value: !tf ? 'true' : 'false'
|
value: !tf ? 'true' : 'false'
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
ADis_UpdateSettings();
|
that.UIUpdateSettings();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#adis-setting-full-automatic").click(function () {
|
$("#adis-setting-full-automatic").click(function () {
|
||||||
var tf = $(this).hasClass("active");
|
var tf = $(this).hasClass("active");
|
||||||
console.log(tf);
|
console.log(tf);
|
||||||
ADisDB.ADisSettings.put({
|
that.ADisDB.ADisSettings.put({
|
||||||
name: "MissionsOwn-Automatic",
|
name: "MissionsOwn-Automatic",
|
||||||
value: !tf ? 'true' : 'false'
|
value: !tf ? 'true' : 'false'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
ADis_UpdateSettings();
|
that.UIUpdateSettings();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#adis-setting-sprechwunsch-automatic").click(function () {
|
$("#adis-setting-sprechwunsch-automatic").click(function () {
|
||||||
var tf = $(this).hasClass("active");
|
var tf = $(this).hasClass("active");
|
||||||
console.log(tf);
|
console.log(tf);
|
||||||
ADisDB.ADisSettings.put({
|
that.ADisDB.ADisSettings.put({
|
||||||
name: "Sprechwunsch-Automatic",
|
name: "Sprechwunsch-Automatic",
|
||||||
value: !tf ? 'true' : 'false'
|
value: !tf ? 'true' : 'false'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
ADis_UpdateSettings();
|
that.UIUpdateSettings();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#adis-setting-alliance-automatic").click(function () {
|
$("#adis-setting-alliance-automatic").click(function () {
|
||||||
var tf = $(this).hasClass("active");
|
var tf = $(this).hasClass("active");
|
||||||
ADisDB.ADisSettings.put({
|
that.ADisDB.ADisSettings.put({
|
||||||
name: "Alliance-Automatic",
|
name: "Alliance-Automatic",
|
||||||
value: !tf ? 'true' : 'false'
|
value: !tf ? 'true' : 'false'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
ADis_UpdateSettings();
|
that.UIUpdateSettings();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#adis-setting-alliance-automatic").click(function () {
|
$("#adis-setting-alliance-automatic").click(function () {
|
||||||
var tf = $(this).hasClass("active");
|
var tf = $(this).hasClass("active");
|
||||||
ADisDB.ADisSettings.put({
|
that.ADisDB.ADisSettings.put({
|
||||||
name: "AllianceEvent-Automatic",
|
name: "AllianceEvent-Automatic",
|
||||||
value: !tf ? 'true' : 'false'
|
value: !tf ? 'true' : 'false'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
ADis_UpdateSettings();
|
that.UIUpdateSettings();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -7384,53 +7382,7 @@ class AutomaticDispose {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// initial call to load the current setting state
|
// initial call to load the current setting state
|
||||||
ADis_UpdateSettings();
|
that.UIUpdateSettings();
|
||||||
});
|
|
||||||
|
|
||||||
//
|
|
||||||
// Display Settings
|
|
||||||
//
|
|
||||||
|
|
||||||
function ADis_UpdateSettings() {
|
|
||||||
ADisDB.ADisSettings.each((setting) => {
|
|
||||||
if (setting.name == "Krankentransport-Automatic") {
|
|
||||||
if (setting.value == "true") {
|
|
||||||
$("#adis-setting-krankentransport-automatic").addClass("active");
|
|
||||||
} else {
|
|
||||||
$("#adis-setting-krankentransport-automatic").removeClass("active");
|
|
||||||
}
|
|
||||||
} else if (setting.name == "Sprechwunsch-Automatic") {
|
|
||||||
if (setting.value == "true") {
|
|
||||||
$("#adis-setting-sprechwunsch-automatic").addClass("active");
|
|
||||||
} else {
|
|
||||||
$("#adis-setting-sprechwunsch-automatic").removeClass("active");
|
|
||||||
}
|
|
||||||
} else if (setting.name == "MissionsOwn-Automatic") {
|
|
||||||
if (setting.value == "true") {
|
|
||||||
$("#adis-setting-full-automatic").addClass("active");
|
|
||||||
} else {
|
|
||||||
$("#adis-setting-full-automatic").removeClass("active");
|
|
||||||
}
|
|
||||||
} else if (setting.name == "Alliance-Automatic") {
|
|
||||||
if (setting.value == "true") {
|
|
||||||
$("#adis-setting-alliance-automatic").addClass("active");
|
|
||||||
} else {
|
|
||||||
$("#adis-setting-alliance-automatic").removeClass("active");
|
|
||||||
}
|
|
||||||
} else if (setting.name == "AllianceEvents-Automatic") {
|
|
||||||
if (setting.value == "true") {
|
|
||||||
$("#adis-setting-allianceevents-automatic").addClass("active");
|
|
||||||
} else {
|
|
||||||
$("#adis-setting-allianceevents-automatic").removeClass("active");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>`)
|
|
||||||
$("#adis-dashboard").css({
|
|
||||||
display: "none",
|
|
||||||
opacity: "0"
|
|
||||||
});
|
|
||||||
|
|
||||||
// Create Iframes
|
// Create Iframes
|
||||||
$("body").append('<div id="adis-frame-container"></div>');
|
$("body").append('<div id="adis-frame-container"></div>');
|
||||||
@@ -7495,6 +7447,45 @@ class AutomaticDispose {
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
// Display Settings
|
||||||
|
//
|
||||||
|
|
||||||
|
UIUpdateSettings() {
|
||||||
|
this.ADisDB.ADisSettings.each((setting) => {
|
||||||
|
if (setting.name == "Krankentransport-Automatic") {
|
||||||
|
if (setting.value == "true") {
|
||||||
|
$("#adis-setting-krankentransport-automatic").addClass("active");
|
||||||
|
} else {
|
||||||
|
$("#adis-setting-krankentransport-automatic").removeClass("active");
|
||||||
|
}
|
||||||
|
} else if (setting.name == "Sprechwunsch-Automatic") {
|
||||||
|
if (setting.value == "true") {
|
||||||
|
$("#adis-setting-sprechwunsch-automatic").addClass("active");
|
||||||
|
} else {
|
||||||
|
$("#adis-setting-sprechwunsch-automatic").removeClass("active");
|
||||||
|
}
|
||||||
|
} else if (setting.name == "MissionsOwn-Automatic") {
|
||||||
|
if (setting.value == "true") {
|
||||||
|
$("#adis-setting-full-automatic").addClass("active");
|
||||||
|
} else {
|
||||||
|
$("#adis-setting-full-automatic").removeClass("active");
|
||||||
|
}
|
||||||
|
} else if (setting.name == "Alliance-Automatic") {
|
||||||
|
if (setting.value == "true") {
|
||||||
|
$("#adis-setting-alliance-automatic").addClass("active");
|
||||||
|
} else {
|
||||||
|
$("#adis-setting-alliance-automatic").removeClass("active");
|
||||||
|
}
|
||||||
|
} else if (setting.name == "AllianceEvents-Automatic") {
|
||||||
|
if (setting.value == "true") {
|
||||||
|
$("#adis-setting-allianceevents-automatic").addClass("active");
|
||||||
|
} else {
|
||||||
|
$("#adis-setting-allianceevents-automatic").removeClass("active");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+7
-3
@@ -13,13 +13,17 @@ var gulp = require("gulp"),
|
|||||||
|
|
||||||
gulp.task("scripts3", function () {
|
gulp.task("scripts3", function () {
|
||||||
console.log("-- gulp is running task 'scripts'");
|
console.log("-- gulp is running task 'scripts'");
|
||||||
var config = fs.readFileSync('./all_missions.json', );
|
var config = fs.readFileSync('./all_missions.json');
|
||||||
|
var iframes = fs.readFileSync('./html/iframes.html');
|
||||||
|
var navbar = fs.readFileSync('./html/navbar.html');
|
||||||
gulp.src("src/autoloaderV2.js")
|
gulp.src("src/autoloaderV2.js")
|
||||||
.pipe(include())
|
.pipe(include())
|
||||||
.on('error', console.log)
|
.on('error', console.log)
|
||||||
.pipe(replace({
|
.pipe(replace({
|
||||||
global:{
|
global:{
|
||||||
ADis_AllMissions:config.toString()
|
ADis_AllMissions: config.toString(),
|
||||||
|
ADis_Iframes: iframes.toString(),
|
||||||
|
ADis_Navbar: navbar.toString()
|
||||||
},
|
},
|
||||||
prefix:"/***",
|
prefix:"/***",
|
||||||
suffix:"***/0"
|
suffix:"***/0"
|
||||||
@@ -36,7 +40,7 @@ var gulp = require("gulp"),
|
|||||||
.on('error', console.log)
|
.on('error', console.log)
|
||||||
.pipe(replace({
|
.pipe(replace({
|
||||||
global:{
|
global:{
|
||||||
ADis_AllMissions:config.toString()
|
ADis_AllMissions: config.toString()
|
||||||
},
|
},
|
||||||
prefix:"/***",
|
prefix:"/***",
|
||||||
suffix:"***/0"
|
suffix:"***/0"
|
||||||
|
|||||||
@@ -179,131 +179,3 @@
|
|||||||
transition: all 200ms;
|
transition: all 200ms;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
|
||||||
//
|
|
||||||
// Setting-Events
|
|
||||||
//
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
|
|
||||||
//
|
|
||||||
// Click Events
|
|
||||||
//
|
|
||||||
|
|
||||||
$("#adis-setting-krankentransport-automatic").click(function () {
|
|
||||||
var tf = $(this).hasClass("active");
|
|
||||||
console.log(tf);
|
|
||||||
ADisDB.ADisSettings.put({
|
|
||||||
name: "Krankentransport-Automatic",
|
|
||||||
value: !tf ? 'true' : 'false'
|
|
||||||
}).then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
ADis_UpdateSettings();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#adis-setting-full-automatic").click(function () {
|
|
||||||
var tf = $(this).hasClass("active");
|
|
||||||
console.log(tf);
|
|
||||||
ADisDB.ADisSettings.put({
|
|
||||||
name: "MissionsOwn-Automatic",
|
|
||||||
value: !tf ? 'true' : 'false'
|
|
||||||
}).then(() => {
|
|
||||||
ADis_UpdateSettings();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#adis-setting-sprechwunsch-automatic").click(function () {
|
|
||||||
var tf = $(this).hasClass("active");
|
|
||||||
console.log(tf);
|
|
||||||
ADisDB.ADisSettings.put({
|
|
||||||
name: "Sprechwunsch-Automatic",
|
|
||||||
value: !tf ? 'true' : 'false'
|
|
||||||
}).then(() => {
|
|
||||||
ADis_UpdateSettings();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#adis-setting-alliance-automatic").click(function () {
|
|
||||||
var tf = $(this).hasClass("active");
|
|
||||||
ADisDB.ADisSettings.put({
|
|
||||||
name: "Alliance-Automatic",
|
|
||||||
value: !tf ? 'true' : 'false'
|
|
||||||
}).then(() => {
|
|
||||||
ADis_UpdateSettings();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#adis-setting-alliance-automatic").click(function () {
|
|
||||||
var tf = $(this).hasClass("active");
|
|
||||||
ADisDB.ADisSettings.put({
|
|
||||||
name: "AllianceEvent-Automatic",
|
|
||||||
value: !tf ? 'true' : 'false'
|
|
||||||
}).then(() => {
|
|
||||||
ADis_UpdateSettings();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
//
|
|
||||||
// Dashboard Functions
|
|
||||||
//
|
|
||||||
|
|
||||||
$("#adis-open-button").click(function () {
|
|
||||||
$("#adis-dashboard").css("display", "flex");
|
|
||||||
$("#adis-dashboard").animate({
|
|
||||||
opacity: 1
|
|
||||||
}, 200);
|
|
||||||
});
|
|
||||||
$("#adis-dashboard-close-button").click(function () {
|
|
||||||
$("#adis-dashboard").animate({
|
|
||||||
opacity: 0
|
|
||||||
}, 200, function () {
|
|
||||||
$(this).css("display", "none");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// initial call to load the current setting state
|
|
||||||
ADis_UpdateSettings();
|
|
||||||
});
|
|
||||||
|
|
||||||
//
|
|
||||||
// Display Settings
|
|
||||||
//
|
|
||||||
|
|
||||||
function ADis_UpdateSettings() {
|
|
||||||
ADisDB.ADisSettings.each((setting) => {
|
|
||||||
if (setting.name == "Krankentransport-Automatic") {
|
|
||||||
if (setting.value == "true") {
|
|
||||||
$("#adis-setting-krankentransport-automatic").addClass("active");
|
|
||||||
} else {
|
|
||||||
$("#adis-setting-krankentransport-automatic").removeClass("active");
|
|
||||||
}
|
|
||||||
} else if (setting.name == "Sprechwunsch-Automatic") {
|
|
||||||
if (setting.value == "true") {
|
|
||||||
$("#adis-setting-sprechwunsch-automatic").addClass("active");
|
|
||||||
} else {
|
|
||||||
$("#adis-setting-sprechwunsch-automatic").removeClass("active");
|
|
||||||
}
|
|
||||||
} else if (setting.name == "MissionsOwn-Automatic") {
|
|
||||||
if (setting.value == "true") {
|
|
||||||
$("#adis-setting-full-automatic").addClass("active");
|
|
||||||
} else {
|
|
||||||
$("#adis-setting-full-automatic").removeClass("active");
|
|
||||||
}
|
|
||||||
} else if (setting.name == "Alliance-Automatic") {
|
|
||||||
if (setting.value == "true") {
|
|
||||||
$("#adis-setting-alliance-automatic").addClass("active");
|
|
||||||
} else {
|
|
||||||
$("#adis-setting-alliance-automatic").removeClass("active");
|
|
||||||
}
|
|
||||||
} else if (setting.name == "AllianceEvents-Automatic") {
|
|
||||||
if (setting.value == "true") {
|
|
||||||
$("#adis-setting-allianceevents-automatic").addClass("active");
|
|
||||||
} else {
|
|
||||||
$("#adis-setting-allianceevents-automatic").removeClass("active");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
+33
-276
@@ -81,23 +81,23 @@ class AutomaticDispose {
|
|||||||
ADisMissionsVerbandEvent: "++missionID,type,name,last_check,next_check,available,done",
|
ADisMissionsVerbandEvent: "++missionID,type,name,last_check,next_check,available,done",
|
||||||
});
|
});
|
||||||
this.ADisDB.on("populate", function () {
|
this.ADisDB.on("populate", function () {
|
||||||
ADisDB.ADisSettings.add({
|
that.ADisDB.ADisSettings.add({
|
||||||
name: "Krankentransport-Automatic",
|
name: "Krankentransport-Automatic",
|
||||||
value: 'true'
|
value: 'true'
|
||||||
});
|
});
|
||||||
ADisDB.ADisSettings.add({
|
that.ADisDB.ADisSettings.add({
|
||||||
name: "Sprechwunsch-Automatic",
|
name: "Sprechwunsch-Automatic",
|
||||||
value: 'true'
|
value: 'true'
|
||||||
});
|
});
|
||||||
ADisDB.ADisSettings.add({
|
that.ADisDB.ADisSettings.add({
|
||||||
name: "MissionsOwn-Automatic",
|
name: "MissionsOwn-Automatic",
|
||||||
value: 'true'
|
value: 'true'
|
||||||
});
|
});
|
||||||
ADisDB.ADisSettings.add({
|
that.ADisDB.ADisSettings.add({
|
||||||
name: "Alliance-Automatic",
|
name: "Alliance-Automatic",
|
||||||
value: 'false'
|
value: 'false'
|
||||||
});
|
});
|
||||||
ADisDB.ADisSettings.add({
|
that.ADisDB.ADisSettings.add({
|
||||||
name: "AllianceEvent-Automatic",
|
name: "AllianceEvent-Automatic",
|
||||||
value: 'false'
|
value: 'false'
|
||||||
});
|
});
|
||||||
@@ -332,6 +332,7 @@ class AutomaticDispose {
|
|||||||
// - Index Page Loader
|
// - Index Page Loader
|
||||||
// -
|
// -
|
||||||
IndexPage() {
|
IndexPage() {
|
||||||
|
let that = this;
|
||||||
// -
|
// -
|
||||||
// - Google Font
|
// - Google Font
|
||||||
// -
|
// -
|
||||||
@@ -360,194 +361,11 @@ class AutomaticDispose {
|
|||||||
|
|
||||||
// Create Dashboard
|
// Create Dashboard
|
||||||
$('#news_li').before('<li id="adis-nav-item"></li>');
|
$('#news_li').before('<li id="adis-nav-item"></li>');
|
||||||
$('#adis-nav-item').html(`<a id="adis-open-button" href="#">
|
$('#adis-nav-item').html(`/***ADis_Navbar***/0`)
|
||||||
<span class="glyphicon glyphicon-fire"></span>
|
$("#adis-dashboard").css({
|
||||||
</a>
|
display: "none",
|
||||||
<div id="adis-dashboard">
|
opacity: "0"
|
||||||
<header>
|
});
|
||||||
Autom. Disposition (ADis)
|
|
||||||
<a id="adis-dashboard-close-button">
|
|
||||||
<i class="fas fa-times"></i>
|
|
||||||
</a>
|
|
||||||
</header>
|
|
||||||
<section id="adis-dashboard-settings">
|
|
||||||
<div title="Arbeitet die ausgewählten Einsätze automatisch ab">
|
|
||||||
<a id="adis-setting-krankentransport-automatic" class="adis-setting-switch"></a>
|
|
||||||
Krankentransporte-Automatik
|
|
||||||
</div>
|
|
||||||
<div title="Arbeitet alle Einsätze automatisch ab">
|
|
||||||
<a id="adis-setting-full-automatic" class="adis-setting-switch"></a>
|
|
||||||
Eigene Einsätze-Automatik
|
|
||||||
</div>
|
|
||||||
<div title="Arbeitet die Sprechwünsche automatisch ab">
|
|
||||||
<a id="adis-setting-sprechwunsch-automatic" class="adis-setting-switch"></a>
|
|
||||||
Sprechwunsch-Automatik
|
|
||||||
</div>
|
|
||||||
<div title="Sendet automatisch Fahrzeuge zu Verbandseinsätzen, welche gerade abgearbeitet werden">
|
|
||||||
<a id="adis-setting-alliance-automatic" class="adis-setting-switch"></a>
|
|
||||||
Verbands-Automatik
|
|
||||||
</div>
|
|
||||||
<div title="Sendet automatisch Fahrzeuge zu Verband-Event Einsätzen, welche gerade abgearbeitet werden">
|
|
||||||
<a id="adis-setting-allianceevents-automatic" class="adis-setting-switch"></a>
|
|
||||||
VerbandsEvents-Automatik
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
#adis-nav-item {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
#adis-dashboard {
|
|
||||||
width: 364px;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
position: absolute;
|
|
||||||
top: calc(100% + 16px);
|
|
||||||
left: 50%;
|
|
||||||
z-index: 1000;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
flex-flow: column nowrap;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
font-family: "Open Sans";
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 400;
|
|
||||||
|
|
||||||
background: rgba(250, 250, 250, 1);
|
|
||||||
border-radius: 4px;
|
|
||||||
box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.48);
|
|
||||||
}
|
|
||||||
|
|
||||||
#adis-dashboard>header {
|
|
||||||
width: 100%;
|
|
||||||
height: 48px;
|
|
||||||
padding: 8px 24px;
|
|
||||||
margin: 0px;
|
|
||||||
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-start;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
line-height: 1;
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
#adis-dashboard-close-button {
|
|
||||||
width: 48px;
|
|
||||||
height: 48px;
|
|
||||||
|
|
||||||
position: absolute;
|
|
||||||
top: 0px;
|
|
||||||
right: 0px;
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
#adis-dashboard-close-button img {
|
|
||||||
width: 12px;
|
|
||||||
height: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#adis-dashboard>section {
|
|
||||||
width: 100%;
|
|
||||||
padding: 16px 24px;
|
|
||||||
margin: 0px;
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
flex-flow: column nowrap;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
#adis-dashboard-switch-mode-button,
|
|
||||||
#adis-dashboard-open-dispatcher-button {
|
|
||||||
width: 80%;
|
|
||||||
height: 40px;
|
|
||||||
margin: 4px 0px;
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
text-decoration: none;
|
|
||||||
color: #fafafa;
|
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
background: #43a047;
|
|
||||||
border-radius: 4px;
|
|
||||||
border-bottom: 3px solid rgba(0, 0, 0, 0.32);
|
|
||||||
}
|
|
||||||
|
|
||||||
#adis-dashboard-settings {
|
|
||||||
background: #e0e0e0;
|
|
||||||
border-top: 1px solid #757575;
|
|
||||||
}
|
|
||||||
|
|
||||||
#adis-dashboard-settings>div {
|
|
||||||
width: 100%;
|
|
||||||
height: 32px;
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
flex-flow: row nowrap;
|
|
||||||
justify-content: flex-start;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.adis-setting-switch {
|
|
||||||
width: 40px;
|
|
||||||
height: 16px;
|
|
||||||
margin-right: 16px;
|
|
||||||
|
|
||||||
background: #9e9e9e;
|
|
||||||
border-radius: 12px;
|
|
||||||
box-shadow: inset 0px 0px 3px 0px rgba(0, 0, 0, 0.20);
|
|
||||||
}
|
|
||||||
|
|
||||||
.adis-setting-switch.active {
|
|
||||||
background: #8bc34a;
|
|
||||||
}
|
|
||||||
|
|
||||||
.adis-setting-switch::after {
|
|
||||||
width: 22px;
|
|
||||||
height: 22px;
|
|
||||||
margin-top: -3px;
|
|
||||||
margin-left: -3px;
|
|
||||||
content: "";
|
|
||||||
display: block;
|
|
||||||
|
|
||||||
background: #fafafa;
|
|
||||||
border-radius: 12px;
|
|
||||||
box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.24);
|
|
||||||
transition: all 200ms;
|
|
||||||
}
|
|
||||||
|
|
||||||
.adis-setting-switch.active::after {
|
|
||||||
margin-left: calc(100% - 22px + 3px);
|
|
||||||
|
|
||||||
background: #5a9216;
|
|
||||||
box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.32);
|
|
||||||
transition: all 200ms;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
//
|
|
||||||
// Setting-Events
|
|
||||||
//
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Click Events
|
// Click Events
|
||||||
@@ -556,54 +374,54 @@ class AutomaticDispose {
|
|||||||
$("#adis-setting-krankentransport-automatic").click(function () {
|
$("#adis-setting-krankentransport-automatic").click(function () {
|
||||||
var tf = $(this).hasClass("active");
|
var tf = $(this).hasClass("active");
|
||||||
console.log(tf);
|
console.log(tf);
|
||||||
ADisDB.ADisSettings.put({
|
that.ADisDB.ADisSettings.put({
|
||||||
name: "Krankentransport-Automatic",
|
name: "Krankentransport-Automatic",
|
||||||
value: !tf ? 'true' : 'false'
|
value: !tf ? 'true' : 'false'
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
ADis_UpdateSettings();
|
that.UIUpdateSettings();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#adis-setting-full-automatic").click(function () {
|
$("#adis-setting-full-automatic").click(function () {
|
||||||
var tf = $(this).hasClass("active");
|
var tf = $(this).hasClass("active");
|
||||||
console.log(tf);
|
console.log(tf);
|
||||||
ADisDB.ADisSettings.put({
|
that.ADisDB.ADisSettings.put({
|
||||||
name: "MissionsOwn-Automatic",
|
name: "MissionsOwn-Automatic",
|
||||||
value: !tf ? 'true' : 'false'
|
value: !tf ? 'true' : 'false'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
ADis_UpdateSettings();
|
that.UIUpdateSettings();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#adis-setting-sprechwunsch-automatic").click(function () {
|
$("#adis-setting-sprechwunsch-automatic").click(function () {
|
||||||
var tf = $(this).hasClass("active");
|
var tf = $(this).hasClass("active");
|
||||||
console.log(tf);
|
console.log(tf);
|
||||||
ADisDB.ADisSettings.put({
|
that.ADisDB.ADisSettings.put({
|
||||||
name: "Sprechwunsch-Automatic",
|
name: "Sprechwunsch-Automatic",
|
||||||
value: !tf ? 'true' : 'false'
|
value: !tf ? 'true' : 'false'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
ADis_UpdateSettings();
|
that.UIUpdateSettings();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#adis-setting-alliance-automatic").click(function () {
|
$("#adis-setting-alliance-automatic").click(function () {
|
||||||
var tf = $(this).hasClass("active");
|
var tf = $(this).hasClass("active");
|
||||||
ADisDB.ADisSettings.put({
|
that.ADisDB.ADisSettings.put({
|
||||||
name: "Alliance-Automatic",
|
name: "Alliance-Automatic",
|
||||||
value: !tf ? 'true' : 'false'
|
value: !tf ? 'true' : 'false'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
ADis_UpdateSettings();
|
that.UIUpdateSettings();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#adis-setting-alliance-automatic").click(function () {
|
$("#adis-setting-alliance-automatic").click(function () {
|
||||||
var tf = $(this).hasClass("active");
|
var tf = $(this).hasClass("active");
|
||||||
ADisDB.ADisSettings.put({
|
that.ADisDB.ADisSettings.put({
|
||||||
name: "AllianceEvent-Automatic",
|
name: "AllianceEvent-Automatic",
|
||||||
value: !tf ? 'true' : 'false'
|
value: !tf ? 'true' : 'false'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
ADis_UpdateSettings();
|
that.UIUpdateSettings();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -626,15 +444,23 @@ class AutomaticDispose {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// initial call to load the current setting state
|
// initial call to load the current setting state
|
||||||
ADis_UpdateSettings();
|
that.UIUpdateSettings();
|
||||||
});
|
|
||||||
|
|
||||||
|
// Create Iframes
|
||||||
|
$("body").append('<div id="adis-frame-container"></div>');
|
||||||
|
$("#adis-frame-container").html(`/***ADis_Iframes***/0`);
|
||||||
|
$("#adis-frame-container").css({
|
||||||
|
display: "none",
|
||||||
|
opacity: "0"
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// Display Settings
|
// Display Settings
|
||||||
//
|
//
|
||||||
|
|
||||||
function ADis_UpdateSettings() {
|
UIUpdateSettings() {
|
||||||
ADisDB.ADisSettings.each((setting) => {
|
this.ADisDB.ADisSettings.each((setting) => {
|
||||||
if (setting.name == "Krankentransport-Automatic") {
|
if (setting.name == "Krankentransport-Automatic") {
|
||||||
if (setting.value == "true") {
|
if (setting.value == "true") {
|
||||||
$("#adis-setting-krankentransport-automatic").addClass("active");
|
$("#adis-setting-krankentransport-automatic").addClass("active");
|
||||||
@@ -668,75 +494,6 @@ class AutomaticDispose {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>`)
|
|
||||||
$("#adis-dashboard").css({
|
|
||||||
display: "none",
|
|
||||||
opacity: "0"
|
|
||||||
});
|
|
||||||
|
|
||||||
// Create Iframes
|
|
||||||
$("body").append('<div id="adis-frame-container"></div>');
|
|
||||||
$("#adis-frame-container").html(`<div id="adis-frame-wrapper" style="display: none; opacity: 0">
|
|
||||||
|
|
||||||
<iframe id="adis-ownmissions-frame" name="adis-ownmissions" mission_id="empty" src=""></iframe>
|
|
||||||
<iframe id="adis-plannedevents-frame" name="adis-plannedevents" mission_id="empty" src=""></iframe>
|
|
||||||
<iframe id="adis-verbandmission-frame" name="adis-verbandmission" mission_id="empty" src=""></iframe>
|
|
||||||
<iframe id="adis-verbandmission-event-frame" name="adis-verbandmission-event" mission_id="empty" src=""></iframe>
|
|
||||||
<iframe id="adis-krankentransporte-frame" name="adis-krankentransporte" mission_id="empty" src=""></iframe>
|
|
||||||
<iframe id="adis-sprechwunsch-rescue-frame" name="adis-sprechwunsch-rescue" vehicle_id="empty" src=""></iframe>
|
|
||||||
<iframe id="adis-sprechwunsch-police-frame" name="adis-sprechwunsch-police" mission_id="empty" src=""></iframe>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
#adis-frame-container {
|
|
||||||
width: 100%;
|
|
||||||
height: 100vh;
|
|
||||||
padding: 4% 10%;
|
|
||||||
|
|
||||||
position: fixed;
|
|
||||||
top: 0px;
|
|
||||||
left: 0px;
|
|
||||||
right: 0px;
|
|
||||||
z-index: 2010;
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
background: rgba(0, 0, 0, 0.48);
|
|
||||||
}
|
|
||||||
|
|
||||||
#adis-frame-wrapper {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
padding: 32px;
|
|
||||||
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
flex-flow: column nowrap;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
background: #eeeeee;
|
|
||||||
border-radius: 4px;
|
|
||||||
box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.32);
|
|
||||||
}
|
|
||||||
|
|
||||||
#adis-frame-wrapper>iframe {
|
|
||||||
width: 100%;
|
|
||||||
height: 50%;
|
|
||||||
|
|
||||||
border: 0px;
|
|
||||||
}
|
|
||||||
</style>`);
|
|
||||||
$("#adis-frame-container").css({
|
|
||||||
display: "none",
|
|
||||||
opacity: "0"
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user