Easing Slider - Version 2.2.0.7

Version Description

  • General improvements to cater for alternative slide types, such as videos or URL images.
  • Fixed a bug (related to above improvement) that would prevent slider from loading when slide didn't contain an image.
  • Fixed bug causing isolated jQuery errors when attempting to setup navigation elements that were disabled.
  • Transparent PNGs now play nicely.
  • Fixed some $_GET input validation security issues.
  • Improvded support for touch devices.
  • Added post type variable to slider object, allowing future extensions more flexibility.
  • Added support for HiDPI devices.
  • Fixed conflict with MooTools.
Download this release

Release Info

Developer MatthewRuddy
Plugin Icon 128x128 Easing Slider
Version 2.2.0.7
Comparing to
See all releases

Code changes from version 2.2.0.6 to 2.2.0.7

backbone/edit-slide.php CHANGED
@@ -13,6 +13,10 @@
13
  <# } #>
14
  <# } else { #>
15
  <img class="details-image" src="{{ data.model.url }}" draggable="false" />
 
 
 
 
16
  <# } #>
17
  <# } #>
18
 
13
  <# } #>
14
  <# } else { #>
15
  <img class="details-image" src="{{ data.model.url }}" draggable="false" />
16
+
17
+ <div class="action">
18
+ <input type="text" class="details-url" data-setting="url" value="{{ data.model.url }}" />
19
+ </div>
20
  <# } #>
21
  <# } #>
22
 
css/easingslider.css CHANGED
@@ -1,9 +1,5 @@
1
- /**
2
- * 1.0 Slider
3
- *
4
- * All of our slider styling, including resets.
5
- * Very strict to ensure it doesn't get broken by themes, other plugins, etc.
6
- */
7
  .easingslider,
8
  .easingslider-viewport,
9
  .easingslider-slide,
@@ -38,7 +34,10 @@
38
  }
39
 
40
  .easingslider-preload {
41
- background: url(../images/loading.gif) no-repeat center center #fff !important;
 
 
 
42
  width: 100% !important;
43
  height: 100% !important;
44
  position: absolute !important;
@@ -48,21 +47,13 @@
48
  }
49
 
50
  .easingslider-slide {
51
- display: none;
52
  overflow: hidden;
53
  position: absolute;
54
  top: 0;
55
  left: 0;
56
  bottom: 0;
57
  right: 0;
58
- }
59
-
60
- .easingslider-slide.active,
61
- .easingslider-slide.next-in,
62
- .easingslider-slide.next-out,
63
- .easingslider-slide.prev-in,
64
- .easingslider-slide.prev-out {
65
- display: block;
66
  }
67
 
68
  .easingslider-slide.active {
@@ -94,16 +85,14 @@
94
  opacity: 1;
95
  }
96
 
97
- /**
98
- * 2.0 "Arrow" navigation
99
- *
100
- * CSS for our directional arrow navigation
101
- */
102
  .easingslider-arrows {
103
  position: absolute;
104
- top: 46%;
105
  width: 30px;
106
  height: 30px;
 
107
  background-repeat: no-repeat;
108
  z-index: 40;
109
  cursor: pointer;
@@ -143,11 +132,8 @@
143
  padding-right: 20px;
144
  }
145
 
146
- /**
147
- * 2.1 "Pagination" navigation
148
- *
149
- * CSS for our icon pagination navigation
150
- */
151
  .easingslider-pagination {
152
  position: absolute;
153
  z-index: 40;
@@ -256,11 +242,8 @@
256
  background-image: url(../images/nav-icon-active.png);
257
  }
258
 
259
- /**
260
- * 3.0 "Fade" effect
261
- *
262
- * CSS related to the "Fade" transition effect.
263
- */
264
  .easingslider.use-fade .easingslider-slide.next-in,
265
  .easingslider.use-fade .easingslider-slide.prev-in {
266
  -webkit-animation: fadeIn 0.3s ease;
@@ -361,11 +344,8 @@
361
  }
362
  }
363
 
364
- /**
365
- * 3.1 "Slide" effect
366
- *
367
- * CSS related to the "Slide" transition effect.
368
- */
369
  .easingslider.use-slide .easingslider-viewport {
370
  overflow: hidden;
371
  }
@@ -596,4 +576,41 @@
596
  100% {
597
  transform: none;
598
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
599
  }
1
+ /* Slider
2
+ -------------------------------------------------------------- */
 
 
 
 
3
  .easingslider,
4
  .easingslider-viewport,
5
  .easingslider-slide,
34
  }
35
 
36
  .easingslider-preload {
37
+ background-image: url(../images/loading.gif);
38
+ background-repeat: no-repeat;
39
+ background-position: center center;
40
+ background-color: #fff;
41
  width: 100% !important;
42
  height: 100% !important;
43
  position: absolute !important;
47
  }
48
 
49
  .easingslider-slide {
 
50
  overflow: hidden;
51
  position: absolute;
52
  top: 0;
53
  left: 0;
54
  bottom: 0;
55
  right: 0;
56
+ background-color: #fff;
 
 
 
 
 
 
 
57
  }
58
 
59
  .easingslider-slide.active {
85
  opacity: 1;
86
  }
87
 
88
+ /* Arrows
89
+ -------------------------------------------------------------- */
 
 
 
90
  .easingslider-arrows {
91
  position: absolute;
92
+ top: 50%;
93
  width: 30px;
94
  height: 30px;
95
+ margin-top: -15px;
96
  background-repeat: no-repeat;
97
  z-index: 40;
98
  cursor: pointer;
132
  padding-right: 20px;
133
  }
134
 
135
+ /* Pagination
136
+ -------------------------------------------------------------- */
 
 
 
137
  .easingslider-pagination {
138
  position: absolute;
139
  z-index: 40;
242
  background-image: url(../images/nav-icon-active.png);
243
  }
244
 
245
+ /* "Fade" transition
246
+ -------------------------------------------------------------- */
 
 
 
247
  .easingslider.use-fade .easingslider-slide.next-in,
248
  .easingslider.use-fade .easingslider-slide.prev-in {
249
  -webkit-animation: fadeIn 0.3s ease;
344
  }
345
  }
346
 
347
+ /* "Slide" transition
348
+ -------------------------------------------------------------- */
 
 
 
349
  .easingslider.use-slide .easingslider-viewport {
350
  overflow: hidden;
351
  }
576
  100% {
577
  transform: none;
578
  }
579
+ }
580
+
581
+ /* Retina
582
+ -------------------------------------------------------------- */
583
+ @media
584
+ only screen and (-webkit-min-device-pixel-ratio: 2),
585
+ only screen and ( min--moz-device-pixel-ratio: 2),
586
+ only screen and ( -o-min-device-pixel-ratio: 2/1),
587
+ only screen and ( min-device-pixel-ratio: 2),
588
+ only screen and ( min-resolution: 192dpi),
589
+ only screen and ( min-resolution: 2dppx) {
590
+
591
+ .easingslider-preload {
592
+ background-image: url(../images/loading@2x.gif);
593
+ background-size: 24px 24px;
594
+ }
595
+
596
+ .easingslider-arrows.easingslider-next {
597
+ background-image: url(../images/nav-arrow-next@2x.png);
598
+ background-size: 30px 30px;
599
+ }
600
+
601
+ .easingslider-arrows.easingslider-prev {
602
+ background-image: url(../images/nav-arrow-prev@2x.png);
603
+ background-size: 30px 30px;
604
+ }
605
+
606
+ .easingslider .easingslider-icon {
607
+ background-image: url(../images/nav-icon-inactive@2x.png);
608
+ background-size: 14px 14px;
609
+ }
610
+
611
+ .easingslider .easingslider-icon.active {
612
+ background-image: url(../images/nav-icon-active@2x.png);
613
+ background-size: 14px 14px;
614
+ }
615
+
616
  }
