forked from ZwiiCMS-Team/ZwiiCMS
slider 6.1
This commit is contained in:
parent
da03bcfa5b
commit
1570d71470
@ -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":"6.0","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';
|
||||
@ -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() {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
@ -17,10 +17,6 @@
|
||||
</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-->
|
Loading…
Reference in New Issue
Block a user