diff -rup /views_slideshow/contrib/views_slideshow_singleframe/views_slideshow.js /views_slideshow.patched/contrib/views_slideshow_singleframe/views_slideshow.js --- /views_slideshow/contrib/views_slideshow_singleframe/views_slideshow.js 2010-02-24 12:41:52.000000000 -0400 +++ /views_slideshow.patched/contrib/views_slideshow_singleframe/views_slideshow.js 2010-03-19 09:12:15.000000000 -0400 @@ -13,6 +13,21 @@ Drupal.behaviors.viewsSlideshowSingleFra var fullId = '#' + $(this).attr('id'); var settings = Drupal.settings.viewsSlideshowSingleFrame[fullId]; settings.targetId = '#' + $(fullId + " :first").attr('id'); + + var timeouts = new Array(settings.num_divs) + for (i=0; i < timeouts.length; ++i) { + if (i == timeouts.length - 1) { + timeouts[i] = parseInt(settings.timeout) + parseInt(settings.end_delay); + } + else { + timeouts[i] = parseInt(settings.timeout); + } + } + + function calculateTimeout(currElement, nextElement, opts, isForward) { + return timeouts[opts.currSlide]; + } + settings.opts = { speed:settings.speed, @@ -45,6 +60,18 @@ Drupal.behaviors.viewsSlideshowSingleFra cleartype:(settings.ie.cleartype), cleartypeNoBg:(settings.ie.cleartypenobg) } + + switch (settings.end_behavior) { + case "wait": + settings.opts.timeoutFn = calculateTimeout; + case "stop": + settings.opts.autostop = 1; + case "redirect": + settings.opts.timeoutFn = calculateTimeout; + settings.opts.autostop = 1; + settings.opts.end = function() { + window.location = settings.end_url;} + } if (settings.pager_hover == 1) { settings.opts.pagerEvent = 'mouseover'; @@ -119,6 +146,11 @@ Drupal.behaviors.viewsSlideshowSingleFra } }); } + +function addDelayOnLastSlide(currElement, nextElement, opts, isForward) { + var index = opts.currSlide; + return timeouts[index]; +} Drupal.theme.prototype.viewsSlideshowPagerThumbnails = function (classes, idx, slide) { return '
'; diff -rup /views_slideshow/contrib/views_slideshow_singleframe/views_slideshow_singleframe.views_slideshow.inc /views_slideshow.patched/contrib/views_slideshow_singleframe/views_slideshow_singleframe.views_slideshow.inc --- /views_slideshow/contrib/views_slideshow_singleframe/views_slideshow_singleframe.views_slideshow.inc 2010-02-24 12:41:52.000000000 -0400 +++ /views_slideshow.patched/contrib/views_slideshow_singleframe/views_slideshow_singleframe.views_slideshow.inc 2010-03-19 09:12:15.000000000 -0400 @@ -26,6 +26,9 @@ function views_slideshow_singleframe_vie 'cleartypenobg' => array('default' => FALSE), ), ), + 'end_behavior' => array('default' => 'replay'), + 'end_delay' => array('default' => 0), + 'end_url' => array('default' => ''), 'advanced' => array('default' => ''), ), ); @@ -169,6 +172,31 @@ function views_slideshow_singleframe_vie '#default_value' =>(isset($view->options['singleframe']['sync'])) ? $view->options['singleframe']['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.'), ); + $options = array( + 'replay' => t('Replay'), + 'wait' => t('Wait'), + 'stop' => t('Stop'), + 'redirect' => t('Wait then redirect') + ); + $form['singleframe']['end_behavior'] = array( + '#type' => 'radios', + '#title' => t('End of loop behavior'), + '#options' => $options, + '#default_value' => (isset($view->options['singleframe']['end_behavior'])) ? $view->options['singleframe']['end_behavior'] : 'end_behavior_normal', + '#description' => t('Behavior when the slideshow finishes the first loop.