css/easingslider.min.css CHANGED
@@ -1 +1 @@
1
- .easingslider,.easingslider-image,.easingslider-link,.easingslider-slide,.easingslider-viewport{line-height:0!important;outline:0!important;padding:0!important;margin:0!important}.easingslider-image,.easingslider-link,.easingslider-slide,.easingslider-viewport{clear:none!important;border:0!important}.easingslider{position:relative!important;z-index:0}.easingslider.has-loaded .easingslider-arrows,.easingslider.has-loaded .easingslider-pagination{opacity:1}.easingslider-viewport{position:relative!important}.easingslider-preload{background:url(../images/loading.gif) center center no-repeat #fff!important;width:100%!important;height:100%!important;position:absolute!important;top:0!important;left:0!important;z-index:50!important}.easingslider-slide{display:none;overflow:hidden;position:absolute;top:0;left:0;bottom:0;right:0}.easingslider-slide.active,.easingslider-slide.next-in,.easingslider-slide.next-out,.easingslider-slide.prev-in,.easingslider-slide.prev-out{display:block}.easingslider-slide.active{z-index:10!important}.easingslider-slide.next-out,.easingslider-slide.prev-out{z-index:20!important}.easingslider-slide.next-in,.easingslider-slide.prev-in{z-index:30!important}.easingslider-image{height:auto;width:100%}.easingslider .easingslider-arrows.has-hover,.easingslider .easingslider-pagination.has-hover{opacity:0}.easingslider:hover .easingslider-arrows.has-hover,.easingslider:hover .easingslider-pagination.has-hover{opacity:1}.easingslider-arrows{position:absolute;top:46%;width:30px;height:30px;background-repeat:no-repeat;z-index:40;cursor:pointer;opacity:0;-webkit-transition:opacity .25s ease;-moz-transition:opacity .25s ease;-ms-transition:opacity .25s ease;-o-transition:opacity .25s ease;transition:opacity .25s ease}.easingslider-arrows.easingslider-next{background-image:url(../images/nav-arrow-next.png);background-position:top right}.easingslider-arrows.easingslider-prev{background-image:url(../images/nav-arrow-prev.png);background-position:top left}.easingslider-arrows.easingslider-next.inside{right:10px}.easingslider-arrows.easingslider-next.outside{right:-40px;padding-left:20px}.easingslider-arrows.easingslider-prev.inside{left:10px}.easingslider-arrows.easingslider-prev.outside{left:-40px;padding-right:20px}.easingslider-pagination{position:absolute;z-index:40;opacity:0;-webkit-transition:opacity .25s ease;-moz-transition:opacity .25s ease;-ms-transition:opacity .25s ease;-o-transition:opacity .25s ease;transition:opacity .25s ease}.easingslider-pagination.inside.bottom-left{bottom:10px;left:10px}.easingslider-pagination.inside.bottom-right{bottom:10px;right:10px}.easingslider-pagination.inside.bottom-center{bottom:10px;left:0;width:100%;text-align:center}.easingslider-pagination.inside.top-left{top:10px;left:10px}.easingslider-pagination.inside.top-right{top:10px;right:10px}.easingslider-pagination.inside.top-center{top:10px;left:0;width:100%;text-align:center}.easingslider-pagination.outside.bottom-left{bottom:-25px;left:0;padding-top:20px}.easingslider-pagination.outside.bottom-right{bottom:-25px;right:0;padding-top:20px}.easingslider-pagination.outside.bottom-center{bottom:-25px;left:0;width:100%;text-align:center;padding-top:20px}.easingslider-pagination.outside.top-left{top:-25px;left:0;padding-bottom:20px}.easingslider-pagination.outside.top-right{top:-25px;right:0;padding-bottom:20px}.easingslider-pagination.outside.top-center{top:-25px;left:0;width:100%;text-align:center;padding-bottom:20px}.easingslider-pagination .easingslider-icon{width:15px;height:15px;margin:0;padding:0;background-image:url(../images/nav-icon-inactive.png);background-repeat:no-repeat;background-position:0 0;display:inline-block;zoom:1;z-index:40;cursor:pointer}.easingslider-pagination .easingslider-icon:last-child{margin-right:0}.easingslider-pagination .easingslider-icon.active{background-image:url(../images/nav-icon-active.png)}.easingslider.use-fade .easingslider-slide.next-in,.easingslider.use-fade .easingslider-slide.prev-in{-webkit-animation:fadeIn .3s ease;-moz-animation:fadeIn .3s ease;-ms-animation:fadeIn .3s ease;-o-animation:fadeIn .3s ease;animation:fadeIn .3s ease}._easingslider.use-fade .easingslider-slide.next-out,._easingslider.use-fade .easingslider-slide.prev-out{-webkit-animation:fadeOut .3s ease;-moz-animation:fadeOut .3s ease;-ms-animation:fadeOut .3s ease;-o-animation:fadeOut .3s ease;animation:fadeOut .3s ease}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-ms-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-moz-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-ms-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-o-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.easingslider.use-slide .easingslider-viewport{overflow:hidden}.easingslider.use-slide .easingslider-slide.next-in{-webkit-animation:slideNextIn .3s ease;-moz-animation:slideNextIn .3s ease;-ms-animation:slideNextIn .3s ease;-o-animation:slideNextIn .3s ease;animation:slideNextIn .3s ease}.easingslider.use-slide .easingslider-slide.next-out{-webkit-animation:slideNextOut .3s ease;-moz-animation:slideNextOut .3s ease;-ms-animation:slideNextOut .3s ease;-o-animation:slideNextOut .3s ease;animation:slideNextOut .3s ease}.easingslider.use-slide .easingslider-slide.prev-out{-webkit-animation:slidePrevOut .3s ease;-moz-animation:slidePrevOut .3s ease;-ms-animation:slidePrevOut .3s ease;-o-animation:slidePrevOut .3s ease;animation:slidePrevOut .3s ease}.easingslider.use-slide .easingslider-slide.prev-in{-webkit-animation:slidePrevIn .3s ease;-moz-animation:slidePrevIn .3s ease;-ms-animation:slidePrevIn .3s ease;-o-animation:slidePrevIn .3s ease;animation:slidePrevIn .3s ease}@-webkit-keyframes slideNextIn{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}100%{-webkit-transform:none;transform:none}}@-moz-keyframes slideNextIn{0%{-moz-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}100%{-moz-transform:none;transform:none}}@-ms-keyframes slideNextIn{0%{-ms-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}100%{-ms-transform:none;transform:none}}@-o-keyframes slideNextIn{0%{-o-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}100%{-o-transform:none;transform:none}}@keyframes slideNextIn{0%{transform:translate3d(100%,0,0)}100%{transform:none}}@-webkit-keyframes slideNextOut{0%{-webkit-transform:none;transform:none}100%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-moz-keyframes slideNextOut{0%{-moz-transform:none;transform:none}100%{-moz-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-ms-keyframes slideNextOut{0%{-ms-transform:none;transform:none}100%{-ms-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-o-keyframes slideNextOut{0%{-o-transform:none;transform:none}100%{-o-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideNextOut{0%{transform:none}100%{transform:translate3d(100%,0,0)}}@-webkit-keyframes slidePrevOut{0%{-webkit-transform:none;transform:none}100%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-moz-keyframes slidePrevOut{0%{-moz-transform:none;transform:none}100%{-moz-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-ms-keyframes slidePrevOut{0%{-ms-transform:none;transform:none}100%{-ms-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-o-keyframes slidePrevOut{0%{-o-transform:none;transform:none}100%{-o-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slidePrevOut{0%{transform:none}100%{transform:translate3d(-100%,0,0)}}@-webkit-keyframes slidePrevIn{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}100%{-webkit-transform:none;transform:none}}@-moz-keyframes slidePrevIn{0%{-moz-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}100%{-moz-transform:none;transform:none}}@-ms-keyframes slidePrevIn{0%{-ms-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}100%{-ms-transform:none;transform:none}}@-o-keyframes slidePrevIn{0%{-o-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}100%{-o-transform:none;transform:none}}@keyframes slidePrevIn{0%{transform:translate3d(-100%,0,0)}100%{transform:none}}
1
+ .easingslider,.easingslider-image,.easingslider-link,.easingslider-slide,.easingslider-viewport{line-height:0!important;outline:0!important;padding:0!important;margin:0!important}.easingslider-image,.easingslider-link,.easingslider-slide,.easingslider-viewport{clear:none!important;border:0!important}.easingslider{position:relative!important;z-index:0}.easingslider.has-loaded .easingslider-arrows,.easingslider.has-loaded .easingslider-pagination{opacity:1}.easingslider-viewport{position:relative!important}.easingslider-preload{background-image:url(../images/loading.gif);background-repeat:no-repeat;background-position:center center;background-color:#fff;width:100%!important;height:100%!important;position:absolute!important;top:0!important;left:0!important;z-index:50!important}.easingslider-slide{overflow:hidden;position:absolute;top:0;left:0;bottom:0;right:0;background-color:#fff}.easingslider-slide.active{z-index:10!important}.easingslider-slide.next-out,.easingslider-slide.prev-out{z-index:20!important}.easingslider-slide.next-in,.easingslider-slide.prev-in{z-index:30!important}.easingslider-image{height:auto;width:100%}.easingslider .easingslider-arrows.has-hover,.easingslider .easingslider-pagination.has-hover{opacity:0}.easingslider:hover .easingslider-arrows.has-hover,.easingslider:hover .easingslider-pagination.has-hover{opacity:1}.easingslider-arrows{position:absolute;top:50%;width:30px;height:30px;margin-top:-15px;background-repeat:no-repeat;z-index:40;cursor:pointer;opacity:0;-webkit-transition:opacity .25s ease;-moz-transition:opacity .25s ease;-ms-transition:opacity .25s ease;-o-transition:opacity .25s ease;transition:opacity .25s ease}.easingslider-arrows.easingslider-next{background-image:url(../images/nav-arrow-next.png);background-position:top right}.easingslider-arrows.easingslider-prev{background-image:url(../images/nav-arrow-prev.png);background-position:top left}.easingslider-arrows.easingslider-next.inside{right:10px}.easingslider-arrows.easingslider-next.outside{right:-40px;padding-left:20px}.easingslider-arrows.easingslider-prev.inside{left:10px}.easingslider-arrows.easingslider-prev.outside{left:-40px;padding-right:20px}.easingslider-pagination{position:absolute;z-index:40;opacity:0;-webkit-transition:opacity .25s ease;-moz-transition:opacity .25s ease;-ms-transition:opacity .25s ease;-o-transition:opacity .25s ease;transition:opacity .25s ease}.easingslider-pagination.inside.bottom-left{bottom:10px;left:10px}.easingslider-pagination.inside.bottom-right{bottom:10px;right:10px}.easingslider-pagination.inside.bottom-center{bottom:10px;left:0;width:100%;text-align:center}.easingslider-pagination.inside.top-left{top:10px;left:10px}.easingslider-pagination.inside.top-right{top:10px;right:10px}.easingslider-pagination.inside.top-center{top:10px;left:0;width:100%;text-align:center}.easingslider-pagination.outside.bottom-left{bottom:-25px;left:0;padding-top:20px}.easingslider-pagination.outside.bottom-right{bottom:-25px;right:0;padding-top:20px}.easingslider-pagination.outside.bottom-center{bottom:-25px;left:0;width:100%;text-align:center;padding-top:20px}.easingslider-pagination.outside.top-left{top:-25px;left:0;padding-bottom:20px}.easingslider-pagination.outside.top-right{top:-25px;right:0;padding-bottom:20px}.easingslider-pagination.outside.top-center{top:-25px;left:0;width:100%;text-align:center;padding-bottom:20px}.easingslider-pagination .easingslider-icon{width:15px;height:15px;margin:0;padding:0;background-image:url(../images/nav-icon-inactive.png);background-repeat:no-repeat;background-position:0 0;display:inline-block;zoom:1;z-index:40;cursor:pointer}.easingslider-pagination .easingslider-icon:last-child{margin-right:0}.easingslider-pagination .easingslider-icon.active{background-image:url(../images/nav-icon-active.png)}.easingslider.use-fade .easingslider-slide.next-in,.easingslider.use-fade .easingslider-slide.prev-in{-webkit-animation:fadeIn .3s ease;-moz-animation:fadeIn .3s ease;-ms-animation:fadeIn .3s ease;-o-animation:fadeIn .3s ease;animation:fadeIn .3s ease}._easingslider.use-fade .easingslider-slide.next-out,._easingslider.use-fade .easingslider-slide.prev-out{-webkit-animation:fadeOut .3s ease;-moz-animation:fadeOut .3s ease;-ms-animation:fadeOut .3s ease;-o-animation:fadeOut .3s ease;animation:fadeOut .3s ease}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-ms-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-moz-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-ms-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-o-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.easingslider.use-slide .easingslider-viewport{overflow:hidden}.easingslider.use-slide .easingslider-slide.next-in{-webkit-animation:slideNextIn .3s ease;-moz-animation:slideNextIn .3s ease;-ms-animation:slideNextIn .3s ease;-o-animation:slideNextIn .3s ease;animation:slideNextIn .3s ease}.easingslider.use-slide .easingslider-slide.next-out{-webkit-animation:slideNextOut .3s ease;-moz-animation:slideNextOut .3s ease;-ms-animation:slideNextOut .3s ease;-o-animation:slideNextOut .3s ease;animation:slideNextOut .3s ease}.easingslider.use-slide .easingslider-slide.prev-out{-webkit-animation:slidePrevOut .3s ease;-moz-animation:slidePrevOut .3s ease;-ms-animation:slidePrevOut .3s ease;-o-animation:slidePrevOut .3s ease;animation:slidePrevOut .3s ease}.easingslider.use-slide .easingslider-slide.prev-in{-webkit-animation:slidePrevIn .3s ease;-moz-animation:slidePrevIn .3s ease;-ms-animation:slidePrevIn .3s ease;-o-animation:slidePrevIn .3s ease;animation:slidePrevIn .3s ease}@-webkit-keyframes slideNextIn{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}100%{-webkit-transform:none;transform:none}}@-moz-keyframes slideNextIn{0%{-moz-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}100%{-moz-transform:none;transform:none}}@-ms-keyframes slideNextIn{0%{-ms-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}100%{-ms-transform:none;transform:none}}@-o-keyframes slideNextIn{0%{-o-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}100%{-o-transform:none;transform:none}}@keyframes slideNextIn{0%{transform:translate3d(100%,0,0)}100%{transform:none}}@-webkit-keyframes slideNextOut{0%{-webkit-transform:none;transform:none}100%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-moz-keyframes slideNextOut{0%{-moz-transform:none;transform:none}100%{-moz-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-ms-keyframes slideNextOut{0%{-ms-transform:none;transform:none}100%{-ms-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-o-keyframes slideNextOut{0%{-o-transform:none;transform:none}100%{-o-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideNextOut{0%{transform:none}100%{transform:translate3d(100%,0,0)}}@-webkit-keyframes slidePrevOut{0%{-webkit-transform:none;transform:none}100%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-moz-keyframes slidePrevOut{0%{-moz-transform:none;transform:none}100%{-moz-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-ms-keyframes slidePrevOut{0%{-ms-transform:none;transform:none}100%{-ms-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-o-keyframes slidePrevOut{0%{-o-transform:none;transform:none}100%{-o-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slidePrevOut{0%{transform:none}100%{transform:translate3d(-100%,0,0)}}@-webkit-keyframes slidePrevIn{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}100%{-webkit-transform:none;transform:none}}@-moz-keyframes slidePrevIn{0%{-moz-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}100%{-moz-transform:none;transform:none}}@-ms-keyframes slidePrevIn{0%{-ms-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}100%{-ms-transform:none;transform:none}}@-o-keyframes slidePrevIn{0%{-o-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}100%{-o-transform:none;transform:none}}@keyframes slidePrevIn{0%{transform:translate3d(-100%,0,0)}100%{transform:none}}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (-o-min-device-pixel-ratio:2/1),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.easingslider-preload{background-image:url(../images/loading@2x.gif);background-size:24px 24px}.easingslider-arrows.easingslider-next{background-image:url(../images/nav-arrow-next@2x.png);background-size:30px 30px}.easingslider-arrows.easingslider-prev{background-image:url(../images/nav-arrow-prev@2x.png);background-size:30px 30px}.easingslider .easingslider-icon{background-image:url(../images/nav-icon-inactive@2x.png);background-size:14px 14px}.easingslider .easingslider-icon.active{background-image:url(../images/nav-icon-active@2x.png);background-size:14px 14px}}
css/editor-pages.css CHANGED
@@ -35,6 +35,7 @@
35
 
36
  .image-details .details-url {
37
  width: 100%;
 
38
  }
39
 
40
  .image-details .settings {
@@ -296,21 +297,12 @@
296
  background-position: -60px 0;
297
  }
298
 
299
- #slides-browser .thumbnail .delete-button {
300
- position: absolute;
301
- top: -15px;
302
- right: 5px;
303
- width: 36px;
304
- height: 36px;
305
- z-index: 10;
306
- background: url(../images/delete_icon.png) no-repeat top left;
307
- cursor: pointer;
308
- opacity: 0;
309
- -webkit-transition: opacity 0.125s ease;
310
- -moz-transition: opacity 0.125s ease;
311
- -ms-transition: opacity 0.125s ease;
312
- -o-transition: opacity 0.125s ease;
313
- transition: opacity 0.125s ease;
314
  }
315
 
316
  #slides-browser .thumbnail:hover .delete-button {
35
 
36
  .image-details .details-url {
37
  width: 100%;
38
+ max-width: 700px;
39
  }
40
 
41
  .image-details .settings {
297
  background-position: -60px 0;
298
  }
299
 
300
+ #slides-browser .thumbnail img {
301
+ width: 100%;
302
+ }
303
+
304
+ #slides-browser .thumbnail img.icon {
305
+ width: auto;
 
 
 
 
 
 
 
 
 
306
  }
307
 
308
  #slides-browser .thumbnail:hover .delete-button {
