fix slider 6.1
This commit is contained in:
parent
9a45e6f694
commit
0151edb2bb
@ -1,3 +1,5 @@
|
||||
# Version 6.1
|
||||
- Corrige le calcul de la largeur lorsque la largeur de l'écran est de 100%
|
||||
# Version 6.0
|
||||
- Gestion des permissions intégrée dans le module
|
||||
# Version 5.1
|
||||
|
@ -1 +1 @@
|
||||
{"name":"slider","realName":"Carrousel","version":"5.1","update":"0.0","delete":true,"dataDirectory":""}
|
||||
{"name":"slider","realName":"Carrousel","version":"6.1","update":"0.0","delete":true,"dataDirectory":""}
|
@ -27,7 +27,7 @@ class slider extends common
|
||||
'index' => self::GROUP_VISITOR
|
||||
];
|
||||
|
||||
const VERSION = '6.0';
|
||||
const VERSION = '6.1';
|
||||
const REALNAME = 'Carrousel';
|
||||
const DELETE = true;
|
||||
const UPDATE = '0.0';
|
||||
@ -224,13 +224,13 @@ class slider extends common
|
||||
$fileInfos->getFilename(),
|
||||
template::text('legends[' . $fileInfos->getFilename() . ']', [
|
||||
'value' => empty($this->getData(['module', $this->getUrl(0), 'legends', str_replace('.', '', $fileInfos->getFilename())]))
|
||||
? ''
|
||||
: $this->getData(['module', $this->getUrl(0), 'legends', str_replace('.', '', $fileInfos->getFilename())])
|
||||
? ''
|
||||
: $this->getData(['module', $this->getUrl(0), 'legends', str_replace('.', '', $fileInfos->getFilename())])
|
||||
]),
|
||||
template::select('sliderHref[' . $fileInfos->getFilename() . ']', self::$pageList, [
|
||||
'selected' => empty($this->getData(['module', $this->getUrl(0), 'uri', str_replace('.', '', $fileInfos->getFilename())]))
|
||||
? ''
|
||||
: $this->getData(['module', $this->getUrl(0), 'uri', str_replace('.', '', $fileInfos->getFilename())])
|
||||
? ''
|
||||
: $this->getData(['module', $this->getUrl(0), 'uri', str_replace('.', '', $fileInfos->getFilename())])
|
||||
]),
|
||||
'<a href="' . str_replace('source', 'thumb', $directory) . '/' . self::THUMBS_SEPARATOR . $fileInfos->getFilename() . '" rel="data-lity" data-lity=""><img src="' . str_replace('source', 'thumb', $directory) . '/' . $fileInfos->getFilename() . '"></a>'
|
||||
];
|
||||
@ -313,11 +313,6 @@ class slider extends common
|
||||
// Soumission du formulaire
|
||||
if ($this->isPost()) {
|
||||
|
||||
// Adapte la largeur à celle de l'écran :
|
||||
$maxWidth = $this->getInput('sliderThememaxWidth', helper::FILTER_INT) === 0
|
||||
? intval(trim($this->getData(['theme', 'site', 'width']), 'px')) - 40
|
||||
: $this->getInput('sliderThememaxWidth', helper::FILTER_INT);
|
||||
|
||||
// Equilibrer les durées
|
||||
$speed = $this->getInput('sliderThemespeed', helper::FILTER_INT);
|
||||
$timeout = $this->getInput('sliderThemeDiapoTime', helper::FILTER_INT);
|
||||
@ -334,7 +329,7 @@ class slider extends common
|
||||
'theme' => [
|
||||
'pager' => $this->getInput('sliderThemePager', helper::FILTER_BOOLEAN),
|
||||
'auto' => $this->getInput('sliderThemeAuto', helper::FILTER_BOOLEAN),
|
||||
'maxWidth' => $maxWidth,
|
||||
'maxWidth' => $this->getInput('sliderThememaxWidth', helper::FILTER_INT),
|
||||
'speed' => $speed,
|
||||
'timeout' => $timeout,
|
||||
'namespace' => $this->getInput('sliderThemeNameSpace', helper::FILTER_STRING_SHORT),
|
||||
|
@ -24,7 +24,7 @@
|
||||
pauseControls: true, // Boolean: Pause when hovering controls, true or false
|
||||
prevText: "Previous", // String: Text for the "previous" button
|
||||
nextText: "Next", // String: Text for the "next" button
|
||||
maxwidth: "", // Integer: Max-width of the slideshow, in pixels
|
||||
width: "", // Integer: Max-width of the slideshow, in pixels
|
||||
navContainer: "", // Selector: Where controls should be appended to, default is after the 'ul'
|
||||
manualControls: "", // Selector: Declare custom pager navigation
|
||||
namespace: "rslides", // String: Change the default namespace used
|
||||
@ -33,19 +33,31 @@
|
||||
*/
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$(document).ready(function () {
|
||||
|
||||
var maxWidth = "<?php echo $this->getData(['module', $this->getUrl(0),'theme', 'maxWidth']); ?>";
|
||||
var maxwidth = "<?php echo $this->getData(['module', $this->getUrl(0),'theme', 'maxWidth']); ?>";
|
||||
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
|
||||
var screenSize = $("section").width() - 40;
|
||||
maxWidth = maxWidth < screenSize ? maxWidth : screenSize;
|
||||
$("#wrapper").css('width', maxWidth);
|
||||
$(function() {
|
||||
|
||||
// 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({
|
||||
pager: "<?php echo (bool)$this->getData(['module', $this->getUrl(0), 'theme', 'pager']); ?>",
|
||||
auto: "<?php echo (bool)$this->getData(['module', $this->getUrl(0), 'theme', 'auto']); ?>",
|
||||
maxwidth: maxWidth,
|
||||
maxwidth: maxwidth,
|
||||
speed: "<?php echo $this->getData(['module', $this->getUrl(0), 'theme', 'speed']); ?>",
|
||||
timeout: "<?php echo $this->getData(['module', $this->getUrl(0), 'theme', 'timeout']); ?>",
|
||||
namespace: "<?php echo $this->getData(['module', $this->getUrl(0), 'theme', 'namespace']); ?>",
|
||||
@ -54,8 +66,4 @@ $(document).ready(function() {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
@ -6,21 +6,17 @@
|
||||
<?php foreach ($module::$pictures as $picture => $options): ?>
|
||||
<?php if (!empty($options['uri'])): ?>
|
||||
<a href="<?php echo helper::baseUrl() . $options['uri']; ?>">
|
||||
<?php endif; ?>
|
||||
<li>
|
||||
<img src="<?php echo helper::baseUrl(false) . $picture; ?>" alt="<?php echo $options['legend']; ?>">
|
||||
</li>
|
||||
<?php if (!empty($options['uri'])): ?>
|
||||
<?php endif; ?>
|
||||
<li>
|
||||
<img src="<?php echo helper::baseUrl(false) . $picture; ?>" alt="<?php echo $options['legend']; ?>">
|
||||
</li>
|
||||
<?php if (!empty($options['uri'])): ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php echo template::speech('Aucune image dans le dossier sélectionné.'); ?>
|
||||
<?php endif; ?>
|
||||
<div id="div1">
|
||||
</div>
|
||||
<!--Pour liaison entre variables php et javascript-->
|
||||
<?php endif; ?>
|
Loading…
Reference in New Issue
Block a user