Version Description
Download this release
Release Info
Developer | kosinix |
Plugin | Cyclone Slider |
Version | 2.7.7 |
Comparing to | |
See all releases |
Code changes from version 2.7.6 to 2.7.7
- README.txt +10 -2
- classes/class-cyclone-slider-scripts.php +3 -1
- classes/class-cyclone-slider.php +5 -3
- cyclone-slider.php +2 -2
- js/admin.js +80 -8
- js/client.js +54 -1
- templates/dark/script.js +2 -5
- templates/default/script.js +0 -42
- templates/standard/script.js +0 -42
- templates/standard/style.css +1 -1
- templates/thumbnails/script.js +1 -34
- views/slides.php +1 -0
README.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: kosinix
|
|
3 |
Donate link: http://www.codefleet.net/donate/
|
4 |
Tags: slider, slideshow, drag-and-drop, wordpress-slider, wordpress-slideshow, cycle 2, jquery, responsive, translation-ready, custom-post, cyclone-slider
|
5 |
Requires at least: 3.5
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 2.7.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -99,6 +99,10 @@ Inside your current active theme create a folder named "cycloneslider". Add your
|
|
99 |
|
100 |
== Changelog ==
|
101 |
|
|
|
|
|
|
|
|
|
102 |
= 2.7.6 - 2013-10-13 =
|
103 |
* New. Added support for YouTube and Vimeo slide types in thumbnails template.
|
104 |
* New. Added ability to fetch thumbnails of videos from youtube.com and vimeo.com. The thumbnails template will use this to display the thumbnails in its pager.
|
@@ -275,6 +279,10 @@ Inside your current active theme create a folder named "cycloneslider". Add your
|
|
275 |
|
276 |
== Upgrade Notice ==
|
277 |
|
|
|
|
|
|
|
|
|
278 |
= 2.7.6 - 2013-10-13 =
|
279 |
* New. Added support for YouTube and Vimeo slide types in thumbnails template.
|
280 |
* New. Added ability to fetch thumbnails of videos from youtube.com and vimeo.com. The thumbnails template will use this to display the thumbnails in its pager.
|
3 |
Donate link: http://www.codefleet.net/donate/
|
4 |
Tags: slider, slideshow, drag-and-drop, wordpress-slider, wordpress-slideshow, cycle 2, jquery, responsive, translation-ready, custom-post, cyclone-slider
|
5 |
Requires at least: 3.5
|
6 |
+
Tested up to: 3.7.1
|
7 |
+
Stable tag: 2.7.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
99 |
|
100 |
== Changelog ==
|
101 |
|
102 |
+
= 2.7.6 - 2013-11-26 =
|
103 |
+
* New. Added ability to select multiple images to add as slides
|
104 |
+
* Change. Refactor code for template javascripts. Moved similar code into client.js
|
105 |
+
|
106 |
= 2.7.6 - 2013-10-13 =
|
107 |
* New. Added support for YouTube and Vimeo slide types in thumbnails template.
|
108 |
* New. Added ability to fetch thumbnails of videos from youtube.com and vimeo.com. The thumbnails template will use this to display the thumbnails in its pager.
|
279 |
|
280 |
== Upgrade Notice ==
|
281 |
|
282 |
+
= 2.7.6 - 2013-11-26 =
|
283 |
+
* New. Added ability to select multiple images to add as slides
|
284 |
+
* Change. Refactor code for template javascripts. Moved similar code into client.js
|
285 |
+
|
286 |
= 2.7.6 - 2013-10-13 =
|
287 |
* New. Added support for YouTube and Vimeo slide types in thumbnails template.
|
288 |
* New. Added ability to fetch thumbnails of videos from youtube.com and vimeo.com. The thumbnails template will use this to display the thumbnails in its pager.
|
classes/class-cyclone-slider-scripts.php
CHANGED
@@ -50,7 +50,9 @@ if(!class_exists('Cyclone_Slider_Scripts')):
|
|
50 |
wp_localize_script( 'cycloneslider-admin-script', 'cycloneslider_admin_vars',
|
51 |
array(
|
52 |
'title' => __( 'Select an image', 'cycloneslider' ), // This will be used as the default title
|
53 |
-
'
|
|
|
|
|
54 |
'youtube_url_error' => __( 'Error. Make sure its a valid YouTube URL.', 'cycloneslider' )
|
55 |
)
|
56 |
);
|
50 |
wp_localize_script( 'cycloneslider-admin-script', 'cycloneslider_admin_vars',
|
51 |
array(
|
52 |
'title' => __( 'Select an image', 'cycloneslider' ), // This will be used as the default title
|
53 |
+
'title2' => __( 'Select Images - Use Ctrl + Click or Shift + Click', 'cycloneslider' ),
|
54 |
+
'button' => __( 'Add to Slide', 'cycloneslider' ), // This will be used as the default button text
|
55 |
+
'button2' => __( 'Add Images as Slides', 'cycloneslider' ),
|
56 |
'youtube_url_error' => __( 'Error. Make sure its a valid YouTube URL.', 'cycloneslider' )
|
57 |
)
|
58 |
);
|
classes/class-cyclone-slider.php
CHANGED
@@ -70,6 +70,8 @@ if(!class_exists('Cyclone_Slider')):
|
|
70 |
|
71 |
$slider_count = ++$this->slider_count; // Make each call to shortcode unique
|
72 |
|
|
|
|
|
73 |
$slider = $this->cyclone_slider_data->get_slider_by_slug( $slider_slug ); // Get slider by slug
|
74 |
|
75 |
// Abort if slider not found!
|
@@ -157,7 +159,7 @@ if(!class_exists('Cyclone_Slider')):
|
|
157 |
$youtube_count++;
|
158 |
$youtube_id = $this->cyclone_slider_youtube->get_youtube_id($slides[$i]['youtube_url']);
|
159 |
|
160 |
-
$slides[$i]['youtube_embed_code'] = '<iframe width="'.$slider_settings['width'].'" height="'.$slider_settings['height'].'" src="//www.youtube.com/embed/'.$youtube_id.'?wmode=transparent" frameborder="0" allowfullscreen></iframe>';
|
161 |
$slides[$i]['youtube_id'] = $youtube_id;
|
162 |
$slides[$i]['thumbnail_small'] = $this->cyclone_slider_youtube->get_youtube_thumb($youtube_id);
|
163 |
|
@@ -165,7 +167,7 @@ if(!class_exists('Cyclone_Slider')):
|
|
165 |
$vimeo_count++;
|
166 |
$vimeo_id = $this->cyclone_slider_vimeo->get_vimeo_id($slides[$i]['vimeo_url']);
|
167 |
|
168 |
-
$slides[$i]['vimeo_embed_code'] = '<iframe width="'.$slider_settings['width'].'" height="'.$slider_settings['height'].'" src="http://player.vimeo.com/video/'.$vimeo_id.'?api=1&wmode=transparent" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
|
169 |
$slides[$i]['vimeo_id'] = $vimeo_id;
|
170 |
$slides[$i]['thumbnail_small'] = $this->cyclone_slider_vimeo->get_vimeo_thumb($vimeo_id);
|
171 |
}
|
@@ -190,7 +192,7 @@ if(!class_exists('Cyclone_Slider')):
|
|
190 |
|
191 |
// Pass this vars to template
|
192 |
$vars = array();
|
193 |
-
$vars['slider_html_id'] =
|
194 |
$vars['slider_count'] = $slider_count;
|
195 |
$vars['slides'] = $slides;
|
196 |
$vars['image_count'] = $image_count;
|
70 |
|
71 |
$slider_count = ++$this->slider_count; // Make each call to shortcode unique
|
72 |
|
73 |
+
$slider_html_id = 'cycloneslider-'.$slider_slug.'-'.$slider_count; // UID
|
74 |
+
|
75 |
$slider = $this->cyclone_slider_data->get_slider_by_slug( $slider_slug ); // Get slider by slug
|
76 |
|
77 |
// Abort if slider not found!
|
159 |
$youtube_count++;
|
160 |
$youtube_id = $this->cyclone_slider_youtube->get_youtube_id($slides[$i]['youtube_url']);
|
161 |
|
162 |
+
$slides[$i]['youtube_embed_code'] = '<iframe id="'.$slider_html_id.'-iframe-'.$i.'" width="'.$slider_settings['width'].'" height="'.$slider_settings['height'].'" src="//www.youtube.com/embed/'.$youtube_id.'?wmode=transparent" frameborder="0" allowfullscreen></iframe>';
|
163 |
$slides[$i]['youtube_id'] = $youtube_id;
|
164 |
$slides[$i]['thumbnail_small'] = $this->cyclone_slider_youtube->get_youtube_thumb($youtube_id);
|
165 |
|
167 |
$vimeo_count++;
|
168 |
$vimeo_id = $this->cyclone_slider_vimeo->get_vimeo_id($slides[$i]['vimeo_url']);
|
169 |
|
170 |
+
$slides[$i]['vimeo_embed_code'] = '<iframe id="'.$slider_html_id.'-iframe-'.$i.'" width="'.$slider_settings['width'].'" height="'.$slider_settings['height'].'" src="http://player.vimeo.com/video/'.$vimeo_id.'?api=1&wmode=transparent" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
|
171 |
$slides[$i]['vimeo_id'] = $vimeo_id;
|
172 |
$slides[$i]['thumbnail_small'] = $this->cyclone_slider_vimeo->get_vimeo_thumb($vimeo_id);
|
173 |
}
|
192 |
|
193 |
// Pass this vars to template
|
194 |
$vars = array();
|
195 |
+
$vars['slider_html_id'] = $slider_html_id; // The unique HTML ID for slider
|
196 |
$vars['slider_count'] = $slider_count;
|
197 |
$vars['slides'] = $slides;
|
198 |
$vars['image_count'] = $image_count;
|
cyclone-slider.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Cyclone Slider 2
|
4 |
Plugin URI: http://www.codefleet.net/cyclone-slider-pro/
|
5 |
Description: Create and manage sliders with ease. Built for both casual users and developers.
|
6 |
-
Version: 2.7.
|
7 |
Author: Nico Amarilla
|
8 |
Author URI: http://www.codefleet.net/
|
9 |
License:
|
@@ -25,7 +25,7 @@ License:
|
|
25 |
|
26 |
*/
|
27 |
if(!defined('CYCLONE_VERSION')){
|
28 |
-
define('CYCLONE_VERSION', '2.7.
|
29 |
}
|
30 |
if(!defined('CYCLONE_PATH')){
|
31 |
define('CYCLONE_PATH', realpath(plugin_dir_path(__FILE__)) . DIRECTORY_SEPARATOR );
|
3 |
Plugin Name: Cyclone Slider 2
|
4 |
Plugin URI: http://www.codefleet.net/cyclone-slider-pro/
|
5 |
Description: Create and manage sliders with ease. Built for both casual users and developers.
|
6 |
+
Version: 2.7.7
|
7 |
Author: Nico Amarilla
|
8 |
Author URI: http://www.codefleet.net/
|
9 |
License:
|
25 |
|
26 |
*/
|
27 |
if(!defined('CYCLONE_VERSION')){
|
28 |
+
define('CYCLONE_VERSION', '2.7.7' );
|
29 |
}
|
30 |
if(!defined('CYCLONE_PATH')){
|
31 |
define('CYCLONE_PATH', realpath(plugin_dir_path(__FILE__)) . DIRECTORY_SEPARATOR );
|
js/admin.js
CHANGED
@@ -138,6 +138,32 @@ jQuery(document).ready(function($){
|
|
138 |
e.preventDefault();
|
139 |
});
|
140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
/*** Toggle - slide body visiblity ***/
|
142 |
$('#cyclone-slides-metabox').on('click', '.cs-header', function(e) {
|
143 |
var id, box, body, cs_slide_toggles;
|
@@ -340,14 +366,14 @@ jQuery(document).ready(function($){
|
|
340 |
}
|
341 |
// Prepare the variable that holds our custom media manager.
|
342 |
var cyclone_media_frame;
|
343 |
-
var
|
344 |
|
345 |
// Bind to our click event in order to open up the new media experience.
|
346 |
$(document.body).on('click', '.cs-media-gallery-show', function(e){
|
347 |
// Prevent the default action from occuring.
|
348 |
e.preventDefault();
|
349 |
|
350 |
-
|
351 |
|
352 |
|
353 |
// If the frame already exists, re-open it.
|
@@ -371,23 +397,69 @@ jQuery(document).ready(function($){
|
|
371 |
});
|
372 |
|
373 |
cyclone_media_frame.on('select', function(){
|
374 |
-
var media_attachment,
|
375 |
|
376 |
// Grab our attachment selection and construct a JSON representation of the model.
|
377 |
media_attachment = cyclone_media_frame.state().get('selection').first().toJSON();
|
378 |
|
379 |
-
slide_thumb = current_slide_box.find('.cs-image-thumb');/*** find the thumb ***/
|
380 |
-
slide_attachment_id = current_slide_box.find('.cs-image-id ');/*** find the hidden field that will hold the attachment id ***/
|
381 |
-
|
382 |
if(undefined==media_attachment.sizes.medium){ /*** Account for smaller images where medium does not exist ***/
|
383 |
img_url = media_attachment.url;
|
384 |
} else {
|
385 |
img_url = media_attachment.sizes.medium.url;
|
386 |
}
|
387 |
|
388 |
-
|
389 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
390 |
|
|
|
391 |
});
|
392 |
|
393 |
// Now that everything has been set, let's open up the frame.
|
138 |
e.preventDefault();
|
139 |
});
|
140 |
|
141 |
+
/*** Add image to slide ***/
|
142 |
+
$('#cyclone-slides-metabox').on('wpAddImage', '.cs-media-gallery-show', function(e, image_url, attachment_id){
|
143 |
+
var current_slide_box, slide_thumb, slide_attachment_id;
|
144 |
+
|
145 |
+
current_slide_box = $(this).parents('.cs-slide');/*** Get current box ***/
|
146 |
+
slide_thumb = current_slide_box.find('.cs-image-thumb');/*** Find the thumb ***/
|
147 |
+
slide_attachment_id = current_slide_box.find('.cs-image-id ');/*** Find the hidden field that will hold the attachment id ***/
|
148 |
+
|
149 |
+
slide_thumb.html('<img src="'+image_url+'" alt="thumb">').show();
|
150 |
+
slide_attachment_id.val(attachment_id);
|
151 |
+
|
152 |
+
});
|
153 |
+
|
154 |
+
/*** Add multiple images as slide ***/
|
155 |
+
$('#cyclone-slides-metabox').on('wpAddImages', '.cs-multiple-slides', function(e, media_attachments){
|
156 |
+
var cur_slide_count = $('.cs-sortables .cs-slide').length;
|
157 |
+
|
158 |
+
for(i=0; i<media_attachments.length; ++i){
|
159 |
+
|
160 |
+
$('#cyclone-slides-metabox .cs-add-slide').trigger('click');
|
161 |
+
|
162 |
+
$('.cs-sortables .cs-slide').eq(cur_slide_count+i).find('.cs-media-gallery-show').trigger('wpAddImage', [media_attachments[i].url, media_attachments[i].id]);
|
163 |
+
}
|
164 |
+
|
165 |
+
});
|
166 |
+
|
167 |
/*** Toggle - slide body visiblity ***/
|
168 |
$('#cyclone-slides-metabox').on('click', '.cs-header', function(e) {
|
169 |
var id, box, body, cs_slide_toggles;
|
366 |
}
|
367 |
// Prepare the variable that holds our custom media manager.
|
368 |
var cyclone_media_frame;
|
369 |
+
var triggering_element = null;
|
370 |
|
371 |
// Bind to our click event in order to open up the new media experience.
|
372 |
$(document.body).on('click', '.cs-media-gallery-show', function(e){
|
373 |
// Prevent the default action from occuring.
|
374 |
e.preventDefault();
|
375 |
|
376 |
+
triggering_element = jQuery(this); /* Get current clicked element */
|
377 |
|
378 |
|
379 |
// If the frame already exists, re-open it.
|
397 |
});
|
398 |
|
399 |
cyclone_media_frame.on('select', function(){
|
400 |
+
var media_attachment, img_url;
|
401 |
|
402 |
// Grab our attachment selection and construct a JSON representation of the model.
|
403 |
media_attachment = cyclone_media_frame.state().get('selection').first().toJSON();
|
404 |
|
|
|
|
|
|
|
405 |
if(undefined==media_attachment.sizes.medium){ /*** Account for smaller images where medium does not exist ***/
|
406 |
img_url = media_attachment.url;
|
407 |
} else {
|
408 |
img_url = media_attachment.sizes.medium.url;
|
409 |
}
|
410 |
|
411 |
+
triggering_element.trigger('wpAddImage', [img_url, media_attachment.id]);
|
412 |
+
});
|
413 |
+
|
414 |
+
// Now that everything has been set, let's open up the frame.
|
415 |
+
cyclone_media_frame.open();
|
416 |
+
});
|
417 |
+
})();
|
418 |
+
|
419 |
+
|
420 |
+
(function() {
|
421 |
+
if(typeof(wp) == "undefined" || typeof(wp.media) != "function"){
|
422 |
+
return;
|
423 |
+
}
|
424 |
+
// Prepare the variable that holds our custom media manager.
|
425 |
+
var cyclone_media_frame;
|
426 |
+
var triggering_element = null;
|
427 |
+
|
428 |
+
// Bind to our click event in order to open up the new media experience.
|
429 |
+
$(document.body).on('click', '.cs-multiple-slides', function(e){
|
430 |
+
// Prevent the default action from occuring.
|
431 |
+
e.preventDefault();
|
432 |
+
|
433 |
+
triggering_element = jQuery(this); /* Get current clicked element */
|
434 |
+
|
435 |
+
|
436 |
+
// If the frame already exists, re-open it.
|
437 |
+
if ( cyclone_media_frame ) {
|
438 |
+
cyclone_media_frame.open();
|
439 |
+
return;
|
440 |
+
}
|
441 |
+
|
442 |
+
|
443 |
+
cyclone_media_frame = wp.media.frames.cyclone_media_frame = wp.media({
|
444 |
+
className: 'media-frame cs-frame',
|
445 |
+
frame: 'select',
|
446 |
+
multiple: true,
|
447 |
+
title: cycloneslider_admin_vars.title2,
|
448 |
+
library: {
|
449 |
+
type: 'image'
|
450 |
+
},
|
451 |
+
button: {
|
452 |
+
text: cycloneslider_admin_vars.button2
|
453 |
+
}
|
454 |
+
});
|
455 |
+
|
456 |
+
cyclone_media_frame.on('select', function(){
|
457 |
+
var media_attachments;
|
458 |
+
|
459 |
+
// Grab our attachment selection and construct a JSON representation of the model.
|
460 |
+
media_attachments = cyclone_media_frame.state().get('selection').toJSON();
|
461 |
|
462 |
+
triggering_element.trigger('wpAddImages', [media_attachments]);
|
463 |
});
|
464 |
|
465 |
// Now that everything has been set, let's open up the frame.
|
js/client.js
CHANGED
@@ -8,5 +8,58 @@ jQuery(document).ready(function($){
|
|
8 |
});
|
9 |
} catch (ignore) {}
|
10 |
})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
-
});
|
8 |
});
|
9 |
} catch (ignore) {}
|
10 |
})();
|
11 |
+
|
12 |
+
});
|
13 |
+
|
14 |
+
/*** Global template functionalities ***/
|
15 |
+
(function() {
|
16 |
+
var slides_selector = '.cycloneslider-template-dark .cycloneslider-slides';
|
17 |
+
|
18 |
+
slides_selector += ',.cycloneslider-template-default .cycloneslider-slides';
|
19 |
+
slides_selector += ',.cycloneslider-template-standard .cycloneslider-slides';
|
20 |
+
slides_selector += ',.cycloneslider-template-thumbnails .cycloneslider-slides';
|
21 |
+
|
22 |
+
slides_selector += ',.cycloneslider-template-galleria .cycloneslider-slides';
|
23 |
+
slides_selector += ',.cycloneslider-template-text .cycloneslider-slides';
|
24 |
+
|
25 |
+
jQuery(document).on('cycle-before', slides_selector, function( event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) {
|
26 |
+
var slide = jQuery( outgoingSlideEl ); /* Current slide */
|
27 |
+
|
28 |
+
if( "on" == optionHash.dynamicHeight ) jQuery(this).animate({height:jQuery(incomingSlideEl).outerHeight()}, optionHash.autoHeightSpeed, optionHash.autoHeightEasing); /* Autoheight when dynamic height is on and auto height is not ratio (eg. 300:250) */
|
29 |
+
|
30 |
+
if(slide.hasClass('cycloneslider-slide-youtube')) pauseYoutube( slide ); /* Pause youtube video on next */
|
31 |
+
|
32 |
+
if(slide.hasClass('cycloneslider-slide-vimeo')) pauseVimeo( slide ); /* Pause vimeo video on next */
|
33 |
+
});
|
34 |
+
|
35 |
+
jQuery(document).on('cycle-initialized cycle-after', slides_selector, function( event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) {
|
36 |
+
var index = (event.type == 'cycle-initialized') ? optionHash.currSlide : optionHash.nextSlide;
|
37 |
+
var slide = jQuery( optionHash.slides[ index ] ); /* Current slide */
|
38 |
+
|
39 |
+
if( false == optionHash.hideNonActive ) slide.css('zIndex', parseInt(slide.css('zIndex'))+20); /* Fix for zindex issue on slider with youtube/vimeo slide */
|
40 |
+
});
|
41 |
+
|
42 |
+
function pauseYoutube( slide ){
|
43 |
+
var data = {
|
44 |
+
"event": "command",
|
45 |
+
"func": "pauseVideo",
|
46 |
+
"args": [],
|
47 |
+
"id": ""
|
48 |
+
}
|
49 |
+
postMessage( slide.find('iframe'), data, '*');
|
50 |
+
}
|
51 |
+
|
52 |
+
function pauseVimeo( slide ){
|
53 |
+
postMessage( slide.find('iframe'), {method:'pause'}, slide.find('iframe').attr('src'));
|
54 |
+
}
|
55 |
+
|
56 |
+
function postMessage(iframe, data, url){
|
57 |
+
try{
|
58 |
+
if (iframe[0]) { // Frame exists
|
59 |
+
iframe[0].contentWindow.postMessage(JSON.stringify(data), url);
|
60 |
+
}
|
61 |
+
} catch (ignore) {}
|
62 |
+
}
|
63 |
+
|
64 |
+
})();
|
65 |
|
|
templates/dark/script.js
CHANGED
@@ -3,19 +3,16 @@
|
|
3 |
var slides_selector = '.cycloneslider-template-dark .cycloneslider-slides';
|
4 |
|
5 |
jQuery(document).on('cycle-before', slides_selector, function( event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) {
|
6 |
-
var slide = jQuery( outgoingSlideEl ); /* Current slide */
|
7 |
-
|
8 |
-
if(optionHash.dynamicHeight == "on" ) jQuery(this).animate({height:jQuery(incomingSlideEl).outerHeight()}, optionHash.autoHeightSpeed, optionHash.autoHeightEasing); /* Autoheight when dynamic height is on and auto height is not ratio (eg. 300:250) */
|
9 |
|
|
|
10 |
jQuery( this ).find('.cycloneslider-caption-title').stop().fadeOut(0).end().find('.cycloneslider-caption-description').stop().fadeOut(0).end().find('.cycloneslider-caption-more').stop().fadeOut(0);
|
|
|
11 |
});
|
12 |
|
13 |
jQuery(document).on('cycle-initialized cycle-after', slides_selector, function( event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) {
|
14 |
var index = (event.type == 'cycle-initialized') ? optionHash.currSlide : optionHash.nextSlide;
|
15 |
var slide = jQuery( optionHash.slides[ index ] );
|
16 |
|
17 |
-
slide.css('zIndex', parseInt(slide.css('zIndex'))+20); /* Fix for slideshow with youtube or vimeo slide */
|
18 |
-
|
19 |
/* Cascade effect */
|
20 |
slide.find('.cycloneslider-caption-title').fadeIn(speed, function(){
|
21 |
slide.find('.cycloneslider-caption-description').fadeIn(speed, function(){
|
3 |
var slides_selector = '.cycloneslider-template-dark .cycloneslider-slides';
|
4 |
|
5 |
jQuery(document).on('cycle-before', slides_selector, function( event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) {
|
|
|
|
|
|
|
6 |
|
7 |
+
/* Hide captions and readmore */
|
8 |
jQuery( this ).find('.cycloneslider-caption-title').stop().fadeOut(0).end().find('.cycloneslider-caption-description').stop().fadeOut(0).end().find('.cycloneslider-caption-more').stop().fadeOut(0);
|
9 |
+
|
10 |
});
|
11 |
|
12 |
jQuery(document).on('cycle-initialized cycle-after', slides_selector, function( event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) {
|
13 |
var index = (event.type == 'cycle-initialized') ? optionHash.currSlide : optionHash.nextSlide;
|
14 |
var slide = jQuery( optionHash.slides[ index ] );
|
15 |
|
|
|
|
|
16 |
/* Cascade effect */
|
17 |
slide.find('.cycloneslider-caption-title').fadeIn(speed, function(){
|
18 |
slide.find('.cycloneslider-caption-description').fadeIn(speed, function(){
|
templates/default/script.js
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
(function() {
|
2 |
-
var slides_selector = '.cycloneslider-template-default .cycloneslider-slides';
|
3 |
-
|
4 |
-
jQuery(document).on('cycle-before', slides_selector, function( event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) {
|
5 |
-
var slide = jQuery( outgoingSlideEl ); /* Current slide */
|
6 |
-
|
7 |
-
if(optionHash.dynamicHeight == "on" ) jQuery(this).animate({height:jQuery(incomingSlideEl).outerHeight()}, optionHash.autoHeightSpeed, optionHash.autoHeightEasing); /* Autoheight when dynamic height is on and auto height is not ratio (eg. 300:250) */
|
8 |
-
|
9 |
-
if(slide.hasClass('cycloneslider-slide-youtube')) pauseYoutube( slide ); /* Pause youtube video on next */
|
10 |
-
|
11 |
-
if(slide.hasClass('cycloneslider-slide-vimeo')) pauseVimeo( slide ); /* Pause vimeo video on next */
|
12 |
-
});
|
13 |
-
|
14 |
-
jQuery(document).on('cycle-initialized cycle-after', slides_selector, function( event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) {
|
15 |
-
var index = (event.type == 'cycle-initialized') ? optionHash.currSlide : optionHash.nextSlide;
|
16 |
-
var slide = jQuery( optionHash.slides[ index ] );
|
17 |
-
slide.css('zIndex', parseInt(slide.css('zIndex'))+20); /* Fix for slideshow with youtube slide */
|
18 |
-
});
|
19 |
-
|
20 |
-
function pauseYoutube( slide ){
|
21 |
-
var data = {
|
22 |
-
"event": "command",
|
23 |
-
"func": "pauseVideo",
|
24 |
-
"args": [],
|
25 |
-
"id": ""
|
26 |
-
}
|
27 |
-
postMessage( slide.find('iframe'), data, '*');
|
28 |
-
}
|
29 |
-
|
30 |
-
function pauseVimeo( slide ){
|
31 |
-
postMessage( slide.find('iframe'), {method:'pause'}, slide.find('iframe').attr('src'));
|
32 |
-
}
|
33 |
-
|
34 |
-
function postMessage(iframe, data, url){
|
35 |
-
try{
|
36 |
-
if (iframe[0]) { // Frame exists
|
37 |
-
iframe[0].contentWindow.postMessage(JSON.stringify(data), url);
|
38 |
-
}
|
39 |
-
} catch (ignore) {}
|
40 |
-
}
|
41 |
-
|
42 |
-
})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/standard/script.js
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
(function() {
|
2 |
-
var slides_selector = '.cycloneslider-template-standard .cycloneslider-slides';
|
3 |
-
|
4 |
-
jQuery(document).on('cycle-before', slides_selector, function( event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) {
|
5 |
-
var slide = jQuery( outgoingSlideEl ); /* Current slide */
|
6 |
-
|
7 |
-
if(optionHash.dynamicHeight == "on" ) jQuery(this).animate({height:jQuery(incomingSlideEl).outerHeight()}, optionHash.autoHeightSpeed, optionHash.autoHeightEasing); /* Autoheight when dynamic height is on and auto height is not ratio (eg. 300:250) */
|
8 |
-
|
9 |
-
if(slide.hasClass('cycloneslider-slide-youtube')) pauseYoutube( slide ); /* Pause youtube video on next */
|
10 |
-
|
11 |
-
if(slide.hasClass('cycloneslider-slide-vimeo')) pauseVimeo( slide ); /* Pause vimeo video on next */
|
12 |
-
});
|
13 |
-
|
14 |
-
jQuery(document).on('cycle-initialized cycle-after', slides_selector, function( event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) {
|
15 |
-
var index = (event.type == 'cycle-initialized') ? optionHash.currSlide : optionHash.nextSlide;
|
16 |
-
var slide = jQuery( optionHash.slides[ index ] );
|
17 |
-
slide.css('zIndex', parseInt(slide.css('zIndex'))+20); /* Fix for slideshow with youtube slide */
|
18 |
-
});
|
19 |
-
|
20 |
-
function pauseYoutube( slide ){
|
21 |
-
var data = {
|
22 |
-
"event": "command",
|
23 |
-
"func": "pauseVideo",
|
24 |
-
"args": [],
|
25 |
-
"id": ""
|
26 |
-
}
|
27 |
-
postMessage( slide.find('iframe'), data, '*');
|
28 |
-
}
|
29 |
-
|
30 |
-
function pauseVimeo( slide ){
|
31 |
-
postMessage( slide.find('iframe'), {method:'pause'}, slide.find('iframe').attr('src'));
|
32 |
-
}
|
33 |
-
|
34 |
-
function postMessage(iframe, data, url){
|
35 |
-
try{
|
36 |
-
if (iframe[0]) { // Frame exists
|
37 |
-
iframe[0].contentWindow.postMessage(JSON.stringify(data), url);
|
38 |
-
}
|
39 |
-
} catch (ignore) {}
|
40 |
-
}
|
41 |
-
|
42 |
-
})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/standard/style.css
CHANGED
@@ -11,6 +11,7 @@
|
|
11 |
text-align: center;
|
12 |
width: 100%; /* For slides in scrollHorz to work */
|
13 |
display: none; /* Hide slides to prevent FOUC */
|
|
|
14 |
}
|
15 |
.cycloneslider-template-standard div[data-cycle-dynamic-height="off"] .cycloneslider-slide-image{
|
16 |
height: 100%; /* To prevent cutting off captions when dynamic height is off */
|
@@ -44,7 +45,6 @@
|
|
44 |
}
|
45 |
.cycloneslider-template-standard .cycloneslider-slide-custom{
|
46 |
min-height: 100%;
|
47 |
-
background: #fff;
|
48 |
}
|
49 |
|
50 |
/*** Prev/Next ***/
|
11 |
text-align: center;
|
12 |
width: 100%; /* For slides in scrollHorz to work */
|
13 |
display: none; /* Hide slides to prevent FOUC */
|
14 |
+
background: #fff; /* Add background to prevent slides from peeking behind the current slide when fx=scrollHorz and hideNonActive=false */
|
15 |
}
|
16 |
.cycloneslider-template-standard div[data-cycle-dynamic-height="off"] .cycloneslider-slide-image{
|
17 |
height: 100%; /* To prevent cutting off captions when dynamic height is off */
|
45 |
}
|
46 |
.cycloneslider-template-standard .cycloneslider-slide-custom{
|
47 |
min-height: 100%;
|
|
|
48 |
}
|
49 |
|
50 |
/*** Prev/Next ***/
|
templates/thumbnails/script.js
CHANGED
@@ -8,22 +8,10 @@
|
|
8 |
});
|
9 |
|
10 |
jQuery(document).on('cycle-before', '.cycloneslider-template-thumbnails .cycloneslider-slides', function( event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) {
|
11 |
-
var i = optionHash.nextSlide
|
12 |
-
slide = jQuery( outgoingSlideEl ); /* Current slide */
|
13 |
|
14 |
jQuery(this).parent().next().find('li').removeClass('current').eq(i).addClass('current');
|
15 |
|
16 |
-
if(optionHash.dynamicHeight == "on") jQuery(this).animate({height:jQuery(incomingSlideEl).outerHeight()}, optionHash.autoHeightSpeed, optionHash.autoHeightEasing); /* Autoheight when dynamic height is on and auto height is not ratio (eg. 300:250) */
|
17 |
-
|
18 |
-
if(slide.hasClass('cycloneslider-slide-youtube')) pauseYoutube( slide ); /* Pause youtube video on next */
|
19 |
-
|
20 |
-
if(slide.hasClass('cycloneslider-slide-vimeo')) pauseVimeo( slide ); /* Pause vimeo video on next */
|
21 |
-
});
|
22 |
-
|
23 |
-
jQuery(document).on('cycle-initialized cycle-after', '.cycloneslider-template-thumbnails .cycloneslider-slides', function( event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) {
|
24 |
-
var index = (event.type == 'cycle-initialized') ? optionHash.currSlide : optionHash.nextSlide;
|
25 |
-
var slide = jQuery( optionHash.slides[ index ] );
|
26 |
-
slide.css('zIndex', parseInt(slide.css('zIndex'))+20); /* Fix for slideshow with youtube slide */
|
27 |
});
|
28 |
|
29 |
jQuery(document).on('click', '.cycloneslider-thumbnails li', function(){
|
@@ -32,25 +20,4 @@
|
|
32 |
jQuery(this).parents('.cycloneslider-thumbnails').prev().find('.cycloneslider-slides').cycle('goto', i);
|
33 |
});
|
34 |
|
35 |
-
function pauseYoutube( slide ){
|
36 |
-
var data = {
|
37 |
-
"event": "command",
|
38 |
-
"func": "pauseVideo",
|
39 |
-
"args": [],
|
40 |
-
"id": ""
|
41 |
-
}
|
42 |
-
postMessage( slide.find('iframe'), data, '*');
|
43 |
-
}
|
44 |
-
|
45 |
-
function pauseVimeo( slide ){
|
46 |
-
postMessage( slide.find('iframe'), {method:'pause'}, slide.find('iframe').attr('src'));
|
47 |
-
}
|
48 |
-
|
49 |
-
function postMessage(iframe, data, url){
|
50 |
-
try{
|
51 |
-
if (iframe[0]) { // Frame exists
|
52 |
-
iframe[0].contentWindow.postMessage(JSON.stringify(data), url);
|
53 |
-
}
|
54 |
-
} catch (ignore) {}
|
55 |
-
}
|
56 |
})();
|
8 |
});
|
9 |
|
10 |
jQuery(document).on('cycle-before', '.cycloneslider-template-thumbnails .cycloneslider-slides', function( event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) {
|
11 |
+
var i = optionHash.nextSlide;
|
|
|
12 |
|
13 |
jQuery(this).parent().next().find('li').removeClass('current').eq(i).addClass('current');
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
});
|
16 |
|
17 |
jQuery(document).on('click', '.cycloneslider-thumbnails li', function(){
|
20 |
jQuery(this).parents('.cycloneslider-thumbnails').prev().find('.cycloneslider-slides').cycle('goto', i);
|
21 |
});
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
})();
|
views/slides.php
CHANGED
@@ -6,3 +6,4 @@
|
|
6 |
</div><!-- end .cycloneslider-sortable -->
|
7 |
|
8 |
<input type="button" value="<?php _e('Add Slide', 'cycloneslider'); ?>" class="cs-add-slide button-secondary" />
|
|
6 |
</div><!-- end .cycloneslider-sortable -->
|
7 |
|
8 |
<input type="button" value="<?php _e('Add Slide', 'cycloneslider'); ?>" class="cs-add-slide button-secondary" />
|
9 |
+
<input type="button" value="<?php _e('Add Images as Slides', 'cycloneslider'); ?>" class="cs-multiple-slides button-secondary" />
|