dev004 template ico

This commit is contained in:
Fred Tempez 2022-08-27 10:17:43 +02:00
parent 40f7296430
commit cb2a7f4997
10 changed files with 44 additions and 37 deletions

View File

@ -30,7 +30,7 @@ class template {
$attributes['class'],
$attributes['uniqueSubmission'] ? 'uniqueSubmission' : '',
$attributes['help'] ? ' title="' . $attributes['help'] . '" ': '',
($attributes['ico'] ? template::ico($attributes['ico'], 'right') : '') . $attributes['value']
($attributes['ico'] ? template::ico($attributes['ico'], ['margin' => 'right']) : '') . $attributes['value']
);
}
@ -334,7 +334,7 @@ class template {
%s
data-lity
>
' . self::ico('upload', 'right') . '
' . self::ico('upload', ['margin' => 'right']) . '
<span class="inputFileLabel"></span>
</a>',
$attributes['class'],
@ -423,7 +423,14 @@ class template {
* @param string $fontSize Taille de la police
* @return string
*/
public static function ico($ico, $margin = '', $animate = false, $fontSize = '1em') {
// public static function ico($ico, $margin = '', $animate = false, $fontSize = '1em') {
public static function ico($ico, array $attributes = []) {
// Attributs par défaut
$attributes = array_merge([
'margin' => '',
'animate' => false,
'fontSize' => '1em'
], $attributes);
return '<span class="zwiico-' . $ico . ($margin ? ' zwiico-margin-' . $margin : '') . ($animate ? ' animate-spin' : '') . '" style="font-size:' . $fontSize . '"><!----></span>';
}
@ -674,7 +681,7 @@ class template {
* @return string
*/
public static function speech($text) {
return '<div class="speech"><div class="speechBubble">' . $text . '</div>' . template::ico('mimi speechMimi', '', false, '7em') . '</div>';
return '<div class="speech"><div class="speechBubble">' . $text . '</div>' . template::ico('mimi speechMimi', ['fontSize'=> '7em']) . '</div>';
}
/**
@ -700,7 +707,7 @@ class template {
$attributes['class'],
$attributes['uniqueSubmission'] ? 'uniqueSubmission' : '',
helper::sprintAttributes($attributes, ['class', 'ico', 'value']),
($attributes['ico'] ? template::ico($attributes['ico'], 'right') : '') . $attributes['value']
($attributes['ico'] ? template::ico($attributes['ico'], ['margin' => 'right']) : '') . $attributes['value']
);
}

View File

@ -47,7 +47,7 @@ class common {
// Numéro de version
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/';
const ZWII_VERSION = '11.6.00-dev003';
const ZWII_VERSION = '11.6.00-dev004';
const ZWII_UPDATE_CHANNEL = "test";
public static $actions = [];
@ -1532,9 +1532,9 @@ class common {
) {
$items .= '<span id="footerDisplayMemberAccount"';
$items .= $this->getData(['theme','footer','displaymemberAccount']) === false ? ' class="displayNone"' : '';
$items .= '><wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id'). '/' . $_SESSION['csrf'] . '" >' . template::ico('user', 'all') . '</a>';
$items .= '><wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id'). '/' . $_SESSION['csrf'] . '" >' . template::ico('user', ['margin' => 'all']) . '</a>';
if( $this->getData(['user', $this->getUser('id') , 'files']) === true) $items .= '<wbr><a href="' . helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR.'core.json') .'" data-lity>' . template::ico('folder') . '</a>';
$items .= '<wbr><a id="barLogout" href="' . helper::baseUrl() . 'user/logout" >' . template::ico('logout','left') . '</a>';
$items .= '<wbr><a id="barLogout" href="' . helper::baseUrl() . 'user/logout" >' . template::ico('logout',['margin' => 'left']) . '</a>';
$items .= '</span>';
}
// Fermeture du bloc copyright
@ -1649,7 +1649,7 @@ class common {
&& $this->getData(['theme','menu','memberBar']) === true
) {
if( $this->getData(['user', $this->getUser('id') , 'files']) === true) $itemsRight .= '<li><a href="' . helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR.'core.json') .'" data-tippy-content="Gérer les fichiers" data-lity>' . template::ico('folder') . '</a></li>';
$itemsRight .= '<li><a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id'). '/' . $_SESSION['csrf'] . '" data-tippy-content="Gérer mon compte">' . template::ico('user', 'right') . '</a></li>';
$itemsRight .= '<li><a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id'). '/' . $_SESSION['csrf'] . '" data-tippy-content="Gérer mon compte">' . template::ico('user', ['margin' => 'right']) . '</a></li>';
$itemsRight .= '<li><a id="barLogout" href="' . helper::baseUrl() . 'user/logout" data-tippy-content="Me déconnecter">' . template::ico('logout') . '</a></li>';
}
// Retourne les items du menu
@ -1731,7 +1731,7 @@ class common {
}
if($childrenPageIds && $disableChild !== $totalChild &&
$this->getdata(['page',$parentPageId,'hideMenuChildren']) === false) {
$items .= template::ico('down', 'left');
$items .= template::ico('down', ['margin' => 'left']);
}
// ------------------------------------------------
$items .= '</a>';
@ -2071,7 +2071,7 @@ class common {
}
}
if($this->getUser('group') >= self::GROUP_MODERATOR) {
$rightItems .= '<li><a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id'). '/' . $_SESSION['csrf'] . '" data-tippy-content="Configurer mon compte">' . template::ico('user', 'right') . '<span id="displayUsername">' . $this->getUser('firstname') . ' ' . $this->getUser('lastname') . '</span></a></li>';
$rightItems .= '<li><a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id'). '/' . $_SESSION['csrf'] . '" data-tippy-content="Configurer mon compte">' . template::ico('user', ['margin' => 'right']) . '<span id="displayUsername">' . $this->getUser('firstname') . ' ' . $this->getUser('lastname') . '</span></a></li>';
}
$rightItems .= '<li><a id="barLogout" href="' . helper::baseUrl() . 'user/logout" data-tippy-content="Me déconnecter">' . template::ico('logout') . '</a></li>';
// Barre de membre

View File

@ -51,7 +51,7 @@
<div id="toggle">
<?php echo $this->getData(['theme','menu','burgerContent']) === 'title' ? '<div class="notranslate" id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : '' ;?>
<?php echo $this->getData(['theme','menu','burgerContent']) === 'logo' ? '<div class="notranslate" id="burgerLogo"><img src="'.helper::baseUrl(false).self::FILE_DIR.'source/'. $this->getData(['theme', 'menu', 'burgerLogo']) .'"></div>' : '' ;?>
<?php echo template::ico('menu',null,null,'2em'); ?></div>
<?php echo template::ico('menu', ['fontSize' => '2em']); ?></div>
<!-- fin du menu burger -->
<?php
$menuClass = $this->getData(['theme', 'menu', 'position']) === 'top' ? 'class="container-large"' : 'class="container"';
@ -98,7 +98,7 @@
<div id="toggle">
<?php echo $this->getData(['theme','menu','burgerContent']) === 'title' ? '<div class="notranslate" id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : '' ;?>
<?php echo $this->getData(['theme','menu','burgerContent']) === 'logo' ? '<div class="notranslate" id="burgerLogo"><img src="'.helper::baseUrl(false).self::FILE_DIR.'source/'. $this->getData(['theme', 'menu', 'burgerLogo']) .'"></div>' : '' ;?>
<?php echo template::ico('menu',null,null,'2em'); ?></div>
<?php echo template::ico('menu', ['fontSize' => '2em']); ?></div>
<!-- fin du menu burger -->
<?php
$menuClass = $this->getData(['theme', 'menu', 'wide']) === 'none' ? 'class="container-large"' : 'class="container"';
@ -116,7 +116,7 @@
<div id="toggle">
<?php echo $this->getData(['theme','menu','burgerContent']) === 'title' ? '<div class="notranslate" id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : '' ;?>
<?php echo $this->getData(['theme','menu','burgerContent']) === 'logo' ? '<div class="notranslate" id="burgerLogo"><img src="'.helper::baseUrl(false).self::FILE_DIR.'source/'. $this->getData(['theme', 'menu', 'burgerLogo']) .'"></div>' : '' ;?>
<?php echo template::ico('menu',null,null,'2em'); ?></div>
<?php echo template::ico('menu', ['fontSize' => '2em']); ?></div>
<div id="menu" class="container"><?php $this->showMenu(); ?></div>
</nav>
<?php endif; ?>
@ -167,7 +167,7 @@
<div id="toggle">
<?php echo $this->getData(['theme','menu','burgerContent']) === 'title' ? '<div class="notranslate" id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : '' ;?>
<?php echo $this->getData(['theme','menu','burgerContent']) === 'logo' ? '<div class="notranslate" id="burgerLogo"><img src="'.helper::baseUrl(false).self::FILE_DIR.'source/'. $this->getData(['theme', 'menu', 'burgerLogo']) .'"></div>' : '' ;?>
<?php echo template::ico('menu',null,null,'2em'); ?></div>
<?php echo template::ico('menu', ['fontSize' => '2em']); ?></div>
<div id="menu" class="container"><?php $this->showMenu(); ?></div>
</nav>
<?php endif; ?>

View File

@ -5,7 +5,7 @@
<h4>Sécurité de la connexion
<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/connexion" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
<?php echo template::ico('help', ['margin' => 'left']);?>
</a>
</span>
</h4>
@ -93,7 +93,7 @@
<h4>Journalisation
<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/journalisation" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
<?php echo template::ico('help', ['margin' => 'left']);?>
</a>
</span>
</h4>

View File

@ -20,7 +20,7 @@
<h4>Identité du site <?php echo template::flag('site', '20px');?>
<span id="localeHelpButton" class="helpDisplayButton" title="Cliquer pour consulter l'aide en ligne">
<a href="https://doc.zwiicms.fr/localisation-et-identite" target="_blank">
<?php echo template::ico('help', 'left');?>
<?php echo template::ico('help', ['margin' => 'left']);?>
</a>
</span>
</h4>
@ -51,7 +51,7 @@
<h4>Assignation des pages spéciales <?php echo template::flag('site', '20px');?>
<span id="localeHelpButton" class="helpDisplayButton" title="Cliquer pour consulter l'aide en ligne">
<a href="https://doc.zwiicms.fr/localisation-et-identite" target="_blank">
<?php echo template::ico('help', 'left');?>
<?php echo template::ico('help', ['margin' => 'left']);?>
</a>
</span>
</h4>
@ -111,7 +111,7 @@
<h4>Etiquettes des pages spéciales <?php echo template::flag('site', '20px');?>
<span id="labelHelpButton" class="helpDisplayButton" title="Cliquer pour consulter l'aide en ligne">
<a href="https://doc.zwiicms.fr/etiquettes-des-pages-speciales" target="_blank">
<?php echo template::ico('help', 'left');?>
<?php echo template::ico('help', ['margin' => 'left']);?>
</a>
</span>
</h4>
@ -156,7 +156,7 @@
<h4>Message d'acceptation des Cookies <?php echo template::flag('site', '20px');?>
<span id="specialeHelpButton" class="helpDisplayButton" title="Cliquer pour consulter l'aide en ligne">
<a href="https://doc.zwiicms.fr/cookies" target="_blank">
<?php echo template::ico('help', 'left');?>
<?php echo template::ico('help', ['margin' => 'left']);?>
</a>
</span>
</h4>

View File

@ -5,7 +5,7 @@
<h4>Paramètres
<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/reseau" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
<?php echo template::ico('help', ['margin' => 'left']);?>
</a>
</span>
</h4>
@ -40,7 +40,7 @@
<h4>SMTP
<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/smtp" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
<?php echo template::ico('help', ['margin' => 'left']);?>
</a>
</span>
</h4>

View File

@ -5,7 +5,7 @@
<h4>Paramètres
<span id="setupHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/parametres" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
<?php echo template::ico('help', ['margin' => 'left']);?>
</a>
</span>
</h4>
@ -58,7 +58,7 @@
<h4>Mise à jour automatisée
<span id="updateHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/mise-a-jour" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
<?php echo template::ico('help', ['margin' => 'left']);?>
</a>
</span>
</h4>
@ -102,7 +102,7 @@
<h4>Maintenance
<span id="maintenanceHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/mode-maintenance" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
<?php echo template::ico('help', ['margin' => 'left']);?>
</a>
</span>
</h4>
@ -161,7 +161,7 @@
<h4>Scripts externes
<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/scripts-externes" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
<?php echo template::ico('help', ['margin' => 'left']);?>
</a>
</span>
</h4>

View File

@ -5,7 +5,7 @@
<h4>Paramètres
<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/referencement" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
<?php echo template::ico('help', ['margin' => 'left']);?>
</a>
</span>
</h4>
@ -54,7 +54,7 @@
<h4>Réseaux sociaux
<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/reseaux-sociaux" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
<?php echo template::ico('help', ['margin' => 'left']);?>
</a>
</span>
</h4>

View File

@ -3,18 +3,18 @@
<div class="row">
<div class="col9 verticalAlignMiddle">
<div id="installUpdateProgress">
<?php echo template::ico('spin', '', true); ?>
<?php echo template::ico('spin', ['animate' => true]); ?>
<span class="installUpdateProgressText" data-id="1">1/4 : Préparation...</span>
<span class="installUpdateProgressText displayNone" data-id="2">2/4 : Téléchargement...</span>
<span class="installUpdateProgressText displayNone" data-id="3">3/4 : Installation...</span>
<span class="installUpdateProgressText displayNone" data-id="4">4/4 : Configuration...</span>
</div>
<div id="installUpdateError" class="colorRed displayNone">
<?php echo template::ico('cancel', ''); ?>
<?php echo template::ico('cancel'); ?>
<strong>Une erreur est survenue lors de l'étape : <span id="installUpdateErrorStep"> </span>.</strong>
</div>
<div id="installUpdateSuccess" class="colorGreen displayNone">
<?php echo template::ico('check', ''); ?>
<?php echo template::ico('check'); ?>
Mise à jour terminée avec succès.
</div>
</div>

View File

@ -70,7 +70,7 @@
<h4>Titres
<span id="infoHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/informations-generales" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
<?php echo template::ico('help', ['margin' => 'left']);?>
</a>
</span>
</h4>
@ -122,7 +122,7 @@
<h4>Emplacement dans le menu
<span id="positionHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/emplacement-dans-le-menu" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
<?php echo template::ico('help', ['margin' => 'left']);?>
</a>
</span>
</h4>
@ -177,7 +177,7 @@
<h4>Options avancées
<span id="advancedHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/options-d-emplacement-avancee" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
<?php echo template::ico('help', ['margin' => 'left']);?>
</a>
</span>
</h4>
@ -287,7 +287,7 @@
<h4>Mise en page
<span id="layoutHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/mise-en-page-2" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
<?php echo template::ico('help', ['margin' => 'left']);?>
</a>
</span>
</h4>
@ -346,7 +346,7 @@
<h4>Permission et référencement
<span id="seoHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/permission-et-referencement" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
<?php echo template::ico('help', ['margin' => 'left']);?>
</a>
</span>
</h4>