Index: views-rotator.css ========================================================= --- views-rotator.css (revision 1.3) +++ views-rotator.css Sat Feb 21 13:47:26 EST 2009 @@ -32,3 +32,22 @@ a.views-rotator-next-hover { margin: 10px 0 0 42px; } + +/* Pager */ +.views-rotator-nav { + height: 1.5em; + margin-bottom: 1em; +} +.views-rotator-nav a { + background: #000; + border: solid 1px #444; + color: #fff; + float: left; + margin-right: 0.25em; + padding: 2px 6px; +} +.views-rotator-nav a:hover, +.views-rotator-nav a.activeSlide { + background: #333; + color: #fff; +} Index: views-rotator.js ========================================================= --- views-rotator.js (revision 1.6) +++ views-rotator.js Sat Feb 21 13:41:03 EST 2009 @@ -25,6 +25,12 @@ $(settings.next).removeClass('views-rotator-next-hover'); }); } + // Add jQuery Cycle Pager Functionality + if (this.pager == 1) { + $('#' + id) + .before('
') + .cycle({ pager: '#nav-'+id }); + } if (this.auto_height == 1) { var height = null; $('#' + id + ' .views-rotator-item').each(function() { Index: views_rotator.module ========================================================= --- views_rotator.module (revision 1.4) +++ views_rotator.module Sat Feb 21 13:51:18 EST 2009 @@ -36,17 +36,24 @@ $view_settings['speed'] = check_plain($options['speed']) * 1000; $view_settings['pause'] = check_plain($options['pause']); $view_settings['cleartype'] = 1; - + - if (!empty($options['back_next_buttons'])) { + if ($options['navigation'] != 'none') { + switch ($options['navigation']) { + case 'back_next_buttons': - $view_settings['next'] = '#'. $vars['views_rotator_id'] .'-views-rotator-next'; - $view_settings['prev'] = '#'. $vars['views_rotator_id'] .'-views-rotator-prev'; + $view_settings['next'] = '#'. $vars['views_rotator_id'] .'-views-rotator-next'; + $view_settings['prev'] = '#'. $vars['views_rotator_id'] .'-views-rotator-prev'; + break; + case 'pager': + $view_settings['pager'] = 1; + break; + } } if (empty($options['height'])) { $view_settings['height'] = 'auto'; $view_settings['auto_height'] = 1; } - + drupal_add_js(array('views_rotator' => array($vars['views_rotator_id'] => $view_settings)), 'setting'); } Index: views_rotator_style_plugin.inc ========================================================= --- views_rotator_style_plugin.inc (revision 1.1) +++ views_rotator_style_plugin.inc Sat Feb 21 14:01:23 EST 2009 @@ -13,7 +13,7 @@ $options['timeout'] = 5; $options['speed'] = 1; $options['pause'] = 0; - $options['back_next_buttons'] = 0; + $options['navigation'] = 'none'; $options['height'] = ''; } @@ -39,10 +39,15 @@ '#title' => t('Pause rotation when the mouse is over the area.'), '#default_value' => $this->options['pause'], ); - $form['back_next_buttons'] = array( - '#type' => 'checkbox', - '#title' => t('Display back and next buttons when the mouse is over the area.'), - '#default_value' => $this->options['back_next_buttons'], + $form['navigation'] = array( + '#type' => 'select', + '#title' => t('Navigation Options'), + '#default_value' => $this->options['navigation'], + '#options' => array( + 'none' => t('No Navigation'), + 'back_next_buttons' => t('Display back and next buttons when the mouse is over the area.'), + 'pager' => t('Display the jQuery Cycle pagers.'), + ), ); $form['height'] = array( '#type' => 'textfield',