forked from ZwiiCMS-Team/ZwiiCMS
Merge branch 'master_dev_07'
This commit is contained in:
commit
517e926c5f
@ -1,5 +1,11 @@
|
||||
# ChangeLog
|
||||
|
||||
## Version 9.0.07
|
||||
- Correction :
|
||||
- Disparition du menu quand la bannière est masquée
|
||||
- Modifications :
|
||||
- Barre d'administration, pages organisées
|
||||
|
||||
## Version 9.0.06
|
||||
- Correction :
|
||||
- Configuration des modes de codemirror
|
||||
|
@ -118,7 +118,7 @@ class common {
|
||||
'barLeft' => '',
|
||||
'barRight' => ''
|
||||
],
|
||||
'cachee' => [
|
||||
'privee' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
@ -137,7 +137,7 @@ class common {
|
||||
'position' => 2,
|
||||
'group' => self::GROUP_MEMBER,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Cachée',
|
||||
'title' => 'Privée',
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => ''
|
||||
@ -1076,7 +1076,6 @@ class common {
|
||||
* Mises à jour
|
||||
*/
|
||||
private function update() {
|
||||
echo "pop";
|
||||
// Version 8.1.0
|
||||
if($this->getData(['core', 'dataVersion']) < 810) {
|
||||
$this->setData(['config', 'timezone', 'Europe/Paris']);
|
||||
@ -2338,8 +2337,33 @@ class layout extends common {
|
||||
if($this->getUser('group') >= self::GROUP_MODERATOR) {
|
||||
$leftItems .= '<li><select id="barSelectPage">';
|
||||
$leftItems .= '<option value="">Choisissez une page</option>';
|
||||
$leftItems .= '<optgroup label="Pages orphelines">';
|
||||
$orpheline = true ;
|
||||
$currentPageId = $this->getData(['page', $this->getUrl(0)]) ? $this->getUrl(0) : $this->getUrl(2);
|
||||
foreach($this->getHierarchy(null, false) as $parentPageId => $childrenPageIds) {
|
||||
foreach($this->getHierarchy(null,false) as $parentPageId => $childrenPageIds) {
|
||||
if ($this->getData(['page', $parentPageId, 'position']) !== 0 &&
|
||||
$orpheline ) {
|
||||
$orpheline = false;
|
||||
$leftItems .= '<optgroup label="Pages du menu">';
|
||||
}
|
||||
// Exclure les barres
|
||||
if ($this->getData(['page', $parentPageId, 'block']) !== 'bar') {
|
||||
$leftItems .= '<option value="' .
|
||||
helper::baseUrl() .
|
||||
$parentPageId . '"' .
|
||||
($parentPageId === $currentPageId ? ' selected' : false) .
|
||||
($this->getData(['page', $parentPageId, 'disable']) === true ? ' class="inactive"' : false) .
|
||||
'>' .
|
||||
$this->getData(['page', $parentPageId, 'title']) .
|
||||
'</option>';
|
||||
foreach($childrenPageIds as $childKey) {
|
||||
$leftItems .= '<option value="' . helper::baseUrl() . $childKey . '"' . ($childKey === $currentPageId ? ' selected' : false) . '> ' . $this->getData(['page', $childKey, 'title']) . '</option>';
|
||||
}
|
||||
}
|
||||
}
|
||||
// Afficher les barres
|
||||
$leftItems .= '<optgroup label="Barres latérales">';
|
||||
foreach($this->getHierarchy(null, false,true) as $parentPageId => $childrenPageIds) {
|
||||
$leftItems .= '<option value="' . helper::baseUrl() . $parentPageId . '"' . ($parentPageId === $currentPageId ? ' selected' : false) . '>' . $this->getData(['page', $parentPageId, 'title']) . '</option>';
|
||||
foreach($childrenPageIds as $childKey) {
|
||||
$leftItems .= '<option value="' . helper::baseUrl() . $childKey . '"' . ($childKey === $currentPageId ? ' selected' : false) . '> ' . $this->getData(['page', $childKey, 'title']) . '</option>';
|
||||
|
@ -63,6 +63,10 @@ li ul {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
option.inactive {
|
||||
color: darkred;
|
||||
}
|
||||
|
||||
/* Séparateur */
|
||||
hr {
|
||||
border: 0;
|
||||
|
@ -414,6 +414,9 @@ $("#pageEditModuleConfig").on("click", function() {
|
||||
*/
|
||||
var hierarchy = <?php echo json_encode($this->getHierarchy()); ?>;
|
||||
var pages = <?php echo json_encode($this->getData(['page'])); ?>;
|
||||
// 9.0.07 corrige une mauvaise sélection d'une page orpheline avec enfant
|
||||
var positionInitial = <?php echo $this->getData(['page',$this->getUrl(2),"position"]); ?>;
|
||||
// 9.0.07
|
||||
$("#pageEditParentPageId").on("change", function() {
|
||||
var positionDOM = $("#pageEditPosition");
|
||||
positionDOM.empty().append(
|
||||
@ -428,7 +431,7 @@ $("#pageEditParentPageId").on("change", function() {
|
||||
// Liste des pages sans parents
|
||||
for(var key in hierarchy) {
|
||||
if(hierarchy.hasOwnProperty(key)) {
|
||||
// Sélectionne la page avant si il s'agit de la page courante
|
||||
// Sélectionne la page avant s'il s'agit de la page courante
|
||||
if(key === "<?php echo $this->getUrl(2); ?>") {
|
||||
positionSelected = positionPrevious;
|
||||
}
|
||||
@ -443,6 +446,11 @@ $("#pageEditParentPageId").on("change", function() {
|
||||
}
|
||||
}
|
||||
}
|
||||
// 9.0.07 corrige une mauvaise sélection d'une page orpheline avec enfant
|
||||
if (positionInitial === 0) {
|
||||
positionSelected = 0;
|
||||
}
|
||||
// 9.0.07
|
||||
}
|
||||
// Un page parent est selectionnée
|
||||
else {
|
||||
|
@ -325,6 +325,8 @@ class theme extends common {
|
||||
case 'body' :
|
||||
$position = str_replace ('site','body',$this->getData(['theme','menu','position']));
|
||||
break;
|
||||
default:
|
||||
$position = $this->getData(['theme','menu','position']);
|
||||
}
|
||||
$this->setData(['theme', 'menu', [
|
||||
'backgroundColor' => $this->getData(['theme', 'menu', 'backgroundColor']),
|
||||
|
Loading…
Reference in New Issue
Block a user