13.3.05 Bugs module Sliders

This commit is contained in:
Fred Tempez 2024-08-19 10:11:29 +02:00
parent 1b9c65189d
commit 83b4103788
5 changed files with 202 additions and 226 deletions

View File

@ -4,6 +4,7 @@
** Corrections : **
- Corrige la génération des miniatures au format avif et webp.
- Corrige le filtre FLOAT du helper qui supprimait la virgule flottante.
- Corrige des bugs dans le module Slider qui passe en version 6.6
** Modifications: **
- Mise à jour du module News 5.9, taille d'un bouton.

View File

@ -1,3 +1,7 @@
# Version 6.6
- Corrige un tri inversé
- Erreur dans la feuille de styme de la vue index
- Bug de calcul de la largeur maximale du slide dans la vue index
# Version 6.5
- Contrôle de la variable de session liée au contenu. Evite des erreurs lorsque plusieurs onglets sont ouverts.
# Version 6.4

View File

@ -27,7 +27,7 @@ class slider extends common
'index' => self::GROUP_VISITOR
];
const VERSION = '6.4';
const VERSION = '6.6';
const REALNAME = 'Carrousel';
const DELETE = true;
const UPDATE = '0.0';
@ -76,7 +76,7 @@ class slider extends common
1920 => '1920 pixels',
0 => 'Largeur de l\'écran'
];
public static $selectedMaxwidth = 0;
public static $selectedMaxwidth = 640;
// Transition
public static $speed = [
@ -125,8 +125,8 @@ class slider extends common
//Choix du tri
public static $sort = [
'asc' => 'Alphabétique naturel',
'dsc' => 'Alphabétique naturel inverse',
'dsc' => 'Alphabétique naturel',
'asc' => 'Alphabétique naturel inverse',
'rand' => 'Aléatoire',
'none' => 'Par défaut, sans tri',
];
@ -236,21 +236,7 @@ class slider extends common
];
}
}
// Tri des images pour affichage de la liste dans la page d'édition
switch ($this->getData(['module', $this->getUrl(0), 'theme', 'sort'])) {
case 'dsc':
ksort(self::$pictures, SORT_NATURAL | SORT_FLAG_CASE);
break;
case 'asc':
krsort(self::$pictures, SORT_NATURAL | SORT_FLAG_CASE);
break;
case 'rand':
case 'none':
default:
break;
}
}
// Valeurs en sortie
$this->addOutput([
@ -353,7 +339,7 @@ class slider extends common
// Sélection largeur de l'écran
self::$selectedMaxwidth = array_key_exists($this->getData(['module', $this->getUrl(0), 'theme', 'maxWidth']), self::$screenWidth)
? $this->getData(['module', $this->getUrl(0), 'theme', 'maxWidth'])
: 0;
: 640;
// Valeurs en sortie
$this->addOutput([
@ -448,7 +434,6 @@ class slider extends common
private function init()
{
if (is_null($this->getData(['module', $this->getUrl(0), 'theme']))) {
$this->setData([
'module',
$this->getUrl(0),

View File

@ -21,30 +21,30 @@
width: 100%;
padding: 0;
margin: 0 auto;
}
}
.rslides li {
.rslides li {
-webkit-backface-visibility: hidden;
position: absolute;
display: none;
width: 100%;
left: 0;
top: 0;
}
}
.rslides li:first-child {
.rslides li:first-child {
position: relative;
display: block;
float: left;
}
}
.rslides img {
.rslides img {
display: block;
height: auto;
float: left;
width: 100%;
border: 0;
}
}
#wrapper {
margin: 0 auto;
@ -81,7 +81,7 @@
.centered-btns_nav {
z-index: 3;
position: absolute;
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
top: 50%;
left: 0;
opacity: 0.7;
@ -107,11 +107,12 @@
.transparent-btns_nav {
z-index: 3;
position: absolute;
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
top: 0;
left: 0;
display: block;
background: #fff; /* Fix for IE6-9 */
background: #fff;
/* Fix for IE6-9 */
opacity: 0;
filter: alpha(opacity=1);
width: 48%;
@ -128,7 +129,7 @@
.large-btns_nav {
z-index: 3;
position: absolute;
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
opacity: 0.6;
text-indent: -9999px;
overflow: hidden;
@ -164,17 +165,17 @@
left: 0;
background: transparent url("module/slider/view/index/white.gif") no-repeat left 50%;
width: 38px;
}
}
.white-btns_nav:active {
.white-btns_nav:active {
opacity: 1.0;
}
}
.white-btns_nav.next {
.white-btns_nav.next {
left: auto;
background-position: right 50%;
right: 0;
}
}
/**
Boutons blancs
@ -200,8 +201,7 @@
.white-btns_tabs li {
display: inline;
float: none;
_float: left;
*float: left;
float: left;
margin-right: 5px;
}
@ -217,8 +217,7 @@
background: #ccc;
background: rgba(0, 0, 0, .2);
display: inline-block;
_display: block;
*display: block;
display: block;
-webkit-box-shadow: inset 0 0 2px 0 rgba(0, 0, 0, .3);
-moz-box-shadow: inset 0 0 2px 0 rgba(0, 0, 0, .3);
box-shadow: inset 0 0 2px 0 rgba(0, 0, 0, .3);
@ -231,6 +230,6 @@
.large-btns_here a,
.white-btns_here a {
background: #222;
background: rgba(0,0,0, .8);
background: rgba(0, 0, 0, .8);
}

View File

@ -39,19 +39,6 @@ $(document).ready(function () {
var screenwidth = "<?php echo intval(trim($this->getData(['theme', 'site', 'width']), 'px')); ?>";
var sort = "<?php echo $this->getData(['module', $this->getUrl(0),'theme', 'sort']); ?>";
// Réduction de la taille maximale selon la largeur de la section
// Limiter à la largeur de l'écran
if (
screenwidth !== '100%' &&
maxwidth > screenwidth
) {
mawwidth = screenwidth - 40;
}
// Largeur 100%
maxwidth = $("#site").width();
console.log(maxwidth);
$("#wrapper").css('width', "100%");
$(function () {
$("#sliders").responsiveSlides({