Lity option supprimée
This commit is contained in:
parent
8b93bdbe11
commit
96514f092a
@ -21,7 +21,6 @@ class common {
|
||||
const DISPLAY_LAYOUT_BLANK = 3;
|
||||
const DISPLAY_LAYOUT_MAIN = 4;
|
||||
const DISPLAY_LAYOUT_LIGHT = 5;
|
||||
const DISPLAY_LAYOUT_LITY = 6;
|
||||
const GROUP_BANNED = -1;
|
||||
const GROUP_VISITOR = 0;
|
||||
const GROUP_MEMBER = 1;
|
||||
@ -2107,14 +2106,7 @@ class core extends common {
|
||||
'disable' => $this->getData(['page', $this->getUrl(0), 'disable']),
|
||||
'contentRight' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'content']),
|
||||
'contentLeft' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'content']),
|
||||
'display' => $this->getData(['page', $this->getUrl(0), 'lity']) ? self:: DISPLAY_LAYOUT_LITY : $this->output['display']
|
||||
]);
|
||||
// Mode connecté, désactiver lity
|
||||
if ( $this->getData(['page', $this->getUrl(0), 'lity']) === true && $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD') ) {
|
||||
$this->addOutput([
|
||||
'display' => self::DISPLAY_LAYOUT_MAIN
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// Importe le module
|
||||
@ -2210,20 +2202,11 @@ class core extends common {
|
||||
}
|
||||
}
|
||||
// Données en sortie applicables même lorsqu'une notice est présente
|
||||
// Affichage changer lity en main si connexion
|
||||
if ( $this->getData(['page', $this->getUrl(0), 'lity']) === true
|
||||
&& $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') )
|
||||
{
|
||||
$this->addOutput([
|
||||
'display' => self:: DISPLAY_LAYOUT_LITY
|
||||
]);
|
||||
|
||||
} else {
|
||||
if($output['display']) {
|
||||
$this->addOutput([
|
||||
'display' => $output['display']
|
||||
]);
|
||||
}
|
||||
// Affichage
|
||||
if($output['display']) {
|
||||
$this->addOutput([
|
||||
'display' => $output['display']
|
||||
]);
|
||||
}
|
||||
// Contenu brut
|
||||
if($output['content']) {
|
||||
@ -2423,10 +2406,6 @@ class core extends common {
|
||||
case self::DISPLAY_LAYOUT_MAIN:
|
||||
require 'core/layout/main.php';
|
||||
break;
|
||||
// Layout Lity
|
||||
case self::DISPLAY_LAYOUT_LITY:
|
||||
require 'core/layout/lity.php';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2578,19 +2557,16 @@ class layout extends common {
|
||||
$items .= '</span>';
|
||||
// Affichage du module de recherche
|
||||
$items .= '<span id="footerDisplaySearch"';
|
||||
$targetLity = $this->getData(['page',$this->getData(['locale','searchPageId']), 'lity']) && $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ? ' rel="data-lity" ' : "";
|
||||
$items .= $this->getData(['theme','footer','displaySearch']) === false ? ' class="displayNone" >' : '>';
|
||||
if ($this->getData(['locale','searchPageId']) !== 'none') {
|
||||
$items .= '<wbr> | <a href="' . helper::baseUrl() . $this->getData(['locale','searchPageId']) . '" data-tippy-content="Rechercher dans le site"' . $targetLity . '>Recherche</a>';
|
||||
$items .= '<wbr> | <a href="' . helper::baseUrl() . $this->getData(['locale','searchPageId']) . '" data-tippy-content="Rechercher dans le site" >Recherche</a>';
|
||||
}
|
||||
$items .= '</span>';
|
||||
// Affichage des mentions légales
|
||||
$items .= '<span id="footerDisplayLegal"';
|
||||
$items .= $this->getData(['theme','footer','displayLegal']) === false ? ' class="displayNone" >' : '>';
|
||||
// Affichage lity
|
||||
$targetLity = $this->getData(['page',$this->getData(['locale','legalPageId']), 'lity']) && $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ? ' rel="data-lity" ' : "";
|
||||
if ($this->getData(['locale','legalPageId']) !== 'none') {
|
||||
$items .= '<wbr> | <a href="' . helper::baseUrl() . $this->getData(['locale','legalPageId']) .'" data-tippy-content="Mentions légales"' . $targetLity .' >Mentions légales</a>';
|
||||
$items .= '<wbr> | <a href="' . helper::baseUrl() . $this->getData(['locale','legalPageId']) . '" data-tippy-content="Mentions légales">Mentions légales</a>';
|
||||
}
|
||||
$items .= '</span>';
|
||||
// Affichage du lien de connexion
|
||||
@ -2713,9 +2689,6 @@ class layout extends common {
|
||||
// Propriétés de l'item
|
||||
$active = ($parentPageId === $currentPageId OR in_array($currentPageId, $childrenPageIds)) ? 'active ' : '';
|
||||
$targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank"' : '';
|
||||
$targetLity = $this->getData(['page', $parentPageId, 'lity'])
|
||||
&& $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
||||
? ' rel="data-lity" ' : '';
|
||||
// Mise en page de l'item
|
||||
$itemsLeft .= '<li>';
|
||||
|
||||
@ -2729,7 +2702,7 @@ class layout extends common {
|
||||
){
|
||||
$itemsLeft .= '<a class="' . $parentPageId . '" href="'. helper::baseUrl() . $this->getUrl(0).'">';
|
||||
} else {
|
||||
$itemsLeft .= '<a class="' . $active . $parentPageId . '" href="' . helper::baseUrl() . $parentPageId . '"' . $targetBlank . $targetLity . '>';
|
||||
$itemsLeft .= '<a class="' . $active . $parentPageId . '" href="' . helper::baseUrl() . $parentPageId . '"' . $targetBlank . '>';
|
||||
}
|
||||
|
||||
switch ($this->getData(['page', $parentPageId, 'typeMenu'])) {
|
||||
@ -2777,9 +2750,6 @@ class layout extends common {
|
||||
// Propriétés de l'item
|
||||
$active = ($childKey === $currentPageId) ? 'active ' : '';
|
||||
$targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : '';
|
||||
$targetLity = $this->getData(['page', $childKey, 'lity'])
|
||||
&& $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
||||
? ' rel="data-lity" ' : '';
|
||||
// Mise en page du sous-item
|
||||
$itemsLeft .= '<li>';
|
||||
if ( ( $this->getData(['page',$childKey,'disable']) === true
|
||||
@ -2792,7 +2762,7 @@ class layout extends common {
|
||||
){
|
||||
$itemsLeft .= '<a class="' . $parentPageId . '" href="'.helper::baseUrl() . $this->getUrl(0).'">';
|
||||
} else {
|
||||
$itemsLeft .= '<a class="' . $active . $parentPageId . '" href="' . helper::baseUrl() . $childKey . '"' . $targetBlank . $targetLity . '>';
|
||||
$itemsLeft .= '<a class="' . $active . $parentPageId . '" href="' . helper::baseUrl() . $childKey . '"' . $targetBlank . '>';
|
||||
}
|
||||
|
||||
switch ($this->getData(['page', $childKey, 'typeMenu'])) {
|
||||
@ -2896,9 +2866,6 @@ class layout extends common {
|
||||
// Propriétés de l'item
|
||||
$active = ($parentPageId === $currentPageId OR in_array($currentPageId, $childrenPageIds)) ? ' class="active"' : '';
|
||||
$targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank" ' : '';
|
||||
$targetLity = $this->getData(['page', $parentPageId, 'lity'])
|
||||
&& $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
||||
? ' rel="data-lity" ' : '';
|
||||
// Mise en page de l'item;
|
||||
// Ne pas afficher le parent d'une sous-page quand l'option est sélectionnée.
|
||||
if ($onlyChildren === false) {
|
||||
@ -2907,7 +2874,7 @@ class layout extends common {
|
||||
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) {
|
||||
$items .= '<a href="'.$this->getUrl(1).'">';
|
||||
} else {
|
||||
$items .= '<a href="'. helper::baseUrl() . $parentPageId . '"' . $targetBlank . $targetLity . $active .'>';
|
||||
$items .= '<a href="'. helper::baseUrl() . $parentPageId . '"' . $targetBlank . $active .'>';
|
||||
}
|
||||
$items .= $this->getData(['page', $parentPageId, 'title']);
|
||||
$items .= '</a>';
|
||||
@ -2922,9 +2889,6 @@ class layout extends common {
|
||||
// Propriétés de l'item
|
||||
$active = ($childKey === $currentPageId) ? ' class="active"' : '';
|
||||
$targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : '';
|
||||
$targetLity = $this->getData(['page', $childKey, 'lity'])
|
||||
&& $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
||||
? ' rel="data-lity" ' : '';
|
||||
// Mise en page du sous-item
|
||||
$itemsChildren .= '<li class="menuSideChild">';
|
||||
|
||||
@ -2932,7 +2896,7 @@ class layout extends common {
|
||||
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) {
|
||||
$itemsChildren .= '<a href="'.$this->getUrl(1).'">';
|
||||
} else {
|
||||
$itemsChildren .= '<a href="' . helper::baseUrl() . $childKey . '"' . $targetBlank . $targetLity . $active . '>';
|
||||
$itemsChildren .= '<a href="' . helper::baseUrl() . $childKey . '"' . $targetBlank . $active . '>';
|
||||
}
|
||||
|
||||
$itemsChildren .= $this->getData(['page', $childKey, 'title']);
|
||||
|
@ -145,8 +145,7 @@ class page extends common {
|
||||
'displayMenu' => '0',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuHead' => false,
|
||||
'hideMenuChildren' => false,
|
||||
'lity' => false
|
||||
'hideMenuChildren' => false
|
||||
]
|
||||
]);
|
||||
// Met à jour le site map
|
||||
@ -418,8 +417,7 @@ class page extends common {
|
||||
'displayMenu' => $this->getinput('pageEditDisplayMenu'),
|
||||
'hideMenuSide' => $this->getinput('pageEditHideMenuSide', helper::FILTER_BOOLEAN),
|
||||
'hideMenuHead' => $this->getinput('pageEditHideMenuHead', helper::FILTER_BOOLEAN),
|
||||
'hideMenuChildren' => $this->getinput('pageEditHideMenuChildren', helper::FILTER_BOOLEAN),
|
||||
'lity' => $this->getinput('pageEditLity', helper::FILTER_BOOLEAN)
|
||||
'hideMenuChildren' => $this->getinput('pageEditHideMenuChildren', helper::FILTER_BOOLEAN)
|
||||
]
|
||||
]);
|
||||
// Barre renommée : changement le nom de la barre dans les pages mères
|
||||
|
@ -540,21 +540,6 @@ pageTypeMenuDOM.on("change", function() {
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Désactive targeblank si datality et inversement
|
||||
*/
|
||||
$("#pageEditLity").on("click", function() {
|
||||
if( $("#pageEditTargetBlank").is(':checked')){
|
||||
$("#pageEditTargetBlank").prop('checked', false)
|
||||
}
|
||||
});
|
||||
$("#pageEditTargetBlank").on("click", function() {
|
||||
if( $("#pageEditLity").is(':checked')){
|
||||
$("#pageEditLity").prop('checked', false)
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Soumission du formulaire pour éditer le module
|
||||
*/
|
||||
|
@ -191,24 +191,17 @@ echo template::formOpen('pageEditForm');
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('pageEditDisable', true, 'Désactivée', [
|
||||
'checked' => $this->getData(['page', $this->getUrl(2), 'disable']),
|
||||
'help' => 'Une page désactivée n\'est pas cliquable en mode déconnecté, les pages enfants sont visibles et accessibles. La page d\'accueil n\'est pas désactivable.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('pageEditTargetBlank', true, 'Nouvel onglet', [
|
||||
'checked' => $this->getData(['page', $this->getUrl(2), 'targetBlank'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::checkbox('pageEditLity', true, 'Fenêtre superposée', [
|
||||
'checked' => $this->getData(['page', $this->getUrl(2), 'lity']),
|
||||
'help' => 'Affiche la page dans une fenêtre superposée, cette option ne s\'applique pas en mode connecté.'
|
||||
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
|
Loading…
Reference in New Issue
Block a user