diff --git a/README.md b/README.md index e15189a..5b56f5a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ZwiiCampus 1.15.03 +# ZwiiCampus 1.15.04 ZwiiCampus (Learning Management System) est logiciel auteur destiné à mettre en ligne des tutoriels. Il dispose de plusieurs modalités d'ouverture et d'accès des contenus. Basé sur la version 13 du CMS Zwii, la structure logicielle est solide, le framework de Zwii est éprouvé. diff --git a/core/core.php b/core/core.php index 9174c64..9f2da92 100644 --- a/core/core.php +++ b/core/core.php @@ -51,7 +51,7 @@ class common const ACCESS_TIMER = 1800; // Numéro de version - const ZWII_VERSION = '1.15.03'; + const ZWII_VERSION = '1.15.04'; // URL autoupdate const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/campus-update/raw/branch/master/'; diff --git a/core/module/config/view/index/index.js.php b/core/module/config/view/index/index.js.php index 93b4efe..c66a36d 100644 --- a/core/module/config/view/index/index.js.php +++ b/core/module/config/view/index/index.js.php @@ -66,11 +66,11 @@ $(document).ready(function () { $("#connectCaptchaStrong").prop("checked", false); } - var configLayout = "getData(['user', $this->getUser('id'), 'view', 'config']);?>"; - // Non défini, valeur par défaut - if (configLayout == "") { - configLayout = "setup"; - } + let configLayout = "getData(['user', $this->getUser('id'), 'view', 'config']);?>"; + // Non défini, valeur par défaut + if (configLayout == "") { + configLayout = "setup"; + } $("#localeContainer").hide(); $("#socialContainer").hide(); @@ -84,6 +84,16 @@ $(document).ready(function () { // Gestion des événements //--------------------------------------------------------------------------------------------------------------------- + + /** + * Transmet le bouton de l'onglet sélectionné avant la soumission + */ + + // Mettre à jour le champ caché avant la soumission + $('#configForm').on('submit', function () { + $('#containerSelected').val(configLayout); + }); + /** * Afficher et masquer options smtp */ @@ -157,14 +167,14 @@ $(document).ready(function () { /** * Sélection de la page de configuration à afficher - */ + */ $("#configLocaleButton").on("click", function () { $("#setupContainer").hide(); $("#socialContainer").hide(); $("#connectContainer").hide(); $("#networkContainer").hide(); $("#localeContainer").show(); - document.getElementById("containerSelected").value = "locale"; + configLayout = "locale"; $("#configSetupButton").removeClass("activeButton"); $("#configLocaleButton").addClass("activeButton"); $("#configSocialButton").removeClass("activeButton"); @@ -177,7 +187,7 @@ $(document).ready(function () { $("#connectContainer").hide(); $("#networkContainer").hide(); $("#setupContainer").show(); - document.getElementById("containerSelected").value = "setup"; + configLayout = "setup"; $("#configSetupButton").addClass("activeButton"); $("#configLocaleButton").removeClass("activeButton"); $("#configSocialButton").removeClass("activeButton"); @@ -191,7 +201,7 @@ $(document).ready(function () { $("#localeContainer").hide(); $("#networkContainer").hide(); $("#socialContainer").show(); - document.getElementById("containerSelected").value = "social"; + configLayout = "social"; $("#configSetupButton").removeClass("activeButton"); $("#configLocaleButton").removeClass("activeButton"); $("#configSocialButton").addClass("activeButton"); @@ -204,7 +214,7 @@ $(document).ready(function () { $("#socialContainer").hide(); $("#networkContainer").hide(); $("#connectContainer").show(); - document.getElementById("containerSelected").value = "connect"; + configLayout = "connect"; $("#configSetupButton").removeClass("activeButton"); $("#configLocaleButton").removeClass("activeButton"); $("#configSocialButton").removeClass("activeButton"); @@ -217,7 +227,7 @@ $(document).ready(function () { $("#socialContainer").hide(); $("#connectContainer").hide(); $("#networkContainer").show(); - document.getElementById("containerSelected").value = "network"; + configLayout = "network"; $("#configSetupButton").removeClass("activeButton"); $("#configLocaleButton").removeClass("activeButton"); $("#configSocialButton").removeClass("activeButton"); @@ -247,7 +257,7 @@ $(document).ready(function () { // Contrôle l'image Open Screen Graph // Type d'image - $("span#screenType").each(function(){ + $("span#screenType").each(function () { var text = $(this).text(); if (text.includes("jpg") || text.includes("jpeg") || text.includes("png")) { $(this).css("color", "green"); @@ -256,7 +266,7 @@ $(document).ready(function () { } }); // La largeur - $("span#screenWide").each(function(){ + $("span#screenWide").each(function () { var screenId = parseInt($(this).text()); if (screenId >= 1200) { $(this).css("color", "green"); @@ -265,7 +275,7 @@ $(document).ready(function () { } }); // La hauteur - $("span#screenHeight").each(function(){ + $("span#screenHeight").each(function () { var screenId = parseInt($(this).text()); if (screenId >= 630) { $(this).css("color", "green"); @@ -274,7 +284,7 @@ $(document).ready(function () { } }); // Le ratio - $('span#screenRatio').each(function(){ + $('span#screenRatio').each(function () { var ratio = parseFloat($(this).text()); if (ratio >= 1.90 && ratio <= 1.92) { $(this).css("color", "green"); @@ -285,17 +295,17 @@ $(document).ready(function () { } }); // Le poids - $('span#screenWeight').each(function(index){ + $('span#screenWeight').each(function (index) { var weight = parseFloat($(this).text()); var fileType = $('span#screenType').eq(index).text(); if ((fileType === "jpg" || fileType === "jpeg") && weight < 5000000) { $(this).css("color", "green"); } else { - $(this).css("color", "red"); + $(this).css("color", "red"); } }); - $('span#screenWeight').each(function(index){ + $('span#screenWeight').each(function (index) { var weight = parseFloat($(this).text()); var fileType = $('span#screenType').eq(index).text();