css/editor-pages.min.css CHANGED
@@ -1 +1 @@
1
- .clearfix::after,.clearfix::before{display:table;content:'';line-height:0}.clearfix::after{clear:both}.updated.notice{border-color:#ffba00!important}.wp-list-table .column-ID{width:4em}.media-toolbar .media-toolbar-primary{max-width:40%}.media-toolbar .media-toolbar-secondary{max-width:60%}.image-details .media-modal{left:30px!important;right:30px!important}.image-details .details-url{width:100%}.image-details .settings{border-bottom-width:0!important}.image-details .settings h3{margin:10px 0}.image-details .column-settings h3.no-border{border-top-width:0;padding-top:0}.description{font-size:11px!important;font-style:italic!important;display:block!important;color:#777!important;padding:5px 0!important}.media-modal .description{margin-top:10px!important}.list{margin:0 0 20px 20px!important}.list li{font-size:11px!important;color:#777!important}.toolbar-container .media-toolbar{-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);-moz-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);border:1px solid #e5e5e5;margin-top:10px;margin-bottom:15px;position:relative;height:auto}.toolbar-container .media-toolbar .media-button{margin-top:10px;margin-bottom:10px}.toolbar-container .media-toolbar .randomize{float:left;margin-top:9px;margin-bottom:9px;line-height:32px}.toolbar-container .media-toolbar .randomize input[type=checkbox]{margin-right:8px}.toolbar-container .title-form{float:left;margin-top:9px}.toolbar-container .title-form .media-button{margin-top:1px;margin-left:9px}.toolbar-container .title-form label{vertical-align:top;font-weight:700;line-height:32px;margin:0 5px 0 0}.toolbar-container .title-form input[type=text]{margin:0;padding:3px 5px;width:280px;font-size:16px;font-weight:300;line-height:1.5}.settings-container{float:right;clear:right;width:285px;padding-right:5px}.settings-container .banners a{display:block;margin-bottom:15px}.settings-container .widgets-holder-wrap{margin-top:0;margin-bottom:10px}.settings-container .sidebar-name{border-bottom:1px solid #eee}.settings-container .sidebar-name h3{padding:15px}.settings-container .sidebar-name-arrow:before{top:4px!important}.settings-container.closed .sidebar-name{border-width:0}.settings-container .sidebar-content{border-width:0 1px 1px;border-style:none solid solid;border-color:#fff;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;padding:10px 15px;min-height:20px}.settings-container .sidebar-content .divider{margin-bottom:0}.settings-container .sidebar-content .field,.settings-container .sidebar-content .radio{width:100%;margin:1em 0}.settings-container .sidebar-content .field span{font-weight:700;display:block}.settings-container .sidebar-content .field{float:left}.settings-container .sidebar-content .field input[type=number],.settings-container .sidebar-content .field input[type=text],.settings-container .sidebar-content .field select{width:90%}.settings-container .sidebar-content .field input[type=checkbox]{margin-right:4px}.settings-container .sidebar-content .radio>span{font-weight:700;float:left}.settings-container .sidebar-content .radio .buttons{float:right}.settings-container .sidebar-content .radio .buttons label{margin-right:10px}.settings-container .sidebar-content .radio .buttons input{margin-top:0;margin-right:2px}.settings-container .sidebar-content .manage-slides-buttons .dashicons-plus{line-height:28px}.settings-container .sidebar-content .manage-slides-buttons .dashicons-trash{line-height:27px}.settings-container .sidebar-content .misc-pub-section{padding-left:0;padding-right:0}.settings-container .dimension-settings .field.half{width:45%}.settings-container .dimension-settings .field.half:first-child{margin-right:5%}.slides-container{margin:0 350px 0 0}#slides-browser .spinner{float:left;display:inline}#slides-browser .attachment .toolbar{display:none;text-align:left;position:absolute;top:0;left:0}#slides-browser .attachment:hover .toolbar{display:block}#slides-browser .attachment .toolbar i{-webkit-box-shadow:0 1px 3px rgba(0,0,0,.5);-moz-box-shadow:0 1px 3px rgba(0,0,0,.5);box-shadow:0 1px 3px rgba(0,0,0,.5);position:relative;margin-top:7px;margin-left:7px;padding:2px;font-size:30px;height:30px;width:30px;background:#000;background:rgba(0,0,0,.9);cursor:pointer;z-index:9999;color:#fff}#slides-browser .attachment .toolbar i:hover{-webkit-box-shadow:0 1px 3px rgba(0,0,0,.8);-moz-box-shadow:0 1px 3px rgba(0,0,0,.8);box-shadow:0 1px 3px rgba(0,0,0,.8);background-color:#000;color:#2ea2cc}#slides-browser .attachment .check div{background-position:21px 0}#slides-browser .attachment.selected .check div{background-position:-21px 0}#slides-browser .attachment.selected .check:hover div{background-position:-60px 0}#slides-browser .thumbnail .delete-button{position:absolute;top:-15px;right:5px;width:36px;height:36px;z-index:10;background:url(../images/delete_icon.png) top left no-repeat;cursor:pointer;opacity:0;-webkit-transition:opacity .125s ease;-moz-transition:opacity .125s ease;-ms-transition:opacity .125s ease;-o-transition:opacity .125s ease;transition:opacity .125s ease}#slides-browser .thumbnail:hover .delete-button{opacity:1}@media only screen and (max-width:640px),screen and (max-height:400px){.image-details .media-modal{left:0!important;right:0!important}}
1
+ .clearfix::after,.clearfix::before{display:table;content:'';line-height:0}.clearfix::after{clear:both}.updated.notice{border-color:#ffba00!important}.wp-list-table .column-ID{width:4em}.media-toolbar .media-toolbar-primary{max-width:40%}.media-toolbar .media-toolbar-secondary{max-width:60%}.image-details .media-modal{left:30px!important;right:30px!important}.image-details .details-url{width:100%;max-width:700px}.image-details .settings{border-bottom-width:0!important}.image-details .settings h3{margin:10px 0}.image-details .column-settings h3.no-border{border-top-width:0;padding-top:0}.description{font-size:11px!important;font-style:italic!important;display:block!important;color:#777!important;padding:5px 0!important}.media-modal .description{margin-top:10px!important}.list{margin:0 0 20px 20px!important}.list li{font-size:11px!important;color:#777!important}.toolbar-container .media-toolbar{-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);-moz-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);border:1px solid #e5e5e5;margin-top:10px;margin-bottom:15px;position:relative;height:auto}.toolbar-container .media-toolbar .media-button{margin-top:10px;margin-bottom:10px}.toolbar-container .media-toolbar .randomize{float:left;margin-top:9px;margin-bottom:9px;line-height:32px}.toolbar-container .media-toolbar .randomize input[type=checkbox]{margin-right:8px}.toolbar-container .title-form{float:left;margin-top:9px}.toolbar-container .title-form .media-button{margin-top:1px;margin-left:9px}.toolbar-container .title-form label{vertical-align:top;font-weight:700;line-height:32px;margin:0 5px 0 0}.toolbar-container .title-form input[type=text]{margin:0;padding:3px 5px;width:280px;font-size:16px;font-weight:300;line-height:1.5}.settings-container{float:right;clear:right;width:285px;padding-right:5px}.settings-container .banners a{display:block;margin-bottom:15px}.settings-container .widgets-holder-wrap{margin-top:0;margin-bottom:10px}.settings-container .sidebar-name{border-bottom:1px solid #eee}.settings-container .sidebar-name h3{padding:15px}.settings-container .sidebar-name-arrow:before{top:4px!important}.settings-container.closed .sidebar-name{border-width:0}.settings-container .sidebar-content{border-width:0 1px 1px;border-style:none solid solid;border-color:#fff;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;padding:10px 15px;min-height:20px}.settings-container .sidebar-content .divider{margin-bottom:0}.settings-container .sidebar-content .field,.settings-container .sidebar-content .radio{width:100%;margin:1em 0}.settings-container .sidebar-content .field span{font-weight:700;display:block}.settings-container .sidebar-content .field{float:left}.settings-container .sidebar-content .field input[type=number],.settings-container .sidebar-content .field input[type=text],.settings-container .sidebar-content .field select{width:90%}.settings-container .sidebar-content .field input[type=checkbox]{margin-right:4px}.settings-container .sidebar-content .radio>span{font-weight:700;float:left}.settings-container .sidebar-content .radio .buttons{float:right}.settings-container .sidebar-content .radio .buttons label{margin-right:10px}.settings-container .sidebar-content .radio .buttons input{margin-top:0;margin-right:2px}.settings-container .sidebar-content .manage-slides-buttons .dashicons-plus{line-height:28px}.settings-container .sidebar-content .manage-slides-buttons .dashicons-trash{line-height:27px}.settings-container .sidebar-content .misc-pub-section{padding-left:0;padding-right:0}.settings-container .dimension-settings .field.half{width:45%}.settings-container .dimension-settings .field.half:first-child{margin-right:5%}.slides-container{margin:0 350px 0 0}#slides-browser .spinner{float:left;display:inline}#slides-browser .attachment .toolbar{display:none;text-align:left;position:absolute;top:0;left:0}#slides-browser .attachment:hover .toolbar{display:block}#slides-browser .attachment .toolbar i{-webkit-box-shadow:0 1px 3px rgba(0,0,0,.5);-moz-box-shadow:0 1px 3px rgba(0,0,0,.5);box-shadow:0 1px 3px rgba(0,0,0,.5);position:relative;margin-top:7px;margin-left:7px;padding:2px;font-size:30px;height:30px;width:30px;background:#000;background:rgba(0,0,0,.9);cursor:pointer;z-index:9999;color:#fff}#slides-browser .attachment .toolbar i:hover{-webkit-box-shadow:0 1px 3px rgba(0,0,0,.8);-moz-box-shadow:0 1px 3px rgba(0,0,0,.8);box-shadow:0 1px 3px rgba(0,0,0,.8);background-color:#000;color:#2ea2cc}#slides-browser .attachment .check div{background-position:21px 0}#slides-browser .attachment.selected .check div{background-position:-21px 0}#slides-browser .attachment.selected .check:hover div{background-position:-60px 0}#slides-browser .thumbnail img{width:100%}#slides-browser .thumbnail img.icon{width:auto}#slides-browser .thumbnail:hover .delete-button{opacity:1}@media only screen and (max-width:640px),screen and (max-height:400px){.image-details .media-modal{left:0!important;right:0!important}}
easing-slider.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: Easing Slider
5
  Plugin URI: http://easingslider.com/
6
- Version: 2.2.0.6
7
  Author: Matthew Ruddy
8
  Author URI: http://matthewruddy.com/
9
  Description: Easing Slider is an easy to use slider plugin for WordPress. Simple, lightweight & designed to get the job done, it allows you to get creating sliders without any difficulty.
@@ -53,7 +53,7 @@ class Easing_Slider {
53
  *
54
  * @var string
55
  */
56
- public static $version = '2.2.0.6';
57
 
58
  /**
59
  * Our plugin file
3
  /*
4
  Plugin Name: Easing Slider
5
  Plugin URI: http://easingslider.com/
6
+ Version: 2.2.0.7
7
  Author: Matthew Ruddy
8
  Author URI: http://matthewruddy.com/
9
  Description: Easing Slider is an easy to use slider plugin for WordPress. Simple, lightweight & designed to get the job done, it allows you to get creating sliders without any difficulty.
53
  *
54
  * @var string
55
  */
56
+ public static $version = '2.2.0.7';
57
 
58
  /**
59
  * Our plugin file
images/loading@2x.gif ADDED
Binary file
images/nav-arrow-next@2x.png ADDED
Binary file
images/nav-arrow-prev@2x.png ADDED
Binary file
images/nav-icon-active@2x.png ADDED
Binary file
images/nav-icon-inactive@2x.png ADDED
Binary file
includes/class-es-customizer.php CHANGED
@@ -206,10 +206,19 @@ class ES_Customizer {
206
 
207
  // Get the specified slider, or pick the first one.
208
  if ( isset( $_GET['edit'] ) ) {
209
- $slider = ES_Slider::find( $_GET['edit'] );
 
 
 
 
 
 
210
  }
211
  else {
 
 
212
  $slider = array_shift( array_values( $sliders ) );
 
213
  }
214
 
215
  // Display the view
206
 
207
  // Get the specified slider, or pick the first one.
208
  if ( isset( $_GET['edit'] ) ) {
209
+
210
+ // Get and validate the ID, protecting against XSS attacks
211
+ $id = esc_attr( $_GET['edit'] );
212
+
213
+ // Get the slider
214
+ $slider = ES_Slider::find( $id );
215
+
216
  }
217
  else {
218
+
219
+ // Get the first slider
220
  $slider = array_shift( array_values( $sliders ) );
221
+
222
  }
223
 
224
  // Display the view
includes/class-es-editor-pages.php CHANGED
@@ -151,16 +151,15 @@ class ES_Editor_Pages {
151
  ) );
152
 
153
  // Load our localizations
154
- wp_localize_script( 'easingslider-editor-pages', '_easingsliderAdminL10n', array(
155
  'warn' => __( 'Are you sure you wish to do this? This cannot be reversed.', 'easingslider' ),
156
  'plugin_url' => '/wp-content/plugins/'. dirname( plugin_basename( __FILE__ ) ) .'/',
157
  'delete_slide' => __( 'Are you sure you wish to delete this slide? This cannot be reversed.', 'easingslider' ),
158
  'delete_slides' => __( 'Are you sure you wish to delete all of this slider\'s images? This cannot be reversed.', 'easingslider' ),
159
  'media_upload' => array(
160
- 'title' => __( 'Add Images to Slider', 'easingslider' ),
161
- 'button' => __( 'Insert into slider', 'easingslider' ),
162
- 'change' => __( 'Use this image', 'easingslider' ),
163
- 'discard_changes' => __( 'Are you sure you wish to discard changes?', 'easingslider' )
164
  )
165
  ) );
166
 
@@ -296,8 +295,11 @@ class ES_Editor_Pages {
296
  return;
297
  }
298
 
 
 
 
299
  // Get our slider
300
- $slider = ES_Slider::find( $_GET['edit'] );
301
 
302
  // Update attributes
303
  $slider->set( $this->get_form_fields() );
@@ -368,8 +370,11 @@ class ES_Editor_Pages {
368
  // Show the appropriate view
369
  if ( isset( $_GET['edit'] ) ) {
370
 
 
 
 
371
  // Get the slider by its ID
372
- $slider = ES_Slider::find( $_GET['edit'] );
373
 
374
  // Display the editor
375
  require plugin_dir_path( dirname( __FILE__ ) ) . 'partials/edit-slider.php';
151
  ) );
152
 
153
  // Load our localizations
154
+ wp_localize_script( 'easingslider-editor-pages', '_easingsliderEditorL10n', array(
155
  'warn' => __( 'Are you sure you wish to do this? This cannot be reversed.', 'easingslider' ),
156
  'plugin_url' => '/wp-content/plugins/'. dirname( plugin_basename( __FILE__ ) ) .'/',
157
  'delete_slide' => __( 'Are you sure you wish to delete this slide? This cannot be reversed.', 'easingslider' ),
158
  'delete_slides' => __( 'Are you sure you wish to delete all of this slider\'s images? This cannot be reversed.', 'easingslider' ),
159
  'media_upload' => array(
160
+ 'title' => __( 'Edit Slide', 'easingslider' ),
161
+ 'image_from_media' => __( 'Image from Media', 'easingslider' ),
162
+ 'insert_into_slider' => __( 'Insert into Slider', 'easingslider' )
 
163
  )
164
  ) );
165
 
295
  return;
296
  }
297
 
298
+ // Get and validate the ID, protecting against XSS attacks
299
+ $id = esc_attr( $_GET['edit'] );
300
+
301
  // Get our slider
302
+ $slider = ES_Slider::find( $id );
303
 
304
  // Update attributes
305
  $slider->set( $this->get_form_fields() );
370
  // Show the appropriate view
371
  if ( isset( $_GET['edit'] ) ) {
372
 
373
+ // Get and validate the ID, protecting against XSS attacks
374
+ $id = esc_attr( $_GET['edit'] );
375
+
376
  // Get the slider by its ID
377
+ $slider = ES_Slider::find( $id );
378
 
379
  // Display the editor
380
  require plugin_dir_path( dirname( __FILE__ ) ) . 'partials/edit-slider.php';
includes/class-es-slider.php CHANGED
@@ -15,6 +15,13 @@ if ( ! defined( 'ABSPATH' ) ) {
15
  */
16
  class ES_Slider {
17
 
 
 
 
 
 
 
 
18
  /**
19
  * Constructor
20
  *
@@ -57,7 +64,7 @@ class ES_Slider {
57
  // Our default query arguments
58
  $defaults = array(
59
  'post_status' => 'publish',
60
- 'post_type' => 'easingslider',
61
  'orderby' => 'ID',
62
  'order' => 'asc',
63
  'posts_per_page' => -1
@@ -133,7 +140,7 @@ class ES_Slider {
133
  }
134
 
135
  // Bail if not our post type
136
- if ( 'easingslider' != $post->post_type ) {
137
  return false;
138
  }
139
 
@@ -154,14 +161,14 @@ class ES_Slider {
154
  /**
155
  * Gets the total number slides that exist
156
  *
157
- * @param string $status The slider post status
158
  * @return object
159
  */
160
- public static function total( $status = 'publish' ) {
161
 
162
- $total_items = wp_count_posts( 'easingslider' );
163
 
164
- return $total_items->$status;
165
 
166
  }
167
 
@@ -355,7 +362,7 @@ class ES_Slider {
355
  $postdata_defaults = array(
356
  'post_title' => '',
357
  'post_status' => 'publish',
358
- 'post_type' => 'easingslider'
359
  );
360
 
361
  return apply_filters( 'easingslider_postdata_defaults', $postdata_defaults );
@@ -524,7 +531,7 @@ class ES_Slider {
524
  *
525
  * The Javascript will set slides to "display: block".
526
  */
527
- $html = "<div class=\"easingslider-slide\" style=\"display: none; {$animation_duration}\">";
528
 
529
  $html = apply_filters( 'easingslider_before_display_slide', $html, $slide, $this );
530
 
@@ -680,7 +687,7 @@ class ES_Slider {
680
  */
681
  public function open_link( $html, $slide, $slider ) {
682
 
683
- if ( 'none' != $slide->link ) {
684
 
685
  // The link attributes string
686
  $attributes_string = "href=\"{$slide->linkUrl}\" class=\"easingslider-link\"";
@@ -707,7 +714,7 @@ class ES_Slider {
707
  */
708
  public function close_link( $html, $slide, $slider ) {
709
 
710
- if ( 'none' != $slide->link ) {
711
  $html .= "</a>";
712
  }
713
 
15
  */
16
  class ES_Slider {
17
 
18
+ /**
19
+ * The post type
20
+ *
21
+ * @var string
22
+ */
23
+ public static $post_type = 'easingslider';
24
+
25
  /**
26
  * Constructor
27
  *
64
  // Our default query arguments
65
  $defaults = array(
66
  'post_status' => 'publish',
67
+ 'post_type' => self::$post_type,
68
  'orderby' => 'ID',
69
  'order' => 'asc',
70
  'posts_per_page' => -1
140
  }
141
 
142
  // Bail if not our post type
143
+ if ( self::$post_type != $post->post_type ) {
144
  return false;
145
  }
146
 
161
  /**
162
  * Gets the total number slides that exist
163
  *
164
+ * @param string $post_status The post status
165
  * @return object
166
  */
167
+ public static function total( $post_status = 'publish' ) {
168
 
169
+ $total_items = wp_count_posts( self::$post_type );
170
 
171
+ return $total_items->$post_status;
172
 
173
  }
174
 
362
  $postdata_defaults = array(
363
  'post_title' => '',
364
  'post_status' => 'publish',
365
+ 'post_type' => self::$post_type
366
  );
367
 
368
  return apply_filters( 'easingslider_postdata_defaults', $postdata_defaults );
531
  *
532
  * The Javascript will set slides to "display: block".
533
  */
534
+ $html = "<div class=\"easingslider-slide\" style=\"{$animation_duration}\">";
535
 
536
  $html = apply_filters( 'easingslider_before_display_slide', $html, $slide, $this );
537
 
687
  */
688
  public function open_link( $html, $slide, $slider ) {
689
 
690
+ if ( ! empty( $slide->link ) && 'none' != $slide->link ) {
691
 
692
  // The link attributes string
693
  $attributes_string = "href=\"{$slide->linkUrl}\" class=\"easingslider-link\"";
714
  */
715
  public function close_link( $html, $slide, $slider ) {
716
 
717
+ if ( ! empty( $slide->link ) && 'none' != $slide->link ) {
718
  $html .= "</a>";
719
  }
720
 
js/editor-pages.js CHANGED
@@ -8,7 +8,8 @@ window.EasingSlider = window.EasingSlider || {
8
  controllers: {},
9
  frames: {},
10
  views: {},
11
- router: {}
 
12
  }
13
  };
14
 
@@ -20,13 +21,15 @@ window.EasingSlider = window.EasingSlider || {
20
  var Editor = window.EasingSlider.Editor;
21
 
22
  /**
23
- * Returns the appropriate "Slide" model
24
  */
25
- Editor.models.Slide = function(attributes) {
26
 
27
- // Return the appropriate model
28
- if ( 'image' == attributes.type ) {
29
- return new Editor.models.ImageSlide(attributes);
 
 
30
  }
31
 
32
  };
@@ -34,7 +37,7 @@ window.EasingSlider = window.EasingSlider || {
34
  /**
35
  * Image "Slide" model
36
  */
37
- Editor.models.ImageSlide = Backbone.Model.extend({
38
 
39
  /**
40
  * Attachment
@@ -51,7 +54,8 @@ window.EasingSlider = window.EasingSlider || {
51
  aspectRatio: null,
52
  link: 'none',
53
  linkUrl: '',
54
- title: ''
 
55
  }, wp.media.model.PostImage.prototype.defaults)
56
 
57
  });
@@ -65,9 +69,9 @@ window.EasingSlider = window.EasingSlider || {
65
  * The models for this collection are polymorphic,
66
  * so the model to add is determined by function.
67
  *
68
- * Don't be fooled, Editor.Slide is just a function (not a model).
69
  */
70
- model: Editor.models.Slide,
71
 
72
  /**
73
  * Constructor
@@ -75,9 +79,9 @@ window.EasingSlider = window.EasingSlider || {
75
  initialize: function() {
76
 
77
  // Bind our collection events
78
- this.on('add', this._resetIDs, this);
79
  this.on('remove', this._resetIDs, this);
80
- this.on('reset', this._resetIDs, this);
81
 
82
  },
83
 
@@ -177,13 +181,15 @@ window.EasingSlider = window.EasingSlider || {
177
  });
178
 
179
  /**
180
- * Returns the appropriate "Edit Slide" controller, based on the type of slide provided
181
  */
182
- Editor.controllers.EditSlide = function(options) {
183
 
184
- // Return the appropriate view
185
- if ( 'image' == options.type ) {
186
- return new Editor.controllers.EditImageSlide(options);
 
 
187
  }
188
 
189
  };
@@ -191,14 +197,14 @@ window.EasingSlider = window.EasingSlider || {
191
  /**
192
  * "Edit Slide" controller for images
193
  */
194
- Editor.controllers.EditImageSlide = wp.media.controller.ImageDetails.extend({
195
 
196
  /**
197
  * Defaults
198
  */
199
  defaults: _.defaults({
200
  id: 'edit-slide',
201
- title: 'Edit Slide',
202
  }, wp.media.controller.ImageDetails.prototype.defaults )
203
 
204
  });
@@ -215,11 +221,7 @@ window.EasingSlider = window.EasingSlider || {
215
 
216
  // Alter defaults
217
  _.defaults(this.options, {
218
- title: 'Add a Slide',
219
- multiple: true,
220
- button: {
221
- text: 'Add new slide'
222
- }
223
  });
224
 
225
  // Call parent constructor
@@ -242,7 +244,7 @@ window.EasingSlider = window.EasingSlider || {
242
  new wp.media.controller.Library({
243
  id: 'insert',
244
  type: 'image',
245
- title: 'Image from Media',
246
  priority: 20,
247
  toolbar: 'insert-slide',
248
  filterable: false,
@@ -281,8 +283,8 @@ window.EasingSlider = window.EasingSlider || {
281
  view.set('insert-slide', {
282
  style: 'primary',
283
  priority: 80,
284
- text: 'Insert into Slider',
285
- requires: { selection: true },
286
  click: function() {
287
 
288
  // Close then trigger "insert", providing the selection
@@ -308,7 +310,7 @@ window.EasingSlider = window.EasingSlider || {
308
  _.each(selection.models, function(model) {
309
 
310
  // Create a new slide & set its type
311
- var slide = new Editor.models.Slide({
312
  type: type
313
  });
314
 
@@ -331,15 +333,16 @@ window.EasingSlider = window.EasingSlider || {
331
  }
332
 
333
  });
334
-
335
  /**
336
- * Function that returns the appropriate "Edit Slide" frame
337
  */
338
- Editor.frames.EditSlide = function(options) {
339
 
340
- // Return the appropriate frame
341
- if ( 'image' == options.model.get('type') ) {
342
- return new Editor.frames.EditImageSlide(options);
 
 
343
  }
344
 
345
  };
@@ -347,7 +350,7 @@ window.EasingSlider = window.EasingSlider || {
347
  /**
348
  * Frame for editing an "Image" slide
349
  */
350
- Editor.frames.EditImageSlide = wp.media.view.MediaFrame.ImageDetails.extend({
351
 
352
  /**
353
  * Constructor
@@ -378,7 +381,7 @@ window.EasingSlider = window.EasingSlider || {
378
 
379
  // Add our "Edit Slide" state
380
  this.states.add([
381
- new Editor.controllers.EditSlide({
382
  type: 'image',
383
  image: this.image,
384
  editable: false
@@ -398,7 +401,7 @@ window.EasingSlider = window.EasingSlider || {
398
  imageDetailsContent: function(options) {
399
 
400
  // Initiate the view
401
- options.view = new Editor.views.EditSlide({
402
  type: 'image',
403
  controller: this,
404
  model: this.state().image,
@@ -612,7 +615,7 @@ window.EasingSlider = window.EasingSlider || {
612
 
613
  event.preventDefault();
614
 
615
- if ( confirm( _easingsliderAdminL10n.warn ) ) {
616
 
617
  // Get the model ID
618
  var id = $(event.currentTarget).parents('.attachment').attr('data-id');
@@ -631,7 +634,7 @@ window.EasingSlider = window.EasingSlider || {
631
 
632
  event.preventDefault();
633
 
634
- if ( confirm( _easingsliderAdminL10n.warn ) ) {
635
 
636
  // Delete the slides
637
  this._deleteSlides(event);
@@ -798,7 +801,7 @@ window.EasingSlider = window.EasingSlider || {
798
  editSlide: function(id) {
799
 
800
  // Create the frame
801
- this.subviews.EditSlide = new Editor.frames.EditSlide({
802
  model: this.collection.get(id)
803
  });
804
 
@@ -959,6 +962,7 @@ window.EasingSlider = window.EasingSlider || {
959
  // Bind events
960
  this.model.on('change', this._setData, this);
961
  this.model.on('change:id', this._updateID, this);
 
962
  this.model.on('change:attachment_id', this.render, this);
963
 
964
  // Bind additional attachment events if appropriate
@@ -1013,13 +1017,15 @@ window.EasingSlider = window.EasingSlider || {
1013
  });
1014
 
1015
  /**
1016
- * Returns the appropriate "Edit Slide" view, based on the type of slide provided
1017
  */
1018
- Editor.views.EditSlide = function(options) {
1019
 
1020
- // Return the appropriate view
1021
- if ( 'image' == options.type ) {
1022
- return new Editor.views.EditImageSlide(options);
 
 
1023
  }
1024
 
1025
  };
@@ -1027,17 +1033,39 @@ window.EasingSlider = window.EasingSlider || {
1027
  /**
1028
  * "Edit Slide" view for images
1029
  */
1030
- Editor.views.EditImageSlide = wp.media.view.ImageDetails.extend({
1031
 
1032
  /**
1033
  * Classname
1034
  */
1035
- className: 'edit-attachment-frame attachment-details mode-select hide-menu hide-router',
1036
 
1037
  /**
1038
  * Template for this view
1039
  */
1040
- template: wp.media.template('easingslider-edit-slide')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1041
 
1042
  });
1043
 
@@ -1120,7 +1148,7 @@ window.EasingSlider = window.EasingSlider || {
1120
  $(document).ready(function() {
1121
 
1122
  // Initiate the router
1123
- var router = new Editor.router();
1124
 
1125
  // Start the history
1126
  Backbone.history.start({
@@ -1131,7 +1159,7 @@ window.EasingSlider = window.EasingSlider || {
1131
  // Handly delete class
1132
  $('.delete').each(function() {
1133
  $(this).on('click', function() {
1134
- if ( ! confirm( _easingsliderAdminL10n.warn ) ) {
1135
  return false;
1136
  }
1137
  });
8
  controllers: {},
9
  frames: {},
10
  views: {},
11
+ router: {},
12
+ Router: {}
13
  }
14
  };
15
 
21
  var Editor = window.EasingSlider.Editor;
22
 
23
  /**
24
+ * Our slide types
25
  */
26
+ Editor.models.Slide = {
27
 
28
+ /**
29
+ * Returns the appropriate "Slide" model
30
+ */
31
+ get: function(attributes) {
32
+ return new Editor.models.Slide[attributes.type](attributes);
33
  }
34
 
35
  };
37
  /**
38
  * Image "Slide" model
39
  */
40
+ Editor.models.Slide.image = Backbone.Model.extend({
41
 
42
  /**
43
  * Attachment
54
  aspectRatio: null,
55
  link: 'none',
56
  linkUrl: '',
57
+ title: '',
58
+ url: null
59
  }, wp.media.model.PostImage.prototype.defaults)
60
 
61
  });
69
  * The models for this collection are polymorphic,
70
  * so the model to add is determined by function.
71
  *
72
+ * Don't be fooled, Editor.models.Slide.get is just a function (not a model).
73
  */
74
+ model: Editor.models.Slide.get,
75
 
76
  /**
77
  * Constructor
79
  initialize: function() {
80
 
81
  // Bind our collection events
82
+ this.on('add', this._resetIDs, this);
83
  this.on('remove', this._resetIDs, this);
84
+ this.on('reset', this._resetIDs, this);
85
 
86
  },
87
 
181
  });
182
 
183
  /**
184
+ * Our "Edit Slide" controllers for various slide types
185
  */
186
+ Editor.controllers.EditSlide = {
187
 
188
+ /**
189
+ * Returns the appropriate "Edit Slide" controller, based on the type of slide provided
190
+ */
191
+ get: function(options) {
192
+ return new Editor.controllers.EditSlide[options.type](options);
193
  }
194
 
195
  };
197
  /**
198
  * "Edit Slide" controller for images
199
  */
200
+ Editor.controllers.EditSlide.image = wp.media.controller.ImageDetails.extend({
201
 
202
  /**
203
  * Defaults
204
  */
205
  defaults: _.defaults({
206
  id: 'edit-slide',
207
+ title: _easingsliderEditorL10n.media_upload.title
208
  }, wp.media.controller.ImageDetails.prototype.defaults )
209
 
210
  });
221
 
222
  // Alter defaults
223
  _.defaults(this.options, {
224
+ multiple: true
 
 
 
 
225
  });
226
 
227
  // Call parent constructor
244
  new wp.media.controller.Library({
245
  id: 'insert',
246
  type: 'image',
247
+ title: _easingsliderEditorL10n.media_upload.image_from_media,
248
  priority: 20,
249
  toolbar: 'insert-slide',
250
  filterable: false,
283
  view.set('insert-slide', {
284
  style: 'primary',
285
  priority: 80,
286
+ text: _easingsliderEditorL10n.media_upload.insert_into_slider,
287
+ requires: { selection: false },
288
  click: function() {
289
 
290
  // Close then trigger "insert", providing the selection
310
  _.each(selection.models, function(model) {
311
 
312
  // Create a new slide & set its type
313
+ var slide = new Editor.models.Slide.get({
314
  type: type
315
  });
316
 
333
  }
334
 
335
  });
 
336
  /**
337
+ * Our "Edit Slide" frames for various slide types
338
  */
339
+ Editor.frames.EditSlide = {
340
 
341
+ /**
342
+ * Returns the appropriate "Edit Slide" frame, based on the type of slide provided
343
+ */
344
+ get: function(options) {
345
+ return new Editor.frames.EditSlide[options.model.get('type')](options);
346
  }
347
 
348
  };
350
  /**
351
  * Frame for editing an "Image" slide
352
  */
353
+ Editor.frames.EditSlide.image = wp.media.view.MediaFrame.ImageDetails.extend({
354
 
355
  /**
356
  * Constructor
381
 
382
  // Add our "Edit Slide" state
383
  this.states.add([
384
+ new Editor.controllers.EditSlide.get({
385
  type: 'image',
386
  image: this.image,
387
  editable: false
401
  imageDetailsContent: function(options) {
402
 
403
  // Initiate the view
404
+ options.view = new Editor.views.EditSlide.get({
405
  type: 'image',
406
  controller: this,
407
  model: this.state().image,
615
 
616
  event.preventDefault();
617
 
618
+ if ( confirm( _easingsliderEditorL10n.warn ) ) {
619
 
620
  // Get the model ID
621
  var id = $(event.currentTarget).parents('.attachment').attr('data-id');
634
 
635
  event.preventDefault();
636
 
637
+ if ( confirm( _easingsliderEditorL10n.warn ) ) {
638
 
639
  // Delete the slides
640
  this._deleteSlides(event);
801
  editSlide: function(id) {
802
 
803
  // Create the frame
804
+ this.subviews.EditSlide = new Editor.frames.EditSlide.get({
805
  model: this.collection.get(id)
806
  });
807
 
962
  // Bind events
963
  this.model.on('change', this._setData, this);
964
  this.model.on('change:id', this._updateID, this);
965
+ this.model.on('change:url', this.render, this);
966
  this.model.on('change:attachment_id', this.render, this);
967
 
968
  // Bind additional attachment events if appropriate
1017
  });
1018
 
1019
  /**
1020
+ * Our "Edit Slide" views for various slide types
1021
  */
1022
+ Editor.views.EditSlide = {
1023
 
1024
+ /**
1025
+ * Returns the appropriate "Edit Slide" view, based on the type of slide provided
1026
+ */
1027
+ get: function(options) {
1028
+ return new Editor.views.EditSlide[options.type](options);
1029
  }
1030
 
1031
  };
1033
  /**
1034
  * "Edit Slide" view for images
1035
  */
1036
+ Editor.views.EditSlide.image = wp.media.view.ImageDetails.extend({
1037
 
1038
  /**
1039
  * Classname
1040
  */
1041
+ className: 'edit-attachment-frame attachment-details mode-select',
1042
 
1043
  /**
1044
  * Template for this view
1045
  */
1046
+ template: wp.media.template('easingslider-edit-slide'),
1047
+
1048
+ /**
1049
+ * Constructor
1050
+ */
1051
+ initialize: function() {
1052
+
1053
+ // Call parent constructor
1054
+ wp.media.view.ImageDetails.prototype.initialize.apply(this, arguments);
1055
+
1056
+ // Bind events
1057
+ this.model.on('change:url', this._updateImage, this);
1058
+
1059
+ },
1060
+
1061
+ /**
1062
+ * Updates the image preview (URL images only)
1063
+ */
1064
+ _updateImage: function() {
1065
+
1066
+ this.$('.details-image').attr('src', this.model.get('url'));
1067
+
1068
+ }
1069
 
1070
  });
1071
 
1148
  $(document).ready(function() {
1149
 
1150
  // Initiate the router
1151
+ Editor.Router = new Editor.router();
1152
 
1153
  // Start the history
1154
  Backbone.history.start({
1159
  // Handly delete class
1160
  $('.delete').each(function() {
1161
  $(this).on('click', function() {
1162
+ if ( ! confirm( _easingsliderEditorL10n.warn ) ) {
1163
  return false;
1164
  }
1165
  });
js/editor-pages.min.js CHANGED
@@ -1 +1 @@
1
- window.EasingSlider=window.EasingSlider||{Editor:{models:{},collections:{},controllers:{},frames:{},views:{},router:{}}};(function(e){var t=window.EasingSlider.Editor;t.models.Slide=function(e){if("image"==e.type){return new t.models.ImageSlide(e)}};t.models.ImageSlide=Backbone.Model.extend({attachment:false,defaults:_.defaults({attachment_id:null,type:"image",alt:"",aspectRatio:null,link:"none",linkUrl:"",title:""},wp.media.model.PostImage.prototype.defaults)});t.collections.Slides=Backbone.Collection.extend({model:t.models.Slide,initialize:function(){this.on("add",this._resetIDs,this);this.on("remove",this._resetIDs,this);this.on("reset",this._resetIDs,this)},comparator:function(e){return e.get("id")},_resetIDs:function(){var e=new Backbone.Collection;_.each(this.models,function(t,n){t.set({id:n+1});e.add(t)});this.reset(e.models,{silent:true})},reposition:function(e,t){this.remove(e,{silent:true});this.add(e,{at:t,silent:true});this._resetIDs();return this},sync:function(){var e=this,t=[];_.each(this.models,function(e){if(e.has("attachment_id")){t.push(e.get("attachment_id"))}},this);var n=wp.media.query({post__in:t});n.more().done(function(){_.each(n.models,function(t){var n=e.where({attachment_id:t.get("id")});_.each(n,function(e){e.attachment=t})});e.trigger("sync:done")});return this}});t.controllers.EditSlide=function(e){if("image"==e.type){return new t.controllers.EditImageSlide(e)}};t.controllers.EditImageSlide=wp.media.controller.ImageDetails.extend({defaults:_.defaults({id:"edit-slide",title:"Edit Slide"},wp.media.controller.ImageDetails.prototype.defaults)});t.frames.AddSlide=wp.media.view.MediaFrame.Post.extend({initialize:function(){_.defaults(this.options,{title:"Add a Slide",multiple:true,button:{text:"Add new slide"}});wp.media.view.MediaFrame.Post.prototype.initialize.apply(this,arguments);this.on("content:render:browse",this.removeSidebar,this);this.on("toolbar:create:insert-slide",this.createToolbar,this);this.on("toolbar:render:insert-slide",this.insertToolbar,this)},createStates:function(){this.states.add([new wp.media.controller.Library({id:"insert",type:"image",title:"Image from Media",priority:20,toolbar:"insert-slide",filterable:false,library:wp.media.query({type:"image"}),multiple:true,editable:true,allowLocalEdits:true,displaySettings:false,displayUserSettings:true})])},removeSidebar:function(e){e.sidebar.remove("details");e.$el.addClass("hide-sidebar")},insertToolbar:function(e){var t=this;e.set("insert-slide",{style:"primary",priority:80,text:"Insert into Slider",requires:{selection:true},click:function(){t.close().trigger("insert",t.getSelection()).reset()}})},getSelection:function(e){var n=new wp.media.model.Selection(null,{multiple:true});var r=this.state().get("type"),e=this.state().get("selection");_.each(e.models,function(e){var i=new t.models.Slide({type:r});if(e.get("id")){i.attachment=e;i.set({attachment_id:e.get("id")},{silent:true})}else{i.set(e,{silent:true})}n.add(i)},this);return n}});t.frames.EditSlide=function(e){if("image"==e.model.get("type")){return new t.frames.EditImageSlide(e)}};t.frames.EditImageSlide=wp.media.view.MediaFrame.ImageDetails.extend({initialize:function(){this.image=new wp.media.model.PostImage(this.model.attributes);this.options.state="edit-slide";this.options.selection=new wp.media.model.Selection(this.image.attachment,{multiple:false});wp.media.view.MediaFrame.Select.prototype.initialize.apply(this,arguments);this.on("content:render:browse",this.removeSidebar,this);this.state("edit-slide").on("update",this.updateSettings,this);this.state("replace-image").on("replace",this.replaceImage,this)},createStates:function(){this.states.add([new t.controllers.EditSlide({type:"image",image:this.image,editable:false})]);wp.media.view.MediaFrame.ImageDetails.prototype.createStates.apply(this,arguments)},imageDetailsContent:function(e){e.view=new t.views.EditSlide({type:"image",controller:this,model:this.state().image,attachment:this.state().image.attachment})},removeSidebar:function(e){e.sidebar.remove("details");e.$el.addClass("hide-sidebar")},updateSettings:function(){var e={};this.$("*[data-setting]").each(function(){e[this.dataset.setting]=this.value});this.model.set(e)},replaceImage:function(){this.model.set({attachment_id:this.image.attachment.id});this.model.attachment.set(this.image.attachment.attributes)}});t.views.Admin=Backbone.View.extend({el:".wrap",events:{"click #add-slides":"_addSlide","click #select-all":"_selectAll","click #delete-slides":"_clickBulkDelete","click #save":"_clickSave","click .toolbar .edit":"_clickEdit","click .toolbar .remove":"_clickDelete","click .thumbnail":"_clickThumb","click .select-mode-toggle-button":"_toggleMode","click .sidebar-name":"_toggleWidget"},initialize:function(){this.subviews={AddSlide:new t.frames.AddSlide,AdminSlides:new t.views.AdminSlides({collection:this.collection})};this.collection.on("sync:done",this.render,this);this.collection.on("sync:done",this._enableSave,this);this.subviews.AddSlide.on("insert",this._handleInsert,this);e(window).on("resize",this._setColumns.bind(this));this._selectMode=false;this._showSpinner()},_showSpinner:function(){this.$("#slides-browser").append('<div class="spinner"></div>')},_hideSpinner:function(){this.$("#slides-browser .spinner").remove()},_enableSave:function(){this.$("#save").prop("disabled",false)},_clickSave:function(){this.$("#publishing-action .spinner").css({display:"block"})},_setColumns:function(){var e=this.$(".media-frame-content"),t=e.attr("data-columns"),n=e.width();if(n){var r=Math.min(Math.round(n/145),12)||1;if(!t||t!==r){e.attr("data-columns",r)}}},_handleInsert:function(e){this.collection.add(e.models)},_clickThumb:function(e){e.preventDefault();if(!this._selectMode){this._editSlide(e)}else{this._toggleSelect(e)}},_clickEdit:function(e){e.preventDefault();this._editSlide(e)},_clickDelete:function(t){t.preventDefault();if(confirm(_easingsliderAdminL10n.warn)){var n=e(t.currentTarget).parents(".attachment").attr("data-id");this.collection.remove(n)}},_clickBulkDelete:function(e){e.preventDefault();if(confirm(_easingsliderAdminL10n.warn)){this._deleteSlides(e);this._toggleMode(e)}},_toggleMode:function(e){e.preventDefault();if(!this._selectMode){this._selectMode=true}else{this._selectMode=false}this.$(".attachment").removeClass("selected details");this.$(".media-frame").toggleClass("mode-select");this.$(".media-toolbar div *").toggleClass("hidden")},_toggleSelect:function(t){t.preventDefault();e(t.currentTarget).parents(".attachment").toggleClass("selected details")},_toggleWidget:function(t){t.preventDefault();var n=e(t.currentTarget).parent(),r=n.find(".sidebar-content");if(n.hasClass("fixed")){return}this.$(".widgets-holder-wrap").each(function(){var t=e(this);if(!t.hasClass("fixed")){t.find(".sidebar-content").slideUp(200,function(){t.addClass("closed")})}});if(!n.hasClass("closed")){return}r.slideDown(200,function(){n.removeClass("closed")})},_selectAll:function(e){e.preventDefault();this.$(".attachment").addClass("selected details")},_deleteSlides:function(t){t.preventDefault();var n=this.collection,r=[];this.$(".attachment").each(function(t){if(e(this).hasClass("selected")){r.push(n.at(t))}});this.collection.remove(r)},_addSlide:function(e){e.preventDefault();this.addSlide()},addSlide:function(){this.subviews.AddSlide.open();return this},_editSlide:function(t){t.preventDefault();var n=e(t.currentTarget).parents(".attachment").attr("data-id");this.editSlide(n)},editSlide:function(e){this.subviews.EditSlide=new t.frames.EditSlide({model:this.collection.get(e)});this.subviews.EditSlide.open();return this},render:function(){this._hideSpinner();var e=this.subviews.AdminSlides.render().el;this.$("#slides-browser").append(e);return this}});t.views.AdminSlides=Backbone.View.extend({tagName:"ul",attributes:{"class":"attachments ui-sortable",tabindex:"-1"},initialize:function(){this.subviews=[];this.collection.on("add",this.add,this);this.collection.on("remove",this.render,this);this.collection.on("reset",this.render,this);this.$el.sortable({items:".attachment",containment:"parent",tolerance:"pointer",stop:this._sort.bind(this)})},_sort:function(e,t){var n=this.collection.get(t.item.context.dataset.id);this.collection.reposition(n,t.item.index())},add:function(e){var n=new t.views.AdminSlide({model:e});this.subviews.push(n);this.$el.append(n.render().$el);return this},render:function(){this.subviews=[];this.$el.empty();_.each(this.collection.models,function(e){this.add(e)},this);return this}});t.views.AdminSlide=Backbone.View.extend({tagName:"li",attributes:function(){return{role:"checkbox","class":"attachment save-ready",tabindex:"0","data-id":this.model.id}},template:wp.media.template("easingslider-slide"),initialize:function(){this.model.on("change",this._setData,this);this.model.on("change:id",this._updateID,this);this.model.on("change:attachment_id",this.render,this);if(this.model.attachment){this.model.attachment.on("change",this.render,this)}},_setData:function(){this.$('input[name="slides[]"]').val(JSON.stringify(this.model.attributes))},_updateID:function(e,t){this.$el.attr("data-id",t);this.attributes["data-id"]=t},render:function(){var e={model:this.model.toJSON()};if(this.model.attachment){e.attachment=this.model.attachment.toJSON()}this.$el.html(this.template(e));return this}});t.views.EditSlide=function(e){if("image"==e.type){return new t.views.EditImageSlide(e)}};t.views.EditImageSlide=wp.media.view.ImageDetails.extend({className:"edit-attachment-frame attachment-details mode-select hide-menu hide-router",template:wp.media.template("easingslider-edit-slide")});t.router=Backbone.Router.extend({routes:{"admin.php?page=:page&edit=:id&change=:slide":"changeSlide","admin.php?page=:page&edit=:id&slide=:slide":"editSlide","admin.php?page=:page&edit=:id":"edit","admin.php?page=:page":"edit"},changeSlide:function(e,t,n){this.edit();this.AdminView.collection.on("sync:done",function(){this.AdminView.openChangeSlideFrame(n)},this);return this},editSlide:function(e,t,n){this.edit();this.AdminView.collection.on("sync:done",function(){this.AdminView.openEditSlideFrame(n)},this);return this},edit:function(e){if(!window.slides){return this}this.AdminView=new t.views.Admin({collection:new t.collections.Slides(JSON.parse(window.slides))});this.AdminView.collection.sync();return this}});e(document).ready(function(){var n=new t.router;Backbone.history.start({root:window._wpMediaGridSettings.adminUrl,pushState:true});e(".delete").each(function(){e(this).on("click",function(){if(!confirm(_easingsliderAdminL10n.warn)){return false}})})})})(jQuery)
1
+ window.EasingSlider=window.EasingSlider||{Editor:{models:{},collections:{},controllers:{},frames:{},views:{},router:{},Router:{}}},function(e){var t=window.EasingSlider.Editor;t.models.Slide={get:function(e){return new t.models.Slide[e.type](e)}},t.models.Slide.image=Backbone.Model.extend({attachment:!1,defaults:_.defaults({attachment_id:null,type:"image",alt:"",aspectRatio:null,link:"none",linkUrl:"",title:"",url:null},wp.media.model.PostImage.prototype.defaults)}),t.collections.Slides=Backbone.Collection.extend({model:t.models.Slide.get,initialize:function(){this.on("add",this._resetIDs,this),this.on("remove",this._resetIDs,this),this.on("reset",this._resetIDs,this)},comparator:function(e){return e.get("id")},_resetIDs:function(){var e=new Backbone.Collection;_.each(this.models,function(t,i){t.set({id:i+1}),e.add(t)}),this.reset(e.models,{silent:!0})},reposition:function(e,t){return this.remove(e,{silent:!0}),this.add(e,{at:t,silent:!0}),this._resetIDs(),this},sync:function(){var e=this,t=[];_.each(this.models,function(e){e.has("attachment_id")&&t.push(e.get("attachment_id"))},this);var i=wp.media.query({post__in:t});return i.more().done(function(){_.each(i.models,function(t){var i=e.where({attachment_id:t.get("id")});_.each(i,function(e){e.attachment=t})}),e.trigger("sync:done")}),this}}),t.controllers.EditSlide={get:function(e){return new t.controllers.EditSlide[e.type](e)}},t.controllers.EditSlide.image=wp.media.controller.ImageDetails.extend({defaults:_.defaults({id:"edit-slide",title:_easingsliderEditorL10n.media_upload.title},wp.media.controller.ImageDetails.prototype.defaults)}),t.frames.AddSlide=wp.media.view.MediaFrame.Post.extend({initialize:function(){_.defaults(this.options,{multiple:!0}),wp.media.view.MediaFrame.Post.prototype.initialize.apply(this,arguments),this.on("content:render:browse",this.removeSidebar,this),this.on("toolbar:create:insert-slide",this.createToolbar,this),this.on("toolbar:render:insert-slide",this.insertToolbar,this)},createStates:function(){this.states.add([new wp.media.controller.Library({id:"insert",type:"image",title:_easingsliderEditorL10n.media_upload.image_from_media,priority:20,toolbar:"insert-slide",filterable:!1,library:wp.media.query({type:"image"}),multiple:!0,editable:!0,allowLocalEdits:!0,displaySettings:!1,displayUserSettings:!0})])},removeSidebar:function(e){e.sidebar.remove("details"),e.$el.addClass("hide-sidebar")},insertToolbar:function(e){var t=this;e.set("insert-slide",{style:"primary",priority:80,text:_easingsliderEditorL10n.media_upload.insert_into_slider,requires:{selection:!1},click:function(){t.close().trigger("insert",t.getSelection()).reset()}})},getSelection:function(e){var i=new wp.media.model.Selection(null,{multiple:!0}),s=this.state().get("type"),e=this.state().get("selection");return _.each(e.models,function(e){var n=new t.models.Slide.get({type:s});e.get("id")?(n.attachment=e,n.set({attachment_id:e.get("id")},{silent:!0})):n.set(e,{silent:!0}),i.add(n)},this),i}}),t.frames.EditSlide={get:function(e){return new(t.frames.EditSlide[e.model.get("type")])(e)}},t.frames.EditSlide.image=wp.media.view.MediaFrame.ImageDetails.extend({initialize:function(){this.image=new wp.media.model.PostImage(this.model.attributes),this.options.state="edit-slide",this.options.selection=new wp.media.model.Selection(this.image.attachment,{multiple:!1}),wp.media.view.MediaFrame.Select.prototype.initialize.apply(this,arguments),this.on("content:render:browse",this.removeSidebar,this),this.state("edit-slide").on("update",this.updateSettings,this),this.state("replace-image").on("replace",this.replaceImage,this)},createStates:function(){this.states.add([new t.controllers.EditSlide.get({type:"image",image:this.image,editable:!1})]),wp.media.view.MediaFrame.ImageDetails.prototype.createStates.apply(this,arguments)},imageDetailsContent:function(e){e.view=new t.views.EditSlide.get({type:"image",controller:this,model:this.state().image,attachment:this.state().image.attachment})},removeSidebar:function(e){e.sidebar.remove("details"),e.$el.addClass("hide-sidebar")},updateSettings:function(){var e={};this.$("*[data-setting]").each(function(){e[this.dataset.setting]=this.value}),this.model.set(e)},replaceImage:function(){this.model.set({attachment_id:this.image.attachment.id}),this.model.attachment.set(this.image.attachment.attributes)}}),t.views.Admin=Backbone.View.extend({el:".wrap",events:{"click #add-slides":"_addSlide","click #select-all":"_selectAll","click #delete-slides":"_clickBulkDelete","click #save":"_clickSave","click .toolbar .edit":"_clickEdit","click .toolbar .remove":"_clickDelete","click .thumbnail":"_clickThumb","click .select-mode-toggle-button":"_toggleMode","click .sidebar-name":"_toggleWidget"},initialize:function(){this.subviews={AddSlide:new t.frames.AddSlide,AdminSlides:new t.views.AdminSlides({collection:this.collection})},this.collection.on("sync:done",this.render,this),this.collection.on("sync:done",this._enableSave,this),this.subviews.AddSlide.on("insert",this._handleInsert,this),e(window).on("resize",this._setColumns.bind(this)),this._selectMode=!1,this._showSpinner()},_showSpinner:function(){this.$("#slides-browser").append('<div class="spinner"></div>')},_hideSpinner:function(){this.$("#slides-browser .spinner").remove()},_enableSave:function(){this.$("#save").prop("disabled",!1)},_clickSave:function(){this.$("#publishing-action .spinner").css({display:"block"})},_setColumns:function(){var e=this.$(".media-frame-content"),t=e.attr("data-columns"),i=e.width();if(i){var s=Math.min(Math.round(i/145),12)||1;t&&t===s||e.attr("data-columns",s)}},_handleInsert:function(e){this.collection.add(e.models)},_clickThumb:function(e){e.preventDefault(),this._selectMode?this._toggleSelect(e):this._editSlide(e)},_clickEdit:function(e){e.preventDefault(),this._editSlide(e)},_clickDelete:function(t){if(t.preventDefault(),confirm(_easingsliderEditorL10n.warn)){var i=e(t.currentTarget).parents(".attachment").attr("data-id");this.collection.remove(i)}},_clickBulkDelete:function(e){e.preventDefault(),confirm(_easingsliderEditorL10n.warn)&&(this._deleteSlides(e),this._toggleMode(e))},_toggleMode:function(e){e.preventDefault(),this._selectMode=this._selectMode?!1:!0,this.$(".attachment").removeClass("selected details"),this.$(".media-frame").toggleClass("mode-select"),this.$(".media-toolbar div *").toggleClass("hidden")},_toggleSelect:function(t){t.preventDefault(),e(t.currentTarget).parents(".attachment").toggleClass("selected details")},_toggleWidget:function(t){t.preventDefault();var i=e(t.currentTarget).parent(),s=i.find(".sidebar-content");i.hasClass("fixed")||(this.$(".widgets-holder-wrap").each(function(){var t=e(this);t.hasClass("fixed")||t.find(".sidebar-content").slideUp(200,function(){t.addClass("closed")})}),i.hasClass("closed")&&s.slideDown(200,function(){i.removeClass("closed")}))},_selectAll:function(e){e.preventDefault(),this.$(".attachment").addClass("selected details")},_deleteSlides:function(t){t.preventDefault();var i=this.collection,s=[];this.$(".attachment").each(function(t){e(this).hasClass("selected")&&s.push(i.at(t))}),this.collection.remove(s)},_addSlide:function(e){e.preventDefault(),this.addSlide()},addSlide:function(){return this.subviews.AddSlide.open(),this},_editSlide:function(t){t.preventDefault();var i=e(t.currentTarget).parents(".attachment").attr("data-id");this.editSlide(i)},editSlide:function(e){return this.subviews.EditSlide=new t.frames.EditSlide.get({model:this.collection.get(e)}),this.subviews.EditSlide.open(),this},render:function(){this._hideSpinner();var e=this.subviews.AdminSlides.render().el;return this.$("#slides-browser").append(e),this}}),t.views.AdminSlides=Backbone.View.extend({tagName:"ul",attributes:{"class":"attachments ui-sortable",tabindex:"-1"},initialize:function(){this.subviews=[],this.collection.on("add",this.add,this),this.collection.on("remove",this.render,this),this.collection.on("reset",this.render,this),this.$el.sortable({items:".attachment",containment:"parent",tolerance:"pointer",stop:this._sort.bind(this)})},_sort:function(e,t){var i=this.collection.get(t.item.context.dataset.id);this.collection.reposition(i,t.item.index())},add:function(e){var i=new t.views.AdminSlide({model:e});return this.subviews.push(i),this.$el.append(i.render().$el),this},render:function(){return this.subviews=[],this.$el.empty(),_.each(this.collection.models,function(e){this.add(e)},this),this}}),t.views.AdminSlide=Backbone.View.extend({tagName:"li",attributes:function(){return{role:"checkbox","class":"attachment save-ready",tabindex:"0","data-id":this.model.id}},template:wp.media.template("easingslider-slide"),initialize:function(){this.model.on("change",this._setData,this),this.model.on("change:id",this._updateID,this),this.model.on("change:url",this.render,this),this.model.on("change:attachment_id",this.render,this),this.model.attachment&&this.model.attachment.on("change",this.render,this)},_setData:function(){this.$('input[name="slides[]"]').val(JSON.stringify(this.model.attributes))},_updateID:function(e,t){this.$el.attr("data-id",t),this.attributes["data-id"]=t},render:function(){var e={model:this.model.toJSON()};return this.model.attachment&&(e.attachment=this.model.attachment.toJSON()),this.$el.html(this.template(e)),this}}),t.views.EditSlide={get:function(e){return new t.views.EditSlide[e.type](e)}},t.views.EditSlide.image=wp.media.view.ImageDetails.extend({className:"edit-attachment-frame attachment-details mode-select",template:wp.media.template("easingslider-edit-slide"),initialize:function(){wp.media.view.ImageDetails.prototype.initialize.apply(this,arguments),this.model.on("change:url",this._updateImage,this)},_updateImage:function(){this.$(".details-image").attr("src",this.model.get("url"))}}),t.router=Backbone.Router.extend({routes:{"admin.php?page=:page&edit=:id&change=:slide":"changeSlide","admin.php?page=:page&edit=:id&slide=:slide":"editSlide","admin.php?page=:page&edit=:id":"edit","admin.php?page=:page":"edit"},changeSlide:function(e,t,i){return this.edit(),this.AdminView.collection.on("sync:done",function(){this.AdminView.openChangeSlideFrame(i)},this),this},editSlide:function(e,t,i){return this.edit(),this.AdminView.collection.on("sync:done",function(){this.AdminView.openEditSlideFrame(i)},this),this},edit:function(){return window.slides?(this.AdminView=new t.views.Admin({collection:new t.collections.Slides(JSON.parse(window.slides))}),this.AdminView.collection.sync(),this):this}}),e(document).ready(function(){t.Router=new t.router,Backbone.history.start({root:window._wpMediaGridSettings.adminUrl,pushState:!0}),e(".delete").each(function(){e(this).on("click",function(){return confirm(_easingsliderEditorL10n.warn)?void 0:!1})})})}(jQuery);
js/jquery.easingslider.js CHANGED
@@ -1,459 +1,493 @@
1
  ;(function($) {
2
 
3
- /**
4
- * jQuery Slider
5
- */
6
- $.EasingSlider = function(el) {
7
 
8
- // Core variables
9
- var base = this,
10
- o;
11
 
12
- // Establish our elements
13
- base.el = el;
14
- base.$el = $(base.el);
15
- base.$slides = base.$el.find('.easingslider-slide');
16
- base.$arrows = base.$el.find('.easingslider-arrows');
17
- base.$next = base.$el.find('.easingslider-next');
18
- base.$prev = base.$el.find('.easingslider-prev');
19
- base.$pagination = base.$el.find('.easingslider-pagination');
20
- base.$icons = base.$el.find('.easingslider-icon');
21
- base.$preload = base.$el.find('.easingslider-preload');
22
 
23
- // Get the plugin options
24
- base.options = o = $.extend({}, $.EasingSlider.defaults, $.parseJSON(base.$el.attr('data-options')));
25
 
26
- // State variables
27
- base.current = 0;
28
- base.previous = 0;
29
- base.count = base.$slides.length;
30
- base.width = o.dimensions.width;
31
- base.height = o.dimensions.height;
32
 
33
- // Store our data
34
- base.$el.data('easingslider', base);
35
 
36
- /**
37
- * Constructor
38
- */
39
- base.initialize = function() {
40
 
41
- // Setup everything!
42
- base._setupArrows();
43
- base._setupPagination();
44
- base._setupPlayback();
45
 
46
- // Display slides
47
- base.$slides.css({ 'display': 'inline' });
48
 
49
- // Set the current slide
50
- base.$slides.eq(base.current).addClass('active');
51
 
52
- // Preload the slider
53
- base._preload();
 
 
54
 
55
- // Trigger event
56
- base.$el.trigger('init', base);
57
 
58
- return base;
 
59
 
60
- };
61
 
62
- /**
63
- * Sets up the "Arrow" navigation
64
- */
65
- base._setupArrows = function() {
66
 
67
- // "Next" & "Previous" arrow functionality
68
- base.$next.on('click', base.nextSlide);
69
- base.$prev.on('click', base.prevSlide);
 
70
 
71
- // Add hover toggle if enabled
72
- if ( o.navigation.arrows_hover ) {
73
- base.$arrows.addClass('has-hover');
74
- }
75
 
76
- // Show the arrows
77
- base.$arrows.css({ 'display': 'block' });
 
78
 
79
- return base;
 
 
 
80
 
81
- };
 
82
 
83
- /**
84
- * Sets up the "Pagination" navigation
85
- */
86
- base._setupPagination = function() {
87
 
88
- // Bind events
89
- base.$el.on('load', base._updatePagination);
90
- base.$el.on('transition.before', base._updatePagination);
91
 
92
- // Enable click event for each icon
93
- base.$icons.on('click', function() {
 
 
94
 
95
- // Get the next slide index and direction we are travelling
96
- var eq = $(this).index(),
97
- direction = (eq > base.current) ? 'forward' : 'backward';
 
98
 
99
- // Transition to the desired slide
100
- base.goToSlide(eq, direction);
 
101
 
102
- });
 
103
 
104
- // Add hover toggle if enabled
105
- if ( o.navigation.pagination_hover ) {
106
- base.$pagination.addClass('has-hover');
107
- }
108
 
109
- // Show the pagination
110
- base.$pagination.css({ 'display': 'block' });
111
 
112
- return base;
113
 
114
- };
 
 
 
115
 
116
- /**
117
- * Updates the active pagination icon
118
- */
119
- base._updatePagination = function() {
120
 
121
- // Bail if we don't have any pagination
122
- if ( ! o.navigation.pagination ) {
123
- return base;
124
- }
125
 
126
- // Update the active icon
127
- base.$icons.removeClass('active').eq(base.current).addClass('active');
128
 
129
- return base;
 
 
 
130
 
131
- };
 
 
 
132
 
133
- /**
134
- * Sets up the automatic playback
135
- */
136
- base._setupPlayback = function() {
137
 
138
- // Pause playback timer before the transition. It'll be reset after the transition has completed.
139
- base.$el.on('transition.before', function() {
140
- if ( o.playback.enabled ) {
141
- base.pausePlayback();
142
- }
143
- });
144
 
145
- // Once a transition has completed, restart playback, if enabled.
146
- base.$el.on('transition.after', function() {
147
- if ( o.playback.enabled ) {
148
- base.startPlayback();
149
- }
150
- });
151
 
152
- // Queue playback after the slider has loaded, if enabled.
153
- if ( o.playback.enabled ) {
154
- base.$el.on('load', base.startPlayback);
155
- }
156
 
157
- return base;
 
 
 
 
 
158
 
159
- };
 
 
 
 
 
160
 
161
- /**
162
- * Preloads the slider
163
- */
164
- base._preload = function() {
165
 
166
- // Preloaded slide count
167
- base._preloadCount = 0;
168
 
169
- // Loop through and preload each image slide. Doesn't stop on failure, just continues instead.
170
- base.$el.find('.easingslider-image').each(function(index, image) {
171
 
172
- /**
173
- * Create a virtual image element. We set its src after event handler is registered.
174
- * We have to do this to prevent IE bugs (it doesn't always fire the onload event if image are loaded (from cache) before the event is bound)
175
- */
176
- preloadImage = new Image();
177
 
178
- // Bind preload functions. Still continues if a preload fails
179
- preloadImage.onload = base._load;
180
- preloadImage.onerror = base._load;
181
 
182
- // Set image src attribute, thus preloading the image
183
- preloadImage.src = image.src;
184
 
185
- });
 
 
 
 
186
 
187
- };
 
 
188
 
189
- /**
190
- * Handles slide preloading
191
- */
192
- base._load = function() {
193
 
194
- // Increase preloaded count
195
- base._preloadCount++;
196
 
197
- // If all slides have been preloaded, hide the preloader and start the playback.
198
- if ( base._preloadCount == base.count ) {
199
- base.$preload.animate({ 'opacity': 0 }, {
200
- duration: 400,
201
- complete: function() {
202
 
203
- // Remove preloader
204
- $(this).remove();
 
 
205
 
206
- // Flag as loaded
207
- base.$el.addClass('has-loaded');
208
 
209
- // Trigger events
210
- base.$el.trigger('load', base);
211
 
212
- }
213
- });
214
- }
 
 
215
 
216
- },
 
217
 
218
- /**
219
- * Starts automatic playback
220
- */
221
- base.startPlayback = function() {
222
 
223
- // Alter the option
224
- o.playback.enabled = true;
225
 
226
- // Runtime variable
227
- base._runtime = new Date();
 
228
 
229
- // Get pause time
230
- base._pauseTime = o.playback.pause;
231
 
232
- // Start automatic playback
233
- base._playbackTimer = setTimeout(function() {
234
- base.nextSlide();
235
- }, base._pauseTime);
236
 
237
- // Trigger event
238
- base.$el.trigger('playback.start', base);
239
 
240
- return base;
 
241
 
242
- };
 
243
 
244
- /**
245
- * Ends automatic playback
246
- */
247
- base.endPlayback = function() {
248
 
249
- // Alter the option
250
- o.playback.enabled = false;
251
 
252
- // Clear playback timer
253
- clearTimeout(base._playbackTimer);
254
 
255
- // Trigger event
256
- base.$el.trigger('playback.end', base);
257
 
258
- return base;
 
 
 
259
 
260
- };
 
261
 
262
- /**
263
- * Pauses automatic playback
264
- */
265
- base.pausePlayback = function() {
266
 
267
- // Clear playback timer
268
- clearTimeout(base._playbackTimer);
269
 
270
- // Calculate runtime left
271
- base._runtime = Math.ceil(new Date() - base._runtime);
272
 
273
- // Trigger event
274
- base.$el.trigger('playback.pause', base);
275
 
276
- return base;
 
 
 
277
 
278
- };
 
279
 
280
- /**
281
- * Resumes automatic playback
282
- */
283
- base.resumePlayback = function() {
284
 
285
- // Calculate playback time remaining
286
- base._pauseTime = Math.ceil(base._pauseTime - base._runtime);
287
 
288
- // Reset runtime
289
- base._runtime = new Date();
290
 
291
- // Resume automatic playback
292
- base._playbackTimer = setTimeout(function() {
293
- base.nextSlide();
294
- }, base._pauseTime);
295
 
296
- // Trigger event
297
- base.$el.trigger('playback.resume', base);
 
 
298
 
299
- return base;
 
300
 
301
- };
 
302
 
303
- /**
304
- * Executes a transition
305
- */
306
- base._transition = function(eq, direction) {
307
 
308
- // Bail if specified slide doesn't exist
309
- if ( base.$slides.eq(eq).length == 0 ) {
310
- return base;
311
- }
312
 
313
- // Bail if animating already
314
- if ( base._animating ) {
315
- return base;
316
- }
317
 
318
- // Flag that we are transitioning
319
- base._animating = true;
320
 
321
- // Establish the next and previous slides
322
- base.previous = base.current;
323
- base.current = eq;
 
324
 
325
- // Add animation classes based on direction
326
- if ( 'backward' == direction ) {
327
- base.$slides.eq(base.previous).addClass('next-out');
328
- base.$slides.eq(base.current).addClass('prev-in');
329
- }
330
- else {
331
- base.$slides.eq(base.previous).addClass('prev-out');
332
- base.$slides.eq(base.current).addClass('next-in');
333
- }
334
 
335
- // After timeout, do some cleaning up.
336
- clearTimeout(base._cleanup);
337
- base._cleanup = setTimeout(function() {
 
338
 
339
- // Toggle the active slide
340
- base.$slides.eq(base.current).addClass('active');
341
- base.$slides.eq(base.previous).removeClass('active');
342
-
343
- // Remove all animation related classes
344
- base.$slides.removeClass('next-in next-out prev-in prev-out');
345
 
346
- // Flag that we are no longer animating
347
- base._animating = false;
 
348
 
349
- // Trigger event
350
- base.$el.trigger('transition.after', base, eq, direction);
 
 
 
 
 
 
 
 
 
 
351
 
352
- }, o.transitions.duration);
 
 
 
 
 
 
 
353
 
354
- // Trigger event
355
- base.$el.trigger('transition.before', base, eq, direction);
 
 
 
356
 
357
- return base;
 
 
358
 
359
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
360
 
361
- /**
362
- * Transitions to the next slide
363
- */
364
- base.nextSlide = function() {
365
-
366
- // Establish the next slide
367
- var eq = ( base.current == (base.count - 1) ) ? 0 : (base.current + 1);
368
-
369
- // Transition to the next slide
370
- base._transition(eq, 'forward');
371
-
372
- // Trigger event
373
- base.$el.trigger('transition.next', base, eq, 'forward');
374
-
375
- return base;
376
-
377
- };
378
-
379
- /**
380
- * Transitions to the previous slide
381
- */
382
- base.prevSlide = function() {
383
-
384
- // Establish the previous slide
385
- var eq = ( base.current == 0 ) ? (base.count - 1) : (base.current - 1);
386
-
387
- // Transition to the previous slide
388
- base._transition(eq, 'backward');
389
-
390
- // Trigger event
391
- base.$el.trigger('transition.prev', base, eq, 'backward');
392
-
393
- return base;
394
-
395
- };
396
-
397
- /**
398
- * Transitions to a specified slide
399
- */
400
- base.goToSlide = function(eq, direction) {
401
-
402
- // Transition to the specified slide
403
- this._transition(eq, direction);
404
-
405
- // Trigger event
406
- base.$el.trigger('transition.to', base, eq, direction);
407
-
408
- return base;
409
-
410
- };
411
-
412
- // Initialize the plugin
413
- base.initialize();
414
-
415
- };
416
-
417
- /**
418
- * Plugin defaults settings
419
- */
420
- $.EasingSlider.defaults = {
421
- dimensions: {
422
- width: 640,
423
- height: 400,
424
- responsive: true
425
- },
426
- transitions: {
427
- effect: 'fade',
428
- duration: 400
429
- },
430
- navigation: {
431
- arrows: true,
432
- arrows_hover: true,
433
- arrows_position: 'inside',
434
- pagination: true,
435
- pagination_hover: true,
436
- pagination_position: 'inside',
437
- pagination_location: 'bottom-center'
438
- },
439
- playback: {
440
- enabled: true,
441
- pause: 4000
442
- }
443
- };
444
-
445
- /**
446
- * Initiates slider(s)
447
- */
448
- $.fn.EasingSlider = function() {
449
- return this.each(function() {
450
- new $.EasingSlider(this);
451
- });
452
- };
453
-
454
- // Let's go!
455
- $(document).ready(function() {
456
- $('.easingslider').EasingSlider();
457
- });
458
 
459
  })(jQuery);
1
  ;(function($) {
2
 
3
+ /**
4
+ * jQuery Slider
5
+ */
6
+ $.EasingSlider = function(el) {
7
 
8
+ // Core variables
9
+ var base = this,
10
+ o;
11
 
12
+ // Establish our elements
13
+ base.el = el;
14
+ base.$el = $(base.el);
15
+ base.$slides = base.$el.find('.easingslider-slide');
16
+ base.$arrows = base.$el.find('.easingslider-arrows');
17
+ base.$next = base.$el.find('.easingslider-next');
18
+ base.$prev = base.$el.find('.easingslider-prev');
19
+ base.$pagination = base.$el.find('.easingslider-pagination');
20
+ base.$icons = base.$el.find('.easingslider-icon');
21
+ base.$preload = base.$el.find('.easingslider-preload');
22
 
23
+ // Get the plugin options
24
+ base.options = o = $.extend({}, $.EasingSlider.defaults, $.parseJSON(base.$el.attr('data-options')));
25
 
26
+ // State variables
27
+ base.current = 0;
28
+ base.previous = 0;
29
+ base.count = base.$slides.length;
30
+ base.width = o.dimensions.width;
31
+ base.height = o.dimensions.height;
32
 
33
+ // Store our data
34
+ base.$el.data('easingslider', base);
35
 
36
+ /**
37
+ * Constructor
38
+ */
39
+ base.initialize = function() {
40
 
41
+ // Determine click event
42
+ base._clickEvent = ( 'ontouchstart' in document.documentElement ) ? 'touchstart' : 'click';
 
 
43
 
44
+ // Hide all slides
45
+ base.$slides.css({ 'display': 'none' });
46
 
47
+ // Set the current slide
48
+ base.$slides.eq(base.current).css({ 'display': 'block' }).addClass('active');
49
 
50
+ // Setup other components
51
+ base._setupArrows();
52
+ base._setupPagination();
53
+ base._setupPlayback();
54
 
55
+ // Preload the slider
56
+ base._preload();
57
 
58
+ // Trigger event
59
+ base.$el.trigger('init', base);
60
 
61
+ return base;
62
 
63
+ };
 
 
 
64
 
65
+ /**
66
+ * Sets up the "Arrow" navigation
67
+ */
68
+ base._setupArrows = function() {
69
 
70
+ // Bail if arrows aren't enabled
71
+ if ( ! o.navigation.arrows ) {
72
+ return;
73
+ }
74
 
75
+ // "Next" & "Previous" arrow functionality
76
+ base.$next.on(base._clickEvent, base.nextSlide);
77
+ base.$prev.on(base._clickEvent, base.prevSlide);
78
 
79
+ // Add hover toggle if enabled
80
+ if ( o.navigation.arrows_hover ) {
81
+ base.$arrows.addClass('has-hover');
82
+ }
83
 
84
+ // Show the arrows
85
+ base.$arrows.css({ 'display': 'block' });
86
 
87
+ return base;
 
 
 
88
 
89
+ };
 
 
90
 
91
+ /**
92
+ * Sets up the "Pagination" navigation
93
+ */
94
+ base._setupPagination = function() {
95
 
96
+ // Bail if pagination isn't enabled
97
+ if ( ! o.navigation.pagination ) {
98
+ return;
99
+ }
100
 
101
+ // Bind events
102
+ base.$el.on('loaded', base._updatePagination);
103
+ base.$el.on('transition.before', base._updatePagination);
104
 
105
+ // Enable click event for each icon
106
+ base.$icons.on(base._clickEvent, function() {
107
 
108
+ // Get the next slide index and direction we are travelling
109
+ var eq = $(this).index(),
110
+ direction = (eq > base.current) ? 'forward' : 'backward';
 
111
 
112
+ // Transition to the desired slide
113
+ base.goToSlide(eq, direction);
114
 
115
+ });
116
 
117
+ // Add hover toggle if enabled
118
+ if ( o.navigation.pagination_hover ) {
119
+ base.$pagination.addClass('has-hover');
120
+ }
121
 
122
+ // Show the pagination
123
+ base.$pagination.css({ 'display': 'block' });
 
 
124
 
125
+ return base;
 
 
 
126
 
127
+ };
 
128
 
129
+ /**
130
+ * Updates the active pagination icon
131
+ */
132
+ base._updatePagination = function() {
133
 
134
+ // Bail if we don't have any pagination
135
+ if ( ! o.navigation.pagination ) {
136
+ return base;
137
+ }
138
 
139
+ // Update the active icon
140
+ base.$icons.removeClass('active').eq(base.current).addClass('active');
 
 
141
 
142
+ return base;
 
 
 
 
 
143
 
144
+ };
 
 
 
 
 
145
 
146
+ /**
147
+ * Sets up the automatic playback
148
+ */
149
+ base._setupPlayback = function() {
150
 
151
+ // Pause playback timer before the transition. It'll be reset after the transition has completed.
152
+ base.$el.on('transition.before', function() {
153
+ if ( o.playback.enabled ) {
154
+ base.pausePlayback();
155
+ }
156
+ });
157
 
158
+ // Once a transition has completed, restart playback, if enabled.
159
+ base.$el.on('transition.after', function() {
160
+ if ( o.playback.enabled ) {
161
+ base.startPlayback();
162
+ }
163
+ });
164
 
165
+ // Queue playback after the slider has loaded, if enabled.
166
+ if ( o.playback.enabled ) {
167
+ base.$el.on('loaded', base.startPlayback);
168
+ }
169
 
170
+ return base;
 
171
 
172
+ };
 
173
 
174
+ /**
175
+ * Preloads the slider
176
+ */
177
+ base._preload = function() {
 
178
 
179
+ // Preloaded slide count
180
+ base._preloadCount = 0;
 
181
 
182
+ // Loop through and preload each image slide. Doesn't stop on failure, just continues instead.
183
+ base.$el.find('.easingslider-image').each(function(index, image) {
184
 
185
+ /**
186
+ * Create a virtual image element. We set its src after event handler is registered.
187
+ * We have to do this to prevent IE bugs (it doesn't always fire the onload event if image are loaded (from cache) before the event is bound)
188
+ */
189
+ preloadImage = new Image();
190
 
191
+ // Bind preload functions. Still continues if a preload fails
192
+ preloadImage.onload = base._load;
193
+ preloadImage.onerror = base._load;
194
 
195
+ // Set image src attribute, thus preloading the image
196
+ preloadImage.src = image.src;
 
 
197
 
198
+ });
 
199
 
200
+ };
 
 
 
 
201
 
202
+ /**
203
+ * Handles slide preloading
204
+ */
205
+ base._load = function() {
206
 
207
+ // Increase preloaded count
208
+ base._preloadCount++;
209
 
210
+ // Get the total number of images
211
+ var total_images = base.$slides.find('.easingslider-image').length;
212
 
213
+ // If all slides have been preloaded, hide the preloader and start the playback.
214
+ if ( base._preloadCount == total_images ) {
215
+ base.$preload.animate({ 'opacity': 0 }, {
216
+ duration: 400,
217
+ complete: function() {
218
 
219
+ // Remove preloader
220
+ $(this).remove();
221
 
222
+ // Flag as loaded
223
+ base.$el.addClass('has-loaded');
 
 
224
 
225
+ // Trigger events
226
+ base.$el.trigger('loaded', base);
227
 
228
+ }
229
+ });
230
+ }
231
 
232
+ },
 
233
 
234
+ /**
235
+ * Starts automatic playback
236
+ */
237
+ base.startPlayback = function() {
238
 
239
+ // Alter the option
240
+ o.playback.enabled = true;
241
 
242
+ // Runtime variable
243
+ base._runtime = new Date();
244
 
245
+ // Get pause time
246
+ base._pauseTime = o.playback.pause;
247
 
248
+ // Start automatic playback
249
+ base._playbackTimer = setTimeout(function() {
250
+ base.nextSlide();
251
+ }, base._pauseTime);
252
 
253
+ // Trigger event
254
+ base.$el.trigger('playback.start', base);
255
 
256
+ return base;
 
257
 
258
+ };
 
259
 
260
+ /**
261
+ * Ends automatic playback
262
+ */
263
+ base.endPlayback = function() {
264
 
265
+ // Alter the option
266
+ o.playback.enabled = false;
267
 
268
+ // Clear playback timer
269
+ clearTimeout(base._playbackTimer);
 
 
270
 
271
+ // Trigger event
272
+ base.$el.trigger('playback.end', base);
273
 
274
+ return base;
 
275
 
276
+ };
 
277
 
278
+ /**
279
+ * Pauses automatic playback
280
+ */
281
+ base.pausePlayback = function() {
282
 
283
+ // Clear playback timer
284
+ clearTimeout(base._playbackTimer);
285
 
286
+ // Calculate runtime left
287
+ base._runtime = Math.ceil(new Date() - base._runtime);
 
 
288
 
289
+ // Trigger event
290
+ base.$el.trigger('playback.pause', base);
291
 
292
+ return base;
 
293
 
294
+ };
 
 
 
295
 
296
+ /**
297
+ * Resumes automatic playback
298
+ */
299
+ base.resumePlayback = function() {
300
 
301
+ // Calculate playback time remaining
302
+ base._pauseTime = Math.ceil(base._pauseTime - base._runtime);
303
 
304
+ // Reset runtime
305
+ base._runtime = new Date();
306
 
307
+ // Resume automatic playback
308
+ base._playbackTimer = setTimeout(function() {
309
+ base.nextSlide();
310
+ }, base._pauseTime);
311
 
312
+ // Trigger event
313
+ base.$el.trigger('playback.resume', base);
 
 
314
 
315
+ return base;
 
 
 
316
 
317
+ };
 
318
 
319
+ /**
320
+ * Executes a transition
321
+ */
322
+ base._transition = function(eq, direction) {
323
 
324
+ // Bail if specified slide doesn't exist
325
+ if ( base.$slides.eq(eq).length == 0 ) {
326
+ return base;
327
+ }
 
 
 
 
 
328
 
329
+ // Bail if animating already
330
+ if ( base._animating ) {
331
+ return base;
332
+ }
333
 
334
+ // Flag that we are transitioning
335
+ base._animating = true;
 
 
 
 
336
 
337
+ // Establish the next and previous slides
338
+ base.previous = base.current;
339
+ base.current = eq;
340
 
341
+ /**
342
+ * Add animation classes based on direction.
343
+ *
344
+ * Timeout functions are used here to avoid a bug in Safari.
345
+ * The animations won't work if we toggle the display property as we add the animation class,
346
+ * instead it would intermittently show/hide the slide.
347
+ *
348
+ * Using a timeout seems to negate this.
349
+ */
350
+ if ( 'backward' == direction ) {
351
+ base.$slides.eq(base.previous).css({ 'display': 'block' });
352
+ base.$slides.eq(base.current).css({ 'display': 'block' });
353
 
354
+ setTimeout(function() {
355
+ base.$slides.eq(base.previous).addClass('next-out');
356
+ base.$slides.eq(base.current).addClass('prev-in');
357
+ });
358
+ }
359
+ else {
360
+ base.$slides.eq(base.previous).css({ 'display': 'block' });
361
+ base.$slides.eq(base.current).css({ 'display': 'block' });
362
 
363
+ setTimeout(function() {
364
+ base.$slides.eq(base.previous).addClass('prev-out');
365
+ base.$slides.eq(base.current).addClass('next-in');
366
+ });
367
+ }
368
 
369
+ // After timeout, do some cleaning up.
370
+ clearTimeout(base._cleanup);
371
+ base._cleanup = setTimeout(function() {
372
 
373
+ // Toggle the active slide
374
+ base.$slides.eq(base.current).css({ 'display': 'block' }).addClass('active');
375
+ base.$slides.eq(base.previous).css({ 'display': 'none' }).removeClass('active');
376
+
377
+ // Remove all animation related classes
378
+ base.$slides.removeClass('next-in next-out prev-in prev-out');
379
+
380
+ // Flag that we are no longer animating
381
+ base._animating = false;
382
+
383
+ // Trigger event
384
+ base.$el.trigger('transition.after', base, eq, direction);
385
+
386
+ }, o.transitions.duration);
387
+
388
+ // Trigger event
389
+ base.$el.trigger('transition.before', base, eq, direction);
390
+
391
+ return base;
392
+
393
+ };
394
+
395
+ /**
396
+ * Transitions to the next slide
397
+ */
398
+ base.nextSlide = function() {
399
+
400
+ // Establish the next slide
401
+ var eq = ( base.current == (base.count - 1) ) ? 0 : (base.current + 1);
402
+
403
+ // Transition to the next slide
404
+ base._transition(eq, 'forward');
405
+
406
+ // Trigger event
407
+ base.$el.trigger('transition.next', base, eq, 'forward');
408
+
409
+ return base;
410
+
411
+ };
412
+
413
+ /**
414
+ * Transitions to the previous slide
415
+ */
416
+ base.prevSlide = function() {
417
+
418
+ // Establish the previous slide
419
+ var eq = ( base.current == 0 ) ? (base.count - 1) : (base.current - 1);
420
+
421
+ // Transition to the previous slide
422
+ base._transition(eq, 'backward');
423
+
424
+ // Trigger event
425
+ base.$el.trigger('transition.prev', base, eq, 'backward');
426
+
427
+ return base;
428
+
429
+ };
430
+
431
+ /**
432
+ * Transitions to a specified slide
433
+ */
434
+ base.goToSlide = function(eq, direction) {
435
+
436
+ // Transition to the specified slide
437
+ this._transition(eq, direction);
438
+
439
+ // Trigger event
440
+ base.$el.trigger('transition.to', base, eq, direction);
441
+
442
+ return base;
443
+
444
+ };
445
+
446
+ // Initialize the plugin
447
+ base.initialize();
448
+
449
+ };
450
+
451
+ /**
452
+ * Plugin defaults settings
453
+ */
454
+ $.EasingSlider.defaults = {
455
+ dimensions: {
456
+ width: 640,
457
+ height: 400,
458
+ responsive: true
459
+ },
460
+ transitions: {
461
+ effect: 'fade',
462
+ duration: 400
463
+ },
464
+ navigation: {
465
+ arrows: true,
466
+ arrows_hover: true,
467
+ arrows_position: 'inside',
468
+ pagination: true,
469
+ pagination_hover: true,
470
+ pagination_position: 'inside',
471
+ pagination_location: 'bottom-center'
472
+ },
473
+ playback: {
474
+ enabled: true,
475
+ pause: 4000
476
+ }
477
+ };
478
 
479
+ /**
480
+ * Initiates slider(s)
481
+ */
482
+ $.fn.EasingSlider = function() {
483
+ return this.each(function() {
484
+ new $.EasingSlider(this);
485
+ });
486
+ };
487
+
488
+ // Let's go!
489
+ $(document).ready(function() {
490
+ $('.easingslider').EasingSlider();
491
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
492
 
493
  })(jQuery);
js/jquery.easingslider.min.js CHANGED
@@ -1 +1 @@
1
- (function(e){e.EasingSlider=function(t){var n=this,r;n.el=t;n.$el=e(n.el);n.$slides=n.$el.find(".easingslider-slide");n.$arrows=n.$el.find(".easingslider-arrows");n.$next=n.$el.find(".easingslider-next");n.$prev=n.$el.find(".easingslider-prev");n.$pagination=n.$el.find(".easingslider-pagination");n.$icons=n.$el.find(".easingslider-icon");n.$preload=n.$el.find(".easingslider-preload");n.options=r=e.extend({},e.EasingSlider.defaults,e.parseJSON(n.$el.attr("data-options")));n.current=0;n.previous=0;n.count=n.$slides.length;n.width=r.dimensions.width;n.height=r.dimensions.height;n.$el.data("easingslider",n);n.initialize=function(){n._setupArrows();n._setupPagination();n._setupPlayback();n.$slides.css({display:"inline"});n.$slides.eq(n.current).addClass("active");n._preload();n.$el.trigger("init",n);return n};n._setupArrows=function(){n.$next.on("click",n.nextSlide);n.$prev.on("click",n.prevSlide);if(r.navigation.arrows_hover){n.$arrows.addClass("has-hover")}n.$arrows.css({display:"block"});return n};n._setupPagination=function(){n.$el.on("load",n._updatePagination);n.$el.on("transition.before",n._updatePagination);n.$icons.on("click",function(){var t=e(this).index(),r=t>n.current?"forward":"backward";n.goToSlide(t,r)});if(r.navigation.pagination_hover){n.$pagination.addClass("has-hover")}n.$pagination.css({display:"block"});return n};n._updatePagination=function(){if(!r.navigation.pagination){return n}n.$icons.removeClass("active").eq(n.current).addClass("active");return n};n._setupPlayback=function(){n.$el.on("transition.before",function(){if(r.playback.enabled){n.pausePlayback()}});n.$el.on("transition.after",function(){if(r.playback.enabled){n.startPlayback()}});if(r.playback.enabled){n.$el.on("load",n.startPlayback)}return n};n._preload=function(){n._preloadCount=0;n.$el.find(".easingslider-image").each(function(e,t){preloadImage=new Image;preloadImage.onload=n._load;preloadImage.onerror=n._load;preloadImage.src=t.src})};n._load=function(){n._preloadCount++;if(n._preloadCount==n.count){n.$preload.animate({opacity:0},{duration:400,complete:function(){e(this).remove();n.$el.addClass("has-loaded");n.$el.trigger("load",n)}})}},n.startPlayback=function(){r.playback.enabled=true;n._runtime=new Date;n._pauseTime=r.playback.pause;n._playbackTimer=setTimeout(function(){n.nextSlide()},n._pauseTime);n.$el.trigger("playback.start",n);return n};n.endPlayback=function(){r.playback.enabled=false;clearTimeout(n._playbackTimer);n.$el.trigger("playback.end",n);return n};n.pausePlayback=function(){clearTimeout(n._playbackTimer);n._runtime=Math.ceil(new Date-n._runtime);n.$el.trigger("playback.pause",n);return n};n.resumePlayback=function(){n._pauseTime=Math.ceil(n._pauseTime-n._runtime);n._runtime=new Date;n._playbackTimer=setTimeout(function(){n.nextSlide()},n._pauseTime);n.$el.trigger("playback.resume",n);return n};n._transition=function(e,t){if(n.$slides.eq(e).length==0){return n}if(n._animating){return n}n._animating=true;n.previous=n.current;n.current=e;if("backward"==t){n.$slides.eq(n.previous).addClass("next-out");n.$slides.eq(n.current).addClass("prev-in")}else{n.$slides.eq(n.previous).addClass("prev-out");n.$slides.eq(n.current).addClass("next-in")}clearTimeout(n._cleanup);n._cleanup=setTimeout(function(){n.$slides.eq(n.current).addClass("active");n.$slides.eq(n.previous).removeClass("active");n.$slides.removeClass("next-in next-out prev-in prev-out");n._animating=false;n.$el.trigger("transition.after",n,e,t)},r.transitions.duration);n.$el.trigger("transition.before",n,e,t);return n};n.nextSlide=function(){var e=n.current==n.count-1?0:n.current+1;n._transition(e,"forward");n.$el.trigger("transition.next",n,e,"forward");return n};n.prevSlide=function(){var e=n.current==0?n.count-1:n.current-1;n._transition(e,"backward");n.$el.trigger("transition.prev",n,e,"backward");return n};n.goToSlide=function(e,t){this._transition(e,t);n.$el.trigger("transition.to",n,e,t);return n};n.initialize()};e.EasingSlider.defaults={dimensions:{width:640,height:400,responsive:true},transitions:{effect:"fade",duration:400},navigation:{arrows:true,arrows_hover:true,arrows_position:"inside",pagination:true,pagination_hover:true,pagination_position:"inside",pagination_location:"bottom-center"},playback:{enabled:true,pause:4e3}};e.fn.EasingSlider=function(){return this.each(function(){new e.EasingSlider(this)})};e(document).ready(function(){e(".easingslider").EasingSlider()})})(jQuery)
1
+ (function(e){e.EasingSlider=function(t){var n=this,r;n.el=t;n.$el=e(n.el);n.$slides=n.$el.find(".easingslider-slide");n.$arrows=n.$el.find(".easingslider-arrows");n.$next=n.$el.find(".easingslider-next");n.$prev=n.$el.find(".easingslider-prev");n.$pagination=n.$el.find(".easingslider-pagination");n.$icons=n.$el.find(".easingslider-icon");n.$preload=n.$el.find(".easingslider-preload");n.options=r=e.extend({},e.EasingSlider.defaults,e.parseJSON(n.$el.attr("data-options")));n.current=0;n.previous=0;n.count=n.$slides.length;n.width=r.dimensions.width;n.height=r.dimensions.height;n.$el.data("easingslider",n);n.initialize=function(){n._clickEvent="ontouchstart"in document.documentElement?"touchstart":"click";n.$slides.css({display:"none"});n.$slides.eq(n.current).css({display:"block"}).addClass("active");n._setupArrows();n._setupPagination();n._setupPlayback();n._preload();n.$el.trigger("init",n);return n};n._setupArrows=function(){if(!r.navigation.arrows){return}n.$next.on(n._clickEvent,n.nextSlide);n.$prev.on(n._clickEvent,n.prevSlide);if(r.navigation.arrows_hover){n.$arrows.addClass("has-hover")}n.$arrows.css({display:"block"});return n};n._setupPagination=function(){if(!r.navigation.pagination){return}n.$el.on("loaded",n._updatePagination);n.$el.on("transition.before",n._updatePagination);n.$icons.on(n._clickEvent,function(){var t=e(this).index(),r=t>n.current?"forward":"backward";n.goToSlide(t,r)});if(r.navigation.pagination_hover){n.$pagination.addClass("has-hover")}n.$pagination.css({display:"block"});return n};n._updatePagination=function(){if(!r.navigation.pagination){return n}n.$icons.removeClass("active").eq(n.current).addClass("active");return n};n._setupPlayback=function(){n.$el.on("transition.before",function(){if(r.playback.enabled){n.pausePlayback()}});n.$el.on("transition.after",function(){if(r.playback.enabled){n.startPlayback()}});if(r.playback.enabled){n.$el.on("loaded",n.startPlayback)}return n};n._preload=function(){n._preloadCount=0;n.$el.find(".easingslider-image").each(function(e,t){preloadImage=new Image;preloadImage.onload=n._load;preloadImage.onerror=n._load;preloadImage.src=t.src})};n._load=function(){n._preloadCount++;var t=n.$slides.find(".easingslider-image").length;if(n._preloadCount==t){n.$preload.animate({opacity:0},{duration:400,complete:function(){e(this).remove();n.$el.addClass("has-loaded");n.$el.trigger("loaded",n)}})}},n.startPlayback=function(){r.playback.enabled=true;n._runtime=new Date;n._pauseTime=r.playback.pause;n._playbackTimer=setTimeout(function(){n.nextSlide()},n._pauseTime);n.$el.trigger("playback.start",n);return n};n.endPlayback=function(){r.playback.enabled=false;clearTimeout(n._playbackTimer);n.$el.trigger("playback.end",n);return n};n.pausePlayback=function(){clearTimeout(n._playbackTimer);n._runtime=Math.ceil(new Date-n._runtime);n.$el.trigger("playback.pause",n);return n};n.resumePlayback=function(){n._pauseTime=Math.ceil(n._pauseTime-n._runtime);n._runtime=new Date;n._playbackTimer=setTimeout(function(){n.nextSlide()},n._pauseTime);n.$el.trigger("playback.resume",n);return n};n._transition=function(e,t){if(n.$slides.eq(e).length==0){return n}if(n._animating){return n}n._animating=true;n.previous=n.current;n.current=e;if("backward"==t){n.$slides.eq(n.previous).css({display:"block"});n.$slides.eq(n.current).css({display:"block"});setTimeout(function(){n.$slides.eq(n.previous).addClass("next-out");n.$slides.eq(n.current).addClass("prev-in")})}else{n.$slides.eq(n.previous).css({display:"block"});n.$slides.eq(n.current).css({display:"block"});setTimeout(function(){n.$slides.eq(n.previous).addClass("prev-out");n.$slides.eq(n.current).addClass("next-in")})}clearTimeout(n._cleanup);n._cleanup=setTimeout(function(){n.$slides.eq(n.current).css({display:"block"}).addClass("active");n.$slides.eq(n.previous).css({display:"none"}).removeClass("active");n.$slides.removeClass("next-in next-out prev-in prev-out");n._animating=false;n.$el.trigger("transition.after",n,e,t)},r.transitions.duration);n.$el.trigger("transition.before",n,e,t);return n};n.nextSlide=function(){var e=n.current==n.count-1?0:n.current+1;n._transition(e,"forward");n.$el.trigger("transition.next",n,e,"forward");return n};n.prevSlide=function(){var e=n.current==0?n.count-1:n.current-1;n._transition(e,"backward");n.$el.trigger("transition.prev",n,e,"backward");return n};n.goToSlide=function(e,t){this._transition(e,t);n.$el.trigger("transition.to",n,e,t);return n};n.initialize()};e.EasingSlider.defaults={dimensions:{width:640,height:400,responsive:true},transitions:{effect:"fade",duration:400},navigation:{arrows:true,arrows_hover:true,arrows_position:"inside",pagination:true,pagination_hover:true,pagination_position:"inside",pagination_location:"bottom-center"},playback:{enabled:true,pause:4e3}};e.fn.EasingSlider=function(){return this.each(function(){new e.EasingSlider(this)})};e(document).ready(function(){e(".easingslider").EasingSlider()})})(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: 4.0
6
  Tested up to: 4.2
7
- Stable tag: 2.2.0.6
8
 
9
  Easing Slider is an easy to use slider plugin. Simple and lightweight, is makes creating beautiful WordPress sliders a breeze.
10
 
@@ -22,7 +22,7 @@ Easing Slider is an extremely easy to use slider plugin for WordPress. It is bui
22
  * Dozens of extensions that greatly enhance plugin functionality
23
  * Lots of actions & filters for custom functionality
24
 
25
- <a href="http://easingslider.com/extensions">Easing Slider has many great extensions that can vastly enhance the plugin's functionality. Click here for more.</a>
26
 
27
  Throughly tested on iPhone, iPad and multiple Android devices, Easing Slider is the perfect solution for mobile sliders. We've used CSS3 animation to ensure ultra smooth transitions on supported devices, with graceful fallbacks for older browsers.
28
 
@@ -30,6 +30,8 @@ We've also integrated the new WordPress Media Library workflow to provide a bett
30
 
31
  Last but not least, we've left plenty of opportunity for custom plugin modifications using the WordPress Action & Filter APIs. You can completely create your own external functionality, or purchase <a href="http://easingslider.com/extensions">one of our extensions</a> to avail of pre-built additional features.
32
 
 
 
33
  == Installation ==
34
 
35
  = Display a slider =
@@ -73,6 +75,17 @@ This is easy. When editing a slider in the "All Sliders" admin area, simply clic
73
 
74
  == Changelog ==
75
 
 
 
 
 
 
 
 
 
 
 
 
76
  = 2.2.0.6 =
77
  * Fixed z-index bug with dropdown menus in multiple themes.
78
  * Update manager is now fully working and querying extension updates correctly.
4
  Tags: slideshow, slider, slides, slide, gallery, images, image, responsive, mobile, jquery, javascript, featured, content
5
  Requires at least: 4.0
6
  Tested up to: 4.2
7
+ Stable tag: 2.2.0.7
8
 
9
  Easing Slider is an easy to use slider plugin. Simple and lightweight, is makes creating beautiful WordPress sliders a breeze.
10
 
22
  * Dozens of extensions that greatly enhance plugin functionality
23
  * Lots of actions & filters for custom functionality
24
 
25
+ <strong>Easing Slider has many great extensions that can vastly enhance the plugin's functionality. <a href="http://easingslider.com/extensions">Browse them all here</a>.</strong>
26
 
27
  Throughly tested on iPhone, iPad and multiple Android devices, Easing Slider is the perfect solution for mobile sliders. We've used CSS3 animation to ensure ultra smooth transitions on supported devices, with graceful fallbacks for older browsers.
28
 
30
 
31
  Last but not least, we've left plenty of opportunity for custom plugin modifications using the WordPress Action & Filter APIs. You can completely create your own external functionality, or purchase <a href="http://easingslider.com/extensions">one of our extensions</a> to avail of pre-built additional features.
32
 
33
+ <strong>Follow & contribute to this plugin on <a href="https://github.com/easingslider/easing-slider">Github</a>.</strong>
34
+
35
  == Installation ==
36
 
37
  = Display a slider =
75
 
76
  == Changelog ==
77
 
78
+ = 2.2.0.7 =
79
+ * General improvements to cater for alternative slide types, such as videos or URL images.
80
+ * Fixed a bug (related to above improvement) that would prevent slider from loading when slide didn't contain an image.
81
+ * Fixed bug causing isolated jQuery errors when attempting to setup navigation elements that were disabled.
82
+ * Transparent PNGs now play nicely.
83
+ * Fixed some $_GET input validation security issues.
84
+ * Improvded support for touch devices.
85
+ * Added post type variable to slider object, allowing future extensions more flexibility.
86
+ * Added support for HiDPI devices.
87
+ * Fixed conflict with MooTools.
88
+
89
  = 2.2.0.6 =
90
  * Fixed z-index bug with dropdown menus in multiple themes.
91
  * Update manager is now fully working and querying extension updates correctly.