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

@ -15,4 +15,8 @@
/** NE PAS EFFACER /** NE PAS EFFACER
* admin.css * admin.css
*/ */
.activeButton {
filter : brightness(150%);
}

View File

@ -29,4 +29,22 @@ $(".moduleDelete").on("click", function() {
return core.confirm("Êtes-vous sûr de vouloir supprimer le module de cette page ?", function() { return core.confirm("Êtes-vous sûr de vouloir supprimer le module de cette page ?", 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,48 +23,69 @@
]); ?> ]); ?>
</div> </div>
</div> </div>
<?php if($module::$modulesInstalled): ?>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="row textAlignCenter">
<h4>Sauvegarde des modules installés</h4> <div class="col3">
<?php echo template::table([2, 2, 1, 5, 1, 1], $module::$modulesInstalled, [ 'Modules', 'moduleId', 'Versions', '', '', '']); ?> <?php echo template::button('configManageModuleButton', [
</div> 'value' => 'Modules installés',
</div> 'class' => 'activeButton'
]); ?>
</div>
<div class="col3">
<?php echo template::button('configManageDatasButton', [
'value' => 'Données des modules'
]); ?>
</div>
</div>
</div>
</div> </div>
<?php else: ?> <div id="manageModules">
<?php echo template::speech('Aucun module installé.'); ?> <?php if($module::$modulesInstalled): ?>
<?php endif; ?> <div class="row">
<?php if($module::$modulesOrphan): ?> <div class="col12">
<div class="row"> <div class="block">
<div class="col12"> <h4>Sauvegarde des modules installés</h4>
<div class="block"> <?php echo template::table([2, 2, 1, 5, 1, 1], $module::$modulesInstalled, [ 'Modules', 'moduleId', 'Versions', '', '', '']); ?>
<h4>Désinstallation des modules orphelins</h4>
<?php echo template::table([2, 2, 1, 6, 1], $module::$modulesOrphan, [ 'Modules', 'moduleId', 'Versions', '', '']); ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if($module::$modulesData): ?>
<div class="row">
<div class="col12">
<div class="block">
<h4>Données des modules installés</h4>
<div class="row">
<div class="col1 offset11">
<?php echo template::button('configModuledataImport', [
'href' => helper::baseUrl() . 'plugin/dataImport',
'value' => template::ico('upload'),
"help" => 'Importer des données de module dans une page libre'
]); ?>
</div>
</div> </div>
<div class="row"> </div>
<div class="col12"> </div>
<?php echo template::table([2, 2, 1, 5, 1, 1], $module::$modulesData, [ 'Modules', 'moduleId', 'Versions', 'Pages ' . template::flag( self::$i18n, '15px') . ' (pageId)', '', '']); ?> <?php else: ?>
<?php echo template::speech('Aucun module installé.'); ?>
<?php endif; ?>
<?php if($module::$modulesOrphan): ?>
<div class="row">
<div class="col12">
<div class="block">
<h4>Désinstallation des modules orphelins</h4>
<?php echo template::table([2, 2, 1, 6, 1], $module::$modulesOrphan, [ 'Modules', 'moduleId', 'Versions', '', '']); ?>
</div>
</div>
</div>
<?php endif; ?>
</div>
<div id="manageDatas" class="displayNone">
<?php if($module::$modulesData): ?>
<div class="row">
<div class="col12">
<div class="block">
<h4>Données des modules installés</h4>
<div class="row">
<div class="col1 offset11">
<?php echo template::button('configModuledataImport', [
'href' => helper::baseUrl() . 'plugin/dataImport',
'value' => template::ico('upload'),
"help" => 'Importer des données de module dans une page libre'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php echo template::table([2, 2, 1, 5, 1, 1], $module::$modulesData, [ 'Modules', 'moduleId', 'Versions', 'Pages ' . template::flag( self::$i18n, '15px') . ' (pageId)', '', '']); ?>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> <?php endif; ?>
<?php endif; ?> </div>