Boutons de sélection

This commit is contained in:
fredtempez 2022-02-03 12:16:01 +01:00
parent 33b4fa9139
commit 25aea3bfca
3 changed files with 83 additions and 40 deletions

View File

@ -16,3 +16,7 @@
/** NE PAS EFFACER /** NE PAS EFFACER
* admin.css * admin.css
*/ */
.activeButton {
filter : brightness(150%);
}

View File

@ -30,3 +30,21 @@ $(".moduleDelete").on("click", function() {
$(location).attr("href", _this.attr("href")); $(location).attr("href", _this.attr("href"));
}); });
}); });
// Sélecteur de fonctions
$("#configManageModuleButton").on("click", function () {
console.log("clic");
$("#manageDatas").hide();
$("#manageModules").show();
$("#configManageModuleButton").addClass("activeButton");
$("#configManageDatasButton").removeClass("activeButton");
setCookie("pluginLayout", "module");
});
$("#configManageDatasButton").on("click", function () {
$("#manageModules").hide();
$("#manageDatas").show();
$("#configManageModuleButton").removeClass("activeButton");
$("#configManageDatasButton").addClass("activeButton");
setCookie("pluginLayout", "data");
});

View File

@ -23,6 +23,24 @@
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row">
<div class="col12">
<div class="row textAlignCenter">
<div class="col3">
<?php echo template::button('configManageModuleButton', [
'value' => 'Modules installés',
'class' => 'activeButton'
]); ?>
</div>
<div class="col3">
<?php echo template::button('configManageDatasButton', [
'value' => 'Données des modules'
]); ?>
</div>
</div>
</div>
</div>
<div id="manageModules">
<?php if($module::$modulesInstalled): ?> <?php if($module::$modulesInstalled): ?>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
@ -45,6 +63,8 @@
</div> </div>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div>
<div id="manageDatas" class="displayNone">
<?php if($module::$modulesData): ?> <?php if($module::$modulesData): ?>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
@ -68,3 +88,4 @@
</div> </div>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div>