? LICENSE.txt
Index: views-slideshow-menu.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow_menu/views-slideshow-menu.tpl.php,v
retrieving revision 1.1
diff -u -p -r1.1 views-slideshow-menu.tpl.php
--- views-slideshow-menu.tpl.php	18 Nov 2009 06:57:49 -0000	1.1
+++ views-slideshow-menu.tpl.php	4 Jan 2010 05:37:49 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: views-slideshow-menu.tpl.php,v 1.1 2009/11/18 06:57:49 redndahead Exp $
+// $Id$
 
 /**
  *  @file
Index: views_slideshow.css
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow_menu/views_slideshow.css,v
retrieving revision 1.1
diff -u -p -r1.1 views_slideshow.css
--- views_slideshow.css	18 Nov 2009 06:57:49 -0000	1.1
+++ views_slideshow.css	4 Jan 2010 05:37:49 -0000
@@ -1,4 +1,4 @@
-/* $Id: views_slideshow.css,v 1.1 2009/11/18 06:57:49 redndahead Exp $ */
+/* $Id$ */
 
 .views_slideshow_menu_no_display,
 .views_slideshow_menu_hidden {
Index: views_slideshow.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow_menu/views_slideshow.js,v
retrieving revision 1.1
diff -u -p -r1.1 views_slideshow.js
--- views_slideshow.js	18 Nov 2009 06:57:49 -0000	1.1
+++ views_slideshow.js	4 Jan 2010 05:37:49 -0000
@@ -1,4 +1,4 @@
-// $Id: views_slideshow.js,v 1.1 2009/11/18 06:57:49 redndahead Exp $
+// $Id$
 
 /**
  *  @file
@@ -9,7 +9,7 @@
  *  This will set our initial behavior, by starting up each individual slideshow.
  */
 Drupal.behaviors.viewsSlideshowMenu = function (context) {
-  
+
   $('.views_slideshow_menu_main:not(.viewsMenu-processed)', context).addClass('viewsSlideshowMenu-processed').each(function() {
     var fullIdName = $(this).attr('id');
     var fullId = '#' + fullIdName;
@@ -22,24 +22,43 @@ Drupal.behaviors.viewsSlideshowMenu = fu
       timeout:parseInt(settings.timeout),
       delay:parseInt(settings.delay),
       sync:settings.sync==1,
+      pause:settings.pause==1,
       random:settings.random==1,
-      after:function(curr, next, opts) {
-	$(settings.menu_selectors).each(function() {
-	  $(this).find('a').parent().removeClass('activeSlideMenu');
-	  $(this).find('.' + fullIdName + '-slide-' + opts.currSlide).addClass('activeSlideMenu');
-	});
+      pager:settings.menu_selector,
+      pagerEvent: 'mouseover',
+      pauseOnPagerHover: true,
+      pagerAnchorBuilder: function(idx, slide) {
+	return settings.menu_selector + ' li.slideshow-menu-item:eq(' + idx + ')';
+      },
+      before:function(curr, next, opts) {
+	var numMenuItems = $(settings.menu_selector + ' li.slideshow-menu-item').size();
+	var currentSlide = opts.nextSlide;
+	if (!$(settings.menu_selector + ' ul').hasClass('views-slideshow-menu-processed')) {
+	  $(settings.menu_selector + ' ul').addClass('views-slideshow-menu-processed');
+	  var currentSlide = 0;
+	}
+
+	if (currentSlide >= numMenuItems) {
+	  while (currentSlide >= numMenuItems) {
+	    currentSlide -= numMenuItems;
+	  }
+	}
+
+	$(settings.menu_selector + ' li').removeClass('activeSlideMenu');
+	$(settings.menu_selector + ' li.slideshow-menu-item:eq(' + currentSlide + ')').addClass('activeSlideMenu');
+
       },
       cleartype:(settings.ie.cleartype),
       cleartypeNoBg:(settings.ie.cleartypenobg)
     }
-    
+
     if (settings.effect == 'none') {
       settings.opts.speed = 1;
     }
     else {
       settings.opts.fx = settings.effect;
     }
-    
+
     /**
      * Add additional settings.
      */
@@ -62,20 +81,21 @@ Drupal.behaviors.viewsSlideshowMenu = fu
       settings.opts[prop] = value;
     }
 
-    $(fullId + ' a').each(function(i) {
-      var slideUrl = $(this).attr('href');
-      $(settings.menu_selectors).each(function() {
-	var menuLink = $(this).find('a[@href=' + slideUrl + ']');
-	if ($(menuLink).text()) {
-	  $(menuLink).parent().addClass(fullIdName + '-slide-' + i).hover(function() {
-	    $(settings.targetId).cycle(i);
-	  }, function() {
-	    
-	  });
-	}
-      });
-    });  
+    $(settings.menu_selector + ' li ul li').addClass('not-slideshow-menu-item');
+    $(settings.menu_selector + ' li:not(.not-slideshow-menu-item)').addClass('slideshow-menu-item');
+    $(settings.menu_selector + ' li.not-slideshow-menu-item').removeClass('not-slideshow-menu-item');
+
+    var numSlides = $('.views_slideshow_menu_slide').size();
+    var numMenuItems = $(settings.menu_selector + ' li.slideshow-menu-item').size();
+
+    $(settings.menu_selector + ' li.slideshow-menu-item a').each(function(i) {
+      var slideCount = i;
+      while (slideCount < numSlides) {
+	var link = $(this).attr('href');
+	$(settings.div_prefix + settings.id + '_' + slideCount).children().wrapAll('<a href="' + link + '"></a>');
+	slideCount += numMenuItems;
+      }
+    });
     $(settings.targetId).cycle(settings.opts);
-    
   });
-}
\ No newline at end of file
+}
Index: views_slideshow_menu.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow_menu/views_slideshow_menu.info,v
retrieving revision 1.1
diff -u -p -r1.1 views_slideshow_menu.info
--- views_slideshow_menu.info	18 Nov 2009 06:57:49 -0000	1.1
+++ views_slideshow_menu.info	4 Jan 2010 05:37:49 -0000
@@ -1,6 +1,6 @@
-; $Id: views_slideshow_menu.info,v 1.1 2009/11/18 06:57:49 redndahead Exp $
+; $Id$
 name = Views Slideshow: Menu
 description = Adds a menu slideshow mode to Views Slideshows.
 dependencies[] = views_slideshow
 package = Views
