Skip to content

Commit

Permalink
Added navigation type none, added option controls, closes #3
Browse files Browse the repository at this point in the history
  • Loading branch information
ausi committed Feb 18, 2014
1 parent ebd191c commit 41e49c8
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
13 changes: 11 additions & 2 deletions dca/tl_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* @author Martin Auswöger <[email protected]>
*/

$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'],
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions languages/de/tl_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
3 changes: 3 additions & 0 deletions languages/en/tl_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion templates/rsts_default.html5
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}

Expand Down

0 comments on commit 41e49c8

Please sign in to comment.