Dans config lien vers identité du site

This commit is contained in:
Fred Tempez 2023-12-19 18:32:28 +01:00
parent 3cee46072b
commit b26e7dcb7d
3 changed files with 34 additions and 39 deletions

View File

@ -71,7 +71,7 @@ $(document).ready(function () {
configLayout = "setup"; configLayout = "setup";
setCookie("configLayout", "setup"); setCookie("configLayout", "setup");
} }
$("#localeContainer").hide();
$("#socialContainer").hide(); $("#socialContainer").hide();
$("#connectContainer").hide(); $("#connectContainer").hide();
$("#networkContainer").hide(); $("#networkContainer").hide();
@ -158,39 +158,22 @@ $(document).ready(function () {
* Sélection de la page de configuration à afficher * Sélection de la page de configuration à afficher
*/ */
$("#configSetupButton").on("click", function () { $("#configSetupButton").on("click", function () {
$("#localeContainer").hide();
$("#socialContainer").hide(); $("#socialContainer").hide();
$("#connectContainer").hide(); $("#connectContainer").hide();
$("#networkContainer").hide(); $("#networkContainer").hide();
$("#setupContainer").show(); $("#setupContainer").show();
$("#configSetupButton").addClass("activeButton"); $("#configSetupButton").addClass("activeButton");
$("#configLocaleButton").removeClass("activeButton");
$("#configSocialButton").removeClass("activeButton"); $("#configSocialButton").removeClass("activeButton");
$("#configConnectButton").removeClass("activeButton"); $("#configConnectButton").removeClass("activeButton");
$("#configNetworkButton").removeClass("activeButton"); $("#configNetworkButton").removeClass("activeButton");
setCookie("configLayout", "setup"); setCookie("configLayout", "setup");
}); });
$("#configLocaleButton").on("click", function () {
$("#setupContainer").hide();
$("#socialContainer").hide();
$("#connectContainer").hide();
$("#networkContainer").hide();
$("#localeContainer").show();
$("#configSetupButton").removeClass("activeButton");
$("#configLocaleButton").addClass("activeButton");
$("#configSocialButton").removeClass("activeButton");
$("#configConnectButton").removeClass("activeButton");
$("#configNetworkButton").removeClass("activeButton");
setCookie("configLayout", "locale");
});
$("#configSocialButton").on("click", function () { $("#configSocialButton").on("click", function () {
$("#connectContainer").hide(); $("#connectContainer").hide();
$("#setupContainer").hide(); $("#setupContainer").hide();
$("#localeContainer").hide();
$("#networkContainer").hide(); $("#networkContainer").hide();
$("#socialContainer").show(); $("#socialContainer").show();
$("#configSetupButton").removeClass("activeButton"); $("#configSetupButton").removeClass("activeButton");
$("#configLocaleButton").removeClass("activeButton");
$("#configSocialButton").addClass("activeButton"); $("#configSocialButton").addClass("activeButton");
$("#configConnectButton").removeClass("activeButton"); $("#configConnectButton").removeClass("activeButton");
$("#configNetworkButton").removeClass("activeButton"); $("#configNetworkButton").removeClass("activeButton");
@ -198,12 +181,10 @@ $(document).ready(function () {
}); });
$("#configConnectButton").on("click", function () { $("#configConnectButton").on("click", function () {
$("#setupContainer").hide(); $("#setupContainer").hide();
$("#localeContainer").hide();
$("#socialContainer").hide(); $("#socialContainer").hide();
$("#networkContainer").hide(); $("#networkContainer").hide();
$("#connectContainer").show(); $("#connectContainer").show();
$("#configSetupButton").removeClass("activeButton"); $("#configSetupButton").removeClass("activeButton");
$("#configLocaleButton").removeClass("activeButton");
$("#configSocialButton").removeClass("activeButton"); $("#configSocialButton").removeClass("activeButton");
$("#configConnectButton").addClass("activeButton"); $("#configConnectButton").addClass("activeButton");
$("#configNetworkButton").removeClass("activeButton"); $("#configNetworkButton").removeClass("activeButton");
@ -211,12 +192,10 @@ $(document).ready(function () {
}); });
$("#configNetworkButton").on("click", function () { $("#configNetworkButton").on("click", function () {
$("#setupContainer").hide(); $("#setupContainer").hide();
$("#localeContainer").hide();
$("#socialContainer").hide(); $("#socialContainer").hide();
$("#connectContainer").hide(); $("#connectContainer").hide();
$("#networkContainer").show(); $("#networkContainer").show();
$("#configSetupButton").removeClass("activeButton"); $("#configSetupButton").removeClass("activeButton");
$("#configLocaleButton").removeClass("activeButton");
$("#configSocialButton").removeClass("activeButton"); $("#configSocialButton").removeClass("activeButton");
$("#configConnectButton").removeClass("activeButton"); $("#configConnectButton").removeClass("activeButton");
$("#configNetworkButton").addClass("activeButton"); $("#configNetworkButton").addClass("activeButton");
@ -233,7 +212,7 @@ $(document).ready(function () {
// Mise en évidence des erreurs de saisie dans les boutons de sélection // Mise en évidence des erreurs de saisie dans les boutons de sélection
var containers = ["setup", "locale", "social", "connect", "network"]; var containers = ["setup", "social", "connect", "network"];
$.each(containers, function (index, value) { $.each(containers, function (index, value) {
var a = $("div#" + value + "Container").find("input.notice").not(".displayNone"); var a = $("div#" + value + "Container").find("input.notice").not(".displayNone");
if (a.length > 0) { if (a.length > 0) {

View File

@ -16,7 +16,13 @@
'help' => 'Consulter l\'aide en ligne' 'help' => 'Consulter l\'aide en ligne'
]); */?> ]); */?>
</div> </div>
<div class="col2 offset8"> <div class="col2 offset6">
<?php echo template::button('configLocaleButton', [
'value' => 'Identité',
'href' => helper::baseUrl() . 'language/site'
]); ?>
</div>
<div class="col2">
<?php echo template::submit('Submit'); ?> <?php echo template::submit('Submit'); ?>
</div> </div>
</div> </div>
@ -35,7 +41,6 @@
'value' => 'Connexion', 'value' => 'Connexion',
'class' => 'buttonTab' 'class' => 'buttonTab'
]); ?> ]); ?>
<?php echo template::button('configNetworkButton', [ <?php echo template::button('configNetworkButton', [
'value' => 'Réseau', 'value' => 'Réseau',
'class' => 'buttonTab' 'class' => 'buttonTab'

View File

@ -304,6 +304,17 @@ class language extends common
} }
} }
// Pointer vers la fenêtre
switch ($this->getUrl(1)) {
case 'interface':
setcookie('translateLayout', 'ui', time() + 3600, '/', '', false, false);
break;
case 'site':
setcookie('translateLayout', 'content', time() + 3600, '/', '', false, false);
break;
default:
break;
}
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([