From 4bdefaf4ee8ccf56ab5031e442fde4c94a6972c2 Mon Sep 17 00:00:00 2001
From: Daniel Wentsch <hello@wentsch.me>
Date: Mon, 26 Jan 2015 14:37:46 +0100
Subject: [PATCH] Added autoplay support to views_superslides

---
 .../views_superslides/includes/views_superslides_style_plugin.inc   | 6 ++++++
 sites/all/modules/views_superslides/js/initialize.js                | 3 ++-
 sites/all/modules/views_superslides/views_superslides.module        | 1 +
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/sites/all/modules/views_superslides/includes/views_superslides_style_plugin.inc b/sites/all/modules/views_superslides/includes/views_superslides_style_plugin.inc
index b8c45f2..854819f 100644
--- a/sites/all/modules/views_superslides/includes/views_superslides_style_plugin.inc
+++ b/sites/all/modules/views_superslides/includes/views_superslides_style_plugin.inc
@@ -74,5 +74,11 @@ class views_superslides_style_plugin extends views_plugin_style {
       '#description' => t('If enabled, each resulting container will have the title of the node or entity applied as its ID name. When used in conjunction with "hashchange = TRUE", URLs will appear as sanitized Node title text instead of #1, #2, etc.'),
     );
 
+    $form['play'] = array(
+      '#type' => 'textfield',
+      '#default_value' => $this->options['play'],
+      '#title' => t('Autoplay'),
+      '#description' => t('Time in miliseconds to automatically play the slideshow. Leave empty to disable Autoplay.'),
+    );
   }
 }
\ No newline at end of file
diff --git a/sites/all/modules/views_superslides/js/initialize.js b/sites/all/modules/views_superslides/js/initialize.js
index 3f593a6..f786355 100644
--- a/sites/all/modules/views_superslides/js/initialize.js
+++ b/sites/all/modules/views_superslides/js/initialize.js
@@ -39,7 +39,8 @@
           animation: settings.animation,
           inherit_width_from: inherit_width,
           inherit_height_from: inherit_height,
-          hashchange: settings.hashchange
+          hashchange: settings.hashchange,
+          play: settings.play
         });
 
       });
diff --git a/sites/all/modules/views_superslides/views_superslides.module b/sites/all/modules/views_superslides/views_superslides.module
index 8598ae2..26e13fa 100644
--- a/sites/all/modules/views_superslides/views_superslides.module
+++ b/sites/all/modules/views_superslides/views_superslides.module
@@ -81,6 +81,7 @@ function template_preprocess_views_view_superslides(&$vars) {
         'inherit_width_from' => $options['inherit_width_from'],
         'inherit_height_from' => $options['inherit_height_from'],
         'hashchange' => $options['hashchange'],
+        'play' => $options['play'],
       ),
     ),
   ), 'setting');
-- 
1.9.3 (Apple Git-50)+GitX