Règle le problème des champs CSS et JS commentés

snipcart
Fred Tempez 3 months ago
parent 4b7611f830
commit 61379d2db1

@ -632,4 +632,18 @@ class page extends common
'view' => 'jsEditor'
]);
}
/**
* Retourne les informations sur les pages en omettant les clés CSS et JS qui occasionnent des bugs d'affichage dans l'éditeur de page
* @return array tableau associatif des pages dans le menu
*/
public function getPageInfo() {
$p = $this->getData(['page']);
$d = array_map(function($d) {
unset($d["css"], $d["js"]);
return $d;
}, $p);
return json_encode($d);
}
}

@ -644,7 +644,7 @@ $("#pageEditParentPageId").on("change", function() {
function buildPagesList(extraPosition) {
var hierarchy = <?php echo json_encode($this->getHierarchy()); ?>;
var pages = <?php echo json_encode($this->getData(['page'])); ?>;
var pages = <?php echo $module->getPageInfo(); ?>;
var positionInitial = <?php echo $this->getData(['page',$this->getUrl(2),"position"]); ?>;
var extraPosition = $("#pageEditExtraPosition").val();
var positionDOM = $("#pageEditPosition");

Loading…
Cancel
Save