diff --git a/js/views_slideshow.js b/js/views_slideshow.js
index 208f52b..50a4c93 100644
--- a/js/views_slideshow.js
+++ b/js/views_slideshow.js
@@ -255,8 +255,8 @@
var uniqueID = pagerInfo.join('_');
// Add the activate and pause on pager hover event to each pager item.
- if (Drupal.settings.viewsSlideshowPagerFields[uniqueID][location].activatePauseOnHover) {
- $(this).children().each(function(index, pagerItem) {
+ if (Drupal.settings.viewsSlideshowPagerFields[uniqueID][location].activatePauseOnHover) {
+ $(this).find('.views_slideshow_pager_field_item').each(function (index, pagerItem) {
$(pagerItem).hover(function() {
Drupal.viewsSlideshow.action({ "action": 'goToSlide', "slideshowID": uniqueID, "slideNum": index });
Drupal.viewsSlideshow.action({ "action": 'pause', "slideshowID": uniqueID });
@@ -266,8 +266,8 @@
});
});
}
- else {
- $(this).children().each(function(index, pagerItem) {
+ else {
+ $(this).find('.views_slideshow_pager_field_item').each(function (index, pagerItem) {
$(pagerItem).click(function() {
Drupal.viewsSlideshow.action({ "action": 'goToSlide', "slideshowID": uniqueID, "slideNum": index });
});
diff --git a/theme/views-slideshow-pager-field.tpl.php b/theme/views-slideshow-pager-field.tpl.php
deleted file mode 100644
index d5d659a..0000000
--- a/theme/views-slideshow-pager-field.tpl.php
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/theme/views-slideshow-pager-fields.tpl.php b/theme/views-slideshow-pager-fields.tpl.php
new file mode 100644
index 0000000..d5d659a
--- /dev/null
+++ b/theme/views-slideshow-pager-fields.tpl.php
@@ -0,0 +1,3 @@
+
+
+
diff --git a/theme/views_slideshow.theme.inc b/theme/views_slideshow.theme.inc
index 8cb4626..99fc352 100644
--- a/theme/views_slideshow.theme.inc
+++ b/theme/views_slideshow.theme.inc
@@ -195,13 +195,13 @@ function theme_views_slideshow_pager_widget_render($vars) {
// Create some attributes
$attributes['class'] = 'widget_pager widget_pager_' . $vars['location'];
$attributes['id'] = 'widget_pager_' . $vars['location'] . '_' . $vars['vss_id'];
- return theme($vars['settings']['type'] . '_render', array('vss_id' => $vars['vss_id'], 'view' => $vars['view'], 'settings' => $vars['settings'], 'location' => $vars['location'], 'attributes' => $attributes));
+ return theme($vars['settings']['type'], array('vss_id' => $vars['vss_id'], 'view' => $vars['view'], 'settings' => $vars['settings'], 'location' => $vars['location'], 'attributes' => $attributes));
}
/**
* Theme pager fields
*/
-function template_preprocess_views_slideshow_pager_fields_render(&$vars) {
+function template_preprocess_views_slideshow_pager_fields(&$vars) {
// Build our javascript settings.
$js_vars = array(
'viewsSlideshowPagerFields' => array(
@@ -220,6 +220,7 @@ function template_preprocess_views_slideshow_pager_fields_render(&$vars) {
$vars['widget_id'] = $vars['attributes']['id'];
// Add our class to the wrapper.
$vars['classes_array'][] = 'views_slideshow_pager_field';
+ $vars['theme_hook_suggestions'][] = 'views_slideshow_pager_fields__' . $vars['view']->name;
// Render all the fields.
$vars['rendered_field_items'] = '';
@@ -230,7 +231,7 @@ function template_preprocess_views_slideshow_pager_fields_render(&$vars) {
$rendered_fields .= theme('views_slideshow_pager_field_field', array('view' => $vars['view'], 'field' => $field, 'count' => $count));
}
}
- $vars['rendered_field_items'] .= theme('views_slideshow_pager_field_item', array('vss_id' => $vars['vss_id'], 'item' => $rendered_fields, 'count' => $count, 'location' => $vars['location']));
+ $vars['rendered_field_items'] .= theme('views_slideshow_pager_field_item', array('view' => $vars['view'], 'vss_id' => $vars['vss_id'], 'item' => $rendered_fields, 'count' => $count, 'location' => $vars['location']));
}
}
@@ -245,6 +246,7 @@ function template_preprocess_views_slideshow_pager_field_item(&$vars) {
$vars['classes_array'][] = 'views_slideshow_active_pager_field_item';
}
$vars['classes_array'][] = ($vars['count'] % 2) ? 'views-row-even' : 'views-row-odd';
+ $vars['theme_hook_suggestions'][] = 'views_slideshow_pager_field_item__' . $vars['view']->name;
}
/**
diff --git a/views_slideshow.module b/views_slideshow.module
index 5d85713..a3584ca 100644
--- a/views_slideshow.module
+++ b/views_slideshow.module
@@ -18,9 +18,9 @@ function views_slideshow_theme($existing, $type, $theme, $path) {
'variables' => array('vss_id' => NULL, 'view' => NULL, 'settings' => array(), 'location' => NULL, 'rows' => array()),
'file' => 'theme/views_slideshow.theme.inc',
),
- 'views_slideshow_pager_fields_render' => array(
+ 'views_slideshow_pager_fields' => array(
'variables' => array('vss_id' => NULL, 'view' => NULL, 'settings' => array(), 'location' => NULL, 'attributes' => array()),
- 'template' => 'theme/views-slideshow-pager-field',
+ 'template' => 'theme/views-slideshow-pager-fields',
'file' => 'theme/views_slideshow.theme.inc',
),
'views_slideshow_pager_field_field' => array(
@@ -29,7 +29,7 @@ function views_slideshow_theme($existing, $type, $theme, $path) {
'file' => 'theme/views_slideshow.theme.inc',
),
'views_slideshow_pager_field_item' => array(
- 'variables' => array('vss_id' => NULL, 'item' => NULL, 'count' => NULL, 'location' => NULL),
+ 'variables' => array('view' => NULL, 'vss_id' => NULL, 'item' => NULL, 'count' => NULL, 'location' => NULL),
'template' => 'theme/views-slideshow-pager-field-item',
'file' => 'theme/views_slideshow.theme.inc',
),