Move vars to lets and fix some things with recording.conf

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2023-06-06 11:27:52 +02:00
parent dc77a2732c
commit cbd86136cc
11 changed files with 27 additions and 24 deletions

View file

@ -1,7 +1,7 @@
if (document.hasFocus()) {
// hide reload button if the site reloads automatically
var list = document.getElementsByClassName("reload button");
for (var i = 0; i < list.length; i++) {
let list = document.getElementsByClassName("reload button");
for (let i = 0; i < list.length; i++) {
// list[i] is a node with the desired class name
list[i].style.display = 'none';
}

View file

@ -1,5 +1,5 @@
document.addEventListener("DOMContentLoaded", function(event) {
// Clamav
var clamav = document.getElementById("clamav");
let clamav = document.getElementById("clamav");
clamav.disabled = true;
});

View file

@ -1,5 +1,5 @@
document.addEventListener("DOMContentLoaded", function(event) {
// Collabora
var collabora = document.getElementById("collabora");
let collabora = document.getElementById("collabora");
collabora.disabled = true;
});

View file

@ -1,5 +1,5 @@
document.addEventListener("DOMContentLoaded", function(event) {
// Fulltextsearch
var fulltextsearch = document.getElementById("fulltextsearch");
let fulltextsearch = document.getElementById("fulltextsearch");
fulltextsearch.disabled = true;
});

View file

@ -1,5 +1,5 @@
document.addEventListener("DOMContentLoaded", function(event) {
// Imaginary
var imaginary = document.getElementById("imaginary");
let imaginary = document.getElementById("imaginary");
imaginary.disabled = true;
});

View file

@ -1,6 +1,6 @@
document.addEventListener("DOMContentLoaded", function(event) {
// OnlyOffice
var onlyoffice = document.getElementById("onlyoffice");
let onlyoffice = document.getElementById("onlyoffice");
if (onlyoffice) {
onlyoffice.disabled = true;
}

View file

@ -1,5 +1,5 @@
document.addEventListener("DOMContentLoaded", function(event) {
// Talk
var talk = document.getElementById("talk");
let talk = document.getElementById("talk");
talk.disabled = true;
});

View file

@ -1,6 +1,6 @@
"use strict";
(function (){
var lastError;
let lastError;
function showError(message) {
const body = document.getElementsByTagName('body')[0]
@ -45,7 +45,7 @@
if (lastError) {
lastError.remove()
}
var xhr = new XMLHttpRequest();
let xhr = new XMLHttpRequest();
xhr.addEventListener('load', handleEvent);
xhr.addEventListener('error', () => showError("Failed to talk to server."));
xhr.addEventListener('error', () => disableSpinner());

View file

@ -1,9 +1,10 @@
function makeOptionsFormSubmitVisible() {
var optionsFormSubmit = document.getElementById("options-form-submit");
let optionsFormSubmit = document.getElementById("options-form-submit");
optionsFormSubmit.style.display = 'block';
}
function handleTalkVisibility(talk) {
function handleTalkVisibility() {
let talk = document.getElementById("talk");
let talkRecording = document.getElementById("talk-recording")
if (talk.checked) {
talkRecording.disabled = false
@ -15,40 +16,40 @@ function handleTalkVisibility(talk) {
document.addEventListener("DOMContentLoaded", function(event) {
// handle submit button for options form
var optionsFormSubmit = document.getElementById("options-form-submit");
let optionsFormSubmit = document.getElementById("options-form-submit");
optionsFormSubmit.style.display = 'none';
// Clamav
var clamav = document.getElementById("clamav");
let clamav = document.getElementById("clamav");
clamav.addEventListener('change', makeOptionsFormSubmitVisible);
// OnlyOffice
var onlyoffice = document.getElementById("onlyoffice");
let onlyoffice = document.getElementById("onlyoffice");
if (onlyoffice) {
onlyoffice.addEventListener('change', makeOptionsFormSubmitVisible);
}
// Collabora
var collabora = document.getElementById("collabora");
let collabora = document.getElementById("collabora");
collabora.addEventListener('change', makeOptionsFormSubmitVisible);
// Talk
var talk = document.getElementById("talk");
let talk = document.getElementById("talk");
talk.addEventListener('change', makeOptionsFormSubmitVisible);
talk.addEventListener('change', handleTalkVisibility);
// Talk-recording
var talkRecording = document.getElementById("talk-recording");
let talkRecording = document.getElementById("talk-recording");
talkRecording.addEventListener('change', makeOptionsFormSubmitVisible);
if (!talk.checked) {
talkRecording.disabled = true
}
// Imaginary
var imaginary = document.getElementById("imaginary");
let imaginary = document.getElementById("imaginary");
imaginary.addEventListener('change', makeOptionsFormSubmitVisible);
// Fulltextsearch
var fulltextsearch = document.getElementById("fulltextsearch");
let fulltextsearch = document.getElementById("fulltextsearch");
fulltextsearch.addEventListener('change', makeOptionsFormSubmitVisible);
});

View file

@ -545,9 +545,9 @@
<input type="checkbox" id="talk" name="talk"><label for="talk">Nextcloud Talk (needs ports {{ talk_port }}/TCP and {{ talk_port }}/UDP open/forwarded in your firewall/router)</label><br><br>
{% endif %}
{% if is_talk_recording_enabled == true %}
<input type="checkbox" id="talk-recording" name="talk-recording" checked="checked"><label for="talk-recording">Talk Recording (needs ~1GB additional RAM)</label><br>
<input type="checkbox" id="talk-recording" name="talk-recording" checked="checked"><label for="talk-recording">Nextcloud Talk Recording-server (needs Nextcloud Talk being enabled and ~1GB additional RAM and ~2 additional vCPUs)</label><br>
{% else %}
<input type="checkbox" id="talk-recording" name="talk-recording"><label for="talk-recording">Talk Recording (needs ~1GB additional RAM)</label><br>
<input type="checkbox" id="talk-recording" name="talk-recording"><label for="talk-recording">Nextcloud Talk Recording-server (needs Nextcloud Talk being enabled and ~1GB additional RAM ~2 additional vCPUs)</label><br>
{% endif %}
{% if is_onlyoffice_enabled == true %}
<input type="checkbox" id="onlyoffice" name="onlyoffice" checked="checked"><label for="onlyoffice">OnlyOffice</label><br>
@ -557,7 +557,7 @@
<input id="options-form-submit" class="button" type="submit" value="Save changes" />
<script type="text/javascript" src="options-form-submit.js"></script>
</form>
<b>Minimal system requirements:</b> When any optional addon is enabled, at least 2GB RAM, a dual-core CPU and 40GB system storage are required. When enabling ClamAV, Talk Recording or Fulltextsearch, at least 3GB RAM are required. When enabling everything, at least 5GB RAM are required. Recommended are at least 1GB more RAM than the minimal requirement. For further advices and recommendations see <b><a href="https://github.com/nextcloud/all-in-one/discussions/1335">this documentation</a></b><br><br>
<b>Minimal system requirements:</b> When any optional addon is enabled, at least 2GB RAM, a dual-core CPU and 40GB system storage are required. When enabling ClamAV, Nextcloud Talk Recording-server or Fulltextsearch, at least 3GB RAM are required. For Talk Recording-server additional 2 vCPUs are required. When enabling everything, at least 5GB RAM and a quad-core CPU are required. Recommended are at least 1GB more RAM than the minimal requirement. For further advices and recommendations see <b><a href="https://github.com/nextcloud/all-in-one/discussions/1335">this documentation</a></b><br><br>
{% if isAnyRunning == true or is_x64_platform == false %}
<script type="text/javascript" src="disable-clamav.js"></script>
{% endif %}