/** * This file is part of Zwii. * * For full copyright and license information, please see the LICENSE * file that was distributed with this source code. * * @author Rémi Jean * @copyright Copyright (C) 2008-2018, Rémi Jean * @license GNU General Public License, version 3 * @link http://zwiicms.com/ */ /** * Confirmation de suppression */ $("#pageEditDelete").on("click", function() { var _this = $(this); return core.confirm("Êtes-vous sûr de vouloir supprimer cette page ?", function() { $(location).attr("href", _this.attr("href")); }); }); /** * Bloque/Débloque le bouton de configuration au changement de module */ var pageEditModuleIdDOM = $("#pageEditModuleId"); pageEditModuleIdDOM.on("change", function() { if($(this).val() === "") { $("#pageEditModuleConfig").addClass("disabled"); $("#pageEditContentContainer").slideDown(); } else { $("#pageEditModuleConfig").removeClass("disabled"); $("#pageEditContentContainer").slideUp(); } }); /** * Soumission du formulaire pour éditer le module */ $("#pageEditModuleConfig").on("click", function() { $("#pageEditModuleRedirect").val(1); $("#pageEditForm").trigger("submit"); }); /** * Affiche les pages en fonction de la page parent dans le choix de la position */ var hierarchy = getHierarchy()); ?>; var pages = getData(['page'])); ?>; $("#pageEditParentPageId").on("change", function() { var positionDOM = $("#pageEditPosition"); positionDOM.empty().append( $("