Skip to content
Permalink
Browse files

Add requested changes to simplifiy scripts

  • Loading branch information...
mjbohn committed Jan 9, 2018
1 parent 49fe32b commit 9dc69d098cead1fa4024a8029c2b23c0b796ccf3
Showing with 4 additions and 117 deletions.
  1. +3 −58 action.php
  2. +1 −59 script.js
@@ -28,63 +28,8 @@ function register(Doku_Event_Handler $controller)
*/
function addconfig2js ($event, $params) {
global $JSINFO;
$JSINFO['plugin_slider'] = array(
// general settings
'mode' => $this->getConf('mode'),
'infiniteLoop' => $this->getConf('infiniteLoop'),
'hideControlOnEnd' => $this->getConf('hideControlOnEnd'),
'speed' => $this->getConf('speed'),
'easing' => $this->getConf('easing'),
'slideMargin' => $this->getConf('slideMargin'),
'startSlide' => $this->getConf('startSlide'),
'randomStart' => $this->getConf('randomStart'),
'captions' => $this->getConf('captions'),
'ticker' => $this->getConf('ticker'),
'tickerHover' => $this->getConf('tickerHover'),
'adaptiveHeight' => $this->getConf('adaptiveHeight'),
'adaptiveHeightSpeed' => $this->getConf('adaptiveHeightSpeed'),
'video' => $this->getConf('video'),
'useCSS' => $this->getConf('useCSS'),
'preloadImages' => $this->getConf('preloadImages'),
'responsive' => $this->getConf('responsive'),
// pager
'pager' => $this->getConf('pager'),
'pagerType' => $this->getConf('pagerType'),
'pagerShortSeparator' => $this->getConf('pagerShortSeparator'),
// controls
'controls' => $this->getConf('controls'),
'nextText' => $this->getConf('nextText'),
'prevText' => $this->getConf('prevText'),
'autoControls' => $this->getConf('autoControls'),
'startText' => $this->getConf('startText'),
'stopText' => $this->getConf('stopText'),
'autoControlsCombine' => $this->getConf('autoControlsCombine'),
// auto
'auto' => $this->getConf('auto'),
'pause' => $this->getConf('pause'),
'autoStart' => $this->getConf('autoStart'),
'autoDirection' => $this->getConf('autoDirection'),
'autoHover' => $this->getConf('autoHover'),
'autoDelay' => $this->getConf('autoDelay'),
// carousel
'minSlides' => $this->getConf('minSlides'),
'maxSlides' => $this->getConf('maxSlides'),
'moveSlides' => $this->getConf('moveSlides'),
'slideWidth' => $this->getConf('slideWidth'),
// touch
'touchEnabled' => $this->getConf('touchEnabled'),
'swipeThreshold' => $this->getConf('swipeThreshold'),
'oneToOneTouch' => $this->getConf('oneToOneTouch'),
'preventDefaultSwipeX' => $this->getConf('preventDefaultSwipeX'),
'preventDefaultSwipeY' => $this->getConf('preventDefaultSwipeY')
);
global $conf;
$this->loadConfig();
$JSINFO['plugin_slider'] = $conf['plugin']['slider'];
}
}
@@ -1,63 +1,5 @@
/* DOKUWIKI:include_once jquery.bxslider.js */

jQuery(function(){
jQuery('ul.plugin_slider').bxSlider({

// general settings
mode : JSINFO['plugin_slider']['mode'],
infiniteLoop : JSINFO['plugin_slider']['infiniteLoop'],
hideControlOnEnd : JSINFO['plugin_slider']['hideControlOnEnd'],
speed : JSINFO['plugin_slider']['speed'],
easing : JSINFO['plugin_slider']['easing'],
slideMargin : JSINFO['plugin_slider']['slideMargin'],
startSlide : JSINFO['plugin_slider']['startSlide'],
randomStart : JSINFO['plugin_slider']['randomStart'],
captions : JSINFO['plugin_slider']['captions'],
ticker : JSINFO['plugin_slider']['ticker'],
tickerHover : JSINFO['plugin_slider']['tickerHover'],
adaptiveHeight : JSINFO['plugin_slider']['adaptiveHeight'],
adaptiveHeightSpeed : JSINFO['plugin_slider']['adaptiveHeightSpeed'],
video : JSINFO['plugin_slider']['video'],
useCSS : JSINFO['plugin_slider']['useCSS'],
preloadImages : JSINFO['plugin_slider']['preloadImages'],
responsive : JSINFO['plugin_slider']['responsive'],

// pager
pager : JSINFO['plugin_slider']['pager'],
pagerType : JSINFO['plugin_slider']['pagerType'],
pagerShortSeparator : JSINFO['plugin_slider']['pagerShortSeparator'],

// controls
controls : JSINFO['plugin_slider']['controls'],
nextText : JSINFO['plugin_slider']['nextText'],
prevText : JSINFO['plugin_slider']['prevText'],
autoControls : JSINFO['plugin_slider']['autoControls'],
startText : JSINFO['plugin_slider']['startText'],
stopText : JSINFO['plugin_slider']['stopText'],
autoControlsCombine : JSINFO['plugin_slider']['autoControlsCombine'],

// auto
auto : JSINFO['plugin_slider']['auto'],
pause : JSINFO['plugin_slider']['pause'],
autoStart : JSINFO['plugin_slider']['autoStart'],
autoDirection : JSINFO['plugin_slider']['autoDirection'],
autoHover : JSINFO['plugin_slider']['autoHover'],
autoDelay : JSINFO['plugin_slider']['autoDelay'],

// carousel
minSlides : JSINFO['plugin_slider']['minSlides'],
maxSlides : JSINFO['plugin_slider']['maxSlides'],
moveSlides : JSINFO['plugin_slider']['moveSlides'],
slideWidth : JSINFO['plugin_slider']['slideWidth'],

// touch
touchEnabled : JSINFO['plugin_slider']['touchEnabled'],
swipeThreshold : JSINFO['plugin_slider']['swipeThreshold'],
oneToOneTouch : JSINFO['plugin_slider']['oneToOneTouch'],
preventDefaultSwipeX : JSINFO['plugin_slider']['preventDefaultSwipeX'],
preventDefaultSwipeY : JSINFO['plugin_slider']['preventDefaultSwipeY']



});
jQuery('ul.plugin_slider').bxSlider(JSINFO['plugin_slider']);
});

0 comments on commit 9dc69d0

Please sign in to comment.
You can’t perform that action at this time.