From 41e49c88d4750a579a94960c1e848f0d9daec8db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Auswo=CC=88ger?= Date: Tue, 18 Feb 2014 16:30:57 +0100 Subject: [PATCH] Added navigation type `none`, added option `controls`, closes #3 --- dca/tl_module.php | 13 +++++++++++-- languages/de/tl_module.php | 3 +++ languages/en/tl_module.php | 3 +++ templates/rsts_default.html5 | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/dca/tl_module.php b/dca/tl_module.php index 9e5f274..8a9cb3f 100644 --- a/dca/tl_module.php +++ b/dca/tl_module.php @@ -12,7 +12,7 @@ * @author Martin Auswöger */ -$GLOBALS['TL_DCA']['tl_module']['palettes']['rocksolid_slider'] = '{title_legend},name,headline,type;{config_legend},rsts_id,rsts_type,rsts_direction,rsts_random,rsts_skin,rsts_width,rsts_height,rsts_preloadSlides,rsts_gapSize,rsts_duration,rsts_autoplay,rsts_videoAutoplay,rsts_autoplayRestart,rsts_autoplayProgress,rsts_pauseAutoplayOnHover,rsts_navType,rsts_scaleMode,rsts_deepLinkPrefix,rsts_keyboard,rsts_captions;{template_legend:hide},rsts_template,imgSize;{expert_legend:hide},rsts_customSkin,rsts_cssPrefix,cssID,space'; +$GLOBALS['TL_DCA']['tl_module']['palettes']['rocksolid_slider'] = '{title_legend},name,headline,type;{config_legend},rsts_id,rsts_type,rsts_direction,rsts_random,rsts_skin,rsts_width,rsts_height,rsts_preloadSlides,rsts_gapSize,rsts_duration,rsts_autoplay,rsts_videoAutoplay,rsts_autoplayRestart,rsts_autoplayProgress,rsts_pauseAutoplayOnHover,rsts_navType,rsts_controls,rsts_scaleMode,rsts_deepLinkPrefix,rsts_keyboard,rsts_captions;{template_legend:hide},rsts_template,imgSize;{expert_legend:hide},rsts_customSkin,rsts_cssPrefix,cssID,space'; $GLOBALS['TL_DCA']['tl_module']['fields']['rsts_id'] = array( 'label' => &$GLOBALS['TL_LANG']['tl_module']['rsts_id'], @@ -173,10 +173,19 @@ 'bullets' => $GLOBALS['TL_LANG']['tl_module']['rsts_navType_bullets'], 'numbers' => $GLOBALS['TL_LANG']['tl_module']['rsts_navType_numbers'], 'tabs' => $GLOBALS['TL_LANG']['tl_module']['rsts_navType_tabs'], + 'none' => $GLOBALS['TL_LANG']['tl_module']['rsts_navType_none'], ), 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''", ); +// false to hide the prev and next controls +$GLOBALS['TL_DCA']['tl_module']['fields']['rsts_controls'] = array( + 'label' => &$GLOBALS['TL_LANG']['tl_module']['rsts_controls'], + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => array('tl_class' => 'w50 m12'), + 'sql' => "char(1) NOT NULL default '1'", +); // image scale mode (fit, crop, scale) // only works if width and height are not set to "auto" $GLOBALS['TL_DCA']['tl_module']['fields']['rsts_scaleMode'] = array( @@ -204,7 +213,7 @@ 'label' => &$GLOBALS['TL_LANG']['tl_module']['rsts_keyboard'], 'exclude' => true, 'inputType' => 'checkbox', - 'eval' => array('tl_class' => 'w50 m12'), + 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default '1'", ); // true to enable keyboard arrow navigation diff --git a/languages/de/tl_module.php b/languages/de/tl_module.php index ed1528d..99e8331 100644 --- a/languages/de/tl_module.php +++ b/languages/de/tl_module.php @@ -55,6 +55,9 @@ $GLOBALS['TL_LANG']['tl_module']['rsts_navType_bullets'] = 'Punkte'; $GLOBALS['TL_LANG']['tl_module']['rsts_navType_numbers'] = 'Nummeriert'; $GLOBALS['TL_LANG']['tl_module']['rsts_navType_tabs'] = 'Tabs'; +$GLOBALS['TL_LANG']['tl_module']['rsts_navType_none'] = 'Navigation ausblenden'; +$GLOBALS['TL_LANG']['tl_module']['rsts_controls'][0] = 'Weiter und Zurück anzeigen'; +$GLOBALS['TL_LANG']['tl_module']['rsts_controls'][1] = 'Aktiviert die Navigationspfeile.'; $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode'][0] = 'Skalierungsmodus'; $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode'][1] = 'Achtung: Hat keine Auswirkung wenn Höhe oder Breite auf "auto" gesetzt ist.'; $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_fit'] = 'Proportional'; diff --git a/languages/en/tl_module.php b/languages/en/tl_module.php index 0c11f36..e29767b 100644 --- a/languages/en/tl_module.php +++ b/languages/en/tl_module.php @@ -55,6 +55,9 @@ $GLOBALS['TL_LANG']['tl_module']['rsts_navType_bullets'] = 'Bullets'; $GLOBALS['TL_LANG']['tl_module']['rsts_navType_numbers'] = 'Numbers'; $GLOBALS['TL_LANG']['tl_module']['rsts_navType_tabs'] = 'Tabs'; +$GLOBALS['TL_LANG']['tl_module']['rsts_navType_none'] = 'Hide navigation'; +$GLOBALS['TL_LANG']['tl_module']['rsts_controls'][0] = 'Show next and previous arrows'; +$GLOBALS['TL_LANG']['tl_module']['rsts_controls'][1] = 'Activates the next and previous controls.'; $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode'][0] = 'Scale mode'; $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode'][1] = 'Note: Has no effect if either width or height are set to "auto".'; $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_fit'] = 'Proportional'; diff --git a/templates/rsts_default.html5 b/templates/rsts_default.html5 index 03cef6b..1f1683d 100644 --- a/templates/rsts_default.html5 +++ b/templates/rsts_default.html5 @@ -61,7 +61,7 @@ } // boolean - foreach (array('random', 'videoAutoplay', 'autoplayProgress', 'pauseAutoplayOnHover', 'keyboard', 'captions') as $key) { + foreach (array('random', 'videoAutoplay', 'autoplayProgress', 'pauseAutoplayOnHover', 'keyboard', 'captions', 'controls') as $key) { $options[$key] = (bool) $this->options['rsts_' . $key]; }