-core = 6.x
+core = 6.x
\ No newline at end of file
Index: views_slideshow_menu.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow_menu/views_slideshow_menu.module,v
retrieving revision 1.1
diff -u -p -r1.1 views_slideshow_menu.module
--- views_slideshow_menu.module	18 Nov 2009 06:57:49 -0000	1.1
+++ views_slideshow_menu.module	4 Jan 2010 05:37:49 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: views_slideshow_menu.module,v 1.1 2009/11/18 06:57:49 redndahead Exp $
+// $Id$
 
 /**
  *  @file
@@ -19,11 +19,10 @@ function views_slideshow_menu_theme($exi
     'views_slideshow_menu_no_display_section' => array(
       'arguments' => array('view' => NULL, 'rows' => NULL, 'id' => NULL, 'mode' => NULL, 'teaser' => TRUE),
       'file' => 'views_slideshow_menu.theme.inc',
-    ),    
+    ),
     'views_slideshow_menu_no_display_teaser' => array(
       'arguments' => array('item' => NULL, 'id' => NULL, 'count' => NULL),
       'file' => 'views_slideshow_menu.theme.inc',
     ),
   );
 }
-
Index: views_slideshow_menu.theme.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow_menu/views_slideshow_menu.theme.inc,v
retrieving revision 1.1
diff -u -p -r1.1 views_slideshow_menu.theme.inc
--- views_slideshow_menu.theme.inc	18 Nov 2009 06:57:49 -0000	1.1
+++ views_slideshow_menu.theme.inc	4 Jan 2010 05:37:49 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: views_slideshow_menu.theme.inc,v 1.1 2009/11/18 06:57:49 redndahead Exp $
+// $Id$
 
 /**
  *  @file
@@ -16,13 +16,11 @@ function template_preprocess_views_slide
   drupal_add_css($base . '/views_slideshow.css', 'module');
 
   $num_divs = sizeof($vars['rows']);
-  
-  $options['menu']['menu_selectors'] = trim($options['menu']['menu_selectors'], ',');
-  
-  foreach ($options['menu']['menus'] AS $name => $value) {
-    if ($value) {
-      $options['menu']['menu_selectors'] .= ', #block-menu-' . $name;
-    }
+
+  $options['menu']['menu_selector'] = trim($options['menu']['menu_selector']);
+
+  if (empty($options['menu']['menu_selector'])) {
+    $options['menu']['menu_selector'] = '#block-menu-' . $options['menu']['menus'];
   }
 
   $settings = array_merge(
@@ -58,7 +56,7 @@ function theme_views_slideshow_menu_no_d
   if (!$js) {
     drupal_add_js(drupal_get_path('module', 'views_slideshow') .'/js/jquery.cycle.all.min.js', 'module');
   }
-  
+
   $output = '<div id="views_slideshow_menu_teaser_section_' . $id . '" class="views_slideshow_menu_teaser_section">' . "\n";
 
   foreach ($rows as $count => $item) {
Index: views_slideshow_menu.views_slideshow.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow_menu/views_slideshow_menu.views_slideshow.inc,v
retrieving revision 1.1
diff -u -p -r1.1 views_slideshow_menu.views_slideshow.inc
--- views_slideshow_menu.views_slideshow.inc	18 Nov 2009 06:57:49 -0000	1.1
+++ views_slideshow_menu.views_slideshow.inc	4 Jan 2010 05:37:49 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: views_slideshow_menu.views_slideshow.inc,v 1.1 2009/11/18 06:57:49 redndahead Exp $
+// $Id$
 
 /**
  *  @file
@@ -39,24 +39,24 @@ function views_slideshow_menu_views_slid
     '#collapsible' => TRUE,
     '#attributes' => array('class' => 'menu'),
   );
-  
+
   $result = db_query("SELECT * FROM {menu_custom} ORDER BY title");
   $options = array();
   while($menu = db_fetch_array($result)) {
-    $options[$menu['menu_name']] = $menu['title']; 
+    $options[$menu['menu_name']] = $menu['title'];
   }
   $form['menu']['menus'] = array(
-    '#type' => 'checkboxes',
+    '#type' => 'radios',
     '#title' => t('Menu Blocks'),
     '#options' => $options,
-    '#default_value' => (isset($view->options['menu']['menus'])) ? $view->options['menu']['menus'] : array(),
-    '#description' => t('Choose the menus you want the slideshow to associate with. These menus will have to be added to the page as a block.  If this does not work consider using the Menu Selectors field below to select a menu.'),
+    '#default_value' => (isset($view->options['menu']['menus'])) ? $view->options['menu']['menus'] : '',
+    '#description' => t('Choose the menu you would like the slideshow to be associated with. These menus will have to be added to the page as a block.  If this does not work consider using the Menu Selector field below to select a menu.'),
   );
-  $form['menu']['menu_selectors'] = array(
+  $form['menu']['menu_selector'] = array(
     '#type' => 'textfield',
-    '#title' => t('Menu Selectors'),
-    '#default_value' => (isset($view->options['menu']['menu_class'])) ? $view->options['menu']['menu_class'] : '',
-    '#description' => t('Add additional css selectors to choose menus that are not in blocks. Ex. .primary-links, .secondary-links'),
+    '#title' => t('Menu Selector'),
+    '#default_value' => (isset($view->options['menu']['menu_selector'])) ? $view->options['menu']['menu_selector'] : '',
+    '#description' => t('Add a css selector to choose a menu that is not in a block. Ex. .primary-links'),
   );
   $form['menu']['timeout'] = array(
     '#type' => 'textfield',
@@ -74,7 +74,7 @@ function views_slideshow_menu_views_slid
     '#type' => 'textfield',
     '#title' => t('Speed'),
     '#default_value' => (isset($view->options['menu']['speed'])) ? $view->options['menu']['speed'] : 700,
-    '#description' => t('Time in milliseconds that each transition lasts. Numeric only!'),  
+    '#description' => t('Time in milliseconds that each transition lasts. Numeric only!'),
   );
   $form['menu']['random'] = array(
     '#type' => 'radios',
@@ -118,7 +118,7 @@ function views_slideshow_menu_views_slid
     'turnRight' => 'turnRight',
     'uncover' => 'uncover',
     'wipe' => 'wipe',
-    'zoom' => 'zoom' 
+    'zoom' => 'zoom'
   );
   $form['menu']['effect'] = array(
     '#type' => 'select',
@@ -132,7 +132,7 @@ function views_slideshow_menu_views_slid
     '#title' => t('Sync'),
     '#options' => array(1 => t('Yes'), 2 => t('No')),
     '#default_value' =>(isset($view->options['menu']['sync'])) ? $view->options['menu']['sync'] : 1,
-    '#description' => t('The sync option controls whether the slide transitions occur simultaneously. The default is yes which means that the current slide transitions out as the next slide transitions in. By setting the sync option to no you can get some interesting twists on your transitions.'),  
+    '#description' => t('The sync option controls whether the slide transitions occur simultaneously. The default is yes which means that the current slide transitions out as the next slide transitions in. By setting the sync option to no you can get some interesting twists on your transitions.'),
   );
   $form['menu']['advanced'] = array(
     '#type' => 'textarea',
@@ -169,4 +169,4 @@ function views_slideshow_menu_views_slid
   if (!is_numeric($form_state['values']['style_options']['menu']['timeout'])) {
     form_error($form['menu']['speed'], t('!setting must be numeric!',array('timeout')));
   }
-}
\ No newline at end of file
+}
