diff -Naur views_slideshow-DRUPAL-6--2/contrib/views_slideshow_singleframe/views_slideshow.js views_slideshow-min/contrib/views_slideshow_singleframe/views_slideshow.js --- views_slideshow-DRUPAL-6--2/contrib/views_slideshow_singleframe/views_slideshow.js 2009-06-23 18:03:06.000000000 -0400 +++ views_slideshow-min/contrib/views_slideshow_singleframe/views_slideshow.js 2009-05-30 17:04:55.000000000 -0400 @@ -1,4 +1,4 @@ -// $Id: views_slideshow.js,v 1.1.2.1.2.1 2009/06/23 22:03:06 aaron Exp $ +// $Id: views_slideshow.js,v 1.1.2.1 2009/04/16 02:04:52 aaron Exp $ /** * @file @@ -11,122 +11,34 @@ Drupal.behaviors.viewsSlideshowSingleFrame = function (context) { $('.views_slideshow_main:not(.viewsSlideshowSingleFrame-processed)', context).addClass('viewsSlideshowSingleFrame-processed').each(function() { var fullId = '#' + $(this).attr('id'); - - // Make sure we're working from - Drupal.settings.viewsSlideshowSingleFrame[fullId]._current_div = Drupal.settings.viewsSlideshowSingleFrame[fullId]._current_div ? Drupal.settings.viewsSlideshowSingleFrame[fullId]._current_div : 0; - var settings = Drupal.settings.viewsSlideshowSingleFrame[fullId]; + settings.targetId = '#'+$(fullId+" :first").attr('id'); - // If we only have a single div, then we have nothing to do. - // Thus, only turn on our slideshow if we have more than one slide. - if (settings.num_divs > 1) { - // This turns on the timer. - views_slideshow_timer(fullId, true); - - // This sets up the mouseover & mouseout to pause on the main element. - $(fullId).hover( - function() { - views_slideshow_pause(fullId); - }, - function() { - views_slideshow_resume(fullId); - } - ); + $(settings.targetId).cycle({ + fx:settings.effect, + speed:settings.speed, + timeout:settings.timeout, + sync:settings.sync, + random:settings.random==1, + pause:settings.pause, + prev:(settings.controls > 0)?'#views_slideshow_prev_'+settings.id:null, + next:(settings.controls > 0)?'#views_slideshow_next_'+settings.id:null + }); + + if (settings.controls > 0) { + $('#views_slideshow_playpause_' + settings.id).click(function(e) { + if (settings.paused) { + $(settings.targetId).cycle('resume'); + $('#views_slideshow_playpause_'+settings.id).addClass('views_slideshow_pause').removeClass('views_slideshow_play').text('Pause'); + settings.paused = false; + } + else { + $(settings.targetId).cycle('pause'); + $('#views_slideshow_playpause_'+settings.id).addClass('views_slideshow_play').removeClass('views_slideshow_pause').text('Resume'); + settings.paused = true; + } + e.preventDefault(); + }); } }); -} - -/** - * Set the timer on or off. - */ -function views_slideshow_timer(slideshow_main, slideshow_status) { - // Stop the current timer. - clearTimeout(Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._timer_id); - - // Start a new timer, if slideshow_status is true, unless we're currently paused. - if (slideshow_status && !Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._pause) { // !slideshow_data[slideshow_main]._pause) { - // Our timer will call views_slideshow_switch, which fades out the current slide. - Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._timer_id = setTimeout("views_slideshow_switch('" + slideshow_main + "', views_slideshow_next_div('" + slideshow_main + "'))", Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].timer_delay); - } -} - -function views_slideshow_pause(slideshow_main) { - Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._pause = true; - views_slideshow_timer(slideshow_main, false); -} - -function views_slideshow_resume(slideshow_main) { - Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._pause = false; - views_slideshow_timer(slideshow_main, true); -} - -/** - * Fade out to the new div indicated. - */ -function views_slideshow_switch(slideshow_main, new_div) { - // Turn off our timer. - views_slideshow_timer(slideshow_main, false); - // Check to see if we fade or not. - if (Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade) { - // Fade out -- at the end, switch to the next slide in the slideshow. - $(slideshow_main).fadeTo(Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade_speed, Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade_value, function() { views_slideshow_set_div(slideshow_main, new_div); }); - } - else { - // If we don't have a fade, then just switch without fading. - views_slideshow_set_div(slideshow_main, new_div); - } -} - -/** - * Set the main div html to the new node. - * We come here at the bottom of the fade. - */ -function views_slideshow_set_div(slideshow_main, new_div_number) { - // If the new div is greater than length, wrap to the first. - // If it's less than zero, wrap to the last. - if (new_div_number >= Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs) { - new_div_number = 0; - } - else if (new_div_number < 0) { - new_div_number = Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs - 1; - } - - // Grab the ID's for the two slides. - _old_breakout = Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].div_prefix + Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].id + "_" + Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._current_div; - _new_breakout = Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].div_prefix + Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].id + "_" + new_div_number; - - // Hide our old slide and display the new one. - $(_old_breakout).hide(); - $(_new_breakout).show(); - - // Set the current_div number to the new node. - Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._current_div = new_div_number; - - // Check to see if we faded here or not. - if (Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade) { - // Fade in -- at the end, turn on our timer. - $(slideshow_main).fadeTo(Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade_speed, 1, function() { views_slideshow_timer(slideshow_main, true); }); - } - else { - // If we don't have a fade, then just turn on our timer without fading. - views_slideshow_timer(slideshow_main, true); - } -} - -/** - * Get the next node div in our sequence. - */ -function views_slideshow_next_div(slideshow_main) { - if (Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].sort) { - // Select the next div, in forward or reverse order. - new_div_number = Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._current_div + Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].sort; - } - else { - // Select a random div, but make sure we don't repeat ourselves, unless there's only one div. - do { - new_div_number = Math.floor(Math.random() * Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs); - } while (Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs > 1 && (new_div_number == Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs - 1)); - } - return new_div_number; -} - +} \ No newline at end of file diff -Naur views_slideshow-DRUPAL-6--2/contrib/views_slideshow_singleframe/views_slideshow_singleframe.module views_slideshow-min/contrib/views_slideshow_singleframe/views_slideshow_singleframe.module --- views_slideshow-DRUPAL-6--2/contrib/views_slideshow_singleframe/views_slideshow_singleframe.module 2009-04-15 22:04:52.000000000 -0400 +++ views_slideshow-min/contrib/views_slideshow_singleframe/views_slideshow_singleframe.module 2009-06-24 02:04:55.000000000 -0400 @@ -16,6 +16,18 @@ 'template' => 'views-slideshow-singleframe', 'file' => 'views_slideshow_singleframe.theme.inc', ), + 'views_slideshow_singleframe_controls' =>array( + 'arguments' => array('id' => '', 'view' => NULL, 'options' => array()), + 'file' => 'views_slideshow_singleframe.theme.inc', + ), + 'views_slideshow_singleframe_no_display_section' => array( + 'arguments' => array('view' => NULL, 'rows' => NULL, 'id' => NULL, 'mode' => NULL, 'teaser' => TRUE), + 'file' => 'views_slideshow_singleframe.theme.inc', + ), + 'views_slideshow_singleframe_no_display_teaser' => array( + 'arguments' => array('item' => NULL, 'id' => NULL, 'count' => NULL), + 'file' => 'views_slideshow_singleframe.theme.inc', + ), ); } diff -Naur views_slideshow-DRUPAL-6--2/contrib/views_slideshow_singleframe/views_slideshow_singleframe.theme.inc views_slideshow-min/contrib/views_slideshow_singleframe/views_slideshow_singleframe.theme.inc --- views_slideshow-DRUPAL-6--2/contrib/views_slideshow_singleframe/views_slideshow_singleframe.theme.inc 2009-06-23 18:03:06.000000000 -0400 +++ views_slideshow-min/contrib/views_slideshow_singleframe/views_slideshow_singleframe.theme.inc 2009-06-24 02:04:55.000000000 -0400 @@ -1,5 +1,5 @@ $num_divs, - 'timer_delay' => $options['timer_delay'], - 'sort' => intval($options['sort']), - 'fade' => $fade, - 'fade_speed' => $options['fade_speed'], - 'fade_value' => $options['fade_value'], 'hoverFunction' => $hover, 'id_prefix' => '#views_slideshow_main_', 'div_prefix' => '#views_slideshow_div_', 'id' => $vars['id'], - ); + ), $options['singleframe']); drupal_add_js(array('viewsSlideshowSingleFrame' => array('#views_slideshow_main_'. $vars['id'] => $settings)), 'setting'); -/* $js = theme('views_slideshow_div_js', $vars['rows'], $vars['options'], $vars['id']); - drupal_add_js($js, 'inline');*/ +} + + +/** + * These are the slideshow elements themselves; not actually displayed, but used to give the html to the main element. + */ +function theme_views_slideshow_singleframe_no_display_section($view, $rows, $id, $mode, $teaser = TRUE) { + // Add support for the jQuery Cycle plugin. + // If we have the jQ module installed, use that to add the Cycle plugin if possible. + // That allows for version control. + if (module_exists('jq')) { + $js = jq_add('cycle'); + } + + // Otherwise, we'll add the version included with this module. + if (!$js) { + drupal_add_js(drupal_get_path('module', 'views_slideshow') .'/js/jquery.cycle.all.min.js', 'module'); + } + + $output = '
' . "\n"; + + foreach ($rows as $count => $item) { + $output .= theme('views_slideshow_singleframe_no_display_teaser', $item, $id, $count); + } + $output .= "
\n\n"; + return $output; +} + +/** + * The html that will be placed into the element in its turn during its frame. + */ +function theme_views_slideshow_singleframe_no_display_teaser($item, $id, $count) { + $class = 'class="views_slideshow_slide' . ($count ? ' views_slideshow_hidden"' : '"'); + $output = '
' . "\n "; + $output .= $item . "\n"; + $output .= '
' . "\n\n"; + return $output; +} + +function theme_views_slideshow_singleframe_controls($id,$view,$options) { +?> +
+ + + +
+ diff -Naur views_slideshow-DRUPAL-6--2/contrib/views_slideshow_singleframe/views_slideshow_singleframe.views_slideshow.inc views_slideshow-min/contrib/views_slideshow_singleframe/views_slideshow_singleframe.views_slideshow.inc --- views_slideshow-DRUPAL-6--2/contrib/views_slideshow_singleframe/views_slideshow_singleframe.views_slideshow.inc 2009-04-15 22:04:52.000000000 -0400 +++ views_slideshow-min/contrib/views_slideshow_singleframe/views_slideshow_singleframe.views_slideshow.inc 2009-05-27 09:26:28.000000000 -0400 @@ -14,18 +14,19 @@ } function views_slideshow_singleframe_views_slideshow_option_definition() { - $options['singleframe'] = array(); - $options['singleframe']['hover'] = array('default' => (module_exists('hoverintent') ? 'hoverIntent' : 'hover')); - $options['singleframe']['timer_delay'] = array('default' => 5000); - $options['singleframe']['sort'] = array('default' => 1); - $options['singleframe']['fade'] = array('default' => TRUE); - $options['singleframe']['fade_speed'] = array('default' => 'slow'); - $options['singleframe']['fade_value'] = array('default' => 0.25); + $options['singleframe'] =array( + 'contains' => array( + 'timeout' => array('default' => 5000), + 'sort' => array('default' => 1), + 'effect' => array('default' => 'fade'), + 'speed' => array('default' => 700) //normal + ) + ); return $options; } function views_slideshow_singleframe_views_slideshow_options_form(&$form, &$form_state, &$view) { - dpm($view->options); + //dpm($view->options); $form['singleframe'] = array( '#type' => 'fieldset', @@ -33,55 +34,89 @@ '#collapsible' => TRUE, '#collapsed' => !($view->options['mode'] == 'singleframe'), ); - $options = array('hover' => t('Hover')); - if (module_exists('hoverintent')) { - $options['hoverIntent'] = t('HoverIntent'); - } - $form['singleframe']['hover'] = array( - '#type' => 'radios', - '#title' => t('Mouse hover'), - '#options' => $options, - '#default_value' => $view->options['singleframe']['hover'], - '#description' => t('The !hoverintent, if installed, adds the %hoverintent option here. Selecting it causes a delay when the mouse hovers, to stop quick flybys from triggering the behavior. Selecting %hoverdefault chooses the default mouse behavior.', array('!hoverintent' => l(t('HoverIntent module'), 'http://drupal.org/project/hoverintent'), '%hoverintent' => t('HoverIntent'), '%hoverdefault' => t('Hover'))), - ); - $form['singleframe']['timer_delay'] = array( + $form['singleframe']['timeout'] = array( '#type' => 'textfield', - '#title' => t('Timer delay (in milliseconds)'), - '#default_value' => $view->options['singleframe']['timer_delay'], + '#title' => t('Timer delay'), + '#default_value' => (isset($view->options['singleframe']['timeout'])) ? $view->options['singleframe']['timeout'] : 1000, + '#description' => t('Amount of time in milliseconds between transitions.') ); - $options = array( - 1 => t('Forward'), - -1 => t('Reverse'), - 0 => t('Random'), + $form['singleframe']['speed'] = array( + '#type' => 'textfield', + '#title' => t('Speed'), + '#default_value' => (isset($view->options['singleframe']['speed'])) ? $view->options['singleframe']['speed'] : 700, + '#description' => t('Time in milliseconds that each transition lasts. Numeric only!'), ); - $form['singleframe']['sort'] = array( + $form['singleframe']['random'] = array( '#type' => 'radios', - '#title' => t('Slideshow sort order'), - '#description' => t('This option determines the sort order of the returned results within the slideshow. Note that it is not related to the View\'s sorting options, and will only affect resulting items.'), - '#options' => $options, - '#default_value' => $view->options['singleframe']['sort'], + '#title' => t('Random'), + '#description' => t('This option controls the order items are displayed. The default setting, False, uses the views ordering. True will cause the images to display in a random order.'), + '#options' => array(0 => t('False'), 1 => t('True')), + '#default_value' => isset($view->options['singleframe']['random'])? $view->options['singleframe']['random'] : 0, ); - $form['singleframe']['fade'] = array( - '#type' => 'checkbox', - '#title' => t('Fade'), - '#default_value' => $view->options['singleframe']['fade'], - '#description' => t('If checked, then the slideshow will fade between frames. Otherwise, the Fade speed and value, below, will be ignored.'), + $form['singleframe']['pause'] = array( + '#type' => 'radios', + '#title' => t('Pause'), + '#options' => array(1 => t('Yes'),2 => t('No')), + '#default_value' => (isset($view->options['singleframe']['pause'])) ? $view->options['singleframe']['pause'] : 1, + '#description' => t('Pause when hovering on the slideshow image.'), + ); + $form['singleframe']['controls'] = array( + '#type' => 'select', + '#title' => t('Controls'), + '#options' => array(0 => t('None'),1 => t('Top'),2 => t('Bottom')), + '#default_value' => (isset($view->options['singleframe']['controls'])) ? $view->options['singleframe'] : 0, + '#description' => t('Determine if controls for the slideshow (start/stop/next/previous) should appear, and if so whether they should appear before or after the slideshow.'), ); $options = array( - 'slow' => t('Slow'), - 'normal' => t('Normal'), - 'fast' => t('Fast'), - ); - $form['singleframe']['fade_speed'] = array( - '#type' => 'radios', - '#title' => t('Fade speed'), + 'none' => 'none', + 'blindX' => 'blindX', + 'blindY' => 'blindY', + 'blindZ' => 'blindZ', + 'cover' => 'cover', + 'curtainX' => 'curtainX', + 'curtainY' => 'curtainY', + 'fade' => 'fade', + 'fadeZoom' => 'fadeZoom', + 'growX' => 'growX', + 'growY' => 'growY', + 'scrollUp' => 'scrollUp', + 'scrollDown' => 'scrollDown', + 'scrollLeft' => 'scrollLeft', + 'scrollRight' => 'scrollRight', + 'scrollHorz' => 'scrollHorz', + 'scrollVert' => 'scrollVert', + 'shuffle' => 'shuffle', + 'slideX' => 'slideX', + 'slideY' => 'slideY', + 'toss' => 'toss', + 'turnUp' => 'turnUp', + 'turnDown' => 'turnDown', + 'turnLeft' => 'turnLeft', + 'turnRight' => 'turnRight', + 'uncover' => 'uncover', + 'wipe' => 'wipe', + 'zoom' => 'zoom' + ); + $form['singleframe']['effect'] = array( + '#type' => 'select', + '#title' => t('Effect'), '#options' => $options, - '#default_value' => $view->options['singleframe']['fade_speed'], + '#default_value' => (isset($view->options['singleframe']['effect'])) ? $view->options['singleframe']['effect'] : 'fade', + '#description' => t('The transition effect that will be used to change between images. Not all options below may be relevant depending on the effect.'), ); - $form['singleframe']['fade_value'] = array( - '#type' => 'textfield', - '#title' => t('Fade value'), - '#description' => t('The opacity to fade to, between 0 (fully transparent) and 1 (fully opaque).'), - '#default_value' => $view->options['singleframe']['fade_value'], + $form['singleframe']['sync'] = array( + '#type' => 'radios', + '#title' => t('Sync'), + '#options' => array(1 => t('Yes'), 2 => t('No')), + '#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.'), ); } +function views_slideshow_singleframe_views_slideshow_options_form_validate(&$form, &$form_state, &$view) { + if (!is_numeric($form_state['values']['style_options']['singleframe']['speed'])) { + form_error($form['singleframe']['speed'], t('!setting must be numeric!',array('Speed'))); + } + if (!is_numeric($form_state['values']['style_options']['singleframe']['timeout'])) { + form_error($form['singleframe']['speed'], t('!setting must be numeric!',array('timeout'))); + } +} \ No newline at end of file diff -Naur views_slideshow-DRUPAL-6--2/contrib/views_slideshow_thumbnailhover/views_slideshow.js views_slideshow-min/contrib/views_slideshow_thumbnailhover/views_slideshow.js --- views_slideshow-DRUPAL-6--2/contrib/views_slideshow_thumbnailhover/views_slideshow.js 2009-06-10 16:39:58.000000000 -0400 +++ views_slideshow-min/contrib/views_slideshow_thumbnailhover/views_slideshow.js 2009-05-30 17:04:55.000000000 -0400 @@ -1,8 +1,8 @@ -// $Id: views_slideshow.js,v 1.1.2.2 2009/06/10 20:39:58 aaron Exp $ +// $Id: views_slideshow.js,v 1.1.2.1 2009/04/20 22:51:08 aaron Exp $ /** * @file - * A simple jQuery ThumbnailHover Div Slideshow Rotator. + * A simple jQuery SingleFrame Div Slideshow Rotator. */ /** @@ -11,123 +11,66 @@ Drupal.behaviors.viewsSlideshowThumbnailHover = function (context) { $('.views_slideshow_main:not(.viewsSlideshowThumbnailHover-processed)', context).addClass('viewsSlideshowThumbnailHover-processed').each(function() { var fullId = '#' + $(this).attr('id'); - - // Make sure we're working from - Drupal.settings.viewsSlideshowThumbnailHover[fullId]._current_div = Drupal.settings.viewsSlideshowThumbnailHover[fullId]._current_div ? Drupal.settings.viewsSlideshowThumbnailHover[fullId]._current_div : 0; - var settings = Drupal.settings.viewsSlideshowThumbnailHover[fullId]; - - // If we only have a single div, then we have nothing to do. - // Thus, only turn on our slideshow if we have more than one slide. - if (settings.num_divs > 1) { - // This turns on the timer. - views_slideshow_timer(fullId, true); - - // This sets up the mouseover & mouseout to pause on the main element. - $(fullId).hover( - function() { - views_slideshow_pause(fullId); - }, - function() { - views_slideshow_resume(fullId); + settings.targetId = '#'+$(fullId+" :first").attr('id'); + settings.opts = { + fx:settings.effect, + speed:settings.speed, + timeout:settings.timeout, + sync:settings.sync, + random:settings.random==1, + pause:settings.pause, + pager:(settings.pager_event == 'hoverIntent') ? null : '#views_slideshow_breakout_teasers_' + settings.id, + pagerAnchorBuilder:(settings.pager_event == 'hoverIntent') ? null : function(idx, slide) { + return '#views_slideshow_div_breakout_teaser_' + settings.id + '_' + idx; + }, + before:(settings.pager_event == 'hoverIntent') ? function(current,next) { + var currId = (currId=$(current).attr('id')).substring(currId.lastIndexOf('_')+1) + var nextId = (nextId=$(next).attr('id')).substring(nextId.lastIndexOf('_')+1) + $('#views_slideshow_div_breakout_teaser_'+ settings.id + '_' + currId).removeClass('activeSlide'); + $('#views_slideshow_div_breakout_teaser_'+ settings.id + '_' + nextId).addClass('activeSlide'); + } : null, + pagerEvent: (settings.pager_event == 'hoverIntent') ? null : settings.pager_event, + prev:(settings.controls > 0)?'#views_slideshow_prev_'+settings.id:null, + next:(settings.controls > 0)?'#views_slideshow_next_'+settings.id:null + }; + + $(settings.targetId).cycle(settings.opts); + + if (settings.pager_event == 'hoverIntent') { + $('#views_slideshow_breakout_teasers_'+settings.id + ' .views_slideshow_div_breakout_teaser').each(function(i,obj) { + $(obj).hoverIntent( + function() { + $('.views_slideshow_div_breakout_teaser').removeClass('activeSlide'); + var id = $(this).attr('id'); + id = parseInt(id.substring(id.lastIndexOf('_')+1)); + $(settings.targetId).cycle(id); + $('#views_slideshow_div_breakout_teaser_' + settings.id + '_' + id).addClass('activeSlide'); + $(settings.targetId).cycle('stop'); + }, + function() { + var id = $(this).attr('id'); + settings.opts.startingSlide = parseInt(id.substring(id.lastIndexOf('_')+1)); + $(settings.targetId).cycle(settings.opts); + } + ); + }); + } + + if (settings.controls > 0) { + $('#views_slideshow_playpause_' + settings.id).click(function(e) { + if (settings.paused) { + $(settings.targetId).cycle('resume'); + $('#views_slideshow_playpause_'+settings.id).addClass('views_slideshow_pause').removeClass('views_slideshow_play').text('Pause'); + settings.paused = false; + } + else { + $(settings.targetId).cycle('pause'); + $('#views_slideshow_playpause_'+settings.id).addClass('views_slideshow_play').removeClass('views_slideshow_pause').text('Resume'); + settings.paused = true; } - ); + e.preventDefault(); + }); } }); -} - -/** - * Set the timer on or off. - */ -function views_slideshow_timer(slideshow_main, slideshow_status) { - // Stop the current timer. - clearTimeout(Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main]._timer_id); - - // Start a new timer, if slideshow_status is true, unless we're currently paused. - if (slideshow_status && !Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main]._pause) { // !slideshow_data[slideshow_main]._pause) { - // Our timer will call views_slideshow_switch, which fades out the current slide. - Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main]._timer_id = setTimeout("views_slideshow_switch('" + slideshow_main + "', views_slideshow_next_div('" + slideshow_main + "'))", Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main].timer_delay); - } -} - -function views_slideshow_pause(slideshow_main) { - Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main]._pause = true; - views_slideshow_timer(slideshow_main, false); -} - -function views_slideshow_resume(slideshow_main) { - Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main]._pause = false; - views_slideshow_timer(slideshow_main, true); -} - -/** - * Fade out to the new div indicated. - */ -function views_slideshow_switch(slideshow_main, new_div) { - // Turn off our timer. - views_slideshow_timer(slideshow_main, false); - - // Check to see if we fade or not. - if (Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main].fade) { - // Fade out -- at the end, switch to the next slide in the slideshow. - $(slideshow_main).fadeTo(Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main].fade_speed, Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main].fade_value, function() { views_slideshow_set_div(slideshow_main, new_div); }); - } - else { - // If we don't have a fade, then just switch without fading. - views_slideshow_set_div(slideshow_main, new_div); - } -} - -/** - * Set the main div html to the new node. - * We come here at the bottom of the fade. - */ -function views_slideshow_set_div(slideshow_main, new_div_number) { - // If the new div is greater than length, wrap to the first. - // If it's less than zero, wrap to the last. - if (new_div_number >= Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main].num_divs) { - new_div_number = 0; - } - else if (new_div_number < 0) { - new_div_number = Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main].num_divs - 1; - } - - // Grab the ID's for the two slides. - _old_breakout = Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main].div_prefix + Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main].id + "_" + Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main]._current_div; - _new_breakout = Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main].div_prefix + Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main].id + "_" + new_div_number; - - // Hide our old slide and display the new one. - $(_old_breakout).hide(); - $(_new_breakout).show(); - - // Set the current_div number to the new node. - Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main]._current_div = new_div_number; - - // Check to see if we faded here or not. - if (Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main].fade) { - // Fade in -- at the end, turn on our timer. - $(slideshow_main).fadeTo(Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main].fade_speed, 1, function() { views_slideshow_timer(slideshow_main, true); }); - } - else { - // If we don't have a fade, then just turn on our timer without fading. - views_slideshow_timer(slideshow_main, true); - } -} - -/** - * Get the next node div in our sequence. - */ -function views_slideshow_next_div(slideshow_main) { - if (Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main].sort) { - // Select the next div, in forward or reverse order. - new_div_number = Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main]._current_div + Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main].sort; - } - else { - // Select a random div, but make sure we don't repeat ourselves, unless there's only one div. - do { - new_div_number = Math.floor(Math.random() * Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main].num_divs); - } while (Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main].num_divs > 1 && (new_div_number == Drupal.settings.viewsSlideshowThumbnailHover[slideshow_main].num_divs - 1)); - } - return new_div_number; -} - +} \ No newline at end of file diff -Naur views_slideshow-DRUPAL-6--2/contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.module views_slideshow-min/contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.module --- views_slideshow-DRUPAL-6--2/contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.module 2009-04-20 18:51:08.000000000 -0400 +++ views_slideshow-min/contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.module 2009-06-24 02:04:55.000000000 -0400 @@ -21,6 +21,26 @@ 'template' => 'views-slideshow-thumbnailhover', 'file' => 'views_slideshow_thumbnailhover.theme.inc', ), + 'views_slideshow_thumbnailhover_controls' =>array( + 'arguments' => array('id' => '', 'view' => NULL, 'options' => array()), + 'file' => 'views_slideshow_thumbnailhover.theme.inc', + ), + 'views_slideshow_thumbnailhover_breakout_teaser' => array( + 'arguments' => array('item' => NULL, 'id' => NULL, 'count' => NULL), + 'file' => 'views_slideshow_thumbnailhover.theme.inc', + ), + 'views_slideshow_thumbnailhover_no_display_section' => array( + 'arguments' => array('view' => NULL, 'rows' => NULL, 'id' => NULL, 'mode' => NULL, 'teaser' => TRUE), + 'file' => 'views_slideshow_thumbnailhover.theme.inc', + ), + 'views_slideshow_thumbnailhover_no_display_teaser' => array( + 'arguments' => array('item' => NULL, 'id' => NULL, 'count' => NULL), + 'file' => 'views_slideshow_thumbnailhover.theme.inc', + ), + 'views_slideshow_thumbnailhover_breakout_teasers' => array( + 'arguments' => array('items' => NULL, 'id' => NULL), + 'file' => 'views_slideshow_thumbnailhover.theme.inc', + ), ); } diff -Naur views_slideshow-DRUPAL-6--2/contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.theme.inc views_slideshow-min/contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.theme.inc --- views_slideshow-DRUPAL-6--2/contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.theme.inc 2009-06-23 18:03:06.000000000 -0400 +++ views_slideshow-min/contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.theme.inc 2009-06-24 02:32:46.000000000 -0400 @@ -1,5 +1,5 @@ $num_divs, - 'timer_delay' => $options['timer_delay'], - 'sort' => intval($options['sort']), - 'fade' => $fade, - 'fade_speed' => $options['fade_speed'], - 'fade_value' => $options['fade_value'], - 'hoverFunction' => $hover, - 'hover_breakout' => $options['hover_breakout'], 'teasers_last' => $teasers_last, 'id_prefix' => '#views_slideshow_main_', 'div_prefix' => '#views_slideshow_div_', 'id' => $vars['id'], - ); + ), $options['thumbnailhover']); + + drupal_add_js(array('viewsSlideshowThumbnailHover' => array('#views_slideshow_main_'. $vars['id'] => $settings)), 'setting'); + if ($settings['pager_event']=='hoverIntent') { + if (module_exists('jq')) { + jq_add('hoverIntent'); + } + if (module_exists('hoverintent')) { + hoverintent_add(); + } + } +} + + +/** + * These are the slideshow elements themselves; not actually displayed, but used to give the html to the main element. + */ +function theme_views_slideshow_thumbnailhover_no_display_section($view, $rows, $id, $mode, $teaser = TRUE) { + // Add support for the jQuery Cycle plugin. + // If we have the jQ module installed, use that to add the Cycle plugin if possible. + // That allows for version control. + if (module_exists('jq')) { + $js = jq_add('cycle'); + } + + // Otherwise, we'll add the version included with this module. + if (!$js) { + drupal_add_js(drupal_get_path('module', 'views_slideshow') .'/js/jquery.cycle.all.min.js', 'module'); + } + $output = '
' . "\n"; + foreach ($view->result as $count => $node) { + $output .= theme('views_slideshow_thumbnailhover_no_display_teaser', node_view(node_load($node->nid), $teaser, FALSE, FALSE), $id, $count); + } + $output .= "
\n\n"; + return $output; +} + +/** + * The html that will be placed into the element in its turn during its frame. + */ +function theme_views_slideshow_thumbnailhover_no_display_teaser($item, $id, $count) { + $class = 'class="views_slideshow_slide' . ($count ? ' views_slideshow_hidden"' : '"'); + $output = '
' . "\n "; + $output .= $item . "\n"; + $output .= '
' . "\n\n"; + return $output; +} + +/** + * These are teasers that may be pointed at with a mouse to change the element directly. + */ +function theme_views_slideshow_thumbnailhover_breakout_teasers($items, $id) { + $output = '
' . "\n"; + $js = "$(document).ready(function() {\n"; + foreach ($items as $count => $item) { + $output .= theme('views_slideshow_thumbnailhover_breakout_teaser', $item, $id, $count); + $js .= theme('views_slideshow_thumbnailhover_breakout_teaser_js', $id, $count); + } + $js .= "})\n"; + drupal_add_js($js, 'inline'); + + $output .= "
\n\n"; - drupal_add_js(array('viewsSlideshowSingleFrame' => array('#views_slideshow_main_'. $vars['id'] => $settings)), 'setting'); + return $output; +} -/* $js = theme('views_slideshow_div_js', $vars['rows'], $vars['options'], $vars['id']); - drupal_add_js($js, 'inline');*/ +/** + * An individual breakout teaser. + */ +function theme_views_slideshow_thumbnailhover_breakout_teaser($item, $id, $count) { + $class = $count ? '' : ' views_slideshow_active_teaser'; + $output = '
' . "\n "; + $output .= $item . "\n"; + $output .= '
' . "\n\n"; + return $output; +} + + +function theme_views_slideshow_thumbnailhover_controls($id,$view,$options) { +?> +
+ + + +
+ diff -Naur views_slideshow-DRUPAL-6--2/contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.views_slideshow.inc views_slideshow-min/contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.views_slideshow.inc --- views_slideshow-DRUPAL-6--2/contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.views_slideshow.inc 2009-06-23 18:03:06.000000000 -0400 +++ views_slideshow-min/contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.views_slideshow.inc 2009-05-30 17:04:55.000000000 -0400 @@ -1,5 +1,5 @@ module_exists('hoverintent') ? 'hoverIntent' : 'hover', - 'timer_delay' => 5000, - 'sort' => 1, - 'fade' => TRUE, - 'fade_speed' => 'slow', - 'fade_value' => 0.25, - 'hover_breakout' => 'teaser', - 'teasers_last' => TRUE, + 'contains' => array ( + 'default' => (module_exists('hoverintent') ? 'hoverIntent' : 'hover'), + 'timeout' => array('default' => 5000), + 'sort' => array('default' => 1), + 'effect' => array('default' => 'fade'), + 'speed' => array('default' => 300), + 'fade_value' => array('default' => 0.25), + 'hover_breakout' => array('default' => 'teaser'), + 'teasers_last' => array('default' => TRUE) + ) ); - return $options; } function views_slideshow_thumbnailhover_views_slideshow_options_form(&$form, &$form_state, &$view) { - dpm($view->options); + //dpm($view->options); $form['thumbnailhover'] = array( '#type' => 'fieldset', @@ -37,73 +38,129 @@ '#collapsible' => TRUE, '#collapsed' => !($view->options['mode'] == 'thumbnailhover'), ); - $options = array('hover' => t('Hover')); + if (module_exists('hoverintent')) { + $options = array('hover' => t('Hover')); $options['hoverIntent'] = t('HoverIntent'); - } - $form['thumbnailhover']['hover'] = array( - '#type' => 'radios', - '#title' => t('Mouse hover'), - '#options' => $options, - '#default_value' => $view->options['thumbnailhover']['hover'], - '#description' => t('The !hoverintent, if installed, adds the %hoverintent option here. Selecting it causes a delay when the mouse hovers, to stop quick flybys from triggering the behavior. Selecting %hoverdefault chooses the default mouse behavior.', array('!hoverintent' => l(t('HoverIntent module'), 'http://drupal.org/project/hoverintent'), '%hoverintent' => t('HoverIntent'), '%hoverdefault' => t('Hover'))), - ); - $form['thumbnailhover']['timer_delay'] = array( - '#type' => 'textfield', - '#title' => t('Timer delay (in milliseconds)'), - '#default_value' => $view->options['thumbnailhover']['timer_delay'], - ); + $form['thumbnailhover']['hover'] = array( + '#type' => 'radios', + '#title' => t('Mouse hover'), + '#options' => $options, + '#default_value' => $view->options['thumbnailhover']['hover'], + '#description' => t('The !hoverintent, if installed, adds the %hoverintent option here. Selecting it causes a delay when the mouse hovers, to stop quick flybys from triggering the behavior. Selecting %hoverdefault chooses the default mouse behavior.', array('!hoverintent' => l(t('HoverIntent module'), 'http://drupal.org/project/hoverintent'), '%hoverintent' => t('HoverIntent'), '%hoverdefault' => t('Hover'))), + ); + } $options = array( - 1 => t('Forward'), - -1 => t('Reverse'), - 0 => t('Random'), + 'teaser' => t('Teaser'), + 'full' => t('Full'), ); - $form['thumbnailhover']['sort'] = array( + $form['thumbnailhover']['hover_breakout'] = array( '#type' => 'radios', - '#title' => t('Slideshow sort order'), - '#description' => t('This option determines the sort order of the returned results within the slideshow. Note that it is not related to the View\'s sorting options, and will only affect resulting items.'), + '#title' => t('Hover breakout'), '#options' => $options, - '#default_value' => $view->options['thumbnailhover']['sort'], + '#default_value' => $view->options['thumbnailhover']['hover_breakout'], + '#description' => t("Hover breakout determines how to display the breakout element of the %thumbnail mode, either as a teaser or full node. It is ignored in %single mode.", array('%thumbnail' => t('Thumbnail hover'), '%single' => t('Single frame'))), ); - $form['thumbnailhover']['fade'] = array( + $form['thumbnailhover']['teasers_last'] = array( '#type' => 'checkbox', - '#title' => t('Fade'), - '#default_value' => $view->options['thumbnailhover']['fade'], - '#description' => t('If checked, then the slideshow will fade between frames. Otherwise, the Fade speed and value, below, will be ignored.'), + '#title' => t('Display teasers last'), + '#default_value' => $view->options['thumbnailhover']['teasers_last'], + '#description' => t('When the mode is thumbnail hover, this determines whether to print the teasers first or second.'), ); - $options = array( - 'slow' => t('Slow'), - 'normal' => t('Normal'), - 'fast' => t('Fast'), + $form['thumbnailhover']['timeout'] = array( + '#type' => 'textfield', + '#title' => t('Timer delay'), + '#default_value' => $view->options['thumbnailhover']['timeout'], + '#description' => t('Amount of time in milliseconds between transitions.') + ); + $form['thumbnailhover']['speed'] = array( + '#type' => 'textfield', + '#title' => t('Speed'), + '#default_value' => $view->options['thumbnailhover']['speed'], + '#description' => t('Time in milliseconds that each transition lasts. Numeric only!'), ); - $form['thumbnailhover']['fade_speed'] = array( + $form['thumbnailhover']['random'] = array( '#type' => 'radios', - '#title' => t('Fade speed'), + '#title' => t('Random'), + '#description' => t('This option controls the order items are displayed. The default setting, False, uses the views ordering. True will cause the images to display in a random order.'), + '#options' => array(0 => t('False'), 1 => t('True')), + '#default_value' => isset($view->options['thumbnailhover']['random'])? $view->options['thumbnailhover']['random'] : 0, + ); + $form['thumbnailhover']['pause'] = array( + '#type' => 'radios', + '#title' => t('Pause'), + '#options' => array(1 => t('Yes'),2 => t('No')), + '#default_value' => $view->options['thumbnailhover']['pause'], + '#description' => t('Pause when hovering on the slideshow image.'), + ); + $options = array('mouseover' => t('Hover'), 'click' => t('Click')); + if ((module_exists('jq') && jq_add('hoverIntent')) || (module_exists('hoverintent') && hoverintent_add())) { + $options['hoverIntent'] = 'hoverIntent'; + } + $form['thumbnailhover']['pager_event'] = array( + '#type' => 'select', + '#title' => t('Pager Event'), '#options' => $options, - '#default_value' => $view->options['thumbnailhover']['fade_speed'], + '#default_value' => (isset($view->options['thumbnailhover']['pager_event']) ? $view->options['thumbnailhover']['pager_event'] : 'hover'), + '#description' => t('Which event should be used to select an image from the breakout list.'), ); - $form['thumbnailhover']['fade_value'] = array( - '#type' => 'textfield', - '#title' => t('Fade value'), - '#description' => t('The opacity to fade to, between 0 (fully transparent) and 1 (fully opaque).'), - '#default_value' => $view->options['thumbnailhover']['fade_value'], + $form['thumbnailhover']['controls'] = array( + '#type' => 'select', + '#title' => t('Controls'), + '#options' => array(0 => t('None'),1 => t('Top'),2 => t('Bottom')), + '#default_value' => (isset($view->options['thumbnailhover']['controls'])) ? $view->options['thumbnailhover'] : 0, + '#description' => t('Determine if controls for the slideshow (start/stop/next/previous) should appear, and if so whether they should appear before or after the slideshow.'), ); - $options = array( - 'teaser' => t('Teaser'), - 'full' => t('Full'), - ); - $form['thumbnailhover']['hover_breakout'] = array( - '#type' => 'radios', - '#title' => t('Hover breakout'), + 'none' => 'none', + 'blindX' => 'blindX', + 'blindY' => 'blindY', + 'blindZ' => 'blindZ', + 'cover' => 'cover', + 'curtainX' => 'curtainX', + 'curtainY' => 'curtainY', + 'fade' => 'fade', + 'fadeZoom' => 'fadeZoom', + 'growX' => 'growX', + 'growY' => 'growY', + 'scrollUp' => 'scrollUp', + 'scrollDown' => 'scrollDown', + 'scrollLeft' => 'scrollLeft', + 'scrollRight' => 'scrollRight', + 'scrollHorz' => 'scrollHorz', + 'scrollVert' => 'scrollVert', + 'shuffle' => 'shuffle', + 'slideX' => 'slideX', + 'slideY' => 'slideY', + 'toss' => 'toss', + 'turnUp' => 'turnUp', + 'turnDown' => 'turnDown', + 'turnLeft' => 'turnLeft', + 'turnRight' => 'turnRight', + 'uncover' => 'uncover', + 'wipe' => 'wipe', + 'zoom' => 'zoom' + ); + $form['thumbnailhover']['effect'] = array( + '#type' => 'select', + '#title' => t('Effect'), '#options' => $options, - '#default_value' => $view->options['hover_breakout'], - '#description' => t("Hover breakout determines how to display the breakout element of the %thumbnail mode, either as a teaser or full node. It is ignored in %single mode.", array('%thumbnail' => t('Thumbnail hover'), '%single' => t('Single frame'))), + '#default_value' => $view->options['thumbnailhover']['effect'], + '#description' => t('The transition effect that will be used to change between images. Not all options below may be relevant depending on the effect.'), ); - $form['thumbnailhover']['teasers_last'] = array( - '#type' => 'checkbox', - '#title' => t('Display teasers last'), - '#default_value' => $view->options['teasers_last'], - '#description' => t('When the mode is thumbnail hover, this determines whether to print the teasers first or second.'), + $form['thumbnailhover']['sync'] = array( + '#type' => 'radios', + '#title' => t('Sync'), + '#options' => array(1 => t('Yes'), 2 => t('No')), + '#default_value' =>$view->options['thumbnailhover']['sync'], + '#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.'), ); } +function views_slideshow_thumbnailhover_views_slideshow_options_form_validate(&$form, &$form_state, &$view) { + if (!is_numeric($form_state['values']['style_options']['thumbnailhover']['speed'])) { + form_error($form['thumbnailhover']['speed'], t('!setting must be numeric!',array('!setting' => 'Speed'))); + } + if (!is_numeric($form_state['values']['style_options']['thumbnailhover']['timeout'])) { + form_error($form['thumbnailhover']['timeout'],t('!setting must be numeric!',array('!setting' => 'Timeout'))); + } +} \ No newline at end of file diff -Naur views_slideshow-DRUPAL-6--2/views_slideshow.module views_slideshow-min/views_slideshow.module --- views_slideshow-DRUPAL-6--2/views_slideshow.module 2009-04-15 22:04:55.000000000 -0400 +++ views_slideshow-min/views_slideshow.module 2009-06-24 02:04:55.000000000 -0400 @@ -7,7 +7,7 @@ */ define('VIEWS_SLIDESHOW_MODE_SINGLE_FRAME', 'singleframe'); // this will rotate through all slideshows in a single div element -define('VIEWS_SLIDESHOW_MODE_THUMBNAIL_HOVER', 'thumbnail_hover'); // this will create thumbnails of all the node teasers, with a mouse-over triggering a larger div full node view +define('VIEWS_SLIDESHOW_MODE_THUMBNAIL_HOVER', 'thumbnailhover'); // this will create thumbnails of all the node teasers, with a mouse-over triggering a larger div full node view define('VIEWS_SLIDESHOW_MODE_JCAROUSEL', 'jcarousel'); // this uses the jcarousel jquery plugin, if the jcarousel module is installed define('VIEWS_SLIDESHOW_DEFAULT_MODE', VIEWS_SLIDESHOW_MODE_SINGLE_FRAME); @@ -44,44 +44,10 @@ */ function views_slideshow_theme($existing, $type, $theme, $path) { return array( - 'views_slideshow_single_frame' => array( - 'arguments' => array('view' => NULL, 'options' => array(), 'rows' => array(), 'title' => ''), - 'template' => 'views-slideshow-single-frame', - 'file' => 'views_slideshow.theme.inc', - ), - 'views_slideshow_thumbnail_hover' => array( - 'arguments' => array('view' => NULL, 'options' => array(), 'rows' => array(), 'title' => ''), - 'template' => 'views-slideshow-thumbnail-hover', - 'file' => 'views_slideshow.theme.inc', - ), - 'views_slideshow_div_js' => array( - 'arguments' => array('rows' => NULL, 'options' => NULL, 'id' => NULL), - 'file' => 'views_slideshow.theme.inc', - ), - 'views_slideshow_breakout_teaser_js' => array( - 'arguments' => array('id' => NULL, 'count' => NULL), - 'file' => 'views_slideshow.theme.inc', - ), 'views_slideshow_main_section' => array( 'arguments' => array('id' => NULL, 'hidden_elements' => NULL), 'file' => 'views_slideshow.theme.inc', ), - 'views_slideshow_breakout_teaser' => array( - 'arguments' => array('item' => NULL, 'id' => NULL, 'count' => NULL), - 'file' => 'views_slideshow.theme.inc', - ), - 'views_slideshow_no_display_section' => array( - 'arguments' => array('view' => NULL, 'rows' => NULL, 'id' => NULL, 'mode' => NULL, 'teaser' => TRUE), - 'file' => 'views_slideshow.theme.inc', - ), - 'views_slideshow_no_display_teaser' => array( - 'arguments' => array('item' => NULL, 'id' => NULL, 'count' => NULL), - 'file' => 'views_slideshow.theme.inc', - ), - 'views_slideshow_breakout_teasers' => array( - 'arguments' => array('items' => NULL, 'id' => NULL), - 'file' => 'views_slideshow.theme.inc', - ), ); } diff -Naur views_slideshow-DRUPAL-6--2/views_slideshow_plugins_and_cycle-2.patch views_slideshow-min/views_slideshow_plugins_and_cycle-2.patch --- views_slideshow-DRUPAL-6--2/views_slideshow_plugins_and_cycle-2.patch 1969-12-31 19:00:00.000000000 -0500 +++ views_slideshow-min/views_slideshow_plugins_and_cycle-2.patch 2009-05-16 14:21:46.000000000 -0400 @@ -0,0 +1,880 @@ +? views_slideshow_plugins_and_cycle-2.patch +? views_slideshow_plugins_and_cycle.patch +? contrib/.svn +? contrib/views_slideshow_singleframe/.svn +? contrib/views_slideshow_thumbnailhover/.svn +? css/.svn +? js/.svn +Index: views_slideshow.module +=================================================================== +RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/views_slideshow.module,v +retrieving revision 1.11.2.2 +diff -u -p -r1.11.2.2 views_slideshow.module +--- views_slideshow.module 16 Apr 2009 02:04:55 -0000 1.11.2.2 ++++ views_slideshow.module 15 May 2009 05:16:59 -0000 +@@ -7,7 +7,7 @@ + */ + + define('VIEWS_SLIDESHOW_MODE_SINGLE_FRAME', 'singleframe'); // this will rotate through all slideshows in a single div element +-define('VIEWS_SLIDESHOW_MODE_THUMBNAIL_HOVER', 'thumbnail_hover'); // this will create thumbnails of all the node teasers, with a mouse-over triggering a larger div full node view ++define('VIEWS_SLIDESHOW_MODE_THUMBNAIL_HOVER', 'thumbnailhover'); // this will create thumbnails of all the node teasers, with a mouse-over triggering a larger div full node view + define('VIEWS_SLIDESHOW_MODE_JCAROUSEL', 'jcarousel'); // this uses the jcarousel jquery plugin, if the jcarousel module is installed + define('VIEWS_SLIDESHOW_DEFAULT_MODE', VIEWS_SLIDESHOW_MODE_SINGLE_FRAME); + +Index: views_slideshow.theme.inc +=================================================================== +RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/Attic/views_slideshow.theme.inc,v +retrieving revision 1.1.2.2 +diff -u -p -r1.1.2.2 views_slideshow.theme.inc +--- views_slideshow.theme.inc 21 Mar 2009 00:36:39 -0000 1.1.2.2 ++++ views_slideshow.theme.inc 15 May 2009 05:16:59 -0000 +@@ -5,7 +5,11 @@ + * This inline js sets up the timer for this slideshow. + */ + function theme_views_slideshow_div_js($rows, $options, $id) { +- $hover = 'hover'; ++ /** ++ * TODO This can all be deleted? ++ * ++ * */ ++ /*$hover = 'hover'; + if ($options['hover'] == 'hoverIntent') { + if (module_exists('jq')) { + $hover = jq_add('hoverIntent') ? 'hoverIntent' : 'hover'; +@@ -37,7 +41,7 @@ $(document).ready(function() { + }); + }); + JS; +- return $js; ++ return ''; // $js;*/ + } + + /** +@@ -54,6 +58,17 @@ function theme_views_slideshow_main_sect + * These are the slideshow elements themselves; not actually displayed, but used to give the html to the main element. + */ + function theme_views_slideshow_no_display_section($view, $rows, $id, $mode, $teaser = TRUE) { ++ // Add support for the jQuery Cycle plugin. ++ // If we have the jQ module installed, use that to add the Cycle plugin if possible. ++ // That allows for version control. ++ if (module_exists('jq')) { ++ $js = jq_add('cycle'); ++ } ++ ++ // Otherwise, we'll add the version included with this module. ++ if (!$js) { ++ drupal_add_js(drupal_get_path('module', 'views_slideshow') .'/js/jquery.cycle.all.min.js', 'module'); ++ } + $output = '
' . "\n"; + if ($mode == VIEWS_SLIDESHOW_MODE_THUMBNAIL_HOVER) { + foreach ($view->result as $count => $node) { +@@ -61,18 +76,6 @@ function theme_views_slideshow_no_displa + } + } + else { +- // Add support for the jQuery Cycle plugin. +- // If we have the jQ module installed, use that to add the Cycle plugin if possible. +- // That allows for version control. +- if (module_exists('jq')) { +- $js = jq_add('cycle'); +- } +- +- // Otherwise, we'll add the version included with this module. +- if (!$js) { +- drupal_add_js(drupal_get_path('module', 'views_slideshow') .'/js/jquery.cycle.all.min.js', 'module'); +- } +- + foreach ($rows as $count => $item) { + $output .= theme('views_slideshow_no_display_teaser', $item, $id, $count); + } +@@ -127,7 +130,7 @@ function theme_views_slideshow_breakout_ + views_slideshow_resume("' . $id . '"); + }); + '; +- return $js; ++ return '';//$js; + } + + /** +Index: views_slideshow.views_slideshow.inc +=================================================================== +RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/Attic/views_slideshow.views_slideshow.inc,v +retrieving revision 1.1.2.2 +diff -u -p -r1.1.2.2 views_slideshow.views_slideshow.inc +--- views_slideshow.views_slideshow.inc 16 Apr 2009 02:04:55 -0000 1.1.2.2 ++++ views_slideshow.views_slideshow.inc 15 May 2009 05:16:59 -0000 +@@ -6,30 +6,15 @@ + * The default options available with Views Slideshow. + */ + +-function views_slideshow_views_slideshow_modes() { +- $options = array( +-// VIEWS_SLIDESHOW_MODE_SINGLE_FRAME => t('Single frame'), +- VIEWS_SLIDESHOW_MODE_THUMBNAIL_HOVER => t('Thumbnail hover'), +-// VIEWS_SLIDESHOW_MODE_JCAROUSEL => t('jCarousel'), +- ); +- return $options; +-} + + function views_slideshow_views_slideshow_option_definition() { + $options['mode'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_MODE); +- $options['hover'] = array('default' => (module_exists('hoverintent') ? 'hoverIntent' : 'hover')); +- $options['timer_delay'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_TIMER_DELAY); +- $options['sort'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_SORT_ORDER); +- $options['fade'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_FADE); +- $options['fade_speed'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_FADE_SPEED); +- $options['fade_value'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_FADE_VALUE); +- $options['hover_breakout'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_HOVER_BREAKOUT); +- $options['teasers_last'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_TEASERS_LAST); ++ //$options = array_merge($options, module_invoke_all('views_slideshow_option_definition')); + return $options; + } + + function views_slideshow_views_slideshow_options_form(&$form, &$form_state, &$view) { +- $options = array( ++ /*$options = array( + VIEWS_SLIDESHOW_HOVER_BREAKOUT_TEASER => t('Teaser'), + VIEWS_SLIDESHOW_HOVER_BREAKOUT_FULL => t('Full'), + ); +@@ -100,5 +85,5 @@ function views_slideshow_views_slideshow + $options = array( + VIEWS_SLIDESHOW_HOVER_BREAKOUT_TEASER => t('Teaser'), + VIEWS_SLIDESHOW_HOVER_BREAKOUT_FULL => t('Full'), +- ); ++ );*/ + } +Index: contrib/views_slideshow_singleframe/views_slideshow.js +=================================================================== +RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/contrib/views_slideshow_singleframe/Attic/views_slideshow.js,v +retrieving revision 1.1.2.1 +diff -u -p -r1.1.2.1 views_slideshow.js +--- contrib/views_slideshow_singleframe/views_slideshow.js 16 Apr 2009 02:04:52 -0000 1.1.2.1 ++++ contrib/views_slideshow_singleframe/views_slideshow.js 15 May 2009 05:16:59 -0000 +@@ -16,118 +16,12 @@ Drupal.behaviors.viewsSlideshowSingleFra + Drupal.settings.viewsSlideshowSingleFrame[fullId]._current_div = Drupal.settings.viewsSlideshowSingleFrame[fullId]._current_div ? Drupal.settings.viewsSlideshowSingleFrame[fullId]._current_div : 0; + + var settings = Drupal.settings.viewsSlideshowSingleFrame[fullId]; ++ var targetId = '#'+$(fullId+" :first").attr('id'); + +- // If we only have a single div, then we have nothing to do. +- // Thus, only turn on our slideshow if we have more than one slide. +- if (settings.num_divs > 1) { +- // This turns on the timer. +- views_slideshow_timer(fullId, true); +- +- // This sets up the mouseover & mouseout to pause on the main element. +- $(fullId).hover( +- function() { +- views_slideshow_pause(fullId); +- }, +- function() { +- views_slideshow_resume(fullId); +- } +- ); +- } ++ $(targetId).cycle({ ++ fx:settings.effect, ++ speed:settings.speed, ++ timeout:settings.timeout ++ }); + }); +-} +- +-/** +- * Set the timer on or off. +- */ +-function views_slideshow_timer(slideshow_main, slideshow_status) { +- // Stop the current timer. +- clearTimeout(Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._timer_id); +- +- // Start a new timer, if slideshow_status is true, unless we're currently paused. +- if (slideshow_status && !Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._pause) { // !slideshow_data[slideshow_main]._pause) { +- // Our timer will call views_slideshow_switch, which fades out the current slide. +- Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._timer_id = setTimeout("views_slideshow_switch('" + slideshow_main + "', views_slideshow_next_div('" + slideshow_main + "'))", Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].timer_delay); +- } +-} +- +-function views_slideshow_pause(slideshow_main) { +- Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._pause = true; +- views_slideshow_timer(slideshow_main, false); +-} +- +-function views_slideshow_resume(slideshow_main) { +- Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._pause = false; +- views_slideshow_timer(slideshow_main, true); +-} +- +-/** +- * Fade out to the new div indicated. +- */ +-function views_slideshow_switch(slideshow_main, new_div) { +- // Turn off our timer. +- views_slideshow_timer(slideshow_main, false); +- +- // Check to see if we fade or not. +- if (Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade) { +- // Fade out -- at the end, switch to the next slide in the slideshow. +- $(slideshow_main).fadeTo(Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade_speed, Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade_value, function() { views_slideshow_set_div(slideshow_main, new_div); }); +- } +- else { +- // If we don't have a fade, then just switch without fading. +- views_slideshow_set_div(slideshow_main, new_div); +- } +-} +- +-/** +- * Set the main div html to the new node. +- * We come here at the bottom of the fade. +- */ +-function views_slideshow_set_div(slideshow_main, new_div_number) { +- // If the new div is greater than length, wrap to the first. +- // If it's less than zero, wrap to the last. +- if (new_div_number >= Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs) { +- new_div_number = 0; +- } +- else if (new_div_number < 0) { +- new_div_number = Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs - 1; +- } +- +- // Grab the ID's for the two slides. +- _old_breakout = Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].div_prefix + Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].id + "_" + Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._current_div; +- _new_breakout = Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].div_prefix + Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].id + "_" + new_div_number; +- +- // Hide our old slide and display the new one. +- $(_old_breakout).hide(); +- $(_new_breakout).show(); +- +- // Set the current_div number to the new node. +- Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._current_div = new_div_number; +- +- // Check to see if we faded here or not. +- if (Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade) { +- // Fade in -- at the end, turn on our timer. +- $(slideshow_main).fadeTo(Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade_speed, 1, function() { views_slideshow_timer(slideshow_main, true); }); +- } +- else { +- // If we don't have a fade, then just turn on our timer without fading. +- views_slideshow_timer(slideshow_main, true); +- } +-} +- +-/** +- * Get the next node div in our sequence. +- */ +-function views_slideshow_next_div(slideshow_main) { +- if (Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].sort) { +- // Select the next div, in forward or reverse order. +- new_div_number = Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._current_div + Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].sort; +- } +- else { +- // Select a random div, but make sure we don't repeat ourselves, unless there's only one div. +- do { +- new_div_number = Math.floor(Math.random() * Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs); +- } while (Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs > 1 && (new_div_number == Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs - 1)); +- } +- return new_div_number; +-} +- ++} +\ No newline at end of file +Index: contrib/views_slideshow_singleframe/views_slideshow_singleframe.theme.inc +=================================================================== +RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/contrib/views_slideshow_singleframe/Attic/views_slideshow_singleframe.theme.inc,v +retrieving revision 1.1.2.1 +diff -u -p -r1.1.2.1 views_slideshow_singleframe.theme.inc +--- contrib/views_slideshow_singleframe/views_slideshow_singleframe.theme.inc 16 Apr 2009 02:04:52 -0000 1.1.2.1 ++++ contrib/views_slideshow_singleframe/views_slideshow_singleframe.theme.inc 15 May 2009 05:16:59 -0000 +@@ -15,26 +15,15 @@ function template_preprocess_views_slide + drupal_add_js($base . '/views_slideshow.js', 'module'); + drupal_add_css($base . '/views_slideshow.css', 'module'); + +- $hover = 'hover'; +- if ($options['hover'] == 'hoverIntent') { +- if (module_exists('jq')) { +- $hover = jq_add('hoverIntent') ? 'hoverIntent' : 'hover'; +- } +- else if (module_exists('hoverintent')) { +- $hover = hoverintent_add() ? 'hoverIntent' : 'hover'; +- } +- } +- + $num_divs = sizeof($vars['rows']); +- $fade = $options['fade'] ? 'true' : 'false'; + + $settings = array( + 'num_divs' => $num_divs, +- 'timer_delay' => $options['timer_delay'], +- 'sort' => intval($options['sort']), +- 'fade' => $fade, +- 'fade_speed' => $options['fade_speed'], +- 'fade_value' => $options['fade_value'], ++ 'timeout' => $options['singleframe']['timeout'], ++ 'sort' => intval($options['singleframe']['sort']), ++ 'effect' => $options['singleframe']['effect'], ++ 'speed' => $options['singleframe']['speed'], ++ 'fade_value' => $options['singleframe']['fade_value'], + 'hoverFunction' => $hover, + 'id_prefix' => '#views_slideshow_main_', + 'div_prefix' => '#views_slideshow_div_', +Index: contrib/views_slideshow_singleframe/views_slideshow_singleframe.views_slideshow.inc +=================================================================== +RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/contrib/views_slideshow_singleframe/Attic/views_slideshow_singleframe.views_slideshow.inc,v +retrieving revision 1.1.2.1 +diff -u -p -r1.1.2.1 views_slideshow_singleframe.views_slideshow.inc +--- contrib/views_slideshow_singleframe/views_slideshow_singleframe.views_slideshow.inc 16 Apr 2009 02:04:52 -0000 1.1.2.1 ++++ contrib/views_slideshow_singleframe/views_slideshow_singleframe.views_slideshow.inc 15 May 2009 05:16:59 -0000 +@@ -14,18 +14,19 @@ function views_slideshow_singleframe_vie + } + + function views_slideshow_singleframe_views_slideshow_option_definition() { +- $options['singleframe'] = array(); +- $options['singleframe']['hover'] = array('default' => (module_exists('hoverintent') ? 'hoverIntent' : 'hover')); +- $options['singleframe']['timer_delay'] = array('default' => 5000); +- $options['singleframe']['sort'] = array('default' => 1); +- $options['singleframe']['fade'] = array('default' => TRUE); +- $options['singleframe']['fade_speed'] = array('default' => 'slow'); +- $options['singleframe']['fade_value'] = array('default' => 0.25); ++ $options['singleframe'] =array( ++ 'contains' => array( ++ 'timeout' => array('default' => 5000), ++ 'sort' => array('default' => 1), ++ 'effect' => array('default' => 'fade'), ++ 'speed' => array('default' => 300) //normal ++ ) ++ ); + return $options; + } + + function views_slideshow_singleframe_views_slideshow_options_form(&$form, &$form_state, &$view) { +- dpm($view->options); ++ //dpm($view->options); + + $form['singleframe'] = array( + '#type' => 'fieldset', +@@ -33,21 +34,10 @@ function views_slideshow_singleframe_vie + '#collapsible' => TRUE, + '#collapsed' => !($view->options['mode'] == 'singleframe'), + ); +- $options = array('hover' => t('Hover')); +- if (module_exists('hoverintent')) { +- $options['hoverIntent'] = t('HoverIntent'); +- } +- $form['singleframe']['hover'] = array( +- '#type' => 'radios', +- '#title' => t('Mouse hover'), +- '#options' => $options, +- '#default_value' => $view->options['singleframe']['hover'], +- '#description' => t('The !hoverintent, if installed, adds the %hoverintent option here. Selecting it causes a delay when the mouse hovers, to stop quick flybys from triggering the behavior. Selecting %hoverdefault chooses the default mouse behavior.', array('!hoverintent' => l(t('HoverIntent module'), 'http://drupal.org/project/hoverintent'), '%hoverintent' => t('HoverIntent'), '%hoverdefault' => t('Hover'))), +- ); +- $form['singleframe']['timer_delay'] = array( ++ $form['singleframe']['timeout'] = array( + '#type' => 'textfield', + '#title' => t('Timer delay (in milliseconds)'), +- '#default_value' => $view->options['singleframe']['timer_delay'], ++ '#default_value' => $view->options['singleframe']['timeout'], + ); + $options = array( + 1 => t('Forward'), +@@ -61,22 +51,53 @@ function views_slideshow_singleframe_vie + '#options' => $options, + '#default_value' => $view->options['singleframe']['sort'], + ); +- $form['singleframe']['fade'] = array( +- '#type' => 'checkbox', +- '#title' => t('Fade'), +- '#default_value' => $view->options['singleframe']['fade'], +- '#description' => t('If checked, then the slideshow will fade between frames. Otherwise, the Fade speed and value, below, will be ignored.'), ++ $options = array( ++ 'none' => 'none', ++ 'blindX' => 'blindX', ++ 'blindY' => 'blindY', ++ 'blindZ' => 'blindZ', ++ 'cover' => 'cover', ++ 'curtainX' => 'curtainX', ++ 'curtainY' => 'curtainY', ++ 'fade' => 'fade', ++ 'fadeZoom' => 'fadeZoom', ++ 'growX' => 'growX', ++ 'growY' => 'growY', ++ 'scrollUp' => 'scrollUp', ++ 'scrollDown' => 'scrollDown', ++ 'scrollLeft' => 'scrollLeft', ++ 'scrollRight' => 'scrollRight', ++ 'scrollHorz' => 'scrollHorz', ++ 'scrollVert' => 'scrollVert', ++ 'shuffle' => 'shuffle', ++ 'slideX' => 'slideX', ++ 'slideY' => 'slideY', ++ 'toss' => 'toss', ++ 'turnUp' => 'turnUp', ++ 'turnDown' => 'turnDown', ++ 'turnLeft' => 'turnLeft', ++ 'turnRight' => 'turnRight', ++ 'uncover' => 'uncover', ++ 'wipe' => 'wipe', ++ 'zoom' => 'zoom' ++ ); ++ $form['singleframe']['effect'] = array( ++ '#type' => 'select', ++ '#title' => t('Effect'), ++ '#options' => $options, ++ '#default_value' => $view->options['singleframe']['effect'], ++ '#description' => t('The transition effect that will be used to change between images. Not all options below may be relevant depending on the effect.'), + ); + $options = array( +- 'slow' => t('Slow'), +- 'normal' => t('Normal'), +- 'fast' => t('Fast'), ++ 700 => t('Slow'), ++ 300 => t('Normal'), ++ 150 => t('Fast'), + ); +- $form['singleframe']['fade_speed'] = array( ++ $form['singleframe']['speed'] = array( + '#type' => 'radios', +- '#title' => t('Fade speed'), ++ '#title' => t('Speed'), + '#options' => $options, +- '#default_value' => $view->options['singleframe']['fade_speed'], ++ '#default_value' => $view->options['singleframe']['speed'], + ); + $form['singleframe']['fade_value'] = array( + '#type' => 'textfield', +@@ -84,4 +105,4 @@ function views_slideshow_singleframe_vie + '#description' => t('The opacity to fade to, between 0 (fully transparent) and 1 (fully opaque).'), + '#default_value' => $view->options['singleframe']['fade_value'], + ); +-} ++} +\ No newline at end of file +Index: contrib/views_slideshow_thumbnailhover/views-slideshow-thumbnailhover.tpl.php +=================================================================== +RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/contrib/views_slideshow_thumbnailhover/Attic/views-slideshow-thumbnailhover.tpl.php,v +retrieving revision 1.1.2.1 +diff -u -p -r1.1.2.1 views-slideshow-thumbnailhover.tpl.php +--- contrib/views_slideshow_thumbnailhover/views-slideshow-thumbnailhover.tpl.php 20 Apr 2009 22:51:08 -0000 1.1.2.1 ++++ contrib/views_slideshow_thumbnailhover/views-slideshow-thumbnailhover.tpl.php 15 May 2009 05:16:59 -0000 +@@ -7,19 +7,17 @@ + */ + + $base = drupal_get_path('module', 'views_slideshow_thumbnailhover'); +- drupal_add_js($base . '/js/views_slideshow.js', 'module'); +- drupal_add_css($base . '/css/views_slideshow.css', 'module'); + + $js = theme('views_slideshow_div_js', $rows, $options, $id); + drupal_add_js($js, 'inline'); + +- $teaser = ($options['hover_breakout'] == 'teaser' ? TRUE : FALSE); ++ $teaser = ($options['thumbnailhover']['hover_breakout'] == 'teaser' ? TRUE : FALSE); + $output = ''; + $view_teasers = FALSE; + + // As we're using the 'thumbnail hover' mode, then we need to display all the view thumbnails. + $view_teasers = theme('views_slideshow_breakout_teasers', $rows, $id); +- if (!$options['teasers_last']) { ++ if (!$options['thumbnailhover']['teasers_last']) { + $output .= $view_teasers; + } + +@@ -27,7 +25,7 @@ + $hidden_elements = theme('views_slideshow_no_display_section', $view, $rows, $id, $options['mode'], $teaser); + $output .= theme('views_slideshow_main_section', $id, $hidden_elements); + +- if ($view_teasers && $options['teasers_last']) { ++ if ($view_teasers && $options['thumbnailhover']['teasers_last']) { + $output .= $view_teasers; + } + +Index: contrib/views_slideshow_thumbnailhover/views_slideshow.js +=================================================================== +RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/contrib/views_slideshow_thumbnailhover/Attic/views_slideshow.js,v +retrieving revision 1.1.2.1 +diff -u -p -r1.1.2.1 views_slideshow.js +--- contrib/views_slideshow_thumbnailhover/views_slideshow.js 20 Apr 2009 22:51:08 -0000 1.1.2.1 ++++ contrib/views_slideshow_thumbnailhover/views_slideshow.js 15 May 2009 05:17:00 -0000 +@@ -8,126 +8,37 @@ + /** + * This will set our initial behavior, by starting up each individual slideshow. + */ +-Drupal.behaviors.viewsSlideshowSingleFrame = function (context) { ++Drupal.behaviors.viewsSlideshowThumbnailHover = function (context) { + $('.views_slideshow_main:not(.viewsSlideshowSingleFrame-processed)', context).addClass('viewsSlideshowSingleFrame-processed').each(function() { + var fullId = '#' + $(this).attr('id'); + +- // Make sure we're working from +- Drupal.settings.viewsSlideshowSingleFrame[fullId]._current_div = Drupal.settings.viewsSlideshowSingleFrame[fullId]._current_div ? Drupal.settings.viewsSlideshowSingleFrame[fullId]._current_div : 0; +- +- var settings = Drupal.settings.viewsSlideshowSingleFrame[fullId]; ++ var settings = Drupal.settings.viewsSlideshowThumbnailHover[fullId]; + + // If we only have a single div, then we have nothing to do. + // Thus, only turn on our slideshow if we have more than one slide. +- if (settings.num_divs > 1) { +- // This turns on the timer. +- views_slideshow_timer(fullId, true); ++ var targetId = '#'+$(fullId+" :first").attr('id'); + +- // This sets up the mouseover & mouseout to pause on the main element. +- $(fullId).hover( +- function() { +- views_slideshow_pause(fullId); +- }, +- function() { +- views_slideshow_resume(fullId); +- } +- ); +- } ++ $(targetId).cycle({ ++ fx:settings.effect, ++ speed:settings.speed, ++ timeout:settings.timeout ++ }); ++ ++ $('#views_slideshow_breakout_teasers_'+settings.id).find('.views_slideshow_div_breakout_teaser').each( ++ function(index, obj) { ++ $(obj).hover( ++ function() { ++ var id = $(this).attr('id'); ++ var i = id.substring(id.lastIndexOf('_')+1); ++ $(targetId).cycle(parseInt(i)).cycle('pause'); ++ }, ++ function() ++ { ++ $(targetId).cycle('resume'); ++ } ++ ); ++ } ++ ); ++ + }); + } +- +-/** +- * Set the timer on or off. +- */ +-function views_slideshow_timer(slideshow_main, slideshow_status) { +- // Stop the current timer. +- clearTimeout(Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._timer_id); +- +- // Start a new timer, if slideshow_status is true, unless we're currently paused. +- if (slideshow_status && !Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._pause) { // !slideshow_data[slideshow_main]._pause) { +- // Our timer will call views_slideshow_switch, which fades out the current slide. +- Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._timer_id = setTimeout("views_slideshow_switch('" + slideshow_main + "', views_slideshow_next_div('" + slideshow_main + "'))", Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].timer_delay); +- } +-} +- +-function views_slideshow_pause(slideshow_main) { +- Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._pause = true; +- views_slideshow_timer(slideshow_main, false); +-} +- +-function views_slideshow_resume(slideshow_main) { +- Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._pause = false; +- views_slideshow_timer(slideshow_main, true); +-} +- +-/** +- * Fade out to the new div indicated. +- */ +-function views_slideshow_switch(slideshow_main, new_div) { +- // Turn off our timer. +- views_slideshow_timer(slideshow_main, false); +- +- // Check to see if we fade or not. +- if (Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade) { +- // Fade out -- at the end, switch to the next slide in the slideshow. +- $(slideshow_main).fadeTo(Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade_speed, Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade_value, function() { views_slideshow_set_div(slideshow_main, new_div); }); +- } +- else { +- // If we don't have a fade, then just switch without fading. +- views_slideshow_set_div(slideshow_main, new_div); +- } +-} +- +-/** +- * Set the main div html to the new node. +- * We come here at the bottom of the fade. +- */ +-function views_slideshow_set_div(slideshow_main, new_div_number) { +- // If the new div is greater than length, wrap to the first. +- // If it's less than zero, wrap to the last. +- if (new_div_number >= Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs) { +- new_div_number = 0; +- } +- else if (new_div_number < 0) { +- new_div_number = Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs - 1; +- } +- +- // Grab the ID's for the two slides. +- _old_breakout = Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].div_prefix + Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].id + "_" + Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._current_div; +- _new_breakout = Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].div_prefix + Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].id + "_" + new_div_number; +- +- // Hide our old slide and display the new one. +- $(_old_breakout).hide(); +- $(_new_breakout).show(); +- +- // Set the current_div number to the new node. +- Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._current_div = new_div_number; +- +- // Check to see if we faded here or not. +- if (Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade) { +- // Fade in -- at the end, turn on our timer. +- $(slideshow_main).fadeTo(Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade_speed, 1, function() { views_slideshow_timer(slideshow_main, true); }); +- } +- else { +- // If we don't have a fade, then just turn on our timer without fading. +- views_slideshow_timer(slideshow_main, true); +- } +-} +- +-/** +- * Get the next node div in our sequence. +- */ +-function views_slideshow_next_div(slideshow_main) { +- if (Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].sort) { +- // Select the next div, in forward or reverse order. +- new_div_number = Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._current_div + Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].sort; +- } +- else { +- // Select a random div, but make sure we don't repeat ourselves, unless there's only one div. +- do { +- new_div_number = Math.floor(Math.random() * Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs); +- } while (Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs > 1 && (new_div_number == Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs - 1)); +- } +- return new_div_number; +-} +- +Index: contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.theme.inc +=================================================================== +RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/contrib/views_slideshow_thumbnailhover/Attic/views_slideshow_thumbnailhover.theme.inc,v +retrieving revision 1.1.2.1 +diff -u -p -r1.1.2.1 views_slideshow_thumbnailhover.theme.inc +--- contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.theme.inc 20 Apr 2009 22:51:08 -0000 1.1.2.1 ++++ contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.theme.inc 15 May 2009 05:17:00 -0000 +@@ -16,7 +16,7 @@ function template_preprocess_views_slide + drupal_add_css($base . '/views_slideshow.css', 'module'); + + $hover = 'hover'; +- if ($options['hover'] == 'hoverIntent') { ++ if ($options['thumbnailhover']['hover'] == 'hoverIntent') { + if (module_exists('jq')) { + $hover = jq_add('hoverIntent') ? 'hoverIntent' : 'hover'; + } +@@ -26,25 +26,25 @@ function template_preprocess_views_slide + } + + $num_divs = sizeof($vars['rows']); +- $fade = $options['fade'] ? 'true' : 'false'; +- $teasers_last = $options['teasers_last'] ? 'true' : 'false'; ++ $fade = $options['thumbnailhover']['fade'] ? 'true' : 'false'; ++ $teasers_last = $options['thumbnailhover']['teasers_last'] ? 'true' : 'false'; + + $settings = array( + 'num_divs' => $num_divs, +- 'timer_delay' => $options['timer_delay'], +- 'sort' => intval($options['sort']), +- 'fade' => $fade, +- 'fade_speed' => $options['fade_speed'], +- 'fade_value' => $options['fade_value'], ++ 'timeout' => $options['thumbnailhover']['timeout'], ++ 'sort' => intval($options['thumbnailhover']['sort']), ++ 'effect' => $options['thumbnailhover']['effect'], ++ 'speed' => $options['thumbnailhover']['speed'], ++ 'fade_value' => $options['thumbnailhover']['fade_value'], + 'hoverFunction' => $hover, +- 'hover_breakout' => $options['hover_breakout'], ++ 'hover_breakout' => $options['thumbnailhover']['hover_breakout'], + 'teasers_last' => $teasers_last, + 'id_prefix' => '#views_slideshow_main_', + 'div_prefix' => '#views_slideshow_div_', + 'id' => $vars['id'], + ); + +- drupal_add_js(array('viewsSlideshowSingleFrame' => array('#views_slideshow_main_'. $vars['id'] => $settings)), 'setting'); ++ drupal_add_js(array('viewsSlideshowThumbnailHover' => array('#views_slideshow_main_'. $vars['id'] => $settings)), 'setting'); + + /* $js = theme('views_slideshow_div_js', $vars['rows'], $vars['options'], $vars['id']); + drupal_add_js($js, 'inline');*/ +Index: contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.views_slideshow.inc +=================================================================== +RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/contrib/views_slideshow_thumbnailhover/Attic/views_slideshow_thumbnailhover.views_slideshow.inc,v +retrieving revision 1.1.2.1 +diff -u -p -r1.1.2.1 views_slideshow_thumbnailhover.views_slideshow.inc +--- contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.views_slideshow.inc 20 Apr 2009 22:51:08 -0000 1.1.2.1 ++++ contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.views_slideshow.inc 15 May 2009 05:17:00 -0000 +@@ -8,49 +8,70 @@ + + function views_slideshow_thumbnailhover_views_slideshow_modes() { + $options = array( +- 'thumbnailhover' => t('SingleFrame'), ++ 'thumbnailhover' => t('ThumbnailHover'), + ); + return $options; + } + + function views_slideshow_thumbnailhover_views_slideshow_option_definition() { +- $options['thumbnailhover'] = array(); +- $options['thumbnailhover']['hover'] = array('default' => (module_exists('hoverintent') ? 'hoverIntent' : 'hover')); +- $options['thumbnailhover']['timer_delay'] = array('default' => 5000); +- $options['thumbnailhover']['sort'] = array('default' => 1); +- $options['thumbnailhover']['fade'] = array('default' => TRUE); +- $options['thumbnailhover']['fade_speed'] = array('default' => 'slow'); +- $options['thumbnailhover']['fade_value'] = array('default' => 0.25); +- $options['thumbnailhover']['hover_breakout'] = array('default' => 'teaser'); +- $options['thumbnailhover']['teasers_last'] = array('default' => TRUE); +- ++ $options['thumbnailhover'] = array( ++ 'contains' => array ( ++ 'default' => (module_exists('hoverintent') ? 'hoverIntent' : 'hover'), ++ 'timeout' => array('default' => 5000), ++ 'sort' => array('default' => 1), ++ 'effect' => array('default' => 'fade'), ++ 'speed' => array('default' => 300), ++ 'fade_value' => array('default' => 0.25), ++ 'hover_breakout' => array('default' => 'teaser'), ++ 'teasers_last' => array('default' => TRUE) ++ ) ++ ); + return $options; + } + + function views_slideshow_thumbnailhover_views_slideshow_options_form(&$form, &$form_state, &$view) { +- dpm($view->options); ++ //dpm($view->options); + + $form['thumbnailhover'] = array( + '#type' => 'fieldset', +- '#title' => t('SingleFrame rotator options'), ++ '#title' => t('ThumbnailHover rotator options'), + '#collapsible' => TRUE, + '#collapsed' => !($view->options['mode'] == 'thumbnailhover'), + ); +- $options = array('hover' => t('Hover')); ++ + if (module_exists('hoverintent')) { ++ $options = array('hover' => t('Hover')); + $options['hoverIntent'] = t('HoverIntent'); ++ $form['thumbnailhover']['hover'] = array( ++ '#type' => 'radios', ++ '#title' => t('Mouse hover'), ++ '#options' => $options, ++ '#default_value' => $view->options['thumbnailhover']['hover'], ++ '#description' => t('The !hoverintent, if installed, adds the %hoverintent option here. Selecting it causes a delay when the mouse hovers, to stop quick flybys from triggering the behavior. Selecting %hoverdefault chooses the default mouse behavior.', array('!hoverintent' => l(t('HoverIntent module'), 'http://drupal.org/project/hoverintent'), '%hoverintent' => t('HoverIntent'), '%hoverdefault' => t('Hover'))), ++ ); + } +- $form['thumbnailhover']['hover'] = array( ++ ++ $options = array( ++ 'teaser' => t('Teaser'), ++ 'full' => t('Full'), ++ ); ++ $form['thumbnailhover']['hover_breakout'] = array( + '#type' => 'radios', +- '#title' => t('Mouse hover'), ++ '#title' => t('Hover breakout'), + '#options' => $options, +- '#default_value' => $view->options['thumbnailhover']['hover'], +- '#description' => t('The !hoverintent, if installed, adds the %hoverintent option here. Selecting it causes a delay when the mouse hovers, to stop quick flybys from triggering the behavior. Selecting %hoverdefault chooses the default mouse behavior.', array('!hoverintent' => l(t('HoverIntent module'), 'http://drupal.org/project/hoverintent'), '%hoverintent' => t('HoverIntent'), '%hoverdefault' => t('Hover'))), ++ '#default_value' => $view->options['thumbnailhover']['hover_breakout'], ++ '#description' => t("Hover breakout determines how to display the breakout element of the %thumbnail mode, either as a teaser or full node. It is ignored in %single mode.", array('%thumbnail' => t('Thumbnail hover'), '%single' => t('Single frame'))), + ); +- $form['thumbnailhover']['timer_delay'] = array( ++ $form['thumbnailhover']['teasers_last'] = array( ++ '#type' => 'checkbox', ++ '#title' => t('Display teasers last'), ++ '#default_value' => $view->options['thumbnailhover']['teasers_last'], ++ '#description' => t('When the mode is thumbnail hover, this determines whether to print the teasers first or second.'), ++ ); ++ $form['thumbnailhover']['timeout'] = array( + '#type' => 'textfield', + '#title' => t('Timer delay (in milliseconds)'), +- '#default_value' => $view->options['thumbnailhover']['timer_delay'], ++ '#default_value' => $view->options['thumbnailhover']['timeout'], + ); + $options = array( + 1 => t('Forward'), +@@ -64,22 +85,53 @@ function views_slideshow_thumbnailhover_ + '#options' => $options, + '#default_value' => $view->options['thumbnailhover']['sort'], + ); +- $form['thumbnailhover']['fade'] = array( +- '#type' => 'checkbox', +- '#title' => t('Fade'), +- '#default_value' => $view->options['thumbnailhover']['fade'], +- '#description' => t('If checked, then the slideshow will fade between frames. Otherwise, the Fade speed and value, below, will be ignored.'), ++ $options = array( ++ 'none' => 'none', ++ 'blindX' => 'blindX', ++ 'blindY' => 'blindY', ++ 'blindZ' => 'blindZ', ++ 'cover' => 'cover', ++ 'curtainX' => 'curtainX', ++ 'curtainY' => 'curtainY', ++ 'fade' => 'fade', ++ 'fadeZoom' => 'fadeZoom', ++ 'growX' => 'growX', ++ 'growY' => 'growY', ++ 'scrollUp' => 'scrollUp', ++ 'scrollDown' => 'scrollDown', ++ 'scrollLeft' => 'scrollLeft', ++ 'scrollRight' => 'scrollRight', ++ 'scrollHorz' => 'scrollHorz', ++ 'scrollVert' => 'scrollVert', ++ 'shuffle' => 'shuffle', ++ 'slideX' => 'slideX', ++ 'slideY' => 'slideY', ++ 'toss' => 'toss', ++ 'turnUp' => 'turnUp', ++ 'turnDown' => 'turnDown', ++ 'turnLeft' => 'turnLeft', ++ 'turnRight' => 'turnRight', ++ 'uncover' => 'uncover', ++ 'wipe' => 'wipe', ++ 'zoom' => 'zoom' ++ ); ++ $form['thumbnailhover']['effect'] = array( ++ '#type' => 'select', ++ '#title' => t('Effect'), ++ '#options' => $options, ++ '#default_value' => $view->options['singleframe']['effect'], ++ '#description' => t('The transition effect that will be used to change between images. Not all options below may be relevant depending on the effect.'), + ); + $options = array( + 'slow' => t('Slow'), + 'normal' => t('Normal'), + 'fast' => t('Fast'), + ); +- $form['thumbnailhover']['fade_speed'] = array( ++ $form['thumbnailhover']['speed'] = array( + '#type' => 'radios', +- '#title' => t('Fade speed'), ++ '#title' => t('Speed'), + '#options' => $options, +- '#default_value' => $view->options['thumbnailhover']['fade_speed'], ++ '#default_value' => $view->options['thumbnailhover']['speed'], + ); + $form['thumbnailhover']['fade_value'] = array( + '#type' => 'textfield', +@@ -87,22 +139,4 @@ function views_slideshow_thumbnailhover_ + '#description' => t('The opacity to fade to, between 0 (fully transparent) and 1 (fully opaque).'), + '#default_value' => $view->options['thumbnailhover']['fade_value'], + ); +- +- $options = array( +- 'teaser' => t('Teaser'), +- 'full' => t('Full'), +- ); +- $form['hover_breakout'] = array( +- '#type' => 'radios', +- '#title' => t('Hover breakout'), +- '#options' => $options, +- '#default_value' => $view->options['hover_breakout'], +- '#description' => t("Hover breakout determines how to display the breakout element of the %thumbnail mode, either as a teaser or full node. It is ignored in %single mode.", array('%thumbnail' => t('Thumbnail hover'), '%single' => t('Single frame'))), +- ); +- $form['teasers_last'] = array( +- '#type' => 'checkbox', +- '#title' => t('Display teasers last'), +- '#default_value' => $view->options['teasers_last'], +- '#description' => t('When the mode is thumbnail hover, this determines whether to print the teasers first or second.'), +- ); + } diff -Naur views_slideshow-DRUPAL-6--2/views_slideshow_plugins_and_cycle.patch views_slideshow-min/views_slideshow_plugins_and_cycle.patch --- views_slideshow-DRUPAL-6--2/views_slideshow_plugins_and_cycle.patch 1969-12-31 19:00:00.000000000 -0500 +++ views_slideshow-min/views_slideshow_plugins_and_cycle.patch 2009-05-16 14:21:46.000000000 -0400 @@ -0,0 +1,748 @@ +? views_slideshow_plugins_and_cycle.patch +? contrib/.svn +? contrib/views_slideshow_singleframe/.svn +? contrib/views_slideshow_thumbnailhover/.svn +? css/.svn +? js/.svn +Index: views_slideshow.module +=================================================================== +RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/views_slideshow.module,v +retrieving revision 1.11.2.2 +diff -u -p -r1.11.2.2 views_slideshow.module +--- views_slideshow.module 16 Apr 2009 02:04:55 -0000 1.11.2.2 ++++ views_slideshow.module 15 May 2009 04:38:23 -0000 +@@ -7,7 +7,7 @@ + */ + + define('VIEWS_SLIDESHOW_MODE_SINGLE_FRAME', 'singleframe'); // this will rotate through all slideshows in a single div element +-define('VIEWS_SLIDESHOW_MODE_THUMBNAIL_HOVER', 'thumbnail_hover'); // this will create thumbnails of all the node teasers, with a mouse-over triggering a larger div full node view ++define('VIEWS_SLIDESHOW_MODE_THUMBNAIL_HOVER', 'thumbnailhover'); // this will create thumbnails of all the node teasers, with a mouse-over triggering a larger div full node view + define('VIEWS_SLIDESHOW_MODE_JCAROUSEL', 'jcarousel'); // this uses the jcarousel jquery plugin, if the jcarousel module is installed + define('VIEWS_SLIDESHOW_DEFAULT_MODE', VIEWS_SLIDESHOW_MODE_SINGLE_FRAME); + +Index: views_slideshow.theme.inc +=================================================================== +RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/Attic/views_slideshow.theme.inc,v +retrieving revision 1.1.2.2 +diff -u -p -r1.1.2.2 views_slideshow.theme.inc +--- views_slideshow.theme.inc 21 Mar 2009 00:36:39 -0000 1.1.2.2 ++++ views_slideshow.theme.inc 15 May 2009 04:38:23 -0000 +@@ -37,7 +37,7 @@ $(document).ready(function() { + }); + }); + JS; +- return $js; ++ return ''; // $js; + } + + /** +@@ -54,6 +54,17 @@ function theme_views_slideshow_main_sect + * These are the slideshow elements themselves; not actually displayed, but used to give the html to the main element. + */ + function theme_views_slideshow_no_display_section($view, $rows, $id, $mode, $teaser = TRUE) { ++ // Add support for the jQuery Cycle plugin. ++ // If we have the jQ module installed, use that to add the Cycle plugin if possible. ++ // That allows for version control. ++ if (module_exists('jq')) { ++ $js = jq_add('cycle'); ++ } ++ ++ // Otherwise, we'll add the version included with this module. ++ if (!$js) { ++ drupal_add_js(drupal_get_path('module', 'views_slideshow') .'/js/jquery.cycle.all.min.js', 'module'); ++ } + $output = '
' . "\n"; + if ($mode == VIEWS_SLIDESHOW_MODE_THUMBNAIL_HOVER) { + foreach ($view->result as $count => $node) { +@@ -61,18 +72,6 @@ function theme_views_slideshow_no_displa + } + } + else { +- // Add support for the jQuery Cycle plugin. +- // If we have the jQ module installed, use that to add the Cycle plugin if possible. +- // That allows for version control. +- if (module_exists('jq')) { +- $js = jq_add('cycle'); +- } +- +- // Otherwise, we'll add the version included with this module. +- if (!$js) { +- drupal_add_js(drupal_get_path('module', 'views_slideshow') .'/js/jquery.cycle.all.min.js', 'module'); +- } +- + foreach ($rows as $count => $item) { + $output .= theme('views_slideshow_no_display_teaser', $item, $id, $count); + } +@@ -127,7 +126,7 @@ function theme_views_slideshow_breakout_ + views_slideshow_resume("' . $id . '"); + }); + '; +- return $js; ++ return '';//$js; + } + + /** +Index: views_slideshow.views_slideshow.inc +=================================================================== +RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/Attic/views_slideshow.views_slideshow.inc,v +retrieving revision 1.1.2.2 +diff -u -p -r1.1.2.2 views_slideshow.views_slideshow.inc +--- views_slideshow.views_slideshow.inc 16 Apr 2009 02:04:55 -0000 1.1.2.2 ++++ views_slideshow.views_slideshow.inc 15 May 2009 04:38:23 -0000 +@@ -6,30 +6,15 @@ + * The default options available with Views Slideshow. + */ + +-function views_slideshow_views_slideshow_modes() { +- $options = array( +-// VIEWS_SLIDESHOW_MODE_SINGLE_FRAME => t('Single frame'), +- VIEWS_SLIDESHOW_MODE_THUMBNAIL_HOVER => t('Thumbnail hover'), +-// VIEWS_SLIDESHOW_MODE_JCAROUSEL => t('jCarousel'), +- ); +- return $options; +-} + + function views_slideshow_views_slideshow_option_definition() { + $options['mode'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_MODE); +- $options['hover'] = array('default' => (module_exists('hoverintent') ? 'hoverIntent' : 'hover')); +- $options['timer_delay'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_TIMER_DELAY); +- $options['sort'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_SORT_ORDER); +- $options['fade'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_FADE); +- $options['fade_speed'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_FADE_SPEED); +- $options['fade_value'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_FADE_VALUE); +- $options['hover_breakout'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_HOVER_BREAKOUT); +- $options['teasers_last'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_TEASERS_LAST); ++ //$options = array_merge($options, module_invoke_all('views_slideshow_option_definition')); + return $options; + } + + function views_slideshow_views_slideshow_options_form(&$form, &$form_state, &$view) { +- $options = array( ++ /*$options = array( + VIEWS_SLIDESHOW_HOVER_BREAKOUT_TEASER => t('Teaser'), + VIEWS_SLIDESHOW_HOVER_BREAKOUT_FULL => t('Full'), + ); +@@ -100,5 +85,5 @@ function views_slideshow_views_slideshow + $options = array( + VIEWS_SLIDESHOW_HOVER_BREAKOUT_TEASER => t('Teaser'), + VIEWS_SLIDESHOW_HOVER_BREAKOUT_FULL => t('Full'), +- ); ++ );*/ + } +Index: contrib/views_slideshow_singleframe/views_slideshow.js +=================================================================== +RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/contrib/views_slideshow_singleframe/Attic/views_slideshow.js,v +retrieving revision 1.1.2.1 +diff -u -p -r1.1.2.1 views_slideshow.js +--- contrib/views_slideshow_singleframe/views_slideshow.js 16 Apr 2009 02:04:52 -0000 1.1.2.1 ++++ contrib/views_slideshow_singleframe/views_slideshow.js 15 May 2009 04:38:23 -0000 +@@ -16,118 +16,10 @@ Drupal.behaviors.viewsSlideshowSingleFra + Drupal.settings.viewsSlideshowSingleFrame[fullId]._current_div = Drupal.settings.viewsSlideshowSingleFrame[fullId]._current_div ? Drupal.settings.viewsSlideshowSingleFrame[fullId]._current_div : 0; + + var settings = Drupal.settings.viewsSlideshowSingleFrame[fullId]; ++ var targetId = '#'+$(fullId+" :first").attr('id'); + +- // If we only have a single div, then we have nothing to do. +- // Thus, only turn on our slideshow if we have more than one slide. +- if (settings.num_divs > 1) { +- // This turns on the timer. +- views_slideshow_timer(fullId, true); +- +- // This sets up the mouseover & mouseout to pause on the main element. +- $(fullId).hover( +- function() { +- views_slideshow_pause(fullId); +- }, +- function() { +- views_slideshow_resume(fullId); +- } +- ); +- } ++ $(targetId).cycle({ ++ fx:'fade' ++ }); + }); +-} +- +-/** +- * Set the timer on or off. +- */ +-function views_slideshow_timer(slideshow_main, slideshow_status) { +- // Stop the current timer. +- clearTimeout(Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._timer_id); +- +- // Start a new timer, if slideshow_status is true, unless we're currently paused. +- if (slideshow_status && !Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._pause) { // !slideshow_data[slideshow_main]._pause) { +- // Our timer will call views_slideshow_switch, which fades out the current slide. +- Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._timer_id = setTimeout("views_slideshow_switch('" + slideshow_main + "', views_slideshow_next_div('" + slideshow_main + "'))", Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].timer_delay); +- } +-} +- +-function views_slideshow_pause(slideshow_main) { +- Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._pause = true; +- views_slideshow_timer(slideshow_main, false); +-} +- +-function views_slideshow_resume(slideshow_main) { +- Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._pause = false; +- views_slideshow_timer(slideshow_main, true); +-} +- +-/** +- * Fade out to the new div indicated. +- */ +-function views_slideshow_switch(slideshow_main, new_div) { +- // Turn off our timer. +- views_slideshow_timer(slideshow_main, false); +- +- // Check to see if we fade or not. +- if (Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade) { +- // Fade out -- at the end, switch to the next slide in the slideshow. +- $(slideshow_main).fadeTo(Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade_speed, Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade_value, function() { views_slideshow_set_div(slideshow_main, new_div); }); +- } +- else { +- // If we don't have a fade, then just switch without fading. +- views_slideshow_set_div(slideshow_main, new_div); +- } +-} +- +-/** +- * Set the main div html to the new node. +- * We come here at the bottom of the fade. +- */ +-function views_slideshow_set_div(slideshow_main, new_div_number) { +- // If the new div is greater than length, wrap to the first. +- // If it's less than zero, wrap to the last. +- if (new_div_number >= Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs) { +- new_div_number = 0; +- } +- else if (new_div_number < 0) { +- new_div_number = Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs - 1; +- } +- +- // Grab the ID's for the two slides. +- _old_breakout = Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].div_prefix + Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].id + "_" + Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._current_div; +- _new_breakout = Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].div_prefix + Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].id + "_" + new_div_number; +- +- // Hide our old slide and display the new one. +- $(_old_breakout).hide(); +- $(_new_breakout).show(); +- +- // Set the current_div number to the new node. +- Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._current_div = new_div_number; +- +- // Check to see if we faded here or not. +- if (Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade) { +- // Fade in -- at the end, turn on our timer. +- $(slideshow_main).fadeTo(Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade_speed, 1, function() { views_slideshow_timer(slideshow_main, true); }); +- } +- else { +- // If we don't have a fade, then just turn on our timer without fading. +- views_slideshow_timer(slideshow_main, true); +- } +-} +- +-/** +- * Get the next node div in our sequence. +- */ +-function views_slideshow_next_div(slideshow_main) { +- if (Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].sort) { +- // Select the next div, in forward or reverse order. +- new_div_number = Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._current_div + Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].sort; +- } +- else { +- // Select a random div, but make sure we don't repeat ourselves, unless there's only one div. +- do { +- new_div_number = Math.floor(Math.random() * Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs); +- } while (Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs > 1 && (new_div_number == Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs - 1)); +- } +- return new_div_number; +-} +- ++} +\ No newline at end of file +Index: contrib/views_slideshow_singleframe/views_slideshow_singleframe.theme.inc +=================================================================== +RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/contrib/views_slideshow_singleframe/Attic/views_slideshow_singleframe.theme.inc,v +retrieving revision 1.1.2.1 +diff -u -p -r1.1.2.1 views_slideshow_singleframe.theme.inc +--- contrib/views_slideshow_singleframe/views_slideshow_singleframe.theme.inc 16 Apr 2009 02:04:52 -0000 1.1.2.1 ++++ contrib/views_slideshow_singleframe/views_slideshow_singleframe.theme.inc 15 May 2009 04:38:23 -0000 +@@ -30,7 +30,7 @@ function template_preprocess_views_slide + + $settings = array( + 'num_divs' => $num_divs, +- 'timer_delay' => $options['timer_delay'], ++ 'timer_delay' => $options['singleframe']['timer_delay'], + 'sort' => intval($options['sort']), + 'fade' => $fade, + 'fade_speed' => $options['fade_speed'], +Index: contrib/views_slideshow_singleframe/views_slideshow_singleframe.views_slideshow.inc +=================================================================== +RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/contrib/views_slideshow_singleframe/Attic/views_slideshow_singleframe.views_slideshow.inc,v +retrieving revision 1.1.2.1 +diff -u -p -r1.1.2.1 views_slideshow_singleframe.views_slideshow.inc +--- contrib/views_slideshow_singleframe/views_slideshow_singleframe.views_slideshow.inc 16 Apr 2009 02:04:52 -0000 1.1.2.1 ++++ contrib/views_slideshow_singleframe/views_slideshow_singleframe.views_slideshow.inc 15 May 2009 04:38:23 -0000 +@@ -14,18 +14,20 @@ function views_slideshow_singleframe_vie + } + + function views_slideshow_singleframe_views_slideshow_option_definition() { +- $options['singleframe'] = array(); +- $options['singleframe']['hover'] = array('default' => (module_exists('hoverintent') ? 'hoverIntent' : 'hover')); +- $options['singleframe']['timer_delay'] = array('default' => 5000); +- $options['singleframe']['sort'] = array('default' => 1); +- $options['singleframe']['fade'] = array('default' => TRUE); +- $options['singleframe']['fade_speed'] = array('default' => 'slow'); +- $options['singleframe']['fade_value'] = array('default' => 0.25); ++ $options['singleframe'] =array( ++ 'contains' => array( ++ 'timer_delay' => array('default' => 5000), ++ 'sort' => array('default' => 1), ++ 'fade' => array('default' => true), ++ 'fade_speed' => array('default' => 'slow'), ++ 'fade_value' => array('default' => 0.25) ++ ) ++ ); + return $options; + } + + function views_slideshow_singleframe_views_slideshow_options_form(&$form, &$form_state, &$view) { +- dpm($view->options); ++ //dpm($view->options); + + $form['singleframe'] = array( + '#type' => 'fieldset', +@@ -33,17 +35,6 @@ function views_slideshow_singleframe_vie + '#collapsible' => TRUE, + '#collapsed' => !($view->options['mode'] == 'singleframe'), + ); +- $options = array('hover' => t('Hover')); +- if (module_exists('hoverintent')) { +- $options['hoverIntent'] = t('HoverIntent'); +- } +- $form['singleframe']['hover'] = array( +- '#type' => 'radios', +- '#title' => t('Mouse hover'), +- '#options' => $options, +- '#default_value' => $view->options['singleframe']['hover'], +- '#description' => t('The !hoverintent, if installed, adds the %hoverintent option here. Selecting it causes a delay when the mouse hovers, to stop quick flybys from triggering the behavior. Selecting %hoverdefault chooses the default mouse behavior.', array('!hoverintent' => l(t('HoverIntent module'), 'http://drupal.org/project/hoverintent'), '%hoverintent' => t('HoverIntent'), '%hoverdefault' => t('Hover'))), +- ); + $form['singleframe']['timer_delay'] = array( + '#type' => 'textfield', + '#title' => t('Timer delay (in milliseconds)'), +@@ -61,10 +52,47 @@ function views_slideshow_singleframe_vie + '#options' => $options, + '#default_value' => $view->options['singleframe']['sort'], + ); ++ /*$options = array( ++ 'none', ++ 'blindX', ++ 'blindY', ++ 'blindZ', ++ 'cover', ++ 'curtainX', ++ 'curtainY', ++ 'fade', ++ 'fadeZoom', ++ 'growX', ++ 'growY', ++ 'scrollUp', ++ 'scrollDown', ++ 'scrollLeft', ++ 'scrollRight', ++ 'scrollHorz', ++ 'scrollVert', ++ 'shuffle', ++ 'slideX', ++ 'slideY', ++ 'toss', ++ 'turnUp', ++ 'turnDown', ++ 'turnLeft', ++ 'turnRight', ++ 'uncover', ++ 'wipe', ++ 'zoom' ++ ); ++ $form['singleframe']['effect'] = array( ++ '#type' => 'select', ++ '#title' => t('Effect'), ++ '#options' => $options, ++ '#default_value' => $view->options['singleframe']['effect'], ++ '#description' => t('The transition effect that will be used to change between images. Not all options below may be relevant depending on the effect.'), ++ );*/ + $form['singleframe']['fade'] = array( + '#type' => 'checkbox', + '#title' => t('Fade'), +- '#default_value' => $view->options['singleframe']['fade'], ++ '#default_value' => $view->options['thumbnailhover']['fade'], + '#description' => t('If checked, then the slideshow will fade between frames. Otherwise, the Fade speed and value, below, will be ignored.'), + ); + $options = array( +@@ -84,4 +112,4 @@ function views_slideshow_singleframe_vie + '#description' => t('The opacity to fade to, between 0 (fully transparent) and 1 (fully opaque).'), + '#default_value' => $view->options['singleframe']['fade_value'], + ); +-} ++} +\ No newline at end of file +Index: contrib/views_slideshow_thumbnailhover/views-slideshow-thumbnailhover.tpl.php +=================================================================== +RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/contrib/views_slideshow_thumbnailhover/Attic/views-slideshow-thumbnailhover.tpl.php,v +retrieving revision 1.1.2.1 +diff -u -p -r1.1.2.1 views-slideshow-thumbnailhover.tpl.php +--- contrib/views_slideshow_thumbnailhover/views-slideshow-thumbnailhover.tpl.php 20 Apr 2009 22:51:08 -0000 1.1.2.1 ++++ contrib/views_slideshow_thumbnailhover/views-slideshow-thumbnailhover.tpl.php 15 May 2009 04:38:23 -0000 +@@ -7,19 +7,17 @@ + */ + + $base = drupal_get_path('module', 'views_slideshow_thumbnailhover'); +- drupal_add_js($base . '/js/views_slideshow.js', 'module'); +- drupal_add_css($base . '/css/views_slideshow.css', 'module'); + + $js = theme('views_slideshow_div_js', $rows, $options, $id); + drupal_add_js($js, 'inline'); + +- $teaser = ($options['hover_breakout'] == 'teaser' ? TRUE : FALSE); ++ $teaser = ($options['thumbnailhover']['hover_breakout'] == 'teaser' ? TRUE : FALSE); + $output = ''; + $view_teasers = FALSE; + + // As we're using the 'thumbnail hover' mode, then we need to display all the view thumbnails. + $view_teasers = theme('views_slideshow_breakout_teasers', $rows, $id); +- if (!$options['teasers_last']) { ++ if (!$options['thumbnailhover']['teasers_last']) { + $output .= $view_teasers; + } + +@@ -27,7 +25,7 @@ + $hidden_elements = theme('views_slideshow_no_display_section', $view, $rows, $id, $options['mode'], $teaser); + $output .= theme('views_slideshow_main_section', $id, $hidden_elements); + +- if ($view_teasers && $options['teasers_last']) { ++ if ($view_teasers && $options['thumbnailhover']['teasers_last']) { + $output .= $view_teasers; + } + +Index: contrib/views_slideshow_thumbnailhover/views_slideshow.js +=================================================================== +RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/contrib/views_slideshow_thumbnailhover/Attic/views_slideshow.js,v +retrieving revision 1.1.2.1 +diff -u -p -r1.1.2.1 views_slideshow.js +--- contrib/views_slideshow_thumbnailhover/views_slideshow.js 20 Apr 2009 22:51:08 -0000 1.1.2.1 ++++ contrib/views_slideshow_thumbnailhover/views_slideshow.js 15 May 2009 04:38:24 -0000 +@@ -8,126 +8,35 @@ + /** + * This will set our initial behavior, by starting up each individual slideshow. + */ +-Drupal.behaviors.viewsSlideshowSingleFrame = function (context) { ++Drupal.behaviors.viewsSlideshowThumbnailHover = function (context) { + $('.views_slideshow_main:not(.viewsSlideshowSingleFrame-processed)', context).addClass('viewsSlideshowSingleFrame-processed').each(function() { + var fullId = '#' + $(this).attr('id'); + +- // Make sure we're working from +- Drupal.settings.viewsSlideshowSingleFrame[fullId]._current_div = Drupal.settings.viewsSlideshowSingleFrame[fullId]._current_div ? Drupal.settings.viewsSlideshowSingleFrame[fullId]._current_div : 0; +- +- var settings = Drupal.settings.viewsSlideshowSingleFrame[fullId]; ++ var settings = Drupal.settings.viewsSlideshowThumbnailHover[fullId]; + + // If we only have a single div, then we have nothing to do. + // Thus, only turn on our slideshow if we have more than one slide. +- if (settings.num_divs > 1) { +- // This turns on the timer. +- views_slideshow_timer(fullId, true); ++ var targetId = '#'+$(fullId+" :first").attr('id'); + +- // This sets up the mouseover & mouseout to pause on the main element. +- $(fullId).hover( +- function() { +- views_slideshow_pause(fullId); +- }, +- function() { +- views_slideshow_resume(fullId); +- } +- ); +- } ++ $(targetId).cycle({ ++ fx:'fade' ++ }); ++ ++ $('#views_slideshow_breakout_teasers_'+settings.id).find('.views_slideshow_div_breakout_teaser').each( ++ function(index, obj) { ++ $(obj).hover( ++ function() { ++ var id = $(this).attr('id'); ++ var i = id.substring(id.lastIndexOf('_')+1); ++ $(targetId).cycle(parseInt(i)).cycle('pause'); ++ }, ++ function() ++ { ++ $(targetId).cycle('resume'); ++ } ++ ); ++ } ++ ); ++ + }); + } +- +-/** +- * Set the timer on or off. +- */ +-function views_slideshow_timer(slideshow_main, slideshow_status) { +- // Stop the current timer. +- clearTimeout(Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._timer_id); +- +- // Start a new timer, if slideshow_status is true, unless we're currently paused. +- if (slideshow_status && !Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._pause) { // !slideshow_data[slideshow_main]._pause) { +- // Our timer will call views_slideshow_switch, which fades out the current slide. +- Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._timer_id = setTimeout("views_slideshow_switch('" + slideshow_main + "', views_slideshow_next_div('" + slideshow_main + "'))", Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].timer_delay); +- } +-} +- +-function views_slideshow_pause(slideshow_main) { +- Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._pause = true; +- views_slideshow_timer(slideshow_main, false); +-} +- +-function views_slideshow_resume(slideshow_main) { +- Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._pause = false; +- views_slideshow_timer(slideshow_main, true); +-} +- +-/** +- * Fade out to the new div indicated. +- */ +-function views_slideshow_switch(slideshow_main, new_div) { +- // Turn off our timer. +- views_slideshow_timer(slideshow_main, false); +- +- // Check to see if we fade or not. +- if (Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade) { +- // Fade out -- at the end, switch to the next slide in the slideshow. +- $(slideshow_main).fadeTo(Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade_speed, Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade_value, function() { views_slideshow_set_div(slideshow_main, new_div); }); +- } +- else { +- // If we don't have a fade, then just switch without fading. +- views_slideshow_set_div(slideshow_main, new_div); +- } +-} +- +-/** +- * Set the main div html to the new node. +- * We come here at the bottom of the fade. +- */ +-function views_slideshow_set_div(slideshow_main, new_div_number) { +- // If the new div is greater than length, wrap to the first. +- // If it's less than zero, wrap to the last. +- if (new_div_number >= Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs) { +- new_div_number = 0; +- } +- else if (new_div_number < 0) { +- new_div_number = Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs - 1; +- } +- +- // Grab the ID's for the two slides. +- _old_breakout = Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].div_prefix + Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].id + "_" + Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._current_div; +- _new_breakout = Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].div_prefix + Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].id + "_" + new_div_number; +- +- // Hide our old slide and display the new one. +- $(_old_breakout).hide(); +- $(_new_breakout).show(); +- +- // Set the current_div number to the new node. +- Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._current_div = new_div_number; +- +- // Check to see if we faded here or not. +- if (Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade) { +- // Fade in -- at the end, turn on our timer. +- $(slideshow_main).fadeTo(Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].fade_speed, 1, function() { views_slideshow_timer(slideshow_main, true); }); +- } +- else { +- // If we don't have a fade, then just turn on our timer without fading. +- views_slideshow_timer(slideshow_main, true); +- } +-} +- +-/** +- * Get the next node div in our sequence. +- */ +-function views_slideshow_next_div(slideshow_main) { +- if (Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].sort) { +- // Select the next div, in forward or reverse order. +- new_div_number = Drupal.settings.viewsSlideshowSingleFrame[slideshow_main]._current_div + Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].sort; +- } +- else { +- // Select a random div, but make sure we don't repeat ourselves, unless there's only one div. +- do { +- new_div_number = Math.floor(Math.random() * Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs); +- } while (Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs > 1 && (new_div_number == Drupal.settings.viewsSlideshowSingleFrame[slideshow_main].num_divs - 1)); +- } +- return new_div_number; +-} +- +Index: contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.theme.inc +=================================================================== +RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/contrib/views_slideshow_thumbnailhover/Attic/views_slideshow_thumbnailhover.theme.inc,v +retrieving revision 1.1.2.1 +diff -u -p -r1.1.2.1 views_slideshow_thumbnailhover.theme.inc +--- contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.theme.inc 20 Apr 2009 22:51:08 -0000 1.1.2.1 ++++ contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.theme.inc 15 May 2009 04:38:24 -0000 +@@ -16,7 +16,7 @@ function template_preprocess_views_slide + drupal_add_css($base . '/views_slideshow.css', 'module'); + + $hover = 'hover'; +- if ($options['hover'] == 'hoverIntent') { ++ if ($options['thumbnailhover']['hover'] == 'hoverIntent') { + if (module_exists('jq')) { + $hover = jq_add('hoverIntent') ? 'hoverIntent' : 'hover'; + } +@@ -26,25 +26,25 @@ function template_preprocess_views_slide + } + + $num_divs = sizeof($vars['rows']); +- $fade = $options['fade'] ? 'true' : 'false'; +- $teasers_last = $options['teasers_last'] ? 'true' : 'false'; ++ $fade = $options['thumbnailhover']['fade'] ? 'true' : 'false'; ++ $teasers_last = $options['thumbnailhover']['teasers_last'] ? 'true' : 'false'; + + $settings = array( + 'num_divs' => $num_divs, +- 'timer_delay' => $options['timer_delay'], +- 'sort' => intval($options['sort']), ++ 'timer_delay' => $options['thumbnailhover']['timer_delay'], ++ 'sort' => intval($options['thumbnailhover']['sort']), + 'fade' => $fade, +- 'fade_speed' => $options['fade_speed'], +- 'fade_value' => $options['fade_value'], ++ 'fade_speed' => $options['thumbnailhover']['fade_speed'], ++ 'fade_value' => $options['thumbnailhover']['fade_value'], + 'hoverFunction' => $hover, +- 'hover_breakout' => $options['hover_breakout'], ++ 'hover_breakout' => $options['thumbnailhover']['hover_breakout'], + 'teasers_last' => $teasers_last, + 'id_prefix' => '#views_slideshow_main_', + 'div_prefix' => '#views_slideshow_div_', + 'id' => $vars['id'], + ); + +- drupal_add_js(array('viewsSlideshowSingleFrame' => array('#views_slideshow_main_'. $vars['id'] => $settings)), 'setting'); ++ drupal_add_js(array('viewsSlideshowThumbnailHover' => array('#views_slideshow_main_'. $vars['id'] => $settings)), 'setting'); + + /* $js = theme('views_slideshow_div_js', $vars['rows'], $vars['options'], $vars['id']); + drupal_add_js($js, 'inline');*/ +Index: contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.views_slideshow.inc +=================================================================== +RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/contrib/views_slideshow_thumbnailhover/Attic/views_slideshow_thumbnailhover.views_slideshow.inc,v +retrieving revision 1.1.2.1 +diff -u -p -r1.1.2.1 views_slideshow_thumbnailhover.views_slideshow.inc +--- contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.views_slideshow.inc 20 Apr 2009 22:51:08 -0000 1.1.2.1 ++++ contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.views_slideshow.inc 15 May 2009 04:38:24 -0000 +@@ -8,44 +8,65 @@ + + function views_slideshow_thumbnailhover_views_slideshow_modes() { + $options = array( +- 'thumbnailhover' => t('SingleFrame'), ++ 'thumbnailhover' => t('ThumbnailHover'), + ); + return $options; + } + + function views_slideshow_thumbnailhover_views_slideshow_option_definition() { +- $options['thumbnailhover'] = array(); +- $options['thumbnailhover']['hover'] = array('default' => (module_exists('hoverintent') ? 'hoverIntent' : 'hover')); +- $options['thumbnailhover']['timer_delay'] = array('default' => 5000); +- $options['thumbnailhover']['sort'] = array('default' => 1); +- $options['thumbnailhover']['fade'] = array('default' => TRUE); +- $options['thumbnailhover']['fade_speed'] = array('default' => 'slow'); +- $options['thumbnailhover']['fade_value'] = array('default' => 0.25); +- $options['thumbnailhover']['hover_breakout'] = array('default' => 'teaser'); +- $options['thumbnailhover']['teasers_last'] = array('default' => TRUE); +- ++ $options['thumbnailhover'] = array( ++ 'contains' => array ( ++ 'default' => (module_exists('hoverintent') ? 'hoverIntent' : 'hover'), ++ 'timer_delay' => array('default' => 5000), ++ 'sort' => array('default' => 1), ++ 'fade' => array('default' => TRUE), ++ 'fade_speed' => array('default' => 'slow'), ++ 'fade_value' => array('default' => 0.25), ++ 'hover_breakout' => array('default' => 'teaser'), ++ 'teasers_last' => array('default' => TRUE) ++ ) ++ ); + return $options; + } + + function views_slideshow_thumbnailhover_views_slideshow_options_form(&$form, &$form_state, &$view) { +- dpm($view->options); ++ //dpm($view->options); + + $form['thumbnailhover'] = array( + '#type' => 'fieldset', +- '#title' => t('SingleFrame rotator options'), ++ '#title' => t('ThumbnailHover rotator options'), + '#collapsible' => TRUE, + '#collapsed' => !($view->options['mode'] == 'thumbnailhover'), + ); +- $options = array('hover' => t('Hover')); ++ + if (module_exists('hoverintent')) { ++ $options = array('hover' => t('Hover')); + $options['hoverIntent'] = t('HoverIntent'); ++ $form['thumbnailhover']['hover'] = array( ++ '#type' => 'radios', ++ '#title' => t('Mouse hover'), ++ '#options' => $options, ++ '#default_value' => $view->options['thumbnailhover']['hover'], ++ '#description' => t('The !hoverintent, if installed, adds the %hoverintent option here. Selecting it causes a delay when the mouse hovers, to stop quick flybys from triggering the behavior. Selecting %hoverdefault chooses the default mouse behavior.', array('!hoverintent' => l(t('HoverIntent module'), 'http://drupal.org/project/hoverintent'), '%hoverintent' => t('HoverIntent'), '%hoverdefault' => t('Hover'))), ++ ); + } +- $form['thumbnailhover']['hover'] = array( ++ ++ $options = array( ++ 'teaser' => t('Teaser'), ++ 'full' => t('Full'), ++ ); ++ $form['thumbnailhover']['hover_breakout'] = array( + '#type' => 'radios', +- '#title' => t('Mouse hover'), ++ '#title' => t('Hover breakout'), + '#options' => $options, +- '#default_value' => $view->options['thumbnailhover']['hover'], +- '#description' => t('The !hoverintent, if installed, adds the %hoverintent option here. Selecting it causes a delay when the mouse hovers, to stop quick flybys from triggering the behavior. Selecting %hoverdefault chooses the default mouse behavior.', array('!hoverintent' => l(t('HoverIntent module'), 'http://drupal.org/project/hoverintent'), '%hoverintent' => t('HoverIntent'), '%hoverdefault' => t('Hover'))), ++ '#default_value' => $view->options['thumbnailhover']['hover_breakout'], ++ '#description' => t("Hover breakout determines how to display the breakout element of the %thumbnail mode, either as a teaser or full node. It is ignored in %single mode.", array('%thumbnail' => t('Thumbnail hover'), '%single' => t('Single frame'))), ++ ); ++ $form['thumbnailhover']['teasers_last'] = array( ++ '#type' => 'checkbox', ++ '#title' => t('Display teasers last'), ++ '#default_value' => $view->options['thumbnailhover']['teasers_last'], ++ '#description' => t('When the mode is thumbnail hover, this determines whether to print the teasers first or second.'), + ); + $form['thumbnailhover']['timer_delay'] = array( + '#type' => 'textfield', +@@ -87,22 +108,4 @@ function views_slideshow_thumbnailhover_ + '#description' => t('The opacity to fade to, between 0 (fully transparent) and 1 (fully opaque).'), + '#default_value' => $view->options['thumbnailhover']['fade_value'], + ); +- +- $options = array( +- 'teaser' => t('Teaser'), +- 'full' => t('Full'), +- ); +- $form['hover_breakout'] = array( +- '#type' => 'radios', +- '#title' => t('Hover breakout'), +- '#options' => $options, +- '#default_value' => $view->options['hover_breakout'], +- '#description' => t("Hover breakout determines how to display the breakout element of the %thumbnail mode, either as a teaser or full node. It is ignored in %single mode.", array('%thumbnail' => t('Thumbnail hover'), '%single' => t('Single frame'))), +- ); +- $form['teasers_last'] = array( +- '#type' => 'checkbox', +- '#title' => t('Display teasers last'), +- '#default_value' => $view->options['teasers_last'], +- '#description' => t('When the mode is thumbnail hover, this determines whether to print the teasers first or second.'), +- ); + } diff -Naur views_slideshow-DRUPAL-6--2/views_slideshow_plugin_style_slideshow.inc views_slideshow-min/views_slideshow_plugin_style_slideshow.inc --- views_slideshow-DRUPAL-6--2/views_slideshow_plugin_style_slideshow.inc 2009-03-30 16:46:42.000000000 -0400 +++ views_slideshow-min/views_slideshow_plugin_style_slideshow.inc 2009-05-25 22:53:10.000000000 -0400 @@ -43,4 +43,11 @@ call_user_func_array($function, array(&$form, &$form_state, &$this)); } } + function options_validate(&$form, &$form_state) { + module_load_all_includes('views_slideshow.inc'); + foreach (module_implements('views_slideshow_options_form_validate') as $module) { + $function = $module .'_views_slideshow_options_form_validate'; + call_user_func_array($function, array(&$form, &$form_state, &$this)); + } + } } diff -Naur views_slideshow-DRUPAL-6--2/views-slideshow-single-frame.tpl.php views_slideshow-min/views-slideshow-single-frame.tpl.php --- views_slideshow-DRUPAL-6--2/views-slideshow-single-frame.tpl.php 2009-03-30 16:46:42.000000000 -0400 +++ views_slideshow-min/views-slideshow-single-frame.tpl.php 1969-12-31 19:00:00.000000000 -0500 @@ -1,30 +0,0 @@ - diff -Naur views_slideshow-DRUPAL-6--2/views_slideshow.theme.inc views_slideshow-min/views_slideshow.theme.inc --- views_slideshow-DRUPAL-6--2/views_slideshow.theme.inc 2009-03-20 20:36:39.000000000 -0400 +++ views_slideshow-min/views_slideshow.theme.inc 2009-06-24 02:04:55.000000000 -0400 @@ -2,45 +2,6 @@ // $Id: views_slideshow.theme.inc,v 1.1.2.2 2009/03/21 00:36:39 aaron Exp $ /** - * This inline js sets up the timer for this slideshow. - */ -function theme_views_slideshow_div_js($rows, $options, $id) { - $hover = 'hover'; - if ($options['hover'] == 'hoverIntent') { - if (module_exists('jq')) { - $hover = jq_add('hoverIntent') ? 'hoverIntent' : 'hover'; - } - else if (module_exists('hoverintent')) { - $hover = hoverintent_add() ? 'hoverIntent' : 'hover'; - } - } - - $num_divs = sizeof($rows); - $fade = $options['fade'] ? 'true' : 'false'; - - $js = <<\n\n"; return $output; } - -/** - * These are the slideshow elements themselves; not actually displayed, but used to give the html to the main element. - */ -function theme_views_slideshow_no_display_section($view, $rows, $id, $mode, $teaser = TRUE) { - $output = '
' . "\n"; - if ($mode == VIEWS_SLIDESHOW_MODE_THUMBNAIL_HOVER) { - foreach ($view->result as $count => $node) { - $output .= theme('views_slideshow_no_display_teaser', node_view(node_load($node->nid), $teaser, FALSE, FALSE), $id, $count); - } - } - else { - // Add support for the jQuery Cycle plugin. - // If we have the jQ module installed, use that to add the Cycle plugin if possible. - // That allows for version control. - if (module_exists('jq')) { - $js = jq_add('cycle'); - } - - // Otherwise, we'll add the version included with this module. - if (!$js) { - drupal_add_js(drupal_get_path('module', 'views_slideshow') .'/js/jquery.cycle.all.min.js', 'module'); - } - - foreach ($rows as $count => $item) { - $output .= theme('views_slideshow_no_display_teaser', $item, $id, $count); - } - } - $output .= "
\n\n"; - return $output; -} - -/** - * The html that will be placed into the element in its turn during its frame. - */ -function theme_views_slideshow_no_display_teaser($item, $id, $count) { - $hidden = $count ? 'class="views_slideshow_hidden"' : ''; - $output = '
' . "\n "; - $output .= $item . "\n"; - $output .= '
' . "\n\n"; - return $output; -} - -/** - * These are teasers that may be pointed at with a mouse to change the element directly. - */ -function theme_views_slideshow_breakout_teasers($items, $id) { - $output = '
' . "\n"; - $js = "$(document).ready(function() {\n"; - foreach ($items as $count => $item) { - $output .= theme('views_slideshow_breakout_teaser', $item, $id, $count); - $js .= theme('views_slideshow_breakout_teaser_js', $id, $count); - } - $js .= "})\n"; - drupal_add_js($js, 'inline'); - - $output .= "
\n\n"; - - return $output; -} - -/** - * The mouseover event code for each breakout teaser. - */ -function theme_views_slideshow_breakout_teaser_js($id, $count) { - // Return the js to set the main div to this teaser's element. - $hover = (module_invoke('jq', 'add', 'hoverIntent')) ? 'hoverIntent' : 'hover'; - - $js = ' - $("#views_slideshow_div_breakout_teaser_' . $id . '_' . $count . '").' . $hover . '( - function() { - views_slideshow_switch("' . $id . '", ' . $count . '); - views_slideshow_pause("' . $id . '"); - }, - function() { - views_slideshow_resume("' . $id . '"); - }); -'; - return $js; -} - -/** - * An individual breakout teaser. - */ -function theme_views_slideshow_breakout_teaser($item, $id, $count) { - $class = $count ? '' : ' views_slideshow_active_teaser'; - $output = '
' . "\n "; - $output .= $item . "\n"; - $output .= '
' . "\n\n"; - return $output; -} diff -Naur views_slideshow-DRUPAL-6--2/views-slideshow-thumbnail-hover.tpl.php views_slideshow-min/views-slideshow-thumbnail-hover.tpl.php --- views_slideshow-DRUPAL-6--2/views-slideshow-thumbnail-hover.tpl.php 2009-03-30 16:46:42.000000000 -0400 +++ views_slideshow-min/views-slideshow-thumbnail-hover.tpl.php 1969-12-31 19:00:00.000000000 -0500 @@ -1,36 +0,0 @@ - diff -Naur views_slideshow-DRUPAL-6--2/views_slideshow.views_slideshow.inc views_slideshow-min/views_slideshow.views_slideshow.inc --- views_slideshow-DRUPAL-6--2/views_slideshow.views_slideshow.inc 2009-06-23 18:03:06.000000000 -0400 +++ views_slideshow-min/views_slideshow.views_slideshow.inc 2009-05-27 16:46:00.000000000 -0400 @@ -1,104 +1,13 @@ t('Single frame'), -// VIEWS_SLIDESHOW_MODE_THUMBNAIL_HOVER => t('Thumbnail hover'), -// VIEWS_SLIDESHOW_MODE_JCAROUSEL => t('jCarousel'), - ); - return $options; -} function views_slideshow_views_slideshow_option_definition() { -// $options['mode'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_MODE); -// $options['hover'] = array('default' => (module_exists('hoverintent') ? 'hoverIntent' : 'hover')); -// $options['timer_delay'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_TIMER_DELAY); -// $options['sort'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_SORT_ORDER); -// $options['fade'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_FADE); -// $options['fade_speed'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_FADE_SPEED); -// $options['fade_value'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_FADE_VALUE); -// $options['hover_breakout'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_HOVER_BREAKOUT); -// $options['teasers_last'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_TEASERS_LAST); -// return $options; -} - -function views_slideshow_views_slideshow_options_form(&$form, &$form_state, &$view) { -// $options = array( -// VIEWS_SLIDESHOW_HOVER_BREAKOUT_TEASER => t('Teaser'), -// VIEWS_SLIDESHOW_HOVER_BREAKOUT_FULL => t('Full'), -// ); -// $form['hover_breakout'] = array( -// '#type' => 'radios', -// '#title' => t('Hover breakout'), -// '#options' => $options, -// '#default_value' => $view->options['hover_breakout'], -// '#description' => t("Hover breakout determines how to display the breakout element of the %thumbnail mode, either as a teaser or full node. It is ignored in %single mode.", array('%thumbnail' => t('Thumbnail hover'), '%single' => t('Single frame'))), -// ); -// $form['teasers_last'] = array( -// '#type' => 'checkbox', -// '#title' => t('Display teasers last'), -// '#default_value' => $view->options['teasers_last'], -// '#description' => t('When the mode is thumbnail hover, this determines whether to print the teasers first or second.'), -// ); -// $options = array('hover' => t('Hover')); -// if (module_exists('hoverintent')) { -// $options['hoverIntent'] = t('HoverIntent'); -// } -// $form['hover'] = array( -// '#type' => 'radios', -// '#title' => t('Mouse hover'), -// '#options' => $options, -// '#default_value' => $view->options['hover'], -// '#description' => t('The !hoverintent, if installed, adds the %hoverintent option here. Selecting it causes a delay when the mouse hovers, to stop quick flybys from triggering the behavior. Selecting %hoverdefault chooses the default mouse behavior.', array('!hoverintent' => l(t('HoverIntent module'), 'http://drupal.org/project/hoverintent'), '%hoverintent' => t('HoverIntent'), '%hoverdefault' => t('Hover'))), -// ); -// $form['timer_delay'] = array( -// '#type' => 'textfield', -// '#title' => t('Timer delay (in milliseconds)'), -// '#default_value' => $view->options['timer_delay'], -// ); -// $options = array( -// VIEWS_SLIDESHOW_SORT_FORWARD => t('Forward'), -// VIEWS_SLIDESHOW_SORT_REVERSE => t('Reverse'), -// VIEWS_SLIDESHOW_SORT_RANDOM => t('Random'), -// ); -// $form['sort'] = array( -// '#type' => 'radios', -// '#title' => t('Slideshow sort order'), -// '#description' => t('This option determines the sort order of the returned results within the slideshow. Note that it is not related to the View\'s sorting options, and will only affect resulting items.'), -// '#options' => $options, -// '#default_value' => $view->options['sort'], -// ); -// $form['fade'] = array( -// '#type' => 'checkbox', -// '#title' => t('Fade'), -// '#default_value' => $view->options['fade'], -// '#description' => t('If checked, then the slideshow will fade between frames. Otherwise, the Fade speed and value, below, will be ignored.'), -// ); -// $options = array( -// VIEWS_SLIDESHOW_FADE_SPEED_SLOW => t('Slow'), -// VIEWS_SLIDESHOW_FADE_SPEED_NORMAL => t('Normal'), -// VIEWS_SLIDESHOW_FADE_SPEED_FAST => t('Fast'), -// ); -// $form['fade_speed'] = array( -// '#type' => 'radios', -// '#title' => t('Fade speed'), -// '#options' => $options, -// '#default_value' => $view->options['fade_speed'], -// ); -// $form['fade_value'] = array( -// '#type' => 'textfield', -// '#title' => t('Fade value'), -// '#description' => t('The opacity to fade to, between 0 (fully transparent) and 1 (fully opaque).'), -// '#default_value' => $view->options['fade_value'], -// ); -// $options = array( -// VIEWS_SLIDESHOW_HOVER_BREAKOUT_TEASER => t('Teaser'), -// VIEWS_SLIDESHOW_HOVER_BREAKOUT_FULL => t('Full'), -// ); + $options['mode'] = array('default' => VIEWS_SLIDESHOW_DEFAULT_MODE); + return $options; }