ZwiiCMS/module/slider/view/index/index.js.php

54 lines
2.6 KiB
PHP
Raw Normal View History

2023-07-24 21:18:56 +02:00
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
2024-01-14 19:31:28 +01:00
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
2023-07-24 21:18:56 +02:00
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.fr/
*/
/**
*
auto: true, // Boolean: Animate automatically, true or false
speed: 500, // Integer: Speed of the transition, in milliseconds
timeout: 4000, // Integer: Time between slide transitions, in milliseconds
pager: false, // Boolean: Show pager, true or false
nav: false, // Boolean: Show navigation, true or false
random: false, // Boolean: Randomize the order of the slides, true or false
pause: false, // Boolean: Pause on hover, true or false
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
2023-11-02 15:07:29 +01:00
width: "", // Integer: Max-width of the slideshow, in pixels
2023-07-24 21:18:56 +02:00
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
before: function(){}, // Function: Before callback
after: function(){} // Function: After callback
*/
2023-11-02 15:07:29 +01:00
$(document).ready(function () {
2023-07-24 21:18:56 +02:00
2023-11-02 15:07:29 +01:00
var maxwidth = "<?php echo $this->getData(['module', $this->getUrl(0),'theme', 'maxWidth']); ?>";
2023-07-24 21:18:56 +02:00
var sort = "<?php echo $this->getData(['module', $this->getUrl(0),'theme', 'sort']); ?>";
2023-11-02 15:07:29 +01:00
$("#wrapper").css('width', "100%");
$(function () {
2023-07-24 21:18:56 +02:00
$("#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']); ?>",
2023-11-02 15:07:29 +01:00
maxwidth: maxwidth,
2023-07-24 21:18:56 +02:00
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']); ?>",
nav: true,
random: sort == "random" ? true : false,
});
});
});