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";
setCookie("configLayout", "setup");
}
$("#localeContainer").hide();
$("#socialContainer").hide();
$("#connectContainer").hide();
$("#networkContainer").hide();
@ -158,39 +158,22 @@ $(document).ready(function () {
* Sélection de la page de configuration à afficher
*/
$("#configSetupButton").on("click", function () {
$("#localeContainer").hide();
$("#socialContainer").hide();
$("#connectContainer").hide();
$("#networkContainer").hide();
$("#setupContainer").show();
$("#configSetupButton").addClass("activeButton");
$("#configLocaleButton").removeClass("activeButton");
$("#configSocialButton").removeClass("activeButton");
$("#configConnectButton").removeClass("activeButton");
$("#configNetworkButton").removeClass("activeButton");
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 () {
$("#connectContainer").hide();
$("#setupContainer").hide();
$("#localeContainer").hide();
$("#networkContainer").hide();
$("#socialContainer").show();
$("#configSetupButton").removeClass("activeButton");
$("#configLocaleButton").removeClass("activeButton");
$("#configSocialButton").addClass("activeButton");
$("#configConnectButton").removeClass("activeButton");
$("#configNetworkButton").removeClass("activeButton");
@ -198,12 +181,10 @@ $(document).ready(function () {
});
$("#configConnectButton").on("click", function () {
$("#setupContainer").hide();
$("#localeContainer").hide();
$("#socialContainer").hide();
$("#networkContainer").hide();
$("#connectContainer").show();
$("#configSetupButton").removeClass("activeButton");
$("#configLocaleButton").removeClass("activeButton");
$("#configSocialButton").removeClass("activeButton");
$("#configConnectButton").addClass("activeButton");
$("#configNetworkButton").removeClass("activeButton");
@ -211,12 +192,10 @@ $(document).ready(function () {
});
$("#configNetworkButton").on("click", function () {
$("#setupContainer").hide();
$("#localeContainer").hide();
$("#socialContainer").hide();
$("#connectContainer").hide();
$("#networkContainer").show();
$("#configSetupButton").removeClass("activeButton");
$("#configLocaleButton").removeClass("activeButton");
$("#configSocialButton").removeClass("activeButton");
$("#configConnectButton").removeClass("activeButton");
$("#configNetworkButton").addClass("activeButton");
@ -233,7 +212,7 @@ $(document).ready(function () {
// 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) {
var a = $("div#" + value + "Container").find("input.notice").not(".displayNone");
if (a.length > 0) {

View File

@ -9,14 +9,20 @@
</div>
<div class="col1">
<?php /**echo template::button('configHelp', [
'class' => 'buttonHelp',
'href' => 'https://doc.zwiicms.fr/configuration-du-site',
'target' => '_blank',
'value' => template::ico('help'),
'help' => 'Consulter l\'aide en ligne'
]); */ ?>
'class' => 'buttonHelp',
'href' => 'https://doc.zwiicms.fr/configuration-du-site',
'target' => '_blank',
'value' => template::ico('help'),
'help' => 'Consulter l\'aide en ligne'
]); */?>
</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'); ?>
</div>
</div>
@ -35,7 +41,6 @@
'value' => 'Connexion',
'class' => 'buttonTab'
]); ?>
<?php echo template::button('configNetworkButton', [
'value' => 'Réseau',
'class' => 'buttonTab'

View File

@ -259,16 +259,16 @@ class language extends common
//self::$i18nUI === $file ? helper::translate('Interface') : '',
'',
/*
template::button('translateContentLanguageUIEdit' . $file, [
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $file,
'value' => template::ico('pencil'),
'help' => 'Éditer',
'disabled' => 'fr_FR' === $file
]),
*/
template::button('translateContentLanguageUIEdit' . $file, [
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $file,
'value' => template::ico('pencil'),
'help' => 'Éditer',
'disabled' => 'fr_FR' === $file
]),
*/
template::button('translateContentLanguageUIDownload' . $file, [
'class' => isset($storeUI[$file]['version']) && version_compare($installedUI[$file]['version'], $storeUI[$file]['version']) < 0 ? 'buttonGreen' : '',
'class' => isset($storeUI[$file]['version']) && version_compare($installedUI[$file]['version'], $storeUI[$file]['version']) < 0 ? 'buttonGreen' : '',
'href' => helper::baseUrl() . $this->getUrl(0) . '/update/' . $file,
'value' => template::ico('update'),
'help' => 'Mettre à jour',
@ -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
$this->addOutput([