From fdfaee71dbd57a431e1c741d61be1f67d57c8ced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Mon, 19 Sep 2022 17:01:39 +0200 Subject: [PATCH] =?UTF-8?q?Module=20plugin=20bug=20pr=C3=A9s=C3=A9lection?= =?UTF-8?q?=20=20des=20boutons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/plugin/view/index/index.js.php | 23 +++++++++++----------- core/module/plugin/view/index/index.php | 10 +++++----- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/core/module/plugin/view/index/index.js.php b/core/module/plugin/view/index/index.js.php index 585bab26..ba149cb1 100644 --- a/core/module/plugin/view/index/index.js.php +++ b/core/module/plugin/view/index/index.js.php @@ -13,15 +13,16 @@ $(document).ready(function () { - var configLayout = getCookie("pluginLayout"); - if (configLayout == null) { - configLayout = "module"; + var pluginLayout = getCookie("pluginLayout"); + if (pluginLayout == null) { + pluginLayout = "module"; setCookie("pluginLayout", "module"); } + console.log(pluginLayout); $("#moduleContainer").hide(); $("#dataContainer").hide(); - $("#" + configLayout + "Container").show(); - $("#config" + capitalizeFirstLetter(pluginLayout) + "Button").addClass("activeButton"); + $("#" + pluginLayout + "Container").show(); + $("#plugin" + capitalizeFirstLetter(pluginLayout) + "Button").addClass("activeButton"); }); @@ -51,18 +52,18 @@ $(".moduleDelete").on("click", function() { // Sélecteur de fonctions -$("#configModuleButton").on("click", function () { +$("#pluginModuleButton").on("click", function () { $("#dataContainer").hide(); $("#moduleContainer").show(); - $("#configModuleButton").addClass("activeButton"); - $("#configDataButton").removeClass("activeButton"); + $("#pluginModuleButton").addClass("activeButton"); + $("#pluginDataButton").removeClass("activeButton"); setCookie("pluginLayout", "module"); }); -$("#configDataButton").on("click", function () { +$("#pluginDataButton").on("click", function () { $("#moduleContainer").hide(); $("#dataContainer").show(); - $("#configModuleButton").removeClass("activeButton"); - $("#configDataButton").addClass("activeButton"); + $("#pluginModuleButton").removeClass("activeButton"); + $("#pluginDataButton").addClass("activeButton"); setCookie("pluginLayout", "data"); }); diff --git a/core/module/plugin/view/index/index.php b/core/module/plugin/view/index/index.php index c1aa5067..bf8acf87 100644 --- a/core/module/plugin/view/index/index.php +++ b/core/module/plugin/view/index/index.php @@ -7,7 +7,7 @@ ]); ?>
- 'https://doc.zwiicms.fr/gestion-des-modules', 'target' => '_blank', 'value' => template::ico('help'), @@ -16,14 +16,14 @@ ]); ?>
- helper::baseUrl() . 'plugin/store', 'value' => template::ico('shopping-basket'), 'help' => 'Installer depuis le catalogue en ligne' ]); ?>
- helper::baseUrl() . 'plugin/upload', 'value' => template::ico('file-archive'), 'help' => 'Installer depuis une archive' @@ -31,11 +31,11 @@
- 'Modules installés', 'class' => ' buttonTab' ]); ?> - 'Données des modules', 'class' => 'buttonTab' ]); ?>