Version Description
- Fixed backwards compatibility issues with older versions of jQuery
Download this release
Release Info
Developer | MatthewRuddy |
Plugin | Easing Slider |
Version | 2.0.1.2 |
Comparing to | |
See all releases |
Code changes from version 2.0.1.1 to 2.0.1.2
- css/slideshow.css +0 -1
- css/slideshow.min.css +1 -1
- easingsliderlite.php +2 -2
- includes/Upgrade.php +1 -1
- js/admin.js +6 -26
- js/admin.min.js +2 -2
- js/slideshow.js +6 -6
- js/slideshow.min.js +1 -1
- readme.txt +11 -3
- templates/editslideshow-slide.php +2 -2
css/slideshow.css
CHANGED
@@ -60,7 +60,6 @@
|
|
60 |
.easingsliderlite-viewport {
|
61 |
position: relative !important;
|
62 |
overflow: hidden !important;
|
63 |
-
z-index: 10 !important;
|
64 |
}
|
65 |
|
66 |
.easingsliderlite-slides-container {
|
60 |
.easingsliderlite-viewport {
|
61 |
position: relative !important;
|
62 |
overflow: hidden !important;
|
|
|
63 |
}
|
64 |
|
65 |
.easingsliderlite-slides-container {
|
css/slideshow.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.easingsliderlite,.easingsliderlite-viewport,.easingsliderlite-slides-container,.easingsliderlite-slide,.easingsliderlite-image,.easingsliderlite-preload{margin:0!important;padding:0!important;border:0!important;line-height:0!important;outline:none!important}.easingsliderlite{position:relative!important}.easingsliderlite-preload{background:url(../images/loading.gif) no-repeat center center #fff!important;width:100%!important;height:100%!important;position:absolute!important;top:0!important;left:0!important;z-index:50!important}.easingsliderlite-arrows.has-hover{opacity:0}.easingsliderlite:hover .easingsliderlite-arrows.has-hover{opacity:1}.easingsliderlite-pagination.has-hover{opacity:0}.easingsliderlite:hover .easingsliderlite-pagination.has-hover{opacity:1}.easingsliderlite-viewport{position:relative!important;overflow:hidden!important
|
1 |
+
.easingsliderlite,.easingsliderlite-viewport,.easingsliderlite-slides-container,.easingsliderlite-slide,.easingsliderlite-image,.easingsliderlite-preload{margin:0!important;padding:0!important;border:0!important;line-height:0!important;outline:none!important}.easingsliderlite{position:relative!important}.easingsliderlite-preload{background:url(../images/loading.gif) no-repeat center center #fff!important;width:100%!important;height:100%!important;position:absolute!important;top:0!important;left:0!important;z-index:50!important}.easingsliderlite-arrows.has-hover{opacity:0}.easingsliderlite:hover .easingsliderlite-arrows.has-hover{opacity:1}.easingsliderlite-pagination.has-hover{opacity:0}.easingsliderlite:hover .easingsliderlite-pagination.has-hover{opacity:1}.easingsliderlite-viewport{position:relative!important;overflow:hidden!important}.easingsliderlite-slides-container{overflow:hidden!important;position:absolute!important;top:0;left:0;display:block!important}.easingsliderlite.use-css3 .easingsliderlite-slides-container{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.easingsliderlite.use-slide.use-css3 .easingsliderlite-slides-container{-webkit-transition:-webkit-transform .5s ease;-moz-transition:-moz-transform .5s ease;-ms-transition:-ms-transform .5s ease;-o-transition:-o-transform .5s ease;transition:transform .5s ease}.easingsliderlite.use-fade.use-css3 .easingsliderlite-slides-container{-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none}.easingsliderlite.use-slide .easingsliderlite-slide{float:left!important;position:relative!important}.easingsliderlite.use-fade .easingsliderlite-slide{position:absolute!important;top:0!important;left:0!important}.easingsliderlite.use-fade .easingsliderlite-slide.active{z-index:10}.easingsliderlite-slide{width:100%}.easingsliderlite-slide>a{display:block!important}.easingsliderlite-image{width:100%!important;max-width:100%!important;display:block!important}.easingsliderlite-slide-content{position:absolute!important;top:0;left:0}.easingsliderlite-slide-content .caption.left{top:0!important;left:0!important}.easingsliderlite-slide-content .caption.right{top:0!important;right:0!important}.easingsliderlite-slide-content .caption.top{top:0!important;left:0!important}.easingsliderlite-slide-content .caption.bottom{bottom:0!important;left:0!important}.easingsliderlite-arrows{position:absolute;top:46%;width:30px;height:30px;background-image:url(../images/slideshow_arrows.png);background-repeat:no-repeat;background-position:0 0;z-index:30;cursor:pointer;opacity:0;-webkit-transition:opacity .25s linear;-moz-transition:opacity .25s linear;-ms-transition:opacity .25s linear;-o-transition:opacity .25s linear;transition:opacity .25s linear}.easingsliderlite-next.inside{right:10px;background-position:0 -29px}.easingsliderlite-next.outside{right:-40px;padding-left:20px;background-position:20px -29px}.easingsliderlite-prev.inside{left:10px}.easingsliderlite-prev.outside{left:-40px;padding-right:20px}.easingsliderlite-pagination{position:absolute;z-index:30;opacity:0;-webkit-transition:opacity .25s linear;-moz-transition:opacity .25s linear;-ms-transition:opacity .25s linear;-o-transition:opacity .25s linear;transition:opacity .25s linear}.easingsliderlite-pagination.inside.bottom-left{bottom:10px;left:10px}.easingsliderlite-pagination.inside.bottom-right{bottom:10px;right:10px}.easingsliderlite-pagination.inside.bottom-center{bottom:10px;left:0;width:100%;text-align:center}.easingsliderlite-pagination.inside.top-left{top:10px;left:10px}.easingsliderlite-pagination.inside.top-right{top:10px;right:10px}.easingsliderlite-pagination.inside.top-center{top:10px;left:0;width:100%;text-align:center}.easingsliderlite-pagination.outside.bottom-left{bottom:-25px;left:0;padding-top:20px}.easingsliderlite-pagination.outside.bottom-right{bottom:-25px;right:0;padding-top:20px}.easingsliderlite-pagination.outside.bottom-center{bottom:-25px;left:0;width:100%;text-align:center;padding-top:20px}.easingsliderlite-pagination.outside.top-left{top:-25px;left:0;padding-bottom:20px}.easingsliderlite-pagination.outside.top-right{top:-25px;right:0;padding-bottom:20px}.easingsliderlite-pagination.outside.top-center{top:-25px;left:0;width:100%;text-align:center;padding-bottom:20px}.easingsliderlite-icon{width:14px;height:14px;background-image:url(../images/slideshow_icons.png);background-repeat:no-repeat;background-position:0 0;display:inline-block;z-index:30;cursor:pointer}.easingsliderlite-icon:last-child{margin-right:0}.easingsliderlite-icon.active{background-position:0 -14px}.easingsliderlite-slide-content .caption{background-color:#000;background-color:rgba(0,0,0,0.5);color:#fff;padding:20px;margin:20px}.active .easingsliderlite-slide-content .caption{-webkit-animation-duration:.25s;-moz-animation-duration:.25s;-o-animation-duration:.25s;animation-duration:.25s;-webkit-animation-delay:.5s;-moz-animation-delay:.5s;-o-animation-delay:.5s;animation-delay:.5s;-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}
|
easingsliderlite.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/*
|
4 |
Plugin Name: Easing Slider "Lite"
|
5 |
Plugin URI: http://easingslider.com/
|
6 |
-
Version: 2.0.1.
|
7 |
Author: Matthew Ruddy
|
8 |
Author URI: http://matthewruddy.com/
|
9 |
Description: Easing Slider "Lite" is an easy to use slideshow plugin for WordPress. Simple, lightweight & designed to get the job done, it allows you to get going without any fuss.
|
@@ -60,7 +60,7 @@ class EasingSliderLite {
|
|
60 |
*
|
61 |
* @since 2.0
|
62 |
*/
|
63 |
-
public static $version = '2.0.1.
|
64 |
|
65 |
/**
|
66 |
* Arrays of admin messages
|
3 |
/*
|
4 |
Plugin Name: Easing Slider "Lite"
|
5 |
Plugin URI: http://easingslider.com/
|
6 |
+
Version: 2.0.1.2
|
7 |
Author: Matthew Ruddy
|
8 |
Author URI: http://matthewruddy.com/
|
9 |
Description: Easing Slider "Lite" is an easy to use slideshow plugin for WordPress. Simple, lightweight & designed to get the job done, it allows you to get going without any fuss.
|
60 |
*
|
61 |
* @since 2.0
|
62 |
*/
|
63 |
+
public static $version = '2.0.1.2';
|
64 |
|
65 |
/**
|
66 |
* Arrays of admin messages
|
includes/Upgrade.php
CHANGED
@@ -76,7 +76,7 @@ class ESL_Upgrade {
|
|
76 |
*/
|
77 |
public static final function should_do_major_upgrade() {
|
78 |
|
79 |
-
if ( get_option( 'easingslider_version' ) !== false || get_option( 'activation' ) !== false ) {
|
80 |
if ( get_option( 'easingsliderlite_major_upgrade' ) === false )
|
81 |
return true;
|
82 |
}
|
76 |
*/
|
77 |
public static final function should_do_major_upgrade() {
|
78 |
|
79 |
+
if ( get_option( 'easingslider_version' ) !== false || get_option( 'activation' ) !== false || get_option( 'sImg1' ) !== false ) {
|
80 |
if ( get_option( 'easingsliderlite_major_upgrade' ) === false )
|
81 |
return true;
|
82 |
}
|
js/admin.js
CHANGED
@@ -140,7 +140,7 @@
|
|
140 |
this.collection.on('change:url', this.render, this);
|
141 |
|
142 |
/** Delete all images functionality */
|
143 |
-
$('.delete-images').
|
144 |
|
145 |
event.preventDefault();
|
146 |
|
@@ -151,7 +151,7 @@
|
|
151 |
});
|
152 |
|
153 |
/** Add image(s) functionality */
|
154 |
-
$('.add-image').
|
155 |
|
156 |
event.preventDefault();
|
157 |
|
@@ -161,7 +161,7 @@
|
|
161 |
});
|
162 |
|
163 |
/** Delete image functionality */
|
164 |
-
$(document).
|
165 |
|
166 |
event.preventDefault();
|
167 |
|
@@ -172,7 +172,7 @@
|
|
172 |
});
|
173 |
|
174 |
/** Edit slide functionality */
|
175 |
-
$(document).
|
176 |
|
177 |
event.preventDefault();
|
178 |
|
@@ -477,7 +477,7 @@
|
|
477 |
wp.media.view.Attachment.Details.prototype.template = wp.media.template('image-details');
|
478 |
|
479 |
/** Show/hide settings functionality */
|
480 |
-
$('.sidebar-name').
|
481 |
|
482 |
var $thisParent = $(this).parent(),
|
483 |
$thisContent = $thisParent.find('.sidebar-content');
|
@@ -536,26 +536,6 @@
|
|
536 |
}
|
537 |
});
|
538 |
|
539 |
-
/** Delete slideshow warnings */
|
540 |
-
$('.trash a').on('click', function(event) {
|
541 |
-
if ( !confirm( easingsliderlite.delete_slideshow ) )
|
542 |
-
return false;
|
543 |
-
});
|
544 |
-
$('#doaction, #doaction2').on('click', function(event) {
|
545 |
-
var id = event.target.id.replace('do', '');
|
546 |
-
if ( $('#'+ id).val() == 'delete' )
|
547 |
-
if ( !confirm( easingsliderlite.delete_slideshows ) )
|
548 |
-
return false;
|
549 |
-
});
|
550 |
-
|
551 |
-
/** Select all slideshows (import/export page) functionality */
|
552 |
-
$('.multiple-checkbox .select-all').on('click', function(event) {
|
553 |
-
if ( $(this).hasClass('checked') )
|
554 |
-
$(this).removeClass('checked').parents('ul').find('input').removeAttr('checked');
|
555 |
-
else
|
556 |
-
$(this).addClass('checked').parents('ul').find('input').attr('checked', 'checked');
|
557 |
-
});
|
558 |
-
|
559 |
/** Fade out messages after 5 seconds */
|
560 |
setTimeout(function() {
|
561 |
$('.message').not('.permanent').each(function() {
|
@@ -566,7 +546,7 @@
|
|
566 |
}, 5000);
|
567 |
|
568 |
/** Show warning prompts */
|
569 |
-
$('.warn').
|
570 |
if ( !confirm('Are you sure you want to do this? This cannot be reversed.' ) )
|
571 |
return false;
|
572 |
});
|
140 |
this.collection.on('change:url', this.render, this);
|
141 |
|
142 |
/** Delete all images functionality */
|
143 |
+
$('.delete-images').bind('click', function(event) {
|
144 |
|
145 |
event.preventDefault();
|
146 |
|
151 |
});
|
152 |
|
153 |
/** Add image(s) functionality */
|
154 |
+
$('.add-image').bind('click', function(event) {
|
155 |
|
156 |
event.preventDefault();
|
157 |
|
161 |
});
|
162 |
|
163 |
/** Delete image functionality */
|
164 |
+
$(document).delegate('.delete-button', 'click', function(event) {
|
165 |
|
166 |
event.preventDefault();
|
167 |
|
172 |
});
|
173 |
|
174 |
/** Edit slide functionality */
|
175 |
+
$(document).delegate('.thumbnails-container img', 'click', function(event) {
|
176 |
|
177 |
event.preventDefault();
|
178 |
|
477 |
wp.media.view.Attachment.Details.prototype.template = wp.media.template('image-details');
|
478 |
|
479 |
/** Show/hide settings functionality */
|
480 |
+
$('.sidebar-name').bind('click', function() {
|
481 |
|
482 |
var $thisParent = $(this).parent(),
|
483 |
$thisContent = $thisParent.find('.sidebar-content');
|
536 |
}
|
537 |
});
|
538 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
539 |
/** Fade out messages after 5 seconds */
|
540 |
setTimeout(function() {
|
541 |
$('.message').not('.permanent').each(function() {
|
546 |
}, 5000);
|
547 |
|
548 |
/** Show warning prompts */
|
549 |
+
$('.warn').bind('click', function() {
|
550 |
if ( !confirm('Are you sure you want to do this? This cannot be reversed.' ) )
|
551 |
return false;
|
552 |
});
|
js/admin.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
"use strict";(function(a){window.TemplateLoader={get:function(b){if(!this.templates){this.templates={}}var c=this.templates[b];if(!c){c=a(b).html();c=_.template(c);this.templates[b]=c}return c}};window.Slide=Backbone.Model.extend({defaults:{url:null,sizes:null,alt:null,title:null,link:null,linkTarget:"_blank",},});window.SlideCollection=Backbone.Collection.extend({model:Slide,primary:0,initialize:function(){var b=this;this.on("add",this.addModel,this);this.on("remove",this.removeModel,this);this.on("reset",this.resetData,this);this.on("change",this.resetData,this);setTimeout(function(){_.each(b.models,function(c){b.primary++})})},addModel:function(b){this.primary++;b.set({id:this.primary},{silent:true});this.reset(this.models,{silent:true});this.resetData()},removeModel:function(){var b=this;this.resetIDs();this.reset(this.models,{silent:true});this.resetData()},resetData:function(){a("#slideshow-images").val(JSON.stringify(this))},resetIDs:function(){var b=this;this.primary=0;_.each(this.models,function(c){b.primary++;c.set({id:b.primary},{silent:true})});return this},});window.SlideView=Backbone.View.extend({$container:a(".thumbnails-container .inner"),initialize:function(){var b=this;this.template=TemplateLoader.get("#tmpl-slide");this.collection.on("add",this.addThumb,this);this.collection.on("remove",this.render,this);this.collection.on("reset",this.render,this);this.collection.on("change:url",this.render,this);a(".delete-images").
|
2 |
-
for(var b in this.modelAttributes){e[this.modelAttributes[b]]=d.get(this.modelAttributes[b])}this.model.set(e)},remove:function(){AddImageView.prototype.remove.apply(this,arguments);this.fileFrame.modal.$el.remove();this.fileFrame.uploader.$browser.remove()},});wp.media.view.Attachment.Details.prototype.template=wp.media.template("image-details");a(".sidebar-name").
|
1 |
+
"use strict";(function(a){window.TemplateLoader={get:function(b){if(!this.templates){this.templates={}}var c=this.templates[b];if(!c){c=a(b).html();c=_.template(c);this.templates[b]=c}return c}};window.Slide=Backbone.Model.extend({defaults:{url:null,sizes:null,alt:null,title:null,link:null,linkTarget:"_blank",},});window.SlideCollection=Backbone.Collection.extend({model:Slide,primary:0,initialize:function(){var b=this;this.on("add",this.addModel,this);this.on("remove",this.removeModel,this);this.on("reset",this.resetData,this);this.on("change",this.resetData,this);setTimeout(function(){_.each(b.models,function(c){b.primary++})})},addModel:function(b){this.primary++;b.set({id:this.primary},{silent:true});this.reset(this.models,{silent:true});this.resetData()},removeModel:function(){var b=this;this.resetIDs();this.reset(this.models,{silent:true});this.resetData()},resetData:function(){a("#slideshow-images").val(JSON.stringify(this))},resetIDs:function(){var b=this;this.primary=0;_.each(this.models,function(c){b.primary++;c.set({id:b.primary},{silent:true})});return this},});window.SlideView=Backbone.View.extend({$container:a(".thumbnails-container .inner"),initialize:function(){var b=this;this.template=TemplateLoader.get("#tmpl-slide");this.collection.on("add",this.addThumb,this);this.collection.on("remove",this.render,this);this.collection.on("reset",this.render,this);this.collection.on("change:url",this.render,this);a(".delete-images").bind("click",function(c){c.preventDefault();if(confirm(easingsliderlite.delete_images)){b.removeThumbs.call(b,c)}});a(".add-image").bind("click",function(c){c.preventDefault();addImageView.render()});a(document).delegate(".delete-button","click",function(c){c.preventDefault();if(confirm(easingsliderlite.delete_image)){b.collection.remove(b.collection.get(a(this).parent().attr("data-id")))}});a(document).delegate(".thumbnails-container img","click",function(c){c.preventDefault();var e=a(this).parent().attr("data-id"),d=new EditSlideView({model:b.collection.get(e)});a(d.render().el).appendTo("body").focus()})},addThumb:function(b){this.$container.append(this.template(b.toJSON()))},removeThumbs:function(b){b.preventDefault();this.$container.empty();this.collection.reset();this.collection.primary=0},render:function(){var b=this;this.$container.empty();_.each(this.collection.models,function(c){b.$container.append(b.template(c.toJSON()))});return this}});window.EditSlideView=Backbone.View.extend({attributes:{tabindex:0},changeImageView:null,events:{change:"change","click .media-modal-backdrop, .media-modal-close":"discardChanges","click .change-image":"changeImage","click .media-modal-save":"close","click .media-menu-item":"toggleTab",keydown:"keyDown"},initialize:function(){this.origAttributes=_.clone(this.model.attributes);this.template=TemplateLoader.get("#tmpl-edit-slide");this.model.on("change:url",this.resetThumbnail,this)},toggleTab:function(b){b.preventDefault();var c=b.target.dataset.tab;a(".media-menu-item").removeClass("active");a(b.target).addClass("active");a(".media-tab",this.$el).each(function(){if(this.id===c){a(this).show()}else{a(this).hide()}})},close:function(b){b.preventDefault();this.remove();if(this.changeImageView){this.changeImageView.remove()}},change:function(b){var c=b.target,d={};d[c.id]=c.value;this.model.set(d)},discardChanges:function(c){c.preventDefault();var d=JSON.stringify(this.model.attributes),b=JSON.stringify(this.origAttributes);if(d===b){this.close(c)}else{if(confirm(easingsliderlite.media_upload.discard_changes)){this.model.set(this.origAttributes);this.close()}}},resetThumbnail:function(b,e){var d=b.get("sizes"),c=d.large||d.medium||d.thumbnail;this.$(".slide-thumbnail").attr("src",c.url)},changeImage:function(c){c.preventDefault();var b=this;if(this.changeImageView===null){this.changeImageView=new ChangeImageView({id:this.model.get("id"),model:this.model})}this.changeImageView.render();a(".media-modal-backdrop").first().hide();this.changeImageView.fileFrame.on("close",function(){a(".media-modal-backdrop").first().show();b.$el.focus()})},keyDown:function(b){if(b.keyCode===27){b.preventDefault();this.discardChanges(b);return}},render:function(){a(this.el).html(this.template(this.model.toJSON()));return this},});window.AddImageView=Backbone.View.extend({fileFrame:null,frameProperties:{title:easingsliderlite.media_upload.title,button:easingsliderlite.media_upload.button,multiple:true},modelAttributes:["url","sizes","alt","title"],initialize:function(){if(this.fileFrame){return}this.fileFrame=wp.media.frames.fileFrame=new wp.media({title:this.frameProperties.title,button:{text:this.frameProperties.button},multiple:this.frameProperties.multiple});this.fileFrame.on("select",this.onSelect,this)},onSelect:function(){var c=this.fileFrame.state().get("selection"),b=this;_.each(c.models,function(e){var f={};for(var d in b.modelAttributes){f[b.modelAttributes[d]]=e.get(b.modelAttributes[d])}b.collection.add([f])})},render:function(){this.fileFrame.open()
|
2 |
+
}});window.ChangeImageView=AddImageView.extend({frameProperties:{title:easingsliderlite.media_upload.title,button:easingsliderlite.media_upload.change,multiple:false},onSelect:function(){var c=this.fileFrame.state().get("selection"),d=c.models[0],e={};for(var b in this.modelAttributes){e[this.modelAttributes[b]]=d.get(this.modelAttributes[b])}this.model.set(e)},remove:function(){AddImageView.prototype.remove.apply(this,arguments);this.fileFrame.modal.$el.remove();this.fileFrame.uploader.$browser.remove()},});wp.media.view.Attachment.Details.prototype.template=wp.media.template("image-details");a(".sidebar-name").bind("click",function(){var c=a(this).parent(),b=c.find(".sidebar-content");if(!c.hasClass("exclude")){a(".sidebar-name").each(function(){var d=a(this).parent();if(!d.hasClass("exclude")&&!d.hasClass("closed")){d.find(".sidebar-content").slideUp(200,function(){d.addClass("closed")})}})}if(c.hasClass("closed")){b.slideDown(200,function(){c.removeClass("closed")})}else{b.slideUp(200,function(){c.addClass("closed")})}});a(".thumbnails-container").sortable({items:".thumbnail",containment:"parent",tolerance:"pointer",stop:function(d,e){var b=[],f=[];a(this).find(".thumbnail").each(function(){b.push(a(this).attr("data-id"))});for(var c=0;c<b.length;c++){f.push(slideCollection.get(b[c]))}slideCollection.reset(f).resetIDs().resetData()}});setTimeout(function(){a(".message").not(".permanent").each(function(){a(this).fadeOut(400,function(){a(this).remove()})})},5000);a(".warn").bind("click",function(){if(!confirm("Are you sure you want to do this? This cannot be reversed.")){return false}});if(a("#slideshow-images").length==0){return}window.slideCollection=new SlideCollection(JSON.parse(a("#slideshow-images").val()));window.slideView=new SlideView({collection:slideCollection});window.addImageView=new AddImageView({collection:slideCollection})})(jQuery);
|
js/slideshow.js
CHANGED
@@ -60,7 +60,7 @@
|
|
60 |
|
61 |
/** Flag current slide (and queue for slide change) */
|
62 |
base.$slides.eq(base.current).addClass('active');
|
63 |
-
base.$el.
|
64 |
base.$slides.removeClass('active').eq(base.current).addClass('active');
|
65 |
});
|
66 |
|
@@ -108,7 +108,7 @@
|
|
108 |
base.$el.addClass('is-responsive');
|
109 |
|
110 |
/** Resize slideshow on window resize */
|
111 |
-
$(window).
|
112 |
|
113 |
/** Queue custom resize end event */
|
114 |
clearTimeout(base.resizeEnd);
|
@@ -170,11 +170,11 @@
|
|
170 |
$arrows = $().add($next).add($prev);
|
171 |
|
172 |
/** Bind click events */
|
173 |
-
$next.
|
174 |
base.nextSlide();
|
175 |
return false;
|
176 |
});
|
177 |
-
$prev.
|
178 |
base.prevSlide();
|
179 |
return false;
|
180 |
});
|
@@ -206,14 +206,14 @@
|
|
206 |
$icons = $pagination.children('div');
|
207 |
|
208 |
/** Bind click events */
|
209 |
-
$icons.
|
210 |
base.goToSlide($(this).index());
|
211 |
return false;
|
212 |
});
|
213 |
|
214 |
/** Set current icon now & on slide change */
|
215 |
$icons.eq(base.current).addClass('active');
|
216 |
-
base.$el.
|
217 |
$icons.removeClass('active').eq(base.current).addClass('active');
|
218 |
});
|
219 |
|
60 |
|
61 |
/** Flag current slide (and queue for slide change) */
|
62 |
base.$slides.eq(base.current).addClass('active');
|
63 |
+
base.$el.bind('beforetransition', function() {
|
64 |
base.$slides.removeClass('active').eq(base.current).addClass('active');
|
65 |
});
|
66 |
|
108 |
base.$el.addClass('is-responsive');
|
109 |
|
110 |
/** Resize slideshow on window resize */
|
111 |
+
$(window).bind('resize.easingsliderlite', function(event) {
|
112 |
|
113 |
/** Queue custom resize end event */
|
114 |
clearTimeout(base.resizeEnd);
|
170 |
$arrows = $().add($next).add($prev);
|
171 |
|
172 |
/** Bind click events */
|
173 |
+
$next.bind(base.clickEvent, function(event) {
|
174 |
base.nextSlide();
|
175 |
return false;
|
176 |
});
|
177 |
+
$prev.bind(base.clickEvent, function(event) {
|
178 |
base.prevSlide();
|
179 |
return false;
|
180 |
});
|
206 |
$icons = $pagination.children('div');
|
207 |
|
208 |
/** Bind click events */
|
209 |
+
$icons.bind(base.clickEvent, function(event) {
|
210 |
base.goToSlide($(this).index());
|
211 |
return false;
|
212 |
});
|
213 |
|
214 |
/** Set current icon now & on slide change */
|
215 |
$icons.eq(base.current).addClass('active');
|
216 |
+
base.$el.bind('beforetransition', function() {
|
217 |
$icons.removeClass('active').eq(base.current).addClass('active');
|
218 |
});
|
219 |
|
js/slideshow.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
(function(a){a.EasingSliderLite=function(b){var c=this,d;c.el=b;c.$el=a(c.el);c.$viewport=c.$el.find(".easingsliderlite-viewport");c.$container=c.$viewport.find(".easingsliderlite-slides-container");c.$slides=c.$container.find(".easingsliderlite-slide");c.$images=c.$slides.find(".easingsliderlite-image");c.options=d=a.extend({},a.EasingSliderLite.defaults,JSON.parse(c.$el.attr("data-options")));c.current=0;c.previous=0;c.count=c.$slides.length;c.width=d.dimensions.width;c.height=d.dimensions.height;c.$el.data("easingsliderlite",c);c.initialize=function(){c.$container.css({display:""});c.useCSS3=(d.general.enableCSS3)?c._supportsCSS3():false;if(c.useCSS3){c.$el.addClass("use-css3")}if(d.dimensions.responsive){c._setupResponsive()}c.supportsTouch=("ontouchstart" in document.documentElement&&d.general.enableTouch)?true:false;c.clickEvent=(c.supportsTouch)?"touchstart.easingsliderlite":"click.easingsliderlite";if(d.navigation.arrows){c._setupArrows()}if(d.navigation.pagination){c._setupPagination()}c.$slides.eq(c.current).addClass("active");c.$el.
|
2 |
if(d.playback.enabled){d.playback.enabled=false}clearTimeout(c.playbackTimer);if(!e.silent){c.$el.trigger("endplayback",c)}};c.pausePlayback=function(e){e=a.extend({},{silent:false},e);clearTimeout(c.playbackTimer);c.runtime=Math.ceil(new Date()-c.runtime);if(!e.silent){c.$el.trigger("pauseplayback",c)}};c.resumePlayback=function(e){e=a.extend({},{silent:false},e);c.pauseTime=Math.ceil(c.pauseTime-c.runtime);c.runtime=new Date();c.playbackTimer=setTimeout(function(){c.nextSlide()},c.pauseTime);if(!e.silent){c.$el.trigger("resumeplayback",c)}};c.nextSlide=function(e){e=a.extend({},{silent:false},e);c.previous=c.current;c.current=(c.current==(c.count-1))?0:(c.current+1);c._transition(c.current,c.previous);if(!e.silent){c.$el.trigger("nextslide",c)}};c.prevSlide=function(e){e=a.extend({},{silent:false},e);c.previous=c.current;c.current=(c.current==0)?(c.count-1):(c.current-1);c._transition(c.current,c.previous);if(!e.silent){c.$el.trigger("prevslide",c)}};c.goToSlide=function(e,f){f=a.extend({},{silent:false},f);if(c.$slides.eq(e).length==0){return}c.previous=c.current;c.current=e;c._transition(c.current,c.previous,true);if(!f.silent){c.$el.trigger("gotoslide",c,e)}};c=a.extend({},c,a.EasingSliderLite.extensions);c.initialize()};a.EasingSliderLite.defaults={general:{enableCSS3:true,},navigation:{arrows:true,arrows_hover:true,arrows_position:"inside",pagination:true,pagination_hover:true,pagination_position:"inside",pagination_location:"bottom-left",},dimensions:{width:500,height:200,responsive:true,},transitions:{effect:"slide",duration:500,},playback:{enabled:false,pause:1000}};a.EasingSliderLite.extensions={};a.fn.EasingSliderLite=function(){return this.each(function(){new a.EasingSliderLite(this)})};a(document).ready(function(){a(".easingsliderlite").EasingSliderLite()})})(jQuery);
|
1 |
+
(function(a){a.EasingSliderLite=function(b){var c=this,d;c.el=b;c.$el=a(c.el);c.$viewport=c.$el.find(".easingsliderlite-viewport");c.$container=c.$viewport.find(".easingsliderlite-slides-container");c.$slides=c.$container.find(".easingsliderlite-slide");c.$images=c.$slides.find(".easingsliderlite-image");c.options=d=a.extend({},a.EasingSliderLite.defaults,JSON.parse(c.$el.attr("data-options")));c.current=0;c.previous=0;c.count=c.$slides.length;c.width=d.dimensions.width;c.height=d.dimensions.height;c.$el.data("easingsliderlite",c);c.initialize=function(){c.$container.css({display:""});c.useCSS3=(d.general.enableCSS3)?c._supportsCSS3():false;if(c.useCSS3){c.$el.addClass("use-css3")}if(d.dimensions.responsive){c._setupResponsive()}c.supportsTouch=("ontouchstart" in document.documentElement&&d.general.enableTouch)?true:false;c.clickEvent=(c.supportsTouch)?"touchstart.easingsliderlite":"click.easingsliderlite";if(d.navigation.arrows){c._setupArrows()}if(d.navigation.pagination){c._setupPagination()}c.$slides.eq(c.current).addClass("active");c.$el.bind("beforetransition",function(){c.$slides.removeClass("active").eq(c.current).addClass("active")});if(d.playback.enabled){c.$el.one("load",c.startPlayback)}c._preload();c.$el.trigger("initialize",c)};c._supportsCSS3=function(){var f=document.createElement("div"),g=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var e in g){if(typeof f.style[g[e]]!=="undefined"){c.vendorPrefix=g[e].replace("Perspective","").toLowerCase();return true}}return false};c._setupResponsive=function(){c.$el.addClass("is-responsive");a(window).bind("resize.easingsliderlite",function(h){clearTimeout(c.resizeEnd);c.resizeEnd=setTimeout(function(){a(window).trigger("resizeend");delete c.resizeEnd},50);var g=c.$viewport.outerWidth(),e=c.$viewport.outerHeight();if(g===c.width){return}c.width=g;c.height=e;if(c.useCSS3&&d.transitions.effect=="slide"){var f={};f["-"+c.vendorPrefix+"-transition-duration"]="0ms";f["-"+c.vendorPrefix+"-transform"]="translate3d(-"+(c.current*c.width)+"px, 0, 0)";c.$container.css(f);a(window).one("resizeend",function(){f["-"+c.vendorPrefix+"-transition-duration"]=d.transitions.duration+"ms";c.$container.css(f)})}c.$slides.css({width:g+"px",height:e+"px"})});a(window).trigger("resize.easingsliderlite")};c._setupArrows=function(){var e=a(".easingsliderlite-next"),f=a(".easingsliderlite-prev"),g=a().add(e).add(f);e.bind(c.clickEvent,function(h){c.nextSlide();return false});f.bind(c.clickEvent,function(h){c.prevSlide();return false});if(d.navigation.arrows_hover){g.addClass("has-hover")}else{c.$el.one("load",function(){g.css({opacity:1})})}c.$el.trigger("setuparrows",c)};c._setupPagination=function(){var e=a(".easingsliderlite-pagination"),f=e.children("div");f.bind(c.clickEvent,function(g){c.goToSlide(a(this).index());return false});f.eq(c.current).addClass("active");c.$el.bind("beforetransition",function(){f.removeClass("active").eq(c.current).addClass("active")});if(d.navigation.pagination_hover){e.addClass("has-hover")}else{c.$el.one("load",function(){e.css({opacity:1})})}c.$el.trigger("setuppagination",c)};c._preload=function(){var e=0;c.$images.each(function(){var g=a(this),f=g.attr("src");a("<img />").attr("src",f).load(function(){e++;if(c.count==e){c.$el.find(".easingsliderlite-preload").animate({opacity:0},{duration:200,complete:function(){a(this).remove();c.$el.trigger("load")}})}})});return"test"};c._transition=function(){c._beforeTransition();clearTimeout(c.afterTransition);c.afterTransition=setTimeout(function(){c._afterTransition();delete c.afterTransition},d.transitions.duration);if(d.transitions.effect=="slide"){if(c.useCSS3){var e={};e["-"+c.vendorPrefix+"-transition-duration"]=d.transitions.duration;e["-"+c.vendorPrefix+"-transform"]="translate3d(-"+(c.width*c.current)+"px, 0, 0)";c.$container.css(e)}else{c.$container.animate({left:"-"+(c.width*c.current)},d.transitions.duration)}}else{if(d.transitions.effect=="fade"){if(c.current===c.previous){return}c.order=(c.order)?c.order+1:1;c.$el.off("aftertransition._transition").one("aftertransition._transition",function(){c.$slides.each(function(f){var g=(f===c.current)?{"z-index":""}:{opacity:0,display:"none","z-index":""};a(this).css(g)});delete c.order;delete c.animationClear});c.$slides.eq(c.current).css({opacity:"0",display:"block","z-index":c.order}).animate({opacity:"1"},d.transitions.duration)}else{c.$el.trigger("transition",c,d.transitions.effect)}}};c._beforeTransition=function(){if(d.playback.enabled){clearTimeout(c.playbackTimer)}c.$el.trigger("beforetransition",c)};c._afterTransition=function(){if(d.playback.enabled){c.startPlayback({silent:true})}c.$el.trigger("aftertransition",c)};c.startPlayback=function(e){e=a.extend({},{silent:false},e);if(!d.playback.enabled){d.playback.enabled=true}c.runtime=new Date();c.pauseTime=d.playback.pause;c.playbackTimer=setTimeout(function(){c.nextSlide()},c.pauseTime);if(!e.silent){c.$el.trigger("startplayback",c)}};c.endPlayback=function(e){e=a.extend({},{silent:false},e);
|
2 |
if(d.playback.enabled){d.playback.enabled=false}clearTimeout(c.playbackTimer);if(!e.silent){c.$el.trigger("endplayback",c)}};c.pausePlayback=function(e){e=a.extend({},{silent:false},e);clearTimeout(c.playbackTimer);c.runtime=Math.ceil(new Date()-c.runtime);if(!e.silent){c.$el.trigger("pauseplayback",c)}};c.resumePlayback=function(e){e=a.extend({},{silent:false},e);c.pauseTime=Math.ceil(c.pauseTime-c.runtime);c.runtime=new Date();c.playbackTimer=setTimeout(function(){c.nextSlide()},c.pauseTime);if(!e.silent){c.$el.trigger("resumeplayback",c)}};c.nextSlide=function(e){e=a.extend({},{silent:false},e);c.previous=c.current;c.current=(c.current==(c.count-1))?0:(c.current+1);c._transition(c.current,c.previous);if(!e.silent){c.$el.trigger("nextslide",c)}};c.prevSlide=function(e){e=a.extend({},{silent:false},e);c.previous=c.current;c.current=(c.current==0)?(c.count-1):(c.current-1);c._transition(c.current,c.previous);if(!e.silent){c.$el.trigger("prevslide",c)}};c.goToSlide=function(e,f){f=a.extend({},{silent:false},f);if(c.$slides.eq(e).length==0){return}c.previous=c.current;c.current=e;c._transition(c.current,c.previous,true);if(!f.silent){c.$el.trigger("gotoslide",c,e)}};c=a.extend({},c,a.EasingSliderLite.extensions);c.initialize()};a.EasingSliderLite.defaults={general:{enableCSS3:true,},navigation:{arrows:true,arrows_hover:true,arrows_position:"inside",pagination:true,pagination_hover:true,pagination_position:"inside",pagination_location:"bottom-left",},dimensions:{width:500,height:200,responsive:true,},transitions:{effect:"slide",duration:500,},playback:{enabled:false,pause:1000}};a.EasingSliderLite.extensions={};a.fn.EasingSliderLite=function(){return this.each(function(){new a.EasingSliderLite(this)})};a(document).ready(function(){a(".easingsliderlite").EasingSliderLite()})})(jQuery);
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Contributors: MatthewRuddy
|
|
4 |
Tags: slideshow, slider, slides, slide, gallery, images, image, responsive, mobile, jquery, javascript, featured, content
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.5.1
|
7 |
-
Stable tag: 2.0.1.
|
8 |
|
9 |
Easing Slider "Lite" is an easy to use slideshow plugin. Simple and lightweight, built with native WordPress functionality.
|
10 |
|
@@ -34,19 +34,27 @@ Last but not least, we've left plenty of opportunity for custom plugin modificat
|
|
34 |
To display the slideshow, you can use any of the following methods.
|
35 |
|
36 |
**In a post/page:**
|
37 |
-
|
38 |
Simply insert the shortcode below into the post/page to display the slideshow:
|
39 |
|
40 |
`[easingsliderlite]`
|
41 |
|
42 |
**Function in template files (via php):**
|
43 |
-
|
44 |
To insert the slideshow into your theme, add the following code to the appropriate theme file:
|
45 |
|
46 |
`<?php if ( function_exists( "easingsliderlite" ) ) { easingsliderlite(); } ?>`
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
== Changelog ==
|
49 |
|
|
|
|
|
|
|
50 |
= 2.0.1.1 =
|
51 |
* Fixed script cross origin bug.
|
52 |
|
4 |
Tags: slideshow, slider, slides, slide, gallery, images, image, responsive, mobile, jquery, javascript, featured, content
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.5.1
|
7 |
+
Stable tag: 2.0.1.2
|
8 |
|
9 |
Easing Slider "Lite" is an easy to use slideshow plugin. Simple and lightweight, built with native WordPress functionality.
|
10 |
|
34 |
To display the slideshow, you can use any of the following methods.
|
35 |
|
36 |
**In a post/page:**
|
|
|
37 |
Simply insert the shortcode below into the post/page to display the slideshow:
|
38 |
|
39 |
`[easingsliderlite]`
|
40 |
|
41 |
**Function in template files (via php):**
|
|
|
42 |
To insert the slideshow into your theme, add the following code to the appropriate theme file:
|
43 |
|
44 |
`<?php if ( function_exists( "easingsliderlite" ) ) { easingsliderlite(); } ?>`
|
45 |
|
46 |
+
== Screenshots ==
|
47 |
+
|
48 |
+
1. The integrated Media Uploader. Use it to add images to your slideshows one at a time, or in bulk.
|
49 |
+
2. "Edit Slideshow" panel. Set your various slideshow settings here.
|
50 |
+
3. "Settings" panel. Options for script & style loading, and image resizing features.
|
51 |
+
4. The slideshow, in all its glory! Nice and clean, but easy to re-style if needed.
|
52 |
+
|
53 |
== Changelog ==
|
54 |
|
55 |
+
= 2.0.1.2 =
|
56 |
+
* Fixed backwards compatibility issues with older versions of jQuery
|
57 |
+
|
58 |
= 2.0.1.1 =
|
59 |
* Fixed script cross origin bug.
|
60 |
|
templates/editslideshow-slide.php
CHANGED
@@ -32,13 +32,13 @@
|
|
32 |
<label for="title" class="setting">
|
33 |
<span><?php _e( 'Title', 'easingsliderlite' ); ?></span>
|
34 |
<input type="text" id="title" value="<%= title %>">
|
35 |
-
<p class="description"><?php _e( 'Enter a value for the image "title" attribute.'
|
36 |
</label>
|
37 |
|
38 |
<label for="alt" class="setting">
|
39 |
<span><?php _e( 'Alt Text', 'easingsliderlite' ); ?></span>
|
40 |
<input type="text" id="alt" value="<%= alt %>">
|
41 |
-
<p class="description"><?php _e( 'Enter a value for the image "alt" text attribute.'
|
42 |
</label>
|
43 |
</div>
|
44 |
</div>
|
32 |
<label for="title" class="setting">
|
33 |
<span><?php _e( 'Title', 'easingsliderlite' ); ?></span>
|
34 |
<input type="text" id="title" value="<%= title %>">
|
35 |
+
<p class="description"><?php _e( 'Enter a value for the image "title" attribute.', 'easingsliderlite' ); ?></p>
|
36 |
</label>
|
37 |
|
38 |
<label for="alt" class="setting">
|
39 |
<span><?php _e( 'Alt Text', 'easingsliderlite' ); ?></span>
|
40 |
<input type="text" id="alt" value="<%= alt %>">
|
41 |
+
<p class="description"><?php _e( 'Enter a value for the image "alt" text attribute.', 'easingsliderlite' ); ?></p>
|
42 |
</label>
|
43 |
</div>
|
44 |
</div>
|