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
* 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() {
$(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>
<?php if($module::$modulesInstalled): ?>
<div class="row">
<div class="col12">
<div class="block">
<h4>Sauvegarde des modules installés</h4>
<?php echo template::table([2, 2, 1, 5, 1, 1], $module::$modulesInstalled, [ 'Modules', 'moduleId', 'Versions', '', '', '']); ?>
</div>
</div>
<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>
<?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; ?>
<?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 id="manageModules">
<?php if($module::$modulesInstalled): ?>
<div class="row">
<div class="col12">
<div class="block">
<h4>Sauvegarde des modules installés</h4>
<?php echo template::table([2, 2, 1, 5, 1, 1], $module::$modulesInstalled, [ 'Modules', 'moduleId', 'Versions', '', '', '']); ?>
</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>
<?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>
<?php endif; ?>
<?php endif; ?>
</div>