Version Description
- Readded support for opening slide links in a new window/tab.
- Added proper extension descriptions to "Extensions" panel.
- Prepared plugin for video slide support.
- Improved some actions and filters to better facilitate developers and other extensions.
- Fixed issue where blank shadow image would display is shadow was enabled but no image was set.
- Fixed issue that limited attachments query to 40 images only.
- Fixed various bugs experienced by users.
Download this release
Release Info
Developer | MatthewRuddy |
Plugin | Easing Slider |
Version | 2.2.0.8 |
Comparing to | |
See all releases |
Code changes from version 2.2.0.7 to 2.2.0.8
- backbone/edit-slide.php +6 -1
- backbone/slide.php +1 -1
- css/easingslider.css +49 -2
- css/easingslider.min.css +1 -1
- css/editor-pages.css +63 -8
- css/editor-pages.min.css +1 -1
- easing-slider.php +2 -2
- images/nav-play.png +0 -0
- images/nav-play@2x.png +0 -0
- includes/class-es-customizations.php +11 -6
- includes/class-es-editor-pages.php +3 -2
- includes/class-es-extensions-page.php +30 -12
- includes/class-es-legacy.php +49 -45
- includes/class-es-slider.php +8 -8
- includes/class-es-sliders-list-table.php +5 -0
- js/editor-pages.js +97 -12
- js/editor-pages.min.js +1 -1
- js/jquery.easingslider.js +45 -27
- js/jquery.easingslider.min.js +1 -1
- partials/edit-slider_sidebar.php +2 -2
- readme.txt +10 -1
backbone/edit-slide.php
CHANGED
@@ -56,7 +56,12 @@
|
|
56 |
</option>
|
57 |
<# } #>
|
58 |
</select>
|
59 |
-
<
|
|
|
|
|
|
|
|
|
|
|
60 |
</label>
|
61 |
|
62 |
<?php
|
56 |
</option>
|
57 |
<# } #>
|
58 |
</select>
|
59 |
+
<div class="link-options">
|
60 |
+
<input type="text" class="link-to-custom" data-setting="linkUrl" />
|
61 |
+
<label>
|
62 |
+
<input type="checkbox" data-setting="linkTargetBlank" value="_blank" <# if ( data.model.linkTargetBlank ) { #>checked="checked"<# } #>><?php _e( 'Open link in a new window/tab', 'easingslider' ); ?>
|
63 |
+
</label>
|
64 |
+
</div>
|
65 |
</label>
|
66 |
|
67 |
<?php
|
backbone/slide.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<script type="text/html" id="tmpl-easingslider-slide">
|
2 |
-
<div class="attachment-preview js--select-attachment">
|
3 |
<div class="toolbar">
|
4 |
<i class="dashicons dashicons-edit edit"></i>
|
5 |
<i class="dashicons dashicons-no-alt remove"></i>
|
1 |
<script type="text/html" id="tmpl-easingslider-slide">
|
2 |
+
<div class="attachment-preview {{ data.model.type }}-slide js--select-attachment">
|
3 |
<div class="toolbar">
|
4 |
<i class="dashicons dashicons-edit edit"></i>
|
5 |
<i class="dashicons dashicons-no-alt remove"></i>
|
css/easingslider.css
CHANGED
@@ -70,9 +70,22 @@
|
|
70 |
z-index: 30 !important;
|
71 |
}
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
.easingslider-image {
|
74 |
-
height: auto;
|
75 |
-
width:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
}
|
77 |
|
78 |
.easingslider .easingslider-arrows.has-hover,
|
@@ -85,6 +98,35 @@
|
|
85 |
opacity: 1;
|
86 |
}
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
/* Arrows
|
89 |
-------------------------------------------------------------- */
|
90 |
.easingslider-arrows {
|
@@ -593,6 +635,11 @@ only screen and ( min-resolution: 2dppx) {
|
|
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;
|
70 |
z-index: 30 !important;
|
71 |
}
|
72 |
|
73 |
+
.easingslider-link {
|
74 |
+
position: relative !important;
|
75 |
+
display: block !important;
|
76 |
+
height: 100% !important;
|
77 |
+
}
|
78 |
+
|
79 |
.easingslider-image {
|
80 |
+
max-height: auto !important;
|
81 |
+
max-width: auto !important;
|
82 |
+
height: auto !important;
|
83 |
+
width: 100% !important;
|
84 |
+
position: absolute;
|
85 |
+
top: 0;
|
86 |
+
left: 0;
|
87 |
+
bottom: 0;
|
88 |
+
right: 0;
|
89 |
}
|
90 |
|
91 |
.easingslider .easingslider-arrows.has-hover,
|
98 |
opacity: 1;
|
99 |
}
|
100 |
|
101 |
+
/* Play
|
102 |
+
-------------------------------------------------------------- */
|
103 |
+
.easingslider-play {
|
104 |
+
position: absolute;
|
105 |
+
top: 0;
|
106 |
+
right: 0;
|
107 |
+
bottom: 0;
|
108 |
+
left: 0;
|
109 |
+
background-image: url(../images/nav-play.png);
|
110 |
+
background-repeat: no-repeat;
|
111 |
+
background-position: center center;
|
112 |
+
background-color: transparent;
|
113 |
+
z-index: 50;
|
114 |
+
opacity: 0;
|
115 |
+
-webkit-transition: opacity 0.1s ease-in;
|
116 |
+
-moz-transition: opacity 0.1s ease-in;
|
117 |
+
-ms-transition: opacity 0.1s ease-in;
|
118 |
+
-o-transition: opacity 0.1s ease-in;
|
119 |
+
transition: opacity 0.1s ease-in;
|
120 |
+
}
|
121 |
+
|
122 |
+
.easingslider-slide.active .easingslider-play {
|
123 |
+
opacity: 0.5;
|
124 |
+
}
|
125 |
+
|
126 |
+
.easingslider-slide.active .easingslider-play:hover {
|
127 |
+
opacity: 1;
|
128 |
+
}
|
129 |
+
|
130 |
/* Arrows
|
131 |
-------------------------------------------------------------- */
|
132 |
.easingslider-arrows {
|
635 |
background-size: 24px 24px;
|
636 |
}
|
637 |
|
638 |
+
.easingslider-play {
|
639 |
+
background-image: url(../images/nav-play@2x.png);
|
640 |
+
background-size: 40px 40px;
|
641 |
+
}
|
642 |
+
|
643 |
.easingslider-arrows.easingslider-next {
|
644 |
background-image: url(../images/nav-arrow-next@2x.png);
|
645 |
background-size: 30px 30px;
|
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-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}}
|
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-link{position:relative!important;display:block!important;height:100%!important}.easingslider-image{max-height:auto!important;max-width:auto!important;height:auto!important;width:100%!important;position:absolute;top:0;left:0;bottom:0;right:0}.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-play{position:absolute;top:0;right:0;bottom:0;left:0;background-image:url(../images/nav-play.png);background-repeat:no-repeat;background-position:center center;background-color:transparent;z-index:50;opacity:0;-webkit-transition:opacity .1s ease-in;-moz-transition:opacity .1s ease-in;-ms-transition:opacity .1s ease-in;-o-transition:opacity .1s ease-in;transition:opacity .1s ease-in}.easingslider-slide.active .easingslider-play{opacity:.5}.easingslider-slide.active .easingslider-play: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-play{background-image:url(../images/nav-play@2x.png);background-size:40px 40px}.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
@@ -28,25 +28,50 @@
|
|
28 |
max-width: 60%;
|
29 |
}
|
30 |
|
|
|
|
|
|
|
|
|
|
|
31 |
.image-details .media-modal {
|
32 |
left: 30px !important;
|
33 |
right: 30px !important;
|
34 |
}
|
35 |
|
36 |
-
.
|
37 |
-
width: 100%;
|
38 |
-
max-width: 700px;
|
39 |
-
}
|
40 |
-
|
41 |
-
.image-details .settings {
|
42 |
border-bottom-width: 0 !important;
|
43 |
}
|
44 |
|
45 |
-
.
|
46 |
margin: 10px 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
}
|
48 |
|
49 |
-
.
|
50 |
border-top-width: 0;
|
51 |
padding-top: 0;
|
52 |
}
|
@@ -309,9 +334,39 @@
|
|
309 |
opacity: 1;
|
310 |
}
|
311 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
312 |
@media only screen and (max-width: 640px), screen and (max-height: 400px) {
|
313 |
.image-details .media-modal {
|
314 |
left: 0 !important;
|
315 |
right: 0 !important;
|
316 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
317 |
}
|
28 |
max-width: 60%;
|
29 |
}
|
30 |
|
31 |
+
.thumbnail .action .details-url {
|
32 |
+
width: 100%;
|
33 |
+
max-width: 700px;
|
34 |
+
}
|
35 |
+
|
36 |
.image-details .media-modal {
|
37 |
left: 30px !important;
|
38 |
right: 30px !important;
|
39 |
}
|
40 |
|
41 |
+
.attachment-info .settings {
|
|
|
|
|
|
|
|
|
|
|
42 |
border-bottom-width: 0 !important;
|
43 |
}
|
44 |
|
45 |
+
.attachment-info .settings h3 {
|
46 |
margin: 10px 0;
|
47 |
+
position: relative;
|
48 |
+
font-weight: bold;
|
49 |
+
text-transform: uppercase;
|
50 |
+
font-size: 12px;
|
51 |
+
color: #666;
|
52 |
+
}
|
53 |
+
|
54 |
+
.attachment-info .setting .link-options {
|
55 |
+
width: 65%;
|
56 |
+
float: right;
|
57 |
+
margin: 1px;
|
58 |
+
}
|
59 |
+
|
60 |
+
.attachment-info .setting .link-options input[type="text"] {
|
61 |
+
width: 98%;
|
62 |
+
float: none;
|
63 |
+
margin: 5px 0 0 0;
|
64 |
+
}
|
65 |
+
|
66 |
+
.attachment-info .setting .link-options label {
|
67 |
+
margin-top: 5px;
|
68 |
+
}
|
69 |
+
|
70 |
+
.attachment-info .setting .link-options input[type="checkbox"] {
|
71 |
+
margin: -1px 5px 0 0 !important;
|
72 |
}
|
73 |
|
74 |
+
.attachment-info .column-settings h3.no-border {
|
75 |
border-top-width: 0;
|
76 |
padding-top: 0;
|
77 |
}
|
334 |
opacity: 1;
|
335 |
}
|
336 |
|
337 |
+
@media only screen and (max-width: 900px) {
|
338 |
+
.attachment-info .setting .link-options {
|
339 |
+
width: 100%;
|
340 |
+
float: none;
|
341 |
+
}
|
342 |
+
}
|
343 |
+
|
344 |
@media only screen and (max-width: 640px), screen and (max-height: 400px) {
|
345 |
.image-details .media-modal {
|
346 |
left: 0 !important;
|
347 |
right: 0 !important;
|
348 |
}
|
349 |
+
|
350 |
+
.image-details .media-modal select,
|
351 |
+
.image-details .media-modal textarea,
|
352 |
+
.image-details .media-modal input[type="url"],
|
353 |
+
.image-details .media-modal input[type="text"] {
|
354 |
+
font-size: 16px;
|
355 |
+
padding: 6px 10px;
|
356 |
+
}
|
357 |
+
|
358 |
+
.attachment-info .media-modal {
|
359 |
+
left: 0 !important;
|
360 |
+
right: 0 !important;
|
361 |
+
}
|
362 |
+
|
363 |
+
.attachment-info .setting .link-options {
|
364 |
+
width: 100%;
|
365 |
+
float: none;
|
366 |
+
margin: 1px;
|
367 |
+
}
|
368 |
+
|
369 |
+
.attachment-info .setting .link-options label {
|
370 |
+
margin-top: 8px;
|
371 |
+
}
|
372 |
}
|
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}.
|
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%}.thumbnail .action .details-url{width:100%;max-width:700px}.image-details .media-modal{left:30px!important;right:30px!important}.attachment-info .settings{border-bottom-width:0!important}.attachment-info .settings h3{margin:10px 0;position:relative;font-weight:700;text-transform:uppercase;font-size:12px;color:#666}.attachment-info .setting .link-options{width:65%;float:right;margin:1px}.attachment-info .setting .link-options input[type=text]{width:98%;float:none;margin:5px 0 0}.attachment-info .setting .link-options label{margin-top:5px}.attachment-info .setting .link-options input[type=checkbox]{margin:-1px 5px 0 0!important}.attachment-info .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:900px){.attachment-info .setting .link-options{width:100%;float:none}}@media only screen and (max-width:640px),screen and (max-height:400px){.image-details .media-modal{left:0!important;right:0!important}.image-details .media-modal input[type=text],.image-details .media-modal input[type=url],.image-details .media-modal select,.image-details .media-modal textarea{font-size:16px;padding:6px 10px}.attachment-info .media-modal{left:0!important;right:0!important}.attachment-info .setting .link-options{width:100%;float:none;margin:1px}.attachment-info .setting .link-options label{margin-top:8px}}
|
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.
|
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.
|
57 |
|
58 |
/**
|
59 |
* Our plugin file
|
3 |
/*
|
4 |
Plugin Name: Easing Slider
|
5 |
Plugin URI: http://easingslider.com/
|
6 |
+
Version: 2.2.0.8
|
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.8';
|
57 |
|
58 |
/**
|
59 |
* Our plugin file
|
images/nav-play.png
ADDED
Binary file
|
images/nav-play@2x.png
ADDED
Binary file
|
includes/class-es-customizations.php
CHANGED
@@ -93,8 +93,10 @@ class ES_Customizations {
|
|
93 |
$html .= "width: {$customizations->arrows->width}px; ";
|
94 |
}
|
95 |
if ( $defaults->arrows->height != $customizations->arrows->height ) {
|
|
|
|
|
96 |
$html .= "height: {$customizations->arrows->height}px; ";
|
97 |
-
$html .= "margin-top: {
|
98 |
}
|
99 |
$html .= "}";
|
100 |
|
@@ -165,7 +167,7 @@ class ES_Customizations {
|
|
165 |
}
|
166 |
|
167 |
// Drop Shadow (if enabled)
|
168 |
-
if ( $customizations->shadow->enabled ) {
|
169 |
$html .= ".easingslider-shadow-{$slider->ID} { ";
|
170 |
|
171 |
// Make responsive or fixed
|
@@ -197,6 +199,9 @@ class ES_Customizations {
|
|
197 |
*/
|
198 |
public function drop_shadow( $html, $slider ) {
|
199 |
|
|
|
|
|
|
|
200 |
/**
|
201 |
* If we are on the "customizer" page, we always want to render the shadow.
|
202 |
* This allow us to toggle it with our live preview. Can't be achieved as easily otherwise.
|
@@ -206,8 +211,8 @@ class ES_Customizations {
|
|
206 |
if ( isset( $_GET['page'] ) && 'easingslider_manage_customizations' == $_GET['page'] ) {
|
207 |
|
208 |
// No need for this if the shadow is already enabled
|
209 |
-
if ( ! $
|
210 |
-
$
|
211 |
|
212 |
// Add the HTML
|
213 |
$html .= "<style type=\"text/css\">";
|
@@ -229,9 +234,9 @@ class ES_Customizations {
|
|
229 |
}
|
230 |
|
231 |
// Render the shadow if enabled
|
232 |
-
if ( $
|
233 |
$html .= "<div class=\"easingslider-shadow easingslider-shadow-{$slider->ID}\">";
|
234 |
-
$html .= "<img src=\"{$
|
235 |
$html .= "</div>";
|
236 |
}
|
237 |
|
93 |
$html .= "width: {$customizations->arrows->width}px; ";
|
94 |
}
|
95 |
if ( $defaults->arrows->height != $customizations->arrows->height ) {
|
96 |
+
$margin_top = ( $customizations->arrows->height / 2 );
|
97 |
+
|
98 |
$html .= "height: {$customizations->arrows->height}px; ";
|
99 |
+
$html .= "margin-top: {$margin_top}px; ";
|
100 |
}
|
101 |
$html .= "}";
|
102 |
|
167 |
}
|
168 |
|
169 |
// Drop Shadow (if enabled)
|
170 |
+
if ( $customizations->shadow->enabled && ! empty( $customizations->shadow->image ) ) {
|
171 |
$html .= ".easingslider-shadow-{$slider->ID} { ";
|
172 |
|
173 |
// Make responsive or fixed
|
199 |
*/
|
200 |
public function drop_shadow( $html, $slider ) {
|
201 |
|
202 |
+
// Get the customizations
|
203 |
+
$customizations = $slider->customizations;
|
204 |
+
|
205 |
/**
|
206 |
* If we are on the "customizer" page, we always want to render the shadow.
|
207 |
* This allow us to toggle it with our live preview. Can't be achieved as easily otherwise.
|
211 |
if ( isset( $_GET['page'] ) && 'easingslider_manage_customizations' == $_GET['page'] ) {
|
212 |
|
213 |
// No need for this if the shadow is already enabled
|
214 |
+
if ( ! $customizations->shadow->enabled ) {
|
215 |
+
$customizations->shadow->enabled = true;
|
216 |
|
217 |
// Add the HTML
|
218 |
$html .= "<style type=\"text/css\">";
|
234 |
}
|
235 |
|
236 |
// Render the shadow if enabled
|
237 |
+
if ( $customizations->shadow->enabled && ! empty( $customizations->shadow->image ) ) {
|
238 |
$html .= "<div class=\"easingslider-shadow easingslider-shadow-{$slider->ID}\">";
|
239 |
+
$html .= "<img src=\"{$customizations->shadow->image}\" style=\"width: 100%;\" />";
|
240 |
$html .= "</div>";
|
241 |
}
|
242 |
|
includes/class-es-editor-pages.php
CHANGED
@@ -158,6 +158,7 @@ class ES_Editor_Pages {
|
|
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 |
)
|
@@ -308,7 +309,7 @@ class ES_Editor_Pages {
|
|
308 |
$slider->save();
|
309 |
|
310 |
// Trigger actions
|
311 |
-
do_action( 'easingslider_save_slider_actions' );
|
312 |
|
313 |
// Tell the user
|
314 |
easingslider_show_notice( __( 'Slider has been saved successfully.', 'easingslider' ), 'updated' );
|
@@ -345,7 +346,7 @@ class ES_Editor_Pages {
|
|
345 |
$slider->save();
|
346 |
|
347 |
// Trigger actions
|
348 |
-
do_action( 'easingslider_publish_slider_actions' );
|
349 |
|
350 |
// Redirect to the editor for our new slider
|
351 |
wp_redirect( "admin.php?page=easingslider_edit_sliders&edit={$slider->ID}" );
|
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 |
+
'update' => __( 'Update', 'easingslider' ),
|
162 |
'image_from_media' => __( 'Image from Media', 'easingslider' ),
|
163 |
'insert_into_slider' => __( 'Insert into Slider', 'easingslider' )
|
164 |
)
|
309 |
$slider->save();
|
310 |
|
311 |
// Trigger actions
|
312 |
+
do_action( 'easingslider_save_slider_actions', $slider );
|
313 |
|
314 |
// Tell the user
|
315 |
easingslider_show_notice( __( 'Slider has been saved successfully.', 'easingslider' ), 'updated' );
|
346 |
$slider->save();
|
347 |
|
348 |
// Trigger actions
|
349 |
+
do_action( 'easingslider_publish_slider_actions', $slider );
|
350 |
|
351 |
// Redirect to the editor for our new slider
|
352 |
wp_redirect( "admin.php?page=easingslider_edit_sliders&edit={$slider->ID}" );
|
includes/class-es-extensions-page.php
CHANGED
@@ -107,39 +107,57 @@ class ES_Extensions_Page {
|
|
107 |
$available_extensions = array(
|
108 |
(object) array(
|
109 |
'title' => __( 'Visual Customizer', 'easingslider' ),
|
110 |
-
'image' => 'http://easingslider.com/wp-content/uploads/edd/
|
111 |
-
'content' => __( '
|
112 |
'link' => 'http://easingslider.com/extensions/visual-customizer/'
|
113 |
),
|
114 |
(object) array(
|
115 |
'title' => __( 'HTML Captions', 'easingslider' ),
|
116 |
-
'image' => 'http://easingslider.com/wp-content/uploads/edd/
|
117 |
-
'content' => __( '
|
118 |
'link' => 'http://easingslider.com/extensions/html-captions/'
|
119 |
),
|
120 |
(object) array(
|
121 |
'title' => __( 'Touch & Swipe', 'easingslider' ),
|
122 |
-
'image' => 'http://easingslider.com/wp-content/uploads/edd/
|
123 |
-
'content' => __( '
|
124 |
'link' => 'http://easingslider.com/extensions/touch-swipe/'
|
125 |
),
|
126 |
(object) array(
|
127 |
'title' => __( 'Lightbox', 'easingslider' ),
|
128 |
-
'image' => 'http://easingslider.com/wp-content/uploads/edd/
|
129 |
-
'content' => __( '
|
130 |
'link' => 'http://easingslider.com/extensions/lightbox/'
|
131 |
),
|
132 |
(object) array(
|
133 |
'title' => __( 'Images from URL', 'easingslider' ),
|
134 |
-
'image' => 'http://easingslider.com/wp-content/uploads/edd/
|
135 |
-
'content' => __( '
|
136 |
'link' => 'http://easingslider.com/extensions/images-url/'
|
137 |
),
|
138 |
(object) array(
|
139 |
'title' => __( 'Featured Content', 'easingslider' ),
|
140 |
-
'image' => 'http://easingslider.com/wp-content/uploads/edd/
|
141 |
-
'content' => __( '
|
142 |
'link' => 'http://easingslider.com/extensions/featured-content/'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
)
|
144 |
);
|
145 |
|
107 |
$available_extensions = array(
|
108 |
(object) array(
|
109 |
'title' => __( 'Visual Customizer', 'easingslider' ),
|
110 |
+
'image' => 'http://easingslider.com/wp-content/uploads/edd/2015/01/customizer1.jpg',
|
111 |
+
'content' => __( 'The Visual Customizer extension is a complete customization tool for beautifully sculpting the design of your sliders. Create a unique look and feel for each slider.', 'easingslider' ),
|
112 |
'link' => 'http://easingslider.com/extensions/visual-customizer/'
|
113 |
),
|
114 |
(object) array(
|
115 |
'title' => __( 'HTML Captions', 'easingslider' ),
|
116 |
+
'image' => 'http://easingslider.com/wp-content/uploads/edd/2015/01/captions1.jpg',
|
117 |
+
'content' => __( 'The “HTML Captions” extensions makes adding HTML captions and content to Easing Slider a breeze.', 'easingslider' ),
|
118 |
'link' => 'http://easingslider.com/extensions/html-captions/'
|
119 |
),
|
120 |
(object) array(
|
121 |
'title' => __( 'Touch & Swipe', 'easingslider' ),
|
122 |
+
'image' => 'http://easingslider.com/wp-content/uploads/edd/2015/01/touch1.jpg',
|
123 |
+
'content' => __( 'The “Touch & Swipe” extension enables slider touch gestures on mobile devices. iPhones, iPads, Androids, if it can be touched this is the extension for you.', 'easingslider' ),
|
124 |
'link' => 'http://easingslider.com/extensions/touch-swipe/'
|
125 |
),
|
126 |
(object) array(
|
127 |
'title' => __( 'Lightbox', 'easingslider' ),
|
128 |
+
'image' => 'http://easingslider.com/wp-content/uploads/edd/2015/01/lightbox1.jpg',
|
129 |
+
'content' => __( 'The Lightbox extension adds support for the jQuery Lightbox script. This simple extension makes it incredibly easy to create lightbox images or galleries for your slider.', 'easingslider' ),
|
130 |
'link' => 'http://easingslider.com/extensions/lightbox/'
|
131 |
),
|
132 |
(object) array(
|
133 |
'title' => __( 'Images from URL', 'easingslider' ),
|
134 |
+
'image' => 'http://easingslider.com/wp-content/uploads/edd/2015/01/url-images.jpg',
|
135 |
+
'content' => __( 'The Images from URL extension makes adding image slides from an external URL simple.', 'easingslider' ),
|
136 |
'link' => 'http://easingslider.com/extensions/images-url/'
|
137 |
),
|
138 |
(object) array(
|
139 |
'title' => __( 'Featured Content', 'easingslider' ),
|
140 |
+
'image' => 'http://easingslider.com/wp-content/uploads/edd/2015/01/featured-content1.jpg',
|
141 |
+
'content' => __( 'The Featured Content extension allows you to source slides from posts types, taxonomies and other supported WordPress queries. Perfect for featured posts, etc.', 'easingslider' ),
|
142 |
'link' => 'http://easingslider.com/extensions/featured-content/'
|
143 |
+
),
|
144 |
+
(object) array(
|
145 |
+
'title' => __( 'Videos', 'easingslider' ),
|
146 |
+
'image' => 'http://easingslider.com/wp-content/uploads/edd/2015/01/video.jpg',
|
147 |
+
'content' => __( 'The “Videos” extension makes adding video slides to your sliders a piece of cake. With this extension, you can create video slides from YouTube or Vimeo.', 'easingslider' ),
|
148 |
+
'link' => 'http://easingslider.com/extensions/videos/'
|
149 |
+
),
|
150 |
+
(object) array(
|
151 |
+
'title' => __( 'Schedule', 'easingslider' ),
|
152 |
+
'image' => 'http://easingslider.com/wp-content/uploads/edd/2015/01/schedule.jpg',
|
153 |
+
'content' => __( 'The “Schedule” extension for Easing Slider allows you to easily schedule both sliders and individual slides to be displayed at specific times and dates.', 'easingslider' ),
|
154 |
+
'link' => 'http://easingslider.com/extensions/schedule/'
|
155 |
+
),
|
156 |
+
(object) array(
|
157 |
+
'title' => __( 'Nextgen Gallery', 'easingslider' ),
|
158 |
+
'image' => 'http://easingslider.com/wp-content/uploads/edd/2015/01/nextgen-gallery.jpg',
|
159 |
+
'content' => __( 'The “Nextgen Gallery” extension allows you to easily integrate Easing Slider with your Nextgen galleries.', 'easingslider' ),
|
160 |
+
'link' => 'http://easingslider.com/extensions/nextgen-gallery/'
|
161 |
)
|
162 |
);
|
163 |
|
includes/class-es-legacy.php
CHANGED
@@ -161,18 +161,18 @@ class ES_Legacy {
|
|
161 |
*/
|
162 |
public function do_pro_shortcode( $atts ) {
|
163 |
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
|
177 |
return $this->render_pro_slider( $id );
|
178 |
|
@@ -227,14 +227,15 @@ class ES_Legacy {
|
|
227 |
|
228 |
// Populate the slide
|
229 |
$slide = (object) array(
|
230 |
-
'id'
|
231 |
-
'attachment_id'
|
232 |
-
'type'
|
233 |
-
'alt'
|
234 |
-
'aspectRatio'
|
235 |
-
'link'
|
236 |
-
'linkUrl'
|
237 |
-
'
|
|
|
238 |
);
|
239 |
|
240 |
// Add an image URL if we aren't using an attachment
|
@@ -323,14 +324,15 @@ class ES_Legacy {
|
|
323 |
|
324 |
// Populate the slide
|
325 |
$slide = (object) array(
|
326 |
-
'id'
|
327 |
-
'attachment_id'
|
328 |
-
'type'
|
329 |
-
'alt'
|
330 |
-
'aspectRatio'
|
331 |
-
'link'
|
332 |
-
'linkUrl'
|
333 |
-
'
|
|
|
334 |
);
|
335 |
|
336 |
// Add an image URL if we aren't using an attachment
|
@@ -531,15 +533,16 @@ class ES_Legacy {
|
|
531 |
|
532 |
// Push the slide data
|
533 |
$slider->slides[] = (object) array(
|
534 |
-
'id'
|
535 |
-
'attachment_id'
|
536 |
-
'type'
|
537 |
-
'alt'
|
538 |
-
'aspectRatio'
|
539 |
-
'link'
|
540 |
-
'linkUrl'
|
541 |
-
'
|
542 |
-
'
|
|
|
543 |
);
|
544 |
|
545 |
}
|
@@ -622,14 +625,15 @@ class ES_Legacy {
|
|
622 |
|
623 |
// Populate the slide
|
624 |
$slide = (object) array(
|
625 |
-
'id'
|
626 |
-
'attachment_id'
|
627 |
-
'type'
|
628 |
-
'alt'
|
629 |
-
'aspectRatio'
|
630 |
-
'link'
|
631 |
-
'linkUrl'
|
632 |
-
'
|
|
|
633 |
);
|
634 |
|
635 |
// Add an image URL if we aren't using an attachment
|
161 |
*/
|
162 |
public function do_pro_shortcode( $atts ) {
|
163 |
|
164 |
+
// Extract shortcode attributes
|
165 |
+
extract(
|
166 |
+
shortcode_atts(
|
167 |
+
array( 'id' => false ),
|
168 |
+
$atts
|
169 |
+
)
|
170 |
+
);
|
171 |
+
|
172 |
+
// Display error message if no ID has been entered
|
173 |
+
if ( ! $id ) {
|
174 |
+
return __( 'Looks like you\'ve forgotten to add a slideshow ID to this shortcode. Oh dear!', 'easingslider' );
|
175 |
+
}
|
176 |
|
177 |
return $this->render_pro_slider( $id );
|
178 |
|
227 |
|
228 |
// Populate the slide
|
229 |
$slide = (object) array(
|
230 |
+
'id' => easingslider_validate_data( ( $key + 1 ) ),
|
231 |
+
'attachment_id' => easingslider_validate_data( $attachment_id ),
|
232 |
+
'type' => 'image',
|
233 |
+
'alt' => easingslider_validate_data( $legacy_slide['image-alt'] ),
|
234 |
+
'aspectRatio' => null,
|
235 |
+
'link' => 'custom',
|
236 |
+
'linkUrl' => ( 'webpage' == $legacy_slide['image-link'] ) ? $legacy_slide['webpage-url'] : $legacy_slide['video-url'],
|
237 |
+
'linkTargetBlank' => false,
|
238 |
+
'title' => easingslider_validate_data( $legacy_slide['image-title'] )
|
239 |
);
|
240 |
|
241 |
// Add an image URL if we aren't using an attachment
|
324 |
|
325 |
// Populate the slide
|
326 |
$slide = (object) array(
|
327 |
+
'id' => easingslider_validate_data( $legacy_slide->id ),
|
328 |
+
'attachment_id' => easingslider_validate_data( $attachment_id ),
|
329 |
+
'type' => 'image',
|
330 |
+
'alt' => easingslider_validate_data( $legacy_slide->alt ),
|
331 |
+
'aspectRatio' => null,
|
332 |
+
'link' => ( $legacy_slide->link ) ? 'custom' : 'none',
|
333 |
+
'linkUrl' => easingslider_validate_data( $legacy_slide->link ),
|
334 |
+
'linkTargetBlank' => ( '_blank' == $legacy_slide->linkTarget ) ? '_blank': false,
|
335 |
+
'title' => easingslider_validate_data( $legacy_slide->title )
|
336 |
);
|
337 |
|
338 |
// Add an image URL if we aren't using an attachment
|
533 |
|
534 |
// Push the slide data
|
535 |
$slider->slides[] = (object) array(
|
536 |
+
'id' => $i,
|
537 |
+
'attachment_id' => null,
|
538 |
+
'type' => 'image',
|
539 |
+
'alt' => '',
|
540 |
+
'aspectRatio' => null,
|
541 |
+
'link' => ( get_option( "sImgLink{$i}" ) == '' ) ? 'none' : 'custom',
|
542 |
+
'linkUrl' => easingslider_validate_data( get_option( "sImgLink{$i}" ) ),
|
543 |
+
'linkTargetBlank' => false,
|
544 |
+
'title' => '',
|
545 |
+
'url' => easingslider_validate_data( $image )
|
546 |
);
|
547 |
|
548 |
}
|
625 |
|
626 |
// Populate the slide
|
627 |
$slide = (object) array(
|
628 |
+
'id' => easingslider_validate_data( $legacy_slide->id ),
|
629 |
+
'attachment_id' => easingslider_validate_data( $attachment_id ),
|
630 |
+
'type' => 'image',
|
631 |
+
'alt' => easingslider_validate_data( $legacy_slide->alt ),
|
632 |
+
'aspectRatio' => null,
|
633 |
+
'link' => ( $legacy_slide->link ) ? 'custom' : 'none',
|
634 |
+
'linkUrl' => easingslider_validate_data( $legacy_slide->link ),
|
635 |
+
'linkTargetBlank' => ( '_blank' == $legacy_slide->linkTarget ) ? '_blank': false,
|
636 |
+
'title' => easingslider_validate_data( $legacy_slide->title )
|
637 |
);
|
638 |
|
639 |
// Add an image URL if we aren't using an attachment
|
includes/class-es-slider.php
CHANGED
@@ -16,11 +16,11 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
16 |
class ES_Slider {
|
17 |
|
18 |
/**
|
19 |
-
* The post type
|
20 |
*
|
21 |
* @var string
|
22 |
*/
|
23 |
-
public static $
|
24 |
|
25 |
/**
|
26 |
* Constructor
|
@@ -64,7 +64,7 @@ class ES_Slider {
|
|
64 |
// Our default query arguments
|
65 |
$defaults = array(
|
66 |
'post_status' => 'publish',
|
67 |
-
'post_type' => self::$
|
68 |
'orderby' => 'ID',
|
69 |
'order' => 'asc',
|
70 |
'posts_per_page' => -1
|
@@ -140,7 +140,7 @@ class ES_Slider {
|
|
140 |
}
|
141 |
|
142 |
// Bail if not our post type
|
143 |
-
if ( self::$
|
144 |
return false;
|
145 |
}
|
146 |
|
@@ -166,7 +166,7 @@ class ES_Slider {
|
|
166 |
*/
|
167 |
public static function total( $post_status = 'publish' ) {
|
168 |
|
169 |
-
$total_items = wp_count_posts( self::$
|
170 |
|
171 |
return $total_items->$post_status;
|
172 |
|
@@ -362,7 +362,7 @@ class ES_Slider {
|
|
362 |
$postdata_defaults = array(
|
363 |
'post_title' => '',
|
364 |
'post_status' => 'publish',
|
365 |
-
'post_type' => self::$
|
366 |
);
|
367 |
|
368 |
return apply_filters( 'easingslider_postdata_defaults', $postdata_defaults );
|
@@ -531,7 +531,7 @@ class ES_Slider {
|
|
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 |
|
@@ -690,7 +690,7 @@ class ES_Slider {
|
|
690 |
if ( ! empty( $slide->link ) && 'none' != $slide->link ) {
|
691 |
|
692 |
// The link attributes string
|
693 |
-
$attributes_string = "href=\"{$slide->linkUrl}\" class=\"easingslider-link\"";
|
694 |
|
695 |
// Apply filters to the string
|
696 |
$attributes_string = apply_filters( 'easingslider_open_link_html_attributes', $attributes_string, $slide, $slider );
|
16 |
class ES_Slider {
|
17 |
|
18 |
/**
|
19 |
+
* The object post type
|
20 |
*
|
21 |
* @var string
|
22 |
*/
|
23 |
+
public static $object_type = 'easingslider';
|
24 |
|
25 |
/**
|
26 |
* Constructor
|
64 |
// Our default query arguments
|
65 |
$defaults = array(
|
66 |
'post_status' => 'publish',
|
67 |
+
'post_type' => self::$object_type,
|
68 |
'orderby' => 'ID',
|
69 |
'order' => 'asc',
|
70 |
'posts_per_page' => -1
|
140 |
}
|
141 |
|
142 |
// Bail if not our post type
|
143 |
+
if ( self::$object_type != $post->post_type ) {
|
144 |
return false;
|
145 |
}
|
146 |
|
166 |
*/
|
167 |
public static function total( $post_status = 'publish' ) {
|
168 |
|
169 |
+
$total_items = wp_count_posts( self::$object_type );
|
170 |
|
171 |
return $total_items->$post_status;
|
172 |
|
362 |
$postdata_defaults = array(
|
363 |
'post_title' => '',
|
364 |
'post_status' => 'publish',
|
365 |
+
'post_type' => self::$object_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 easingslider-{$slide->type}-slide\" style=\"{$animation_duration}\">";
|
535 |
|
536 |
$html = apply_filters( 'easingslider_before_display_slide', $html, $slide, $this );
|
537 |
|
690 |
if ( ! empty( $slide->link ) && 'none' != $slide->link ) {
|
691 |
|
692 |
// The link attributes string
|
693 |
+
$attributes_string = "href=\"{$slide->linkUrl}\" target=\"{$slide->linkTargetBlank}\" class=\"easingslider-link\"";
|
694 |
|
695 |
// Apply filters to the string
|
696 |
$attributes_string = apply_filters( 'easingslider_open_link_html_attributes', $attributes_string, $slide, $slider );
|
includes/class-es-sliders-list-table.php
CHANGED
@@ -107,6 +107,11 @@ class ES_Sliders_List_Table extends WP_List_Table {
|
|
107 |
// Get the number of items per page
|
108 |
$per_page = (int) get_user_option( 'sliders_per_page' );
|
109 |
|
|
|
|
|
|
|
|
|
|
|
110 |
return $per_page;
|
111 |
|
112 |
}
|
107 |
// Get the number of items per page
|
108 |
$per_page = (int) get_user_option( 'sliders_per_page' );
|
109 |
|
110 |
+
// Return default if false
|
111 |
+
if ( ! $per_page ) {
|
112 |
+
return 20;
|
113 |
+
}
|
114 |
+
|
115 |
return $per_page;
|
116 |
|
117 |
}
|
js/editor-pages.js
CHANGED
@@ -48,14 +48,15 @@ window.EasingSlider = window.EasingSlider || {
|
|
48 |
* Defaults
|
49 |
*/
|
50 |
defaults: _.defaults({
|
51 |
-
attachment_id:
|
52 |
-
type:
|
53 |
-
alt:
|
54 |
-
aspectRatio:
|
55 |
-
link:
|
56 |
-
linkUrl:
|
57 |
-
|
58 |
-
|
|
|
59 |
}, wp.media.model.PostImage.prototype.defaults)
|
60 |
|
61 |
});
|
@@ -151,7 +152,10 @@ window.EasingSlider = window.EasingSlider || {
|
|
151 |
}, this);
|
152 |
|
153 |
// Query the WordPress Media Library
|
154 |
-
var query = wp.media.query({
|
|
|
|
|
|
|
155 |
|
156 |
// Do the query
|
157 |
query.more().done(function() {
|
@@ -180,6 +184,25 @@ window.EasingSlider = window.EasingSlider || {
|
|
180 |
|
181 |
});
|
182 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
/**
|
184 |
* Our "Edit Slide" controllers for various slide types
|
185 |
*/
|
@@ -234,6 +257,37 @@ window.EasingSlider = window.EasingSlider || {
|
|
234 |
|
235 |
},
|
236 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
/**
|
238 |
* Creates our states
|
239 |
*/
|
@@ -241,7 +295,7 @@ window.EasingSlider = window.EasingSlider || {
|
|
241 |
|
242 |
// Add the default states
|
243 |
this.states.add([
|
244 |
-
new
|
245 |
id: 'insert',
|
246 |
type: 'image',
|
247 |
title: _easingsliderEditorL10n.media_upload.image_from_media,
|
@@ -333,6 +387,7 @@ window.EasingSlider = window.EasingSlider || {
|
|
333 |
}
|
334 |
|
335 |
});
|
|
|
336 |
/**
|
337 |
* Our "Edit Slide" frames for various slide types
|
338 |
*/
|
@@ -400,7 +455,7 @@ window.EasingSlider = window.EasingSlider || {
|
|
400 |
*/
|
401 |
imageDetailsContent: function(options) {
|
402 |
|
403 |
-
// Initiate the view
|
404 |
options.view = new Editor.views.EditSlide.get({
|
405 |
type: 'image',
|
406 |
controller: this,
|
@@ -432,7 +487,15 @@ window.EasingSlider = window.EasingSlider || {
|
|
432 |
|
433 |
// Gather the settings
|
434 |
this.$('*[data-setting]').each(function() {
|
435 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
436 |
});
|
437 |
|
438 |
// Set the model data
|
@@ -963,6 +1026,7 @@ window.EasingSlider = window.EasingSlider || {
|
|
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
|
@@ -1016,6 +1080,25 @@ window.EasingSlider = window.EasingSlider || {
|
|
1016 |
|
1017 |
});
|
1018 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1019 |
/**
|
1020 |
* Our "Edit Slide" views for various slide types
|
1021 |
*/
|
@@ -1050,6 +1133,8 @@ window.EasingSlider = window.EasingSlider || {
|
|
1050 |
*/
|
1051 |
initialize: function() {
|
1052 |
|
|
|
|
|
1053 |
// Call parent constructor
|
1054 |
wp.media.view.ImageDetails.prototype.initialize.apply(this, arguments);
|
1055 |
|
48 |
* Defaults
|
49 |
*/
|
50 |
defaults: _.defaults({
|
51 |
+
attachment_id: null,
|
52 |
+
type: 'image',
|
53 |
+
alt: '',
|
54 |
+
aspectRatio: null,
|
55 |
+
link: 'none',
|
56 |
+
linkUrl: '',
|
57 |
+
linkTargetBlank: false,
|
58 |
+
title: '',
|
59 |
+
url: null
|
60 |
}, wp.media.model.PostImage.prototype.defaults)
|
61 |
|
62 |
});
|
152 |
}, this);
|
153 |
|
154 |
// Query the WordPress Media Library
|
155 |
+
var query = wp.media.query({
|
156 |
+
post__in: ids,
|
157 |
+
posts_per_page: -1
|
158 |
+
});
|
159 |
|
160 |
// Do the query
|
161 |
query.more().done(function() {
|
184 |
|
185 |
});
|
186 |
|
187 |
+
/**
|
188 |
+
* Our "Add Slide" controllers for various slide types
|
189 |
+
*/
|
190 |
+
Editor.controllers.AddSlide = {
|
191 |
+
|
192 |
+
/**
|
193 |
+
* Returns the appropriate "Add Slide" controller, based on the type of slide provided
|
194 |
+
*/
|
195 |
+
get: function(options) {
|
196 |
+
return new Editor.controllers.AddSlide[options.type](options);
|
197 |
+
}
|
198 |
+
|
199 |
+
};
|
200 |
+
|
201 |
+
/**
|
202 |
+
* "Add Slide" controller for images
|
203 |
+
*/
|
204 |
+
Editor.controllers.AddSlide.image = wp.media.controller.Library.extend();
|
205 |
+
|
206 |
/**
|
207 |
* Our "Edit Slide" controllers for various slide types
|
208 |
*/
|
257 |
|
258 |
},
|
259 |
|
260 |
+
/**
|
261 |
+
* Render callback for the content region in the 'browse' mode.
|
262 |
+
*/
|
263 |
+
browseContent: function(contentRegion) {
|
264 |
+
|
265 |
+
// Get the state
|
266 |
+
var state = this.state();
|
267 |
+
|
268 |
+
// Show the toolbar
|
269 |
+
this.$el.removeClass('hide-toolbar');
|
270 |
+
|
271 |
+
// Browse our library of attachments
|
272 |
+
contentRegion.view = new Editor.views.AddSlide.image({
|
273 |
+
controller: this,
|
274 |
+
collection: state.get('library'),
|
275 |
+
selection: state.get('selection'),
|
276 |
+
model: state,
|
277 |
+
sortable: state.get('sortable'),
|
278 |
+
search: state.get('searchable'),
|
279 |
+
filters: state.get('filterable'),
|
280 |
+
date: state.get('date'),
|
281 |
+
display: state.has('display') ? state.get('display') : state.get('displaySettings'),
|
282 |
+
dragInfo: state.get('dragInfo'),
|
283 |
+
idealColumnWidth: state.get('idealColumnWidth'),
|
284 |
+
suggestedWidth: state.get('suggestedWidth'),
|
285 |
+
suggestedHeight: state.get('suggestedHeight'),
|
286 |
+
AttachmentView: state.get('AttachmentView')
|
287 |
+
});
|
288 |
+
|
289 |
+
},
|
290 |
+
|
291 |
/**
|
292 |
* Creates our states
|
293 |
*/
|
295 |
|
296 |
// Add the default states
|
297 |
this.states.add([
|
298 |
+
new Editor.controllers.AddSlide.image({
|
299 |
id: 'insert',
|
300 |
type: 'image',
|
301 |
title: _easingsliderEditorL10n.media_upload.image_from_media,
|
387 |
}
|
388 |
|
389 |
});
|
390 |
+
|
391 |
/**
|
392 |
* Our "Edit Slide" frames for various slide types
|
393 |
*/
|
455 |
*/
|
456 |
imageDetailsContent: function(options) {
|
457 |
|
458 |
+
// Initiate the view
|
459 |
options.view = new Editor.views.EditSlide.get({
|
460 |
type: 'image',
|
461 |
controller: this,
|
487 |
|
488 |
// Gather the settings
|
489 |
this.$('*[data-setting]').each(function() {
|
490 |
+
|
491 |
+
// Handle setting
|
492 |
+
if ( 'checkbox' == this.type ) {
|
493 |
+
data[this.dataset.setting] = ( this.checked ) ? this.value : false;
|
494 |
+
}
|
495 |
+
else {
|
496 |
+
data[this.dataset.setting] = this.value;
|
497 |
+
}
|
498 |
+
|
499 |
});
|
500 |
|
501 |
// Set the model data
|
1026 |
this.model.on('change', this._setData, this);
|
1027 |
this.model.on('change:id', this._updateID, this);
|
1028 |
this.model.on('change:url', this.render, this);
|
1029 |
+
this.model.on('change:poster', this.render, this);
|
1030 |
this.model.on('change:attachment_id', this.render, this);
|
1031 |
|
1032 |
// Bind additional attachment events if appropriate
|
1080 |
|
1081 |
});
|
1082 |
|
1083 |
+
/**
|
1084 |
+
* Our "Add Slide" views for various slide types
|
1085 |
+
*/
|
1086 |
+
Editor.views.AddSlide = {
|
1087 |
+
|
1088 |
+
/**
|
1089 |
+
* Returns the appropriate "Add Slide" view, based on the type of slide provided
|
1090 |
+
*/
|
1091 |
+
get: function(options) {
|
1092 |
+
return new Editor.views.AddSlide[options.type](options);
|
1093 |
+
}
|
1094 |
+
|
1095 |
+
};
|
1096 |
+
|
1097 |
+
/**
|
1098 |
+
* Our "Add Slide" view for images
|
1099 |
+
*/
|
1100 |
+
Editor.views.AddSlide.image = wp.media.view.AttachmentsBrowser.extend();
|
1101 |
+
|
1102 |
/**
|
1103 |
* Our "Edit Slide" views for various slide types
|
1104 |
*/
|
1133 |
*/
|
1134 |
initialize: function() {
|
1135 |
|
1136 |
+
console.log(this.model.get('linkTargetBlank'));
|
1137 |
+
|
1138 |
// Call parent constructor
|
1139 |
wp.media.view.ImageDetails.prototype.initialize.apply(this, arguments);
|
1140 |
|
js/editor-pages.min.js
CHANGED
@@ -1 +1 @@
|
|
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);
|
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:false,defaults:_.defaults({attachment_id:null,type:"image",alt:"",aspectRatio:null,link:"none",linkUrl:"",linkTargetBlank:false,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,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,posts_per_page:-1});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.AddSlide={get:function(e){return new t.controllers.AddSlide[e.type](e)}};t.controllers.AddSlide.image=wp.media.controller.Library.extend();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:true});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)},browseContent:function(e){var n=this.state();this.$el.removeClass("hide-toolbar");e.view=new t.views.AddSlide.image({controller:this,collection:n.get("library"),selection:n.get("selection"),model:n,sortable:n.get("sortable"),search:n.get("searchable"),filters:n.get("filterable"),date:n.get("date"),display:n.has("display")?n.get("display"):n.get("displaySettings"),dragInfo:n.get("dragInfo"),idealColumnWidth:n.get("idealColumnWidth"),suggestedWidth:n.get("suggestedWidth"),suggestedHeight:n.get("suggestedHeight"),AttachmentView:n.get("AttachmentView")})},createStates:function(){this.states.add([new t.controllers.AddSlide.image({id:"insert",type:"image",title:_easingsliderEditorL10n.media_upload.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:_easingsliderEditorL10n.media_upload.insert_into_slider,requires:{selection:false},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.get({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={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: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.get({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.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(){if("checkbox"==this.type){e[this.dataset.setting]=this.checked?this.value:false}else{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(_easingsliderEditorL10n.warn)){var n=e(t.currentTarget).parents(".attachment").attr("data-id");this.collection.remove(n)}},_clickBulkDelete:function(e){e.preventDefault();if(confirm(_easingsliderEditorL10n.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.get({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:url",this.render,this);this.model.on("change:poster",this.render,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.AddSlide={get:function(e){return new t.views.AddSlide[e.type](e)}};t.views.AddSlide.image=wp.media.view.AttachmentsBrowser.extend();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(){console.log(this.model.get("linkTargetBlank"));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,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(){t.Router=new t.router;Backbone.history.start({root:window._wpMediaGridSettings.adminUrl,pushState:true});e(".delete").each(function(){e(this).on("click",function(){if(!confirm(_easingsliderEditorL10n.warn)){return false}})})})})(jQuery)
|
js/jquery.easingslider.js
CHANGED
@@ -148,16 +148,16 @@
|
|
148 |
*/
|
149 |
base._setupPlayback = function() {
|
150 |
|
151 |
-
//
|
152 |
base.$el.on('transition.before', function() {
|
153 |
-
if (
|
154 |
-
base.
|
155 |
}
|
156 |
});
|
157 |
|
158 |
-
// Once a transition has completed,
|
159 |
base.$el.on('transition.after', function() {
|
160 |
-
if (
|
161 |
base.startPlayback();
|
162 |
}
|
163 |
});
|
@@ -176,24 +176,45 @@
|
|
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(
|
|
|
|
|
|
|
184 |
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
|
191 |
-
|
192 |
-
|
193 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
|
195 |
-
|
196 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
|
198 |
});
|
199 |
|
@@ -236,9 +257,6 @@
|
|
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 |
|
@@ -262,12 +280,12 @@
|
|
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 |
|
@@ -381,12 +399,12 @@
|
|
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 |
|
@@ -404,7 +422,7 @@
|
|
404 |
base._transition(eq, 'forward');
|
405 |
|
406 |
// Trigger event
|
407 |
-
base.$el.trigger('transition.next', base, eq, 'forward');
|
408 |
|
409 |
return base;
|
410 |
|
@@ -422,7 +440,7 @@
|
|
422 |
base._transition(eq, 'backward');
|
423 |
|
424 |
// Trigger event
|
425 |
-
base.$el.trigger('transition.prev', base, eq, 'backward');
|
426 |
|
427 |
return base;
|
428 |
|
@@ -437,7 +455,7 @@
|
|
437 |
this._transition(eq, direction);
|
438 |
|
439 |
// Trigger event
|
440 |
-
base.$el.trigger('transition.to', base, eq, direction);
|
441 |
|
442 |
return base;
|
443 |
|
148 |
*/
|
149 |
base._setupPlayback = function() {
|
150 |
|
151 |
+
// Clear playback timer before the transition. It'll be reset after the transition has completed.
|
152 |
base.$el.on('transition.before', function() {
|
153 |
+
if ( base._playbackTimer ) {
|
154 |
+
clearTimeout(base._playbackTimer);
|
155 |
}
|
156 |
});
|
157 |
|
158 |
+
// Once a transition has completed, continue playback if we have an active timer.
|
159 |
base.$el.on('transition.after', function() {
|
160 |
+
if ( base._playbackTimer ) {
|
161 |
base.startPlayback();
|
162 |
}
|
163 |
});
|
176 |
*/
|
177 |
base._preload = function() {
|
178 |
|
179 |
+
// Get the total number of images
|
180 |
+
var total_images = base.$slides.find('.easingslider-image').length;
|
181 |
+
|
182 |
// Preloaded slide count
|
183 |
base._preloadCount = 0;
|
184 |
|
185 |
// Loop through and preload each image slide. Doesn't stop on failure, just continues instead.
|
186 |
+
base.$el.find('.easingslider-image').each(function() {
|
187 |
+
|
188 |
+
// Load the image
|
189 |
+
$(this).one('load', function() {
|
190 |
|
191 |
+
// If all slides have been preloaded, hide the preloader and start the playback. Also increase preloader count.
|
192 |
+
if ( ++base._preloadCount == total_images ) {
|
193 |
+
base.$preload.animate({ 'opacity': 0 }, {
|
194 |
+
duration: 400,
|
195 |
+
complete: function() {
|
196 |
|
197 |
+
// Remove preloader
|
198 |
+
$(this).remove();
|
199 |
+
|
200 |
+
// Flag as loaded
|
201 |
+
base.$el.addClass('has-loaded');
|
202 |
+
|
203 |
+
// Trigger events
|
204 |
+
base.$el.trigger('loaded', base);
|
205 |
+
|
206 |
+
}
|
207 |
+
});
|
208 |
+
}
|
209 |
|
210 |
+
}).each(function() {
|
211 |
+
|
212 |
+
// Load on complete
|
213 |
+
if ( this.complete ) {
|
214 |
+
$(this).load();
|
215 |
+
}
|
216 |
+
|
217 |
+
});
|
218 |
|
219 |
});
|
220 |
|
257 |
*/
|
258 |
base.startPlayback = function() {
|
259 |
|
|
|
|
|
|
|
260 |
// Runtime variable
|
261 |
base._runtime = new Date();
|
262 |
|
280 |
*/
|
281 |
base.endPlayback = function() {
|
282 |
|
|
|
|
|
|
|
283 |
// Clear playback timer
|
284 |
clearTimeout(base._playbackTimer);
|
285 |
|
286 |
+
// Set timer to flase
|
287 |
+
base._playbackTimer = false;
|
288 |
+
|
289 |
// Trigger event
|
290 |
base.$el.trigger('playback.end', base);
|
291 |
|
399 |
base._animating = false;
|
400 |
|
401 |
// Trigger event
|
402 |
+
base.$el.trigger('transition.after', [ base, eq, direction ]);
|
403 |
|
404 |
}, o.transitions.duration);
|
405 |
|
406 |
// Trigger event
|
407 |
+
base.$el.trigger('transition.before', [ base, eq, direction ]);
|
408 |
|
409 |
return base;
|
410 |
|
422 |
base._transition(eq, 'forward');
|
423 |
|
424 |
// Trigger event
|
425 |
+
base.$el.trigger('transition.next', [ base, eq, 'forward' ]);
|
426 |
|
427 |
return base;
|
428 |
|
440 |
base._transition(eq, 'backward');
|
441 |
|
442 |
// Trigger event
|
443 |
+
base.$el.trigger('transition.prev', [ base, eq, 'backward' ]);
|
444 |
|
445 |
return base;
|
446 |
|
455 |
this._transition(eq, direction);
|
456 |
|
457 |
// Trigger event
|
458 |
+
base.$el.trigger('transition.to', [ base, eq, direction ]);
|
459 |
|
460 |
return base;
|
461 |
|
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._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(
|
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(n._playbackTimer){clearTimeout(n._playbackTimer)}});n.$el.on("transition.after",function(){if(n._playbackTimer){n.startPlayback()}});if(r.playback.enabled){n.$el.on("loaded",n.startPlayback)}return n};n._preload=function(){var t=n.$slides.find(".easingslider-image").length;n._preloadCount=0;n.$el.find(".easingslider-image").each(function(){e(this).one("load",function(){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)}})}}).each(function(){if(this.complete){e(this).load()}})})};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(){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(){clearTimeout(n._playbackTimer);n._playbackTimer=false;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)
|
partials/edit-slider_sidebar.php
CHANGED
@@ -78,10 +78,10 @@
|
|
78 |
<div class="field">
|
79 |
<label for="responsive">
|
80 |
<input type="hidden" name="dimensions[responsive]" value="false">
|
81 |
-
<input type="checkbox" name="dimensions[responsive]" id="responsive" value="true" <?php checked( $slider->dimensions->responsive, true ); ?>><span style="display: inline;"><?php _e( 'Make this
|
82 |
</label>
|
83 |
</div>
|
84 |
-
<p class="description"><?php _e( 'Check this option to make this
|
85 |
</div>
|
86 |
|
87 |
<?php
|
78 |
<div class="field">
|
79 |
<label for="responsive">
|
80 |
<input type="hidden" name="dimensions[responsive]" value="false">
|
81 |
+
<input type="checkbox" name="dimensions[responsive]" id="responsive" value="true" <?php checked( $slider->dimensions->responsive, true ); ?>><span style="display: inline;"><?php _e( 'Make this slider responsive.', 'easingslider' ); ?></span>
|
82 |
</label>
|
83 |
</div>
|
84 |
+
<p class="description"><?php _e( 'Check this option to make this slider responsive. If enabled, the "width" and "height" values above will act as maximums.', 'easingslider' ); ?></p>
|
85 |
</div>
|
86 |
|
87 |
<?php
|
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.
|
8 |
|
9 |
Easing Slider is an easy to use slider plugin. Simple and lightweight, is makes creating beautiful WordPress sliders a breeze.
|
10 |
|
@@ -75,6 +75,15 @@ This is easy. When editing a slider in the "All Sliders" admin area, simply clic
|
|
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.
|
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.8
|
8 |
|
9 |
Easing Slider is an easy to use slider plugin. Simple and lightweight, is makes creating beautiful WordPress sliders a breeze.
|
10 |
|
75 |
|
76 |
== Changelog ==
|
77 |
|
78 |
+
= 2.2.0.8 =
|
79 |
+
* Readded support for opening slide links in a new window/tab.
|
80 |
+
* Added proper extension descriptions to "Extensions" panel.
|
81 |
+
* Prepared plugin for video slide support.
|
82 |
+
* Improved some actions and filters to better facilitate developers and other extensions.
|
83 |
+
* Fixed issue where blank shadow image would display is shadow was enabled but no image was set.
|
84 |
+
* Fixed issue that limited attachments query to 40 images only.
|
85 |
+
* Fixed various bugs experienced by users.
|
86 |
+
|
87 |
= 2.2.0.7 =
|
88 |
* General improvements to cater for alternative slide types, such as videos or URL images.
|
89 |
* Fixed a bug (related to above improvement) that would prevent slider from loading when slide didn't contain an image.
|