Version Description
- ADD: Excerpt length and more settings for featured posts in slideshow
- ADD: Assign/set/remove galleries bulk action for slides in admin
- ADD: jQuery UI effects - Blind, Clip, Explode, Puff, Pulsate, Shake, etc.
- ADD: Touch/mobile swipe gestures support
- ADD: "Per Page" setting in admin sections
- ADD: Max height setting for auto height
- ADD: Set a delay on the information bar
- IMPROVE: Upgrade Colorbox and load from CDN
- IMPROVE: WordPress 4.4 headings changes compatibility
- IMPROVE: Headings in admin settings for easier configuration
- IMPROVE: Use post_id="X" to pull current post/page ID automatically
- IMPROVE: Make sure links in information bar is the same colour as information text
- IMPROVE: WordPress configured date format in admin sections for dates
- IMPROVE: Select2 drop downs in admin sections
- IMPROVE: Performance improvements with PHP class autoload
- IMPROVE: Remove wp_head/wp_footer checks
- IMPROVE: Check that slide 'type' database field is present
- FIX: Featured posts featuredtype parameter ineffective
- FIX: "Submit Serial Key" permission/access error
- FIX: Sorting of slides within gallery in admin not working
- FIX: Possible XSS security issues
- FIX: HTML validation errors
- FIX: Specify URL slides not always pulling image correctly
- FIX: Specify URL "File type is not allowed..."
- FIX: Colorbox images wrong path (404 Not Found)
- FIX: Information bar not showing excerpt of post correctly
- FIX: Post/page media images description not showing in info bar
- FIX: Thumbnails don't show on some browsers (Android, Opera, Safari, etc)
Download this release
Release Info
Developer | contrid |
Plugin | Slideshow Gallery |
Version | 1.6 |
Comparing to | |
See all releases |
Code changes from version 1.5.3.4 to 1.6
- css/colorbox.css +41 -9
- helpers/db.php +22 -0
- helpers/form.php +1 -1
- helpers/html.php +4 -16
- helpers/metabox.php +4 -0
- js/colorbox.js +0 -1086
- models/slide.php +9 -6
- models/slideshow.php +4 -4
- readme.txt +32 -2
- slideshow-gallery-plugin.php +52 -22
- slideshow-gallery.php +200 -121
- vendors/class.paginate.php +7 -1
- views/admin/err-top.php +1 -1
- views/admin/galleries/hardcode.php +1 -1
- views/admin/galleries/index.php +28 -5
- views/admin/galleries/save.php +6 -6
- views/admin/galleries/view.php +4 -4
- views/admin/head.php +6 -0
- views/admin/lite-upgrade.php +2 -2
- views/admin/metaboxes/settings-general.php +64 -2
- views/admin/metaboxes/settings-postspages.php +63 -0
- views/admin/metaboxes/settings-styles.php +9 -2
- views/admin/msg-top.php +1 -1
- views/admin/settings-submitserial.php +27 -0
- views/admin/settings.php +1 -1
- views/admin/slides/index.php +2 -2
- views/admin/slides/loop.php +63 -10
- views/admin/slides/order.php +1 -1
- views/admin/slides/save-multiple.php +2 -2
- views/admin/slides/save.php +42 -42
- views/default/css copy.php +43 -0
- views/default/css-responsive.php +18 -16
- views/default/css.php +13 -7
- views/default/css/colorbox.css +188 -36
- views/default/gallery.php +24 -20
- views/default/images/colorbox/border.png +0 -0
- views/default/images/colorbox/controls.png +0 -0
- views/default/images/colorbox/ie6/borderBottomCenter.png +0 -0
- views/default/images/colorbox/ie6/borderBottomLeft.png +0 -0
- views/default/images/colorbox/ie6/borderBottomRight.png +0 -0
- views/default/images/colorbox/ie6/borderMiddleLeft.png +0 -0
- views/default/images/colorbox/ie6/borderMiddleRight.png +0 -0
- views/default/images/colorbox/ie6/borderTopCenter.png +0 -0
- views/default/images/colorbox/ie6/borderTopLeft.png +0 -0
- views/default/images/colorbox/ie6/borderTopRight.png +0 -0
- views/default/images/colorbox/ie6/index.php +1 -0
- views/default/images/colorbox/index.php +1 -0
- views/default/images/colorbox/loading.gif +0 -0
- views/default/images/colorbox/loading_background.png +0 -0
- views/default/images/colorbox/overlay.png +0 -0
- views/default/images/left.gif +0 -0
- views/default/images/link.gif +0 -0
- views/default/images/right.gif +0 -0
- views/default/images/scroll-left.gif +0 -0
- views/default/images/scroll-right.gif +0 -0
- views/default/images/spinner.gif +0 -0
- views/default/js/colorbox.js +0 -1086
- views/default/js/gallery.js +86 -17
- views/default/js/jquery-ui.js +2440 -0
css/colorbox.css
CHANGED
@@ -7,13 +7,15 @@ top: 0;
|
|
7 |
Â
left: 0;
|
8 |
Â
z-index: 9999;
|
9 |
Â
overflow: hidden;
|
10 |
-
|
11 |
Â
#cboxOverlay{position:fixed; width:100%; height:100%;}
|
12 |
Â
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
|
13 |
Â
#cboxContent{position:relative;}
|
14 |
Â
#cboxLoadedContent{overflow:auto;}
|
15 |
Â
#cboxTitle{margin:0;}
|
16 |
-
|
Â
|
|
Â
|
|
17 |
Â
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
|
18 |
Â
.cboxPhoto{float:left; margin:auto; border:0; display:block;}
|
19 |
Â
.cboxIframe{width:100%; height:100%; display:block; border:0;}
|
@@ -33,19 +35,41 @@ padding: 21px 0 0 0;}
|
|
33 |
Â
#cboxError{padding:50px; border:1px solid #ccc;}
|
34 |
Â
#cboxLoadedContent{ }
|
35 |
Â
#cboxTitle{position: absolute;
|
36 |
-
top: -
|
37 |
Â
left: -11px;
|
38 |
Â
color: #ccc;
|
39 |
-
font-size:
|
40 |
Â
font-weight: bold;
|
41 |
Â
}
|
42 |
Â
#cboxCurrent{position: absolute;
|
43 |
-
top: -
|
44 |
Â
right: 11px;
|
45 |
Â
color: #ccc;
|
46 |
-
font-size:
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
47 |
Â
}
|
48 |
-
// #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;}
|
49 |
Â
|
50 |
Â
/* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
|
51 |
Â
#cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
|
@@ -55,10 +79,12 @@ font-size: 110%;
|
|
55 |
Â
#cboxSlideshow{position:absolute; top:-20px; right:90px; color:#fff;}
|
56 |
Â
|
57 |
Â
#cboxPrevious, #cboxNext{
|
Â
|
|
Â
|
|
58 |
Â
position:absolute;
|
59 |
Â
margin-top: -30px;
|
60 |
Â
top:50%;
|
61 |
-
width:
|
62 |
Â
height:100px;
|
63 |
Â
padding: 10px;
|
64 |
Â
color: #ccc;
|
@@ -68,8 +94,10 @@ outline: none;
|
|
68 |
Â
}
|
69 |
Â
#cboxPrevious{
|
70 |
Â
left: 5px;
|
Â
|
|
71 |
Â
}
|
72 |
Â
#cboxPrevious:before{
|
Â
|
|
73 |
Â
font-size: 72px;
|
74 |
Â
font-family: FontAwesome;
|
75 |
Â
content: "\f104";
|
@@ -78,8 +106,10 @@ content: "\f104";
|
|
78 |
Â
#cboxPrevious:hover{color: #fff;}
|
79 |
Â
#cboxNext{
|
80 |
Â
right: 15px;
|
Â
|
|
81 |
Â
}
|
82 |
Â
#cboxNext:before{
|
Â
|
|
83 |
Â
font-size: 72px;
|
84 |
Â
font-family: FontAwesome;
|
85 |
Â
content: "\f105";
|
@@ -87,8 +117,9 @@ content: "\f105";
|
|
87 |
Â
}
|
88 |
Â
#cboxNext:hover{color: #fff;}
|
89 |
Â
#cboxClose{
|
Â
|
|
90 |
Â
position:absolute;
|
91 |
-
top: -
|
92 |
Â
right: -21px;
|
93 |
Â
display:block;
|
94 |
Â
width: 24px;
|
@@ -97,6 +128,7 @@ color: #ccc;
|
|
97 |
Â
outline: 0;
|
98 |
Â
}
|
99 |
Â
#cboxClose:before{
|
Â
|
|
100 |
Â
font-family: FontAwesome;
|
101 |
Â
font-size: 24px;
|
102 |
Â
content: "\f00d";
|
7 |
Â
left: 0;
|
8 |
Â
z-index: 9999;
|
9 |
Â
overflow: hidden;
|
10 |
+
border-bottom: 21px white solid; }
|
11 |
Â
#cboxOverlay{position:fixed; width:100%; height:100%;}
|
12 |
Â
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
|
13 |
Â
#cboxContent{position:relative;}
|
14 |
Â
#cboxLoadedContent{overflow:auto;}
|
15 |
Â
#cboxTitle{margin:0;}
|
16 |
+
|
17 |
+
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute;top:50%;left:45%;width:auto;}
|
18 |
+
|
19 |
Â
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
|
20 |
Â
.cboxPhoto{float:left; margin:auto; border:0; display:block;}
|
21 |
Â
.cboxIframe{width:100%; height:100%; display:block; border:0;}
|
35 |
Â
#cboxError{padding:50px; border:1px solid #ccc;}
|
36 |
Â
#cboxLoadedContent{ }
|
37 |
Â
#cboxTitle{position: absolute;
|
38 |
+
top: -34px;
|
39 |
Â
left: -11px;
|
40 |
Â
color: #ccc;
|
41 |
+
font-size: 100%;
|
42 |
Â
font-weight: bold;
|
43 |
Â
}
|
44 |
Â
#cboxCurrent{position: absolute;
|
45 |
+
top: -34px;
|
46 |
Â
right: 11px;
|
47 |
Â
color: #ccc;
|
48 |
+
font-size: 100%;
|
49 |
+
}
|
50 |
+
|
51 |
+
#cboxLoadingGraphic {
|
52 |
+
color: #333;
|
53 |
+
-webkit-animation: fa-spin 2s infinite linear;
|
54 |
+
animation: fa-spin 2s infinite linear;
|
55 |
+
}
|
56 |
+
|
57 |
+
@keyframes fa-spin {
|
58 |
+
0% {
|
59 |
+
-webkit-transform: rotate(0deg);
|
60 |
+
transform: rotate(0deg);
|
61 |
+
}
|
62 |
+
100% {
|
63 |
+
-webkit-transform: rotate(359deg);
|
64 |
+
transform: rotate(359deg);
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
#cboxLoadingGraphic:before {
|
69 |
+
font-family: FontAwesome;
|
70 |
+
content: "\f1ce";
|
71 |
+
font-size: 24px;
|
72 |
Â
}
|
Â
|
|
73 |
Â
|
74 |
Â
/* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
|
75 |
Â
#cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
|
79 |
Â
#cboxSlideshow{position:absolute; top:-20px; right:90px; color:#fff;}
|
80 |
Â
|
81 |
Â
#cboxPrevious, #cboxNext{
|
82 |
+
visibility: hidden;
|
83 |
+
font-size: 0px;
|
84 |
Â
position:absolute;
|
85 |
Â
margin-top: -30px;
|
86 |
Â
top:50%;
|
87 |
+
width:50%;
|
88 |
Â
height:100px;
|
89 |
Â
padding: 10px;
|
90 |
Â
color: #ccc;
|
94 |
Â
}
|
95 |
Â
#cboxPrevious{
|
96 |
Â
left: 5px;
|
97 |
+
text-align: left;
|
98 |
Â
}
|
99 |
Â
#cboxPrevious:before{
|
100 |
+
visibility: visible;
|
101 |
Â
font-size: 72px;
|
102 |
Â
font-family: FontAwesome;
|
103 |
Â
content: "\f104";
|
106 |
Â
#cboxPrevious:hover{color: #fff;}
|
107 |
Â
#cboxNext{
|
108 |
Â
right: 15px;
|
109 |
+
text-align: right;
|
110 |
Â
}
|
111 |
Â
#cboxNext:before{
|
112 |
+
visibility: visible;
|
113 |
Â
font-size: 72px;
|
114 |
Â
font-family: FontAwesome;
|
115 |
Â
content: "\f105";
|
117 |
Â
}
|
118 |
Â
#cboxNext:hover{color: #fff;}
|
119 |
Â
#cboxClose{
|
120 |
+
visibility: hidden;
|
121 |
Â
position:absolute;
|
122 |
+
top: -30px;
|
123 |
Â
right: -21px;
|
124 |
Â
display:block;
|
125 |
Â
width: 24px;
|
128 |
Â
outline: 0;
|
129 |
Â
}
|
130 |
Â
#cboxClose:before{
|
131 |
+
visibility: visible;
|
132 |
Â
font-family: FontAwesome;
|
133 |
Â
font-size: 24px;
|
134 |
Â
content: "\f00d";
|
helpers/db.php
CHANGED
@@ -287,6 +287,28 @@ class GalleryDbHelper extends GalleryPlugin {
|
|
287 |
Â
return false;
|
288 |
Â
}
|
289 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
290 |
Â
function insert_query($model = null) {
|
291 |
Â
if (!empty($model)) {
|
292 |
Â
global $wpdb;
|
287 |
Â
return false;
|
288 |
Â
}
|
289 |
Â
|
290 |
+
function delete_all($conditions = null) {
|
291 |
+
global $wpdb;
|
292 |
+
|
293 |
+
$query = "DELETE FROM " . $this -> {$this -> model}() -> table;
|
294 |
+
|
295 |
+
if (!empty($conditions)) {
|
296 |
+
$query .= " WHERE";
|
297 |
+
$c = 1;
|
298 |
+
foreach ($conditions as $ckey => $cval) {
|
299 |
+
$query .= " `" . $ckey . "` = '" . $cval . "'";
|
300 |
+
if ($c < count($conditions)) {
|
301 |
+
$query .= " AND";
|
302 |
+
}
|
303 |
+
|
304 |
+
$c++;
|
305 |
+
}
|
306 |
+
}
|
307 |
+
|
308 |
+
$wpdb -> query($query);
|
309 |
+
return true;
|
310 |
+
}
|
311 |
+
|
312 |
Â
function insert_query($model = null) {
|
313 |
Â
if (!empty($model)) {
|
314 |
Â
global $wpdb;
|
helpers/form.php
CHANGED
@@ -22,7 +22,7 @@ class GalleryFormHelper extends GalleryPlugin {
|
|
22 |
Â
return $hidden;
|
23 |
Â
}
|
24 |
Â
|
25 |
-
function text($name =
|
26 |
Â
$defaults = array(
|
27 |
Â
'id' => (empty($args['id'])) ? $name : $args['id'],
|
28 |
Â
'width' => '100%',
|
22 |
Â
return $hidden;
|
23 |
Â
}
|
24 |
Â
|
25 |
+
function text($name = null, $args = array()) {
|
26 |
Â
$defaults = array(
|
27 |
Â
'id' => (empty($args['id'])) ? $name : $args['id'],
|
28 |
Â
'width' => '100%',
|
helpers/html.php
CHANGED
@@ -73,9 +73,9 @@ class GalleryHtmlHelper extends GalleryPlugin {
|
|
73 |
Â
return false;
|
74 |
Â
}
|
75 |
Â
|
76 |
-
function link($name =
|
77 |
Â
$defaults = array(
|
78 |
-
'title' => (empty($args['title'])) ? $
|
79 |
Â
'target' => "_self",
|
80 |
Â
'class' => "wpco",
|
81 |
Â
'rel' => "",
|
@@ -191,7 +191,7 @@ class GalleryHtmlHelper extends GalleryPlugin {
|
|
191 |
Â
return false;
|
192 |
Â
}
|
193 |
Â
|
194 |
-
function field_name($name =
|
195 |
Â
if (!empty($name)) {
|
196 |
Â
if ($mn = $this -> strip_mn($name)) {
|
197 |
Â
return $mn[1] . '[' . $mn[2] . ']';
|
@@ -201,7 +201,7 @@ class GalleryHtmlHelper extends GalleryPlugin {
|
|
201 |
Â
return $name;
|
202 |
Â
}
|
203 |
Â
|
204 |
-
function field_error($name =
|
205 |
Â
if (!empty($name)) {
|
206 |
Â
if ($mn = $this -> strip_mn($name)) {
|
207 |
Â
$errors = array();
|
@@ -299,18 +299,6 @@ class GalleryHtmlHelper extends GalleryPlugin {
|
|
299 |
Â
} else {
|
300 |
Â
return $pathinfo['filename'];
|
301 |
Â
}
|
302 |
-
|
303 |
-
/*$extArray = preg_split("/[\.]/", $filename);
|
304 |
-
|
305 |
-
if ($return == 'ext') {
|
306 |
-
$p = count($extArray) - 1;
|
307 |
-
$extension = $extArray[$p];
|
308 |
-
return strtolower($extension);
|
309 |
-
} else {
|
310 |
-
$p = count($extArray) - 2;
|
311 |
-
$filename = $extArray[$p];
|
312 |
-
return $filename;
|
313 |
-
}*/
|
314 |
Â
}
|
315 |
Â
|
316 |
Â
return false;
|
73 |
Â
return false;
|
74 |
Â
}
|
75 |
Â
|
76 |
+
function link($name = null, $href = '/', $args = array()) {
|
77 |
Â
$defaults = array(
|
78 |
+
'title' => (empty($args['title'])) ? $name : $args['title'],
|
79 |
Â
'target' => "_self",
|
80 |
Â
'class' => "wpco",
|
81 |
Â
'rel' => "",
|
191 |
Â
return false;
|
192 |
Â
}
|
193 |
Â
|
194 |
+
function field_name($name = null) {
|
195 |
Â
if (!empty($name)) {
|
196 |
Â
if ($mn = $this -> strip_mn($name)) {
|
197 |
Â
return $mn[1] . '[' . $mn[2] . ']';
|
201 |
Â
return $name;
|
202 |
Â
}
|
203 |
Â
|
204 |
+
function field_error($name = null, $el = "p") {
|
205 |
Â
if (!empty($name)) {
|
206 |
Â
if ($mn = $this -> strip_mn($name)) {
|
207 |
Â
$errors = array();
|
299 |
Â
} else {
|
300 |
Â
return $pathinfo['filename'];
|
301 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
302 |
Â
}
|
303 |
Â
|
304 |
Â
return false;
|
helpers/metabox.php
CHANGED
@@ -31,6 +31,10 @@ class GalleryMetaboxHelper extends GalleryPlugin {
|
|
31 |
Â
$this -> render('metaboxes' . DS . 'settings-wprelated', false, true, 'admin');
|
32 |
Â
}
|
33 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
34 |
Â
function settings_linksimages() {
|
35 |
Â
$this -> render('metaboxes' . DS . 'settings-linksimages', false, true, 'admin');
|
36 |
Â
}
|
31 |
Â
$this -> render('metaboxes' . DS . 'settings-wprelated', false, true, 'admin');
|
32 |
Â
}
|
33 |
Â
|
34 |
+
function settings_postspages() {
|
35 |
+
$this -> render('metaboxes' . DS . 'settings-postspages', false, true, 'admin');
|
36 |
+
}
|
37 |
+
|
38 |
Â
function settings_linksimages() {
|
39 |
Â
$this -> render('metaboxes' . DS . 'settings-linksimages', false, true, 'admin');
|
40 |
Â
}
|
js/colorbox.js
DELETED
@@ -1,1086 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
Colorbox v1.4.37 - 2014-02-11
|
3 |
-
jQuery lightbox and modal window plugin
|
4 |
-
(c) 2014 Jack Moore - http://www.jacklmoore.com/colorbox
|
5 |
-
license: http://www.opensource.org/licenses/mit-license.php
|
6 |
-
*/
|
7 |
-
(function ($, document, window) {
|
8 |
-
var
|
9 |
-
// Default settings object.
|
10 |
-
// See http://jacklmoore.com/colorbox for details.
|
11 |
-
defaults = {
|
12 |
-
// data sources
|
13 |
-
html: false,
|
14 |
-
photo: false,
|
15 |
-
iframe: false,
|
16 |
-
inline: false,
|
17 |
-
|
18 |
-
// behavior and appearance
|
19 |
-
transition: "elastic",
|
20 |
-
speed: 300,
|
21 |
-
fadeOut: 300,
|
22 |
-
width: false,
|
23 |
-
initialWidth: "600",
|
24 |
-
innerWidth: false,
|
25 |
-
maxWidth: false,
|
26 |
-
height: false,
|
27 |
-
initialHeight: "450",
|
28 |
-
innerHeight: false,
|
29 |
-
maxHeight: false,
|
30 |
-
scalePhotos: true,
|
31 |
-
scrolling: true,
|
32 |
-
href: false,
|
33 |
-
title: false,
|
34 |
-
rel: false,
|
35 |
-
opacity: 0.9,
|
36 |
-
preloading: true,
|
37 |
-
className: false,
|
38 |
-
overlayClose: true,
|
39 |
-
escKey: true,
|
40 |
-
arrowKey: true,
|
41 |
-
top: false,
|
42 |
-
bottom: false,
|
43 |
-
left: false,
|
44 |
-
right: false,
|
45 |
-
fixed: false,
|
46 |
-
data: undefined,
|
47 |
-
closeButton: true,
|
48 |
-
fastIframe: true,
|
49 |
-
open: false,
|
50 |
-
reposition: true,
|
51 |
-
loop: true,
|
52 |
-
slideshow: false,
|
53 |
-
slideshowAuto: true,
|
54 |
-
slideshowSpeed: 2500,
|
55 |
-
slideshowStart: "start slideshow",
|
56 |
-
slideshowStop: "stop slideshow",
|
57 |
-
photoRegex: /\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr)((#|\?).*)?$/i,
|
58 |
-
|
59 |
-
// alternate image paths for high-res displays
|
60 |
-
retinaImage: false,
|
61 |
-
retinaUrl: false,
|
62 |
-
retinaSuffix: '@2x.$1',
|
63 |
-
|
64 |
-
// internationalization
|
65 |
-
current: "image {current} of {total}",
|
66 |
-
previous: "previous",
|
67 |
-
next: "next",
|
68 |
-
close: "close",
|
69 |
-
xhrError: "This content failed to load.",
|
70 |
-
imgError: "This image failed to load.",
|
71 |
-
|
72 |
-
// accessbility
|
73 |
-
returnFocus: true,
|
74 |
-
trapFocus: true,
|
75 |
-
|
76 |
-
// callbacks
|
77 |
-
onOpen: false,
|
78 |
-
onLoad: false,
|
79 |
-
onComplete: false,
|
80 |
-
onCleanup: false,
|
81 |
-
onClosed: false
|
82 |
-
},
|
83 |
-
|
84 |
-
// Abstracting the HTML and event identifiers for easy rebranding
|
85 |
-
colorbox = 'colorbox',
|
86 |
-
prefix = 'cbox',
|
87 |
-
boxElement = prefix + 'Element',
|
88 |
-
|
89 |
-
// Events
|
90 |
-
event_open = prefix + '_open',
|
91 |
-
event_load = prefix + '_load',
|
92 |
-
event_complete = prefix + '_complete',
|
93 |
-
event_cleanup = prefix + '_cleanup',
|
94 |
-
event_closed = prefix + '_closed',
|
95 |
-
event_purge = prefix + '_purge',
|
96 |
-
|
97 |
-
// Cached jQuery Object Variables
|
98 |
-
$overlay,
|
99 |
-
$box,
|
100 |
-
$wrap,
|
101 |
-
$content,
|
102 |
-
$topBorder,
|
103 |
-
$leftBorder,
|
104 |
-
$rightBorder,
|
105 |
-
$bottomBorder,
|
106 |
-
$related,
|
107 |
-
$window,
|
108 |
-
$loaded,
|
109 |
-
$loadingBay,
|
110 |
-
$loadingOverlay,
|
111 |
-
$title,
|
112 |
-
$current,
|
113 |
-
$slideshow,
|
114 |
-
$next,
|
115 |
-
$prev,
|
116 |
-
$close,
|
117 |
-
$groupControls,
|
118 |
-
$events = $('<a/>'), // $([]) would be prefered, but there is an issue with jQuery 1.4.2
|
119 |
-
|
120 |
-
// Variables for cached values or use across multiple functions
|
121 |
-
settings,
|
122 |
-
interfaceHeight,
|
123 |
-
interfaceWidth,
|
124 |
-
loadedHeight,
|
125 |
-
loadedWidth,
|
126 |
-
element,
|
127 |
-
index,
|
128 |
-
photo,
|
129 |
-
open,
|
130 |
-
active,
|
131 |
-
closing,
|
132 |
-
loadingTimer,
|
133 |
-
publicMethod,
|
134 |
-
div = "div",
|
135 |
-
className,
|
136 |
-
requests = 0,
|
137 |
-
previousCSS = {},
|
138 |
-
init;
|
139 |
-
|
140 |
-
// ****************
|
141 |
-
// HELPER FUNCTIONS
|
142 |
-
// ****************
|
143 |
-
|
144 |
-
// Convenience function for creating new jQuery objects
|
145 |
-
function $tag(tag, id, css) {
|
146 |
-
var element = document.createElement(tag);
|
147 |
-
|
148 |
-
if (id) {
|
149 |
-
element.id = prefix + id;
|
150 |
-
}
|
151 |
-
|
152 |
-
if (css) {
|
153 |
-
element.style.cssText = css;
|
154 |
-
}
|
155 |
-
|
156 |
-
return $(element);
|
157 |
-
}
|
158 |
-
|
159 |
-
// Get the window height using innerHeight when available to avoid an issue with iOS
|
160 |
-
// http://bugs.jquery.com/ticket/6724
|
161 |
-
function winheight() {
|
162 |
-
return window.innerHeight ? window.innerHeight : $(window).height();
|
163 |
-
}
|
164 |
-
|
165 |
-
// Determine the next and previous members in a group.
|
166 |
-
function getIndex(increment) {
|
167 |
-
var
|
168 |
-
max = $related.length,
|
169 |
-
newIndex = (index + increment) % max;
|
170 |
-
|
171 |
-
return (newIndex < 0) ? max + newIndex : newIndex;
|
172 |
-
}
|
173 |
-
|
174 |
-
// Convert '%' and 'px' values to integers
|
175 |
-
function setSize(size, dimension) {
|
176 |
-
return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : winheight()) / 100) : 1) * parseInt(size, 10));
|
177 |
-
}
|
178 |
-
|
179 |
-
// Checks an href to see if it is a photo.
|
180 |
-
// There is a force photo option (photo: true) for hrefs that cannot be matched by the regex.
|
181 |
-
function isImage(settings, url) {
|
182 |
-
return settings.photo || settings.photoRegex.test(url);
|
183 |
-
}
|
184 |
-
|
185 |
-
function retinaUrl(settings, url) {
|
186 |
-
return settings.retinaUrl && window.devicePixelRatio > 1 ? url.replace(settings.photoRegex, settings.retinaSuffix) : url;
|
187 |
-
}
|
188 |
-
|
189 |
-
function trapFocus(e) {
|
190 |
-
if ('contains' in $box[0] && !$box[0].contains(e.target)) {
|
191 |
-
e.stopPropagation();
|
192 |
-
$box.focus();
|
193 |
-
}
|
194 |
-
}
|
195 |
-
|
196 |
-
// Assigns function results to their respective properties
|
197 |
-
function makeSettings() {
|
198 |
-
var i,
|
199 |
-
data = $.data(element, colorbox);
|
200 |
-
|
201 |
-
if (data == null) {
|
202 |
-
settings = $.extend({}, defaults);
|
203 |
-
if (console && console.log) {
|
204 |
-
console.log('Error: cboxElement missing settings object');
|
205 |
-
}
|
206 |
-
} else {
|
207 |
-
settings = $.extend({}, data);
|
208 |
-
}
|
209 |
-
|
210 |
-
for (i in settings) {
|
211 |
-
if ($.isFunction(settings[i]) && i.slice(0, 2) !== 'on') { // checks to make sure the function isn't one of the callbacks, they will be handled at the appropriate time.
|
212 |
-
settings[i] = settings[i].call(element);
|
213 |
-
}
|
214 |
-
}
|
215 |
-
|
216 |
-
settings.rel = settings.rel || element.rel || $(element).data('rel') || 'nofollow';
|
217 |
-
settings.href = settings.href || $(element).attr('href');
|
218 |
-
settings.title = settings.title || element.title;
|
219 |
-
|
220 |
-
if (typeof settings.href === "string") {
|
221 |
-
settings.href = $.trim(settings.href);
|
222 |
-
}
|
223 |
-
}
|
224 |
-
|
225 |
-
function trigger(event, callback) {
|
226 |
-
// for external use
|
227 |
-
$(document).trigger(event);
|
228 |
-
|
229 |
-
// for internal use
|
230 |
-
$events.triggerHandler(event);
|
231 |
-
|
232 |
-
if ($.isFunction(callback)) {
|
233 |
-
callback.call(element);
|
234 |
-
}
|
235 |
-
}
|
236 |
-
|
237 |
-
|
238 |
-
var slideshow = (function(){
|
239 |
-
var active,
|
240 |
-
className = prefix + "Slideshow_",
|
241 |
-
click = "click." + prefix,
|
242 |
-
timeOut;
|
243 |
-
|
244 |
-
function clear () {
|
245 |
-
clearTimeout(timeOut);
|
246 |
-
}
|
247 |
-
|
248 |
-
function set() {
|
249 |
-
if (settings.loop || $related[index + 1]) {
|
250 |
-
clear();
|
251 |
-
timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed);
|
252 |
-
}
|
253 |
-
}
|
254 |
-
|
255 |
-
function start() {
|
256 |
-
$slideshow
|
257 |
-
.html(settings.slideshowStop)
|
258 |
-
.unbind(click)
|
259 |
-
.one(click, stop);
|
260 |
-
|
261 |
-
$events
|
262 |
-
.bind(event_complete, set)
|
263 |
-
.bind(event_load, clear);
|
264 |
-
|
265 |
-
$box.removeClass(className + "off").addClass(className + "on");
|
266 |
-
}
|
267 |
-
|
268 |
-
function stop() {
|
269 |
-
clear();
|
270 |
-
|
271 |
-
$events
|
272 |
-
.unbind(event_complete, set)
|
273 |
-
.unbind(event_load, clear);
|
274 |
-
|
275 |
-
$slideshow
|
276 |
-
.html(settings.slideshowStart)
|
277 |
-
.unbind(click)
|
278 |
-
.one(click, function () {
|
279 |
-
publicMethod.next();
|
280 |
-
start();
|
281 |
-
});
|
282 |
-
|
283 |
-
$box.removeClass(className + "on").addClass(className + "off");
|
284 |
-
}
|
285 |
-
|
286 |
-
function reset() {
|
287 |
-
active = false;
|
288 |
-
$slideshow.hide();
|
289 |
-
clear();
|
290 |
-
$events
|
291 |
-
.unbind(event_complete, set)
|
292 |
-
.unbind(event_load, clear);
|
293 |
-
$box.removeClass(className + "off " + className + "on");
|
294 |
-
}
|
295 |
-
|
296 |
-
return function(){
|
297 |
-
if (active) {
|
298 |
-
if (!settings.slideshow) {
|
299 |
-
$events.unbind(event_cleanup, reset);
|
300 |
-
reset();
|
301 |
-
}
|
302 |
-
} else {
|
303 |
-
if (settings.slideshow && $related[1]) {
|
304 |
-
active = true;
|
305 |
-
$events.one(event_cleanup, reset);
|
306 |
-
if (settings.slideshowAuto) {
|
307 |
-
start();
|
308 |
-
} else {
|
309 |
-
stop();
|
310 |
-
}
|
311 |
-
$slideshow.show();
|
312 |
-
}
|
313 |
-
}
|
314 |
-
};
|
315 |
-
|
316 |
-
}());
|
317 |
-
|
318 |
-
|
319 |
-
function launch(target) {
|
320 |
-
if (!closing) {
|
321 |
-
|
322 |
-
element = target;
|
323 |
-
|
324 |
-
makeSettings();
|
325 |
-
|
326 |
-
$related = $(element);
|
327 |
-
|
328 |
-
index = 0;
|
329 |
-
|
330 |
-
if (settings.rel !== 'nofollow') {
|
331 |
-
$related = $('.' + boxElement).filter(function () {
|
332 |
-
var data = $.data(this, colorbox),
|
333 |
-
relRelated;
|
334 |
-
|
335 |
-
if (data) {
|
336 |
-
relRelated = $(this).data('rel') || data.rel || this.rel;
|
337 |
-
}
|
338 |
-
|
339 |
-
return (relRelated === settings.rel);
|
340 |
-
});
|
341 |
-
index = $related.index(element);
|
342 |
-
|
343 |
-
// Check direct calls to Colorbox.
|
344 |
-
if (index === -1) {
|
345 |
-
$related = $related.add(element);
|
346 |
-
index = $related.length - 1;
|
347 |
-
}
|
348 |
-
}
|
349 |
-
|
350 |
-
$overlay.css({
|
351 |
-
opacity: parseFloat(settings.opacity),
|
352 |
-
cursor: settings.overlayClose ? "pointer" : "auto",
|
353 |
-
visibility: 'visible'
|
354 |
-
}).show();
|
355 |
-
|
356 |
-
|
357 |
-
if (className) {
|
358 |
-
$box.add($overlay).removeClass(className);
|
359 |
-
}
|
360 |
-
if (settings.className) {
|
361 |
-
$box.add($overlay).addClass(settings.className);
|
362 |
-
}
|
363 |
-
className = settings.className;
|
364 |
-
|
365 |
-
if (settings.closeButton) {
|
366 |
-
$close.html(settings.close).appendTo($content);
|
367 |
-
} else {
|
368 |
-
$close.appendTo('<div/>');
|
369 |
-
}
|
370 |
-
|
371 |
-
if (!open) {
|
372 |
-
open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys.
|
373 |
-
|
374 |
-
// Show colorbox so the sizes can be calculated in older versions of jQuery
|
375 |
-
$box.css({visibility:'hidden', display:'block'});
|
376 |
-
|
377 |
-
$loaded = $tag(div, 'LoadedContent', 'width:0; height:0; overflow:hidden');
|
378 |
-
$content.css({width:'', height:''}).append($loaded);
|
379 |
-
|
380 |
-
// Cache values needed for size calculations
|
381 |
-
interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height();
|
382 |
-
interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width();
|
383 |
-
loadedHeight = $loaded.outerHeight(true);
|
384 |
-
loadedWidth = $loaded.outerWidth(true);
|
385 |
-
|
386 |
-
// Opens inital empty Colorbox prior to content being loaded.
|
387 |
-
settings.w = setSize(settings.initialWidth, 'x');
|
388 |
-
settings.h = setSize(settings.initialHeight, 'y');
|
389 |
-
$loaded.css({width:'', height:settings.h});
|
390 |
-
publicMethod.position();
|
391 |
-
|
392 |
-
trigger(event_open, settings.onOpen);
|
393 |
-
|
394 |
-
$groupControls.add($title).hide();
|
395 |
-
|
396 |
-
$box.focus();
|
397 |
-
|
398 |
-
if (settings.trapFocus) {
|
399 |
-
// Confine focus to the modal
|
400 |
-
// Uses event capturing that is not supported in IE8-
|
401 |
-
if (document.addEventListener) {
|
402 |
-
|
403 |
-
document.addEventListener('focus', trapFocus, true);
|
404 |
-
|
405 |
-
$events.one(event_closed, function () {
|
406 |
-
document.removeEventListener('focus', trapFocus, true);
|
407 |
-
});
|
408 |
-
}
|
409 |
-
}
|
410 |
-
|
411 |
-
// Return focus on closing
|
412 |
-
if (settings.returnFocus) {
|
413 |
-
$events.one(event_closed, function () {
|
414 |
-
$(element).focus();
|
415 |
-
});
|
416 |
-
}
|
417 |
-
}
|
418 |
-
load();
|
419 |
-
}
|
420 |
-
}
|
421 |
-
|
422 |
-
// Colorbox's markup needs to be added to the DOM prior to being called
|
423 |
-
// so that the browser will go ahead and load the CSS background images.
|
424 |
-
function appendHTML() {
|
425 |
-
if (!$box && document.body) {
|
426 |
-
init = false;
|
427 |
-
$window = $(window);
|
428 |
-
$box = $tag(div).attr({
|
429 |
-
id: colorbox,
|
430 |
-
'class': $.support.opacity === false ? prefix + 'IE' : '', // class for optional IE8 & lower targeted CSS.
|
431 |
-
role: 'dialog',
|
432 |
-
tabindex: '-1'
|
433 |
-
}).hide();
|
434 |
-
$overlay = $tag(div, "Overlay").hide();
|
435 |
-
$loadingOverlay = $([$tag(div, "LoadingOverlay")[0],$tag(div, "LoadingGraphic")[0]]);
|
436 |
-
$wrap = $tag(div, "Wrapper");
|
437 |
-
$content = $tag(div, "Content").append(
|
438 |
-
$title = $tag(div, "Title"),
|
439 |
-
$current = $tag(div, "Current"),
|
440 |
-
$prev = $('<button type="button"/>').attr({id:prefix+'Previous'}),
|
441 |
-
$next = $('<button type="button"/>').attr({id:prefix+'Next'}),
|
442 |
-
$slideshow = $tag('button', "Slideshow"),
|
443 |
-
$loadingOverlay
|
444 |
-
);
|
445 |
-
|
446 |
-
$close = $('<button type="button"/>').attr({id:prefix+'Close'});
|
447 |
-
|
448 |
-
$wrap.append( // The 3x3 Grid that makes up Colorbox
|
449 |
-
$tag(div).append(
|
450 |
-
$tag(div, "TopLeft"),
|
451 |
-
$topBorder = $tag(div, "TopCenter"),
|
452 |
-
$tag(div, "TopRight")
|
453 |
-
),
|
454 |
-
$tag(div, false, 'clear:left').append(
|
455 |
-
$leftBorder = $tag(div, "MiddleLeft"),
|
456 |
-
$content,
|
457 |
-
$rightBorder = $tag(div, "MiddleRight")
|
458 |
-
),
|
459 |
-
$tag(div, false, 'clear:left').append(
|
460 |
-
$tag(div, "BottomLeft"),
|
461 |
-
$bottomBorder = $tag(div, "BottomCenter"),
|
462 |
-
$tag(div, "BottomRight")
|
463 |
-
)
|
464 |
-
).find('div div').css({'float': 'left'});
|
465 |
-
|
466 |
-
$loadingBay = $tag(div, false, 'position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;');
|
467 |
-
|
468 |
-
$groupControls = $next.add($prev).add($current).add($slideshow);
|
469 |
-
|
470 |
-
$(document.body).append($overlay, $box.append($wrap, $loadingBay));
|
471 |
-
}
|
472 |
-
}
|
473 |
-
|
474 |
-
// Add Colorbox's event bindings
|
475 |
-
function addBindings() {
|
476 |
-
function clickHandler(e) {
|
477 |
-
// ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt.
|
478 |
-
// See: http://jacklmoore.com/notes/click-events/
|
479 |
-
if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey || e.ctrlKey)) {
|
480 |
-
e.preventDefault();
|
481 |
-
launch(this);
|
482 |
-
}
|
483 |
-
}
|
484 |
-
|
485 |
-
if ($box) {
|
486 |
-
if (!init) {
|
487 |
-
init = true;
|
488 |
-
|
489 |
-
// Anonymous functions here keep the public method from being cached, thereby allowing them to be redefined on the fly.
|
490 |
-
$next.click(function () {
|
491 |
-
publicMethod.next();
|
492 |
-
});
|
493 |
-
$prev.click(function () {
|
494 |
-
publicMethod.prev();
|
495 |
-
});
|
496 |
-
$close.click(function () {
|
497 |
-
publicMethod.close();
|
498 |
-
});
|
499 |
-
$overlay.click(function () {
|
500 |
-
if (settings.overlayClose) {
|
501 |
-
publicMethod.close();
|
502 |
-
}
|
503 |
-
});
|
504 |
-
|
505 |
-
// Key Bindings
|
506 |
-
$(document).bind('keydown.' + prefix, function (e) {
|
507 |
-
var key = e.keyCode;
|
508 |
-
if (open && settings.escKey && key === 27) {
|
509 |
-
e.preventDefault();
|
510 |
-
publicMethod.close();
|
511 |
-
}
|
512 |
-
if (open && settings.arrowKey && $related[1] && !e.altKey) {
|
513 |
-
if (key === 37) {
|
514 |
-
e.preventDefault();
|
515 |
-
$prev.click();
|
516 |
-
} else if (key === 39) {
|
517 |
-
e.preventDefault();
|
518 |
-
$next.click();
|
519 |
-
}
|
520 |
-
}
|
521 |
-
});
|
522 |
-
|
523 |
-
if ($.isFunction($.fn.on)) {
|
524 |
-
// For jQuery 1.7+
|
525 |
-
$(document).on('click.'+prefix, '.'+boxElement, clickHandler);
|
526 |
-
} else {
|
527 |
-
// For jQuery 1.3.x -> 1.6.x
|
528 |
-
// This code is never reached in jQuery 1.9, so do not contact me about 'live' being removed.
|
529 |
-
// This is not here for jQuery 1.9, it's here for legacy users.
|
530 |
-
$('.'+boxElement).live('click.'+prefix, clickHandler);
|
531 |
-
}
|
532 |
-
}
|
533 |
-
return true;
|
534 |
-
}
|
535 |
-
return false;
|
536 |
-
}
|
537 |
-
|
538 |
-
// Don't do anything if Colorbox already exists.
|
539 |
-
if ($.colorbox) {
|
540 |
-
return;
|
541 |
-
}
|
542 |
-
|
543 |
-
// Append the HTML when the DOM loads
|
544 |
-
$(appendHTML);
|
545 |
-
|
546 |
-
|
547 |
-
// ****************
|
548 |
-
// PUBLIC FUNCTIONS
|
549 |
-
// Usage format: $.colorbox.close();
|
550 |
-
// Usage from within an iframe: parent.jQuery.colorbox.close();
|
551 |
-
// ****************
|
552 |
-
|
553 |
-
publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) {
|
554 |
-
var $this = this;
|
555 |
-
|
556 |
-
options = options || {};
|
557 |
-
|
558 |
-
appendHTML();
|
559 |
-
|
560 |
-
if (addBindings()) {
|
561 |
-
if ($.isFunction($this)) { // assume a call to $.colorbox
|
562 |
-
$this = $('<a/>');
|
563 |
-
options.open = true;
|
564 |
-
} else if (!$this[0]) { // colorbox being applied to empty collection
|
565 |
-
return $this;
|
566 |
-
}
|
567 |
-
|
568 |
-
if (callback) {
|
569 |
-
options.onComplete = callback;
|
570 |
-
}
|
571 |
-
|
572 |
-
$this.each(function () {
|
573 |
-
$.data(this, colorbox, $.extend({}, $.data(this, colorbox) || defaults, options));
|
574 |
-
}).addClass(boxElement);
|
575 |
-
|
576 |
-
if (($.isFunction(options.open) && options.open.call($this)) || options.open) {
|
577 |
-
launch($this[0]);
|
578 |
-
}
|
579 |
-
}
|
580 |
-
|
581 |
-
return $this;
|
582 |
-
};
|
583 |
-
|
584 |
-
publicMethod.position = function (speed, loadedCallback) {
|
585 |
-
var
|
586 |
-
css,
|
587 |
-
top = 0,
|
588 |
-
left = 0,
|
589 |
-
offset = $box.offset(),
|
590 |
-
scrollTop,
|
591 |
-
scrollLeft;
|
592 |
-
|
593 |
-
$window.unbind('resize.' + prefix);
|
594 |
-
|
595 |
-
// remove the modal so that it doesn't influence the document width/height
|
596 |
-
$box.css({top: -9e4, left: -9e4});
|
597 |
-
|
598 |
-
scrollTop = $window.scrollTop();
|
599 |
-
scrollLeft = $window.scrollLeft();
|
600 |
-
|
601 |
-
if (settings.fixed) {
|
602 |
-
offset.top -= scrollTop;
|
603 |
-
offset.left -= scrollLeft;
|
604 |
-
$box.css({position: 'fixed'});
|
605 |
-
} else {
|
606 |
-
top = scrollTop;
|
607 |
-
left = scrollLeft;
|
608 |
-
$box.css({position: 'absolute'});
|
609 |
-
}
|
610 |
-
|
611 |
-
// keeps the top and left positions within the browser's viewport.
|
612 |
-
if (settings.right !== false) {
|
613 |
-
left += Math.max($window.width() - settings.w - loadedWidth - interfaceWidth - setSize(settings.right, 'x'), 0);
|
614 |
-
} else if (settings.left !== false) {
|
615 |
-
left += setSize(settings.left, 'x');
|
616 |
-
} else {
|
617 |
-
left += Math.round(Math.max($window.width() - settings.w - loadedWidth - interfaceWidth, 0) / 2);
|
618 |
-
}
|
619 |
-
|
620 |
-
if (settings.bottom !== false) {
|
621 |
-
top += Math.max(winheight() - settings.h - loadedHeight - interfaceHeight - setSize(settings.bottom, 'y'), 0);
|
622 |
-
} else if (settings.top !== false) {
|
623 |
-
top += setSize(settings.top, 'y');
|
624 |
-
} else {
|
625 |
-
top += Math.round(Math.max(winheight() - settings.h - loadedHeight - interfaceHeight, 0) / 2);
|
626 |
-
}
|
627 |
-
|
628 |
-
$box.css({top: offset.top, left: offset.left, visibility:'visible'});
|
629 |
-
|
630 |
-
// this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly,
|
631 |
-
// but it has to be shrank down around the size of div#colorbox when it's done. If not,
|
632 |
-
// it can invoke an obscure IE bug when using iframes.
|
633 |
-
$wrap[0].style.width = $wrap[0].style.height = "9999px";
|
634 |
-
|
635 |
-
function modalDimensions() {
|
636 |
-
$topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = (parseInt($box[0].style.width,10) - interfaceWidth)+'px';
|
637 |
-
$content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = (parseInt($box[0].style.height,10) - interfaceHeight)+'px';
|
638 |
-
}
|
639 |
-
|
640 |
-
css = {width: settings.w + loadedWidth + interfaceWidth, height: settings.h + loadedHeight + interfaceHeight, top: top, left: left};
|
641 |
-
|
642 |
-
// setting the speed to 0 if the content hasn't changed size or position
|
643 |
-
if (speed) {
|
644 |
-
var tempSpeed = 0;
|
645 |
-
$.each(css, function(i){
|
646 |
-
if (css[i] !== previousCSS[i]) {
|
647 |
-
tempSpeed = speed;
|
648 |
-
return;
|
649 |
-
}
|
650 |
-
});
|
651 |
-
speed = tempSpeed;
|
652 |
-
}
|
653 |
-
|
654 |
-
previousCSS = css;
|
655 |
-
|
656 |
-
if (!speed) {
|
657 |
-
$box.css(css);
|
658 |
-
}
|
659 |
-
|
660 |
-
$box.dequeue().animate(css, {
|
661 |
-
duration: speed || 0,
|
662 |
-
complete: function () {
|
663 |
-
modalDimensions();
|
664 |
-
|
665 |
-
active = false;
|
666 |
-
|
667 |
-
// shrink the wrapper down to exactly the size of colorbox to avoid a bug in IE's iframe implementation.
|
668 |
-
$wrap[0].style.width = (settings.w + loadedWidth + interfaceWidth) + "px";
|
669 |
-
$wrap[0].style.height = (settings.h + loadedHeight + interfaceHeight) + "px";
|
670 |
-
|
671 |
-
if (settings.reposition) {
|
672 |
-
setTimeout(function () { // small delay before binding onresize due to an IE8 bug.
|
673 |
-
$window.bind('resize.' + prefix, function(){
|
674 |
-
publicMethod.position();
|
675 |
-
});
|
676 |
-
}, 1);
|
677 |
-
}
|
678 |
-
|
679 |
-
if ($.isFunction(loadedCallback)) {
|
680 |
-
loadedCallback();
|
681 |
-
}
|
682 |
-
},
|
683 |
-
step: modalDimensions
|
684 |
-
});
|
685 |
-
};
|
686 |
-
|
687 |
-
publicMethod.resize = function (options) {
|
688 |
-
var scrolltop;
|
689 |
-
|
690 |
-
if (open) {
|
691 |
-
options = options || {};
|
692 |
-
|
693 |
-
if (options.width) {
|
694 |
-
settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth;
|
695 |
-
}
|
696 |
-
|
697 |
-
if (options.innerWidth) {
|
698 |
-
settings.w = setSize(options.innerWidth, 'x');
|
699 |
-
}
|
700 |
-
|
701 |
-
$loaded.css({width: settings.w});
|
702 |
-
|
703 |
-
if (options.height) {
|
704 |
-
settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight;
|
705 |
-
}
|
706 |
-
|
707 |
-
if (options.innerHeight) {
|
708 |
-
settings.h = setSize(options.innerHeight, 'y');
|
709 |
-
}
|
710 |
-
|
711 |
-
if (!options.innerHeight && !options.height) {
|
712 |
-
scrolltop = $loaded.scrollTop();
|
713 |
-
$loaded.css({height: "auto"});
|
714 |
-
settings.h = $loaded.height();
|
715 |
-
}
|
716 |
-
|
717 |
-
$loaded.css({height: settings.h});
|
718 |
-
|
719 |
-
if(scrolltop) {
|
720 |
-
$loaded.scrollTop(scrolltop);
|
721 |
-
}
|
722 |
-
|
723 |
-
publicMethod.position(settings.transition === "none" ? 0 : settings.speed);
|
724 |
-
}
|
725 |
-
};
|
726 |
-
|
727 |
-
publicMethod.prep = function (object) {
|
728 |
-
if (!open) {
|
729 |
-
return;
|
730 |
-
}
|
731 |
-
|
732 |
-
var callback, speed = settings.transition === "none" ? 0 : settings.speed;
|
733 |
-
|
734 |
-
$loaded.empty().remove(); // Using empty first may prevent some IE7 issues.
|
735 |
-
|
736 |
-
$loaded = $tag(div, 'LoadedContent').append(object);
|
737 |
-
|
738 |
-
function getWidth() {
|
739 |
-
settings.w = settings.w || $loaded.width();
|
740 |
-
settings.w = settings.mw && settings.mw < settings.w ? settings.mw : settings.w;
|
741 |
-
return settings.w;
|
742 |
-
}
|
743 |
-
function getHeight() {
|
744 |
-
settings.h = settings.h || $loaded.height();
|
745 |
-
settings.h = settings.mh && settings.mh < settings.h ? settings.mh : settings.h;
|
746 |
-
return settings.h;
|
747 |
-
}
|
748 |
-
|
749 |
-
$loaded.hide()
|
750 |
-
.appendTo($loadingBay.show())// content has to be appended to the DOM for accurate size calculations.
|
751 |
-
.css({width: getWidth(), overflow: settings.scrolling ? 'auto' : 'hidden'})
|
752 |
-
.css({height: getHeight()})// sets the height independently from the width in case the new width influences the value of height.
|
753 |
-
.prependTo($content);
|
754 |
-
|
755 |
-
$loadingBay.hide();
|
756 |
-
|
757 |
-
// floating the IMG removes the bottom line-height and fixed a problem where IE miscalculates the width of the parent element as 100% of the document width.
|
758 |
-
|
759 |
-
$(photo).css({'float': 'none'});
|
760 |
-
|
761 |
-
callback = function () {
|
762 |
-
var total = $related.length,
|
763 |
-
iframe,
|
764 |
-
frameBorder = 'frameBorder',
|
765 |
-
allowTransparency = 'allowTransparency',
|
766 |
-
complete;
|
767 |
-
|
768 |
-
if (!open) {
|
769 |
-
return;
|
770 |
-
}
|
771 |
-
|
772 |
-
function removeFilter() { // Needed for IE7 & IE8 in versions of jQuery prior to 1.7.2
|
773 |
-
if ($.support.opacity === false) {
|
774 |
-
$box[0].style.removeAttribute('filter');
|
775 |
-
}
|
776 |
-
}
|
777 |
-
|
778 |
-
complete = function () {
|
779 |
-
clearTimeout(loadingTimer);
|
780 |
-
$loadingOverlay.hide();
|
781 |
-
trigger(event_complete, settings.onComplete);
|
782 |
-
};
|
783 |
-
|
784 |
-
|
785 |
-
$title.html(settings.title).add($loaded).show();
|
786 |
-
|
787 |
-
if (total > 1) { // handle grouping
|
788 |
-
if (typeof settings.current === "string") {
|
789 |
-
$current.html(settings.current.replace('{current}', index + 1).replace('{total}', total)).show();
|
790 |
-
}
|
791 |
-
|
792 |
-
$next[(settings.loop || index < total - 1) ? "show" : "hide"]().html(settings.next);
|
793 |
-
$prev[(settings.loop || index) ? "show" : "hide"]().html(settings.previous);
|
794 |
-
|
795 |
-
slideshow();
|
796 |
-
|
797 |
-
// Preloads images within a rel group
|
798 |
-
if (settings.preloading) {
|
799 |
-
$.each([getIndex(-1), getIndex(1)], function(){
|
800 |
-
var src,
|
801 |
-
img,
|
802 |
-
i = $related[this],
|
803 |
-
data = $.data(i, colorbox);
|
804 |
-
|
805 |
-
if (data && data.href) {
|
806 |
-
src = data.href;
|
807 |
-
if ($.isFunction(src)) {
|
808 |
-
src = src.call(i);
|
809 |
-
}
|
810 |
-
} else {
|
811 |
-
src = $(i).attr('href');
|
812 |
-
}
|
813 |
-
|
814 |
-
if (src && isImage(data, src)) {
|
815 |
-
src = retinaUrl(data, src);
|
816 |
-
img = document.createElement('img');
|
817 |
-
img.src = src;
|
818 |
-
}
|
819 |
-
});
|
820 |
-
}
|
821 |
-
} else {
|
822 |
-
$groupControls.hide();
|
823 |
-
}
|
824 |
-
|
825 |
-
if (settings.iframe) {
|
826 |
-
iframe = $tag('iframe')[0];
|
827 |
-
|
828 |
-
if (frameBorder in iframe) {
|
829 |
-
iframe[frameBorder] = 0;
|
830 |
-
}
|
831 |
-
|
832 |
-
if (allowTransparency in iframe) {
|
833 |
-
iframe[allowTransparency] = "true";
|
834 |
-
}
|
835 |
-
|
836 |
-
if (!settings.scrolling) {
|
837 |
-
iframe.scrolling = "no";
|
838 |
-
}
|
839 |
-
|
840 |
-
$(iframe)
|
841 |
-
.attr({
|
842 |
-
src: settings.href,
|
843 |
-
name: (new Date()).getTime(), // give the iframe a unique name to prevent caching
|
844 |
-
'class': prefix + 'Iframe',
|
845 |
-
allowFullScreen : true, // allow HTML5 video to go fullscreen
|
846 |
-
webkitAllowFullScreen : true,
|
847 |
-
mozallowfullscreen : true
|
848 |
-
})
|
849 |
-
.one('load', complete)
|
850 |
-
.appendTo($loaded);
|
851 |
-
|
852 |
-
$events.one(event_purge, function () {
|
853 |
-
iframe.src = "//about:blank";
|
854 |
-
});
|
855 |
-
|
856 |
-
if (settings.fastIframe) {
|
857 |
-
$(iframe).trigger('load');
|
858 |
-
}
|
859 |
-
} else {
|
860 |
-
complete();
|
861 |
-
}
|
862 |
-
|
863 |
-
if (settings.transition === 'fade') {
|
864 |
-
$box.fadeTo(speed, 1, removeFilter);
|
865 |
-
} else {
|
866 |
-
removeFilter();
|
867 |
-
}
|
868 |
-
};
|
869 |
-
|
870 |
-
if (settings.transition === 'fade') {
|
871 |
-
$box.fadeTo(speed, 0, function () {
|
872 |
-
publicMethod.position(0, callback);
|
873 |
-
});
|
874 |
-
} else {
|
875 |
-
publicMethod.position(speed, callback);
|
876 |
-
}
|
877 |
-
};
|
878 |
-
|
879 |
-
function load () {
|
880 |
-
var href, setResize, prep = publicMethod.prep, $inline, request = ++requests;
|
881 |
-
|
882 |
-
active = true;
|
883 |
-
|
884 |
-
photo = false;
|
885 |
-
|
886 |
-
element = $related[index];
|
887 |
-
|
888 |
-
makeSettings();
|
889 |
-
|
890 |
-
trigger(event_purge);
|
891 |
-
|
892 |
-
trigger(event_load, settings.onLoad);
|
893 |
-
|
894 |
-
settings.h = settings.height ?
|
895 |
-
setSize(settings.height, 'y') - loadedHeight - interfaceHeight :
|
896 |
-
settings.innerHeight && setSize(settings.innerHeight, 'y');
|
897 |
-
|
898 |
-
settings.w = settings.width ?
|
899 |
-
setSize(settings.width, 'x') - loadedWidth - interfaceWidth :
|
900 |
-
settings.innerWidth && setSize(settings.innerWidth, 'x');
|
901 |
-
|
902 |
-
// Sets the minimum dimensions for use in image scaling
|
903 |
-
settings.mw = settings.w;
|
904 |
-
settings.mh = settings.h;
|
905 |
-
|
906 |
-
// Re-evaluate the minimum width and height based on maxWidth and maxHeight values.
|
907 |
-
// If the width or height exceed the maxWidth or maxHeight, use the maximum values instead.
|
908 |
-
if (settings.maxWidth) {
|
909 |
-
settings.mw = setSize(settings.maxWidth, 'x') - loadedWidth - interfaceWidth;
|
910 |
-
settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw;
|
911 |
-
}
|
912 |
-
if (settings.maxHeight) {
|
913 |
-
settings.mh = setSize(settings.maxHeight, 'y') - loadedHeight - interfaceHeight;
|
914 |
-
settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh;
|
915 |
-
}
|
916 |
-
|
917 |
-
href = settings.href;
|
918 |
-
|
919 |
-
loadingTimer = setTimeout(function () {
|
920 |
-
$loadingOverlay.show();
|
921 |
-
}, 100);
|
922 |
-
|
923 |
-
if (settings.inline) {
|
924 |
-
// Inserts an empty placeholder where inline content is being pulled from.
|
925 |
-
// An event is bound to put inline content back when Colorbox closes or loads new content.
|
926 |
-
$inline = $tag(div).hide().insertBefore($(href)[0]);
|
927 |
-
|
928 |
-
$events.one(event_purge, function () {
|
929 |
-
$inline.replaceWith($loaded.children());
|
930 |
-
});
|
931 |
-
|
932 |
-
prep($(href));
|
933 |
-
} else if (settings.iframe) {
|
934 |
-
// IFrame element won't be added to the DOM until it is ready to be displayed,
|
935 |
-
// to avoid problems with DOM-ready JS that might be trying to run in that iframe.
|
936 |
-
prep(" ");
|
937 |
-
} else if (settings.html) {
|
938 |
-
prep(settings.html);
|
939 |
-
} else if (isImage(settings, href)) {
|
940 |
-
|
941 |
-
href = retinaUrl(settings, href);
|
942 |
-
|
943 |
-
photo = document.createElement('img');
|
944 |
-
|
945 |
-
$(photo)
|
946 |
-
.addClass(prefix + 'Photo')
|
947 |
-
.bind('error',function () {
|
948 |
-
settings.title = false;
|
949 |
-
prep($tag(div, 'Error').html(settings.imgError));
|
950 |
-
})
|
951 |
-
.one('load', function () {
|
952 |
-
var percent;
|
953 |
-
|
954 |
-
if (request !== requests) {
|
955 |
-
return;
|
956 |
-
}
|
957 |
-
|
958 |
-
$.each(['alt', 'longdesc', 'aria-describedby'], function(i,val){
|
959 |
-
var attr = $(element).attr(val) || $(element).attr('data-'+val);
|
960 |
-
if (attr) {
|
961 |
-
photo.setAttribute(val, attr);
|
962 |
-
}
|
963 |
-
});
|
964 |
-
|
965 |
-
if (settings.retinaImage && window.devicePixelRatio > 1) {
|
966 |
-
photo.height = photo.height / window.devicePixelRatio;
|
967 |
-
photo.width = photo.width / window.devicePixelRatio;
|
968 |
-
}
|
969 |
-
|
970 |
-
if (settings.scalePhotos) {
|
971 |
-
setResize = function () {
|
972 |
-
photo.height -= photo.height * percent;
|
973 |
-
photo.width -= photo.width * percent;
|
974 |
-
};
|
975 |
-
if (settings.mw && photo.width > settings.mw) {
|
976 |
-
percent = (photo.width - settings.mw) / photo.width;
|
977 |
-
setResize();
|
978 |
-
}
|
979 |
-
if (settings.mh && photo.height > settings.mh) {
|
980 |
-
percent = (photo.height - settings.mh) / photo.height;
|
981 |
-
setResize();
|
982 |
-
}
|
983 |
-
}
|
984 |
-
|
985 |
-
if (settings.h) {
|
986 |
-
photo.style.marginTop = Math.max(settings.mh - photo.height, 0) / 2 + 'px';
|
987 |
-
}
|
988 |
-
|
989 |
-
if ($related[1] && (settings.loop || $related[index + 1])) {
|
990 |
-
photo.style.cursor = 'pointer';
|
991 |
-
photo.onclick = function () {
|
992 |
-
publicMethod.next();
|
993 |
-
};
|
994 |
-
}
|
995 |
-
|
996 |
-
photo.style.width = photo.width + 'px';
|
997 |
-
photo.style.height = photo.height + 'px';
|
998 |
-
|
999 |
-
setTimeout(function () { // A pause because Chrome will sometimes report a 0 by 0 size otherwise.
|
1000 |
-
prep(photo);
|
1001 |
-
}, 1);
|
1002 |
-
});
|
1003 |
-
|
1004 |
-
setTimeout(function () { // A pause because Opera 10.6+ will sometimes not run the onload function otherwise.
|
1005 |
-
photo.src = href;
|
1006 |
-
}, 1);
|
1007 |
-
} else if (href) {
|
1008 |
-
$loadingBay.load(href, settings.data, function (data, status) {
|
1009 |
-
if (request === requests) {
|
1010 |
-
prep(status === 'error' ? $tag(div, 'Error').html(settings.xhrError) : $(this).contents());
|
1011 |
-
}
|
1012 |
-
});
|
1013 |
-
}
|
1014 |
-
}
|
1015 |
-
|
1016 |
-
// Navigates to the next page/image in a set.
|
1017 |
-
publicMethod.next = function () {
|
1018 |
-
if (!active && $related[1] && (settings.loop || $related[index + 1])) {
|
1019 |
-
index = getIndex(1);
|
1020 |
-
launch($related[index]);
|
1021 |
-
}
|
1022 |
-
};
|
1023 |
-
|
1024 |
-
publicMethod.prev = function () {
|
1025 |
-
if (!active && $related[1] && (settings.loop || index)) {
|
1026 |
-
index = getIndex(-1);
|
1027 |
-
launch($related[index]);
|
1028 |
-
}
|
1029 |
-
};
|
1030 |
-
|
1031 |
-
// Note: to use this within an iframe use the following format: parent.jQuery.colorbox.close();
|
1032 |
-
publicMethod.close = function () {
|
1033 |
-
if (open && !closing) {
|
1034 |
-
|
1035 |
-
closing = true;
|
1036 |
-
|
1037 |
-
open = false;
|
1038 |
-
|
1039 |
-
trigger(event_cleanup, settings.onCleanup);
|
1040 |
-
|
1041 |
-
$window.unbind('.' + prefix);
|
1042 |
-
|
1043 |
-
$overlay.fadeTo(settings.fadeOut || 0, 0);
|
1044 |
-
|
1045 |
-
$box.stop().fadeTo(settings.fadeOut || 0, 0, function () {
|
1046 |
-
|
1047 |
-
$box.add($overlay).css({'opacity': 1, cursor: 'auto'}).hide();
|
1048 |
-
|
1049 |
-
trigger(event_purge);
|
1050 |
-
|
1051 |
-
$loaded.empty().remove(); // Using empty first may prevent some IE7 issues.
|
1052 |
-
|
1053 |
-
setTimeout(function () {
|
1054 |
-
closing = false;
|
1055 |
-
trigger(event_closed, settings.onClosed);
|
1056 |
-
}, 1);
|
1057 |
-
});
|
1058 |
-
}
|
1059 |
-
};
|
1060 |
-
|
1061 |
-
// Removes changes Colorbox made to the document, but does not remove the plugin.
|
1062 |
-
publicMethod.remove = function () {
|
1063 |
-
if (!$box) { return; }
|
1064 |
-
|
1065 |
-
$box.stop();
|
1066 |
-
$.colorbox.close();
|
1067 |
-
$box.stop().remove();
|
1068 |
-
$overlay.remove();
|
1069 |
-
closing = false;
|
1070 |
-
$box = null;
|
1071 |
-
$('.' + boxElement)
|
1072 |
-
.removeData(colorbox)
|
1073 |
-
.removeClass(boxElement);
|
1074 |
-
|
1075 |
-
$(document).unbind('click.'+prefix);
|
1076 |
-
};
|
1077 |
-
|
1078 |
-
// A method for fetching the current element Colorbox is referencing.
|
1079 |
-
// returns a jQuery object.
|
1080 |
-
publicMethod.element = function () {
|
1081 |
-
return $(element);
|
1082 |
-
};
|
1083 |
-
|
1084 |
-
publicMethod.settings = defaults;
|
1085 |
-
|
1086 |
-
}(jQuery, document, window));
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â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
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
models/slide.php
CHANGED
@@ -171,23 +171,26 @@ class GallerySlide extends GalleryDbHelper {
|
|
171 |
Â
$filename = basename($image_url);
|
172 |
Â
$file_name = GalleryHtmlHelper::strip_ext($filename, "name");
|
173 |
Â
$file_ext = GalleryHtmlHelper::strip_ext($filename, "ext");
|
174 |
-
|
Â
|
|
175 |
Â
$filepath = GalleryHtmlHelper::uploads_path() . DS . $this -> plugin_name . DS;
|
176 |
Â
$filefull = $filepath . $filename;
|
177 |
Â
|
178 |
Â
$issafe = false;
|
179 |
-
$mimes = get_allowed_mime_types();
|
180 |
Â
foreach ($mimes as $type => $mime) {
|
181 |
-
if (strpos($type, $
|
182 |
Â
$issafe = true;
|
183 |
Â
}
|
184 |
Â
}
|
185 |
Â
|
Â
|
|
Â
|
|
186 |
Â
if (empty($issafe) || $issafe == false) {
|
187 |
Â
$this -> errors['image_url'] = __('This file type is not allowed for security reasons', $this -> plugin_name);
|
188 |
-
} else {
|
189 |
-
if (!file_exists($filefull)) {
|
190 |
-
$fh =
|
191 |
Â
fwrite($fh, $image);
|
192 |
Â
fclose($fh);
|
193 |
Â
}
|
171 |
Â
$filename = basename($image_url);
|
172 |
Â
$file_name = GalleryHtmlHelper::strip_ext($filename, "name");
|
173 |
Â
$file_ext = GalleryHtmlHelper::strip_ext($filename, "ext");
|
174 |
+
//$filename = GalleryHtmlHelper::sanitize($file_name) . '.' . $file_ext;
|
175 |
+
$filename = $file_name . '.' . $file_ext;
|
176 |
Â
$filepath = GalleryHtmlHelper::uploads_path() . DS . $this -> plugin_name . DS;
|
177 |
Â
$filefull = $filepath . $filename;
|
178 |
Â
|
179 |
Â
$issafe = false;
|
180 |
+
$mimes = get_allowed_mime_types();
|
181 |
Â
foreach ($mimes as $type => $mime) {
|
182 |
+
if (strpos($type, $file_ext) !== false) {
|
183 |
Â
$issafe = true;
|
184 |
Â
}
|
185 |
Â
}
|
186 |
Â
|
187 |
+
$this -> data -> image = $filename;
|
188 |
+
|
189 |
Â
if (empty($issafe) || $issafe == false) {
|
190 |
Â
$this -> errors['image_url'] = __('This file type is not allowed for security reasons', $this -> plugin_name);
|
191 |
+
} else {
|
192 |
+
if (true || !file_exists($filefull)) {
|
193 |
+
$fh = fopen($filefull, "w");
|
194 |
Â
fwrite($fh, $image);
|
195 |
Â
fclose($fh);
|
196 |
Â
}
|
models/slideshow.php
CHANGED
@@ -58,7 +58,7 @@ if (!class_exists('slideshow_lite')) {
|
|
58 |
Â
|
59 |
Â
$wp_admin_bar -> add_node($args);
|
60 |
Â
|
61 |
-
$galleries_count = $this -> Gallery -> count();
|
62 |
Â
$galleries_percentage = (($galleries_count / 1) * 100);
|
63 |
Â
$gallerieslimit_title = sprintf(__('%s of 1 (%s%) galleries used', $this -> plugin_name), $galleries_count, $galleries_percentage);
|
64 |
Â
|
@@ -72,7 +72,7 @@ if (!class_exists('slideshow_lite')) {
|
|
72 |
Â
|
73 |
Â
$wp_admin_bar -> add_node($args);
|
74 |
Â
|
75 |
-
$slides_count = $this -> Slide -> count();
|
76 |
Â
$slides_percentage = (($slides_count / 20) * 100);
|
77 |
Â
$slideslimit_title = sprintf(__('%s of 20 (%s%) slides used', $this -> plugin_name), $slides_count, $slides_percentage);
|
78 |
Â
|
@@ -111,7 +111,7 @@ if (!class_exists('slideshow_lite')) {
|
|
111 |
Â
$slideshow_lite_gallerylimit = 1;
|
112 |
Â
|
113 |
Â
if (!empty($slideshow_lite_gallerylimit) && $slideshow_lite_gallerylimit > 0) {
|
114 |
-
$galleries_count = $this -> Gallery -> count();
|
115 |
Â
|
116 |
Â
if (empty($data -> id) && $galleries_count >= $slideshow_lite_gallerylimit) {
|
117 |
Â
$error = sprintf(__('Gallery limit of %s has been reached, you can %s for unlimited.', $this -> plugin_name), $slideshow_lite_gallerylimit, '<a href="' . admin_url('admin.php?page=' . $this -> sections -> lite_upgrade) . '">Upgrade to PRO</a>');
|
@@ -127,7 +127,7 @@ if (!class_exists('slideshow_lite')) {
|
|
127 |
Â
$slideshow_lite_slidelimit = 20;
|
128 |
Â
|
129 |
Â
if (!empty($slideshow_lite_slidelimit) && $slideshow_lite_slidelimit > 0) {
|
130 |
-
$slides_count = $this -> Slide -> count();
|
131 |
Â
|
132 |
Â
if (empty($data -> id) && $slides_count >= $slideshow_lite_slidelimit) {
|
133 |
Â
$error = sprintf(__('Slides limit of %s has been reached, you can %s for unlimited.', $this -> plugin_name), $slideshow_lite_slidelimit, '<a href="' . admin_url('admin.php?page=' . $this -> sections -> lite_upgrade) . '">Upgrade to PRO</a>');
|
58 |
Â
|
59 |
Â
$wp_admin_bar -> add_node($args);
|
60 |
Â
|
61 |
+
$galleries_count = $this -> Gallery() -> count();
|
62 |
Â
$galleries_percentage = (($galleries_count / 1) * 100);
|
63 |
Â
$gallerieslimit_title = sprintf(__('%s of 1 (%s%) galleries used', $this -> plugin_name), $galleries_count, $galleries_percentage);
|
64 |
Â
|
72 |
Â
|
73 |
Â
$wp_admin_bar -> add_node($args);
|
74 |
Â
|
75 |
+
$slides_count = $this -> Slide() -> count();
|
76 |
Â
$slides_percentage = (($slides_count / 20) * 100);
|
77 |
Â
$slideslimit_title = sprintf(__('%s of 20 (%s%) slides used', $this -> plugin_name), $slides_count, $slides_percentage);
|
78 |
Â
|
111 |
Â
$slideshow_lite_gallerylimit = 1;
|
112 |
Â
|
113 |
Â
if (!empty($slideshow_lite_gallerylimit) && $slideshow_lite_gallerylimit > 0) {
|
114 |
+
$galleries_count = $this -> Gallery() -> count();
|
115 |
Â
|
116 |
Â
if (empty($data -> id) && $galleries_count >= $slideshow_lite_gallerylimit) {
|
117 |
Â
$error = sprintf(__('Gallery limit of %s has been reached, you can %s for unlimited.', $this -> plugin_name), $slideshow_lite_gallerylimit, '<a href="' . admin_url('admin.php?page=' . $this -> sections -> lite_upgrade) . '">Upgrade to PRO</a>');
|
127 |
Â
$slideshow_lite_slidelimit = 20;
|
128 |
Â
|
129 |
Â
if (!empty($slideshow_lite_slidelimit) && $slideshow_lite_slidelimit > 0) {
|
130 |
+
$slides_count = $this -> Slide() -> count();
|
131 |
Â
|
132 |
Â
if (empty($data -> id) && $slides_count >= $slideshow_lite_slidelimit) {
|
133 |
Â
$error = sprintf(__('Slides limit of %s has been reached, you can %s for unlimited.', $this -> plugin_name), $slideshow_lite_slidelimit, '<a href="' . admin_url('admin.php?page=' . $this -> sections -> lite_upgrade) . '">Upgrade to PRO</a>');
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: contrid
|
|
3 |
Â
Donate link: http://tribulant.com/
|
4 |
Â
Tags: wordpress plugins, wordpress slideshow gallery, slides, slideshow, image gallery, images, gallery, featured content, content gallery, javascript, javascript slideshow, slideshow gallery
|
5 |
Â
Requires at least: 3.1
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 1.
|
8 |
Â
|
9 |
Â
Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website
|
10 |
Â
|
@@ -175,6 +175,36 @@ There is an "Images Tester" utility under Slideshow > Configuration on the right
|
|
175 |
Â
|
176 |
Â
== Changelog ==
|
177 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
178 |
Â
= 1.5.3.4 =
|
179 |
Â
* ADD: FontAwesome icons throughout
|
180 |
Â
* ADD: WPML multilingual support
|
3 |
Â
Donate link: http://tribulant.com/
|
4 |
Â
Tags: wordpress plugins, wordpress slideshow gallery, slides, slideshow, image gallery, images, gallery, featured content, content gallery, javascript, javascript slideshow, slideshow gallery
|
5 |
Â
Requires at least: 3.1
|
6 |
+
Tested up to: 4.4
|
7 |
+
Stable tag: 1.6
|
8 |
Â
|
9 |
Â
Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website
|
10 |
Â
|
175 |
Â
|
176 |
Â
== Changelog ==
|
177 |
Â
|
178 |
+
= 1.6 =
|
179 |
+
* ADD: Excerpt length and more settings for featured posts in slideshow
|
180 |
+
* ADD: Assign/set/remove galleries bulk action for slides in admin
|
181 |
+
* ADD: jQuery UI effects - Blind, Clip, Explode, Puff, Pulsate, Shake, etc.
|
182 |
+
* ADD: Touch/mobile swipe gestures support
|
183 |
+
* ADD: "Per Page" setting in admin sections
|
184 |
+
* ADD: Max height setting for auto height
|
185 |
+
* ADD: Set a delay on the information bar
|
186 |
+
* IMPROVE: Upgrade Colorbox and load from CDN
|
187 |
+
* IMPROVE: WordPress 4.4 headings changes compatibility
|
188 |
+
* IMPROVE: Headings in admin settings for easier configuration
|
189 |
+
* IMPROVE: Use post_id="X" to pull current post/page ID automatically
|
190 |
+
* IMPROVE: Make sure links in information bar is the same colour as information text
|
191 |
+
* IMPROVE: WordPress configured date format in admin sections for dates
|
192 |
+
* IMPROVE: Select2 drop downs in admin sections
|
193 |
+
* IMPROVE: Performance improvements with PHP class autoload
|
194 |
+
* IMPROVE: Remove wp_head/wp_footer checks
|
195 |
+
* IMPROVE: Check that slide 'type' database field is present
|
196 |
+
* FIX: Featured posts featuredtype parameter ineffective
|
197 |
+
* FIX: "Submit Serial Key" permission/access error
|
198 |
+
* FIX: Sorting of slides within gallery in admin not working
|
199 |
+
* FIX: Possible XSS security issues
|
200 |
+
* FIX: HTML validation errors
|
201 |
+
* FIX: Specify URL slides not always pulling image correctly
|
202 |
+
* FIX: Specify URL "File type is not allowed..."
|
203 |
+
* FIX: Colorbox images wrong path (404 Not Found)
|
204 |
+
* FIX: Information bar not showing excerpt of post correctly
|
205 |
+
* FIX: Post/page media images description not showing in info bar
|
206 |
+
* FIX: Thumbnails don't show on some browsers (Android, Opera, Safari, etc)
|
207 |
+
|
208 |
Â
= 1.5.3.4 =
|
209 |
Â
* ADD: FontAwesome icons throughout
|
210 |
Â
* ADD: WPML multilingual support
|
slideshow-gallery-plugin.php
CHANGED
@@ -4,7 +4,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
|
4 |
Â
|
5 |
Â
class GalleryPlugin extends GalleryCheckinit {
|
6 |
Â
|
7 |
-
var $version = '1.
|
8 |
Â
var $plugin_name;
|
9 |
Â
var $plugin_base;
|
10 |
Â
var $pre = 'Gallery';
|
@@ -23,6 +23,26 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
23 |
Â
var $models = array('Slide', 'Gallery', 'GallerySlides');
|
24 |
Â
var $debugging = false; //set to "true" to turn on debugging
|
25 |
Â
var $debug_level = 2; //set to 2 for PHP and DB errors or 1 for just DB errors
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
26 |
Â
|
27 |
Â
function register_plugin($name, $base) {
|
28 |
Â
$this -> plugin_name = $name;
|
@@ -169,13 +189,13 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
169 |
Â
if (!empty($_REQUEST['item'])) {
|
170 |
Â
foreach ($_REQUEST['item'] as $order => $slide_id) {
|
171 |
Â
if (empty($_REQUEST['gallery_id'])) {
|
172 |
-
$this -> Slide -> save_field('order', ($order + 1), array('id' => $slide_id));
|
173 |
Â
} else {
|
174 |
-
$this -> GallerySlides -> save_field('order', ($order + 1), array('slide_id' => $slide_id, 'gallery_id' => $_REQUEST['gallery_id']));
|
175 |
Â
}
|
176 |
Â
}
|
177 |
Â
|
178 |
-
|
179 |
Â
}
|
180 |
Â
|
181 |
Â
exit();
|
@@ -223,8 +243,10 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
223 |
Â
}
|
224 |
Â
}
|
225 |
Â
}
|
Â
|
|
Â
|
|
226 |
Â
|
227 |
-
if (!empty($this -> models)) {
|
228 |
Â
foreach ($this -> models as $model) {
|
229 |
Â
$mfile = dirname(__FILE__) . DS . 'models' . DS . strtolower($model) . '.php';
|
230 |
Â
|
@@ -240,7 +262,7 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
240 |
Â
}
|
241 |
Â
}
|
242 |
Â
}
|
243 |
-
}
|
244 |
Â
}
|
245 |
Â
|
246 |
Â
function updating_plugin() {
|
@@ -261,7 +283,7 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
261 |
Â
if (version_compare($cur_version, "1.4.8") < 0) {
|
262 |
Â
$this -> initialize_options();
|
263 |
Â
|
264 |
-
$query = "ALTER TABLE `" . $this -> Slide -> table . "` CHANGE `image` `image` TEXT NOT NULL;";
|
265 |
Â
$wpdb -> query($query);
|
266 |
Â
|
267 |
Â
$version = "1.4.8";
|
@@ -270,18 +292,18 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
270 |
Â
if (version_compare($cur_version, "1.5.3") < 0) {
|
271 |
Â
$this -> initialize_options();
|
272 |
Â
|
273 |
-
$query = "ALTER TABLE `" . $this -> Slide -> table . "` CHANGE `type` `type` ENUM('media','file','url') NOT NULL DEFAULT 'media'";
|
274 |
Â
$wpdb -> query($query);
|
275 |
Â
|
276 |
Â
|
277 |
Â
$version = "1.5.3";
|
278 |
Â
}
|
279 |
Â
|
280 |
-
if (version_compare($cur_version, "1.
|
281 |
Â
|
282 |
Â
$this -> initialize_options();
|
283 |
Â
|
284 |
-
$version = "1.
|
285 |
Â
}
|
286 |
Â
|
287 |
Â
//the current version is older.
|
@@ -459,15 +481,16 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
459 |
Â
if (!empty($model)) {
|
460 |
Â
global $paginate;
|
461 |
Â
$paginate = $this -> vendor('Paginate');
|
462 |
-
$paginate -> table = $this -> {$model} -> table;
|
463 |
-
$paginate -> sub = (empty($sub)) ? $this -> sections -> {$this -> {$model} -> controller} : $sub;
|
464 |
Â
$paginate -> fields = (empty($fields)) ? '*' : $fields;
|
465 |
Â
$paginate -> where = (empty($conditions)) ? false : $conditions;
|
466 |
Â
$paginate -> searchterm = (empty($searchterm)) ? false : $searchterm;
|
467 |
Â
$paginate -> per_page = $per_page;
|
468 |
Â
$paginate -> order = $order;
|
469 |
Â
|
470 |
-
$
|
Â
|
|
471 |
Â
|
472 |
Â
if (!empty($data)) {
|
473 |
Â
$newdata = array();
|
@@ -566,7 +589,10 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
566 |
Â
wp_enqueue_script('jquery');
|
567 |
Â
|
568 |
Â
if (is_admin()) {
|
569 |
-
|
Â
|
|
Â
|
|
Â
|
|
570 |
Â
wp_enqueue_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), false, 1);
|
571 |
Â
wp_enqueue_script('wp-color-picker', admin_url('js/color-picker.min.js'), array( 'iris' ), false, 1);
|
572 |
Â
|
@@ -574,7 +600,7 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
574 |
Â
wp_enqueue_script('jquery-ui-tooltip');
|
575 |
Â
wp_enqueue_script('jquery-ui-slider');
|
576 |
Â
|
577 |
-
if ($
|
578 |
Â
wp_enqueue_script('common');
|
579 |
Â
wp_enqueue_script('wp-lists');
|
580 |
Â
wp_enqueue_script('postbox');
|
@@ -582,23 +608,25 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
582 |
Â
wp_enqueue_script('settings-editor', $this -> render_url('js/settings-editor.js', "admin"), array('jquery'), '1.0');
|
583 |
Â
}
|
584 |
Â
|
585 |
-
if ($
|
586 |
Â
wp_enqueue_script('jquery-ui-sortable');
|
587 |
Â
}
|
588 |
Â
|
589 |
-
if ($
|
590 |
Â
wp_enqueue_media();
|
591 |
Â
}
|
592 |
Â
|
593 |
Â
add_thickbox();
|
594 |
Â
}
|
595 |
Â
|
596 |
-
wp_enqueue_script('colorbox',
|
Â
|
|
597 |
Â
wp_enqueue_script($this -> plugin_name . 'admin', $this -> render_url('js/admin.js', "admin"), null, '1.0');
|
598 |
Â
} else {
|
599 |
Â
wp_enqueue_script($this -> plugin_name, $this -> render_url('js/gallery.js', "default"), null, '1.0');
|
600 |
-
wp_enqueue_script('colorbox',
|
601 |
-
wp_enqueue_script('jquery-effects-core');
|
Â
|
|
602 |
Â
}
|
603 |
Â
|
604 |
Â
return true;
|
@@ -635,9 +663,11 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
635 |
Â
wp_enqueue_style('wp-color-picker');
|
636 |
Â
wp_enqueue_style('jquery-ui', $this -> render_url('css/jquery-ui.css', "admin"), null, "1.0", "all");
|
637 |
Â
wp_enqueue_style('colorbox', $this -> render_url('css/colorbox.css', "admin"), null, "1.3.19", "all");
|
638 |
-
wp_enqueue_style('
|
Â
|
|
639 |
Â
} else {
|
640 |
Â
wp_enqueue_style('colorbox', $this -> render_url('css/colorbox.css', "default"), null, "1.3.19", "all");
|
Â
|
|
641 |
Â
}
|
642 |
Â
|
643 |
Â
wp_enqueue_style('slideshow-font', $this -> render_url('css/font.css', "default"), null, null, "all");
|
@@ -707,7 +737,7 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
707 |
Â
$this -> check_table($model);
|
708 |
Â
}
|
709 |
Â
|
710 |
-
$query = "ALTER TABLE `" . $this -> Slide -> table . "` CHANGE `type` `type` ENUM('media','file','url') NOT NULL DEFAULT 'media'";
|
711 |
Â
$wpdb -> query($query);
|
712 |
Â
}
|
713 |
Â
|
4 |
Â
|
5 |
Â
class GalleryPlugin extends GalleryCheckinit {
|
6 |
Â
|
7 |
+
var $version = '1.6';
|
8 |
Â
var $plugin_name;
|
9 |
Â
var $plugin_base;
|
10 |
Â
var $pre = 'Gallery';
|
23 |
Â
var $models = array('Slide', 'Gallery', 'GallerySlides');
|
24 |
Â
var $debugging = false; //set to "true" to turn on debugging
|
25 |
Â
var $debug_level = 2; //set to 2 for PHP and DB errors or 1 for just DB errors
|
26 |
+
|
27 |
+
function __call($method = null, $args = null) {
|
28 |
+
$class = $this -> pre . $method;
|
29 |
+
|
30 |
+
if (!class_exists($class)) {
|
31 |
+
$file = $this -> plugin_base() . DS . 'models' . DS . strtolower($method) . '.php';
|
32 |
+
if (file_exists($file)) {
|
33 |
+
include($file);
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
if (empty($this -> {$method}) || !is_object($this -> {$method})) {
|
38 |
+
if (class_exists($class)) {
|
39 |
+
$this -> {$method} = new $class($args);
|
40 |
+
return $this -> {$method};
|
41 |
+
}
|
42 |
+
} else {
|
43 |
+
return $this -> {$method};
|
44 |
+
}
|
45 |
+
}
|
46 |
Â
|
47 |
Â
function register_plugin($name, $base) {
|
48 |
Â
$this -> plugin_name = $name;
|
189 |
Â
if (!empty($_REQUEST['item'])) {
|
190 |
Â
foreach ($_REQUEST['item'] as $order => $slide_id) {
|
191 |
Â
if (empty($_REQUEST['gallery_id'])) {
|
192 |
+
$this -> Slide() -> save_field('order', ($order + 1), array('id' => $slide_id));
|
193 |
Â
} else {
|
194 |
+
$this -> GallerySlides() -> save_field('order', ($order + 1), array('slide_id' => $slide_id, 'gallery_id' => $_REQUEST['gallery_id']));
|
195 |
Â
}
|
196 |
Â
}
|
197 |
Â
|
198 |
+
echo '<i class="fa fa-check"></i> ' . __('Slides have been ordered', $this -> plugin_name);
|
199 |
Â
}
|
200 |
Â
|
201 |
Â
exit();
|
243 |
Â
}
|
244 |
Â
}
|
245 |
Â
}
|
246 |
+
|
247 |
+
include_once(dirname(__FILE__) . DS . 'models' . DS . 'slideshow.php');
|
248 |
Â
|
249 |
+
/*if (!empty($this -> models)) {
|
250 |
Â
foreach ($this -> models as $model) {
|
251 |
Â
$mfile = dirname(__FILE__) . DS . 'models' . DS . strtolower($model) . '.php';
|
252 |
Â
|
262 |
Â
}
|
263 |
Â
}
|
264 |
Â
}
|
265 |
+
}*/
|
266 |
Â
}
|
267 |
Â
|
268 |
Â
function updating_plugin() {
|
283 |
Â
if (version_compare($cur_version, "1.4.8") < 0) {
|
284 |
Â
$this -> initialize_options();
|
285 |
Â
|
286 |
+
$query = "ALTER TABLE `" . $this -> Slide() -> table . "` CHANGE `image` `image` TEXT NOT NULL;";
|
287 |
Â
$wpdb -> query($query);
|
288 |
Â
|
289 |
Â
$version = "1.4.8";
|
292 |
Â
if (version_compare($cur_version, "1.5.3") < 0) {
|
293 |
Â
$this -> initialize_options();
|
294 |
Â
|
295 |
+
$query = "ALTER TABLE `" . $this -> Slide() -> table . "` CHANGE `type` `type` ENUM('media','file','url') NOT NULL DEFAULT 'media'";
|
296 |
Â
$wpdb -> query($query);
|
297 |
Â
|
298 |
Â
|
299 |
Â
$version = "1.5.3";
|
300 |
Â
}
|
301 |
Â
|
302 |
+
if (version_compare($cur_version, "1.6") < 0) {
|
303 |
Â
|
304 |
Â
$this -> initialize_options();
|
305 |
Â
|
306 |
+
$version = "1.6";
|
307 |
Â
}
|
308 |
Â
|
309 |
Â
//the current version is older.
|
481 |
Â
if (!empty($model)) {
|
482 |
Â
global $paginate;
|
483 |
Â
$paginate = $this -> vendor('Paginate');
|
484 |
+
$paginate -> table = $this -> {$model}() -> table;
|
485 |
+
$paginate -> sub = (empty($sub)) ? $this -> sections -> {$this -> {$model}() -> controller} : $sub;
|
486 |
Â
$paginate -> fields = (empty($fields)) ? '*' : $fields;
|
487 |
Â
$paginate -> where = (empty($conditions)) ? false : $conditions;
|
488 |
Â
$paginate -> searchterm = (empty($searchterm)) ? false : $searchterm;
|
489 |
Â
$paginate -> per_page = $per_page;
|
490 |
Â
$paginate -> order = $order;
|
491 |
Â
|
492 |
+
$page = (empty($_GET[$this -> pre . 'page'])) ? 1 : $_GET[$this -> pre . 'page'];
|
493 |
+
$data = $paginate -> start_paging(esc_html($page));
|
494 |
Â
|
495 |
Â
if (!empty($data)) {
|
496 |
Â
$newdata = array();
|
589 |
Â
wp_enqueue_script('jquery');
|
590 |
Â
|
591 |
Â
if (is_admin()) {
|
592 |
+
$page = (!empty($_GET['page'])) ? esc_html($_GET['page']) : false;
|
593 |
+
$method = (!empty($_GET['method'])) ? esc_html($_GET['method']) : false;
|
594 |
+
|
595 |
+
if (!empty($page) && in_array($page, (array) $this -> sections)) {
|
596 |
Â
wp_enqueue_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), false, 1);
|
597 |
Â
wp_enqueue_script('wp-color-picker', admin_url('js/color-picker.min.js'), array( 'iris' ), false, 1);
|
598 |
Â
|
600 |
Â
wp_enqueue_script('jquery-ui-tooltip');
|
601 |
Â
wp_enqueue_script('jquery-ui-slider');
|
602 |
Â
|
603 |
+
if ($page == 'slideshow-settings') {
|
604 |
Â
wp_enqueue_script('common');
|
605 |
Â
wp_enqueue_script('wp-lists');
|
606 |
Â
wp_enqueue_script('postbox');
|
608 |
Â
wp_enqueue_script('settings-editor', $this -> render_url('js/settings-editor.js', "admin"), array('jquery'), '1.0');
|
609 |
Â
}
|
610 |
Â
|
611 |
+
if ($page == "slideshow-slides" && $method == "order") {
|
612 |
Â
wp_enqueue_script('jquery-ui-sortable');
|
613 |
Â
}
|
614 |
Â
|
615 |
+
if ($page == $this -> sections -> slides && ($method == "save" || $method == "save-multiple")) {
|
616 |
Â
wp_enqueue_media();
|
617 |
Â
}
|
618 |
Â
|
619 |
Â
add_thickbox();
|
620 |
Â
}
|
621 |
Â
|
622 |
+
wp_enqueue_script('colorbox', '//cdnjs.cloudflare.com/ajax/libs/jquery.colorbox/1.6.3/jquery.colorbox-min.js', array('jquery'), '1.6.3');
|
623 |
+
wp_enqueue_script('select2', '//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/js/select2.min.js', array('jquery'), '4.0.0');
|
624 |
Â
wp_enqueue_script($this -> plugin_name . 'admin', $this -> render_url('js/admin.js', "admin"), null, '1.0');
|
625 |
Â
} else {
|
626 |
Â
wp_enqueue_script($this -> plugin_name, $this -> render_url('js/gallery.js', "default"), null, '1.0');
|
627 |
+
wp_enqueue_script('colorbox', 'https://cdnjs.cloudflare.com/ajax/libs/jquery.colorbox/1.6.3/jquery.colorbox-min.js', array('jquery'), '1.6.3');
|
628 |
+
//wp_enqueue_script('jquery-effects-core');
|
629 |
+
wp_enqueue_script('jquery-ui-effects', $this -> render_url('js/jquery-ui.js', "default"));
|
630 |
Â
}
|
631 |
Â
|
632 |
Â
return true;
|
663 |
Â
wp_enqueue_style('wp-color-picker');
|
664 |
Â
wp_enqueue_style('jquery-ui', $this -> render_url('css/jquery-ui.css', "admin"), null, "1.0", "all");
|
665 |
Â
wp_enqueue_style('colorbox', $this -> render_url('css/colorbox.css', "admin"), null, "1.3.19", "all");
|
666 |
+
wp_enqueue_style('select2', '//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/css/select2.min.css', false, '4.0.0', "all");
|
667 |
+
wp_enqueue_style('fontawesome', '//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.css', false, '4.4.0', "all");
|
668 |
Â
} else {
|
669 |
Â
wp_enqueue_style('colorbox', $this -> render_url('css/colorbox.css', "default"), null, "1.3.19", "all");
|
670 |
+
wp_enqueue_style('fontawesome', '//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.css', false, '4.4.0', "all");
|
671 |
Â
}
|
672 |
Â
|
673 |
Â
wp_enqueue_style('slideshow-font', $this -> render_url('css/font.css', "default"), null, null, "all");
|
737 |
Â
$this -> check_table($model);
|
738 |
Â
}
|
739 |
Â
|
740 |
+
$query = "ALTER TABLE `" . $this -> Slide() -> table . "` CHANGE `type` `type` ENUM('media','file','url') NOT NULL DEFAULT 'media'";
|
741 |
Â
$wpdb -> query($query);
|
742 |
Â
}
|
743 |
Â
|
slideshow-gallery.php
CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://tribulant.com/plugins/view/13/wordpress-slideshow-gallery
|
|
6 |
Â
Author: Tribulant Software
|
7 |
Â
Author URI: http://tribulant.com
|
8 |
Â
Description: Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website. The slideshow is flexible and all aspects can easily be configured. Embedding or hardcoding the slideshow gallery is a breeze. To embed into a post/page, simply insert <code>[tribulant_slideshow]</code> into its content with an optional <code>post_id</code> parameter. To hardcode into any PHP file of your WordPress theme, simply use <code><?php if (function_exists('slideshow')) { slideshow($output = true, $post_id = false, $gallery_id = false, $params = array()); } ?></code>.
|
9 |
-
Version: 1.
|
10 |
Â
License: GNU General Public License v2 or later
|
11 |
Â
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
Â
Tags: slideshow gallery, slideshow, gallery, slider, jquery, bfithumb, galleries, photos, images
|
@@ -26,9 +26,9 @@ if (file_exists($path)) {
|
|
26 |
Â
}
|
27 |
Â
|
28 |
Â
if (!class_exists('Gallery')) {
|
29 |
-
class
|
30 |
Â
|
31 |
-
function
|
32 |
Â
$url = explode("&", $_SERVER['REQUEST_URI']);
|
33 |
Â
$this -> url = $url[0];
|
34 |
Â
$this -> referer = (empty($_SERVER['HTTP_REFERER'])) ? $this -> url : $_SERVER['HTTP_REFERER'];
|
@@ -69,6 +69,31 @@ if (!class_exists('Gallery')) {
|
|
69 |
Â
$this -> updating_plugin();
|
70 |
Â
}
|
71 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
72 |
Â
function plugin_action_links($actions = null, $plugin_file = null, $plugin_data = null, $context = null) {
|
73 |
Â
$this_plugin = plugin_basename(__FILE__);
|
74 |
Â
|
@@ -120,10 +145,6 @@ if (!class_exists('Gallery')) {
|
|
120 |
Â
global $slideshow_javascript, $slideshow_css;
|
121 |
Â
$slideshow_javascript = array();
|
122 |
Â
$slideshow_css = array();
|
123 |
-
|
124 |
-
if (!empty($_GET['test-head'])) {
|
125 |
-
echo '<!-- wp_head -->';
|
126 |
-
}
|
127 |
Â
}
|
128 |
Â
|
129 |
Â
function wp_footer() {
|
@@ -153,10 +174,6 @@ if (!class_exists('Gallery')) {
|
|
153 |
Â
?><!-- Slideshow Gallery CSS END --><?php
|
154 |
Â
}
|
155 |
Â
}
|
156 |
-
|
157 |
-
if (!empty($_GET['test-footer'])) {
|
158 |
-
echo '<!-- wp_footer -->';
|
159 |
-
}
|
160 |
Â
}
|
161 |
Â
|
162 |
Â
function admin_menu() {
|
@@ -166,6 +183,10 @@ if (!class_exists('Gallery')) {
|
|
166 |
Â
$this -> menus['slideshow-galleries'] = add_submenu_page($this -> sections -> slides, __('Manage Galleries', $this -> plugin_name), __('Manage Galleries', $this -> plugin_name), 'slideshow_galleries', $this -> sections -> galleries, array($this, 'admin_galleries'));
|
167 |
Â
$this -> menus['slideshow-settings'] = add_submenu_page($this -> sections -> slides, __('Configuration', $this -> plugin_name), __('Configuration', $this -> plugin_name), 'slideshow_settings', $this -> sections -> settings, array($this, 'admin_settings'));
|
168 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
169 |
Â
do_action('slideshow_admin_menu', $this -> menus);
|
170 |
Â
|
171 |
Â
add_action('admin_head-' . $this -> menus['slideshow-settings'], array($this, 'admin_head_gallery_settings'));
|
@@ -187,6 +208,7 @@ if (!class_exists('Gallery')) {
|
|
187 |
Â
add_meta_box('pluginsdiv', __('Recommended Plugin', $this -> plugin_name), array($this -> Metabox, "settings_plugins"), $this -> menus['slideshow-settings'], 'side', 'core');
|
188 |
Â
add_meta_box('aboutdiv', __('About This Plugin', $this -> plugin_name) . $this -> Html -> help(__('More about this plugin and the creators of it', $this -> plugin_name)), array($this -> Metabox, "settings_about"), $this -> menus['slideshow-settings'], 'side', 'core');
|
189 |
Â
add_meta_box('generaldiv', __('General Settings', $this -> plugin_name) . $this -> Html -> help(__('General configuration settings for the inner workings and some default behaviours', $this -> plugin_name)), array($this -> Metabox, "settings_general"), $this -> menus['slideshow-settings'], 'normal', 'core');
|
Â
|
|
190 |
Â
add_meta_box('linksimagesdiv', __('Links & Images Overlay', $this -> plugin_name) . $this -> Html -> help(__('Configure the way that slides with links are opened', $this -> plugin_name)), array($this -> Metabox, "settings_linksimages"), $this -> menus['slideshow-settings'], 'normal', 'core');
|
191 |
Â
add_meta_box('stylesdiv', __('Appearance & Styles', $this -> plugin_name) . $this -> Html -> help(__('Change the way the slideshows look so that it suits your needs', $this -> plugin_name)), array($this -> Metabox, "settings_styles"), $this -> menus['slideshow-settings'], 'normal', 'core');
|
192 |
Â
add_meta_box('techdiv', __('Technical Settings', $this -> plugin_name), array($this -> Metabox, "settings_tech"), $this -> menus['slideshow-settings'], 'normal', 'core');
|
@@ -196,15 +218,37 @@ if (!class_exists('Gallery')) {
|
|
196 |
Â
do_action('do_meta_boxes', $this -> menus['slideshow-settings'], 'side');
|
197 |
Â
}
|
198 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
199 |
Â
function admin_notices() {
|
200 |
Â
|
201 |
Â
if (is_admin()) {
|
202 |
Â
|
203 |
Â
$this -> check_uploaddir();
|
204 |
Â
|
205 |
-
|
Â
|
|
206 |
Â
$msg_type = (!empty($_GET[$this -> pre . 'updated'])) ? 'msg' : 'err';
|
207 |
-
call_user_func(array($this, 'render_' . $msg_type), $
|
208 |
Â
}
|
209 |
Â
|
210 |
Â
$showmessage_ratereview = $this -> get_option('showmessage_ratereview');
|
@@ -221,7 +265,8 @@ if (!class_exists('Gallery')) {
|
|
221 |
Â
}
|
222 |
Â
|
223 |
Â
/* Serial key submission message */
|
224 |
-
|
Â
|
|
225 |
Â
$hidemessage_submitserial = $this -> get_option('hidemessage_submitserial');
|
226 |
Â
|
227 |
Â
if (empty($hidemessage_submitserial)) {
|
@@ -245,32 +290,6 @@ if (!class_exists('Gallery')) {
|
|
245 |
Â
<?php
|
246 |
Â
}
|
247 |
Â
}
|
248 |
-
|
249 |
-
/* Check if wp_head and wp_footer functions exist */
|
250 |
-
$url = add_query_arg(array('test-head' => 1, 'test-footer' => 1), home_url());
|
251 |
-
if ($response = wp_remote_request($url)) {
|
252 |
-
if (!is_wp_error($response)) {
|
253 |
-
$html = $response['body'];
|
254 |
-
$showmessage_wphead = $this -> get_option('showmessage_wphead');
|
255 |
-
$showmessage_wpfoot = $this -> get_option('showmessage_wpfoot');
|
256 |
-
|
257 |
-
if (!strstr($html, '<!-- wp_head -->')) {
|
258 |
-
if (empty($showmessage_wphead) || (!empty($showmessage_wphead) && $showmessage_wphead != "hidden")) {
|
259 |
-
$this -> update_option('showmessage_wphead', 1);
|
260 |
-
$dismissable = admin_url('admin.php?page=' . $this -> sections -> settings . '&slideshow_method=hidemessage&message=wphead');
|
261 |
-
$this -> render_err(sprintf(__('Slideshow Gallery: It seems like your theme is missing the wp_head() function.', $this -> plugin_name)), $dismissable);
|
262 |
-
}
|
263 |
-
}
|
264 |
-
|
265 |
-
if (!strstr($html, '<!-- wp_footer -->')) {
|
266 |
-
if (empty($showmessage_wpfoot) || (!empty($showmessage_wpfoot) && $showmessage_wpfoot != "hidden")) {
|
267 |
-
$this -> update_option('showmessage_wpfoot', 1);
|
268 |
-
$dismissable = admin_url('admin.php?page=' . $this -> sections -> settings . '&slideshow_method=hidemessage&message=wpfoot');
|
269 |
-
$this -> render_err(sprintf(__('Slideshow Gallery: It seems like your theme is missing the wp_footer() function.', $this -> plugin_name)), $dismissable);
|
270 |
-
}
|
271 |
-
}
|
272 |
-
}
|
273 |
-
}
|
274 |
Â
}
|
275 |
Â
|
276 |
Â
}
|
@@ -307,6 +326,9 @@ if (!class_exists('Gallery')) {
|
|
307 |
Â
$slide_direction = $this -> get_option('slide_direction');
|
308 |
Â
$easing = $this -> get_option('easing');
|
309 |
Â
$autoheight = $this -> get_option('autoheight');
|
Â
|
|
Â
|
|
Â
|
|
310 |
Â
|
311 |
Â
// default shortcode parameters
|
312 |
Â
$defaults = array(
|
@@ -318,16 +340,19 @@ if (!class_exists('Gallery')) {
|
|
318 |
Â
'featuredtype' => "post",
|
319 |
Â
'gallery_id' => false,
|
320 |
Â
'orderby' => array('order', "ASC"),
|
Â
|
|
Â
|
|
321 |
Â
'resizeimages' => (($styles['resizeimages'] == "Y") ? "true" : "false"),
|
322 |
Â
'imagesoverlay' => (($this -> get_option('imagesthickbox') == "Y") ? "true" : "false"),
|
323 |
Â
'layout' => ($styles['layout']),
|
324 |
Â
'width' => ($styles['width']),
|
325 |
Â
'height' => ((empty($autoheight)) ? $styles['height'] : false),
|
326 |
Â
'autoheight' => ((!empty($autoheight)) ? "true" : "false"),
|
Â
|
|
327 |
Â
'resheight' => ($styles['resheight']),
|
328 |
Â
'resheighttype' => ($styles['resheighttype']),
|
329 |
Â
'auto' => (($this -> get_option('autoslide') == "Y") ? "true" : "false"),
|
330 |
-
'effect' => ((empty($effect) || (!empty($effect) && $effect == "fade")) ? 'fade' :
|
331 |
Â
'slide_direction' => ((empty($slide_direction) || (!empty($slide_direction) && $slide_direction == "lr")) ? 'lr' : 'tb'),
|
332 |
Â
'easing' => ((empty($easing)) ? 'swing' : $easing),
|
333 |
Â
'autospeed' => ($this -> get_option('autospeed')),
|
@@ -338,6 +363,7 @@ if (!class_exists('Gallery')) {
|
|
338 |
Â
'navhoveropacity' => ($this -> get_option('navhover')),
|
339 |
Â
'showinfo' => (($this -> get_option('information') == "Y") ? "true" : "false"),
|
340 |
Â
'infospeed' => ($this -> get_option('infospeed')),
|
Â
|
|
341 |
Â
'showthumbs' => (($this -> get_option('thumbnails') == "Y") ? "true" : "false"),
|
342 |
Â
'thumbsposition' => ($this -> get_option('thumbposition')),
|
343 |
Â
'thumbsborder' => ($styles['thumbactive']),
|
@@ -361,6 +387,11 @@ if (!class_exists('Gallery')) {
|
|
361 |
Â
if (is_plugin_active('wp-checkout' . DS . 'wp-checkout.php')) {
|
362 |
Â
$slides = array();
|
363 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
364 |
Â
if (class_exists('wpCheckout')) {
|
365 |
Â
if ($wpCheckout = new wpCheckout()) {
|
366 |
Â
global $wpcoDb, $Product;
|
@@ -369,10 +400,10 @@ if (!class_exists('Gallery')) {
|
|
369 |
Â
|
370 |
Â
switch ($productstype) {
|
371 |
Â
case 'latest' :
|
372 |
-
$products = $wpcoDb -> find_all(false, false, array(
|
373 |
Â
break;
|
374 |
Â
case 'featured' :
|
375 |
-
$products = $wpcoDb -> find_all(array('featured' => "1"), false, array(
|
376 |
Â
break;
|
377 |
Â
}
|
378 |
Â
}
|
@@ -382,53 +413,48 @@ if (!class_exists('Gallery')) {
|
|
382 |
Â
} else {
|
383 |
Â
$error = sprintf(__('You need the %sShopping Cart plugin%s to display products slides.', $this -> plugin_name), '<a href="http://tribulant.com/plugins/view/10/wordpress-shopping-cart-plugin" target="_blank">', '</a>');
|
384 |
Â
}
|
385 |
-
|
386 |
-
if (!empty($error)) {
|
387 |
-
$content = '';
|
388 |
-
$content .= '<p class="slideshow-gallery-error">';
|
389 |
-
$content .= stripslashes($error);
|
390 |
-
$content .= '</p>';
|
391 |
-
}
|
392 |
Â
// Featured images
|
393 |
Â
} elseif (!empty($featured)) {
|
394 |
Â
global $post;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
395 |
Â
|
396 |
Â
$args = array(
|
397 |
Â
'numberposts' => $featurednumber, // should show 5 but only shows 3
|
398 |
-
'post_type' =>
|
399 |
Â
'meta_key' => '_thumbnail_id', // with thumbnail
|
400 |
-
'exclude' => $post -> ID // exclude current post
|
Â
|
|
Â
|
|
401 |
Â
);
|
402 |
Â
|
403 |
-
if ($posts = get_posts($args)) {
|
404 |
Â
$content = $this -> render('gallery', array('slides' => $posts, 'unique' => 'featured' . $featuredtype . $featurednumber, 'featured' => true, 'options' => $s, 'frompost' => false), false, 'default');
|
405 |
Â
} else {
|
406 |
Â
$error = sprintf(__('No posts with featured images are available. Ensure your theme includes %s support.', $this -> plugin_name), '<code>add_theme_support("post-thumbnails");</code>');
|
407 |
Â
}
|
408 |
-
|
409 |
-
if (!empty($error)) {
|
410 |
-
$content = '';
|
411 |
-
$content .= '<p class="slideshow-gallery-error">';
|
412 |
-
$content .= stripslashes($error);
|
413 |
-
$content .= '</p>';
|
414 |
-
}
|
415 |
Â
// Slides of a gallery
|
416 |
Â
} elseif (!empty($gallery_id)) {
|
417 |
Â
if (!is_array($orderby) || $orderby == "random") {
|
418 |
Â
$orderbystring = "ORDER BY RAND()";
|
419 |
Â
} else {
|
420 |
-
|
Â
|
|
Â
|
|
421 |
Â
|
422 |
Â
if ($orderf == "order") {
|
423 |
-
$orderbystring = "ORDER BY " . $this -> GallerySlides -> table . ".order " . $orderd . "";
|
424 |
Â
} else {
|
425 |
-
$orderbystring = "ORDER BY " . $this -> Slide -> table . "." . $orderf . " " . $orderd . "";
|
426 |
Â
}
|
427 |
Â
}
|
428 |
Â
|
429 |
-
$slidesquery = "SELECT * FROM " . $this -> Slide -> table . " LEFT JOIN " . $this -> GallerySlides -> table .
|
430 |
-
" ON " . $this -> Slide -> table . ".id = " . $this -> GallerySlides -> table . ".slide_id WHERE " .
|
431 |
-
$this -> GallerySlides -> table . ".gallery_id = '" . $gallery_id . "' " . $orderbystring;
|
432 |
Â
|
433 |
Â
$query_hash = md5($slidesquery);
|
434 |
Â
if ($oc_slides = wp_cache_get($query_hash, 'slideshowgallery')) {
|
@@ -450,7 +476,11 @@ if (!class_exists('Gallery')) {
|
|
450 |
Â
}
|
451 |
Â
// All slides
|
452 |
Â
} elseif (!empty($custom) || empty($post_id)) {
|
453 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
454 |
Â
|
455 |
Â
if (!empty($exclude)) {
|
456 |
Â
$exclude = array_map('trim', explode(',', $exclude));
|
@@ -468,6 +498,10 @@ if (!class_exists('Gallery')) {
|
|
468 |
Â
} else {
|
469 |
Â
global $post;
|
470 |
Â
$pid = (empty($post_id)) ? $post -> ID : $post_id;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
471 |
Â
|
472 |
Â
if (!empty($pid) && $post = get_post($pid)) {
|
473 |
Â
$children_attributes = array(
|
@@ -476,12 +510,11 @@ if (!class_exists('Gallery')) {
|
|
476 |
Â
'post_type' => "attachment",
|
477 |
Â
'post_status' => "any",
|
478 |
Â
'post_mime_type' => "image",
|
479 |
-
'orderby' => "menu_order",
|
480 |
-
'order' => "ASC",
|
481 |
Â
);
|
482 |
Â
|
483 |
Â
if ($attachments = get_children($children_attributes)) {
|
484 |
-
//if ($attachments = get_children("post_parent=" . $post -> ID . "&post_type=attachment&post_mime_type=image&orderby=" . ((!empty($orderby) && $orderby == "random") ? "rand" : "menu_order ASC, ID ASC"))) {
|
485 |
Â
if (!empty($exclude)) {
|
486 |
Â
$exclude = array_map('trim', explode(',', $exclude));
|
487 |
Â
|
@@ -501,16 +534,27 @@ if (!class_exists('Gallery')) {
|
|
501 |
Â
}
|
502 |
Â
}
|
503 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
504 |
Â
return $content;
|
505 |
Â
}
|
506 |
Â
|
507 |
Â
function admin_slides() {
|
508 |
Â
global $wpdb;
|
509 |
-
|
510 |
-
switch ($
|
511 |
Â
case 'delete' :
|
512 |
-
|
513 |
-
|
Â
|
|
514 |
Â
$msg_type = 'message';
|
515 |
Â
$message = __('Slide has been removed', $this -> plugin_name);
|
516 |
Â
} else {
|
@@ -529,11 +573,11 @@ if (!class_exists('Gallery')) {
|
|
529 |
Â
|
530 |
Â
check_admin_referer('slideshow-slides-save_' . $_POST['Slide']['id']);
|
531 |
Â
|
532 |
-
if ($this -> Slide -> save($_POST, true)) {
|
533 |
Â
$message = __('Slide has been saved', $this -> plugin_name);
|
534 |
Â
|
535 |
Â
if (!empty($_POST['continueediting'])) {
|
536 |
-
$this -> redirect(admin_url('admin.php?page=' . $this -> sections -> slides . '&method=save&id=' . $this -> Slide -> insertid . '&continueediting=1'), 'message', $message);
|
537 |
Â
} else {
|
538 |
Â
$this -> redirect($this -> url, "message", $message);
|
539 |
Â
}
|
@@ -542,8 +586,8 @@ if (!class_exists('Gallery')) {
|
|
542 |
Â
$this -> render('slides' . DS . 'save', false, true, 'admin');
|
543 |
Â
}
|
544 |
Â
} else {
|
545 |
-
$this -> Db -> model = $this -> Slide -> model;
|
546 |
-
$this -> Slide -> find(array('id' => $_GET['id']));
|
547 |
Â
$this -> render('slides' . DS . 'save', false, true, 'admin');
|
548 |
Â
}
|
549 |
Â
break;
|
@@ -570,8 +614,8 @@ if (!class_exists('Gallery')) {
|
|
570 |
Â
'galleries' => $galleries,
|
571 |
Â
);
|
572 |
Â
|
573 |
-
if (!$this -> Slide -> save($slide_data)) {
|
574 |
-
$errors = array_merge($errors, $this -> Slide -> errors);
|
575 |
Â
}
|
576 |
Â
}
|
577 |
Â
|
@@ -593,9 +637,36 @@ if (!class_exists('Gallery')) {
|
|
593 |
Â
if (!empty($_POST['action'])) {
|
594 |
Â
if (!empty($_POST['Slide']['checklist'])) {
|
595 |
Â
switch ($_POST['action']) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
596 |
Â
case 'delete' :
|
597 |
Â
foreach ($_POST['Slide']['checklist'] as $slide_id) {
|
598 |
-
$this -> Slide -> delete($slide_id);
|
599 |
Â
}
|
600 |
Â
|
601 |
Â
$message = __('Selected slides have been removed', $this -> plugin_name);
|
@@ -613,10 +684,10 @@ if (!class_exists('Gallery')) {
|
|
613 |
Â
break;
|
614 |
Â
case 'order' :
|
615 |
Â
if (!empty($_GET['gallery_id'])) {
|
616 |
-
$gallery = $this -> Gallery -> find(array('id' => $_GET['gallery_id']));
|
617 |
Â
|
618 |
Â
$slides = array();
|
619 |
-
$gsquery = "SELECT gs.slide_id FROM `" . $this -> GallerySlides -> table . "` gs WHERE `gallery_id` = '" . $gallery -> id . "' ORDER BY gs.order ASC";
|
620 |
Â
|
621 |
Â
$query_hash = md5($gsquery);
|
622 |
Â
if ($oc_gs = wp_cache_get($query_hash, 'slideshowgallery')) {
|
@@ -628,22 +699,23 @@ if (!class_exists('Gallery')) {
|
|
628 |
Â
|
629 |
Â
if (!empty($gs)) {
|
630 |
Â
foreach ($gs as $galleryslide) {
|
631 |
-
$slides[] = $this -> Slide -> find(array('id' => $galleryslide -> slide_id));
|
632 |
Â
}
|
633 |
Â
}
|
634 |
Â
|
635 |
Â
$this -> render('slides' . DS . 'order', array('gallery' => $gallery, 'slides' => $slides), true, 'admin');
|
636 |
Â
} else {
|
637 |
-
$slides = $this -> Slide -> find_all(null, null, array('order', "ASC"));
|
638 |
Â
$this -> render('slides' . DS . 'order', array('slides' => $slides), true, 'admin');
|
639 |
Â
}
|
640 |
Â
break;
|
641 |
Â
default :
|
642 |
-
$
|
643 |
-
$
|
644 |
-
$
|
645 |
-
$
|
646 |
-
$this ->
|
Â
|
|
647 |
Â
break;
|
648 |
Â
}
|
649 |
Â
}
|
@@ -656,11 +728,11 @@ if (!class_exists('Gallery')) {
|
|
656 |
Â
|
657 |
Â
check_admin_referer('slideshow-galleries-save_' . $_POST['Gallery']['id']);
|
658 |
Â
|
659 |
-
if ($this -> Gallery -> save($_POST, true)) {
|
660 |
Â
$message = __('Gallery has been saved', $this -> plugin_name);
|
661 |
Â
|
662 |
Â
if (!empty($_POST['continueediting'])) {
|
663 |
-
$this -> redirect(admin_url('admin.php?page=' . $this -> sections -> galleries . '&method=save&id=' . $this -> Gallery -> insertid . '&continueediting=1'), 'message', $message);
|
664 |
Â
} else {
|
665 |
Â
$this -> redirect($this -> url, "message", $message);
|
666 |
Â
}
|
@@ -668,34 +740,38 @@ if (!class_exists('Gallery')) {
|
|
668 |
Â
$this -> render('galleries' . DS . 'save', false, true, 'admin');
|
669 |
Â
}
|
670 |
Â
} else {
|
671 |
-
$this -> Db -> model = $this -> Gallery -> model;
|
672 |
-
$this -> Gallery -> find(array('id' => $_GET['id']));
|
673 |
Â
$this -> render('galleries' . DS . 'save', false, true, 'admin');
|
674 |
Â
}
|
675 |
Â
break;
|
676 |
Â
case 'view' :
|
677 |
-
$this -> Db -> model = $this -> Gallery -> model;
|
678 |
-
$gallery = $this -> Gallery -> find(array('id' => $_GET['id']));
|
679 |
-
$
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
680 |
Â
|
681 |
Â
$data['Slide'] = array();
|
682 |
-
if (!empty($data[$this -> GallerySlides -> model])) {
|
683 |
-
foreach ($data[$this -> GallerySlides -> model] as $galleryslide) {
|
684 |
-
$this -> Db -> model = $this -> Slide -> model;
|
685 |
-
$data['Slide'][] = $this -> Slide -> find(array('id' => $galleryslide -> slide_id));
|
686 |
Â
}
|
687 |
Â
}
|
688 |
Â
|
689 |
-
$this -> render('galleries' . DS . 'view', array('gallery' => $gallery, 'slides' => $data[$this -> Slide -> model], 'paginate' => $data['Paginate']), true, 'admin');
|
690 |
Â
break;
|
691 |
Â
case 'hardcode' :
|
692 |
-
$this -> Db -> model = $this -> Gallery -> model;
|
693 |
-
$gallery = $this -> Gallery -> find(array('id' => $_GET['id']));
|
694 |
Â
$this -> render('galleries' . DS . 'hardcode', array('gallery' => $gallery), true, 'admin');
|
695 |
Â
break;
|
696 |
Â
case 'delete' :
|
697 |
Â
if (!empty($_GET['id'])) {
|
698 |
-
if ($this -> Gallery -> delete($_GET['id'])) {
|
699 |
Â
$msg_type = 'message';
|
700 |
Â
$message = __('Gallery has been removed', $this -> plugin_name);
|
701 |
Â
} else {
|
@@ -718,7 +794,7 @@ if (!class_exists('Gallery')) {
|
|
718 |
Â
switch ($_POST['action']) {
|
719 |
Â
case 'delete' :
|
720 |
Â
foreach ($_POST['Gallery']['checklist'] as $gallery_id) {
|
721 |
-
$this -> Gallery -> delete($gallery_id);
|
722 |
Â
}
|
723 |
Â
|
724 |
Â
$message = __('Selected galleries have been removed', $this -> plugin_name);
|
@@ -735,11 +811,12 @@ if (!class_exists('Gallery')) {
|
|
735 |
Â
}
|
736 |
Â
break;
|
737 |
Â
default :
|
738 |
-
$
|
739 |
-
$
|
740 |
-
$
|
741 |
-
$
|
742 |
-
$this ->
|
Â
|
|
743 |
Â
break;
|
744 |
Â
}
|
745 |
Â
}
|
@@ -751,7 +828,7 @@ if (!class_exists('Gallery')) {
|
|
751 |
Â
switch ($_GET['method']) {
|
752 |
Â
case 'dismiss' :
|
753 |
Â
if (!empty($_GET['dismiss'])) {
|
754 |
-
$this -> update_option('dismiss_' . $_GET['dismiss'], 1);
|
755 |
Â
}
|
756 |
Â
|
757 |
Â
$this -> redirect($this -> referer);
|
@@ -761,7 +838,7 @@ if (!class_exists('Gallery')) {
|
|
761 |
Â
|
762 |
Â
if (!empty($this -> models)) {
|
763 |
Â
foreach ($this -> models as $model) {
|
764 |
-
$query = "OPTIMIZE TABLE `" . $this -> {$model} -> table . "`";
|
765 |
Â
$wpdb -> query($query);
|
766 |
Â
}
|
767 |
Â
}
|
@@ -795,6 +872,7 @@ if (!class_exists('Gallery')) {
|
|
795 |
Â
$this -> delete_option('infohideonmobile');
|
796 |
Â
$this -> delete_option('autoheight');
|
797 |
Â
$this -> delete_option('language_external');
|
Â
|
|
798 |
Â
|
799 |
Â
foreach ($_POST as $pkey => $pval) {
|
800 |
Â
switch ($pkey) {
|
@@ -803,6 +881,13 @@ if (!class_exists('Gallery')) {
|
|
803 |
Â
update_option('tridebugging', 1);
|
804 |
Â
}
|
805 |
Â
break;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
806 |
Â
case 'permissions' :
|
807 |
Â
global $wp_roles;
|
808 |
Â
$role_names = $wp_roles -> get_names();
|
@@ -861,12 +946,6 @@ if (!class_exists('Gallery')) {
|
|
861 |
Â
$this -> delete_option('showmessage_ratereview');
|
862 |
Â
$this -> redirect($this -> referer);
|
863 |
Â
break;
|
864 |
-
case 'wphead' :
|
865 |
-
case 'wpfoot' :
|
866 |
-
$this -> update_option('showmessage_wphead', 'hidden');
|
867 |
-
$this -> update_option('showmessage_wpfoot', 'hidden');
|
868 |
-
$this -> redirect($this -> referer);
|
869 |
-
break;
|
870 |
Â
}
|
871 |
Â
}
|
872 |
Â
break;
|
@@ -883,7 +962,7 @@ if (!class_exists('Gallery')) {
|
|
883 |
Â
}
|
884 |
Â
|
885 |
Â
//initialize a Gallery object
|
886 |
-
$Gallery = new
|
887 |
Â
register_activation_hook(plugin_basename(__FILE__), array($Gallery, 'initialize_options'));
|
888 |
Â
register_activation_hook(plugin_basename(__FILE__), array($Gallery, 'activation_hook'));
|
889 |
Â
|
@@ -892,7 +971,7 @@ if (!function_exists('slideshow')) {
|
|
892 |
Â
$params['gallery_id'] = $gallery_id;
|
893 |
Â
$params['post_id'] = $post_id;
|
894 |
Â
|
895 |
-
$Gallery = new
|
896 |
Â
$content = $Gallery -> embed($params, false);
|
897 |
Â
|
898 |
Â
if ($output == true) {
|
6 |
Â
Author: Tribulant Software
|
7 |
Â
Author URI: http://tribulant.com
|
8 |
Â
Description: Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website. The slideshow is flexible and all aspects can easily be configured. Embedding or hardcoding the slideshow gallery is a breeze. To embed into a post/page, simply insert <code>[tribulant_slideshow]</code> into its content with an optional <code>post_id</code> parameter. To hardcode into any PHP file of your WordPress theme, simply use <code><?php if (function_exists('slideshow')) { slideshow($output = true, $post_id = false, $gallery_id = false, $params = array()); } ?></code>.
|
9 |
+
Version: 1.6
|
10 |
Â
License: GNU General Public License v2 or later
|
11 |
Â
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
Â
Tags: slideshow gallery, slideshow, gallery, slider, jquery, bfithumb, galleries, photos, images
|
26 |
Â
}
|
27 |
Â
|
28 |
Â
if (!class_exists('Gallery')) {
|
29 |
+
class SlideshowGallery extends GalleryPlugin {
|
30 |
Â
|
31 |
+
function SlideshowGallery() {
|
32 |
Â
$url = explode("&", $_SERVER['REQUEST_URI']);
|
33 |
Â
$this -> url = $url[0];
|
34 |
Â
$this -> referer = (empty($_SERVER['HTTP_REFERER'])) ? $this -> url : $_SERVER['HTTP_REFERER'];
|
69 |
Â
$this -> updating_plugin();
|
70 |
Â
}
|
71 |
Â
|
72 |
+
function excerpt_more($more = null) {
|
73 |
+
global $slideshow_post;
|
74 |
+
$excerptsettings = $this -> get_option('excerptsettings');
|
75 |
+
if (!empty($excerptsettings)) {
|
76 |
+
$excerpt_readmore = $this -> get_option('excerpt_readmore');
|
77 |
+
if (!empty($excerpt_readmore)) {
|
78 |
+
$more = ' <a href="' . get_permalink($slideshow_post -> ID) . '">' . __($excerpt_readmore) . '</a>';
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
return $more;
|
83 |
+
}
|
84 |
+
|
85 |
+
function excerpt_length($length = null) {
|
86 |
+
$excerptsettings = $this -> get_option('excerptsettings');
|
87 |
+
if (!empty($excerptsettings)) {
|
88 |
+
$excerpt_length = $this -> get_option('excerpt_length');
|
89 |
+
if (!empty($excerpt_length)) {
|
90 |
+
$length = $excerpt_length;
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
return $length;
|
95 |
+
}
|
96 |
+
|
97 |
Â
function plugin_action_links($actions = null, $plugin_file = null, $plugin_data = null, $context = null) {
|
98 |
Â
$this_plugin = plugin_basename(__FILE__);
|
99 |
Â
|
145 |
Â
global $slideshow_javascript, $slideshow_css;
|
146 |
Â
$slideshow_javascript = array();
|
147 |
Â
$slideshow_css = array();
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
148 |
Â
}
|
149 |
Â
|
150 |
Â
function wp_footer() {
|
174 |
Â
?><!-- Slideshow Gallery CSS END --><?php
|
175 |
Â
}
|
176 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
177 |
Â
}
|
178 |
Â
|
179 |
Â
function admin_menu() {
|
183 |
Â
$this -> menus['slideshow-galleries'] = add_submenu_page($this -> sections -> slides, __('Manage Galleries', $this -> plugin_name), __('Manage Galleries', $this -> plugin_name), 'slideshow_galleries', $this -> sections -> galleries, array($this, 'admin_galleries'));
|
184 |
Â
$this -> menus['slideshow-settings'] = add_submenu_page($this -> sections -> slides, __('Configuration', $this -> plugin_name), __('Configuration', $this -> plugin_name), 'slideshow_settings', $this -> sections -> settings, array($this, 'admin_settings'));
|
185 |
Â
|
186 |
+
if (!$this -> ci_serial_valid()) {
|
187 |
+
$this -> menus['slideshow-submitserial'] = add_submenu_page($this -> sections -> slides, __('Submit Serial Key', $this -> plugin_name), __('Submit Serial Key', $this -> plugin_name), 'slideshow_submitserial', $this -> sections -> submitserial, array($this, 'admin_submitserial'));
|
188 |
+
}
|
189 |
+
|
190 |
Â
do_action('slideshow_admin_menu', $this -> menus);
|
191 |
Â
|
192 |
Â
add_action('admin_head-' . $this -> menus['slideshow-settings'], array($this, 'admin_head_gallery_settings'));
|
208 |
Â
add_meta_box('pluginsdiv', __('Recommended Plugin', $this -> plugin_name), array($this -> Metabox, "settings_plugins"), $this -> menus['slideshow-settings'], 'side', 'core');
|
209 |
Â
add_meta_box('aboutdiv', __('About This Plugin', $this -> plugin_name) . $this -> Html -> help(__('More about this plugin and the creators of it', $this -> plugin_name)), array($this -> Metabox, "settings_about"), $this -> menus['slideshow-settings'], 'side', 'core');
|
210 |
Â
add_meta_box('generaldiv', __('General Settings', $this -> plugin_name) . $this -> Html -> help(__('General configuration settings for the inner workings and some default behaviours', $this -> plugin_name)), array($this -> Metabox, "settings_general"), $this -> menus['slideshow-settings'], 'normal', 'core');
|
211 |
+
add_meta_box('postsdiv', __('Posts/Pages Settings', $this -> plugin_name), array($this -> Metabox, "settings_postspages"), $this -> menus['slideshow-settings'], 'normal', 'core');
|
212 |
Â
add_meta_box('linksimagesdiv', __('Links & Images Overlay', $this -> plugin_name) . $this -> Html -> help(__('Configure the way that slides with links are opened', $this -> plugin_name)), array($this -> Metabox, "settings_linksimages"), $this -> menus['slideshow-settings'], 'normal', 'core');
|
213 |
Â
add_meta_box('stylesdiv', __('Appearance & Styles', $this -> plugin_name) . $this -> Html -> help(__('Change the way the slideshows look so that it suits your needs', $this -> plugin_name)), array($this -> Metabox, "settings_styles"), $this -> menus['slideshow-settings'], 'normal', 'core');
|
214 |
Â
add_meta_box('techdiv', __('Technical Settings', $this -> plugin_name), array($this -> Metabox, "settings_tech"), $this -> menus['slideshow-settings'], 'normal', 'core');
|
218 |
Â
do_action('do_meta_boxes', $this -> menus['slideshow-settings'], 'side');
|
219 |
Â
}
|
220 |
Â
|
221 |
+
function admin_submitserial() {
|
222 |
+
$success = false;
|
223 |
+
|
224 |
+
if (!empty($_POST)) {
|
225 |
+
if (empty($_REQUEST['serial'])) { $errors[] = __('Please fill in a serial key.', $this -> plugin_name); }
|
226 |
+
else {
|
227 |
+
$this -> update_option('serialkey', $_REQUEST['serial']); //update the DB option
|
228 |
+
$this -> delete_all_cache('all');
|
229 |
+
|
230 |
+
if (!$this -> ci_serial_valid()) { $errors[] = __('Serial key is invalid, please try again.', $this -> plugin_name); }
|
231 |
+
else {
|
232 |
+
delete_transient($this -> pre . 'update_info');
|
233 |
+
$success = true;
|
234 |
+
$this -> redirect('?page=' . $this -> sections -> welcome);
|
235 |
+
}
|
236 |
+
}
|
237 |
+
}
|
238 |
+
|
239 |
+
$this -> render('settings-submitserial', array('success' => $success, 'errors' => $errors), true, 'admin');
|
240 |
+
}
|
241 |
+
|
242 |
Â
function admin_notices() {
|
243 |
Â
|
244 |
Â
if (is_admin()) {
|
245 |
Â
|
246 |
Â
$this -> check_uploaddir();
|
247 |
Â
|
248 |
+
$message = (!empty($_GET[$this -> pre . 'message'])) ? esc_html($_GET[$this -> pre . 'message']) : false;
|
249 |
+
if (!empty($message)) {
|
250 |
Â
$msg_type = (!empty($_GET[$this -> pre . 'updated'])) ? 'msg' : 'err';
|
251 |
+
call_user_func(array($this, 'render_' . $msg_type), $message);
|
252 |
Â
}
|
253 |
Â
|
254 |
Â
$showmessage_ratereview = $this -> get_option('showmessage_ratereview');
|
265 |
Â
}
|
266 |
Â
|
267 |
Â
/* Serial key submission message */
|
268 |
+
$page = esc_html($_GET['page']);
|
269 |
+
if (!$this -> ci_serial_valid() && (empty($page) || $page != $this -> sections -> submitserial)) {
|
270 |
Â
$hidemessage_submitserial = $this -> get_option('hidemessage_submitserial');
|
271 |
Â
|
272 |
Â
if (empty($hidemessage_submitserial)) {
|
290 |
Â
<?php
|
291 |
Â
}
|
292 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
293 |
Â
}
|
294 |
Â
|
295 |
Â
}
|
326 |
Â
$slide_direction = $this -> get_option('slide_direction');
|
327 |
Â
$easing = $this -> get_option('easing');
|
328 |
Â
$autoheight = $this -> get_option('autoheight');
|
329 |
+
|
330 |
+
$this -> add_filter('excerpt_more', 'excerpt_more', 999, 1);
|
331 |
+
$this -> add_filter('excerpt_length', 'excerpt_length', 999, 1);
|
332 |
Â
|
333 |
Â
// default shortcode parameters
|
334 |
Â
$defaults = array(
|
340 |
Â
'featuredtype' => "post",
|
341 |
Â
'gallery_id' => false,
|
342 |
Â
'orderby' => array('order', "ASC"),
|
343 |
+
'orderf' => false,
|
344 |
+
'orderd' => false,
|
345 |
Â
'resizeimages' => (($styles['resizeimages'] == "Y") ? "true" : "false"),
|
346 |
Â
'imagesoverlay' => (($this -> get_option('imagesthickbox') == "Y") ? "true" : "false"),
|
347 |
Â
'layout' => ($styles['layout']),
|
348 |
Â
'width' => ($styles['width']),
|
349 |
Â
'height' => ((empty($autoheight)) ? $styles['height'] : false),
|
350 |
Â
'autoheight' => ((!empty($autoheight)) ? "true" : "false"),
|
351 |
+
'autoheight_max' => ($this -> get_option('autoheight_max')),
|
352 |
Â
'resheight' => ($styles['resheight']),
|
353 |
Â
'resheighttype' => ($styles['resheighttype']),
|
354 |
Â
'auto' => (($this -> get_option('autoslide') == "Y") ? "true" : "false"),
|
355 |
+
'effect' => ((empty($effect) || (!empty($effect) && $effect == "fade")) ? 'fade' : $effect),
|
356 |
Â
'slide_direction' => ((empty($slide_direction) || (!empty($slide_direction) && $slide_direction == "lr")) ? 'lr' : 'tb'),
|
357 |
Â
'easing' => ((empty($easing)) ? 'swing' : $easing),
|
358 |
Â
'autospeed' => ($this -> get_option('autospeed')),
|
363 |
Â
'navhoveropacity' => ($this -> get_option('navhover')),
|
364 |
Â
'showinfo' => (($this -> get_option('information') == "Y") ? "true" : "false"),
|
365 |
Â
'infospeed' => ($this -> get_option('infospeed')),
|
366 |
+
'infodelay' => ($this -> get_option('infodelay')),
|
367 |
Â
'showthumbs' => (($this -> get_option('thumbnails') == "Y") ? "true" : "false"),
|
368 |
Â
'thumbsposition' => ($this -> get_option('thumbposition')),
|
369 |
Â
'thumbsborder' => ($styles['thumbactive']),
|
387 |
Â
if (is_plugin_active('wp-checkout' . DS . 'wp-checkout.php')) {
|
388 |
Â
$slides = array();
|
389 |
Â
|
390 |
+
if (empty($orderf) && empty($orderd)) {
|
391 |
+
$orderf = "created";
|
392 |
+
$orderd = "DESC";
|
393 |
+
}
|
394 |
+
|
395 |
Â
if (class_exists('wpCheckout')) {
|
396 |
Â
if ($wpCheckout = new wpCheckout()) {
|
397 |
Â
global $wpcoDb, $Product;
|
400 |
Â
|
401 |
Â
switch ($productstype) {
|
402 |
Â
case 'latest' :
|
403 |
+
$products = $wpcoDb -> find_all(false, false, array($orderf, $orderd), $productsnumber);
|
404 |
Â
break;
|
405 |
Â
case 'featured' :
|
406 |
+
$products = $wpcoDb -> find_all(array('featured' => "1"), false, array($orderf, $orderd), $productsnumber);
|
407 |
Â
break;
|
408 |
Â
}
|
409 |
Â
}
|
413 |
Â
} else {
|
414 |
Â
$error = sprintf(__('You need the %sShopping Cart plugin%s to display products slides.', $this -> plugin_name), '<a href="http://tribulant.com/plugins/view/10/wordpress-shopping-cart-plugin" target="_blank">', '</a>');
|
415 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
416 |
Â
// Featured images
|
417 |
Â
} elseif (!empty($featured)) {
|
418 |
Â
global $post;
|
419 |
+
|
420 |
+
if (empty($orderf) && empty($orderd)) {
|
421 |
+
$orderf = "date";
|
422 |
+
$orderd = "DESC";
|
423 |
+
}
|
424 |
Â
|
425 |
Â
$args = array(
|
426 |
Â
'numberposts' => $featurednumber, // should show 5 but only shows 3
|
427 |
+
'post_type' => $featuredtype, // posts only
|
428 |
Â
'meta_key' => '_thumbnail_id', // with thumbnail
|
429 |
+
'exclude' => $post -> ID, // exclude current post
|
430 |
+
'orderby' => $orderf,
|
431 |
+
'order' => $orderd,
|
432 |
Â
);
|
433 |
Â
|
434 |
+
if ($posts = get_posts($args)) {
|
435 |
Â
$content = $this -> render('gallery', array('slides' => $posts, 'unique' => 'featured' . $featuredtype . $featurednumber, 'featured' => true, 'options' => $s, 'frompost' => false), false, 'default');
|
436 |
Â
} else {
|
437 |
Â
$error = sprintf(__('No posts with featured images are available. Ensure your theme includes %s support.', $this -> plugin_name), '<code>add_theme_support("post-thumbnails");</code>');
|
438 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
439 |
Â
// Slides of a gallery
|
440 |
Â
} elseif (!empty($gallery_id)) {
|
441 |
Â
if (!is_array($orderby) || $orderby == "random") {
|
442 |
Â
$orderbystring = "ORDER BY RAND()";
|
443 |
Â
} else {
|
444 |
+
if (empty($orderf) && empty($orderd)) {
|
445 |
+
list($orderf, $orderd) = $orderby;
|
446 |
+
}
|
447 |
Â
|
448 |
Â
if ($orderf == "order") {
|
449 |
+
$orderbystring = "ORDER BY " . $this -> GallerySlides() -> table . ".order " . $orderd . "";
|
450 |
Â
} else {
|
451 |
+
$orderbystring = "ORDER BY " . $this -> Slide() -> table . "." . $orderf . " " . $orderd . "";
|
452 |
Â
}
|
453 |
Â
}
|
454 |
Â
|
455 |
+
$slidesquery = "SELECT * FROM " . $this -> Slide() -> table . " LEFT JOIN " . $this -> GallerySlides() -> table .
|
456 |
+
" ON " . $this -> Slide() -> table . ".id = " . $this -> GallerySlides() -> table . ".slide_id WHERE " .
|
457 |
+
$this -> GallerySlides() -> table . ".gallery_id = '" . $gallery_id . "' " . $orderbystring;
|
458 |
Â
|
459 |
Â
$query_hash = md5($slidesquery);
|
460 |
Â
if ($oc_slides = wp_cache_get($query_hash, 'slideshowgallery')) {
|
476 |
Â
}
|
477 |
Â
// All slides
|
478 |
Â
} elseif (!empty($custom) || empty($post_id)) {
|
479 |
+
if (!empty($orderf) && !empty($orderd)) {
|
480 |
+
$orderby = array($orderf, $orderd);
|
481 |
+
}
|
482 |
+
|
483 |
+
$slides = $this -> Slide() -> find_all(null, null, $orderby);
|
484 |
Â
|
485 |
Â
if (!empty($exclude)) {
|
486 |
Â
$exclude = array_map('trim', explode(',', $exclude));
|
498 |
Â
} else {
|
499 |
Â
global $post;
|
500 |
Â
$pid = (empty($post_id)) ? $post -> ID : $post_id;
|
501 |
+
|
502 |
+
if (!is_numeric($post_id)) {
|
503 |
+
$pid = $post -> ID;
|
504 |
+
}
|
505 |
Â
|
506 |
Â
if (!empty($pid) && $post = get_post($pid)) {
|
507 |
Â
$children_attributes = array(
|
510 |
Â
'post_type' => "attachment",
|
511 |
Â
'post_status' => "any",
|
512 |
Â
'post_mime_type' => "image",
|
513 |
+
'orderby' => ((!empty($orderf)) ? $orderf : "menu_order"),
|
514 |
+
'order' => ((!empty($orderd)) ? $orderd : "ASC"),
|
515 |
Â
);
|
516 |
Â
|
517 |
Â
if ($attachments = get_children($children_attributes)) {
|
Â
|
|
518 |
Â
if (!empty($exclude)) {
|
519 |
Â
$exclude = array_map('trim', explode(',', $exclude));
|
520 |
Â
|
534 |
Â
}
|
535 |
Â
}
|
536 |
Â
|
537 |
+
if (!empty($error)) {
|
538 |
+
$content = '';
|
539 |
+
$content .= '<p class="slideshow_error slideshow-gallery-error">';
|
540 |
+
$content .= stripslashes($error);
|
541 |
+
$content .= '</p>';
|
542 |
+
}
|
543 |
+
|
544 |
+
remove_filter('excerpt_more', array($this, 'excerpt_more'));
|
545 |
+
remove_filter('excerpt_length', array($this, 'excerpt_length'));
|
546 |
+
|
547 |
Â
return $content;
|
548 |
Â
}
|
549 |
Â
|
550 |
Â
function admin_slides() {
|
551 |
Â
global $wpdb;
|
552 |
+
$method = (!empty($_GET['method'])) ? esc_html($_GET['method']) : false;
|
553 |
+
switch ($method) {
|
554 |
Â
case 'delete' :
|
555 |
+
$id = esc_html($_GET['id']);
|
556 |
+
if (!empty($id)) {
|
557 |
+
if ($this -> Slide() -> delete($id)) {
|
558 |
Â
$msg_type = 'message';
|
559 |
Â
$message = __('Slide has been removed', $this -> plugin_name);
|
560 |
Â
} else {
|
573 |
Â
|
574 |
Â
check_admin_referer('slideshow-slides-save_' . $_POST['Slide']['id']);
|
575 |
Â
|
576 |
+
if ($this -> Slide() -> save($_POST, true)) {
|
577 |
Â
$message = __('Slide has been saved', $this -> plugin_name);
|
578 |
Â
|
579 |
Â
if (!empty($_POST['continueediting'])) {
|
580 |
+
$this -> redirect(admin_url('admin.php?page=' . $this -> sections -> slides . '&method=save&id=' . $this -> Slide() -> insertid . '&continueediting=1'), 'message', $message);
|
581 |
Â
} else {
|
582 |
Â
$this -> redirect($this -> url, "message", $message);
|
583 |
Â
}
|
586 |
Â
$this -> render('slides' . DS . 'save', false, true, 'admin');
|
587 |
Â
}
|
588 |
Â
} else {
|
589 |
+
$this -> Db -> model = $this -> Slide() -> model;
|
590 |
+
$this -> Slide() -> find(array('id' => esc_html($_GET['id'])));
|
591 |
Â
$this -> render('slides' . DS . 'save', false, true, 'admin');
|
592 |
Â
}
|
593 |
Â
break;
|
614 |
Â
'galleries' => $galleries,
|
615 |
Â
);
|
616 |
Â
|
617 |
+
if (!$this -> Slide() -> save($slide_data)) {
|
618 |
+
$errors = array_merge($errors, $this -> Slide() -> errors);
|
619 |
Â
}
|
620 |
Â
}
|
621 |
Â
|
637 |
Â
if (!empty($_POST['action'])) {
|
638 |
Â
if (!empty($_POST['Slide']['checklist'])) {
|
639 |
Â
switch ($_POST['action']) {
|
640 |
+
case 'remgalleries' :
|
641 |
+
foreach ($_POST['Slide']['checklist'] as $slide_id) {
|
642 |
+
$this -> GallerySlides() -> delete_all(array('slide_id' => $slide_id));
|
643 |
+
}
|
644 |
+
|
645 |
+
$message = __('Selected slides removed from all galleries', $this -> plugin_name);
|
646 |
+
$this -> redirect($this -> url, 'message', $message);
|
647 |
+
break;
|
648 |
+
case 'setgalleries' :
|
649 |
+
foreach ($_POST['Slide']['checklist'] as $slide_id) {
|
650 |
+
$this -> GallerySlides() -> delete_all(array('slide_id' => $slide_id));
|
651 |
+
}
|
652 |
+
case 'addgalleries' :
|
653 |
+
if (!empty($_POST['galleries'])) {
|
654 |
+
foreach ($_POST['Slide']['checklist'] as $slide_id) {
|
655 |
+
foreach ($_POST['galleries'] as $gallery_id) {
|
656 |
+
$this -> GallerySlides() -> save(array(
|
657 |
+
'slide_id' => $slide_id,
|
658 |
+
'gallery_id' => $gallery_id,
|
659 |
+
));
|
660 |
+
}
|
661 |
+
}
|
662 |
+
|
663 |
+
$message = __('Slides added to selected galleries', $this -> plugin_name);
|
664 |
+
$this -> redirect($this -> url, 'message', $message);
|
665 |
+
}
|
666 |
+
break;
|
667 |
Â
case 'delete' :
|
668 |
Â
foreach ($_POST['Slide']['checklist'] as $slide_id) {
|
669 |
+
$this -> Slide() -> delete($slide_id);
|
670 |
Â
}
|
671 |
Â
|
672 |
Â
$message = __('Selected slides have been removed', $this -> plugin_name);
|
684 |
Â
break;
|
685 |
Â
case 'order' :
|
686 |
Â
if (!empty($_GET['gallery_id'])) {
|
687 |
+
$gallery = $this -> Gallery() -> find(array('id' => esc_html($_GET['gallery_id'])));
|
688 |
Â
|
689 |
Â
$slides = array();
|
690 |
+
$gsquery = "SELECT gs.slide_id FROM `" . $this -> GallerySlides() -> table . "` gs WHERE `gallery_id` = '" . $gallery -> id . "' ORDER BY gs.order ASC";
|
691 |
Â
|
692 |
Â
$query_hash = md5($gsquery);
|
693 |
Â
if ($oc_gs = wp_cache_get($query_hash, 'slideshowgallery')) {
|
699 |
Â
|
700 |
Â
if (!empty($gs)) {
|
701 |
Â
foreach ($gs as $galleryslide) {
|
702 |
+
$slides[] = $this -> Slide() -> find(array('id' => $galleryslide -> slide_id));
|
703 |
Â
}
|
704 |
Â
}
|
705 |
Â
|
706 |
Â
$this -> render('slides' . DS . 'order', array('gallery' => $gallery, 'slides' => $slides), true, 'admin');
|
707 |
Â
} else {
|
708 |
+
$slides = $this -> Slide() -> find_all(null, null, array('order', "ASC"));
|
709 |
Â
$this -> render('slides' . DS . 'order', array('slides' => $slides), true, 'admin');
|
710 |
Â
}
|
711 |
Â
break;
|
712 |
Â
default :
|
713 |
+
$perpage = (isset($_COOKIE[$this -> pre . 'slidesperpage'])) ? $_COOKIE[$this -> pre . 'slidesperpage'] : 25;
|
714 |
+
$orderfield = (empty($_GET['orderby'])) ? 'modified' : esc_html($_GET['orderby']);
|
715 |
+
$orderdirection = (empty($_GET['order'])) ? 'DESC' : strtoupper(esc_html($_GET['order']));
|
716 |
+
$order = array($this -> Slide() -> table . '.' . $orderfield, $orderdirection);
|
717 |
+
$data = $this -> paginate('Slide', false, false, false, false, $perpage, $order);
|
718 |
+
$this -> render('slides' . DS . 'index', array('slides' => $data[$this -> Slide() -> model], 'paginate' => $data['Paginate']), true, 'admin');
|
719 |
Â
break;
|
720 |
Â
}
|
721 |
Â
}
|
728 |
Â
|
729 |
Â
check_admin_referer('slideshow-galleries-save_' . $_POST['Gallery']['id']);
|
730 |
Â
|
731 |
+
if ($this -> Gallery() -> save($_POST, true)) {
|
732 |
Â
$message = __('Gallery has been saved', $this -> plugin_name);
|
733 |
Â
|
734 |
Â
if (!empty($_POST['continueediting'])) {
|
735 |
+
$this -> redirect(admin_url('admin.php?page=' . $this -> sections -> galleries . '&method=save&id=' . $this -> Gallery() -> insertid . '&continueediting=1'), 'message', $message);
|
736 |
Â
} else {
|
737 |
Â
$this -> redirect($this -> url, "message", $message);
|
738 |
Â
}
|
740 |
Â
$this -> render('galleries' . DS . 'save', false, true, 'admin');
|
741 |
Â
}
|
742 |
Â
} else {
|
743 |
+
$this -> Db -> model = $this -> Gallery() -> model;
|
744 |
+
$this -> Gallery() -> find(array('id' => esc_html($_GET['id'])));
|
745 |
Â
$this -> render('galleries' . DS . 'save', false, true, 'admin');
|
746 |
Â
}
|
747 |
Â
break;
|
748 |
Â
case 'view' :
|
749 |
+
$this -> Db -> model = $this -> Gallery() -> model;
|
750 |
+
$gallery = $this -> Gallery() -> find(array('id' => esc_html($_GET['id'])));
|
751 |
+
$perpage = (isset($_COOKIE[$this -> pre . 'slidesperpage'])) ? $_COOKIE[$this -> pre . 'slidesperpage'] : 25;
|
752 |
+
$orderfield = (empty($_GET['orderby'])) ? 'modified' : esc_html($_GET['orderby']);
|
753 |
+
$orderdirection = (empty($_GET['order'])) ? 'DESC' : strtoupper(esc_html($_GET['order']));
|
754 |
+
$order = array($this -> Slide() -> table . '.' . $orderfield, $orderdirection);
|
755 |
+
$data = $this -> paginate('GallerySlides', "*", $this -> sections -> galleries . '&method=view&id=' . $gallery -> id, array('gallery_id' => $gallery -> id), false, $perpage, $order);
|
756 |
Â
|
757 |
Â
$data['Slide'] = array();
|
758 |
+
if (!empty($data[$this -> GallerySlides() -> model])) {
|
759 |
+
foreach ($data[$this -> GallerySlides() -> model] as $galleryslide) {
|
760 |
+
$this -> Db -> model = $this -> Slide() -> model;
|
761 |
+
$data['Slide'][] = $this -> Slide() -> find(array('id' => $galleryslide -> slide_id));
|
762 |
Â
}
|
763 |
Â
}
|
764 |
Â
|
765 |
+
$this -> render('galleries' . DS . 'view', array('gallery' => $gallery, 'slides' => $data[$this -> Slide() -> model], 'paginate' => $data['Paginate']), true, 'admin');
|
766 |
Â
break;
|
767 |
Â
case 'hardcode' :
|
768 |
+
$this -> Db -> model = $this -> Gallery() -> model;
|
769 |
+
$gallery = $this -> Gallery() -> find(array('id' => esc_html($_GET['id'])));
|
770 |
Â
$this -> render('galleries' . DS . 'hardcode', array('gallery' => $gallery), true, 'admin');
|
771 |
Â
break;
|
772 |
Â
case 'delete' :
|
773 |
Â
if (!empty($_GET['id'])) {
|
774 |
+
if ($this -> Gallery() -> delete(esc_html($_GET['id']))) {
|
775 |
Â
$msg_type = 'message';
|
776 |
Â
$message = __('Gallery has been removed', $this -> plugin_name);
|
777 |
Â
} else {
|
794 |
Â
switch ($_POST['action']) {
|
795 |
Â
case 'delete' :
|
796 |
Â
foreach ($_POST['Gallery']['checklist'] as $gallery_id) {
|
797 |
+
$this -> Gallery() -> delete($gallery_id);
|
798 |
Â
}
|
799 |
Â
|
800 |
Â
$message = __('Selected galleries have been removed', $this -> plugin_name);
|
811 |
Â
}
|
812 |
Â
break;
|
813 |
Â
default :
|
814 |
+
$perpage = (isset($_COOKIE[$this -> pre . 'galleriesperpage'])) ? $_COOKIE[$this -> pre . 'galleriesperpage'] : 10;
|
815 |
+
$orderfield = (empty($_GET['orderby'])) ? 'modified' : esc_html($_GET['orderby']);
|
816 |
+
$orderdirection = (empty($_GET['order'])) ? 'DESC' : strtoupper(esc_html($_GET['order']));
|
817 |
+
$order = array($this -> Gallery() -> table . '.' . $orderfield, $orderdirection);
|
818 |
+
$data = $this -> paginate('Gallery', false, false, false, false, $perpage, $order);
|
819 |
+
$this -> render('galleries' . DS . 'index', array('galleries' => $data[$this -> Gallery() -> model], 'paginate' => $data['Paginate']), true, 'admin');
|
820 |
Â
break;
|
821 |
Â
}
|
822 |
Â
}
|
828 |
Â
switch ($_GET['method']) {
|
829 |
Â
case 'dismiss' :
|
830 |
Â
if (!empty($_GET['dismiss'])) {
|
831 |
+
$this -> update_option('dismiss_' . esc_html($_GET['dismiss']), 1);
|
832 |
Â
}
|
833 |
Â
|
834 |
Â
$this -> redirect($this -> referer);
|
838 |
Â
|
839 |
Â
if (!empty($this -> models)) {
|
840 |
Â
foreach ($this -> models as $model) {
|
841 |
+
$query = "OPTIMIZE TABLE `" . $this -> {$model}() -> table . "`";
|
842 |
Â
$wpdb -> query($query);
|
843 |
Â
}
|
844 |
Â
}
|
872 |
Â
$this -> delete_option('infohideonmobile');
|
873 |
Â
$this -> delete_option('autoheight');
|
874 |
Â
$this -> delete_option('language_external');
|
875 |
+
$this -> delete_option('excerptsettings');
|
876 |
Â
|
877 |
Â
foreach ($_POST as $pkey => $pval) {
|
878 |
Â
switch ($pkey) {
|
881 |
Â
update_option('tridebugging', 1);
|
882 |
Â
}
|
883 |
Â
break;
|
884 |
+
case 'excerpt_readmore' :
|
885 |
+
if ($this -> language_do()) {
|
886 |
+
$this -> update_option($pkey, $this -> language_join($pval));
|
887 |
+
} else {
|
888 |
+
$this -> update_option($pkey, $pval);
|
889 |
+
}
|
890 |
+
break;
|
891 |
Â
case 'permissions' :
|
892 |
Â
global $wp_roles;
|
893 |
Â
$role_names = $wp_roles -> get_names();
|
946 |
Â
$this -> delete_option('showmessage_ratereview');
|
947 |
Â
$this -> redirect($this -> referer);
|
948 |
Â
break;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
949 |
Â
}
|
950 |
Â
}
|
951 |
Â
break;
|
962 |
Â
}
|
963 |
Â
|
964 |
Â
//initialize a Gallery object
|
965 |
+
$Gallery = new SlideshowGallery();
|
966 |
Â
register_activation_hook(plugin_basename(__FILE__), array($Gallery, 'initialize_options'));
|
967 |
Â
register_activation_hook(plugin_basename(__FILE__), array($Gallery, 'activation_hook'));
|
968 |
Â
|
971 |
Â
$params['gallery_id'] = $gallery_id;
|
972 |
Â
$params['post_id'] = $post_id;
|
973 |
Â
|
974 |
+
$Gallery = new SlideshowGallery();
|
975 |
Â
$content = $Gallery -> embed($params, false);
|
976 |
Â
|
977 |
Â
if ($output == true) {
|
vendors/class.paginate.php
CHANGED
@@ -83,6 +83,12 @@ class GalleryPaginate extends GalleryPlugin {
|
|
83 |
Â
$query = "SELECT " . $this -> fields . " FROM `" . $this -> table . "`";
|
84 |
Â
$countquery = "SELECT COUNT(*) FROM `" . $this -> table . "`";
|
85 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
86 |
Â
//check if some conditions where passed.
|
87 |
Â
if (!empty($this -> where)) {
|
88 |
Â
//append the "WHERE" command to the query
|
@@ -155,7 +161,7 @@ class GalleryPaginate extends GalleryPlugin {
|
|
155 |
Â
|
156 |
Â
$this -> doberecords();
|
157 |
Â
list($osortby, $osort) = $this -> order;
|
158 |
-
$query .= " ORDER BY
|
159 |
Â
//echo $query;
|
160 |
Â
|
161 |
Â
$query_hash = md5($query);
|
83 |
Â
$query = "SELECT " . $this -> fields . " FROM `" . $this -> table . "`";
|
84 |
Â
$countquery = "SELECT COUNT(*) FROM `" . $this -> table . "`";
|
85 |
Â
|
86 |
+
switch ($this -> table) {
|
87 |
+
case $this -> GallerySlides() -> table :
|
88 |
+
$query .= " LEFT JOIN " . $this -> Slide() -> table . " ON " . $this -> GallerySlides() -> table . ".slide_id = " . $this -> Slide() -> table . ".id";
|
89 |
+
break;
|
90 |
+
}
|
91 |
+
|
92 |
Â
//check if some conditions where passed.
|
93 |
Â
if (!empty($this -> where)) {
|
94 |
Â
//append the "WHERE" command to the query
|
161 |
Â
|
162 |
Â
$this -> doberecords();
|
163 |
Â
list($osortby, $osort) = $this -> order;
|
164 |
+
$query .= " ORDER BY " . $osortby . " " . $osort . " LIMIT " . $this -> begRecord . " , " . $this -> per_page . ";";
|
165 |
Â
//echo $query;
|
166 |
Â
|
167 |
Â
$query_hash = md5($query);
|
views/admin/err-top.php
CHANGED
@@ -6,7 +6,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
|
6 |
Â
|
7 |
Â
<?php if (!empty($message)) : ?>
|
8 |
Â
<div id="message" class="slideshow notice error">
|
9 |
-
<p
|
10 |
Â
<?php if (!empty($dismissable)) : ?>
|
11 |
Â
<a href="<?php echo $dismissable; ?>" class="notice-dismiss"><span class="screen-reader-text"><?php _e('Dismiss this notice.', $this -> plugin_name); ?></span></a>
|
12 |
Â
<?php endif; ?>
|
6 |
Â
|
7 |
Â
<?php if (!empty($message)) : ?>
|
8 |
Â
<div id="message" class="slideshow notice error">
|
9 |
+
<p><i class="fa fa-times"></i> <?php echo $message; ?></p>
|
10 |
Â
<?php if (!empty($dismissable)) : ?>
|
11 |
Â
<a href="<?php echo $dismissable; ?>" class="notice-dismiss"><span class="screen-reader-text"><?php _e('Dismiss this notice.', $this -> plugin_name); ?></span></a>
|
12 |
Â
<?php endif; ?>
|
views/admin/galleries/hardcode.php
CHANGED
@@ -5,7 +5,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
|
5 |
Â
?>
|
6 |
Â
|
7 |
Â
<div class="wrap <?php echo $this -> pre; ?>">
|
8 |
-
<
|
9 |
Â
<div style="float:none;" class="subsubsub"><?php echo $this -> Html -> link(__('← All Galleries', $this -> plugin_name), $this -> url, array('title' => __('All Galleries', $this -> plugin_name))); ?></div>
|
10 |
Â
<p><?php _e('This PHP code can be used inside your WordPress theme to display slides inside this gallery.', $this -> plugin_name); ?></p>
|
11 |
Â
<textarea onmouseup="jQuery(this).unbind('onmouseup'); return false;" onfocus="jQuery(this).select();" cols="100%" rows="4"><?php echo htmlentities('<?php if (function_exists(\'slideshow\')) { slideshow(true, "' . $gallery -> id . '", false, array()); } ?>'); ?></textarea>
|
5 |
Â
?>
|
6 |
Â
|
7 |
Â
<div class="wrap <?php echo $this -> pre; ?>">
|
8 |
+
<h1><?php echo sprintf(__('Hardcode Gallery: %s', $this -> plugin_name), __($gallery -> title)); ?></h1>
|
9 |
Â
<div style="float:none;" class="subsubsub"><?php echo $this -> Html -> link(__('← All Galleries', $this -> plugin_name), $this -> url, array('title' => __('All Galleries', $this -> plugin_name))); ?></div>
|
10 |
Â
<p><?php _e('This PHP code can be used inside your WordPress theme to display slides inside this gallery.', $this -> plugin_name); ?></p>
|
11 |
Â
<textarea onmouseup="jQuery(this).unbind('onmouseup'); return false;" onfocus="jQuery(this).select();" cols="100%" rows="4"><?php echo htmlentities('<?php if (function_exists(\'slideshow\')) { slideshow(true, "' . $gallery -> id . '", false, array()); } ?>'); ?></textarea>
|
views/admin/galleries/index.php
CHANGED
@@ -5,7 +5,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
|
5 |
Â
?>
|
6 |
Â
|
7 |
Â
<div class="wrap <?php echo $this -> pre; ?> slideshow">
|
8 |
-
<
|
9 |
Â
|
10 |
Â
<?php if (!empty($galleries)) : ?>
|
11 |
Â
<form id="posts-filter" action="<?php echo $this -> url; ?>" method="post">
|
@@ -31,8 +31,8 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
|
31 |
Â
|
32 |
Â
<?php
|
33 |
Â
|
34 |
-
$orderby = (empty($_GET['orderby'])) ? 'modified' : $_GET['orderby'];
|
35 |
-
$order = (empty($_GET['order'])) ? 'desc' : strtolower($_GET['order']);
|
36 |
Â
$otherorder = ($order == "desc") ? 'asc' : 'desc';
|
37 |
Â
|
38 |
Â
?>
|
@@ -109,14 +109,37 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
|
109 |
Â
<td>
|
110 |
Â
<code>[tribulant_slideshow gallery_id="<?php echo $gallery -> id; ?>"]</code>
|
111 |
Â
</td>
|
112 |
-
<td><abbr title="<?php echo $gallery -> modified; ?>"><?php echo date(
|
113 |
Â
</tr>
|
114 |
Â
<?php endforeach; ?>
|
115 |
Â
</tbody>
|
116 |
Â
</table>
|
117 |
Â
|
118 |
Â
<div class="tablenav">
|
119 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
120 |
Â
<?php $this -> render('paginate', array('paginate' => $paginate), true, 'admin'); ?>
|
121 |
Â
</div>
|
122 |
Â
</form>
|
5 |
Â
?>
|
6 |
Â
|
7 |
Â
<div class="wrap <?php echo $this -> pre; ?> slideshow">
|
8 |
+
<h1><?php _e('Manage Galleries', $this -> plugin_name); ?> <?php echo $this -> Html -> link(__('Add New', $this -> plugin_name), $this -> url . '&method=save', array('class' => "add-new-h2")); ?></h1>
|
9 |
Â
|
10 |
Â
<?php if (!empty($galleries)) : ?>
|
11 |
Â
<form id="posts-filter" action="<?php echo $this -> url; ?>" method="post">
|
31 |
Â
|
32 |
Â
<?php
|
33 |
Â
|
34 |
+
$orderby = (empty($_GET['orderby'])) ? 'modified' : esc_html($_GET['orderby']);
|
35 |
+
$order = (empty($_GET['order'])) ? 'desc' : strtolower(esc_html($_GET['order']));
|
36 |
Â
$otherorder = ($order == "desc") ? 'asc' : 'desc';
|
37 |
Â
|
38 |
Â
?>
|
109 |
Â
<td>
|
110 |
Â
<code>[tribulant_slideshow gallery_id="<?php echo $gallery -> id; ?>"]</code>
|
111 |
Â
</td>
|
112 |
+
<td><abbr title="<?php echo $gallery -> modified; ?>"><?php echo date(get_option('date_format'), strtotime($gallery -> modified)); ?></abbr></td>
|
113 |
Â
</tr>
|
114 |
Â
<?php endforeach; ?>
|
115 |
Â
</tbody>
|
116 |
Â
</table>
|
117 |
Â
|
118 |
Â
<div class="tablenav">
|
119 |
+
<div class="alignleft">
|
120 |
+
<?php if (empty($_GET['showall'])) : ?>
|
121 |
+
<select class="widefat" style="width:auto;" name="perpage" onchange="change_perpage(this.value);">
|
122 |
+
<option value=""><?php _e('- Per Page -', $this -> plugin_name); ?></option>
|
123 |
+
<?php $p = 5; ?>
|
124 |
+
<?php while ($p < 100) : ?>
|
125 |
+
<option <?php echo (!empty($_COOKIE[$this -> pre . 'galleriesperpage']) && $_COOKIE[$this -> pre . 'galleriesperpage'] == $p) ? 'selected="selected"' : ''; ?> value="<?php echo $p; ?>"><?php echo $p; ?> <?php _e('per page', $this -> plugin_name); ?></option>
|
126 |
+
<?php $p += 5; ?>
|
127 |
+
<?php endwhile; ?>
|
128 |
+
<?php if (isset($_COOKIE[$this -> pre . 'galleriesperpage'])) : ?>
|
129 |
+
<option selected="selected" value="<?php echo $_COOKIE[$this -> pre . 'galleriesperpage']; ?>"><?php echo $_COOKIE[$this -> pre . 'galleriesperpage']; ?></option>
|
130 |
+
<?php endif; ?>
|
131 |
+
</select>
|
132 |
+
<?php endif; ?>
|
133 |
+
|
134 |
+
<script type="text/javascript">
|
135 |
+
function change_perpage(perpage) {
|
136 |
+
if (perpage != "") {
|
137 |
+
document.cookie = "<?php echo $this -> pre; ?>galleriesperpage=" + perpage + "; expires=<?php echo GalleryHtmlHelper::gen_date($this -> get_option('cookieformat'), strtotime("+30 days")); ?> UTC; path=/";
|
138 |
+
window.location = "<?php echo preg_replace("/\&?" . $this -> pre . "page\=(.*)?/si", "", $_SERVER['REQUEST_URI']); ?>";
|
139 |
+
}
|
140 |
+
}
|
141 |
+
</script>
|
142 |
+
</div>
|
143 |
Â
<?php $this -> render('paginate', array('paginate' => $paginate), true, 'admin'); ?>
|
144 |
Â
</div>
|
145 |
Â
</form>
|
views/admin/galleries/save.php
CHANGED
@@ -6,13 +6,13 @@ $languages = $this -> language_getlanguages();
|
|
6 |
Â
?>
|
7 |
Â
|
8 |
Â
<div class="wrap <?php echo $this -> pre; ?> slideshow-gallery">
|
9 |
-
<
|
10 |
Â
|
11 |
Â
<form action="<?php echo $this -> url; ?>&method=save" method="post">
|
12 |
Â
|
13 |
-
<?php wp_nonce_field('slideshow-galleries-save_' . $this -> Gallery -> data -> id); ?>
|
14 |
Â
|
15 |
-
<input type="hidden" name="Gallery[id]" value="<?php echo $this -> Gallery -> data -> id; ?>" />
|
16 |
Â
|
17 |
Â
<table class="form-table">
|
18 |
Â
<tbody>
|
@@ -21,7 +21,7 @@ $languages = $this -> language_getlanguages();
|
|
21 |
Â
<?php echo $this -> Html -> help(__('Give this gallery a title/name for your own reference.', $this -> plugin_name)); ?></th>
|
22 |
Â
<td>
|
23 |
Â
<?php if ($this -> language_do()) : ?>
|
24 |
-
<?php $titles = $this -> language_split($this -> Gallery -> data -> title); ?>
|
25 |
Â
<div id="gallery-title-tabs">
|
26 |
Â
<ul>
|
27 |
Â
<?php foreach ($languages as $language) : ?>
|
@@ -41,10 +41,10 @@ $languages = $this -> language_getlanguages();
|
|
41 |
Â
});
|
42 |
Â
</script>
|
43 |
Â
<?php else : ?>
|
44 |
-
<input type="text" class="widefat" name="Gallery[title]" value="<?php echo esc_attr(stripslashes($this -> Gallery -> data -> title)); ?>" id="Gallery_title" />
|
45 |
Â
<?php endif; ?>
|
46 |
Â
<span class="howto"><?php _e('Title of this gallery for identification purposes.', $this -> plugin_name); ?></span>
|
47 |
-
<?php echo (!empty($this -> Gallery -> errors['title'])) ? '<span class="slideshow_error">' . $this -> Gallery -> errors['title'] . '</span>' : ''; ?>
|
48 |
Â
</td>
|
49 |
Â
</tr>
|
50 |
Â
</tbody>
|
6 |
Â
?>
|
7 |
Â
|
8 |
Â
<div class="wrap <?php echo $this -> pre; ?> slideshow-gallery">
|
9 |
+
<h1><?php _e('Save a Gallery', $this -> plugin_name); ?></h1>
|
10 |
Â
|
11 |
Â
<form action="<?php echo $this -> url; ?>&method=save" method="post">
|
12 |
Â
|
13 |
+
<?php wp_nonce_field('slideshow-galleries-save_' . $this -> Gallery() -> data -> id); ?>
|
14 |
Â
|
15 |
+
<input type="hidden" name="Gallery[id]" value="<?php echo $this -> Gallery() -> data -> id; ?>" />
|
16 |
Â
|
17 |
Â
<table class="form-table">
|
18 |
Â
<tbody>
|
21 |
Â
<?php echo $this -> Html -> help(__('Give this gallery a title/name for your own reference.', $this -> plugin_name)); ?></th>
|
22 |
Â
<td>
|
23 |
Â
<?php if ($this -> language_do()) : ?>
|
24 |
+
<?php $titles = $this -> language_split($this -> Gallery() -> data -> title); ?>
|
25 |
Â
<div id="gallery-title-tabs">
|
26 |
Â
<ul>
|
27 |
Â
<?php foreach ($languages as $language) : ?>
|
41 |
Â
});
|
42 |
Â
</script>
|
43 |
Â
<?php else : ?>
|
44 |
+
<input type="text" class="widefat" name="Gallery[title]" value="<?php echo esc_attr(stripslashes($this -> Gallery() -> data -> title)); ?>" id="Gallery_title" />
|
45 |
Â
<?php endif; ?>
|
46 |
Â
<span class="howto"><?php _e('Title of this gallery for identification purposes.', $this -> plugin_name); ?></span>
|
47 |
+
<?php echo (!empty($this -> Gallery() -> errors['title'])) ? '<span class="slideshow_error">' . $this -> Gallery() -> errors['title'] . '</span>' : ''; ?>
|
48 |
Â
</td>
|
49 |
Â
</tr>
|
50 |
Â
</tbody>
|
views/admin/galleries/view.php
CHANGED
@@ -5,15 +5,15 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
|
5 |
Â
?>
|
6 |
Â
|
7 |
Â
<div class="wrap <?php echo $this -> pre; ?> slideshow">
|
8 |
-
<
|
9 |
Â
|
10 |
Â
<div style="float:none;" class="subsubsub"><?php echo $this -> Html -> link(__('← All Galleries', $this -> plugin_name), $this -> url, array('title' => __('All Galleries', $this -> plugin_name))); ?></div>
|
11 |
Â
|
12 |
Â
<div class="tablenav">
|
13 |
Â
<div class="alignleft actions">
|
14 |
-
<a href="?page=<?php echo $this -> sections -> galleries; ?>&method=save&id=<?php echo $gallery -> id; ?>" class="button"
|
15 |
-
<a href="?page=<?php echo $this -> sections -> galleries; ?>&method=hardcode&id=<?php echo $gallery -> id; ?>" class="button"
|
16 |
-
<a onclick="if (!confirm('<?php _e('Are you sure you want to delete this gallery?', $this -> plugin_name); ?>')) { return false; }" href="?page=<?php echo $this -> sections -> galleries; ?>&method=delete&id=<?php echo $gallery -> id; ?>" class="button button-highlighted"
|
17 |
Â
</div>
|
18 |
Â
</div>
|
19 |
Â
|
5 |
Â
?>
|
6 |
Â
|
7 |
Â
<div class="wrap <?php echo $this -> pre; ?> slideshow">
|
8 |
+
<h1><?php echo sprintf(__('View Gallery: %s', $this -> plugin_name), __($gallery -> title)); ?></h1>
|
9 |
Â
|
10 |
Â
<div style="float:none;" class="subsubsub"><?php echo $this -> Html -> link(__('← All Galleries', $this -> plugin_name), $this -> url, array('title' => __('All Galleries', $this -> plugin_name))); ?></div>
|
11 |
Â
|
12 |
Â
<div class="tablenav">
|
13 |
Â
<div class="alignleft actions">
|
14 |
+
<a href="?page=<?php echo $this -> sections -> galleries; ?>&method=save&id=<?php echo $gallery -> id; ?>" class="button"><i class="fa fa-pencil"></i> <?php _e('Edit Gallery', $this -> plugin_name); ?></a>
|
15 |
+
<a href="?page=<?php echo $this -> sections -> galleries; ?>&method=hardcode&id=<?php echo $gallery -> id; ?>" class="button"><i class="fa fa-code"></i> <?php _e('Hardcode', $this -> plugin_name); ?></a>
|
16 |
+
<a onclick="if (!confirm('<?php _e('Are you sure you want to delete this gallery?', $this -> plugin_name); ?>')) { return false; }" href="?page=<?php echo $this -> sections -> galleries; ?>&method=delete&id=<?php echo $gallery -> id; ?>" class="button button-highlighted"><i class="fa fa-times"></i> <?php _e('Delete Gallery', $this -> plugin_name); ?></a>
|
17 |
Â
</div>
|
18 |
Â
</div>
|
19 |
Â
|
views/admin/head.php
CHANGED
@@ -11,6 +11,12 @@ var slideshowajax = "<?php echo admin_url('admin-ajax.php'); ?>";
|
|
11 |
Â
jQuery(document).ready(function() {
|
12 |
Â
if (jQuery.isFunction(jQuery.fn.colorbox)) { jQuery('.colorbox').colorbox({maxWidth:'100%', maxHeight:'100%'}); }
|
13 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
14 |
Â
if (jQuery.isFunction(jQuery.fn.tooltip)) {
|
15 |
Â
jQuery(".galleryhelp a").tooltip({
|
16 |
Â
tooltipClass: 'slideshow-ui-tooltip',
|
11 |
Â
jQuery(document).ready(function() {
|
12 |
Â
if (jQuery.isFunction(jQuery.fn.colorbox)) { jQuery('.colorbox').colorbox({maxWidth:'100%', maxHeight:'100%'}); }
|
13 |
Â
|
14 |
+
if (jQuery.isFunction(jQuery.fn.select2)) {
|
15 |
+
jQuery('.slideshow select, .select2').select2({
|
16 |
+
tags: true
|
17 |
+
});
|
18 |
+
}
|
19 |
+
|
20 |
Â
if (jQuery.isFunction(jQuery.fn.tooltip)) {
|
21 |
Â
jQuery(".galleryhelp a").tooltip({
|
22 |
Â
tooltipClass: 'slideshow-ui-tooltip',
|
views/admin/lite-upgrade.php
CHANGED
@@ -4,10 +4,10 @@
|
|
4 |
Â
|
5 |
Â
$plugin_link = "http://tribulant.com/plugins/view/13/wordpress-slideshow-gallery";
|
6 |
Â
|
7 |
-
$galleries_count = $this -> Gallery -> count();
|
8 |
Â
$galleries_percentage = (($galleries_count / 1) * 100);
|
9 |
Â
|
10 |
-
$slides_count = $this -> Slide -> count();
|
11 |
Â
$slides_percentage = (($slides_count / 20) * 100);
|
12 |
Â
|
13 |
Â
/**
|
4 |
Â
|
5 |
Â
$plugin_link = "http://tribulant.com/plugins/view/13/wordpress-slideshow-gallery";
|
6 |
Â
|
7 |
+
$galleries_count = $this -> Gallery() -> count();
|
8 |
Â
$galleries_percentage = (($galleries_count / 1) * 100);
|
9 |
Â
|
10 |
+
$slides_count = $this -> Slide() -> count();
|
11 |
Â
$slides_percentage = (($slides_count / 20) * 100);
|
12 |
Â
|
13 |
Â
/**
|
views/admin/metaboxes/settings-general.php
CHANGED
@@ -12,20 +12,63 @@ $fadespeed = $this -> get_option('fadespeed');
|
|
12 |
Â
$navopacity = $this -> get_option('navopacity');
|
13 |
Â
$navhover = $this -> get_option('navhover');
|
14 |
Â
$infospeed = $this -> get_option('infospeed');
|
Â
|
|
15 |
Â
$infohideonmobile = $this -> get_option('infohideonmobile');
|
16 |
Â
$thumbopacity = $this -> get_option('thumbopacity');
|
17 |
Â
$thumbscrollspeed = $this -> get_option('thumbscrollspeed');
|
18 |
Â
|
19 |
Â
?>
|
20 |
Â
|
Â
|
|
Â
|
|
21 |
Â
<table class="form-table">
|
22 |
Â
<tbody>
|
23 |
Â
<tr>
|
24 |
Â
<th><label for="effect_fade"><?php _e('Effect', $this -> plugin_name); ?></label></th>
|
25 |
Â
<td>
|
26 |
-
|
27 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
28 |
Â
<span class="howto"><?php _e('Choose the type of effect/transition you want for slides', $this -> plugin_name); ?></span>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
29 |
Â
</td>
|
30 |
Â
</tr>
|
31 |
Â
</tbody>
|
@@ -98,6 +141,8 @@ $thumbscrollspeed = $this -> get_option('thumbscrollspeed');
|
|
98 |
Â
</tbody>
|
99 |
Â
</table>
|
100 |
Â
|
Â
|
|
Â
|
|
101 |
Â
<table class="form-table">
|
102 |
Â
<tbody>
|
103 |
Â
<tr>
|
@@ -176,6 +221,12 @@ $thumbscrollspeed = $this -> get_option('thumbscrollspeed');
|
|
176 |
Â
<span class="howto"><?php _e('Speed for fading of images. Lower number for quicker fading of images.', $this -> plugin_name); ?> <small><?php _e('(Default: 10, Recommended: 1-20)', $this -> plugin_name); ?><br/></small></span>
|
177 |
Â
</td>
|
178 |
Â
</tr>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
179 |
Â
<tr>
|
180 |
Â
<th><label for="shownav_Y"><?php _e('Show Image Navigation', $this -> plugin_name); ?></label>
|
181 |
Â
<?php echo $this -> Html -> help(__('Turn this on to show the Next and Previous arrows on either sides of the slideshow for the user to navigate through slides. Once turned on, you can set the opacity of these navigation arrows below.', $this -> plugin_name)); ?></th>
|
@@ -242,6 +293,8 @@ $thumbscrollspeed = $this -> get_option('thumbscrollspeed');
|
|
242 |
Â
</table>
|
243 |
Â
</div>
|
244 |
Â
|
Â
|
|
Â
|
|
245 |
Â
<table class="form-table">
|
246 |
Â
<tbody>
|
247 |
Â
<tr>
|
@@ -282,6 +335,13 @@ $thumbscrollspeed = $this -> get_option('thumbscrollspeed');
|
|
282 |
Â
<span class="howto"><?php _e('Speed at which the information bar will slide in and out.', $this -> plugin_name); ?></span>
|
283 |
Â
</td>
|
284 |
Â
</tr>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
285 |
Â
<tr>
|
286 |
Â
<th><label for="infohideonmobile"><?php _e('Hide On Mobiles', $this -> plugin_name); ?></label>
|
287 |
Â
<?php echo $this -> Html -> help(__('With a responsive layout turned on, the slideshow will respond in width on mobile devices and the information bar tends to overlap the entire slide since it increases in height as it reduces in width. You can tick/check this setting to hide the information bar on mobile devices so that the slides remain fully visible.', $this -> plugin_name)); ?></th>
|
@@ -294,6 +354,8 @@ $thumbscrollspeed = $this -> get_option('thumbscrollspeed');
|
|
294 |
Â
</table>
|
295 |
Â
</div>
|
296 |
Â
|
Â
|
|
Â
|
|
297 |
Â
<table class="form-table">
|
298 |
Â
<tbody>
|
299 |
Â
<tr>
|
12 |
Â
$navopacity = $this -> get_option('navopacity');
|
13 |
Â
$navhover = $this -> get_option('navhover');
|
14 |
Â
$infospeed = $this -> get_option('infospeed');
|
15 |
+
$infodelay = $this -> get_option('infodelay');
|
16 |
Â
$infohideonmobile = $this -> get_option('infohideonmobile');
|
17 |
Â
$thumbopacity = $this -> get_option('thumbopacity');
|
18 |
Â
$thumbscrollspeed = $this -> get_option('thumbscrollspeed');
|
19 |
Â
|
20 |
Â
?>
|
21 |
Â
|
22 |
+
<h3><?php _e('Slide Effects', $this -> plugin_name); ?></h3>
|
23 |
+
|
24 |
Â
<table class="form-table">
|
25 |
Â
<tbody>
|
26 |
Â
<tr>
|
27 |
Â
<th><label for="effect_fade"><?php _e('Effect', $this -> plugin_name); ?></label></th>
|
28 |
Â
<td>
|
29 |
+
<?php
|
30 |
+
|
31 |
+
$effects = array(
|
32 |
+
'slide',
|
33 |
+
'fade',
|
34 |
+
'blind',
|
35 |
+
'bounce',
|
36 |
+
'clip',
|
37 |
+
'drop',
|
38 |
+
'explode',
|
39 |
+
'fold',
|
40 |
+
'puff',
|
41 |
+
'pulsate',
|
42 |
+
'scale',
|
43 |
+
'shake',
|
44 |
+
'size',
|
45 |
+
);
|
46 |
+
|
47 |
+
?>
|
48 |
+
|
49 |
+
<?php /*<label><input onclick="jQuery('#effect_slide_div').hide();" <?php echo (empty($effect) || (!empty($effect) && $effect == "fade")) ? 'checked="checked"' : ''; ?> type="radio" name="effect" value="fade" id="effect_fade" /> <?php _e('Fade', $this -> plugin_name); ?></label>
|
50 |
+
<label><input onclick="jQuery('#effect_slide_div').show();" <?php echo (!empty($effect) && $effect == "slide") ? 'checked="checked"' : ''; ?> type="radio" name="effect" value="slide" id="effect_slide" /> <?php _e('Slide', $this -> plugin_name); ?></label>*/ ?>
|
51 |
+
<select name="effect" id="effect">
|
52 |
+
<?php foreach ($effects as $eff) : ?>
|
53 |
+
<option <?php echo (!empty($effect) && $effect == $eff) ? 'selected="selected"' : ''; ?> value="<?php echo esc_attr(stripslashes($eff)); ?>"><?php echo ucfirst($eff); ?></option>
|
54 |
+
<?php endforeach; ?>
|
55 |
+
</select>
|
56 |
Â
<span class="howto"><?php _e('Choose the type of effect/transition you want for slides', $this -> plugin_name); ?></span>
|
57 |
+
|
58 |
+
<script type="text/javascript">
|
59 |
+
jQuery('#effect').on('change', function() {
|
60 |
+
var effect = jQuery(this).val();
|
61 |
+
|
62 |
+
switch (effect) {
|
63 |
+
case 'slide' :
|
64 |
+
jQuery('#effect_slide_div').show();
|
65 |
+
break;
|
66 |
+
default :
|
67 |
+
jQuery('#effect_slide_div').hide();
|
68 |
+
break;
|
69 |
+
}
|
70 |
+
});
|
71 |
+
</script>
|
72 |
Â
</td>
|
73 |
Â
</tr>
|
74 |
Â
</tbody>
|
141 |
Â
</tbody>
|
142 |
Â
</table>
|
143 |
Â
|
144 |
+
<h3><?php _e('Sliding Behaviour', $this -> plugin_name); ?></h3>
|
145 |
+
|
146 |
Â
<table class="form-table">
|
147 |
Â
<tbody>
|
148 |
Â
<tr>
|
221 |
Â
<span class="howto"><?php _e('Speed for fading of images. Lower number for quicker fading of images.', $this -> plugin_name); ?> <small><?php _e('(Default: 10, Recommended: 1-20)', $this -> plugin_name); ?><br/></small></span>
|
222 |
Â
</td>
|
223 |
Â
</tr>
|
224 |
+
</tbody>
|
225 |
+
</table>
|
226 |
+
|
227 |
+
<h3><?php _e('Navigation (Previous/Next)', $this -> plugin_name); ?></h3>
|
228 |
+
<table class="form-table">
|
229 |
+
<tbody>
|
230 |
Â
<tr>
|
231 |
Â
<th><label for="shownav_Y"><?php _e('Show Image Navigation', $this -> plugin_name); ?></label>
|
232 |
Â
<?php echo $this -> Html -> help(__('Turn this on to show the Next and Previous arrows on either sides of the slideshow for the user to navigate through slides. Once turned on, you can set the opacity of these navigation arrows below.', $this -> plugin_name)); ?></th>
|
293 |
Â
</table>
|
294 |
Â
</div>
|
295 |
Â
|
296 |
+
<h3><?php _e('Information Bar', $this -> plugin_name); ?></h3>
|
297 |
+
|
298 |
Â
<table class="form-table">
|
299 |
Â
<tbody>
|
300 |
Â
<tr>
|
335 |
Â
<span class="howto"><?php _e('Speed at which the information bar will slide in and out.', $this -> plugin_name); ?></span>
|
336 |
Â
</td>
|
337 |
Â
</tr>
|
338 |
+
<tr>
|
339 |
+
<th><label for="infodelay"><?php _e('Information Delay', $this -> plugin_name); ?></label></th>
|
340 |
+
<td>
|
341 |
+
<label><input class="widefat" style="width:65px;" type="text" name="infodelay" value="<?php echo esc_attr(stripslashes($infodelay)); ?>" id="infodelay" /> <?php _e('seconds', $this -> plugin_name); ?></label>
|
342 |
+
<span class="howto"><?php _e('Delay the information bar in seconds or leave empty/zero for immediate display.', $this -> plugin_name); ?></span>
|
343 |
+
</td>
|
344 |
+
</tr>
|
345 |
Â
<tr>
|
346 |
Â
<th><label for="infohideonmobile"><?php _e('Hide On Mobiles', $this -> plugin_name); ?></label>
|
347 |
Â
<?php echo $this -> Html -> help(__('With a responsive layout turned on, the slideshow will respond in width on mobile devices and the information bar tends to overlap the entire slide since it increases in height as it reduces in width. You can tick/check this setting to hide the information bar on mobile devices so that the slides remain fully visible.', $this -> plugin_name)); ?></th>
|
354 |
Â
</table>
|
355 |
Â
</div>
|
356 |
Â
|
357 |
+
<h3><?php _e('Thumbnails Bar/Slider', $this -> plugin_name); ?></h3>
|
358 |
+
|
359 |
Â
<table class="form-table">
|
360 |
Â
<tbody>
|
361 |
Â
<tr>
|
views/admin/metaboxes/settings-postspages.php
ADDED
@@ -0,0 +1,63 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<!-- Posts/Pages Settings -->
|
2 |
+
|
3 |
+
<?php
|
4 |
+
|
5 |
+
$languages = $this -> language_getlanguages();
|
6 |
+
|
7 |
+
$excerptsettings = $this -> get_option('excerptsettings');
|
8 |
+
$excerpt_readmore = $this -> get_option('excerpt_readmore');
|
9 |
+
$excerpt_length = $this -> get_option('excerpt_length');
|
10 |
+
|
11 |
+
?>
|
12 |
+
|
13 |
+
<table class="form-table">
|
14 |
+
<tbody>
|
15 |
+
<tr>
|
16 |
+
<th><label for="excerptsettings"><?php _e('Override Excerpt Settings', $this -> plugin_name); ?></label></th>
|
17 |
+
<td>
|
18 |
+
<label><input <?php echo (!empty($excerptsettings)) ? 'checked="checked"' : ''; ?> onclick="if (jQuery(this).is(':checked')) { jQuery('#excerptsettings_div').show(); } else { jQuery('#excerptsettings_div').hide(); }" type="checkbox" name="excerptsettings" value="1" id="excerptsettings" /> <?php _e('Yes, override the post/page excerpt settings', $this -> plugin_name); ?></label>
|
19 |
+
</td>
|
20 |
+
</tr>
|
21 |
+
</tbody>
|
22 |
+
</table>
|
23 |
+
|
24 |
+
<div id="excerptsettings_div" style="display:<?php echo (!empty($excerptsettings)) ? 'block' : 'none'; ?>;">
|
25 |
+
<table class="form-table">
|
26 |
+
<tbody>
|
27 |
+
<tr>
|
28 |
+
<th><label for="excerpt_readmore"><?php _e('Read More Text', $this -> plugin_name); ?></label></th>
|
29 |
+
<td>
|
30 |
+
<?php if ($this -> language_do()) : ?>
|
31 |
+
<?php $readmores = $this -> language_split($excerpt_readmore); ?>
|
32 |
+
<div id="readmore-tabs">
|
33 |
+
<ul>
|
34 |
+
<?php foreach ($languages as $language) : ?>
|
35 |
+
<li><a href="#readmore-tabs-<?php echo $language; ?>"><?php echo $this -> language_flag($language); ?></a></li>
|
36 |
+
<?php endforeach; ?>
|
37 |
+
</ul>
|
38 |
+
<?php foreach ($languages as $language) : ?>
|
39 |
+
<div id="readmore-tabs-<?php echo $language; ?>">
|
40 |
+
<input type="text" class="widefat" name="excerpt_readmore[<?php echo $language; ?>]" value="<?php echo esc_attr(stripslashes($readmores[$language])); ?>" id="excerpt_readmore_<?php echo $language; ?>" />
|
41 |
+
</div>
|
42 |
+
<?php endforeach; ?>
|
43 |
+
</div>
|
44 |
+
|
45 |
+
<script type="text/javascript">
|
46 |
+
jQuery(document).ready(function() {
|
47 |
+
jQuery('#readmore-tabs').tabs();
|
48 |
+
});
|
49 |
+
</script>
|
50 |
+
<?php else : ?>
|
51 |
+
<input type="text" class="widefat" name="excerpt_readmore" value="<?php echo esc_attr(stripslashes(__($excerpt_readmore))); ?>" id="excerpt_readmore" />
|
52 |
+
<?php endif; ?>
|
53 |
+
</td>
|
54 |
+
</tr>
|
55 |
+
<tr>
|
56 |
+
<th><label for="excerpt_length"><?php _e('Excerpt Length', $this -> plugin_name); ?></label></th>
|
57 |
+
<td>
|
58 |
+
<input type="text" class="widefat" style="width:65px;" name="excerpt_length" value="<?php echo esc_attr(stripslashes($excerpt_length)); ?>" id="excerpt_length" />
|
59 |
+
</td>
|
60 |
+
</tr>
|
61 |
+
</tbody>
|
62 |
+
</table>
|
63 |
+
</div>
|
views/admin/metaboxes/settings-styles.php
CHANGED
@@ -6,6 +6,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
|
6 |
Â
|
7 |
Â
$styles = $this -> get_option('styles');
|
8 |
Â
$autoheight = $this -> get_option('autoheight');
|
Â
|
|
9 |
Â
$resizeimagescrop = $this -> get_option('resizeimagescrop');
|
10 |
Â
|
11 |
Â
?>
|
@@ -37,7 +38,7 @@ $resizeimagescrop = $this -> get_option('resizeimagescrop');
|
|
37 |
Â
<tr>
|
38 |
Â
<th><label for="autoheight"><?php _e('Auto Height', $this -> plugin_name); ?></label></th>
|
39 |
Â
<td>
|
40 |
-
<label><input onclick="if (jQuery(this).is(':checked')) { jQuery('#styles_height').attr('disabled', 'disabled'); } else { jQuery('#styles_height').removeAttr('disabled'); }" <?php echo (!empty($autoheight)) ? 'checked="checked"' : ''; ?> type="checkbox" name="autoheight" value="1" id="autoheight" /> <?php _e('Yes, automatically adjust the slideshow height for each slide', $this -> plugin_name); ?></label>
|
41 |
Â
</td>
|
42 |
Â
</tr>
|
43 |
Â
</tbody>
|
@@ -46,7 +47,13 @@ $resizeimagescrop = $this -> get_option('resizeimagescrop');
|
|
46 |
Â
<div id="autoheight_div" style="display:<?php echo (!empty($autoheight)) ? 'block' : ''; ?>;">
|
47 |
Â
<table class="form-table">
|
48 |
Â
<tbody>
|
49 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
50 |
Â
</tbody>
|
51 |
Â
</table>
|
52 |
Â
</div>
|
6 |
Â
|
7 |
Â
$styles = $this -> get_option('styles');
|
8 |
Â
$autoheight = $this -> get_option('autoheight');
|
9 |
+
$autoheight_max = $this -> get_option('autoheight_max');
|
10 |
Â
$resizeimagescrop = $this -> get_option('resizeimagescrop');
|
11 |
Â
|
12 |
Â
?>
|
38 |
Â
<tr>
|
39 |
Â
<th><label for="autoheight"><?php _e('Auto Height', $this -> plugin_name); ?></label></th>
|
40 |
Â
<td>
|
41 |
+
<label><input onclick="if (jQuery(this).is(':checked')) { jQuery('#autoheight_div').show(); jQuery('#styles_height').attr('disabled', 'disabled'); } else { jQuery('#autoheight_div').hide(); jQuery('#styles_height').removeAttr('disabled'); }" <?php echo (!empty($autoheight)) ? 'checked="checked"' : ''; ?> type="checkbox" name="autoheight" value="1" id="autoheight" /> <?php _e('Yes, automatically adjust the slideshow height for each slide', $this -> plugin_name); ?></label>
|
42 |
Â
</td>
|
43 |
Â
</tr>
|
44 |
Â
</tbody>
|
47 |
Â
<div id="autoheight_div" style="display:<?php echo (!empty($autoheight)) ? 'block' : ''; ?>;">
|
48 |
Â
<table class="form-table">
|
49 |
Â
<tbody>
|
50 |
+
<tr>
|
51 |
+
<th><label for="autoheight_max"><?php _e('Maximum Auto Height', $this -> plugin_name); ?></label></th>
|
52 |
+
<td>
|
53 |
+
<label><input type="text" class="widefat" style="width:65px;" name="autoheight_max" value="<?php echo esc_attr(stripslashes($autoheight_max)); ?>" id="autoheight_max" /> <?php _e('pixels', $this -> plugin_name); ?></label>
|
54 |
+
<span class="howto"><?php _e('Set the maximum height that auto height may go or leave empty/zero for no maximum', $this -> plugin_name); ?></span>
|
55 |
+
</td>
|
56 |
+
</tr>
|
57 |
Â
</tbody>
|
58 |
Â
</table>
|
59 |
Â
</div>
|
views/admin/msg-top.php
CHANGED
@@ -6,7 +6,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
|
6 |
Â
|
7 |
Â
<?php if (!empty($message)) : ?>
|
8 |
Â
<div id="message" class="slideshow updated notice">
|
9 |
-
<p
|
10 |
Â
<?php if (!empty($dismissable)) : ?>
|
11 |
Â
<a href="<?php echo $dismissable; ?>" class="notice-dismiss"><span class="screen-reader-text"><?php _e('Dismiss this notice.', $this -> plugin_name); ?></span></a>
|
12 |
Â
<?php endif; ?>
|
6 |
Â
|
7 |
Â
<?php if (!empty($message)) : ?>
|
8 |
Â
<div id="message" class="slideshow updated notice">
|
9 |
+
<p><i class="fa fa-check"></i> <?php echo $message; ?></p>
|
10 |
Â
<?php if (!empty($dismissable)) : ?>
|
11 |
Â
<a href="<?php echo $dismissable; ?>" class="notice-dismiss"><span class="screen-reader-text"><?php _e('Dismiss this notice.', $this -> plugin_name); ?></span></a>
|
12 |
Â
<?php endif; ?>
|
views/admin/settings-submitserial.php
ADDED
@@ -0,0 +1,27 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<div class="wrap slideshow">
|
2 |
+
<h1><?php _e('Submit Serial Key', $this -> plugin_name); ?></h1>
|
3 |
+
|
4 |
+
<p>
|
5 |
+
<?php _e('Please submit a serial key in the form below.', $this -> plugin_name); ?><br/>
|
6 |
+
<?php echo sprintf(__('You can obtain the serial key from your %s.', $this -> plugin_name), '<a href="http://tribulant.com/downloads/" target="_blank">' . __('downloads section', $this -> plugin_name) . '</a>'); ?><br/>
|
7 |
+
</p>
|
8 |
+
|
9 |
+
<?php $this -> render('error', array('errors' => $errors), true, 'admin'); ?>
|
10 |
+
|
11 |
+
<form action="?page=<?php echo $this -> sections -> submitserial; ?>" method="post">
|
12 |
+
<table class="form-table">
|
13 |
+
<tbody>
|
14 |
+
<tr>
|
15 |
+
<th><label for="serial"><?php _e('Serial Key', $this -> plugin_name); ?></label></th>
|
16 |
+
<td>
|
17 |
+
<input style="width:320px;" class="widefat" type="text" name="serial" value="<?php echo esc_attr(stripslashes($_POST['serial'])); ?>" id="serial" />
|
18 |
+
</td>
|
19 |
+
</tr>
|
20 |
+
</tbody>
|
21 |
+
</table>
|
22 |
+
|
23 |
+
<p class="submit">
|
24 |
+
<input type="submit" class="button button-primary" name="submit" value="<?php _e('Submit Serial Key', $this -> plugin_name); ?>" />
|
25 |
+
</p>
|
26 |
+
</form>
|
27 |
+
</div>
|
views/admin/settings.php
CHANGED
@@ -11,7 +11,7 @@ wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false);
|
|
11 |
Â
?>
|
12 |
Â
|
13 |
Â
<div class="wrap slideshow <?php echo $this -> pre; ?>">
|
14 |
-
<
|
15 |
Â
|
16 |
Â
<form action="<?php echo $this -> url; ?>" name="post" id="post" method="post">
|
17 |
Â
|
11 |
Â
?>
|
12 |
Â
|
13 |
Â
<div class="wrap slideshow <?php echo $this -> pre; ?>">
|
14 |
+
<h1><?php _e('Configuration Settings', $this -> plugin_name); ?></h1>
|
15 |
Â
|
16 |
Â
<form action="<?php echo $this -> url; ?>" name="post" id="post" method="post">
|
17 |
Â
|
views/admin/slides/index.php
CHANGED
@@ -5,9 +5,9 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
|
5 |
Â
?>
|
6 |
Â
|
7 |
Â
<div class="wrap <?php echo $this -> pre; ?> slideshow">
|
8 |
-
<
|
9 |
Â
<?php echo $this -> Html -> link(__('Add New', $this -> plugin_name), $this -> url . '&method=save', array('class' => "add-new-h2")); ?>
|
10 |
-
<?php echo $this -> Html -> link(__('Add Multiple', $this -> plugin_name), $this -> url . '&method=save-multiple', array('class' => "add-new-h2")); ?></
|
11 |
Â
|
12 |
Â
<?php if (!empty($slides)) : ?>
|
13 |
Â
<form id="posts-filter" action="<?php echo $this -> url; ?>" method="post">
|
5 |
Â
?>
|
6 |
Â
|
7 |
Â
<div class="wrap <?php echo $this -> pre; ?> slideshow">
|
8 |
+
<h1><?php _e('Manage Slides', $this -> plugin_name); ?>
|
9 |
Â
<?php echo $this -> Html -> link(__('Add New', $this -> plugin_name), $this -> url . '&method=save', array('class' => "add-new-h2")); ?>
|
10 |
+
<?php echo $this -> Html -> link(__('Add Multiple', $this -> plugin_name), $this -> url . '&method=save-multiple', array('class' => "add-new-h2")); ?></h1>
|
11 |
Â
|
12 |
Â
<?php if (!empty($slides)) : ?>
|
13 |
Â
<form id="posts-filter" action="<?php echo $this -> url; ?>" method="post">
|
views/admin/slides/loop.php
CHANGED
@@ -12,25 +12,55 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
|
12 |
Â
<div class="tablenav">
|
13 |
Â
<div class="alignleft actions">
|
14 |
Â
<?php if (!empty($_GET['page']) && $_GET['page'] == $this -> sections -> galleries) : ?>
|
15 |
-
<a href="?page=<?php echo $this -> sections -> slides; ?>&method=order&gallery_id=<?php echo $gallery -> id; ?>" class="button"
|
16 |
Â
<?php else : ?>
|
17 |
-
<a href="<?php echo $this -> url; ?>&method=order"
|
18 |
Â
<?php endif; ?>
|
19 |
Â
</div>
|
20 |
Â
<div class="alignleft actions">
|
21 |
-
<select name="action" class="action">
|
22 |
Â
<option value=""><?php _e('- Bulk Actions -', $this -> plugin_name); ?></option>
|
23 |
Â
<option value="delete"><?php _e('Delete', $this -> plugin_name); ?></option>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
24 |
Â
</select>
|
25 |
Â
<input type="submit" class="button" value="<?php _e('Apply', $this -> plugin_name); ?>" name="execute" />
|
26 |
Â
</div>
|
27 |
Â
<?php $this -> render('paginate', array('paginate' => $paginate), true, 'admin'); ?>
|
28 |
Â
</div>
|
29 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
30 |
Â
<?php
|
31 |
Â
|
32 |
-
$orderby = (empty($_GET['orderby'])) ? 'modified' : $_GET['orderby'];
|
33 |
-
$order = (empty($_GET['order'])) ? 'desc' : strtolower($_GET['order']);
|
34 |
Â
$otherorder = ($order == "desc") ? 'asc' : 'desc';
|
35 |
Â
|
36 |
Â
?>
|
@@ -150,13 +180,13 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
|
150 |
Â
</td>
|
151 |
Â
<td>
|
152 |
Â
<?php if (!empty($slide -> uselink) && $slide -> uselink == "Y") : ?>
|
153 |
-
<span
|
154 |
-
<small>(<a href="<?php echo $slide -> link; ?>" title="" target="_blank"><?php _e('Open', $this -> plugin_name); ?></a>)</small>
|
155 |
Â
<?php else : ?>
|
156 |
-
<span class="slideshow_error"
|
157 |
Â
<?php endif; ?>
|
158 |
Â
</td>
|
159 |
-
<td><abbr title="<?php echo $slide -> modified; ?>"><?php echo date(
|
160 |
Â
<td><?php echo ((int) $slide -> order + 1); ?></td>
|
161 |
Â
</tr>
|
162 |
Â
<?php endforeach; ?>
|
@@ -164,7 +194,30 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
|
164 |
Â
</table>
|
165 |
Â
|
166 |
Â
<div class="tablenav">
|
167 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
168 |
Â
<?php $this -> render('paginate', array('paginate' => $paginate), true, 'admin'); ?>
|
169 |
Â
</div>
|
170 |
Â
</form>
|
12 |
Â
<div class="tablenav">
|
13 |
Â
<div class="alignleft actions">
|
14 |
Â
<?php if (!empty($_GET['page']) && $_GET['page'] == $this -> sections -> galleries) : ?>
|
15 |
+
<a href="?page=<?php echo $this -> sections -> slides; ?>&method=order&gallery_id=<?php echo $gallery -> id; ?>" class="button"><i class="fa fa-sort"></i> <?php _e('Order Slides', $this -> plugin_name); ?></a>
|
16 |
Â
<?php else : ?>
|
17 |
+
<a href="<?php echo $this -> url; ?>&method=order" class="button"><i class="fa fa-sort"></i> <?php _e('Order Slides', $this -> plugin_name); ?></a>
|
18 |
Â
<?php endif; ?>
|
19 |
Â
</div>
|
20 |
Â
<div class="alignleft actions">
|
21 |
+
<select name="action" class="action" onchange="change_action(this.value);">
|
22 |
Â
<option value=""><?php _e('- Bulk Actions -', $this -> plugin_name); ?></option>
|
23 |
Â
<option value="delete"><?php _e('Delete', $this -> plugin_name); ?></option>
|
24 |
+
<optgroup label="<?php _e('Galleries', $this -> plugin_name); ?>">
|
25 |
+
<option value="addgalleries"><?php _e('Add Galleries...', $this -> plugin_name); ?></option>
|
26 |
+
<option value="setgalleries"><?php _e('Set Galleries...', $this -> plugin_name); ?></option>
|
27 |
+
<option value="remgalleries"><?php _e('Remove All Galleries', $this -> plugin_name); ?></option>
|
28 |
+
</optgroup>
|
29 |
Â
</select>
|
30 |
Â
<input type="submit" class="button" value="<?php _e('Apply', $this -> plugin_name); ?>" name="execute" />
|
31 |
Â
</div>
|
32 |
Â
<?php $this -> render('paginate', array('paginate' => $paginate), true, 'admin'); ?>
|
33 |
Â
</div>
|
34 |
Â
|
35 |
+
<div id="action_galleries_div" style="display:none;">
|
36 |
+
<?php if ($galleries = $this -> Gallery() -> select()) : ?>
|
37 |
+
<div><label style="font-weight:bold"><input onclick="jqCheckAll(this, false, 'galleries');" type="checkbox" name="checkboxall" value="1" /> <?php _e('Select all', $this -> plugin_name); ?></label></div>
|
38 |
+
<?php foreach ($galleries as $gallery_id => $gallery_name) : ?>
|
39 |
+
<div><label><input type="checkbox" name="galleries[]" value="<?php echo $gallery_id; ?>" /> <?php _e($gallery_name); ?></label></div>
|
40 |
+
<?php endforeach; ?>
|
41 |
+
<?php else : ?>
|
42 |
+
<p class="slideshow_error"><?php _e('No galleries are available', $this -> plugin_name); ?></p>
|
43 |
+
<?php endif; ?>
|
44 |
+
</div>
|
45 |
+
|
46 |
+
<script type="text/javascript">
|
47 |
+
function change_action(action) {
|
48 |
+
switch (action) {
|
49 |
+
case 'addgalleries' :
|
50 |
+
case 'setgalleries' :
|
51 |
+
jQuery('#action_galleries_div').show();
|
52 |
+
break;
|
53 |
+
default :
|
54 |
+
jQuery('#action_galleries_div').hide();
|
55 |
+
break;
|
56 |
+
}
|
57 |
+
}
|
58 |
+
</script>
|
59 |
+
|
60 |
Â
<?php
|
61 |
Â
|
62 |
+
$orderby = (empty($_GET['orderby'])) ? 'modified' : esc_html($_GET['orderby']);
|
63 |
+
$order = (empty($_GET['order'])) ? 'desc' : strtolower(esc_html($_GET['order']));
|
64 |
Â
$otherorder = ($order == "desc") ? 'asc' : 'desc';
|
65 |
Â
|
66 |
Â
?>
|
180 |
Â
</td>
|
181 |
Â
<td>
|
182 |
Â
<?php if (!empty($slide -> uselink) && $slide -> uselink == "Y") : ?>
|
183 |
+
<span class="slideshow_success"><i class="fa fa-check"></i></span>
|
184 |
+
<small>(<a href="<?php echo __($slide -> link); ?>" title="" target="_blank"><?php _e('Open', $this -> plugin_name); ?></a>)</small>
|
185 |
Â
<?php else : ?>
|
186 |
+
<span class="slideshow_error"><i class="fa fa-times"></i></span>
|
187 |
Â
<?php endif; ?>
|
188 |
Â
</td>
|
189 |
+
<td><abbr title="<?php echo $slide -> modified; ?>"><?php echo date(get_option('date_format'), strtotime($slide -> modified)); ?></abbr></td>
|
190 |
Â
<td><?php echo ((int) $slide -> order + 1); ?></td>
|
191 |
Â
</tr>
|
192 |
Â
<?php endforeach; ?>
|
194 |
Â
</table>
|
195 |
Â
|
196 |
Â
<div class="tablenav">
|
197 |
+
<div class="alignleft">
|
198 |
+
<?php if (empty($_GET['showall'])) : ?>
|
199 |
+
<select class="widefat" style="width:auto;" name="perpage" onchange="change_perpage(this.value);">
|
200 |
+
<option value=""><?php _e('- Per Page -', $this -> plugin_name); ?></option>
|
201 |
+
<?php $p = 5; ?>
|
202 |
+
<?php while ($p < 100) : ?>
|
203 |
+
<option <?php echo (!empty($_COOKIE[$this -> pre . 'slidesperpage']) && $_COOKIE[$this -> pre . 'slidesperpage'] == $p) ? 'selected="selected"' : ''; ?> value="<?php echo $p; ?>"><?php echo $p; ?> <?php _e('per page', $this -> plugin_name); ?></option>
|
204 |
+
<?php $p += 5; ?>
|
205 |
+
<?php endwhile; ?>
|
206 |
+
<?php if (isset($_COOKIE[$this -> pre . 'slidesperpage'])) : ?>
|
207 |
+
<option selected="selected" value="<?php echo $_COOKIE[$this -> pre . 'slidesperpage']; ?>"><?php echo $_COOKIE[$this -> pre . 'slidesperpage']; ?></option>
|
208 |
+
<?php endif; ?>
|
209 |
+
</select>
|
210 |
+
<?php endif; ?>
|
211 |
+
|
212 |
+
<script type="text/javascript">
|
213 |
+
function change_perpage(perpage) {
|
214 |
+
if (perpage != "") {
|
215 |
+
document.cookie = "<?php echo $this -> pre; ?>slidesperpage=" + perpage + "; expires=<?php echo GalleryHtmlHelper::gen_date($this -> get_option('cookieformat'), strtotime("+30 days")); ?> UTC; path=/";
|
216 |
+
window.location = "<?php echo preg_replace("/\&?" . $this -> pre . "page\=(.*)?/si", "", $_SERVER['REQUEST_URI']); ?>";
|
217 |
+
}
|
218 |
+
}
|
219 |
+
</script>
|
220 |
+
</div>
|
221 |
Â
<?php $this -> render('paginate', array('paginate' => $paginate), true, 'admin'); ?>
|
222 |
Â
</div>
|
223 |
Â
</form>
|
views/admin/slides/order.php
CHANGED
@@ -5,7 +5,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
|
5 |
Â
?>
|
6 |
Â
|
7 |
Â
<div class="wrap">
|
8 |
-
<
|
9 |
Â
|
10 |
Â
<div style="float:none;" class="subsubsub">
|
11 |
Â
<a href="<?php echo $this -> url; ?>"><?php _e('← Manage All Slides', $this -> plugin_name); ?></a>
|
5 |
Â
?>
|
6 |
Â
|
7 |
Â
<div class="wrap">
|
8 |
+
<h1><?php _e('Order Slides', $this -> plugin_name); ?><?php echo (!empty($gallery)) ? ': ' . __($gallery -> title) : ''; ?></h1>
|
9 |
Â
|
10 |
Â
<div style="float:none;" class="subsubsub">
|
11 |
Â
<a href="<?php echo $this -> url; ?>"><?php _e('← Manage All Slides', $this -> plugin_name); ?></a>
|
views/admin/slides/save-multiple.php
CHANGED
@@ -5,7 +5,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
|
5 |
Â
?>
|
6 |
Â
|
7 |
Â
<div class="wrap <?php echo $this -> pre; ?> slideshow">
|
8 |
-
<
|
9 |
Â
|
10 |
Â
<?php if (!empty($errors)) : ?>
|
11 |
Â
<div class="slideshow_error">
|
@@ -59,7 +59,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
|
59 |
Â
<tr>
|
60 |
Â
<th><label for=""><?php _e('Galleries', $this -> plugin_name); ?></label></th>
|
61 |
Â
<td>
|
62 |
-
<?php if ($galleries = $this -> Gallery -> select()) : ?>
|
63 |
Â
<label style="font-weight:bold"><input onclick="jqCheckAll(this,'','Slide[galleries]');" type="checkbox" name="checkboxall" value="checkboxall" id="checkboxall" /> <?php _e('Select All', $this -> plugin_name); ?></label><br/>
|
64 |
Â
<?php foreach ($galleries as $gallery_id => $gallery_title) : ?>
|
65 |
Â
<label><input <?php echo (!empty($_POST['Slide']['galleries']) && in_array($gallery_id, $_POST['Slide']['galleries'])) ? 'checked="checked"' : ''; ?> type="checkbox" name="Slide[galleries][]" value="<?php echo $gallery_id; ?>" id="Slide_galleries_<?php echo $gallery_id; ?>" /> <?php echo __($gallery_title); ?></label><br/>
|
5 |
Â
?>
|
6 |
Â
|
7 |
Â
<div class="wrap <?php echo $this -> pre; ?> slideshow">
|
8 |
+
<h1><?php _e('Save Multiple Slides', $this -> plugin_name); ?></h1>
|
9 |
Â
|
10 |
Â
<?php if (!empty($errors)) : ?>
|
11 |
Â
<div class="slideshow_error">
|
59 |
Â
<tr>
|
60 |
Â
<th><label for=""><?php _e('Galleries', $this -> plugin_name); ?></label></th>
|
61 |
Â
<td>
|
62 |
+
<?php if ($galleries = $this -> Gallery() -> select()) : ?>
|
63 |
Â
<label style="font-weight:bold"><input onclick="jqCheckAll(this,'','Slide[galleries]');" type="checkbox" name="checkboxall" value="checkboxall" id="checkboxall" /> <?php _e('Select All', $this -> plugin_name); ?></label><br/>
|
64 |
Â
<?php foreach ($galleries as $gallery_id => $gallery_title) : ?>
|
65 |
Â
<label><input <?php echo (!empty($_POST['Slide']['galleries']) && in_array($gallery_id, $_POST['Slide']['galleries'])) ? 'checked="checked"' : ''; ?> type="checkbox" name="Slide[galleries][]" value="<?php echo $gallery_id; ?>" id="Slide_galleries_<?php echo $gallery_id; ?>" /> <?php echo __($gallery_title); ?></label><br/>
|
views/admin/slides/save.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Â
|
5 |
Â
if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
6 |
Â
|
7 |
-
$showinfo = $this -> Slide -> data -> showinfo;
|
8 |
Â
|
9 |
Â
if ($this -> language_do()) {
|
10 |
Â
$languages = $this -> language_getlanguages();
|
@@ -13,14 +13,14 @@ if ($this -> language_do()) {
|
|
13 |
Â
?>
|
14 |
Â
|
15 |
Â
<div class="wrap <?php echo $this -> pre; ?> slideshow-gallery slideshow">
|
16 |
-
<
|
17 |
Â
|
18 |
Â
<form action="<?php echo $this -> url; ?>&method=save" method="post" enctype="multipart/form-data">
|
19 |
Â
|
20 |
-
<?php wp_nonce_field('slideshow-slides-save_' . $this -> Slide -> data -> id); ?>
|
21 |
Â
|
22 |
-
<input type="hidden" name="Slide[id]" value="<?php echo $this -> Slide -> data -> id; ?>" />
|
23 |
-
<input type="hidden" name="Slide[order]" value="<?php echo $this -> Slide -> data -> order; ?>" />
|
24 |
Â
|
25 |
Â
<table class="form-table">
|
26 |
Â
<tbody>
|
@@ -29,7 +29,7 @@ if ($this -> language_do()) {
|
|
29 |
Â
<?php echo $this -> Html -> help(__('This title is for your reference in management and it will also be used to display the title of the slide in the information bar if you have that turned on.', $this -> plugin_name)); ?></th>
|
30 |
Â
<td>
|
31 |
Â
<?php if ($this -> language_do()) : ?>
|
32 |
-
<?php $titles = $this -> language_split($this -> Slide -> data -> title); ?>
|
33 |
Â
<div id="slide-title-tabs">
|
34 |
Â
<ul>
|
35 |
Â
<?php foreach ($languages as $language) : ?>
|
@@ -49,10 +49,10 @@ if ($this -> language_do()) {
|
|
49 |
Â
});
|
50 |
Â
</script>
|
51 |
Â
<?php else : ?>
|
52 |
-
<input class="widefat" type="text" name="Slide[title]" value="<?php echo esc_attr($this -> Slide -> data -> title); ?>" id="Slide.title" />
|
53 |
Â
<?php endif; ?>
|
54 |
Â
<span class="howto"><?php _e('Title/name of your slide as it will be displayed to your users.', $this -> plugin_name); ?></span>
|
55 |
-
<?php echo (!empty($this -> Slide -> errors['title'])) ? '<div class="slideshow_error">' . $this -> Slide -> errors['title'] . '</div>' : ''; ?>
|
56 |
Â
</td>
|
57 |
Â
</tr>
|
58 |
Â
<tr>
|
@@ -60,7 +60,7 @@ if ($this -> language_do()) {
|
|
60 |
Â
<?php echo $this -> Html -> help(__('The description is specifically used for the information bar if you have that turned on.', $this -> plugin_name)); ?></th>
|
61 |
Â
<td>
|
62 |
Â
<?php if ($this -> language_do()) : ?>
|
63 |
-
<?php $descriptions = $this -> language_split($this -> Slide -> data -> description); ?>
|
64 |
Â
<div id="slide-description-tabs">
|
65 |
Â
<ul>
|
66 |
Â
<?php foreach ($languages as $language) : ?>
|
@@ -80,10 +80,10 @@ if ($this -> language_do()) {
|
|
80 |
Â
});
|
81 |
Â
</script>
|
82 |
Â
<?php else : ?>
|
83 |
-
<textarea class="widefat" rows="5" cols="100%" name="Slide[description]"><?php echo esc_attr($this -> Slide -> data -> description); ?></textarea>
|
84 |
Â
<?php endif; ?>
|
85 |
Â
<span class="howto"><?php _e('Description of your slide as it will be displayed to your users below the title.', $this -> plugin_name); ?></span>
|
86 |
-
<?php echo (!empty($this -> Slide -> errors['description'])) ? '<div class="slideshow_error">' . $this -> Slide -> errors['description'] . '</div>' : ''; ?>
|
87 |
Â
</td>
|
88 |
Â
</tr>
|
89 |
Â
<tr>
|
@@ -107,7 +107,7 @@ if ($this -> language_do()) {
|
|
107 |
Â
<th><label for="iopacity"><?php _e('Info Opacity', $this -> plugin_name); ?></label>
|
108 |
Â
<?php echo $this -> Html -> help(__('The opacity of the information bar from 0 to 100 where 0 is transparent and 100 is opague.', $this -> plugin_name)); ?></th>
|
109 |
Â
<td>
|
110 |
-
<input type="text" id="iopacity" class="widefat" style="width:45px;" name="Slide[iopacity]" value="<?php echo empty($this -> Slide -> data -> iopacity) ? 70 : esc_attr(stripslashes($this -> Slide -> data -> iopacity)); ?>" />
|
111 |
Â
<span class="howto"><?php _e('A value between 0 and 100. Leave empty for default.', $this -> plugin_name); ?></span>
|
112 |
Â
</td>
|
113 |
Â
</tr>
|
@@ -121,10 +121,10 @@ if ($this -> language_do()) {
|
|
121 |
Â
<th><label for="checkboxall"><?php _e('Galleries', $this -> plugin_name); ?></label>
|
122 |
Â
<?php echo $this -> Html -> help(__('You can organize/assign a slide to multiple galleries as needed. It is easy to display a slideshow with the slides of a specific gallery then.', $this -> plugin_name)); ?></th>
|
123 |
Â
<td>
|
124 |
-
<?php if ($galleries = $this -> Gallery -> select()) : ?>
|
125 |
Â
<label style="font-weight:bold"><input onclick="jqCheckAll(this,'','Slide[galleries]');" type="checkbox" name="checkboxall" value="checkboxall" id="checkboxall" /> <?php _e('Select All', $this -> plugin_name); ?></label><br/>
|
126 |
Â
<?php foreach ($galleries as $gallery_id => $gallery_title) : ?>
|
127 |
-
<label><input <?php echo (!empty($this -> Slide -> data -> galleries) && in_array($gallery_id, $this -> Slide -> data -> galleries)) ? 'checked="checked"' : ''; ?> type="checkbox" name="Slide[galleries][]" value="<?php echo $gallery_id; ?>" id="Slide_galleries_<?php echo $gallery_id; ?>" /> <?php echo __($gallery_title); ?></label><br/>
|
128 |
Â
<?php endforeach; ?>
|
129 |
Â
<?php else : ?>
|
130 |
Â
<span class="error"><?php _e('No galleries are available.', $this -> plugin_name); ?></span>
|
@@ -136,10 +136,10 @@ if ($this -> language_do()) {
|
|
136 |
Â
<th><label for="Slide.type.media"><?php _e('Image Type', $this -> plugin_name); ?></label>
|
137 |
Â
<?php echo $this -> Html -> help(__('Do you want to specify a URL to your image or upload the image file manually? Specifying a URL will still copy the image file remotely from the location to your server so uploading is recommended to prevent any restrictions or errors.', $this -> plugin_name)); ?></th>
|
138 |
Â
<td>
|
139 |
-
<label><input onclick="jQuery('#typediv_media').show(); jQuery('#typediv_file').hide(); jQuery('#typediv_url').hide();" <?php echo (empty($this -> Slide -> data -> type) || $this -> Slide -> data -> type == "media") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[type]" value="media" id="Slide.type.media" /> <?php _e('Media Upload', $this -> plugin_name); ?></label>
|
140 |
-
<label><input onclick="jQuery('#typediv_file').show(); jQuery('#typediv_media').hide(); jQuery('#typediv_url').hide();" <?php echo ($this -> Slide -> data -> type == "file") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[type]" value="file" id="Slide.type.file" /> <?php _e('Upload File', $this -> plugin_name); ?></label>
|
141 |
-
<label><input onclick="jQuery('#typediv_url').show(); jQuery('#typediv_media').hide(); jQuery('#typediv_file').hide();" <?php echo ($this -> Slide -> data -> type == "url") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[type]" value="url" id="Slide.type.url" /> <?php _e('Specify URL', $this -> plugin_name); ?></label>
|
142 |
-
<?php echo (!empty($this -> Slide -> errors['type'])) ? '<div class="slideshow_error">' . $this -> Slide -> errors['type'] . '</div>' : ''; ?>
|
143 |
Â
<span class="howto"><?php _e('Do you want to upload an image or specify a local/remote image URL?', $this -> plugin_name); ?></span>
|
144 |
Â
</td>
|
145 |
Â
</tr>
|
@@ -147,7 +147,7 @@ if ($this -> language_do()) {
|
|
147 |
Â
</table>
|
148 |
Â
|
149 |
Â
<!-- Choose/upload file with the WordPress media uploader -->
|
150 |
-
<div id="typediv_media" style="display:<?php echo (empty($this -> Slide -> data -> type) || $this -> Slide -> data -> type == "media") ? 'block' : 'none'; ?>;">
|
151 |
Â
<table class="form-table">
|
152 |
Â
<tbody>
|
153 |
Â
<tr>
|
@@ -155,16 +155,16 @@ if ($this -> language_do()) {
|
|
155 |
Â
<td>
|
156 |
Â
<div id="Slide_mediaupload_image">
|
157 |
Â
<!-- image goes here -->
|
158 |
-
<?php if (!empty($this -> Slide -> data -> image_url)) : ?>
|
159 |
-
<a href="<?php echo $this -> Slide -> data -> image_url; ?>" title="<?php echo __($this -> Slide -> data -> title); ?>" class="colorbox"><img class="img-rounded" src="<?php echo $this -> Html -> bfithumb_image_src($this -> Slide -> data -> image_url, 100, 100, 100); ?>" /></a>
|
160 |
Â
<?php endif; ?>
|
161 |
Â
</div>
|
162 |
Â
|
163 |
Â
<input type="button" name="Slide_mediaupload" value="<?php _e('Choose File', $this -> plugin_name); ?>" id="Slide_mediaupload" class="button button-secondary" />
|
164 |
-
<input type="text" name="Slide[media_file]" style="width:50%;" id="Slide_image_file" value="<?php echo esc_attr(stripslashes($this -> Slide -> data -> image_url)); ?>" />
|
165 |
-
<input type="hidden" name="Slide[attachment_id]" value="<?php echo esc_attr(stripslashes($this -> Slide -> data -> attachment_id)); ?>" id="Slide_attachment_id" />
|
166 |
Â
|
167 |
-
<?php echo (!empty($this -> Slide -> errors['media_file'])) ? '<div class="slideshow_error">' . $this -> Slide -> errors['media_file'] . '</div>' : ''; ?>
|
168 |
Â
|
169 |
Â
<script type="text/javascript">
|
170 |
Â
jQuery(document).ready(function() {
|
@@ -211,7 +211,7 @@ if ($this -> language_do()) {
|
|
211 |
Â
</table>
|
212 |
Â
</div>
|
213 |
Â
|
214 |
-
<div id="typediv_file" style="display:<?php echo (!empty($this -> Slide -> data -> type) && $this -> Slide -> data -> type == "file") ? 'block' : 'none'; ?>;">
|
215 |
Â
<table class="form-table">
|
216 |
Â
<tbody>
|
217 |
Â
<tr>
|
@@ -220,27 +220,27 @@ if ($this -> language_do()) {
|
|
220 |
Â
<td>
|
221 |
Â
<input type="file" name="image_file" value="" id="Slide.image_file" />
|
222 |
Â
<span class="howto"><?php _e('Choose your image file from your computer. JPG, PNG, GIF are supported.', $this -> plugin_name); ?></span>
|
223 |
-
<?php echo (!empty($this -> Slide -> errors['image_file'])) ? '<div class="slideshow_error">' . $this -> Slide -> errors['image_file'] . '</div>' : ''; ?>
|
224 |
Â
|
225 |
Â
<?php
|
226 |
Â
|
227 |
-
if (!empty($this -> Slide -> data -> type) && $this -> Slide -> data -> type == "file") {
|
228 |
-
if (!empty($this -> Slide -> data -> image)) {
|
229 |
Â
?>
|
230 |
Â
|
231 |
-
<input type="hidden" name="Slide[image_oldfile]" value="<?php echo esc_attr(stripslashes($this -> Slide -> data -> image)); ?>" />
|
232 |
Â
<p><small><?php _e('Current image. Leave the field above blank to keep this image.', $this -> plugin_name); ?></small></p>
|
233 |
Â
<?php
|
234 |
Â
|
235 |
Â
$imagespath = $this -> get_option('imagespath');
|
236 |
Â
if (empty($imagespath)) {
|
237 |
-
$image = GalleryHtmlHelper::uploads_path() . DS . $this -> plugin_name . DS . $this -> Slide -> data -> image;
|
238 |
Â
} else {
|
239 |
-
$image = rtrim($imagespath, DS) . DS . $this -> Slide -> data -> image;
|
240 |
Â
}
|
241 |
Â
|
242 |
Â
?>
|
243 |
-
<p><a title="<?php echo esc_attr($this -> Slide -> data -> title); ?>" class="colorbox" href="<?php echo $this -> Slide -> data -> image_path; ?>"><img src="<?php echo $this -> Html -> bfithumb_image_src($image, 100, 100, 100); ?>" alt="" class="slideshow" /></a></p>
|
244 |
Â
|
245 |
Â
<?php
|
246 |
Â
}
|
@@ -253,16 +253,16 @@ if ($this -> language_do()) {
|
|
253 |
Â
</table>
|
254 |
Â
</div>
|
255 |
Â
|
256 |
-
<div id="typediv_url" style="display:<?php echo ($this -> Slide -> data -> type == "url") ? 'block' : 'none'; ?>;">
|
257 |
Â
<table class="form-table">
|
258 |
Â
<tbody>
|
259 |
Â
<tr>
|
260 |
Â
<th><label for="Slide.image_url"><?php _e('Image URL', $this -> plugin_name); ?></label>
|
261 |
Â
<?php echo $this -> Html -> help(__('Specify an absolute URL to an image file to use for this slide. The image will be copied from the location to your server.', $this -> plugin_name)); ?></th>
|
262 |
Â
<td>
|
263 |
-
<input class="widefat" type="text" name="Slide[image_url]" value="<?php echo esc_attr($this -> Slide -> data -> image_url); ?>" id="Slide.image_url" />
|
264 |
Â
<span class="howto"><?php _e('Local or remote image location eg. http://domain.com/path/to/image.jpg', $this -> plugin_name); ?></span>
|
265 |
-
<?php echo (!empty($this -> Slide -> errors['image_url'])) ? '<div class="slideshow_error">' . $this -> Slide -> errors['image_url'] . '</div>' : ''; ?>
|
266 |
Â
</td>
|
267 |
Â
</tr>
|
268 |
Â
</tbody>
|
@@ -275,15 +275,15 @@ if ($this -> language_do()) {
|
|
275 |
Â
<th><label for="Slide_uselink_N"><?php _e('Use Link', $this -> plugin_name); ?></label>
|
276 |
Â
<?php echo $this -> Html -> help(__('Turn this on to specify a link/URL for this slide to link to when it is clicked.', $this -> plugin_name)); ?></th>
|
277 |
Â
<td>
|
278 |
-
<label><input onclick="jQuery('#Slide_uselink_div').show();" <?php echo ($this -> Slide -> data -> uselink == "Y") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[uselink]" value="Y" id="Slide_uselink_Y" /> <?php _e('Yes', $this -> plugin_name); ?></label>
|
279 |
-
<label><input onclick="jQuery('#Slide_uselink_div').hide();" <?php echo (empty($this -> Slide -> data -> uselink) || $this -> Slide -> data -> uselink == "N") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[uselink]" value="N" id="Slide_uselink_N" /> <?php _e('No', $this -> plugin_name); ?></label>
|
280 |
Â
<span class="howto"><?php _e('Set this to Yes to link this slide to a link/URL of your choice.', $this -> plugin_name); ?></span>
|
281 |
Â
</td>
|
282 |
Â
</tr>
|
283 |
Â
</tbody>
|
284 |
Â
</table>
|
285 |
Â
|
286 |
-
<div id="Slide_uselink_div" style="display:<?php echo ($this -> Slide -> data -> uselink == "Y") ? 'block' : 'none'; ?>;">
|
287 |
Â
<table class="form-table">
|
288 |
Â
<tbody>
|
289 |
Â
<tr>
|
@@ -291,7 +291,7 @@ if ($this -> language_do()) {
|
|
291 |
Â
<?php echo $this -> Html -> help(__('The absolute URL to take the user to when the slide is clicked.', $this -> plugin_name)); ?></th>
|
292 |
Â
<td>
|
293 |
Â
<?php if ($this -> language_do()) : ?>
|
294 |
-
<?php $links = $this -> language_split($this -> Slide -> data -> link); ?>
|
295 |
Â
<div id="slide-link-tabs">
|
296 |
Â
<ul>
|
297 |
Â
<?php foreach ($languages as $language) : ?>
|
@@ -311,7 +311,7 @@ if ($this -> language_do()) {
|
|
311 |
Â
});
|
312 |
Â
</script>
|
313 |
Â
<?php else : ?>
|
314 |
-
<input class="widefat" type="text" name="Slide[link]" value="<?php echo esc_attr($this -> Slide -> data -> link); ?>" id="Slide.link" />
|
315 |
Â
<?php endif; ?>
|
316 |
Â
|
317 |
Â
<span class="howto"><?php _e('Link/URL to go to when a user clicks the slide eg. http://www.domain.com/mypage/', $this -> plugin_name); ?></span>
|
@@ -321,8 +321,8 @@ if ($this -> language_do()) {
|
|
321 |
Â
<th><label for="Slide_linktarget_self"><?php _e('Link Target', $this -> plugin_name); ?></label>
|
322 |
Â
<?php echo $this -> Html -> help(__('Depending on the purpose of specifying this link, you may want it to open in the same window or in a new window.', $this -> plugin_name)); ?></th>
|
323 |
Â
<td>
|
324 |
-
<label><input <?php echo (empty($this -> Slide -> data -> linktarget) || (!empty($this -> Slide -> data -> linktarget) && $this -> Slide -> data -> linktarget == "self")) ? 'checked="checked"' : ''; ?> type="radio" name="Slide[linktarget]" value="self" id="Slide_linktarget_self" /> <?php _e('Current Window', $this -> plugin_name); ?></label>
|
325 |
-
<label><input <?php echo (!empty($this -> Slide -> data -> linktarget) && $this -> Slide -> data -> linktarget == "blank") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[linktarget]" value="blank" id="Slide_linktarget_blank" /> <?php _e('New/Blank Window', $this -> plugin_name); ?></label>
|
326 |
Â
<span class="howto"><?php _e('Should this link open in the current window or a new window?', $this -> plugin_name); ?></span>
|
327 |
Â
</td>
|
328 |
Â
</tr>
|
4 |
Â
|
5 |
Â
if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
6 |
Â
|
7 |
+
$showinfo = $this -> Slide() -> data -> showinfo;
|
8 |
Â
|
9 |
Â
if ($this -> language_do()) {
|
10 |
Â
$languages = $this -> language_getlanguages();
|
13 |
Â
?>
|
14 |
Â
|
15 |
Â
<div class="wrap <?php echo $this -> pre; ?> slideshow-gallery slideshow">
|
16 |
+
<h1><?php _e('Save a Slide', $this -> plugin_name); ?></h1>
|
17 |
Â
|
18 |
Â
<form action="<?php echo $this -> url; ?>&method=save" method="post" enctype="multipart/form-data">
|
19 |
Â
|
20 |
+
<?php wp_nonce_field('slideshow-slides-save_' . $this -> Slide() -> data -> id); ?>
|
21 |
Â
|
22 |
+
<input type="hidden" name="Slide[id]" value="<?php echo $this -> Slide() -> data -> id; ?>" />
|
23 |
+
<input type="hidden" name="Slide[order]" value="<?php echo $this -> Slide() -> data -> order; ?>" />
|
24 |
Â
|
25 |
Â
<table class="form-table">
|
26 |
Â
<tbody>
|
29 |
Â
<?php echo $this -> Html -> help(__('This title is for your reference in management and it will also be used to display the title of the slide in the information bar if you have that turned on.', $this -> plugin_name)); ?></th>
|
30 |
Â
<td>
|
31 |
Â
<?php if ($this -> language_do()) : ?>
|
32 |
+
<?php $titles = $this -> language_split($this -> Slide() -> data -> title); ?>
|
33 |
Â
<div id="slide-title-tabs">
|
34 |
Â
<ul>
|
35 |
Â
<?php foreach ($languages as $language) : ?>
|
49 |
Â
});
|
50 |
Â
</script>
|
51 |
Â
<?php else : ?>
|
52 |
+
<input class="widefat" type="text" name="Slide[title]" value="<?php echo esc_attr($this -> Slide() -> data -> title); ?>" id="Slide.title" />
|
53 |
Â
<?php endif; ?>
|
54 |
Â
<span class="howto"><?php _e('Title/name of your slide as it will be displayed to your users.', $this -> plugin_name); ?></span>
|
55 |
+
<?php echo (!empty($this -> Slide() -> errors['title'])) ? '<div class="slideshow_error">' . $this -> Slide() -> errors['title'] . '</div>' : ''; ?>
|
56 |
Â
</td>
|
57 |
Â
</tr>
|
58 |
Â
<tr>
|
60 |
Â
<?php echo $this -> Html -> help(__('The description is specifically used for the information bar if you have that turned on.', $this -> plugin_name)); ?></th>
|
61 |
Â
<td>
|
62 |
Â
<?php if ($this -> language_do()) : ?>
|
63 |
+
<?php $descriptions = $this -> language_split($this -> Slide() -> data -> description); ?>
|
64 |
Â
<div id="slide-description-tabs">
|
65 |
Â
<ul>
|
66 |
Â
<?php foreach ($languages as $language) : ?>
|
80 |
Â
});
|
81 |
Â
</script>
|
82 |
Â
<?php else : ?>
|
83 |
+
<textarea class="widefat" rows="5" cols="100%" name="Slide[description]"><?php echo esc_attr($this -> Slide() -> data -> description); ?></textarea>
|
84 |
Â
<?php endif; ?>
|
85 |
Â
<span class="howto"><?php _e('Description of your slide as it will be displayed to your users below the title.', $this -> plugin_name); ?></span>
|
86 |
+
<?php echo (!empty($this -> Slide() -> errors['description'])) ? '<div class="slideshow_error">' . $this -> Slide() -> errors['description'] . '</div>' : ''; ?>
|
87 |
Â
</td>
|
88 |
Â
</tr>
|
89 |
Â
<tr>
|
107 |
Â
<th><label for="iopacity"><?php _e('Info Opacity', $this -> plugin_name); ?></label>
|
108 |
Â
<?php echo $this -> Html -> help(__('The opacity of the information bar from 0 to 100 where 0 is transparent and 100 is opague.', $this -> plugin_name)); ?></th>
|
109 |
Â
<td>
|
110 |
+
<input type="text" id="iopacity" class="widefat" style="width:45px;" name="Slide[iopacity]" value="<?php echo empty($this -> Slide() -> data -> iopacity) ? 70 : esc_attr(stripslashes($this -> Slide() -> data -> iopacity)); ?>" />
|
111 |
Â
<span class="howto"><?php _e('A value between 0 and 100. Leave empty for default.', $this -> plugin_name); ?></span>
|
112 |
Â
</td>
|
113 |
Â
</tr>
|
121 |
Â
<th><label for="checkboxall"><?php _e('Galleries', $this -> plugin_name); ?></label>
|
122 |
Â
<?php echo $this -> Html -> help(__('You can organize/assign a slide to multiple galleries as needed. It is easy to display a slideshow with the slides of a specific gallery then.', $this -> plugin_name)); ?></th>
|
123 |
Â
<td>
|
124 |
+
<?php if ($galleries = $this -> Gallery() -> select()) : ?>
|
125 |
Â
<label style="font-weight:bold"><input onclick="jqCheckAll(this,'','Slide[galleries]');" type="checkbox" name="checkboxall" value="checkboxall" id="checkboxall" /> <?php _e('Select All', $this -> plugin_name); ?></label><br/>
|
126 |
Â
<?php foreach ($galleries as $gallery_id => $gallery_title) : ?>
|
127 |
+
<label><input <?php echo (!empty($this -> Slide() -> data -> galleries) && in_array($gallery_id, $this -> Slide() -> data -> galleries)) ? 'checked="checked"' : ''; ?> type="checkbox" name="Slide[galleries][]" value="<?php echo $gallery_id; ?>" id="Slide_galleries_<?php echo $gallery_id; ?>" /> <?php echo __($gallery_title); ?></label><br/>
|
128 |
Â
<?php endforeach; ?>
|
129 |
Â
<?php else : ?>
|
130 |
Â
<span class="error"><?php _e('No galleries are available.', $this -> plugin_name); ?></span>
|
136 |
Â
<th><label for="Slide.type.media"><?php _e('Image Type', $this -> plugin_name); ?></label>
|
137 |
Â
<?php echo $this -> Html -> help(__('Do you want to specify a URL to your image or upload the image file manually? Specifying a URL will still copy the image file remotely from the location to your server so uploading is recommended to prevent any restrictions or errors.', $this -> plugin_name)); ?></th>
|
138 |
Â
<td>
|
139 |
+
<label><input onclick="jQuery('#typediv_media').show(); jQuery('#typediv_file').hide(); jQuery('#typediv_url').hide();" <?php echo (empty($this -> Slide() -> data -> type) || $this -> Slide() -> data -> type == "media") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[type]" value="media" id="Slide.type.media" /> <?php _e('Media Upload', $this -> plugin_name); ?></label>
|
140 |
+
<label><input onclick="jQuery('#typediv_file').show(); jQuery('#typediv_media').hide(); jQuery('#typediv_url').hide();" <?php echo ($this -> Slide() -> data -> type == "file") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[type]" value="file" id="Slide.type.file" /> <?php _e('Upload File', $this -> plugin_name); ?></label>
|
141 |
+
<label><input onclick="jQuery('#typediv_url').show(); jQuery('#typediv_media').hide(); jQuery('#typediv_file').hide();" <?php echo ($this -> Slide() -> data -> type == "url") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[type]" value="url" id="Slide.type.url" /> <?php _e('Specify URL', $this -> plugin_name); ?></label>
|
142 |
+
<?php echo (!empty($this -> Slide() -> errors['type'])) ? '<div class="slideshow_error">' . $this -> Slide() -> errors['type'] . '</div>' : ''; ?>
|
143 |
Â
<span class="howto"><?php _e('Do you want to upload an image or specify a local/remote image URL?', $this -> plugin_name); ?></span>
|
144 |
Â
</td>
|
145 |
Â
</tr>
|
147 |
Â
</table>
|
148 |
Â
|
149 |
Â
<!-- Choose/upload file with the WordPress media uploader -->
|
150 |
+
<div id="typediv_media" style="display:<?php echo (empty($this -> Slide() -> data -> type) || $this -> Slide() -> data -> type == "media") ? 'block' : 'none'; ?>;">
|
151 |
Â
<table class="form-table">
|
152 |
Â
<tbody>
|
153 |
Â
<tr>
|
155 |
Â
<td>
|
156 |
Â
<div id="Slide_mediaupload_image">
|
157 |
Â
<!-- image goes here -->
|
158 |
+
<?php if (!empty($this -> Slide() -> data -> image_url)) : ?>
|
159 |
+
<a href="<?php echo $this -> Slide() -> data -> image_url; ?>" title="<?php echo __($this -> Slide() -> data -> title); ?>" class="colorbox"><img class="img-rounded" src="<?php echo $this -> Html -> bfithumb_image_src($this -> Slide() -> data -> image_url, 100, 100, 100); ?>" /></a>
|
160 |
Â
<?php endif; ?>
|
161 |
Â
</div>
|
162 |
Â
|
163 |
Â
<input type="button" name="Slide_mediaupload" value="<?php _e('Choose File', $this -> plugin_name); ?>" id="Slide_mediaupload" class="button button-secondary" />
|
164 |
+
<input type="text" name="Slide[media_file]" style="width:50%;" id="Slide_image_file" value="<?php echo esc_attr(stripslashes($this -> Slide() -> data -> image_url)); ?>" />
|
165 |
+
<input type="hidden" name="Slide[attachment_id]" value="<?php echo esc_attr(stripslashes($this -> Slide() -> data -> attachment_id)); ?>" id="Slide_attachment_id" />
|
166 |
Â
|
167 |
+
<?php echo (!empty($this -> Slide() -> errors['media_file'])) ? '<div class="slideshow_error">' . $this -> Slide() -> errors['media_file'] . '</div>' : ''; ?>
|
168 |
Â
|
169 |
Â
<script type="text/javascript">
|
170 |
Â
jQuery(document).ready(function() {
|
211 |
Â
</table>
|
212 |
Â
</div>
|
213 |
Â
|
214 |
+
<div id="typediv_file" style="display:<?php echo (!empty($this -> Slide() -> data -> type) && $this -> Slide() -> data -> type == "file") ? 'block' : 'none'; ?>;">
|
215 |
Â
<table class="form-table">
|
216 |
Â
<tbody>
|
217 |
Â
<tr>
|
220 |
Â
<td>
|
221 |
Â
<input type="file" name="image_file" value="" id="Slide.image_file" />
|
222 |
Â
<span class="howto"><?php _e('Choose your image file from your computer. JPG, PNG, GIF are supported.', $this -> plugin_name); ?></span>
|
223 |
+
<?php echo (!empty($this -> Slide() -> errors['image_file'])) ? '<div class="slideshow_error">' . $this -> Slide() -> errors['image_file'] . '</div>' : ''; ?>
|
224 |
Â
|
225 |
Â
<?php
|
226 |
Â
|
227 |
+
if (!empty($this -> Slide() -> data -> type) && $this -> Slide() -> data -> type == "file") {
|
228 |
+
if (!empty($this -> Slide() -> data -> image)) {
|
229 |
Â
?>
|
230 |
Â
|
231 |
+
<input type="hidden" name="Slide[image_oldfile]" value="<?php echo esc_attr(stripslashes($this -> Slide() -> data -> image)); ?>" />
|
232 |
Â
<p><small><?php _e('Current image. Leave the field above blank to keep this image.', $this -> plugin_name); ?></small></p>
|
233 |
Â
<?php
|
234 |
Â
|
235 |
Â
$imagespath = $this -> get_option('imagespath');
|
236 |
Â
if (empty($imagespath)) {
|
237 |
+
$image = GalleryHtmlHelper::uploads_path() . DS . $this -> plugin_name . DS . $this -> Slide() -> data -> image;
|
238 |
Â
} else {
|
239 |
+
$image = rtrim($imagespath, DS) . DS . $this -> Slide() -> data -> image;
|
240 |
Â
}
|
241 |
Â
|
242 |
Â
?>
|
243 |
+
<p><a title="<?php echo esc_attr($this -> Slide() -> data -> title); ?>" class="colorbox" href="<?php echo $this -> Slide() -> data -> image_path; ?>"><img src="<?php echo $this -> Html -> bfithumb_image_src($image, 100, 100, 100); ?>" alt="" class="slideshow" /></a></p>
|
244 |
Â
|
245 |
Â
<?php
|
246 |
Â
}
|
253 |
Â
</table>
|
254 |
Â
</div>
|
255 |
Â
|
256 |
+
<div id="typediv_url" style="display:<?php echo ($this -> Slide() -> data -> type == "url") ? 'block' : 'none'; ?>;">
|
257 |
Â
<table class="form-table">
|
258 |
Â
<tbody>
|
259 |
Â
<tr>
|
260 |
Â
<th><label for="Slide.image_url"><?php _e('Image URL', $this -> plugin_name); ?></label>
|
261 |
Â
<?php echo $this -> Html -> help(__('Specify an absolute URL to an image file to use for this slide. The image will be copied from the location to your server.', $this -> plugin_name)); ?></th>
|
262 |
Â
<td>
|
263 |
+
<input class="widefat" type="text" name="Slide[image_url]" value="<?php echo esc_attr($this -> Slide() -> data -> image_url); ?>" id="Slide.image_url" />
|
264 |
Â
<span class="howto"><?php _e('Local or remote image location eg. http://domain.com/path/to/image.jpg', $this -> plugin_name); ?></span>
|
265 |
+
<?php echo (!empty($this -> Slide() -> errors['image_url'])) ? '<div class="slideshow_error">' . $this -> Slide() -> errors['image_url'] . '</div>' : ''; ?>
|
266 |
Â
</td>
|
267 |
Â
</tr>
|
268 |
Â
</tbody>
|
275 |
Â
<th><label for="Slide_uselink_N"><?php _e('Use Link', $this -> plugin_name); ?></label>
|
276 |
Â
<?php echo $this -> Html -> help(__('Turn this on to specify a link/URL for this slide to link to when it is clicked.', $this -> plugin_name)); ?></th>
|
277 |
Â
<td>
|
278 |
+
<label><input onclick="jQuery('#Slide_uselink_div').show();" <?php echo ($this -> Slide() -> data -> uselink == "Y") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[uselink]" value="Y" id="Slide_uselink_Y" /> <?php _e('Yes', $this -> plugin_name); ?></label>
|
279 |
+
<label><input onclick="jQuery('#Slide_uselink_div').hide();" <?php echo (empty($this -> Slide() -> data -> uselink) || $this -> Slide() -> data -> uselink == "N") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[uselink]" value="N" id="Slide_uselink_N" /> <?php _e('No', $this -> plugin_name); ?></label>
|
280 |
Â
<span class="howto"><?php _e('Set this to Yes to link this slide to a link/URL of your choice.', $this -> plugin_name); ?></span>
|
281 |
Â
</td>
|
282 |
Â
</tr>
|
283 |
Â
</tbody>
|
284 |
Â
</table>
|
285 |
Â
|
286 |
+
<div id="Slide_uselink_div" style="display:<?php echo ($this -> Slide() -> data -> uselink == "Y") ? 'block' : 'none'; ?>;">
|
287 |
Â
<table class="form-table">
|
288 |
Â
<tbody>
|
289 |
Â
<tr>
|
291 |
Â
<?php echo $this -> Html -> help(__('The absolute URL to take the user to when the slide is clicked.', $this -> plugin_name)); ?></th>
|
292 |
Â
<td>
|
293 |
Â
<?php if ($this -> language_do()) : ?>
|
294 |
+
<?php $links = $this -> language_split($this -> Slide() -> data -> link); ?>
|
295 |
Â
<div id="slide-link-tabs">
|
296 |
Â
<ul>
|
297 |
Â
<?php foreach ($languages as $language) : ?>
|
311 |
Â
});
|
312 |
Â
</script>
|
313 |
Â
<?php else : ?>
|
314 |
+
<input class="widefat" type="text" name="Slide[link]" value="<?php echo esc_attr($this -> Slide() -> data -> link); ?>" id="Slide.link" />
|
315 |
Â
<?php endif; ?>
|
316 |
Â
|
317 |
Â
<span class="howto"><?php _e('Link/URL to go to when a user clicks the slide eg. http://www.domain.com/mypage/', $this -> plugin_name); ?></span>
|
321 |
Â
<th><label for="Slide_linktarget_self"><?php _e('Link Target', $this -> plugin_name); ?></label>
|
322 |
Â
<?php echo $this -> Html -> help(__('Depending on the purpose of specifying this link, you may want it to open in the same window or in a new window.', $this -> plugin_name)); ?></th>
|
323 |
Â
<td>
|
324 |
+
<label><input <?php echo (empty($this -> Slide() -> data -> linktarget) || (!empty($this -> Slide() -> data -> linktarget) && $this -> Slide() -> data -> linktarget == "self")) ? 'checked="checked"' : ''; ?> type="radio" name="Slide[linktarget]" value="self" id="Slide_linktarget_self" /> <?php _e('Current Window', $this -> plugin_name); ?></label>
|
325 |
+
<label><input <?php echo (!empty($this -> Slide() -> data -> linktarget) && $this -> Slide() -> data -> linktarget == "blank") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[linktarget]" value="blank" id="Slide_linktarget_blank" /> <?php _e('New/Blank Window', $this -> plugin_name); ?></label>
|
326 |
Â
<span class="howto"><?php _e('Should this link open in the current window or a new window?', $this -> plugin_name); ?></span>
|
327 |
Â
</td>
|
328 |
Â
</tr>
|
views/default/css copy.php
ADDED
@@ -0,0 +1,43 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php header("Content-Type: text/css"); ?>
|
2 |
+
|
3 |
+
<?php $styles = array(); ?>
|
4 |
+
<?php foreach ($_GET as $skey => $sval) : ?>
|
5 |
+
<?php $styles[$skey] = urldecode($sval); ?>
|
6 |
+
<?php endforeach; ?>
|
7 |
+
|
8 |
+
<?php
|
9 |
+
|
10 |
+
$unique = $styles['unique'];
|
11 |
+
|
12 |
+
?>
|
13 |
+
|
14 |
+
<?php if (!empty($styles['wrapperid'])) : ?>
|
15 |
+
ul.slideshow<?php echo $unique; ?> { list-style:none !important; color:#fff; }
|
16 |
+
ul.slideshow<?php echo $unique; ?> span { display:none; }
|
17 |
+
#<?php echo $styles['wrapperid']; ?> { position:relative; width:<?php echo ($styles['width'] != "auto") ? ((int) $styles['width']) . 'px' : 'auto'; ?>; background:<?php echo $styles['background']; ?>; padding:0 0 0 0; border:<?php echo $styles['border']; ?>; margin:0; display:none; }
|
18 |
+
#<?php echo $styles['wrapperid']; ?> * { margin:0; padding:0; }
|
19 |
+
#<?php echo $styles['wrapperid']; ?> #fullsize<?php echo $unique; ?> { position:relative; z-index:1; overflow:hidden; width:<?php echo ($styles['width'] != "auto") ? ((int) $styles['width']) . 'px' : 'auto'; ?>; height:<?php echo ((int) $styles['height']); ?>px; clear:both; border: none; }
|
20 |
+
#<?php echo $styles['wrapperid']; ?> #information<?php echo $unique; ?> { text-align:left; font-family:Verdana, Arial, Helvetica, sans-serif !important; position:absolute; bottom:0; width:<?php echo ($styles['width'] != "auto") ? ((int) $styles['width']) . 'px' : '100%'; ?>; height:0; background:<?php echo $styles['infobackground']; ?>; color:<?php echo $styles['infocolor']; ?>; overflow:hidden; z-index:300; opacity:.7; filter:alpha(opacity=70); }
|
21 |
+
#<?php echo $styles['wrapperid']; ?> #information<?php echo $unique; ?> h3 { color:<?php echo $styles['infocolor']; ?>; padding:4px 8px 3px; margin:0 !important; font-size:16px; font-weight:bold; }
|
22 |
+
#<?php echo $styles['wrapperid']; ?> #information<?php echo $unique; ?> a { color:<?php echo $styles['infocolor']; ?>; }
|
23 |
+
#<?php echo $styles['wrapperid']; ?> #information<?php echo $unique; ?> p { color:<?php echo $styles['infocolor']; ?>; padding:0 8px 8px; margin:0 !important; font-size: 14px; font-weight:normal; }
|
24 |
+
#<?php echo $styles['wrapperid']; ?> #image<?php echo $unique; ?> { width:<?php echo ($styles['width'] != "auto") ? ((int) $styles['width']) . 'px' : 'auto'; ?>; }
|
25 |
+
#<?php echo $styles['wrapperid']; ?> #image<?php echo $unique; ?> img { border:none; border-radius:0; box-shadow:none; position:absolute; height:auto; max-width:100%; margin:0 auto; display:block; }
|
26 |
+
#<?php echo $styles['wrapperid']; ?> .imgnav { position:absolute; width:25%; height:100%; cursor:pointer; z-index:250; }
|
27 |
+
#<?php echo $styles['wrapperid']; ?> #imgprev<?php echo $unique; ?> { -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; -o-user-select: none; left:0; background:url('images/left.gif') left center no-repeat; text-indent:-9999px; }
|
28 |
+
#<?php echo $styles['wrapperid']; ?> #imgnext<?php echo $unique; ?> { -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; -o-user-select: none; right:0; background:url('images/right.gif') right center no-repeat; text-indent:-9999px; }
|
29 |
+
#<?php echo $styles['wrapperid']; ?> #imglink<?php echo $unique; ?> { position:absolute; zoom:1; background-color:#ffffff; height:100%; <?php if (!empty($styles['shownav']) && $styles['shownav'] == "true") : ?>width:50%; left:25%; right:20%;<?php else : ?>width:100%; left:0;<?php endif; ?> z-index:149; opacity:0; filter:alpha(opacity=0); }
|
30 |
+
#<?php echo $styles['wrapperid']; ?> .linkhover { background:transparent url('images/link.gif') center center no-repeat !important; text-indent:-9999px; opacity:.4 !important; filter:alpha(opacity=40) !important; }
|
31 |
+
#<?php echo $styles['wrapperid']; ?> #thumbnails<?php echo $unique; ?> { background:<?php echo $styles['background']; ?>; }
|
32 |
+
#<?php echo $styles['wrapperid']; ?> .thumbstop { margin-bottom:8px !important; }
|
33 |
+
#<?php echo $styles['wrapperid']; ?> .thumbsbot { margin-top:8px !important; }
|
34 |
+
#<?php echo $styles['wrapperid']; ?> #slideleft<?php echo $unique; ?> { float:left; width:20px; height:<?php echo ((int) $styles['thumbheight'] + 14); ?>px; background:url('images/scroll-left.gif') center center no-repeat; background-color:#222; }
|
35 |
+
#<?php echo $styles['wrapperid']; ?> #slideleft<?php echo $unique; ?>:hover { background-color:#333; }
|
36 |
+
#<?php echo $styles['wrapperid']; ?> #slideright<?php echo $unique; ?> { float:right; width:20px; height:<?php echo ((int) $styles['thumbheight'] + 14); ?>px; background:#222 url('images/scroll-right.gif') center center no-repeat; }
|
37 |
+
#<?php echo $styles['wrapperid']; ?> #slideright<?php echo $unique; ?>:hover { background-color:#333; }
|
38 |
+
#<?php echo $styles['wrapperid']; ?> #slidearea<?php echo $unique; ?> { float:left; position:relative; background:<?php echo $styles['background']; ?>; width:<?php echo ($styles['width'] != "auto") ? ((int) $styles['width'] - 50) . 'px' : '90%'; ?>; margin:0 5px; height:<?php echo ((int) $styles['thumbheight'] + 14); ?>px; overflow:hidden; }
|
39 |
+
#<?php echo $styles['wrapperid']; ?> #slider<?php echo $unique; ?> { position:absolute; width:<?php echo $styles['sliderwidth']; ?>px !important; left:0; height:<?php echo ((int) $styles['thumbheight'] + 14); ?>px; }
|
40 |
+
#<?php echo $styles['wrapperid']; ?> #slider<?php echo $unique; ?> img { cursor:pointer; border:1px solid #666; padding:2px; float:left !important; }
|
41 |
+
#<?php echo $styles['wrapperid']; ?> #spinner<?php echo $unique; ?> { position:relative; top:50%; left:45%; text-align:left; }
|
42 |
+
#<?php echo $styles['wrapperid']; ?> #spinner<?php echo $unique; ?> img { border:none; }
|
43 |
+
<?php endif; ?>
|
views/default/css-responsive.php
CHANGED
@@ -14,37 +14,39 @@ $unique = $styles['unique'];
|
|
14 |
Â
<?php if (!empty($styles['wrapperid'])) : ?>
|
15 |
Â
ul.slideshow<?php echo $unique; ?> { list-style:none !important; color:#fff; }
|
16 |
Â
ul.slideshow<?php echo $unique; ?> span { display:none; }
|
17 |
-
#<?php echo $styles['wrapperid']; ?> { position:relative; width:100%; background:<?php echo $styles['background']; ?>; padding:0 0 0 0; border:<?php echo $styles['border']; ?>; margin:0; display:none; }
|
18 |
Â
#<?php echo $styles['wrapperid']; ?> * { margin:0; padding:0; }
|
19 |
Â
#<?php echo $styles['wrapperid']; ?> #fullsize<?php echo $unique; ?> { position:relative; z-index:1; overflow:hidden; width:100%; height:<?php echo $resheight; ?>; clear:both; border: none; }
|
20 |
Â
#<?php echo $styles['wrapperid']; ?> #information<?php echo $unique; ?> { text-align:left; font-family:Verdana, Arial, Helvetica, sans-serif !important; position:absolute; bottom:0; width:100%; height:0; background:<?php echo $styles['infobackground']; ?>; color:<?php echo $styles['infocolor']; ?>; overflow:hidden; z-index:300; opacity:.7; filter:alpha(opacity=70); }
|
21 |
Â
#<?php echo $styles['wrapperid']; ?> #information<?php echo $unique; ?> h3 { color:<?php echo $styles['infocolor']; ?>; padding:4px 8px 3px; margin:0 !important; font-size:16px; font-weight:bold; }
|
Â
|
|
22 |
Â
#<?php echo $styles['wrapperid']; ?> #information<?php echo $unique; ?> p { color:<?php echo $styles['infocolor']; ?>; padding:0 8px 8px; margin:0 !important; font-size: 14px; font-weight:normal; }
|
23 |
Â
#<?php echo $styles['wrapperid']; ?> #image<?php echo $unique; ?> { width:100%; }
|
24 |
Â
#<?php echo $styles['wrapperid']; ?> #image<?php echo $unique; ?> img { border:none; border-radius:0; box-shadow:none; position:absolute; height:auto; width:100%; margin:0 auto; display:block; }
|
25 |
Â
#<?php echo $styles['wrapperid']; ?> .imgnav { position:absolute; width:25%; height:100%; cursor:pointer; z-index:250; }
|
26 |
-
#<?php echo $styles['wrapperid']; ?> #imgprev<?php echo $unique;
|
27 |
-
#<?php echo $styles['wrapperid']; ?> #
|
Â
|
|
Â
|
|
28 |
Â
#<?php echo $styles['wrapperid']; ?> #imglink<?php echo $unique; ?> { position:absolute; zoom:1; background-color:#ffffff; height:100%; <?php if (!empty($styles['shownav']) && $styles['shownav'] == "true") : ?>width:50%; left:25%; right:20%;<?php else : ?>width:100%; left:0;<?php endif; ?> z-index:149; opacity:0; filter:alpha(opacity=0); }
|
29 |
-
#<?php echo $styles['wrapperid']; ?> .linkhover {
|
30 |
-
#<?php echo $styles['wrapperid']; ?>
|
Â
|
|
31 |
Â
#<?php echo $styles['wrapperid']; ?> .thumbstop { margin-bottom:8px !important; }
|
32 |
Â
#<?php echo $styles['wrapperid']; ?> .thumbsbot { margin-top:8px !important; }
|
33 |
-
#<?php echo $styles['wrapperid']; ?> #slideleft<?php echo $unique;
|
Â
|
|
34 |
Â
#<?php echo $styles['wrapperid']; ?> #slideleft<?php echo $unique; ?>:hover { background-color:#333; }
|
35 |
-
#<?php echo $styles['wrapperid']; ?> #slideright<?php echo $unique;
|
Â
|
|
36 |
Â
#<?php echo $styles['wrapperid']; ?> #slideright<?php echo $unique; ?>:hover { background-color:#333; }
|
37 |
-
#<?php echo $styles['wrapperid']; ?> #slidearea<?php echo $unique; ?> { float:left; position:absolute; z-index:149; background:<?php echo $styles['background']; ?>; width:
|
38 |
-
#<?php echo $styles['wrapperid']; ?> #slider<?php echo $unique; ?> { position:absolute; width:<?php echo $styles['sliderwidth']; ?>px !important; left:0; height:<?php echo $sliderheight; ?>px; padding:3px
|
39 |
Â
#<?php echo $styles['wrapperid']; ?> #slider<?php echo $unique; ?> img { cursor:pointer; border:1px solid #666; padding:2px; float:left !important; }
|
40 |
-
#<?php echo $styles['wrapperid']; ?> #spinner<?php echo $unique; ?> { position:relative; top:50%; left:45%; text-align:left; }
|
41 |
Â
#<?php echo $styles['wrapperid']; ?> #spinner<?php echo $unique; ?> img { border:none; }
|
42 |
Â
|
43 |
-
<?php if (!empty($styles['infohideonmobile'])) : ?>
|
44 |
-
|
45 |
-
.slideshow-information {
|
46 |
-
display: none !important;
|
47 |
-
}
|
48 |
-
}
|
49 |
Â
<?php endif; ?>
|
50 |
Â
<?php endif; ?>
|
14 |
Â
<?php if (!empty($styles['wrapperid'])) : ?>
|
15 |
Â
ul.slideshow<?php echo $unique; ?> { list-style:none !important; color:#fff; }
|
16 |
Â
ul.slideshow<?php echo $unique; ?> span { display:none; }
|
17 |
+
#<?php echo $styles['wrapperid']; ?> { overflow: hidden; position:relative; width:100%; background:<?php echo $styles['background']; ?>; padding:0 0 0 0; border:<?php echo $styles['border']; ?>; margin:0; display:none; }
|
18 |
Â
#<?php echo $styles['wrapperid']; ?> * { margin:0; padding:0; }
|
19 |
Â
#<?php echo $styles['wrapperid']; ?> #fullsize<?php echo $unique; ?> { position:relative; z-index:1; overflow:hidden; width:100%; height:<?php echo $resheight; ?>; clear:both; border: none; }
|
20 |
Â
#<?php echo $styles['wrapperid']; ?> #information<?php echo $unique; ?> { text-align:left; font-family:Verdana, Arial, Helvetica, sans-serif !important; position:absolute; bottom:0; width:100%; height:0; background:<?php echo $styles['infobackground']; ?>; color:<?php echo $styles['infocolor']; ?>; overflow:hidden; z-index:300; opacity:.7; filter:alpha(opacity=70); }
|
21 |
Â
#<?php echo $styles['wrapperid']; ?> #information<?php echo $unique; ?> h3 { color:<?php echo $styles['infocolor']; ?>; padding:4px 8px 3px; margin:0 !important; font-size:16px; font-weight:bold; }
|
22 |
+
#<?php echo $styles['wrapperid']; ?> #information<?php echo $unique; ?> a { color:<?php echo $styles['infocolor']; ?>; }
|
23 |
Â
#<?php echo $styles['wrapperid']; ?> #information<?php echo $unique; ?> p { color:<?php echo $styles['infocolor']; ?>; padding:0 8px 8px; margin:0 !important; font-size: 14px; font-weight:normal; }
|
24 |
Â
#<?php echo $styles['wrapperid']; ?> #image<?php echo $unique; ?> { width:100%; }
|
25 |
Â
#<?php echo $styles['wrapperid']; ?> #image<?php echo $unique; ?> img { border:none; border-radius:0; box-shadow:none; position:absolute; height:auto; width:100%; margin:0 auto; display:block; }
|
26 |
Â
#<?php echo $styles['wrapperid']; ?> .imgnav { position:absolute; width:25%; height:100%; cursor:pointer; z-index:250; }
|
27 |
+
#<?php echo $styles['wrapperid']; ?> #imgprev<?php echo $unique; ?>:before { font-family:FontAwesome; content:"\f053"; font-size:30px; color:white; visibility:visible; left:0; text-align:left; width: auto; height:auto; top:50%; margin:-30px 0 0 0; border-radius:0 10px 10px 0; background:black; padding:3px 10px 0 10px; position: absolute; display: inline-block; }
|
28 |
+
#<?php echo $styles['wrapperid']; ?> #imgprev<?php echo $unique; ?> { display:none; -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; -o-user-select: none; left:0; font-size:0px; }
|
29 |
+
#<?php echo $styles['wrapperid']; ?> #imgnext<?php echo $unique; ?>:before { font-family:FontAwesome; content:"\f054"; font-size:30px; color:white; visibility:visible; right:0; text-align:right; width: auto; height:auto; top:50%; margin:-30px 0 0 0; border-radius:10px 0 0 10px; background:black; padding:3px 10px 0 10px; position: absolute; display: inline-block; }
|
30 |
+
#<?php echo $styles['wrapperid']; ?> #imgnext<?php echo $unique; ?> { display:none; -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; -o-user-select: none; right:0; font-size:0px; }
|
31 |
Â
#<?php echo $styles['wrapperid']; ?> #imglink<?php echo $unique; ?> { position:absolute; zoom:1; background-color:#ffffff; height:100%; <?php if (!empty($styles['shownav']) && $styles['shownav'] == "true") : ?>width:50%; left:25%; right:20%;<?php else : ?>width:100%; left:0;<?php endif; ?> z-index:149; opacity:0; filter:alpha(opacity=0); }
|
32 |
+
#<?php echo $styles['wrapperid']; ?> .linkhover:before { font-family:FontAwesome; content:"\f14c"; font-size:30px; text-align:center; height:auto; width:auto; top:50%; left:auto; right:auto; margin:-30px 0 0 0; padding:0px 12px; display: inline-block; position: relative; background:black; color:white; border-radius:10px; }
|
33 |
+
#<?php echo $styles['wrapperid']; ?> .linkhover { background:transparent !important; opacity:.4 !important; filter:alpha(opacity=40) !important; text-align:center; font-size:0px; }
|
34 |
+
#<?php echo $styles['wrapperid']; ?> #thumbnails<?php echo $unique; ?> { background:<?php echo $styles['background']; ?>; height:<?php echo $sliderheight; ?>px; width:100%; position:relative; overflow:hidden; }
|
35 |
Â
#<?php echo $styles['wrapperid']; ?> .thumbstop { margin-bottom:8px !important; }
|
36 |
Â
#<?php echo $styles['wrapperid']; ?> .thumbsbot { margin-top:8px !important; }
|
37 |
+
#<?php echo $styles['wrapperid']; ?> #slideleft<?php echo $unique; ?>:before { font-family:FontAwesome; content: "\f104"; color:#999; position: absolute; height: auto; width: auto; display: inline-block; top: 50%; font-size: 30px; margin: -30px 0 0 0; padding: 0 5px; }
|
38 |
+
#<?php echo $styles['wrapperid']; ?> #slideleft<?php echo $unique; ?> { float:left; position:absolute; left:0; z-index:150; width:20px; height:<?php echo $sliderheight; ?>px; background:#222; }
|
39 |
Â
#<?php echo $styles['wrapperid']; ?> #slideleft<?php echo $unique; ?>:hover { background-color:#333; }
|
40 |
+
#<?php echo $styles['wrapperid']; ?> #slideright<?php echo $unique; ?>:before { font-family:FontAwesome; content: "\f105"; color:#999; position: absolute; height: auto; width: auto; display: inline-block; top: 50%; font-size: 30px; margin: -30px 0 0 0; padding: 0 5px; }
|
41 |
+
#<?php echo $styles['wrapperid']; ?> #slideright<?php echo $unique; ?> { float:right; position:absolute; right:0; z-index:150; width:20px; height:<?php echo $sliderheight; ?>px; background:#222; }
|
42 |
Â
#<?php echo $styles['wrapperid']; ?> #slideright<?php echo $unique; ?>:hover { background-color:#333; }
|
43 |
+
#<?php echo $styles['wrapperid']; ?> #slidearea<?php echo $unique; ?> { float:left; position:absolute; z-index:149; background:<?php echo $styles['background']; ?>; width:100%; margin:0; height:<?php echo $sliderheight; ?>px; overflow:hidden; }
|
44 |
+
#<?php echo $styles['wrapperid']; ?> #slider<?php echo $unique; ?> { position:absolute; width:<?php echo $styles['sliderwidth']; ?>px !important; left:0; height:<?php echo $sliderheight; ?>px; padding:3px 20px 0 25px; }
|
45 |
Â
#<?php echo $styles['wrapperid']; ?> #slider<?php echo $unique; ?> img { cursor:pointer; border:1px solid #666; padding:2px; float:left !important; }
|
46 |
+
#<?php echo $styles['wrapperid']; ?> #spinner<?php echo $unique; ?> { position:relative; top:50%; left:45%; text-align:left; font-size:30px; }
|
47 |
Â
#<?php echo $styles['wrapperid']; ?> #spinner<?php echo $unique; ?> img { border:none; }
|
48 |
Â
|
49 |
+
<?php if (!empty($styles['infohideonmobile'])) : ?>
|
50 |
+
@media (max-width:480px) { .slideshow-information { display: none !important; } }
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
51 |
Â
<?php endif; ?>
|
52 |
Â
<?php endif; ?>
|
views/default/css.php
CHANGED
@@ -14,29 +14,35 @@ $unique = $styles['unique'];
|
|
14 |
Â
<?php if (!empty($styles['wrapperid'])) : ?>
|
15 |
Â
ul.slideshow<?php echo $unique; ?> { list-style:none !important; color:#fff; }
|
16 |
Â
ul.slideshow<?php echo $unique; ?> span { display:none; }
|
17 |
-
#<?php echo $styles['wrapperid']; ?> { position:relative; width:<?php echo ($styles['width'] != "auto") ? ((int) $styles['width']) . 'px' : 'auto'; ?>; background:<?php echo $styles['background']; ?>; padding:0 0 0 0; border:<?php echo $styles['border']; ?>; margin:0; display:none; }
|
18 |
Â
#<?php echo $styles['wrapperid']; ?> * { margin:0; padding:0; }
|
19 |
Â
#<?php echo $styles['wrapperid']; ?> #fullsize<?php echo $unique; ?> { position:relative; z-index:1; overflow:hidden; width:<?php echo ($styles['width'] != "auto") ? ((int) $styles['width']) . 'px' : 'auto'; ?>; height:<?php echo ((int) $styles['height']); ?>px; clear:both; border: none; }
|
20 |
Â
#<?php echo $styles['wrapperid']; ?> #information<?php echo $unique; ?> { text-align:left; font-family:Verdana, Arial, Helvetica, sans-serif !important; position:absolute; bottom:0; width:<?php echo ($styles['width'] != "auto") ? ((int) $styles['width']) . 'px' : '100%'; ?>; height:0; background:<?php echo $styles['infobackground']; ?>; color:<?php echo $styles['infocolor']; ?>; overflow:hidden; z-index:300; opacity:.7; filter:alpha(opacity=70); }
|
21 |
Â
#<?php echo $styles['wrapperid']; ?> #information<?php echo $unique; ?> h3 { color:<?php echo $styles['infocolor']; ?>; padding:4px 8px 3px; margin:0 !important; font-size:16px; font-weight:bold; }
|
Â
|
|
22 |
Â
#<?php echo $styles['wrapperid']; ?> #information<?php echo $unique; ?> p { color:<?php echo $styles['infocolor']; ?>; padding:0 8px 8px; margin:0 !important; font-size: 14px; font-weight:normal; }
|
23 |
Â
#<?php echo $styles['wrapperid']; ?> #image<?php echo $unique; ?> { width:<?php echo ($styles['width'] != "auto") ? ((int) $styles['width']) . 'px' : 'auto'; ?>; }
|
24 |
Â
#<?php echo $styles['wrapperid']; ?> #image<?php echo $unique; ?> img { border:none; border-radius:0; box-shadow:none; position:absolute; height:auto; max-width:100%; margin:0 auto; display:block; }
|
25 |
Â
#<?php echo $styles['wrapperid']; ?> .imgnav { position:absolute; width:25%; height:100%; cursor:pointer; z-index:250; }
|
26 |
-
#<?php echo $styles['wrapperid']; ?> #imgprev<?php echo $unique;
|
27 |
-
#<?php echo $styles['wrapperid']; ?> #
|
Â
|
|
Â
|
|
28 |
Â
#<?php echo $styles['wrapperid']; ?> #imglink<?php echo $unique; ?> { position:absolute; zoom:1; background-color:#ffffff; height:100%; <?php if (!empty($styles['shownav']) && $styles['shownav'] == "true") : ?>width:50%; left:25%; right:20%;<?php else : ?>width:100%; left:0;<?php endif; ?> z-index:149; opacity:0; filter:alpha(opacity=0); }
|
29 |
-
#<?php echo $styles['wrapperid']; ?> .linkhover {
|
Â
|
|
30 |
Â
#<?php echo $styles['wrapperid']; ?> #thumbnails<?php echo $unique; ?> { background:<?php echo $styles['background']; ?>; }
|
31 |
Â
#<?php echo $styles['wrapperid']; ?> .thumbstop { margin-bottom:8px !important; }
|
32 |
Â
#<?php echo $styles['wrapperid']; ?> .thumbsbot { margin-top:8px !important; }
|
33 |
-
#<?php echo $styles['wrapperid']; ?> #slideleft<?php echo $unique;
|
Â
|
|
34 |
Â
#<?php echo $styles['wrapperid']; ?> #slideleft<?php echo $unique; ?>:hover { background-color:#333; }
|
35 |
-
#<?php echo $styles['wrapperid']; ?> #slideright<?php echo $unique;
|
Â
|
|
36 |
Â
#<?php echo $styles['wrapperid']; ?> #slideright<?php echo $unique; ?>:hover { background-color:#333; }
|
37 |
Â
#<?php echo $styles['wrapperid']; ?> #slidearea<?php echo $unique; ?> { float:left; position:relative; background:<?php echo $styles['background']; ?>; width:<?php echo ($styles['width'] != "auto") ? ((int) $styles['width'] - 50) . 'px' : '90%'; ?>; margin:0 5px; height:<?php echo ((int) $styles['thumbheight'] + 14); ?>px; overflow:hidden; }
|
38 |
Â
#<?php echo $styles['wrapperid']; ?> #slider<?php echo $unique; ?> { position:absolute; width:<?php echo $styles['sliderwidth']; ?>px !important; left:0; height:<?php echo ((int) $styles['thumbheight'] + 14); ?>px; }
|
39 |
Â
#<?php echo $styles['wrapperid']; ?> #slider<?php echo $unique; ?> img { cursor:pointer; border:1px solid #666; padding:2px; float:left !important; }
|
40 |
-
#<?php echo $styles['wrapperid']; ?> #spinner<?php echo $unique; ?> { position:relative; top:50%; left:45%; text-align:left; }
|
41 |
Â
#<?php echo $styles['wrapperid']; ?> #spinner<?php echo $unique; ?> img { border:none; }
|
42 |
Â
<?php endif; ?>
|
14 |
Â
<?php if (!empty($styles['wrapperid'])) : ?>
|
15 |
Â
ul.slideshow<?php echo $unique; ?> { list-style:none !important; color:#fff; }
|
16 |
Â
ul.slideshow<?php echo $unique; ?> span { display:none; }
|
17 |
+
#<?php echo $styles['wrapperid']; ?> { overflow:hidden; position:relative; width:<?php echo ($styles['width'] != "auto") ? ((int) $styles['width']) . 'px' : 'auto'; ?>; background:<?php echo $styles['background']; ?>; padding:0 0 0 0; border:<?php echo $styles['border']; ?>; margin:0; display:none; }
|
18 |
Â
#<?php echo $styles['wrapperid']; ?> * { margin:0; padding:0; }
|
19 |
Â
#<?php echo $styles['wrapperid']; ?> #fullsize<?php echo $unique; ?> { position:relative; z-index:1; overflow:hidden; width:<?php echo ($styles['width'] != "auto") ? ((int) $styles['width']) . 'px' : 'auto'; ?>; height:<?php echo ((int) $styles['height']); ?>px; clear:both; border: none; }
|
20 |
Â
#<?php echo $styles['wrapperid']; ?> #information<?php echo $unique; ?> { text-align:left; font-family:Verdana, Arial, Helvetica, sans-serif !important; position:absolute; bottom:0; width:<?php echo ($styles['width'] != "auto") ? ((int) $styles['width']) . 'px' : '100%'; ?>; height:0; background:<?php echo $styles['infobackground']; ?>; color:<?php echo $styles['infocolor']; ?>; overflow:hidden; z-index:300; opacity:.7; filter:alpha(opacity=70); }
|
21 |
Â
#<?php echo $styles['wrapperid']; ?> #information<?php echo $unique; ?> h3 { color:<?php echo $styles['infocolor']; ?>; padding:4px 8px 3px; margin:0 !important; font-size:16px; font-weight:bold; }
|
22 |
+
#<?php echo $styles['wrapperid']; ?> #information<?php echo $unique; ?> a { color:<?php echo $styles['infocolor']; ?>; }
|
23 |
Â
#<?php echo $styles['wrapperid']; ?> #information<?php echo $unique; ?> p { color:<?php echo $styles['infocolor']; ?>; padding:0 8px 8px; margin:0 !important; font-size: 14px; font-weight:normal; }
|
24 |
Â
#<?php echo $styles['wrapperid']; ?> #image<?php echo $unique; ?> { width:<?php echo ($styles['width'] != "auto") ? ((int) $styles['width']) . 'px' : 'auto'; ?>; }
|
25 |
Â
#<?php echo $styles['wrapperid']; ?> #image<?php echo $unique; ?> img { border:none; border-radius:0; box-shadow:none; position:absolute; height:auto; max-width:100%; margin:0 auto; display:block; }
|
26 |
Â
#<?php echo $styles['wrapperid']; ?> .imgnav { position:absolute; width:25%; height:100%; cursor:pointer; z-index:250; }
|
27 |
+
#<?php echo $styles['wrapperid']; ?> #imgprev<?php echo $unique; ?>:before { font-family:FontAwesome; content:"\f053"; font-size:30px; color:white; visibility:visible; left:0; text-align:left; width: auto; height:auto; top:50%; margin:-30px 0 0 0; border-radius:0 10px 10px 0; background:black; padding:3px 10px 0 10px; position: absolute; display: inline-block; }
|
28 |
+
#<?php echo $styles['wrapperid']; ?> #imgprev<?php echo $unique; ?> { display:none; -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; -o-user-select: none; left:0; font-size:0px; }
|
29 |
+
#<?php echo $styles['wrapperid']; ?> #imgnext<?php echo $unique; ?>:before { font-family:FontAwesome; content:"\f054"; font-size:30px; color:white; visibility:visible; right:0; text-align:right; width: auto; height:auto; top:50%; margin:-30px 0 0 0; border-radius:10px 0 0 10px; background:black; padding:3px 10px 0 10px; position: absolute; display: inline-block; }
|
30 |
+
#<?php echo $styles['wrapperid']; ?> #imgnext<?php echo $unique; ?> { display:none; -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; -o-user-select: none; right:0; font-size:0px; }
|
31 |
Â
#<?php echo $styles['wrapperid']; ?> #imglink<?php echo $unique; ?> { position:absolute; zoom:1; background-color:#ffffff; height:100%; <?php if (!empty($styles['shownav']) && $styles['shownav'] == "true") : ?>width:50%; left:25%; right:20%;<?php else : ?>width:100%; left:0;<?php endif; ?> z-index:149; opacity:0; filter:alpha(opacity=0); }
|
32 |
+
#<?php echo $styles['wrapperid']; ?> .linkhover:before { font-family:FontAwesome; content:"\f14c"; font-size:30px; text-align:center; height:auto; width:auto; top:50%; left:auto; right:auto; margin:-30px 0 0 0; padding:0px 12px; display: inline-block; position: relative; background:black; color:white; border-radius:10px; }
|
33 |
+
#<?php echo $styles['wrapperid']; ?> .linkhover { background:transparent !important; opacity:.4 !important; filter:alpha(opacity=40) !important; text-align:center; font-size:0px; }
|
34 |
Â
#<?php echo $styles['wrapperid']; ?> #thumbnails<?php echo $unique; ?> { background:<?php echo $styles['background']; ?>; }
|
35 |
Â
#<?php echo $styles['wrapperid']; ?> .thumbstop { margin-bottom:8px !important; }
|
36 |
Â
#<?php echo $styles['wrapperid']; ?> .thumbsbot { margin-top:8px !important; }
|
37 |
+
#<?php echo $styles['wrapperid']; ?> #slideleft<?php echo $unique; ?>:before { font-family:FontAwesome; content: "\f104"; color:#999; position: absolute; height: auto; width: auto; display: inline-block; top: 50%; font-size: 30px; margin: -30px 0 0 0; padding: 0 5px; }
|
38 |
+
#<?php echo $styles['wrapperid']; ?> #slideleft<?php echo $unique; ?> { float:left; position:relative; width:20px; height:<?php echo ((int) $styles['thumbheight'] + 14); ?>px; background:#222; }
|
39 |
Â
#<?php echo $styles['wrapperid']; ?> #slideleft<?php echo $unique; ?>:hover { background-color:#333; }
|
40 |
+
#<?php echo $styles['wrapperid']; ?> #slideright<?php echo $unique; ?>:before { font-family:FontAwesome; content: "\f105"; color:#999; position: absolute; height: auto; width: auto; display: inline-block; top: 50%; font-size: 30px; margin: -30px 0 0 0; padding: 0 5px; }
|
41 |
+
#<?php echo $styles['wrapperid']; ?> #slideright<?php echo $unique; ?> { float:right; position:relative; width:20px; height:<?php echo ((int) $styles['thumbheight'] + 14); ?>px; background:#222; }
|
42 |
Â
#<?php echo $styles['wrapperid']; ?> #slideright<?php echo $unique; ?>:hover { background-color:#333; }
|
43 |
Â
#<?php echo $styles['wrapperid']; ?> #slidearea<?php echo $unique; ?> { float:left; position:relative; background:<?php echo $styles['background']; ?>; width:<?php echo ($styles['width'] != "auto") ? ((int) $styles['width'] - 50) . 'px' : '90%'; ?>; margin:0 5px; height:<?php echo ((int) $styles['thumbheight'] + 14); ?>px; overflow:hidden; }
|
44 |
Â
#<?php echo $styles['wrapperid']; ?> #slider<?php echo $unique; ?> { position:absolute; width:<?php echo $styles['sliderwidth']; ?>px !important; left:0; height:<?php echo ((int) $styles['thumbheight'] + 14); ?>px; }
|
45 |
Â
#<?php echo $styles['wrapperid']; ?> #slider<?php echo $unique; ?> img { cursor:pointer; border:1px solid #666; padding:2px; float:left !important; }
|
46 |
+
#<?php echo $styles['wrapperid']; ?> #spinner<?php echo $unique; ?> { position:relative; top:50%; left:45%; text-align:left; font-size:30px; }
|
47 |
Â
#<?php echo $styles['wrapperid']; ?> #spinner<?php echo $unique; ?> img { border:none; }
|
48 |
Â
<?php endif; ?>
|
views/default/css/colorbox.css
CHANGED
@@ -1,62 +1,191 @@
|
|
1 |
Â
/*
|
2 |
-
|
3 |
Â
The following CSS is consistent between example themes and should not be altered.
|
4 |
Â
*/
|
5 |
-
#colorbox, #cboxOverlay, #cboxWrapper{position:absolute;
|
6 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7 |
Â
#cboxOverlay{position:fixed; width:100%; height:100%;}
|
8 |
Â
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
|
9 |
Â
#cboxContent{position:relative;}
|
10 |
-
#cboxLoadedContent{overflow:auto;
|
11 |
Â
#cboxTitle{margin:0;}
|
12 |
-
|
Â
|
|
Â
|
|
13 |
Â
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
|
14 |
-
.cboxPhoto{float:left; margin:auto; border:0; display:block;
|
15 |
Â
.cboxIframe{width:100%; height:100%; display:block; border:0;}
|
16 |
-
#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
|
17 |
Â
|
18 |
Â
/*
|
19 |
Â
User Style:
|
20 |
-
Change the following styles to mod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
|
|
Â
|
|
Â
|
|
Â
|
|
29 |
Â
#cboxMiddleLeft{width:21px; background:url(../images/colorbox/controls.png) left top repeat-y;}
|
30 |
Â
#cboxMiddleRight{width:21px; background:url(../images/colorbox/controls.png) right top repeat-y;}
|
31 |
Â
#cboxTopCenter{height:21px; background:url(../images/colorbox/border.png) 0 0 repeat-x;}
|
32 |
Â
#cboxBottomCenter{height:21px; background:url(../images/colorbox/border.png) 0 -29px repeat-x;}
|
33 |
Â
#cboxContent{background:#fff; overflow:hidden;}
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
#cboxSlideshow{position:absolute; bottom:4px; right:30px; color:#0092ef;}
|
49 |
-
#cboxPrevious{position:absolute; bottom:0; left:0; background:url(../images/colorbox/controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;}
|
50 |
-
#cboxPrevious:hover{background-position:-75px -25px;}
|
51 |
-
#cboxNext{position:absolute; bottom:0; left:27px; background:url(../images/colorbox/controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;}
|
52 |
-
#cboxNext:hover{background-position:-50px -25px;}
|
53 |
-
#cboxClose{position:absolute; bottom:0; right:0; background:url(../images/colorbox/controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px;}
|
54 |
-
#cboxClose:hover{background-position:-25px -25px;}
|
55 |
Â
|
56 |
Â
/*
|
57 |
Â
The following fixes a problem where IE7 and IE8 replace a PNG's alpha transparency with a black fill
|
58 |
-
when an alpha filter (opacity change) is set on the element or ancestor element. This style is not applied to
|
59 |
-
See: http://jacklmoore.com/notes/ie-transparency-problems/
|
60 |
Â
*/
|
61 |
Â
.cboxIE #cboxTopLeft,
|
62 |
Â
.cboxIE #cboxTopCenter,
|
@@ -67,4 +196,27 @@
|
|
67 |
Â
.cboxIE #cboxMiddleLeft,
|
68 |
Â
.cboxIE #cboxMiddleRight {
|
69 |
Â
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF);
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
70 |
Â
}
|
1 |
Â
/*
|
2 |
+
ColorBox Core Style:
|
3 |
Â
The following CSS is consistent between example themes and should not be altered.
|
4 |
Â
*/
|
5 |
+
#colorbox, #cboxOverlay, #cboxWrapper{position: absolute;
|
6 |
+
top: 0;
|
7 |
+
left: 0;
|
8 |
+
z-index: 9999;
|
9 |
+
overflow: hidden;
|
10 |
+
border-bottom: 21px white solid; }
|
11 |
Â
#cboxOverlay{position:fixed; width:100%; height:100%;}
|
12 |
Â
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
|
13 |
Â
#cboxContent{position:relative;}
|
14 |
+
#cboxLoadedContent{overflow:auto;}
|
15 |
Â
#cboxTitle{margin:0;}
|
16 |
+
|
17 |
+
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute;top:50%;left:45%;width:auto;}
|
18 |
+
|
19 |
Â
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
|
20 |
+
.cboxPhoto{float:left; margin:auto; border:0; display:block;}
|
21 |
Â
.cboxIframe{width:100%; height:100%; display:block; border:0;}
|
Â
|
|
22 |
Â
|
23 |
Â
/*
|
24 |
Â
User Style:
|
25 |
+
Change the following styles to modify the appearance of ColorBox. They are
|
26 |
Â
ordered & tabbed in a way that represents the nesting of the generated HTML.
|
27 |
Â
*/
|
28 |
+
|
29 |
+
#cboxOverlay{background:#000;}
|
30 |
Â
#colorbox{outline:0;}
|
31 |
+
#cboxContent{margin-top: 40px;
|
32 |
+
background: white;
|
33 |
+
padding: 21px 0 0 0;}
|
34 |
+
.cboxIframe{background:#fff;}
|
35 |
+
#cboxError{padding:50px; border:1px solid #ccc;}
|
36 |
+
#cboxLoadedContent{ }
|
37 |
+
#cboxTitle{position: absolute;
|
38 |
+
top: -34px;
|
39 |
+
left: -11px;
|
40 |
+
color: #ccc;
|
41 |
+
font-size: 100%;
|
42 |
+
font-weight: bold;
|
43 |
+
}
|
44 |
+
#cboxCurrent{position: absolute;
|
45 |
+
top: -34px;
|
46 |
+
right: 11px;
|
47 |
+
color: #ccc;
|
48 |
+
font-size: 100%;
|
49 |
+
}
|
50 |
+
|
51 |
+
#cboxLoadingGraphic {
|
52 |
+
color: #333;
|
53 |
+
-webkit-animation: fa-spin 2s infinite linear;
|
54 |
+
animation: fa-spin 2s infinite linear;
|
55 |
+
}
|
56 |
+
|
57 |
+
@keyframes fa-spin {
|
58 |
+
0% {
|
59 |
+
-webkit-transform: rotate(0deg);
|
60 |
+
transform: rotate(0deg);
|
61 |
+
}
|
62 |
+
100% {
|
63 |
+
-webkit-transform: rotate(359deg);
|
64 |
+
transform: rotate(359deg);
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
#cboxLoadingGraphic:before {
|
69 |
+
font-family: FontAwesome;
|
70 |
+
content: "\f1ce";
|
71 |
+
font-size: 24px;
|
72 |
+
}
|
73 |
+
|
74 |
+
/* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
|
75 |
+
#cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
|
76 |
+
|
77 |
+
/* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
|
78 |
+
#cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
|
79 |
+
#cboxSlideshow{position:absolute; top:-20px; right:90px; color:#fff;}
|
80 |
+
|
81 |
+
#cboxPrevious, #cboxNext{
|
82 |
+
visibility: hidden;
|
83 |
+
font-size: 0px;
|
84 |
+
position:absolute;
|
85 |
+
margin-top: -30px;
|
86 |
+
top:50%;
|
87 |
+
width:50%;
|
88 |
+
height:100px;
|
89 |
+
padding: 10px;
|
90 |
+
color: #ccc;
|
91 |
+
outline: none;
|
92 |
+
overflow: hidden;
|
93 |
+
vertical-align: middle;
|
94 |
+
}
|
95 |
+
#cboxPrevious{
|
96 |
+
left: 5px;
|
97 |
+
text-align: left;
|
98 |
+
}
|
99 |
+
#cboxPrevious:before{
|
100 |
+
visibility: visible;
|
101 |
+
font-size: 72px;
|
102 |
+
font-family: FontAwesome;
|
103 |
+
content: "\f104";
|
104 |
+
vertical-align: middle;
|
105 |
+
}
|
106 |
+
#cboxPrevious:hover{color: #fff;}
|
107 |
+
#cboxNext{
|
108 |
+
right: 15px;
|
109 |
+
text-align: right;
|
110 |
+
}
|
111 |
+
#cboxNext:before{
|
112 |
+
visibility: visible;
|
113 |
+
font-size: 72px;
|
114 |
+
font-family: FontAwesome;
|
115 |
+
content: "\f105";
|
116 |
+
vertical-align: middle;
|
117 |
+
}
|
118 |
+
#cboxNext:hover{color: #fff;}
|
119 |
+
#cboxClose{
|
120 |
+
visibility: hidden;
|
121 |
+
position:absolute;
|
122 |
+
top: -30px;
|
123 |
+
right: -21px;
|
124 |
+
display:block;
|
125 |
+
width: 24px;
|
126 |
+
height:24px;
|
127 |
+
color: #ccc;
|
128 |
+
outline: 0;
|
129 |
+
}
|
130 |
+
#cboxClose:before{
|
131 |
+
visibility: visible;
|
132 |
+
font-family: FontAwesome;
|
133 |
+
font-size: 24px;
|
134 |
+
content: "\f00d";
|
135 |
+
margin: 0 99999px 0 0;
|
136 |
+
}
|
137 |
+
#cboxClose:hover{
|
138 |
+
color: #fff;
|
139 |
+
}
|
140 |
+
|
141 |
+
#cboxTopLeft{/* width: 21px; */
|
142 |
+
/* height: 21px; */
|
143 |
+
/* background: white; */}
|
144 |
+
#cboxTopRight{/* width: 21px; */
|
145 |
+
/* height: 21px; */
|
146 |
+
/* background: white; */}
|
147 |
+
#cboxBottomLeft{width:21px; height:21px; background:white;}
|
148 |
+
#cboxBottomRight{width:21px; height:21px; background:white;}
|
149 |
+
#cboxMiddleLeft{width: 21px;
|
150 |
+
background: white;
|
151 |
+
margin-top: 40px;
|
152 |
+
padding-bottom: 21px;}
|
153 |
+
#cboxMiddleRight{width: 21px;
|
154 |
+
background: white;
|
155 |
+
margin-top: 40px;
|
156 |
+
padding-bottom: 21px;}
|
157 |
+
#cboxTopCenter{/* height: 21px; */
|
158 |
+
/* background: white; */}
|
159 |
+
#cboxBottomCenter{height:21px; background:white;}
|
160 |
+
|
161 |
+
/*#cboxOverlay{background:url(../images/colorbox/overlay.png) repeat 0 0;}
|
162 |
+
#colorbox{}
|
163 |
+
#cboxTopLeft{width:21px; height:21px; background:url(../images/colorbox/controls.png) no-repeat -100px 0;}
|
164 |
+
#cboxTopRight{width:21px; height:21px; background:url(../images/colorbox/controls.png) no-repeat -129px 0;}
|
165 |
+
#cboxBottomLeft{width:21px; height:21px; background:url(../images/colorbox/controls.png) no-repeat -100px -29px;}
|
166 |
+
#cboxBottomRight{width:21px; height:21px; background:url(../images/colorbox/controls.png) no-repeat -129px -29px;}
|
167 |
Â
#cboxMiddleLeft{width:21px; background:url(../images/colorbox/controls.png) left top repeat-y;}
|
168 |
Â
#cboxMiddleRight{width:21px; background:url(../images/colorbox/controls.png) right top repeat-y;}
|
169 |
Â
#cboxTopCenter{height:21px; background:url(../images/colorbox/border.png) 0 0 repeat-x;}
|
170 |
Â
#cboxBottomCenter{height:21px; background:url(../images/colorbox/border.png) 0 -29px repeat-x;}
|
171 |
Â
#cboxContent{background:#fff; overflow:hidden;}
|
172 |
+
#cboxError{padding:50px; border:1px solid #ccc;}
|
173 |
+
#cboxLoadedContent{margin-bottom:28px;}
|
174 |
+
#cboxTitle{position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494;}
|
175 |
+
#cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;}
|
176 |
+
#cboxSlideshow{position:absolute; bottom:4px; right:30px; color:#0092ef;}
|
177 |
+
#cboxPrevious{position:absolute; bottom:0; left:0; background:url(../images/colorbox/controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;}
|
178 |
+
#cboxPrevious.hover{background-position:-75px -25px;}
|
179 |
+
#cboxNext{position:absolute; bottom:0; left:27px; background:url(../images/colorbox/controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;}
|
180 |
+
#cboxNext.hover{background-position:-50px -25px;}
|
181 |
+
#cboxLoadingOverlay{background:url(../images/colorbox/loading_background.png) no-repeat center center;}
|
182 |
+
#cboxLoadingGraphic{background:url(../images/colorbox/loading.gif) no-repeat center center;}
|
183 |
+
#cboxClose{position:absolute; bottom:0; right:0; background:url(../images/colorbox/controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px;}
|
184 |
+
#cboxClose.hover{background-position:-25px -25px;}*/
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
185 |
Â
|
186 |
Â
/*
|
187 |
Â
The following fixes a problem where IE7 and IE8 replace a PNG's alpha transparency with a black fill
|
188 |
+
when an alpha filter (opacity change) is set on the element or ancestor element. This style is not applied to IE9.
|
Â
|
|
189 |
Â
*/
|
190 |
Â
.cboxIE #cboxTopLeft,
|
191 |
Â
.cboxIE #cboxTopCenter,
|
196 |
Â
.cboxIE #cboxMiddleLeft,
|
197 |
Â
.cboxIE #cboxMiddleRight {
|
198 |
Â
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF);
|
199 |
+
}
|
200 |
+
|
201 |
+
/*
|
202 |
+
The following provides PNG transparency support for IE6
|
203 |
+
*/
|
204 |
+
.cboxIE6 #cboxTopLeft{background:url(../images/colorbox/ie6/borderTopLeft.png);}
|
205 |
+
.cboxIE6 #cboxTopCenter{background:url(../images/colorbox/ie6/borderTopCenter.png);}
|
206 |
+
.cboxIE6 #cboxTopRight{background:url(../images/colorbox/ie6/borderTopRight.png);}
|
207 |
+
.cboxIE6 #cboxBottomLeft{background:url(../images/colorbox/ie6/borderBottomLeft.png);}
|
208 |
+
.cboxIE6 #cboxBottomCenter{background:url(../images/colorbox/ie6/borderBottomCenter.png);}
|
209 |
+
.cboxIE6 #cboxBottomRight{background:url(../images/colorbox/ie6/borderBottomRight.png);}
|
210 |
+
.cboxIE6 #cboxMiddleLeft{background:url(../images/colorbox/ie6/borderMiddleLeft.png);}
|
211 |
+
.cboxIE6 #cboxMiddleRight{background:url(../images/colorbox/ie6/borderMiddleRight.png);}
|
212 |
+
|
213 |
+
.cboxIE6 #cboxTopLeft,
|
214 |
+
.cboxIE6 #cboxTopCenter,
|
215 |
+
.cboxIE6 #cboxTopRight,
|
216 |
+
.cboxIE6 #cboxBottomLeft,
|
217 |
+
.cboxIE6 #cboxBottomCenter,
|
218 |
+
.cboxIE6 #cboxBottomRight,
|
219 |
+
.cboxIE6 #cboxMiddleLeft,
|
220 |
+
.cboxIE6 #cboxMiddleRight {
|
221 |
+
_behavior: expression(this.src = this.src ? this.src : this.currentStyle.backgroundImage.split('"')[1], this.style.background = "none", this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + this.src + ", sizingMethod='scale')");
|
222 |
Â
}
|
views/default/gallery.php
CHANGED
@@ -22,22 +22,16 @@ $thumbopacity = $this -> get_option('thumbopacity');
|
|
22 |
Â
<?php else : ?>
|
23 |
Â
<span><?php echo $full_image_href[0]; ?></span>
|
24 |
Â
<?php endif; ?>
|
25 |
-
|
26 |
-
<?php
|
27 |
-
|
28 |
-
$attachment = wp_get_attachment_metadata($slide -> ID);
|
29 |
-
|
30 |
-
?>
|
31 |
-
<p><?php echo $attachment['image_meta']['caption']; ?></p>
|
32 |
Â
<?php $thumbnail_link = wp_get_attachment_image_src($slide -> ID, 'thumbnail', false); ?>
|
33 |
Â
<?php if ($options['showthumbs'] == "true") : ?>
|
34 |
Â
<?php if (!empty($slide -> guid)) : ?>
|
35 |
-
<a href="<?php echo $slide -> guid; ?>" id="<?php echo $unique; ?>imglink<?php echo $slide -> ID; ?>" <?php if ($this -> Html -> is_image($slide -> guid)) : ?>class="colorboxslideshow<?php echo $unique; ?>" rel="
|
36 |
Â
<?php else : ?>
|
37 |
-
<a id="<?php echo $unique; ?>imglink<?php echo $slide -> ID; ?>" <?php if ($this -> Html -> is_image($full_image_url)) : ?>class="colorboxslideshow<?php echo $unique; ?>" rel="
|
38 |
Â
<?php endif; ?>
|
39 |
Â
<?php else : ?>
|
40 |
-
<a id="<?php echo $unique; ?>imglink<?php echo $slide -> ID; ?>" <?php if ($this -> Html -> is_image($slide -> guid)) : ?>class="colorboxslideshow<?php echo $unique; ?>" rel="
|
41 |
Â
<?php endif; ?>
|
42 |
Â
</li>
|
43 |
Â
<?php wp_reset_postdata(); ?>
|
@@ -45,7 +39,13 @@ $thumbopacity = $this -> get_option('thumbopacity');
|
|
45 |
Â
<?php elseif ($featured) : ?>
|
46 |
Â
<!-- Featured images from posts -->
|
47 |
Â
<?php foreach ($slides as $slide) : ?>
|
48 |
-
<?php
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
49 |
Â
<li>
|
50 |
Â
<h3 style="opacity:70;"><a target="_self" href="<?php echo get_permalink($slide -> ID); ?>"><?php echo stripslashes(__($slide -> post_title)); ?></a></h3>
|
51 |
Â
<?php $full_image_href = wp_get_attachment_image_src(get_post_thumbnail_id($slide -> ID), 'full', false); ?>
|
@@ -62,7 +62,7 @@ $thumbopacity = $this -> get_option('thumbopacity');
|
|
62 |
Â
<?php if (!empty($slide -> guid)) : ?>
|
63 |
Â
<a href="<?php echo $slide -> guid; ?>" target="_self" title="<?php echo esc_attr(__($slide -> post_title)); ?>"><img src="<?php echo $this -> Html -> bfithumb_image_src($full_image_url, $this -> get_option('thumbwidth'), $this -> get_option('thumbheight'), 100); ?>" alt="<?php echo $this -> Html -> sanitize(__($slide -> post_title)); ?>" /></a>
|
64 |
Â
<?php else : ?>
|
65 |
-
<a id="<?php echo $unique; ?>imglink<?php echo $slide -> ID; ?>" <?php if ($this -> Html -> is_image($full_image_url)) : ?>class="colorboxslideshow<?php echo $unique; ?>" rel="
|
66 |
Â
<?php endif; ?>
|
67 |
Â
<?php else : ?>
|
68 |
Â
<a href="<?php echo $slide -> guid; ?>" target="_self" title="<?php echo __($slide -> post_title); ?>"></a>
|
@@ -107,7 +107,7 @@ $thumbopacity = $this -> get_option('thumbopacity');
|
|
107 |
Â
<?php if ($slide -> uselink == "Y" && !empty($slide -> link)) : ?>
|
108 |
Â
<a href="<?php echo __($slide -> link); ?>" title="<?php echo esc_attr(__($slide -> title)); ?>" target="_<?php echo $slide -> linktarget; ?>"><img src="<?php echo $this -> Html -> bfithumb_image_src($slide -> image_path, $this -> get_option('thumbwidth'), $this -> get_option('thumbheight'), 100); ?>" alt="<?php echo $this -> Html -> sanitize(__($slide -> title)); ?>" /></a>
|
109 |
Â
<?php elseif ($options['imagesoverlay'] == "true") : ?>
|
110 |
-
<a href="<?php echo $slide -> image_path; ?>" id="<?php echo $unique; ?>imglink<?php echo $slide -> id; ?>" <?php if ($this -> Html -> is_image($slide -> image_path)) : ?>class="colorboxslideshow<?php echo $unique; ?>" rel="
|
111 |
Â
<?php else : ?>
|
112 |
Â
<a><img src="<?php echo $this -> Html -> bfithumb_image_src($slide -> image_path, $this -> get_option('thumbwidth'), $this -> get_option('thumbheight'), 100); ?>" alt="<?php echo $this -> Html -> sanitize(__($slide -> title)); ?>" /></a>
|
113 |
Â
<?php endif; ?>
|
@@ -115,7 +115,7 @@ $thumbopacity = $this -> get_option('thumbopacity');
|
|
115 |
Â
<?php if ($slide -> uselink == "Y" && !empty($slide -> link)) : ?>
|
116 |
Â
<a href="<?php echo __($slide -> link); ?>" target="_<?php echo $slide -> linktarget; ?>" title="<?php echo __($slide -> title); ?>"></a>
|
117 |
Â
<?php elseif ($options['imagesoverlay'] == "true") : ?>
|
118 |
-
<a href="<?php echo $slide -> image_path; ?>" id="<?php echo $unique; ?>imglink<?php echo $slide -> id; ?>" <?php if ($this -> Html -> is_image($slide -> image_path)) : ?>class="colorboxslideshow<?php echo $unique; ?>" rel="
|
119 |
Â
<?php else : ?>
|
120 |
Â
<a></a>
|
121 |
Â
<?php endif; ?>
|
@@ -176,7 +176,7 @@ $thumbopacity = $this -> get_option('thumbopacity');
|
|
176 |
Â
tid('slideshow<?php echo $unique; ?>').style.display = "none";
|
177 |
Â
tid('<?php echo $wrapperid; ?>').style.display = 'block';
|
178 |
Â
tid('<?php echo $wrapperid; ?>').style.visibility = 'hidden';
|
179 |
-
jQuery("#fullsize<?php echo $unique; ?>").append('<div id="spinner<?php echo $unique; ?>"><
|
180 |
Â
tid('spinner<?php echo $unique; ?>').style.visibility = 'visible';
|
181 |
Â
|
182 |
Â
var slideshow<?php echo $unique; ?> = new TINY.slideshow("slideshow<?php echo $unique; ?>");
|
@@ -188,6 +188,7 @@ $thumbopacity = $this -> get_option('thumbopacity');
|
|
188 |
Â
slideshow<?php echo $unique; ?>.easing = "<?php echo $options['easing']; ?>";
|
189 |
Â
slideshow<?php echo $unique; ?>.alwaysauto = <?php echo $options['alwaysauto']; ?>;
|
190 |
Â
slideshow<?php echo $unique; ?>.autoheight = <?php echo $options['autoheight']; ?>;
|
Â
|
|
191 |
Â
slideshow<?php echo $unique; ?>.imgSpeed = <?php echo $options['fadespeed']; ?>;
|
192 |
Â
slideshow<?php echo $unique; ?>.navOpacity = <?php echo (empty($options['navopacity'])) ? 0 : $options['navopacity']; ?>;
|
193 |
Â
slideshow<?php echo $unique; ?>.navHover = <?php echo (empty($options['navhoveropacity'])) ? 0 : $options['navhoveropacity']; ?>;
|
@@ -196,6 +197,7 @@ $thumbopacity = $this -> get_option('thumbopacity');
|
|
196 |
Â
slideshow<?php echo $unique; ?>.imagesid = "images<?php echo $unique; ?>";
|
197 |
Â
slideshow<?php echo $unique; ?>.info = "<?php echo ($options['showinfo'] == "true") ? 'information' . $unique : ''; ?>";
|
198 |
Â
slideshow<?php echo $unique; ?>.infoSpeed = <?php echo $options['infospeed']; ?>;
|
Â
|
|
199 |
Â
slideshow<?php echo $unique; ?>.thumbs = "<?php echo ($options['showthumbs'] == "true") ? 'slider' . $unique : ''; ?>";
|
200 |
Â
slideshow<?php echo $unique; ?>.thumbOpacity = <?php echo (empty($thumbopacity)) ? 0 : $thumbopacity; ?>;
|
201 |
Â
slideshow<?php echo $unique; ?>.left = "slideleft<?php echo $unique; ?>";
|
@@ -208,6 +210,12 @@ $thumbopacity = $this -> get_option('thumbopacity');
|
|
208 |
Â
slideshow<?php echo $unique; ?>.init("slideshow<?php echo $unique; ?>","image<?php echo $unique; ?>","<?php echo (!empty($options['shownav']) && count($slides) > 1 && $options['shownav'] == "true") ? $navb . $unique : ''; ?>","<?php echo (!empty($options['shownav']) && count($slides) > 1 && $options['shownav'] == "true") ? $navf . $unique : ''; ?>","imglink<?php echo $unique; ?>");
|
209 |
Â
tid('<?php echo $wrapperid; ?>').style.visibility = 'visible';
|
210 |
Â
jQuery(window).trigger('resize');
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
211 |
Â
});
|
212 |
Â
|
213 |
Â
<?php if ($options['layout'] == "responsive" && $options['resheighttype'] == "%") : ?>
|
@@ -230,7 +238,7 @@ $thumbopacity = $this -> get_option('thumbopacity');
|
|
230 |
Â
$cssattr['autoheight'] = $options['autoheight'];
|
231 |
Â
$cssattr['thumbwidth'] = $this -> get_option('thumbwidth');
|
232 |
Â
$cssattr['thumbheight'] = $this -> get_option('thumbheight');
|
233 |
-
$cssattr['sliderwidth'] = (($cssattr['thumbwidth'] + $options['thumbsspacing'] + 6) * count($slides));
|
234 |
Â
$cssattr['infohideonmobile'] = $this -> get_option('infohideonmobile');
|
235 |
Â
|
236 |
Â
$javascript = ob_get_clean();
|
@@ -241,10 +249,6 @@ $thumbopacity = $this -> get_option('thumbopacity');
|
|
241 |
Â
|
242 |
Â
?>
|
243 |
Â
|
244 |
-
<?php /*<style type="text/css">
|
245 |
-
@import url('<?php echo $this -> get_css_url($cssattr, $options['layout']); ?>');
|
246 |
-
</style>*/ ?>
|
247 |
-
|
248 |
Â
<link rel="stylesheet" property="stylesheet" href="<?php echo $this -> get_css_url($cssattr, $options['layout']); ?>" type="text/css" media="all" />
|
249 |
Â
|
250 |
Â
<!--[if IE 6]>
|
22 |
Â
<?php else : ?>
|
23 |
Â
<span><?php echo $full_image_href[0]; ?></span>
|
24 |
Â
<?php endif; ?>
|
25 |
+
<p><?php echo __(get_the_excerpt()); ?></p>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
26 |
Â
<?php $thumbnail_link = wp_get_attachment_image_src($slide -> ID, 'thumbnail', false); ?>
|
27 |
Â
<?php if ($options['showthumbs'] == "true") : ?>
|
28 |
Â
<?php if (!empty($slide -> guid)) : ?>
|
29 |
+
<a href="<?php echo $slide -> guid; ?>" id="<?php echo $unique; ?>imglink<?php echo $slide -> ID; ?>" <?php if ($this -> Html -> is_image($slide -> guid)) : ?>class="colorboxslideshow<?php echo $unique; ?>" data-rel="slideshowgroup<?php echo $unique; ?>"<?php endif; ?> target="_self" title="<?php echo esc_attr(__($slide -> post_title)); ?>"><img src="<?php echo $this -> Html -> bfithumb_image_src($full_image_url, $this -> get_option('thumbwidth'), $this -> get_option('thumbheight'), 100); ?>" alt="<?php echo $this -> Html -> sanitize(__($slide -> post_title)); ?>" /></a>
|
30 |
Â
<?php else : ?>
|
31 |
+
<a id="<?php echo $unique; ?>imglink<?php echo $slide -> ID; ?>" <?php if ($this -> Html -> is_image($full_image_url)) : ?>class="colorboxslideshow<?php echo $unique; ?>" data-rel="slideshowgroup<?php echo $unique; ?>"<?php endif; ?>><img src="<?php echo $this -> Html -> bfithumb_image_src($full_image_url, $this -> get_option('thumbwidth'), $this -> get_option('thumbheight'), 100); ?>" alt="<?php echo $this -> Html -> sanitize(__($slide -> post_title)); ?>" /></a>
|
32 |
Â
<?php endif; ?>
|
33 |
Â
<?php else : ?>
|
34 |
+
<a id="<?php echo $unique; ?>imglink<?php echo $slide -> ID; ?>" <?php if ($this -> Html -> is_image($slide -> guid)) : ?>class="colorboxslideshow<?php echo $unique; ?>" data-rel="slideshowgroup<?php echo $unique; ?>"<?php endif; ?> href="<?php echo $slide -> guid; ?>" title="<?php echo __($slide -> post_title); ?>"></a>
|
35 |
Â
<?php endif; ?>
|
36 |
Â
</li>
|
37 |
Â
<?php wp_reset_postdata(); ?>
|
39 |
Â
<?php elseif ($featured) : ?>
|
40 |
Â
<!-- Featured images from posts -->
|
41 |
Â
<?php foreach ($slides as $slide) : ?>
|
42 |
+
<?php
|
43 |
+
|
44 |
+
setup_postdata($slide);
|
45 |
+
global $slideshow_post;
|
46 |
+
$slideshow_post = $slide;
|
47 |
+
|
48 |
+
?>
|
49 |
Â
<li>
|
50 |
Â
<h3 style="opacity:70;"><a target="_self" href="<?php echo get_permalink($slide -> ID); ?>"><?php echo stripslashes(__($slide -> post_title)); ?></a></h3>
|
51 |
Â
<?php $full_image_href = wp_get_attachment_image_src(get_post_thumbnail_id($slide -> ID), 'full', false); ?>
|
62 |
Â
<?php if (!empty($slide -> guid)) : ?>
|
63 |
Â
<a href="<?php echo $slide -> guid; ?>" target="_self" title="<?php echo esc_attr(__($slide -> post_title)); ?>"><img src="<?php echo $this -> Html -> bfithumb_image_src($full_image_url, $this -> get_option('thumbwidth'), $this -> get_option('thumbheight'), 100); ?>" alt="<?php echo $this -> Html -> sanitize(__($slide -> post_title)); ?>" /></a>
|
64 |
Â
<?php else : ?>
|
65 |
+
<a id="<?php echo $unique; ?>imglink<?php echo $slide -> ID; ?>" <?php if ($this -> Html -> is_image($full_image_url)) : ?>class="colorboxslideshow<?php echo $unique; ?>" data-rel="slideshowgroup<?php echo $unique; ?>"<?php endif; ?>><img src="<?php echo $this -> Html -> bfithumb_image_src($full_image_url, $this -> get_option('thumbwidth'), $this -> get_option('thumbheight'), 100); ?>" alt="<?php echo $this -> Html -> sanitize(__($slide -> post_title)); ?>" /></a>
|
66 |
Â
<?php endif; ?>
|
67 |
Â
<?php else : ?>
|
68 |
Â
<a href="<?php echo $slide -> guid; ?>" target="_self" title="<?php echo __($slide -> post_title); ?>"></a>
|
107 |
Â
<?php if ($slide -> uselink == "Y" && !empty($slide -> link)) : ?>
|
108 |
Â
<a href="<?php echo __($slide -> link); ?>" title="<?php echo esc_attr(__($slide -> title)); ?>" target="_<?php echo $slide -> linktarget; ?>"><img src="<?php echo $this -> Html -> bfithumb_image_src($slide -> image_path, $this -> get_option('thumbwidth'), $this -> get_option('thumbheight'), 100); ?>" alt="<?php echo $this -> Html -> sanitize(__($slide -> title)); ?>" /></a>
|
109 |
Â
<?php elseif ($options['imagesoverlay'] == "true") : ?>
|
110 |
+
<a href="<?php echo $slide -> image_path; ?>" id="<?php echo $unique; ?>imglink<?php echo $slide -> id; ?>" <?php if ($this -> Html -> is_image($slide -> image_path)) : ?>class="colorboxslideshow<?php echo $unique; ?>" data-rel="slideshowgroup<?php echo $unique; ?>"<?php endif; ?> target="_<?php echo $slide -> linktarget; ?>" title="<?php echo __($slide -> title); ?>"><img src="<?php echo $this -> Html -> bfithumb_image_src($slide -> image_path, $this -> get_option('thumbwidth'), $this -> get_option('thumbheight'), 100); ?>" alt="<?php echo $this -> Html -> sanitize(__($slide -> title)); ?>" /></a>
|
111 |
Â
<?php else : ?>
|
112 |
Â
<a><img src="<?php echo $this -> Html -> bfithumb_image_src($slide -> image_path, $this -> get_option('thumbwidth'), $this -> get_option('thumbheight'), 100); ?>" alt="<?php echo $this -> Html -> sanitize(__($slide -> title)); ?>" /></a>
|
113 |
Â
<?php endif; ?>
|
115 |
Â
<?php if ($slide -> uselink == "Y" && !empty($slide -> link)) : ?>
|
116 |
Â
<a href="<?php echo __($slide -> link); ?>" target="_<?php echo $slide -> linktarget; ?>" title="<?php echo __($slide -> title); ?>"></a>
|
117 |
Â
<?php elseif ($options['imagesoverlay'] == "true") : ?>
|
118 |
+
<a href="<?php echo $slide -> image_path; ?>" id="<?php echo $unique; ?>imglink<?php echo $slide -> id; ?>" <?php if ($this -> Html -> is_image($slide -> image_path)) : ?>class="colorboxslideshow<?php echo $unique; ?>" data-rel="slideshowgroup<?php echo $unique; ?>"<?php endif; ?> target="_<?php echo $slide -> linktarget; ?>" title="<?php echo __($slide -> title); ?>"></a>
|
119 |
Â
<?php else : ?>
|
120 |
Â
<a></a>
|
121 |
Â
<?php endif; ?>
|
176 |
Â
tid('slideshow<?php echo $unique; ?>').style.display = "none";
|
177 |
Â
tid('<?php echo $wrapperid; ?>').style.display = 'block';
|
178 |
Â
tid('<?php echo $wrapperid; ?>').style.visibility = 'hidden';
|
179 |
+
jQuery("#fullsize<?php echo $unique; ?>").append('<div id="spinner<?php echo $unique; ?>"><i class="fa fa-cog fa-spin"></i></div>');
|
180 |
Â
tid('spinner<?php echo $unique; ?>').style.visibility = 'visible';
|
181 |
Â
|
182 |
Â
var slideshow<?php echo $unique; ?> = new TINY.slideshow("slideshow<?php echo $unique; ?>");
|
188 |
Â
slideshow<?php echo $unique; ?>.easing = "<?php echo $options['easing']; ?>";
|
189 |
Â
slideshow<?php echo $unique; ?>.alwaysauto = <?php echo $options['alwaysauto']; ?>;
|
190 |
Â
slideshow<?php echo $unique; ?>.autoheight = <?php echo $options['autoheight']; ?>;
|
191 |
+
slideshow<?php echo $unique; ?>.autoheight_max = <?php echo (empty($options['autoheight_max'])) ? "false" : $options['autoheight_max']; ?>;
|
192 |
Â
slideshow<?php echo $unique; ?>.imgSpeed = <?php echo $options['fadespeed']; ?>;
|
193 |
Â
slideshow<?php echo $unique; ?>.navOpacity = <?php echo (empty($options['navopacity'])) ? 0 : $options['navopacity']; ?>;
|
194 |
Â
slideshow<?php echo $unique; ?>.navHover = <?php echo (empty($options['navhoveropacity'])) ? 0 : $options['navhoveropacity']; ?>;
|
197 |
Â
slideshow<?php echo $unique; ?>.imagesid = "images<?php echo $unique; ?>";
|
198 |
Â
slideshow<?php echo $unique; ?>.info = "<?php echo ($options['showinfo'] == "true") ? 'information' . $unique : ''; ?>";
|
199 |
Â
slideshow<?php echo $unique; ?>.infoSpeed = <?php echo $options['infospeed']; ?>;
|
200 |
+
slideshow<?php echo $unique; ?>.infodelay = <?php echo (empty($options['infodelay'])) ? 0 : $options['infodelay']; ?>;
|
201 |
Â
slideshow<?php echo $unique; ?>.thumbs = "<?php echo ($options['showthumbs'] == "true") ? 'slider' . $unique : ''; ?>";
|
202 |
Â
slideshow<?php echo $unique; ?>.thumbOpacity = <?php echo (empty($thumbopacity)) ? 0 : $thumbopacity; ?>;
|
203 |
Â
slideshow<?php echo $unique; ?>.left = "slideleft<?php echo $unique; ?>";
|
210 |
Â
slideshow<?php echo $unique; ?>.init("slideshow<?php echo $unique; ?>","image<?php echo $unique; ?>","<?php echo (!empty($options['shownav']) && count($slides) > 1 && $options['shownav'] == "true") ? $navb . $unique : ''; ?>","<?php echo (!empty($options['shownav']) && count($slides) > 1 && $options['shownav'] == "true") ? $navf . $unique : ''; ?>","imglink<?php echo $unique; ?>");
|
211 |
Â
tid('<?php echo $wrapperid; ?>').style.visibility = 'visible';
|
212 |
Â
jQuery(window).trigger('resize');
|
213 |
+
slideshow<?php echo $unique; ?>.touch(tid('fullsize<?php echo $unique; ?>'));
|
214 |
+
|
215 |
+
<?php if ($options['showthumbs'] == "true") : ?>
|
216 |
+
var touchslidesurface = tid('slider<?php echo $unique; ?>');
|
217 |
+
slideshow<?php echo $unique; ?>.touchslide(touchslidesurface);
|
218 |
+
<?php endif; ?>
|
219 |
Â
});
|
220 |
Â
|
221 |
Â
<?php if ($options['layout'] == "responsive" && $options['resheighttype'] == "%") : ?>
|
238 |
Â
$cssattr['autoheight'] = $options['autoheight'];
|
239 |
Â
$cssattr['thumbwidth'] = $this -> get_option('thumbwidth');
|
240 |
Â
$cssattr['thumbheight'] = $this -> get_option('thumbheight');
|
241 |
+
$cssattr['sliderwidth'] = ((($cssattr['thumbwidth'] + $options['thumbsspacing'] + 6) * count($slides)) + 60);
|
242 |
Â
$cssattr['infohideonmobile'] = $this -> get_option('infohideonmobile');
|
243 |
Â
|
244 |
Â
$javascript = ob_get_clean();
|
249 |
Â
|
250 |
Â
?>
|
251 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
252 |
Â
<link rel="stylesheet" property="stylesheet" href="<?php echo $this -> get_css_url($cssattr, $options['layout']); ?>" type="text/css" media="all" />
|
253 |
Â
|
254 |
Â
<!--[if IE 6]>
|
views/default/images/colorbox/border.png
ADDED
Binary file
|
views/default/images/colorbox/controls.png
ADDED
Binary file
|
views/default/images/colorbox/ie6/borderBottomCenter.png
ADDED
Binary file
|
views/default/images/colorbox/ie6/borderBottomLeft.png
ADDED
Binary file
|
views/default/images/colorbox/ie6/borderBottomRight.png
ADDED
Binary file
|
views/default/images/colorbox/ie6/borderMiddleLeft.png
ADDED
Binary file
|
views/default/images/colorbox/ie6/borderMiddleRight.png
ADDED
Binary file
|
views/default/images/colorbox/ie6/borderTopCenter.png
ADDED
Binary file
|
views/default/images/colorbox/ie6/borderTopLeft.png
ADDED
Binary file
|
views/default/images/colorbox/ie6/borderTopRight.png
ADDED
Binary file
|
views/default/images/colorbox/ie6/index.php
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
<?php /* Silence, so that search engines don't index/crawl this folder and it's contents */ ?>
|
views/default/images/colorbox/index.php
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
<?php /* Silence, so that search engines don't index/crawl this folder and it's contents */ ?>
|
views/default/images/colorbox/loading.gif
ADDED
Binary file
|
views/default/images/colorbox/loading_background.png
ADDED
Binary file
|
views/default/images/colorbox/overlay.png
ADDED
Binary file
|
views/default/images/left.gif
DELETED
Binary file
|
views/default/images/link.gif
DELETED
Binary file
|
views/default/images/right.gif
DELETED
Binary file
|
views/default/images/scroll-left.gif
DELETED
Binary file
|
views/default/images/scroll-right.gif
DELETED
Binary file
|
views/default/images/spinner.gif
DELETED
Binary file
|
views/default/js/colorbox.js
DELETED
@@ -1,1086 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
Colorbox v1.4.37 - 2014-02-11
|
3 |
-
jQuery lightbox and modal window plugin
|
4 |
-
(c) 2014 Jack Moore - http://www.jacklmoore.com/colorbox
|
5 |
-
license: http://www.opensource.org/licenses/mit-license.php
|
6 |
-
*/
|
7 |
-
(function ($, document, window) {
|
8 |
-
var
|
9 |
-
// Default settings object.
|
10 |
-
// See http://jacklmoore.com/colorbox for details.
|
11 |
-
defaults = {
|
12 |
-
// data sources
|
13 |
-
html: false,
|
14 |
-
photo: false,
|
15 |
-
iframe: false,
|
16 |
-
inline: false,
|
17 |
-
|
18 |
-
// behavior and appearance
|
19 |
-
transition: "elastic",
|
20 |
-
speed: 300,
|
21 |
-
fadeOut: 300,
|
22 |
-
width: false,
|
23 |
-
initialWidth: "600",
|
24 |
-
innerWidth: false,
|
25 |
-
maxWidth: false,
|
26 |
-
height: false,
|
27 |
-
initialHeight: "450",
|
28 |
-
innerHeight: false,
|
29 |
-
maxHeight: false,
|
30 |
-
scalePhotos: true,
|
31 |
-
scrolling: true,
|
32 |
-
href: false,
|
33 |
-
title: false,
|
34 |
-
rel: false,
|
35 |
-
opacity: 0.9,
|
36 |
-
preloading: true,
|
37 |
-
className: false,
|
38 |
-
overlayClose: true,
|
39 |
-
escKey: true,
|
40 |
-
arrowKey: true,
|
41 |
-
top: false,
|
42 |
-
bottom: false,
|
43 |
-
left: false,
|
44 |
-
right: false,
|
45 |
-
fixed: false,
|
46 |
-
data: undefined,
|
47 |
-
closeButton: true,
|
48 |
-
fastIframe: true,
|
49 |
-
open: false,
|
50 |
-
reposition: true,
|
51 |
-
loop: true,
|
52 |
-
slideshow: false,
|
53 |
-
slideshowAuto: true,
|
54 |
-
slideshowSpeed: 2500,
|
55 |
-
slideshowStart: "start slideshow",
|
56 |
-
slideshowStop: "stop slideshow",
|
57 |
-
photoRegex: /\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr)((#|\?).*)?$/i,
|
58 |
-
|
59 |
-
// alternate image paths for high-res displays
|
60 |
-
retinaImage: false,
|
61 |
-
retinaUrl: false,
|
62 |
-
retinaSuffix: '@2x.$1',
|
63 |
-
|
64 |
-
// internationalization
|
65 |
-
current: "image {current} of {total}",
|
66 |
-
previous: "previous",
|
67 |
-
next: "next",
|
68 |
-
close: "close",
|
69 |
-
xhrError: "This content failed to load.",
|
70 |
-
imgError: "This image failed to load.",
|
71 |
-
|
72 |
-
// accessbility
|
73 |
-
returnFocus: true,
|
74 |
-
trapFocus: true,
|
75 |
-
|
76 |
-
// callbacks
|
77 |
-
onOpen: false,
|
78 |
-
onLoad: false,
|
79 |
-
onComplete: false,
|
80 |
-
onCleanup: false,
|
81 |
-
onClosed: false
|
82 |
-
},
|
83 |
-
|
84 |
-
// Abstracting the HTML and event identifiers for easy rebranding
|
85 |
-
colorbox = 'colorbox',
|
86 |
-
prefix = 'cbox',
|
87 |
-
boxElement = prefix + 'Element',
|
88 |
-
|
89 |
-
// Events
|
90 |
-
event_open = prefix + '_open',
|
91 |
-
event_load = prefix + '_load',
|
92 |
-
event_complete = prefix + '_complete',
|
93 |
-
event_cleanup = prefix + '_cleanup',
|
94 |
-
event_closed = prefix + '_closed',
|
95 |
-
event_purge = prefix + '_purge',
|
96 |
-
|
97 |
-
// Cached jQuery Object Variables
|
98 |
-
$overlay,
|
99 |
-
$box,
|
100 |
-
$wrap,
|
101 |
-
$content,
|
102 |
-
$topBorder,
|
103 |
-
$leftBorder,
|
104 |
-
$rightBorder,
|
105 |
-
$bottomBorder,
|
106 |
-
$related,
|
107 |
-
$window,
|
108 |
-
$loaded,
|
109 |
-
$loadingBay,
|
110 |
-
$loadingOverlay,
|
111 |
-
$title,
|
112 |
-
$current,
|
113 |
-
$slideshow,
|
114 |
-
$next,
|
115 |
-
$prev,
|
116 |
-
$close,
|
117 |
-
$groupControls,
|
118 |
-
$events = $('<a/>'), // $([]) would be prefered, but there is an issue with jQuery 1.4.2
|
119 |
-
|
120 |
-
// Variables for cached values or use across multiple functions
|
121 |
-
settings,
|
122 |
-
interfaceHeight,
|
123 |
-
interfaceWidth,
|
124 |
-
loadedHeight,
|
125 |
-
loadedWidth,
|
126 |
-
element,
|
127 |
-
index,
|
128 |
-
photo,
|
129 |
-
open,
|
130 |
-
active,
|
131 |
-
closing,
|
132 |
-
loadingTimer,
|
133 |
-
publicMethod,
|
134 |
-
div = "div",
|
135 |
-
className,
|
136 |
-
requests = 0,
|
137 |
-
previousCSS = {},
|
138 |
-
init;
|
139 |
-
|
140 |
-
// ****************
|
141 |
-
// HELPER FUNCTIONS
|
142 |
-
// ****************
|
143 |
-
|
144 |
-
// Convenience function for creating new jQuery objects
|
145 |
-
function $tag(tag, id, css) {
|
146 |
-
var element = document.createElement(tag);
|
147 |
-
|
148 |
-
if (id) {
|
149 |
-
element.id = prefix + id;
|
150 |
-
}
|
151 |
-
|
152 |
-
if (css) {
|
153 |
-
element.style.cssText = css;
|
154 |
-
}
|
155 |
-
|
156 |
-
return $(element);
|
157 |
-
}
|
158 |
-
|
159 |
-
// Get the window height using innerHeight when available to avoid an issue with iOS
|
160 |
-
// http://bugs.jquery.com/ticket/6724
|
161 |
-
function winheight() {
|
162 |
-
return window.innerHeight ? window.innerHeight : $(window).height();
|
163 |
-
}
|
164 |
-
|
165 |
-
// Determine the next and previous members in a group.
|
166 |
-
function getIndex(increment) {
|
167 |
-
var
|
168 |
-
max = $related.length,
|
169 |
-
newIndex = (index + increment) % max;
|
170 |
-
|
171 |
-
return (newIndex < 0) ? max + newIndex : newIndex;
|
172 |
-
}
|
173 |
-
|
174 |
-
// Convert '%' and 'px' values to integers
|
175 |
-
function setSize(size, dimension) {
|
176 |
-
return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : winheight()) / 100) : 1) * parseInt(size, 10));
|
177 |
-
}
|
178 |
-
|
179 |
-
// Checks an href to see if it is a photo.
|
180 |
-
// There is a force photo option (photo: true) for hrefs that cannot be matched by the regex.
|
181 |
-
function isImage(settings, url) {
|
182 |
-
return settings.photo || settings.photoRegex.test(url);
|
183 |
-
}
|
184 |
-
|
185 |
-
function retinaUrl(settings, url) {
|
186 |
-
return settings.retinaUrl && window.devicePixelRatio > 1 ? url.replace(settings.photoRegex, settings.retinaSuffix) : url;
|
187 |
-
}
|
188 |
-
|
189 |
-
function trapFocus(e) {
|
190 |
-
if ('contains' in $box[0] && !$box[0].contains(e.target)) {
|
191 |
-
e.stopPropagation();
|
192 |
-
$box.focus();
|
193 |
-
}
|
194 |
-
}
|
195 |
-
|
196 |
-
// Assigns function results to their respective properties
|
197 |
-
function makeSettings() {
|
198 |
-
var i,
|
199 |
-
data = $.data(element, colorbox);
|
200 |
-
|
201 |
-
if (data == null) {
|
202 |
-
settings = $.extend({}, defaults);
|
203 |
-
if (console && console.log) {
|
204 |
-
console.log('Error: cboxElement missing settings object');
|
205 |
-
}
|
206 |
-
} else {
|
207 |
-
settings = $.extend({}, data);
|
208 |
-
}
|
209 |
-
|
210 |
-
for (i in settings) {
|
211 |
-
if ($.isFunction(settings[i]) && i.slice(0, 2) !== 'on') { // checks to make sure the function isn't one of the callbacks, they will be handled at the appropriate time.
|
212 |
-
settings[i] = settings[i].call(element);
|
213 |
-
}
|
214 |
-
}
|
215 |
-
|
216 |
-
settings.rel = settings.rel || element.rel || $(element).data('rel') || 'nofollow';
|
217 |
-
settings.href = settings.href || $(element).attr('href');
|
218 |
-
settings.title = settings.title || element.title;
|
219 |
-
|
220 |
-
if (typeof settings.href === "string") {
|
221 |
-
settings.href = $.trim(settings.href);
|
222 |
-
}
|
223 |
-
}
|
224 |
-
|
225 |
-
function trigger(event, callback) {
|
226 |
-
// for external use
|
227 |
-
$(document).trigger(event);
|
228 |
-
|
229 |
-
// for internal use
|
230 |
-
$events.triggerHandler(event);
|
231 |
-
|
232 |
-
if ($.isFunction(callback)) {
|
233 |
-
callback.call(element);
|
234 |
-
}
|
235 |
-
}
|
236 |
-
|
237 |
-
|
238 |
-
var slideshow = (function(){
|
239 |
-
var active,
|
240 |
-
className = prefix + "Slideshow_",
|
241 |
-
click = "click." + prefix,
|
242 |
-
timeOut;
|
243 |
-
|
244 |
-
function clear () {
|
245 |
-
clearTimeout(timeOut);
|
246 |
-
}
|
247 |
-
|
248 |
-
function set() {
|
249 |
-
if (settings.loop || $related[index + 1]) {
|
250 |
-
clear();
|
251 |
-
timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed);
|
252 |
-
}
|
253 |
-
}
|
254 |
-
|
255 |
-
function start() {
|
256 |
-
$slideshow
|
257 |
-
.html(settings.slideshowStop)
|
258 |
-
.unbind(click)
|
259 |
-
.one(click, stop);
|
260 |
-
|
261 |
-
$events
|
262 |
-
.bind(event_complete, set)
|
263 |
-
.bind(event_load, clear);
|
264 |
-
|
265 |
-
$box.removeClass(className + "off").addClass(className + "on");
|
266 |
-
}
|
267 |
-
|
268 |
-
function stop() {
|
269 |
-
clear();
|
270 |
-
|
271 |
-
$events
|
272 |
-
.unbind(event_complete, set)
|
273 |
-
.unbind(event_load, clear);
|
274 |
-
|
275 |
-
$slideshow
|
276 |
-
.html(settings.slideshowStart)
|
277 |
-
.unbind(click)
|
278 |
-
.one(click, function () {
|
279 |
-
publicMethod.next();
|
280 |
-
start();
|
281 |
-
});
|
282 |
-
|
283 |
-
$box.removeClass(className + "on").addClass(className + "off");
|
284 |
-
}
|
285 |
-
|
286 |
-
function reset() {
|
287 |
-
active = false;
|
288 |
-
$slideshow.hide();
|
289 |
-
clear();
|
290 |
-
$events
|
291 |
-
.unbind(event_complete, set)
|
292 |
-
.unbind(event_load, clear);
|
293 |
-
$box.removeClass(className + "off " + className + "on");
|
294 |
-
}
|
295 |
-
|
296 |
-
return function(){
|
297 |
-
if (active) {
|
298 |
-
if (!settings.slideshow) {
|
299 |
-
$events.unbind(event_cleanup, reset);
|
300 |
-
reset();
|
301 |
-
}
|
302 |
-
} else {
|
303 |
-
if (settings.slideshow && $related[1]) {
|
304 |
-
active = true;
|
305 |
-
$events.one(event_cleanup, reset);
|
306 |
-
if (settings.slideshowAuto) {
|
307 |
-
start();
|
308 |
-
} else {
|
309 |
-
stop();
|
310 |
-
}
|
311 |
-
$slideshow.show();
|
312 |
-
}
|
313 |
-
}
|
314 |
-
};
|
315 |
-
|
316 |
-
}());
|
317 |
-
|
318 |
-
|
319 |
-
function launch(target) {
|
320 |
-
if (!closing) {
|
321 |
-
|
322 |
-
element = target;
|
323 |
-
|
324 |
-
makeSettings();
|
325 |
-
|
326 |
-
$related = $(element);
|
327 |
-
|
328 |
-
index = 0;
|
329 |
-
|
330 |
-
if (settings.rel !== 'nofollow') {
|
331 |
-
$related = $('.' + boxElement).filter(function () {
|
332 |
-
var data = $.data(this, colorbox),
|
333 |
-
relRelated;
|
334 |
-
|
335 |
-
if (data) {
|
336 |
-
relRelated = $(this).data('rel') || data.rel || this.rel;
|
337 |
-
}
|
338 |
-
|
339 |
-
return (relRelated === settings.rel);
|
340 |
-
});
|
341 |
-
index = $related.index(element);
|
342 |
-
|
343 |
-
// Check direct calls to Colorbox.
|
344 |
-
if (index === -1) {
|
345 |
-
$related = $related.add(element);
|
346 |
-
index = $related.length - 1;
|
347 |
-
}
|
348 |
-
}
|
349 |
-
|
350 |
-
$overlay.css({
|
351 |
-
opacity: parseFloat(settings.opacity),
|
352 |
-
cursor: settings.overlayClose ? "pointer" : "auto",
|
353 |
-
visibility: 'visible'
|
354 |
-
}).show();
|
355 |
-
|
356 |
-
|
357 |
-
if (className) {
|
358 |
-
$box.add($overlay).removeClass(className);
|
359 |
-
}
|
360 |
-
if (settings.className) {
|
361 |
-
$box.add($overlay).addClass(settings.className);
|
362 |
-
}
|
363 |
-
className = settings.className;
|
364 |
-
|
365 |
-
if (settings.closeButton) {
|
366 |
-
$close.html(settings.close).appendTo($content);
|
367 |
-
} else {
|
368 |
-
$close.appendTo('<div/>');
|
369 |
-
}
|
370 |
-
|
371 |
-
if (!open) {
|
372 |
-
open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys.
|
373 |
-
|
374 |
-
// Show colorbox so the sizes can be calculated in older versions of jQuery
|
375 |
-
$box.css({visibility:'hidden', display:'block'});
|
376 |
-
|
377 |
-
$loaded = $tag(div, 'LoadedContent', 'width:0; height:0; overflow:hidden');
|
378 |
-
$content.css({width:'', height:''}).append($loaded);
|
379 |
-
|
380 |
-
// Cache values needed for size calculations
|
381 |
-
interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height();
|
382 |
-
interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width();
|
383 |
-
loadedHeight = $loaded.outerHeight(true);
|
384 |
-
loadedWidth = $loaded.outerWidth(true);
|
385 |
-
|
386 |
-
// Opens inital empty Colorbox prior to content being loaded.
|
387 |
-
settings.w = setSize(settings.initialWidth, 'x');
|
388 |
-
settings.h = setSize(settings.initialHeight, 'y');
|
389 |
-
$loaded.css({width:'', height:settings.h});
|
390 |
-
publicMethod.position();
|
391 |
-
|
392 |
-
trigger(event_open, settings.onOpen);
|
393 |
-
|
394 |
-
$groupControls.add($title).hide();
|
395 |
-
|
396 |
-
$box.focus();
|
397 |
-
|
398 |
-
if (settings.trapFocus) {
|
399 |
-
// Confine focus to the modal
|
400 |
-
// Uses event capturing that is not supported in IE8-
|
401 |
-
if (document.addEventListener) {
|
402 |
-
|
403 |
-
document.addEventListener('focus', trapFocus, true);
|
404 |
-
|
405 |
-
$events.one(event_closed, function () {
|
406 |
-
document.removeEventListener('focus', trapFocus, true);
|
407 |
-
});
|
408 |
-
}
|
409 |
-
}
|
410 |
-
|
411 |
-
// Return focus on closing
|
412 |
-
if (settings.returnFocus) {
|
413 |
-
$events.one(event_closed, function () {
|
414 |
-
$(element).focus();
|
415 |
-
});
|
416 |
-
}
|
417 |
-
}
|
418 |
-
load();
|
419 |
-
}
|
420 |
-
}
|
421 |
-
|
422 |
-
// Colorbox's markup needs to be added to the DOM prior to being called
|
423 |
-
// so that the browser will go ahead and load the CSS background images.
|
424 |
-
function appendHTML() {
|
425 |
-
if (!$box && document.body) {
|
426 |
-
init = false;
|
427 |
-
$window = $(window);
|
428 |
-
$box = $tag(div).attr({
|
429 |
-
id: colorbox,
|
430 |
-
'class': $.support.opacity === false ? prefix + 'IE' : '', // class for optional IE8 & lower targeted CSS.
|
431 |
-
role: 'dialog',
|
432 |
-
tabindex: '-1'
|
433 |
-
}).hide();
|
434 |
-
$overlay = $tag(div, "Overlay").hide();
|
435 |
-
$loadingOverlay = $([$tag(div, "LoadingOverlay")[0],$tag(div, "LoadingGraphic")[0]]);
|
436 |
-
$wrap = $tag(div, "Wrapper");
|
437 |
-
$content = $tag(div, "Content").append(
|
438 |
-
$title = $tag(div, "Title"),
|
439 |
-
$current = $tag(div, "Current"),
|
440 |
-
$prev = $('<button type="button"/>').attr({id:prefix+'Previous'}),
|
441 |
-
$next = $('<button type="button"/>').attr({id:prefix+'Next'}),
|
442 |
-
$slideshow = $tag('button', "Slideshow"),
|
443 |
-
$loadingOverlay
|
444 |
-
);
|
445 |
-
|
446 |
-
$close = $('<button type="button"/>').attr({id:prefix+'Close'});
|
447 |
-
|
448 |
-
$wrap.append( // The 3x3 Grid that makes up Colorbox
|
449 |
-
$tag(div).append(
|
450 |
-
$tag(div, "TopLeft"),
|
451 |
-
$topBorder = $tag(div, "TopCenter"),
|
452 |
-
$tag(div, "TopRight")
|
453 |
-
),
|
454 |
-
$tag(div, false, 'clear:left').append(
|
455 |
-
$leftBorder = $tag(div, "MiddleLeft"),
|
456 |
-
$content,
|
457 |
-
$rightBorder = $tag(div, "MiddleRight")
|
458 |
-
),
|
459 |
-
$tag(div, false, 'clear:left').append(
|
460 |
-
$tag(div, "BottomLeft"),
|
461 |
-
$bottomBorder = $tag(div, "BottomCenter"),
|
462 |
-
$tag(div, "BottomRight")
|
463 |
-
)
|
464 |
-
).find('div div').css({'float': 'left'});
|
465 |
-
|
466 |
-
$loadingBay = $tag(div, false, 'position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;');
|
467 |
-
|
468 |
-
$groupControls = $next.add($prev).add($current).add($slideshow);
|
469 |
-
|
470 |
-
$(document.body).append($overlay, $box.append($wrap, $loadingBay));
|
471 |
-
}
|
472 |
-
}
|
473 |
-
|
474 |
-
// Add Colorbox's event bindings
|
475 |
-
function addBindings() {
|
476 |
-
function clickHandler(e) {
|
477 |
-
// ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt.
|
478 |
-
// See: http://jacklmoore.com/notes/click-events/
|
479 |
-
if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey || e.ctrlKey)) {
|
480 |
-
e.preventDefault();
|
481 |
-
launch(this);
|
482 |
-
}
|
483 |
-
}
|
484 |
-
|
485 |
-
if ($box) {
|
486 |
-
if (!init) {
|
487 |
-
init = true;
|
488 |
-
|
489 |
-
// Anonymous functions here keep the public method from being cached, thereby allowing them to be redefined on the fly.
|
490 |
-
$next.click(function () {
|
491 |
-
publicMethod.next();
|
492 |
-
});
|
493 |
-
$prev.click(function () {
|
494 |
-
publicMethod.prev();
|
495 |
-
});
|
496 |
-
$close.click(function () {
|
497 |
-
publicMethod.close();
|
498 |
-
});
|
499 |
-
$overlay.click(function () {
|
500 |
-
if (settings.overlayClose) {
|
501 |
-
publicMethod.close();
|
502 |
-
}
|
503 |
-
});
|
504 |
-
|
505 |
-
// Key Bindings
|
506 |
-
$(document).bind('keydown.' + prefix, function (e) {
|
507 |
-
var key = e.keyCode;
|
508 |
-
if (open && settings.escKey && key === 27) {
|
509 |
-
e.preventDefault();
|
510 |
-
publicMethod.close();
|
511 |
-
}
|
512 |
-
if (open && settings.arrowKey && $related[1] && !e.altKey) {
|
513 |
-
if (key === 37) {
|
514 |
-
e.preventDefault();
|
515 |
-
$prev.click();
|
516 |
-
} else if (key === 39) {
|
517 |
-
e.preventDefault();
|
518 |
-
$next.click();
|
519 |
-
}
|
520 |
-
}
|
521 |
-
});
|
522 |
-
|
523 |
-
if ($.isFunction($.fn.on)) {
|
524 |
-
// For jQuery 1.7+
|
525 |
-
$(document).on('click.'+prefix, '.'+boxElement, clickHandler);
|
526 |
-
} else {
|
527 |
-
// For jQuery 1.3.x -> 1.6.x
|
528 |
-
// This code is never reached in jQuery 1.9, so do not contact me about 'live' being removed.
|
529 |
-
// This is not here for jQuery 1.9, it's here for legacy users.
|
530 |
-
$('.'+boxElement).live('click.'+prefix, clickHandler);
|
531 |
-
}
|
532 |
-
}
|
533 |
-
return true;
|
534 |
-
}
|
535 |
-
return false;
|
536 |
-
}
|
537 |
-
|
538 |
-
// Don't do anything if Colorbox already exists.
|
539 |
-
if ($.colorbox) {
|
540 |
-
return;
|
541 |
-
}
|
542 |
-
|
543 |
-
// Append the HTML when the DOM loads
|
544 |
-
$(appendHTML);
|
545 |
-
|
546 |
-
|
547 |
-
// ****************
|
548 |
-
// PUBLIC FUNCTIONS
|
549 |
-
// Usage format: $.colorbox.close();
|
550 |
-
// Usage from within an iframe: parent.jQuery.colorbox.close();
|
551 |
-
// ****************
|
552 |
-
|
553 |
-
publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) {
|
554 |
-
var $this = this;
|
555 |
-
|
556 |
-
options = options || {};
|
557 |
-
|
558 |
-
appendHTML();
|
559 |
-
|
560 |
-
if (addBindings()) {
|
561 |
-
if ($.isFunction($this)) { // assume a call to $.colorbox
|
562 |
-
$this = $('<a/>');
|
563 |
-
options.open = true;
|
564 |
-
} else if (!$this[0]) { // colorbox being applied to empty collection
|
565 |
-
return $this;
|
566 |
-
}
|
567 |
-
|
568 |
-
if (callback) {
|
569 |
-
options.onComplete = callback;
|
570 |
-
}
|
571 |
-
|
572 |
-
$this.each(function () {
|
573 |
-
$.data(this, colorbox, $.extend({}, $.data(this, colorbox) || defaults, options));
|
574 |
-
}).addClass(boxElement);
|
575 |
-
|
576 |
-
if (($.isFunction(options.open) && options.open.call($this)) || options.open) {
|
577 |
-
launch($this[0]);
|
578 |
-
}
|
579 |
-
}
|
580 |
-
|
581 |
-
return $this;
|
582 |
-
};
|
583 |
-
|
584 |
-
publicMethod.position = function (speed, loadedCallback) {
|
585 |
-
var
|
586 |
-
css,
|
587 |
-
top = 0,
|
588 |
-
left = 0,
|
589 |
-
offset = $box.offset(),
|
590 |
-
scrollTop,
|
591 |
-
scrollLeft;
|
592 |
-
|
593 |
-
$window.unbind('resize.' + prefix);
|
594 |
-
|
595 |
-
// remove the modal so that it doesn't influence the document width/height
|
596 |
-
$box.css({top: -9e4, left: -9e4});
|
597 |
-
|
598 |
-
scrollTop = $window.scrollTop();
|
599 |
-
scrollLeft = $window.scrollLeft();
|
600 |
-
|
601 |
-
if (settings.fixed) {
|
602 |
-
offset.top -= scrollTop;
|
603 |
-
offset.left -= scrollLeft;
|
604 |
-
$box.css({position: 'fixed'});
|
605 |
-
} else {
|
606 |
-
top = scrollTop;
|
607 |
-
left = scrollLeft;
|
608 |
-
$box.css({position: 'absolute'});
|
609 |
-
}
|
610 |
-
|
611 |
-
// keeps the top and left positions within the browser's viewport.
|
612 |
-
if (settings.right !== false) {
|
613 |
-
left += Math.max($window.width() - settings.w - loadedWidth - interfaceWidth - setSize(settings.right, 'x'), 0);
|
614 |
-
} else if (settings.left !== false) {
|
615 |
-
left += setSize(settings.left, 'x');
|
616 |
-
} else {
|
617 |
-
left += Math.round(Math.max($window.width() - settings.w - loadedWidth - interfaceWidth, 0) / 2);
|
618 |
-
}
|
619 |
-
|
620 |
-
if (settings.bottom !== false) {
|
621 |
-
top += Math.max(winheight() - settings.h - loadedHeight - interfaceHeight - setSize(settings.bottom, 'y'), 0);
|
622 |
-
} else if (settings.top !== false) {
|
623 |
-
top += setSize(settings.top, 'y');
|
624 |
-
} else {
|
625 |
-
top += Math.round(Math.max(winheight() - settings.h - loadedHeight - interfaceHeight, 0) / 2);
|
626 |
-
}
|
627 |
-
|
628 |
-
$box.css({top: offset.top, left: offset.left, visibility:'visible'});
|
629 |
-
|
630 |
-
// this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly,
|
631 |
-
// but it has to be shrank down around the size of div#colorbox when it's done. If not,
|
632 |
-
// it can invoke an obscure IE bug when using iframes.
|
633 |
-
$wrap[0].style.width = $wrap[0].style.height = "9999px";
|
634 |
-
|
635 |
-
function modalDimensions() {
|
636 |
-
$topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = (parseInt($box[0].style.width,10) - interfaceWidth)+'px';
|
637 |
-
$content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = (parseInt($box[0].style.height,10) - interfaceHeight)+'px';
|
638 |
-
}
|
639 |
-
|
640 |
-
css = {width: settings.w + loadedWidth + interfaceWidth, height: settings.h + loadedHeight + interfaceHeight, top: top, left: left};
|
641 |
-
|
642 |
-
// setting the speed to 0 if the content hasn't changed size or position
|
643 |
-
if (speed) {
|
644 |
-
var tempSpeed = 0;
|
645 |
-
$.each(css, function(i){
|
646 |
-
if (css[i] !== previousCSS[i]) {
|
647 |
-
tempSpeed = speed;
|
648 |
-
return;
|
649 |
-
}
|
650 |
-
});
|
651 |
-
speed = tempSpeed;
|
652 |
-
}
|
653 |
-
|
654 |
-
previousCSS = css;
|
655 |
-
|
656 |
-
if (!speed) {
|
657 |
-
$box.css(css);
|
658 |
-
}
|
659 |
-
|
660 |
-
$box.dequeue().animate(css, {
|
661 |
-
duration: speed || 0,
|
662 |
-
complete: function () {
|
663 |
-
modalDimensions();
|
664 |
-
|
665 |
-
active = false;
|
666 |
-
|
667 |
-
// shrink the wrapper down to exactly the size of colorbox to avoid a bug in IE's iframe implementation.
|
668 |
-
$wrap[0].style.width = (settings.w + loadedWidth + interfaceWidth) + "px";
|
669 |
-
$wrap[0].style.height = (settings.h + loadedHeight + interfaceHeight) + "px";
|
670 |
-
|
671 |
-
if (settings.reposition) {
|
672 |
-
setTimeout(function () { // small delay before binding onresize due to an IE8 bug.
|
673 |
-
$window.bind('resize.' + prefix, function(){
|
674 |
-
publicMethod.position();
|
675 |
-
});
|
676 |
-
}, 1);
|
677 |
-
}
|
678 |
-
|
679 |
-
if ($.isFunction(loadedCallback)) {
|
680 |
-
loadedCallback();
|
681 |
-
}
|
682 |
-
},
|
683 |
-
step: modalDimensions
|
684 |
-
});
|
685 |
-
};
|
686 |
-
|
687 |
-
publicMethod.resize = function (options) {
|
688 |
-
var scrolltop;
|
689 |
-
|
690 |
-
if (open) {
|
691 |
-
options = options || {};
|
692 |
-
|
693 |
-
if (options.width) {
|
694 |
-
settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth;
|
695 |
-
}
|
696 |
-
|
697 |
-
if (options.innerWidth) {
|
698 |
-
settings.w = setSize(options.innerWidth, 'x');
|
699 |
-
}
|
700 |
-
|
701 |
-
$loaded.css({width: settings.w});
|
702 |
-
|
703 |
-
if (options.height) {
|
704 |
-
settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight;
|
705 |
-
}
|
706 |
-
|
707 |
-
if (options.innerHeight) {
|
708 |
-
settings.h = setSize(options.innerHeight, 'y');
|
709 |
-
}
|
710 |
-
|
711 |
-
if (!options.innerHeight && !options.height) {
|
712 |
-
scrolltop = $loaded.scrollTop();
|
713 |
-
$loaded.css({height: "auto"});
|
714 |
-
settings.h = $loaded.height();
|
715 |
-
}
|
716 |
-
|
717 |
-
$loaded.css({height: settings.h});
|
718 |
-
|
719 |
-
if(scrolltop) {
|
720 |
-
$loaded.scrollTop(scrolltop);
|
721 |
-
}
|
722 |
-
|
723 |
-
publicMethod.position(settings.transition === "none" ? 0 : settings.speed);
|
724 |
-
}
|
725 |
-
};
|
726 |
-
|
727 |
-
publicMethod.prep = function (object) {
|
728 |
-
if (!open) {
|
729 |
-
return;
|
730 |
-
}
|
731 |
-
|
732 |
-
var callback, speed = settings.transition === "none" ? 0 : settings.speed;
|
733 |
-
|
734 |
-
$loaded.empty().remove(); // Using empty first may prevent some IE7 issues.
|
735 |
-
|
736 |
-
$loaded = $tag(div, 'LoadedContent').append(object);
|
737 |
-
|
738 |
-
function getWidth() {
|
739 |
-
settings.w = settings.w || $loaded.width();
|
740 |
-
settings.w = settings.mw && settings.mw < settings.w ? settings.mw : settings.w;
|
741 |
-
return settings.w;
|
742 |
-
}
|
743 |
-
function getHeight() {
|
744 |
-
settings.h = settings.h || $loaded.height();
|
745 |
-
settings.h = settings.mh && settings.mh < settings.h ? settings.mh : settings.h;
|
746 |
-
return settings.h;
|
747 |
-
}
|
748 |
-
|
749 |
-
$loaded.hide()
|
750 |
-
.appendTo($loadingBay.show())// content has to be appended to the DOM for accurate size calculations.
|
751 |
-
.css({width: getWidth(), overflow: settings.scrolling ? 'auto' : 'hidden'})
|
752 |
-
.css({height: getHeight()})// sets the height independently from the width in case the new width influences the value of height.
|
753 |
-
.prependTo($content);
|
754 |
-
|
755 |
-
$loadingBay.hide();
|
756 |
-
|
757 |
-
// floating the IMG removes the bottom line-height and fixed a problem where IE miscalculates the width of the parent element as 100% of the document width.
|
758 |
-
|
759 |
-
$(photo).css({'float': 'none'});
|
760 |
-
|
761 |
-
callback = function () {
|
762 |
-
var total = $related.length,
|
763 |
-
iframe,
|
764 |
-
frameBorder = 'frameBorder',
|
765 |
-
allowTransparency = 'allowTransparency',
|
766 |
-
complete;
|
767 |
-
|
768 |
-
if (!open) {
|
769 |
-
return;
|
770 |
-
}
|
771 |
-
|
772 |
-
function removeFilter() { // Needed for IE7 & IE8 in versions of jQuery prior to 1.7.2
|
773 |
-
if ($.support.opacity === false) {
|
774 |
-
$box[0].style.removeAttribute('filter');
|
775 |
-
}
|
776 |
-
}
|
777 |
-
|
778 |
-
complete = function () {
|
779 |
-
clearTimeout(loadingTimer);
|
780 |
-
$loadingOverlay.hide();
|
781 |
-
trigger(event_complete, settings.onComplete);
|
782 |
-
};
|
783 |
-
|
784 |
-
|
785 |
-
$title.html(settings.title).add($loaded).show();
|
786 |
-
|
787 |
-
if (total > 1) { // handle grouping
|
788 |
-
if (typeof settings.current === "string") {
|
789 |
-
$current.html(settings.current.replace('{current}', index + 1).replace('{total}', total)).show();
|
790 |
-
}
|
791 |
-
|
792 |
-
$next[(settings.loop || index < total - 1) ? "show" : "hide"]().html(settings.next);
|
793 |
-
$prev[(settings.loop || index) ? "show" : "hide"]().html(settings.previous);
|
794 |
-
|
795 |
-
slideshow();
|
796 |
-
|
797 |
-
// Preloads images within a rel group
|
798 |
-
if (settings.preloading) {
|
799 |
-
$.each([getIndex(-1), getIndex(1)], function(){
|
800 |
-
var src,
|
801 |
-
img,
|
802 |
-
i = $related[this],
|
803 |
-
data = $.data(i, colorbox);
|
804 |
-
|
805 |
-
if (data && data.href) {
|
806 |
-
src = data.href;
|
807 |
-
if ($.isFunction(src)) {
|
808 |
-
src = src.call(i);
|
809 |
-
}
|
810 |
-
} else {
|
811 |
-
src = $(i).attr('href');
|
812 |
-
}
|
813 |
-
|
814 |
-
if (src && isImage(data, src)) {
|
815 |
-
src = retinaUrl(data, src);
|
816 |
-
img = document.createElement('img');
|
817 |
-
img.src = src;
|
818 |
-
}
|
819 |
-
});
|
820 |
-
}
|
821 |
-
} else {
|
822 |
-
$groupControls.hide();
|
823 |
-
}
|
824 |
-
|
825 |
-
if (settings.iframe) {
|
826 |
-
iframe = $tag('iframe')[0];
|
827 |
-
|
828 |
-
if (frameBorder in iframe) {
|
829 |
-
iframe[frameBorder] = 0;
|
830 |
-
}
|
831 |
-
|
832 |
-
if (allowTransparency in iframe) {
|
833 |
-
iframe[allowTransparency] = "true";
|
834 |
-
}
|
835 |
-
|
836 |
-
if (!settings.scrolling) {
|
837 |
-
iframe.scrolling = "no";
|
838 |
-
}
|
839 |
-
|
840 |
-
$(iframe)
|
841 |
-
.attr({
|
842 |
-
src: settings.href,
|
843 |
-
name: (new Date()).getTime(), // give the iframe a unique name to prevent caching
|
844 |
-
'class': prefix + 'Iframe',
|
845 |
-
allowFullScreen : true, // allow HTML5 video to go fullscreen
|
846 |
-
webkitAllowFullScreen : true,
|
847 |
-
mozallowfullscreen : true
|
848 |
-
})
|
849 |
-
.one('load', complete)
|
850 |
-
.appendTo($loaded);
|
851 |
-
|
852 |
-
$events.one(event_purge, function () {
|
853 |
-
iframe.src = "//about:blank";
|
854 |
-
});
|
855 |
-
|
856 |
-
if (settings.fastIframe) {
|
857 |
-
$(iframe).trigger('load');
|
858 |
-
}
|
859 |
-
} else {
|
860 |
-
complete();
|
861 |
-
}
|
862 |
-
|
863 |
-
if (settings.transition === 'fade') {
|
864 |
-
$box.fadeTo(speed, 1, removeFilter);
|
865 |
-
} else {
|
866 |
-
removeFilter();
|
867 |
-
}
|
868 |
-
};
|
869 |
-
|
870 |
-
if (settings.transition === 'fade') {
|
871 |
-
$box.fadeTo(speed, 0, function () {
|
872 |
-
publicMethod.position(0, callback);
|
873 |
-
});
|
874 |
-
} else {
|
875 |
-
publicMethod.position(speed, callback);
|
876 |
-
}
|
877 |
-
};
|
878 |
-
|
879 |
-
function load () {
|
880 |
-
var href, setResize, prep = publicMethod.prep, $inline, request = ++requests;
|
881 |
-
|
882 |
-
active = true;
|
883 |
-
|
884 |
-
photo = false;
|
885 |
-
|
886 |
-
element = $related[index];
|
887 |
-
|
888 |
-
makeSettings();
|
889 |
-
|
890 |
-
trigger(event_purge);
|
891 |
-
|
892 |
-
trigger(event_load, settings.onLoad);
|
893 |
-
|
894 |
-
settings.h = settings.height ?
|
895 |
-
setSize(settings.height, 'y') - loadedHeight - interfaceHeight :
|
896 |
-
settings.innerHeight && setSize(settings.innerHeight, 'y');
|
897 |
-
|
898 |
-
settings.w = settings.width ?
|
899 |
-
setSize(settings.width, 'x') - loadedWidth - interfaceWidth :
|
900 |
-
settings.innerWidth && setSize(settings.innerWidth, 'x');
|
901 |
-
|
902 |
-
// Sets the minimum dimensions for use in image scaling
|
903 |
-
settings.mw = settings.w;
|
904 |
-
settings.mh = settings.h;
|
905 |
-
|
906 |
-
// Re-evaluate the minimum width and height based on maxWidth and maxHeight values.
|
907 |
-
// If the width or height exceed the maxWidth or maxHeight, use the maximum values instead.
|
908 |
-
if (settings.maxWidth) {
|
909 |
-
settings.mw = setSize(settings.maxWidth, 'x') - loadedWidth - interfaceWidth;
|
910 |
-
settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw;
|
911 |
-
}
|
912 |
-
if (settings.maxHeight) {
|
913 |
-
settings.mh = setSize(settings.maxHeight, 'y') - loadedHeight - interfaceHeight;
|
914 |
-
settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh;
|
915 |
-
}
|
916 |
-
|
917 |
-
href = settings.href;
|
918 |
-
|
919 |
-
loadingTimer = setTimeout(function () {
|
920 |
-
$loadingOverlay.show();
|
921 |
-
}, 100);
|
922 |
-
|
923 |
-
if (settings.inline) {
|
924 |
-
// Inserts an empty placeholder where inline content is being pulled from.
|
925 |
-
// An event is bound to put inline content back when Colorbox closes or loads new content.
|
926 |
-
$inline = $tag(div).hide().insertBefore($(href)[0]);
|
927 |
-
|
928 |
-
$events.one(event_purge, function () {
|
929 |
-
$inline.replaceWith($loaded.children());
|
930 |
-
});
|
931 |
-
|
932 |
-
prep($(href));
|
933 |
-
} else if (settings.iframe) {
|
934 |
-
// IFrame element won't be added to the DOM until it is ready to be displayed,
|
935 |
-
// to avoid problems with DOM-ready JS that might be trying to run in that iframe.
|
936 |
-
prep(" ");
|
937 |
-
} else if (settings.html) {
|
938 |
-
prep(settings.html);
|
939 |
-
} else if (isImage(settings, href)) {
|
940 |
-
|
941 |
-
href = retinaUrl(settings, href);
|
942 |
-
|
943 |
-
photo = document.createElement('img');
|
944 |
-
|
945 |
-
$(photo)
|
946 |
-
.addClass(prefix + 'Photo')
|
947 |
-
.bind('error',function () {
|
948 |
-
settings.title = false;
|
949 |
-
prep($tag(div, 'Error').html(settings.imgError));
|
950 |
-
})
|
951 |
-
.one('load', function () {
|
952 |
-
var percent;
|
953 |
-
|
954 |
-
if (request !== requests) {
|
955 |
-
return;
|
956 |
-
}
|
957 |
-
|
958 |
-
$.each(['alt', 'longdesc', 'aria-describedby'], function(i,val){
|
959 |
-
var attr = $(element).attr(val) || $(element).attr('data-'+val);
|
960 |
-
if (attr) {
|
961 |
-
photo.setAttribute(val, attr);
|
962 |
-
}
|
963 |
-
});
|
964 |
-
|
965 |
-
if (settings.retinaImage && window.devicePixelRatio > 1) {
|
966 |
-
photo.height = photo.height / window.devicePixelRatio;
|
967 |
-
photo.width = photo.width / window.devicePixelRatio;
|
968 |
-
}
|
969 |
-
|
970 |
-
if (settings.scalePhotos) {
|
971 |
-
setResize = function () {
|
972 |
-
photo.height -= photo.height * percent;
|
973 |
-
photo.width -= photo.width * percent;
|
974 |
-
};
|
975 |
-
if (settings.mw && photo.width > settings.mw) {
|
976 |
-
percent = (photo.width - settings.mw) / photo.width;
|
977 |
-
setResize();
|
978 |
-
}
|
979 |
-
if (settings.mh && photo.height > settings.mh) {
|
980 |
-
percent = (photo.height - settings.mh) / photo.height;
|
981 |
-
setResize();
|
982 |
-
}
|
983 |
-
}
|
984 |
-
|
985 |
-
if (settings.h) {
|
986 |
-
photo.style.marginTop = Math.max(settings.mh - photo.height, 0) / 2 + 'px';
|
987 |
-
}
|
988 |
-
|
989 |
-
if ($related[1] && (settings.loop || $related[index + 1])) {
|
990 |
-
photo.style.cursor = 'pointer';
|
991 |
-
photo.onclick = function () {
|
992 |
-
publicMethod.next();
|
993 |
-
};
|
994 |
-
}
|
995 |
-
|
996 |
-
photo.style.width = photo.width + 'px';
|
997 |
-
photo.style.height = photo.height + 'px';
|
998 |
-
|
999 |
-
setTimeout(function () { // A pause because Chrome will sometimes report a 0 by 0 size otherwise.
|
1000 |
-
prep(photo);
|
1001 |
-
}, 1);
|
1002 |
-
});
|
1003 |
-
|
1004 |
-
setTimeout(function () { // A pause because Opera 10.6+ will sometimes not run the onload function otherwise.
|
1005 |
-
photo.src = href;
|
1006 |
-
}, 1);
|
1007 |
-
} else if (href) {
|
1008 |
-
$loadingBay.load(href, settings.data, function (data, status) {
|
1009 |
-
if (request === requests) {
|
1010 |
-
prep(status === 'error' ? $tag(div, 'Error').html(settings.xhrError) : $(this).contents());
|
1011 |
-
}
|
1012 |
-
});
|
1013 |
-
}
|
1014 |
-
}
|
1015 |
-
|
1016 |
-
// Navigates to the next page/image in a set.
|
1017 |
-
publicMethod.next = function () {
|
1018 |
-
if (!active && $related[1] && (settings.loop || $related[index + 1])) {
|
1019 |
-
index = getIndex(1);
|
1020 |
-
launch($related[index]);
|
1021 |
-
}
|
1022 |
-
};
|
1023 |
-
|
1024 |
-
publicMethod.prev = function () {
|
1025 |
-
if (!active && $related[1] && (settings.loop || index)) {
|
1026 |
-
index = getIndex(-1);
|
1027 |
-
launch($related[index]);
|
1028 |
-
}
|
1029 |
-
};
|
1030 |
-
|
1031 |
-
// Note: to use this within an iframe use the following format: parent.jQuery.colorbox.close();
|
1032 |
-
publicMethod.close = function () {
|
1033 |
-
if (open && !closing) {
|
1034 |
-
|
1035 |
-
closing = true;
|
1036 |
-
|
1037 |
-
open = false;
|
1038 |
-
|
1039 |
-
trigger(event_cleanup, settings.onCleanup);
|
1040 |
-
|
1041 |
-
$window.unbind('.' + prefix);
|
1042 |
-
|
1043 |
-
$overlay.fadeTo(settings.fadeOut || 0, 0);
|
1044 |
-
|
1045 |
-
$box.stop().fadeTo(settings.fadeOut || 0, 0, function () {
|
1046 |
-
|
1047 |
-
$box.add($overlay).css({'opacity': 1, cursor: 'auto'}).hide();
|
1048 |
-
|
1049 |
-
trigger(event_purge);
|
1050 |
-
|
1051 |
-
$loaded.empty().remove(); // Using empty first may prevent some IE7 issues.
|
1052 |
-
|
1053 |
-
setTimeout(function () {
|
1054 |
-
closing = false;
|
1055 |
-
trigger(event_closed, settings.onClosed);
|
1056 |
-
}, 1);
|
1057 |
-
});
|
1058 |
-
}
|
1059 |
-
};
|
1060 |
-
|
1061 |
-
// Removes changes Colorbox made to the document, but does not remove the plugin.
|
1062 |
-
publicMethod.remove = function () {
|
1063 |
-
if (!$box) { return; }
|
1064 |
-
|
1065 |
-
$box.stop();
|
1066 |
-
$.colorbox.close();
|
1067 |
-
$box.stop().remove();
|
1068 |
-
$overlay.remove();
|
1069 |
-
closing = false;
|
1070 |
-
$box = null;
|
1071 |
-
$('.' + boxElement)
|
1072 |
-
.removeData(colorbox)
|
1073 |
-
.removeClass(boxElement);
|
1074 |
-
|
1075 |
-
$(document).unbind('click.'+prefix);
|
1076 |
-
};
|
1077 |
-
|
1078 |
-
// A method for fetching the current element Colorbox is referencing.
|
1079 |
-
// returns a jQuery object.
|
1080 |
-
publicMethod.element = function () {
|
1081 |
-
return $(element);
|
1082 |
-
};
|
1083 |
-
|
1084 |
-
publicMethod.settings = defaults;
|
1085 |
-
|
1086 |
-
}(jQuery, document, window));
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
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â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
views/default/js/gallery.js
CHANGED
@@ -49,7 +49,7 @@ TINY.slideshow.prototype={
|
|
49 |
Â
g.style.marginRight=this.spacing+'px';
|
50 |
Â
w+=this.spacing
|
51 |
Â
}
|
52 |
-
this.p.style.width=w+'px';
|
53 |
Â
g.style.opacity=this.thumbOpacity/100;
|
54 |
Â
g.style.filter='alpha(opacity='+this.thumbOpacity+')';
|
55 |
Â
g.onmouseover=new Function('TINY.alpha.set(this,100,5)');
|
@@ -60,6 +60,7 @@ TINY.slideshow.prototype={
|
|
60 |
Â
if(b&&f){
|
61 |
Â
b=tid(b);
|
62 |
Â
f=tid(f);
|
Â
|
|
63 |
Â
b.style.opacity=f.style.opacity=this.navOpacity/100;
|
64 |
Â
b.style.filter=f.style.filter='alpha(opacity='+this.navOpacity+')';
|
65 |
Â
b.onmouseover=f.onmouseover=new Function('TINY.alpha.set(this,'+this.navHover+',5)');
|
@@ -94,8 +95,6 @@ TINY.slideshow.prototype={
|
|
94 |
Â
|
95 |
Â
var i=new Image();
|
96 |
Â
if (this.effect == "fade") {
|
97 |
-
//i.style.opacity=0;
|
98 |
-
//i.style.filter='alpha(opacity=0)';
|
99 |
Â
i.style.display = 'none';
|
100 |
Â
}
|
101 |
Â
|
@@ -184,6 +183,14 @@ TINY.slideshow.prototype={
|
|
184 |
Â
easing: this.easing
|
185 |
Â
});
|
186 |
Â
},
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
187 |
Â
le:function(s,c){
|
188 |
Â
this.f.appendChild(this.i);
|
189 |
Â
var w=this.o-parseInt(this.i.offsetWidth);
|
@@ -192,14 +199,20 @@ TINY.slideshow.prototype={
|
|
192 |
Â
}
|
193 |
Â
|
194 |
Â
var m= tag('img',this.f);
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
203 |
Â
|
204 |
Â
var n=new Function(this.n+'.nf('+s+')');
|
205 |
Â
this.lt=setTimeout(n,this.imgSpeed*100);
|
@@ -208,7 +221,14 @@ TINY.slideshow.prototype={
|
|
208 |
Â
}
|
209 |
Â
|
210 |
Â
if (this.autoheight == true) {
|
211 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
212 |
Â
}
|
213 |
Â
|
214 |
Â
if(this.a[s].l != ""){
|
@@ -218,10 +238,9 @@ TINY.slideshow.prototype={
|
|
218 |
Â
var unique= jQuery(this.s).attr('id');
|
219 |
Â
|
220 |
Â
if (this.imagesthickbox == "true" && (urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp')) {
|
221 |
-
//this.q.onclick = new Function('jQuery.colorbox({href:"' + this.a[s].l + '",maxWidth:"90%",maxHeight:"90%",title:"' + this.a[s].t + '"})');
|
222 |
Â
this.q.onmouseover = new Function('this.className="' + this.linkclass + '"; this.href = "' + this.a[s].l + '";');
|
223 |
Â
var uniqueimglinkid = jQuery('a[href="' + this.a[s].l + '"]').attr('id');
|
224 |
-
this.q.onclick = new Function('jQuery(".colorbox' + unique + '").colorbox({rel:
|
225 |
Â
} else {
|
226 |
Â
this.q.onmouseover = new Function('this.className="' + this.linkclass + '";');
|
227 |
Â
this.q.onclick = new Function('window.open("' + this.a[s].l + '","' + this.a[s].tg + '"); return false;');
|
@@ -247,11 +266,61 @@ TINY.slideshow.prototype={
|
|
247 |
Â
var h=parseInt(this.r.offsetHeight);
|
248 |
Â
this.r.style.height=0;
|
249 |
Â
|
250 |
-
if (s.t.length > 0 || s.d.length > 0) {
|
251 |
-
|
252 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
253 |
Â
}
|
254 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
255 |
Â
}
|
256 |
Â
};
|
257 |
Â
|
49 |
Â
g.style.marginRight=this.spacing+'px';
|
50 |
Â
w+=this.spacing
|
51 |
Â
}
|
52 |
+
this.p.style.width=w+'px';
|
53 |
Â
g.style.opacity=this.thumbOpacity/100;
|
54 |
Â
g.style.filter='alpha(opacity='+this.thumbOpacity+')';
|
55 |
Â
g.onmouseover=new Function('TINY.alpha.set(this,100,5)');
|
60 |
Â
if(b&&f){
|
61 |
Â
b=tid(b);
|
62 |
Â
f=tid(f);
|
63 |
+
b.style.display=f.style.display='block';
|
64 |
Â
b.style.opacity=f.style.opacity=this.navOpacity/100;
|
65 |
Â
b.style.filter=f.style.filter='alpha(opacity='+this.navOpacity+')';
|
66 |
Â
b.onmouseover=f.onmouseover=new Function('TINY.alpha.set(this,'+this.navHover+',5)');
|
95 |
Â
|
96 |
Â
var i=new Image();
|
97 |
Â
if (this.effect == "fade") {
|
Â
|
|
Â
|
|
98 |
Â
i.style.display = 'none';
|
99 |
Â
}
|
100 |
Â
|
183 |
Â
easing: this.easing
|
184 |
Â
});
|
185 |
Â
},
|
186 |
+
eff:function(oi, i) {
|
187 |
+
speed = (this.imgSpeed * 100);
|
188 |
+
|
189 |
+
jQuery(oi).fadeOut({duration:speed, easing:this.easing});
|
190 |
+
|
191 |
+
var options = {easing:this.easing};
|
192 |
+
jQuery(i).show(this.effect, options, speed);
|
193 |
+
},
|
194 |
Â
le:function(s,c){
|
195 |
Â
this.f.appendChild(this.i);
|
196 |
Â
var w=this.o-parseInt(this.i.offsetWidth);
|
199 |
Â
}
|
200 |
Â
|
201 |
Â
var m= tag('img',this.f);
|
202 |
+
var oi = m[(m.length - 2)];
|
203 |
+
|
204 |
+
if (typeof(oi) == "undefined" || oi.src != this.i.src) {
|
205 |
+
if (this.effect == "fade") {
|
206 |
+
this.oi(m[(m.length - 2)], this.i);
|
207 |
+
} else if (this.effect == "slide") {
|
208 |
+
if (m.length > 1) {
|
209 |
+
this.mi(m[(m.length - 2)], this.i);
|
210 |
+
}
|
211 |
+
} else {
|
212 |
+
this.i.style.display = 'none';
|
213 |
+
this.eff(m[(m.length - 2)], this.i);
|
214 |
+
}
|
215 |
+
}
|
216 |
Â
|
217 |
Â
var n=new Function(this.n+'.nf('+s+')');
|
218 |
Â
this.lt=setTimeout(n,this.imgSpeed*100);
|
221 |
Â
}
|
222 |
Â
|
223 |
Â
if (this.autoheight == true) {
|
224 |
+
var autoheight = jQuery(this.i).height();
|
225 |
+
|
226 |
+
if (typeof(this.autoheight_max) !== "undefined" && this.autoheight_max != false) {
|
227 |
+
if (autoheight > this.autoheight_max) {
|
228 |
+
autoheight = this.autoheight_max;
|
229 |
+
}
|
230 |
+
}
|
231 |
+
TINY.height.set(this.f.parentNode,(autoheight),this.infoSpeed/2,-1);
|
232 |
Â
}
|
233 |
Â
|
234 |
Â
if(this.a[s].l != ""){
|
238 |
Â
var unique= jQuery(this.s).attr('id');
|
239 |
Â
|
240 |
Â
if (this.imagesthickbox == "true" && (urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp')) {
|
Â
|
|
241 |
Â
this.q.onmouseover = new Function('this.className="' + this.linkclass + '"; this.href = "' + this.a[s].l + '";');
|
242 |
Â
var uniqueimglinkid = jQuery('a[href="' + this.a[s].l + '"]').attr('id');
|
243 |
+
this.q.onclick = new Function('jQuery(".colorbox' + unique + '").colorbox({rel:' + jQuery(this).data('rel') + ', maxWidth:"90%", maxHeight:"90%"}); jQuery("#' + uniqueimglinkid + '").click(); return false;');
|
244 |
Â
} else {
|
245 |
Â
this.q.onmouseover = new Function('this.className="' + this.linkclass + '";');
|
246 |
Â
this.q.onclick = new Function('window.open("' + this.a[s].l + '","' + this.a[s].tg + '"); return false;');
|
266 |
Â
var h=parseInt(this.r.offsetHeight);
|
267 |
Â
this.r.style.height=0;
|
268 |
Â
|
269 |
+
if (s.t.length > 0 || s.d.length > 0) {
|
270 |
+
var _this = this;
|
271 |
+
|
272 |
+
setTimeout(function() {
|
273 |
+
TINY.height.set(_this.r,h,_this.infoSpeed,0);
|
274 |
+
TINY.alpha.set(_this.r,s.io,5);
|
275 |
+
}, (this.infodelay * 1000));
|
276 |
Â
}
|
277 |
Â
}
|
278 |
+
},
|
279 |
+
touch:function(touchsurface) {
|
280 |
+
|
281 |
+
var startx, dist;
|
282 |
+
var _this = this;
|
283 |
+
|
284 |
+
touchsurface.addEventListener('touchstart', function(e) {
|
285 |
+
var touchobj = e.changedTouches[0];
|
286 |
+
startx = parseInt(touchobj.clientX);
|
287 |
+
});
|
288 |
+
|
289 |
+
touchsurface.addEventListener('touchmove', function(e) {
|
290 |
+
if (!startx) {
|
291 |
+
return;
|
292 |
+
}
|
293 |
+
|
294 |
+
var touchobj = e.changedTouches[0];
|
295 |
+
var dist = parseInt(touchobj.clientX) - startx;
|
296 |
+
|
297 |
+
if (dist > 0) {
|
298 |
+
_this.mv(-1,1);
|
299 |
+
} else {
|
300 |
+
_this.mv(1,1);
|
301 |
+
}
|
302 |
+
|
303 |
+
startx = null;
|
304 |
+
});
|
305 |
+
},
|
306 |
+
touchslide:function(touchslidesurface) {
|
307 |
+
|
308 |
+
var startx = 0
|
309 |
+
var dist = 0
|
310 |
+
var thumbs = this.p;
|
311 |
+
var thumbsleft;
|
312 |
+
|
313 |
+
touchslidesurface.addEventListener('touchstart', function(e){
|
314 |
+
var touchobj = e.changedTouches[0] // reference first touch point (ie: first finger)
|
315 |
+
startx = parseInt(touchobj.clientX) // get x position of touch point relative to left edge of browser
|
316 |
+
thumbsleft = parseInt(thumbs.style.left || 0, 10);
|
317 |
+
}, false)
|
318 |
+
|
319 |
+
touchslidesurface.addEventListener('touchmove', function(e){
|
320 |
+
var touchobj = e.changedTouches[0] // reference first touch point for this event
|
321 |
+
var dist = parseInt(touchobj.clientX) - startx
|
322 |
+
thumbs.style.left = ((thumbsleft + dist > 0) ? 0 : (Math.abs(thumbsleft + dist) > parseInt(thumbs.offsetWidth)-parseInt(thumbs.parentNode.offsetWidth)) ? thumbsleft : thumbsleft + dist) + 'px';
|
323 |
+
}, false)
|
324 |
Â
}
|
325 |
Â
};
|
326 |
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Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*! jQuery UI - v1.11.4 - 2015-12-13
|
2 |
+
* http://jqueryui.com
|
3 |
+
* Includes: effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js
|
4 |
+
* Copyright jQuery Foundation and other contributors; Licensed MIT */
|
5 |
+
|
6 |
+
(function( factory ) {
|
7 |
+
if ( typeof define === "function" && define.amd ) {
|
8 |
+
|
9 |
+
// AMD. Register as an anonymous module.
|
10 |
+
define([ "jquery" ], factory );
|
11 |
+
} else {
|
12 |
+
|
13 |
+
// Browser globals
|
14 |
+
factory( jQuery );
|
15 |
+
}
|
16 |
+
}(function( $ ) {
|
17 |
+
/*!
|
18 |
+
* jQuery UI Effects 1.11.4
|
19 |
+
* http://jqueryui.com
|
20 |
+
*
|
21 |
+
* Copyright jQuery Foundation and other contributors
|
22 |
+
* Released under the MIT license.
|
23 |
+
* http://jquery.org/license
|
24 |
+
*
|
25 |
+
* http://api.jqueryui.com/category/effects-core/
|
26 |
+
*/
|
27 |
+
|
28 |
+
|
29 |
+
var dataSpace = "ui-effects-",
|
30 |
+
|
31 |
+
// Create a local jQuery because jQuery Color relies on it and the
|
32 |
+
// global may not exist with AMD and a custom build (#10199)
|
33 |
+
jQuery = $;
|
34 |
+
|
35 |
+
$.effects = {
|
36 |
+
effect: {}
|
37 |
+
};
|
38 |
+
|
39 |
+
/*!
|
40 |
+
* jQuery Color Animations v2.1.2
|
41 |
+
* https://github.com/jquery/jquery-color
|
42 |
+
*
|
43 |
+
* Copyright 2014 jQuery Foundation and other contributors
|
44 |
+
* Released under the MIT license.
|
45 |
+
* http://jquery.org/license
|
46 |
+
*
|
47 |
+
* Date: Wed Jan 16 08:47:09 2013 -0600
|
48 |
+
*/
|
49 |
+
(function( jQuery, undefined ) {
|
50 |
+
|
51 |
+
var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
|
52 |
+
|
53 |
+
// plusequals test for += 100 -= 100
|
54 |
+
rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
|
55 |
+
// a set of RE's that can match strings and generate color tuples.
|
56 |
+
stringParsers = [ {
|
57 |
+
re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
|
58 |
+
parse: function( execResult ) {
|
59 |
+
return [
|
60 |
+
execResult[ 1 ],
|
61 |
+
execResult[ 2 ],
|
62 |
+
execResult[ 3 ],
|
63 |
+
execResult[ 4 ]
|
64 |
+
];
|
65 |
+
}
|
66 |
+
}, {
|
67 |
+
re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
|
68 |
+
parse: function( execResult ) {
|
69 |
+
return [
|
70 |
+
execResult[ 1 ] * 2.55,
|
71 |
+
execResult[ 2 ] * 2.55,
|
72 |
+
execResult[ 3 ] * 2.55,
|
73 |
+
execResult[ 4 ]
|
74 |
+
];
|
75 |
+
}
|
76 |
+
}, {
|
77 |
+
// this regex ignores A-F because it's compared against an already lowercased string
|
78 |
+
re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
|
79 |
+
parse: function( execResult ) {
|
80 |
+
return [
|
81 |
+
parseInt( execResult[ 1 ], 16 ),
|
82 |
+
parseInt( execResult[ 2 ], 16 ),
|
83 |
+
parseInt( execResult[ 3 ], 16 )
|
84 |
+
];
|
85 |
+
}
|
86 |
+
}, {
|
87 |
+
// this regex ignores A-F because it's compared against an already lowercased string
|
88 |
+
re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
|
89 |
+
parse: function( execResult ) {
|
90 |
+
return [
|
91 |
+
parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
|
92 |
+
parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
|
93 |
+
parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
|
94 |
+
];
|
95 |
+
}
|
96 |
+
}, {
|
97 |
+
re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
|
98 |
+
space: "hsla",
|
99 |
+
parse: function( execResult ) {
|
100 |
+
return [
|
101 |
+
execResult[ 1 ],
|
102 |
+
execResult[ 2 ] / 100,
|
103 |
+
execResult[ 3 ] / 100,
|
104 |
+
execResult[ 4 ]
|
105 |
+
];
|
106 |
+
}
|
107 |
+
} ],
|
108 |
+
|
109 |
+
// jQuery.Color( )
|
110 |
+
color = jQuery.Color = function( color, green, blue, alpha ) {
|
111 |
+
return new jQuery.Color.fn.parse( color, green, blue, alpha );
|
112 |
+
},
|
113 |
+
spaces = {
|
114 |
+
rgba: {
|
115 |
+
props: {
|
116 |
+
red: {
|
117 |
+
idx: 0,
|
118 |
+
type: "byte"
|
119 |
+
},
|
120 |
+
green: {
|
121 |
+
idx: 1,
|
122 |
+
type: "byte"
|
123 |
+
},
|
124 |
+
blue: {
|
125 |
+
idx: 2,
|
126 |
+
type: "byte"
|
127 |
+
}
|
128 |
+
}
|
129 |
+
},
|
130 |
+
|
131 |
+
hsla: {
|
132 |
+
props: {
|
133 |
+
hue: {
|
134 |
+
idx: 0,
|
135 |
+
type: "degrees"
|
136 |
+
},
|
137 |
+
saturation: {
|
138 |
+
idx: 1,
|
139 |
+
type: "percent"
|
140 |
+
},
|
141 |
+
lightness: {
|
142 |
+
idx: 2,
|
143 |
+
type: "percent"
|
144 |
+
}
|
145 |
+
}
|
146 |
+
}
|
147 |
+
},
|
148 |
+
propTypes = {
|
149 |
+
"byte": {
|
150 |
+
floor: true,
|
151 |
+
max: 255
|
152 |
+
},
|
153 |
+
"percent": {
|
154 |
+
max: 1
|
155 |
+
},
|
156 |
+
"degrees": {
|
157 |
+
mod: 360,
|
158 |
+
floor: true
|
159 |
+
}
|
160 |
+
},
|
161 |
+
support = color.support = {},
|
162 |
+
|
163 |
+
// element for support tests
|
164 |
+
supportElem = jQuery( "<p>" )[ 0 ],
|
165 |
+
|
166 |
+
// colors = jQuery.Color.names
|
167 |
+
colors,
|
168 |
+
|
169 |
+
// local aliases of functions called often
|
170 |
+
each = jQuery.each;
|
171 |
+
|
172 |
+
// determine rgba support immediately
|
173 |
+
supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
|
174 |
+
support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
|
175 |
+
|
176 |
+
// define cache name and alpha properties
|
177 |
+
// for rgba and hsla spaces
|
178 |
+
each( spaces, function( spaceName, space ) {
|
179 |
+
space.cache = "_" + spaceName;
|
180 |
+
space.props.alpha = {
|
181 |
+
idx: 3,
|
182 |
+
type: "percent",
|
183 |
+
def: 1
|
184 |
+
};
|
185 |
+
});
|
186 |
+
|
187 |
+
function clamp( value, prop, allowEmpty ) {
|
188 |
+
var type = propTypes[ prop.type ] || {};
|
189 |
+
|
190 |
+
if ( value == null ) {
|
191 |
+
return (allowEmpty || !prop.def) ? null : prop.def;
|
192 |
+
}
|
193 |
+
|
194 |
+
// ~~ is an short way of doing floor for positive numbers
|
195 |
+
value = type.floor ? ~~value : parseFloat( value );
|
196 |
+
|
197 |
+
// IE will pass in empty strings as value for alpha,
|
198 |
+
// which will hit this case
|
199 |
+
if ( isNaN( value ) ) {
|
200 |
+
return prop.def;
|
201 |
+
}
|
202 |
+
|
203 |
+
if ( type.mod ) {
|
204 |
+
// we add mod before modding to make sure that negatives values
|
205 |
+
// get converted properly: -10 -> 350
|
206 |
+
return (value + type.mod) % type.mod;
|
207 |
+
}
|
208 |
+
|
209 |
+
// for now all property types without mod have min and max
|
210 |
+
return 0 > value ? 0 : type.max < value ? type.max : value;
|
211 |
+
}
|
212 |
+
|
213 |
+
function stringParse( string ) {
|
214 |
+
var inst = color(),
|
215 |
+
rgba = inst._rgba = [];
|
216 |
+
|
217 |
+
string = string.toLowerCase();
|
218 |
+
|
219 |
+
each( stringParsers, function( i, parser ) {
|
220 |
+
var parsed,
|
221 |
+
match = parser.re.exec( string ),
|
222 |
+
values = match && parser.parse( match ),
|
223 |
+
spaceName = parser.space || "rgba";
|
224 |
+
|
225 |
+
if ( values ) {
|
226 |
+
parsed = inst[ spaceName ]( values );
|
227 |
+
|
228 |
+
// if this was an rgba parse the assignment might happen twice
|
229 |
+
// oh well....
|
230 |
+
inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
|
231 |
+
rgba = inst._rgba = parsed._rgba;
|
232 |
+
|
233 |
+
// exit each( stringParsers ) here because we matched
|
234 |
+
return false;
|
235 |
+
}
|
236 |
+
});
|
237 |
+
|
238 |
+
// Found a stringParser that handled it
|
239 |
+
if ( rgba.length ) {
|
240 |
+
|
241 |
+
// if this came from a parsed string, force "transparent" when alpha is 0
|
242 |
+
// chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
|
243 |
+
if ( rgba.join() === "0,0,0,0" ) {
|
244 |
+
jQuery.extend( rgba, colors.transparent );
|
245 |
+
}
|
246 |
+
return inst;
|
247 |
+
}
|
248 |
+
|
249 |
+
// named colors
|
250 |
+
return colors[ string ];
|
251 |
+
}
|
252 |
+
|
253 |
+
color.fn = jQuery.extend( color.prototype, {
|
254 |
+
parse: function( red, green, blue, alpha ) {
|
255 |
+
if ( red === undefined ) {
|
256 |
+
this._rgba = [ null, null, null, null ];
|
257 |
+
return this;
|
258 |
+
}
|
259 |
+
if ( red.jquery || red.nodeType ) {
|
260 |
+
red = jQuery( red ).css( green );
|
261 |
+
green = undefined;
|
262 |
+
}
|
263 |
+
|
264 |
+
var inst = this,
|
265 |
+
type = jQuery.type( red ),
|
266 |
+
rgba = this._rgba = [];
|
267 |
+
|
268 |
+
// more than 1 argument specified - assume ( red, green, blue, alpha )
|
269 |
+
if ( green !== undefined ) {
|
270 |
+
red = [ red, green, blue, alpha ];
|
271 |
+
type = "array";
|
272 |
+
}
|
273 |
+
|
274 |
+
if ( type === "string" ) {
|
275 |
+
return this.parse( stringParse( red ) || colors._default );
|
276 |
+
}
|
277 |
+
|
278 |
+
if ( type === "array" ) {
|
279 |
+
each( spaces.rgba.props, function( key, prop ) {
|
280 |
+
rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
|
281 |
+
});
|
282 |
+
return this;
|
283 |
+
}
|
284 |
+
|
285 |
+
if ( type === "object" ) {
|
286 |
+
if ( red instanceof color ) {
|
287 |
+
each( spaces, function( spaceName, space ) {
|
288 |
+
if ( red[ space.cache ] ) {
|
289 |
+
inst[ space.cache ] = red[ space.cache ].slice();
|
290 |
+
}
|
291 |
+
});
|
292 |
+
} else {
|
293 |
+
each( spaces, function( spaceName, space ) {
|
294 |
+
var cache = space.cache;
|
295 |
+
each( space.props, function( key, prop ) {
|
296 |
+
|
297 |
+
// if the cache doesn't exist, and we know how to convert
|
298 |
+
if ( !inst[ cache ] && space.to ) {
|
299 |
+
|
300 |
+
// if the value was null, we don't need to copy it
|
301 |
+
// if the key was alpha, we don't need to copy it either
|
302 |
+
if ( key === "alpha" || red[ key ] == null ) {
|
303 |
+
return;
|
304 |
+
}
|
305 |
+
inst[ cache ] = space.to( inst._rgba );
|
306 |
+
}
|
307 |
+
|
308 |
+
// this is the only case where we allow nulls for ALL properties.
|
309 |
+
// call clamp with alwaysAllowEmpty
|
310 |
+
inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
|
311 |
+
});
|
312 |
+
|
313 |
+
// everything defined but alpha?
|
314 |
+
if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
|
315 |
+
// use the default of 1
|
316 |
+
inst[ cache ][ 3 ] = 1;
|
317 |
+
if ( space.from ) {
|
318 |
+
inst._rgba = space.from( inst[ cache ] );
|
319 |
+
}
|
320 |
+
}
|
321 |
+
});
|
322 |
+
}
|
323 |
+
return this;
|
324 |
+
}
|
325 |
+
},
|
326 |
+
is: function( compare ) {
|
327 |
+
var is = color( compare ),
|
328 |
+
same = true,
|
329 |
+
inst = this;
|
330 |
+
|
331 |
+
each( spaces, function( _, space ) {
|
332 |
+
var localCache,
|
333 |
+
isCache = is[ space.cache ];
|
334 |
+
if (isCache) {
|
335 |
+
localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
|
336 |
+
each( space.props, function( _, prop ) {
|
337 |
+
if ( isCache[ prop.idx ] != null ) {
|
338 |
+
same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
|
339 |
+
return same;
|
340 |
+
}
|
341 |
+
});
|
342 |
+
}
|
343 |
+
return same;
|
344 |
+
});
|
345 |
+
return same;
|
346 |
+
},
|
347 |
+
_space: function() {
|
348 |
+
var used = [],
|
349 |
+
inst = this;
|
350 |
+
each( spaces, function( spaceName, space ) {
|
351 |
+
if ( inst[ space.cache ] ) {
|
352 |
+
used.push( spaceName );
|
353 |
+
}
|
354 |
+
});
|
355 |
+
return used.pop();
|
356 |
+
},
|
357 |
+
transition: function( other, distance ) {
|
358 |
+
var end = color( other ),
|
359 |
+
spaceName = end._space(),
|
360 |
+
space = spaces[ spaceName ],
|
361 |
+
startColor = this.alpha() === 0 ? color( "transparent" ) : this,
|
362 |
+
start = startColor[ space.cache ] || space.to( startColor._rgba ),
|
363 |
+
result = start.slice();
|
364 |
+
|
365 |
+
end = end[ space.cache ];
|
366 |
+
each( space.props, function( key, prop ) {
|
367 |
+
var index = prop.idx,
|
368 |
+
startValue = start[ index ],
|
369 |
+
endValue = end[ index ],
|
370 |
+
type = propTypes[ prop.type ] || {};
|
371 |
+
|
372 |
+
// if null, don't override start value
|
373 |
+
if ( endValue === null ) {
|
374 |
+
return;
|
375 |
+
}
|
376 |
+
// if null - use end
|
377 |
+
if ( startValue === null ) {
|
378 |
+
result[ index ] = endValue;
|
379 |
+
} else {
|
380 |
+
if ( type.mod ) {
|
381 |
+
if ( endValue - startValue > type.mod / 2 ) {
|
382 |
+
startValue += type.mod;
|
383 |
+
} else if ( startValue - endValue > type.mod / 2 ) {
|
384 |
+
startValue -= type.mod;
|
385 |
+
}
|
386 |
+
}
|
387 |
+
result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
|
388 |
+
}
|
389 |
+
});
|
390 |
+
return this[ spaceName ]( result );
|
391 |
+
},
|
392 |
+
blend: function( opaque ) {
|
393 |
+
// if we are already opaque - return ourself
|
394 |
+
if ( this._rgba[ 3 ] === 1 ) {
|
395 |
+
return this;
|
396 |
+
}
|
397 |
+
|
398 |
+
var rgb = this._rgba.slice(),
|
399 |
+
a = rgb.pop(),
|
400 |
+
blend = color( opaque )._rgba;
|
401 |
+
|
402 |
+
return color( jQuery.map( rgb, function( v, i ) {
|
403 |
+
return ( 1 - a ) * blend[ i ] + a * v;
|
404 |
+
}));
|
405 |
+
},
|
406 |
+
toRgbaString: function() {
|
407 |
+
var prefix = "rgba(",
|
408 |
+
rgba = jQuery.map( this._rgba, function( v, i ) {
|
409 |
+
return v == null ? ( i > 2 ? 1 : 0 ) : v;
|
410 |
+
});
|
411 |
+
|
412 |
+
if ( rgba[ 3 ] === 1 ) {
|
413 |
+
rgba.pop();
|
414 |
+
prefix = "rgb(";
|
415 |
+
}
|
416 |
+
|
417 |
+
return prefix + rgba.join() + ")";
|
418 |
+
},
|
419 |
+
toHslaString: function() {
|
420 |
+
var prefix = "hsla(",
|
421 |
+
hsla = jQuery.map( this.hsla(), function( v, i ) {
|
422 |
+
if ( v == null ) {
|
423 |
+
v = i > 2 ? 1 : 0;
|
424 |
+
}
|
425 |
+
|
426 |
+
// catch 1 and 2
|
427 |
+
if ( i && i < 3 ) {
|
428 |
+
v = Math.round( v * 100 ) + "%";
|
429 |
+
}
|
430 |
+
return v;
|
431 |
+
});
|
432 |
+
|
433 |
+
if ( hsla[ 3 ] === 1 ) {
|
434 |
+
hsla.pop();
|
435 |
+
prefix = "hsl(";
|
436 |
+
}
|
437 |
+
return prefix + hsla.join() + ")";
|
438 |
+
},
|
439 |
+
toHexString: function( includeAlpha ) {
|
440 |
+
var rgba = this._rgba.slice(),
|
441 |
+
alpha = rgba.pop();
|
442 |
+
|
443 |
+
if ( includeAlpha ) {
|
444 |
+
rgba.push( ~~( alpha * 255 ) );
|
445 |
+
}
|
446 |
+
|
447 |
+
return "#" + jQuery.map( rgba, function( v ) {
|
448 |
+
|
449 |
+
// default to 0 when nulls exist
|
450 |
+
v = ( v || 0 ).toString( 16 );
|
451 |
+
return v.length === 1 ? "0" + v : v;
|
452 |
+
}).join("");
|
453 |
+
},
|
454 |
+
toString: function() {
|
455 |
+
return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
|
456 |
+
}
|
457 |
+
});
|
458 |
+
color.fn.parse.prototype = color.fn;
|
459 |
+
|
460 |
+
// hsla conversions adapted from:
|
461 |
+
// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
|
462 |
+
|
463 |
+
function hue2rgb( p, q, h ) {
|
464 |
+
h = ( h + 1 ) % 1;
|
465 |
+
if ( h * 6 < 1 ) {
|
466 |
+
return p + ( q - p ) * h * 6;
|
467 |
+
}
|
468 |
+
if ( h * 2 < 1) {
|
469 |
+
return q;
|
470 |
+
}
|
471 |
+
if ( h * 3 < 2 ) {
|
472 |
+
return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6;
|
473 |
+
}
|
474 |
+
return p;
|
475 |
+
}
|
476 |
+
|
477 |
+
spaces.hsla.to = function( rgba ) {
|
478 |
+
if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
|
479 |
+
return [ null, null, null, rgba[ 3 ] ];
|
480 |
+
}
|
481 |
+
var r = rgba[ 0 ] / 255,
|
482 |
+
g = rgba[ 1 ] / 255,
|
483 |
+
b = rgba[ 2 ] / 255,
|
484 |
+
a = rgba[ 3 ],
|
485 |
+
max = Math.max( r, g, b ),
|
486 |
+
min = Math.min( r, g, b ),
|
487 |
+
diff = max - min,
|
488 |
+
add = max + min,
|
489 |
+
l = add * 0.5,
|
490 |
+
h, s;
|
491 |
+
|
492 |
+
if ( min === max ) {
|
493 |
+
h = 0;
|
494 |
+
} else if ( r === max ) {
|
495 |
+
h = ( 60 * ( g - b ) / diff ) + 360;
|
496 |
+
} else if ( g === max ) {
|
497 |
+
h = ( 60 * ( b - r ) / diff ) + 120;
|
498 |
+
} else {
|
499 |
+
h = ( 60 * ( r - g ) / diff ) + 240;
|
500 |
+
}
|
501 |
+
|
502 |
+
// chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
|
503 |
+
// otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
|
504 |
+
if ( diff === 0 ) {
|
505 |
+
s = 0;
|
506 |
+
} else if ( l <= 0.5 ) {
|
507 |
+
s = diff / add;
|
508 |
+
} else {
|
509 |
+
s = diff / ( 2 - add );
|
510 |
+
}
|
511 |
+
return [ Math.round(h) % 360, s, l, a == null ? 1 : a ];
|
512 |
+
};
|
513 |
+
|
514 |
+
spaces.hsla.from = function( hsla ) {
|
515 |
+
if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
|
516 |
+
return [ null, null, null, hsla[ 3 ] ];
|
517 |
+
}
|
518 |
+
var h = hsla[ 0 ] / 360,
|
519 |
+
s = hsla[ 1 ],
|
520 |
+
l = hsla[ 2 ],
|
521 |
+
a = hsla[ 3 ],
|
522 |
+
q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
|
523 |
+
p = 2 * l - q;
|
524 |
+
|
525 |
+
return [
|
526 |
+
Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
|
527 |
+
Math.round( hue2rgb( p, q, h ) * 255 ),
|
528 |
+
Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
|
529 |
+
a
|
530 |
+
];
|
531 |
+
};
|
532 |
+
|
533 |
+
each( spaces, function( spaceName, space ) {
|
534 |
+
var props = space.props,
|
535 |
+
cache = space.cache,
|
536 |
+
to = space.to,
|
537 |
+
from = space.from;
|
538 |
+
|
539 |
+
// makes rgba() and hsla()
|
540 |
+
color.fn[ spaceName ] = function( value ) {
|
541 |
+
|
542 |
+
// generate a cache for this space if it doesn't exist
|
543 |
+
if ( to && !this[ cache ] ) {
|
544 |
+
this[ cache ] = to( this._rgba );
|
545 |
+
}
|
546 |
+
if ( value === undefined ) {
|
547 |
+
return this[ cache ].slice();
|
548 |
+
}
|
549 |
+
|
550 |
+
var ret,
|
551 |
+
type = jQuery.type( value ),
|
552 |
+
arr = ( type === "array" || type === "object" ) ? value : arguments,
|
553 |
+
local = this[ cache ].slice();
|
554 |
+
|
555 |
+
each( props, function( key, prop ) {
|
556 |
+
var val = arr[ type === "object" ? key : prop.idx ];
|
557 |
+
if ( val == null ) {
|
558 |
+
val = local[ prop.idx ];
|
559 |
+
}
|
560 |
+
local[ prop.idx ] = clamp( val, prop );
|
561 |
+
});
|
562 |
+
|
563 |
+
if ( from ) {
|
564 |
+
ret = color( from( local ) );
|
565 |
+
ret[ cache ] = local;
|
566 |
+
return ret;
|
567 |
+
} else {
|
568 |
+
return color( local );
|
569 |
+
}
|
570 |
+
};
|
571 |
+
|
572 |
+
// makes red() green() blue() alpha() hue() saturation() lightness()
|
573 |
+
each( props, function( key, prop ) {
|
574 |
+
// alpha is included in more than one space
|
575 |
+
if ( color.fn[ key ] ) {
|
576 |
+
return;
|
577 |
+
}
|
578 |
+
color.fn[ key ] = function( value ) {
|
579 |
+
var vtype = jQuery.type( value ),
|
580 |
+
fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
|
581 |
+
local = this[ fn ](),
|
582 |
+
cur = local[ prop.idx ],
|
583 |
+
match;
|
584 |
+
|
585 |
+
if ( vtype === "undefined" ) {
|
586 |
+
return cur;
|
587 |
+
}
|
588 |
+
|
589 |
+
if ( vtype === "function" ) {
|
590 |
+
value = value.call( this, cur );
|
591 |
+
vtype = jQuery.type( value );
|
592 |
+
}
|
593 |
+
if ( value == null && prop.empty ) {
|
594 |
+
return this;
|
595 |
+
}
|
596 |
+
if ( vtype === "string" ) {
|
597 |
+
match = rplusequals.exec( value );
|
598 |
+
if ( match ) {
|
599 |
+
value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
|
600 |
+
}
|
601 |
+
}
|
602 |
+
local[ prop.idx ] = value;
|
603 |
+
return this[ fn ]( local );
|
604 |
+
};
|
605 |
+
});
|
606 |
+
});
|
607 |
+
|
608 |
+
// add cssHook and .fx.step function for each named hook.
|
609 |
+
// accept a space separated string of properties
|
610 |
+
color.hook = function( hook ) {
|
611 |
+
var hooks = hook.split( " " );
|
612 |
+
each( hooks, function( i, hook ) {
|
613 |
+
jQuery.cssHooks[ hook ] = {
|
614 |
+
set: function( elem, value ) {
|
615 |
+
var parsed, curElem,
|
616 |
+
backgroundColor = "";
|
617 |
+
|
618 |
+
if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {
|
619 |
+
value = color( parsed || value );
|
620 |
+
if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
|
621 |
+
curElem = hook === "backgroundColor" ? elem.parentNode : elem;
|
622 |
+
while (
|
623 |
+
(backgroundColor === "" || backgroundColor === "transparent") &&
|
624 |
+
curElem && curElem.style
|
625 |
+
) {
|
626 |
+
try {
|
627 |
+
backgroundColor = jQuery.css( curElem, "backgroundColor" );
|
628 |
+
curElem = curElem.parentNode;
|
629 |
+
} catch ( e ) {
|
630 |
+
}
|
631 |
+
}
|
632 |
+
|
633 |
+
value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
|
634 |
+
backgroundColor :
|
635 |
+
"_default" );
|
636 |
+
}
|
637 |
+
|
638 |
+
value = value.toRgbaString();
|
639 |
+
}
|
640 |
+
try {
|
641 |
+
elem.style[ hook ] = value;
|
642 |
+
} catch ( e ) {
|
643 |
+
// wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
|
644 |
+
}
|
645 |
+
}
|
646 |
+
};
|
647 |
+
jQuery.fx.step[ hook ] = function( fx ) {
|
648 |
+
if ( !fx.colorInit ) {
|
649 |
+
fx.start = color( fx.elem, hook );
|
650 |
+
fx.end = color( fx.end );
|
651 |
+
fx.colorInit = true;
|
652 |
+
}
|
653 |
+
jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
|
654 |
+
};
|
655 |
+
});
|
656 |
+
|
657 |
+
};
|
658 |
+
|
659 |
+
color.hook( stepHooks );
|
660 |
+
|
661 |
+
jQuery.cssHooks.borderColor = {
|
662 |
+
expand: function( value ) {
|
663 |
+
var expanded = {};
|
664 |
+
|
665 |
+
each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
|
666 |
+
expanded[ "border" + part + "Color" ] = value;
|
667 |
+
});
|
668 |
+
return expanded;
|
669 |
+
}
|
670 |
+
};
|
671 |
+
|
672 |
+
// Basic color names only.
|
673 |
+
// Usage of any of the other color names requires adding yourself or including
|
674 |
+
// jquery.color.svg-names.js.
|
675 |
+
colors = jQuery.Color.names = {
|
676 |
+
// 4.1. Basic color keywords
|
677 |
+
aqua: "#00ffff",
|
678 |
+
black: "#000000",
|
679 |
+
blue: "#0000ff",
|
680 |
+
fuchsia: "#ff00ff",
|
681 |
+
gray: "#808080",
|
682 |
+
green: "#008000",
|
683 |
+
lime: "#00ff00",
|
684 |
+
maroon: "#800000",
|
685 |
+
navy: "#000080",
|
686 |
+
olive: "#808000",
|
687 |
+
purple: "#800080",
|
688 |
+
red: "#ff0000",
|
689 |
+
silver: "#c0c0c0",
|
690 |
+
teal: "#008080",
|
691 |
+
white: "#ffffff",
|
692 |
+
yellow: "#ffff00",
|
693 |
+
|
694 |
+
// 4.2.3. "transparent" color keyword
|
695 |
+
transparent: [ null, null, null, 0 ],
|
696 |
+
|
697 |
+
_default: "#ffffff"
|
698 |
+
};
|
699 |
+
|
700 |
+
})( jQuery );
|
701 |
+
|
702 |
+
/******************************************************************************/
|
703 |
+
/****************************** CLASS ANIMATIONS ******************************/
|
704 |
+
/******************************************************************************/
|
705 |
+
(function() {
|
706 |
+
|
707 |
+
var classAnimationActions = [ "add", "remove", "toggle" ],
|
708 |
+
shorthandStyles = {
|
709 |
+
border: 1,
|
710 |
+
borderBottom: 1,
|
711 |
+
borderColor: 1,
|
712 |
+
borderLeft: 1,
|
713 |
+
borderRight: 1,
|
714 |
+
borderTop: 1,
|
715 |
+
borderWidth: 1,
|
716 |
+
margin: 1,
|
717 |
+
padding: 1
|
718 |
+
};
|
719 |
+
|
720 |
+
$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) {
|
721 |
+
$.fx.step[ prop ] = function( fx ) {
|
722 |
+
if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
|
723 |
+
jQuery.style( fx.elem, prop, fx.end );
|
724 |
+
fx.setAttr = true;
|
725 |
+
}
|
726 |
+
};
|
727 |
+
});
|
728 |
+
|
729 |
+
function getElementStyles( elem ) {
|
730 |
+
var key, len,
|
731 |
+
style = elem.ownerDocument.defaultView ?
|
732 |
+
elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
|
733 |
+
elem.currentStyle,
|
734 |
+
styles = {};
|
735 |
+
|
736 |
+
if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
|
737 |
+
len = style.length;
|
738 |
+
while ( len-- ) {
|
739 |
+
key = style[ len ];
|
740 |
+
if ( typeof style[ key ] === "string" ) {
|
741 |
+
styles[ $.camelCase( key ) ] = style[ key ];
|
742 |
+
}
|
743 |
+
}
|
744 |
+
// support: Opera, IE <9
|
745 |
+
} else {
|
746 |
+
for ( key in style ) {
|
747 |
+
if ( typeof style[ key ] === "string" ) {
|
748 |
+
styles[ key ] = style[ key ];
|
749 |
+
}
|
750 |
+
}
|
751 |
+
}
|
752 |
+
|
753 |
+
return styles;
|
754 |
+
}
|
755 |
+
|
756 |
+
function styleDifference( oldStyle, newStyle ) {
|
757 |
+
var diff = {},
|
758 |
+
name, value;
|
759 |
+
|
760 |
+
for ( name in newStyle ) {
|
761 |
+
value = newStyle[ name ];
|
762 |
+
if ( oldStyle[ name ] !== value ) {
|
763 |
+
if ( !shorthandStyles[ name ] ) {
|
764 |
+
if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
|
765 |
+
diff[ name ] = value;
|
766 |
+
}
|
767 |
+
}
|
768 |
+
}
|
769 |
+
}
|
770 |
+
|
771 |
+
return diff;
|
772 |
+
}
|
773 |
+
|
774 |
+
// support: jQuery <1.8
|
775 |
+
if ( !$.fn.addBack ) {
|
776 |
+
$.fn.addBack = function( selector ) {
|
777 |
+
return this.add( selector == null ?
|
778 |
+
this.prevObject : this.prevObject.filter( selector )
|
779 |
+
);
|
780 |
+
};
|
781 |
+
}
|
782 |
+
|
783 |
+
$.effects.animateClass = function( value, duration, easing, callback ) {
|
784 |
+
var o = $.speed( duration, easing, callback );
|
785 |
+
|
786 |
+
return this.queue( function() {
|
787 |
+
var animated = $( this ),
|
788 |
+
baseClass = animated.attr( "class" ) || "",
|
789 |
+
applyClassChange,
|
790 |
+
allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
|
791 |
+
|
792 |
+
// map the animated objects to store the original styles.
|
793 |
+
allAnimations = allAnimations.map(function() {
|
794 |
+
var el = $( this );
|
795 |
+
return {
|
796 |
+
el: el,
|
797 |
+
start: getElementStyles( this )
|
798 |
+
};
|
799 |
+
});
|
800 |
+
|
801 |
+
// apply class change
|
802 |
+
applyClassChange = function() {
|
803 |
+
$.each( classAnimationActions, function(i, action) {
|
804 |
+
if ( value[ action ] ) {
|
805 |
+
animated[ action + "Class" ]( value[ action ] );
|
806 |
+
}
|
807 |
+
});
|
808 |
+
};
|
809 |
+
applyClassChange();
|
810 |
+
|
811 |
+
// map all animated objects again - calculate new styles and diff
|
812 |
+
allAnimations = allAnimations.map(function() {
|
813 |
+
this.end = getElementStyles( this.el[ 0 ] );
|
814 |
+
this.diff = styleDifference( this.start, this.end );
|
815 |
+
return this;
|
816 |
+
});
|
817 |
+
|
818 |
+
// apply original class
|
819 |
+
animated.attr( "class", baseClass );
|
820 |
+
|
821 |
+
// map all animated objects again - this time collecting a promise
|
822 |
+
allAnimations = allAnimations.map(function() {
|
823 |
+
var styleInfo = this,
|
824 |
+
dfd = $.Deferred(),
|
825 |
+
opts = $.extend({}, o, {
|
826 |
+
queue: false,
|
827 |
+
complete: function() {
|
828 |
+
dfd.resolve( styleInfo );
|
829 |
+
}
|
830 |
+
});
|
831 |
+
|
832 |
+
this.el.animate( this.diff, opts );
|
833 |
+
return dfd.promise();
|
834 |
+
});
|
835 |
+
|
836 |
+
// once all animations have completed:
|
837 |
+
$.when.apply( $, allAnimations.get() ).done(function() {
|
838 |
+
|
839 |
+
// set the final class
|
840 |
+
applyClassChange();
|
841 |
+
|
842 |
+
// for each animated element,
|
843 |
+
// clear all css properties that were animated
|
844 |
+
$.each( arguments, function() {
|
845 |
+
var el = this.el;
|
846 |
+
$.each( this.diff, function(key) {
|
847 |
+
el.css( key, "" );
|
848 |
+
});
|
849 |
+
});
|
850 |
+
|
851 |
+
// this is guarnteed to be there if you use jQuery.speed()
|
852 |
+
// it also handles dequeuing the next anim...
|
853 |
+
o.complete.call( animated[ 0 ] );
|
854 |
+
});
|
855 |
+
});
|
856 |
+
};
|
857 |
+
|
858 |
+
$.fn.extend({
|
859 |
+
addClass: (function( orig ) {
|
860 |
+
return function( classNames, speed, easing, callback ) {
|
861 |
+
return speed ?
|
862 |
+
$.effects.animateClass.call( this,
|
863 |
+
{ add: classNames }, speed, easing, callback ) :
|
864 |
+
orig.apply( this, arguments );
|
865 |
+
};
|
866 |
+
})( $.fn.addClass ),
|
867 |
+
|
868 |
+
removeClass: (function( orig ) {
|
869 |
+
return function( classNames, speed, easing, callback ) {
|
870 |
+
return arguments.length > 1 ?
|
871 |
+
$.effects.animateClass.call( this,
|
872 |
+
{ remove: classNames }, speed, easing, callback ) :
|
873 |
+
orig.apply( this, arguments );
|
874 |
+
};
|
875 |
+
})( $.fn.removeClass ),
|
876 |
+
|
877 |
+
toggleClass: (function( orig ) {
|
878 |
+
return function( classNames, force, speed, easing, callback ) {
|
879 |
+
if ( typeof force === "boolean" || force === undefined ) {
|
880 |
+
if ( !speed ) {
|
881 |
+
// without speed parameter
|
882 |
+
return orig.apply( this, arguments );
|
883 |
+
} else {
|
884 |
+
return $.effects.animateClass.call( this,
|
885 |
+
(force ? { add: classNames } : { remove: classNames }),
|
886 |
+
speed, easing, callback );
|
887 |
+
}
|
888 |
+
} else {
|
889 |
+
// without force parameter
|
890 |
+
return $.effects.animateClass.call( this,
|
891 |
+
{ toggle: classNames }, force, speed, easing );
|
892 |
+
}
|
893 |
+
};
|
894 |
+
})( $.fn.toggleClass ),
|
895 |
+
|
896 |
+
switchClass: function( remove, add, speed, easing, callback) {
|
897 |
+
return $.effects.animateClass.call( this, {
|
898 |
+
add: add,
|
899 |
+
remove: remove
|
900 |
+
}, speed, easing, callback );
|
901 |
+
}
|
902 |
+
});
|
903 |
+
|
904 |
+
})();
|
905 |
+
|
906 |
+
/******************************************************************************/
|
907 |
+
/*********************************** EFFECTS **********************************/
|
908 |
+
/******************************************************************************/
|
909 |
+
|
910 |
+
(function() {
|
911 |
+
|
912 |
+
$.extend( $.effects, {
|
913 |
+
version: "1.11.4",
|
914 |
+
|
915 |
+
// Saves a set of properties in a data storage
|
916 |
+
save: function( element, set ) {
|
917 |
+
for ( var i = 0; i < set.length; i++ ) {
|
918 |
+
if ( set[ i ] !== null ) {
|
919 |
+
element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
|
920 |
+
}
|
921 |
+
}
|
922 |
+
},
|
923 |
+
|
924 |
+
// Restores a set of previously saved properties from a data storage
|
925 |
+
restore: function( element, set ) {
|
926 |
+
var val, i;
|
927 |
+
for ( i = 0; i < set.length; i++ ) {
|
928 |
+
if ( set[ i ] !== null ) {
|
929 |
+
val = element.data( dataSpace + set[ i ] );
|
930 |
+
// support: jQuery 1.6.2
|
931 |
+
// http://bugs.jquery.com/ticket/9917
|
932 |
+
// jQuery 1.6.2 incorrectly returns undefined for any falsy value.
|
933 |
+
// We can't differentiate between "" and 0 here, so we just assume
|
934 |
+
// empty string since it's likely to be a more common value...
|
935 |
+
if ( val === undefined ) {
|
936 |
+
val = "";
|
937 |
+
}
|
938 |
+
element.css( set[ i ], val );
|
939 |
+
}
|
940 |
+
}
|
941 |
+
},
|
942 |
+
|
943 |
+
setMode: function( el, mode ) {
|
944 |
+
if (mode === "toggle") {
|
945 |
+
mode = el.is( ":hidden" ) ? "show" : "hide";
|
946 |
+
}
|
947 |
+
return mode;
|
948 |
+
},
|
949 |
+
|
950 |
+
// Translates a [top,left] array into a baseline value
|
951 |
+
// this should be a little more flexible in the future to handle a string & hash
|
952 |
+
getBaseline: function( origin, original ) {
|
953 |
+
var y, x;
|
954 |
+
switch ( origin[ 0 ] ) {
|
955 |
+
case "top": y = 0; break;
|
956 |
+
case "middle": y = 0.5; break;
|
957 |
+
case "bottom": y = 1; break;
|
958 |
+
default: y = origin[ 0 ] / original.height;
|
959 |
+
}
|
960 |
+
switch ( origin[ 1 ] ) {
|
961 |
+
case "left": x = 0; break;
|
962 |
+
case "center": x = 0.5; break;
|
963 |
+
case "right": x = 1; break;
|
964 |
+
default: x = origin[ 1 ] / original.width;
|
965 |
+
}
|
966 |
+
return {
|
967 |
+
x: x,
|
968 |
+
y: y
|
969 |
+
};
|
970 |
+
},
|
971 |
+
|
972 |
+
// Wraps the element around a wrapper that copies position properties
|
973 |
+
createWrapper: function( element ) {
|
974 |
+
|
975 |
+
// if the element is already wrapped, return it
|
976 |
+
if ( element.parent().is( ".ui-effects-wrapper" )) {
|
977 |
+
return element.parent();
|
978 |
+
}
|
979 |
+
|
980 |
+
// wrap the element
|
981 |
+
var props = {
|
982 |
+
width: element.outerWidth(true),
|
983 |
+
height: element.outerHeight(true),
|
984 |
+
"float": element.css( "float" )
|
985 |
+
},
|
986 |
+
wrapper = $( "<div></div>" )
|
987 |
+
.addClass( "ui-effects-wrapper" )
|
988 |
+
.css({
|
989 |
+
fontSize: "100%",
|
990 |
+
background: "transparent",
|
991 |
+
border: "none",
|
992 |
+
margin: 0,
|
993 |
+
padding: 0
|
994 |
+
}),
|
995 |
+
// Store the size in case width/height are defined in % - Fixes #5245
|
996 |
+
size = {
|
997 |
+
width: element.width(),
|
998 |
+
height: element.height()
|
999 |
+
},
|
1000 |
+
active = document.activeElement;
|
1001 |
+
|
1002 |
+
// support: Firefox
|
1003 |
+
// Firefox incorrectly exposes anonymous content
|
1004 |
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=561664
|
1005 |
+
try {
|
1006 |
+
active.id;
|
1007 |
+
} catch ( e ) {
|
1008 |
+
active = document.body;
|
1009 |
+
}
|
1010 |
+
|
1011 |
+
element.wrap( wrapper );
|
1012 |
+
|
1013 |
+
// Fixes #7595 - Elements lose focus when wrapped.
|
1014 |
+
if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
|
1015 |
+
$( active ).focus();
|
1016 |
+
}
|
1017 |
+
|
1018 |
+
wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element
|
1019 |
+
|
1020 |
+
// transfer positioning properties to the wrapper
|
1021 |
+
if ( element.css( "position" ) === "static" ) {
|
1022 |
+
wrapper.css({ position: "relative" });
|
1023 |
+
element.css({ position: "relative" });
|
1024 |
+
} else {
|
1025 |
+
$.extend( props, {
|
1026 |
+
position: element.css( "position" ),
|
1027 |
+
zIndex: element.css( "z-index" )
|
1028 |
+
});
|
1029 |
+
$.each([ "top", "left", "bottom", "right" ], function(i, pos) {
|
1030 |
+
props[ pos ] = element.css( pos );
|
1031 |
+
if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
|
1032 |
+
props[ pos ] = "auto";
|
1033 |
+
}
|
1034 |
+
});
|
1035 |
+
element.css({
|
1036 |
+
position: "relative",
|
1037 |
+
top: 0,
|
1038 |
+
left: 0,
|
1039 |
+
right: "auto",
|
1040 |
+
bottom: "auto"
|
1041 |
+
});
|
1042 |
+
}
|
1043 |
+
element.css(size);
|
1044 |
+
|
1045 |
+
return wrapper.css( props ).show();
|
1046 |
+
},
|
1047 |
+
|
1048 |
+
removeWrapper: function( element ) {
|
1049 |
+
var active = document.activeElement;
|
1050 |
+
|
1051 |
+
if ( element.parent().is( ".ui-effects-wrapper" ) ) {
|
1052 |
+
element.parent().replaceWith( element );
|
1053 |
+
|
1054 |
+
// Fixes #7595 - Elements lose focus when wrapped.
|
1055 |
+
if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
|
1056 |
+
$( active ).focus();
|
1057 |
+
}
|
1058 |
+
}
|
1059 |
+
|
1060 |
+
return element;
|
1061 |
+
},
|
1062 |
+
|
1063 |
+
setTransition: function( element, list, factor, value ) {
|
1064 |
+
value = value || {};
|
1065 |
+
$.each( list, function( i, x ) {
|
1066 |
+
var unit = element.cssUnit( x );
|
1067 |
+
if ( unit[ 0 ] > 0 ) {
|
1068 |
+
value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
|
1069 |
+
}
|
1070 |
+
});
|
1071 |
+
return value;
|
1072 |
+
}
|
1073 |
+
});
|
1074 |
+
|
1075 |
+
// return an effect options object for the given parameters:
|
1076 |
+
function _normalizeArguments( effect, options, speed, callback ) {
|
1077 |
+
|
1078 |
+
// allow passing all options as the first parameter
|
1079 |
+
if ( $.isPlainObject( effect ) ) {
|
1080 |
+
options = effect;
|
1081 |
+
effect = effect.effect;
|
1082 |
+
}
|
1083 |
+
|
1084 |
+
// convert to an object
|
1085 |
+
effect = { effect: effect };
|
1086 |
+
|
1087 |
+
// catch (effect, null, ...)
|
1088 |
+
if ( options == null ) {
|
1089 |
+
options = {};
|
1090 |
+
}
|
1091 |
+
|
1092 |
+
// catch (effect, callback)
|
1093 |
+
if ( $.isFunction( options ) ) {
|
1094 |
+
callback = options;
|
1095 |
+
speed = null;
|
1096 |
+
options = {};
|
1097 |
+
}
|
1098 |
+
|
1099 |
+
// catch (effect, speed, ?)
|
1100 |
+
if ( typeof options === "number" || $.fx.speeds[ options ] ) {
|
1101 |
+
callback = speed;
|
1102 |
+
speed = options;
|
1103 |
+
options = {};
|
1104 |
+
}
|
1105 |
+
|
1106 |
+
// catch (effect, options, callback)
|
1107 |
+
if ( $.isFunction( speed ) ) {
|
1108 |
+
callback = speed;
|
1109 |
+
speed = null;
|
1110 |
+
}
|
1111 |
+
|
1112 |
+
// add options to effect
|
1113 |
+
if ( options ) {
|
1114 |
+
$.extend( effect, options );
|
1115 |
+
}
|
1116 |
+
|
1117 |
+
speed = speed || options.duration;
|
1118 |
+
effect.duration = $.fx.off ? 0 :
|
1119 |
+
typeof speed === "number" ? speed :
|
1120 |
+
speed in $.fx.speeds ? $.fx.speeds[ speed ] :
|
1121 |
+
$.fx.speeds._default;
|
1122 |
+
|
1123 |
+
effect.complete = callback || options.complete;
|
1124 |
+
|
1125 |
+
return effect;
|
1126 |
+
}
|
1127 |
+
|
1128 |
+
function standardAnimationOption( option ) {
|
1129 |
+
// Valid standard speeds (nothing, number, named speed)
|
1130 |
+
if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) {
|
1131 |
+
return true;
|
1132 |
+
}
|
1133 |
+
|
1134 |
+
// Invalid strings - treat as "normal" speed
|
1135 |
+
if ( typeof option === "string" && !$.effects.effect[ option ] ) {
|
1136 |
+
return true;
|
1137 |
+
}
|
1138 |
+
|
1139 |
+
// Complete callback
|
1140 |
+
if ( $.isFunction( option ) ) {
|
1141 |
+
return true;
|
1142 |
+
}
|
1143 |
+
|
1144 |
+
// Options hash (but not naming an effect)
|
1145 |
+
if ( typeof option === "object" && !option.effect ) {
|
1146 |
+
return true;
|
1147 |
+
}
|
1148 |
+
|
1149 |
+
// Didn't match any standard API
|
1150 |
+
return false;
|
1151 |
+
}
|
1152 |
+
|
1153 |
+
$.fn.extend({
|
1154 |
+
effect: function( /* effect, options, speed, callback */ ) {
|
1155 |
+
var args = _normalizeArguments.apply( this, arguments ),
|
1156 |
+
mode = args.mode,
|
1157 |
+
queue = args.queue,
|
1158 |
+
effectMethod = $.effects.effect[ args.effect ];
|
1159 |
+
|
1160 |
+
if ( $.fx.off || !effectMethod ) {
|
1161 |
+
// delegate to the original method (e.g., .show()) if possible
|
1162 |
+
if ( mode ) {
|
1163 |
+
return this[ mode ]( args.duration, args.complete );
|
1164 |
+
} else {
|
1165 |
+
return this.each( function() {
|
1166 |
+
if ( args.complete ) {
|
1167 |
+
args.complete.call( this );
|
1168 |
+
}
|
1169 |
+
});
|
1170 |
+
}
|
1171 |
+
}
|
1172 |
+
|
1173 |
+
function run( next ) {
|
1174 |
+
var elem = $( this ),
|
1175 |
+
complete = args.complete,
|
1176 |
+
mode = args.mode;
|
1177 |
+
|
1178 |
+
function done() {
|
1179 |
+
if ( $.isFunction( complete ) ) {
|
1180 |
+
complete.call( elem[0] );
|
1181 |
+
}
|
1182 |
+
if ( $.isFunction( next ) ) {
|
1183 |
+
next();
|
1184 |
+
}
|
1185 |
+
}
|
1186 |
+
|
1187 |
+
// If the element already has the correct final state, delegate to
|
1188 |
+
// the core methods so the internal tracking of "olddisplay" works.
|
1189 |
+
if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
|
1190 |
+
elem[ mode ]();
|
1191 |
+
done();
|
1192 |
+
} else {
|
1193 |
+
effectMethod.call( elem[0], args, done );
|
1194 |
+
}
|
1195 |
+
}
|
1196 |
+
|
1197 |
+
return queue === false ? this.each( run ) : this.queue( queue || "fx", run );
|
1198 |
+
},
|
1199 |
+
|
1200 |
+
show: (function( orig ) {
|
1201 |
+
return function( option ) {
|
1202 |
+
if ( standardAnimationOption( option ) ) {
|
1203 |
+
return orig.apply( this, arguments );
|
1204 |
+
} else {
|
1205 |
+
var args = _normalizeArguments.apply( this, arguments );
|
1206 |
+
args.mode = "show";
|
1207 |
+
return this.effect.call( this, args );
|
1208 |
+
}
|
1209 |
+
};
|
1210 |
+
})( $.fn.show ),
|
1211 |
+
|
1212 |
+
hide: (function( orig ) {
|
1213 |
+
return function( option ) {
|
1214 |
+
if ( standardAnimationOption( option ) ) {
|
1215 |
+
return orig.apply( this, arguments );
|
1216 |
+
} else {
|
1217 |
+
var args = _normalizeArguments.apply( this, arguments );
|
1218 |
+
args.mode = "hide";
|
1219 |
+
return this.effect.call( this, args );
|
1220 |
+
}
|
1221 |
+
};
|
1222 |
+
})( $.fn.hide ),
|
1223 |
+
|
1224 |
+
toggle: (function( orig ) {
|
1225 |
+
return function( option ) {
|
1226 |
+
if ( standardAnimationOption( option ) || typeof option === "boolean" ) {
|
1227 |
+
return orig.apply( this, arguments );
|
1228 |
+
} else {
|
1229 |
+
var args = _normalizeArguments.apply( this, arguments );
|
1230 |
+
args.mode = "toggle";
|
1231 |
+
return this.effect.call( this, args );
|
1232 |
+
}
|
1233 |
+
};
|
1234 |
+
})( $.fn.toggle ),
|
1235 |
+
|
1236 |
+
// helper functions
|
1237 |
+
cssUnit: function(key) {
|
1238 |
+
var style = this.css( key ),
|
1239 |
+
val = [];
|
1240 |
+
|
1241 |
+
$.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
|
1242 |
+
if ( style.indexOf( unit ) > 0 ) {
|
1243 |
+
val = [ parseFloat( style ), unit ];
|
1244 |
+
}
|
1245 |
+
});
|
1246 |
+
return val;
|
1247 |
+
}
|
1248 |
+
});
|
1249 |
+
|
1250 |
+
})();
|
1251 |
+
|
1252 |
+
/******************************************************************************/
|
1253 |
+
/*********************************** EASING ***********************************/
|
1254 |
+
/******************************************************************************/
|
1255 |
+
|
1256 |
+
(function() {
|
1257 |
+
|
1258 |
+
// based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
|
1259 |
+
|
1260 |
+
var baseEasings = {};
|
1261 |
+
|
1262 |
+
$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
|
1263 |
+
baseEasings[ name ] = function( p ) {
|
1264 |
+
return Math.pow( p, i + 2 );
|
1265 |
+
};
|
1266 |
+
});
|
1267 |
+
|
1268 |
+
$.extend( baseEasings, {
|
1269 |
+
Sine: function( p ) {
|
1270 |
+
return 1 - Math.cos( p * Math.PI / 2 );
|
1271 |
+
},
|
1272 |
+
Circ: function( p ) {
|
1273 |
+
return 1 - Math.sqrt( 1 - p * p );
|
1274 |
+
},
|
1275 |
+
Elastic: function( p ) {
|
1276 |
+
return p === 0 || p === 1 ? p :
|
1277 |
+
-Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );
|
1278 |
+
},
|
1279 |
+
Back: function( p ) {
|
1280 |
+
return p * p * ( 3 * p - 2 );
|
1281 |
+
},
|
1282 |
+
Bounce: function( p ) {
|
1283 |
+
var pow2,
|
1284 |
+
bounce = 4;
|
1285 |
+
|
1286 |
+
while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
|
1287 |
+
return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
|
1288 |
+
}
|
1289 |
+
});
|
1290 |
+
|
1291 |
+
$.each( baseEasings, function( name, easeIn ) {
|
1292 |
+
$.easing[ "easeIn" + name ] = easeIn;
|
1293 |
+
$.easing[ "easeOut" + name ] = function( p ) {
|
1294 |
+
return 1 - easeIn( 1 - p );
|
1295 |
+
};
|
1296 |
+
$.easing[ "easeInOut" + name ] = function( p ) {
|
1297 |
+
return p < 0.5 ?
|
1298 |
+
easeIn( p * 2 ) / 2 :
|
1299 |
+
1 - easeIn( p * -2 + 2 ) / 2;
|
1300 |
+
};
|
1301 |
+
});
|
1302 |
+
|
1303 |
+
})();
|
1304 |
+
|
1305 |
+
var effect = $.effects;
|
1306 |
+
|
1307 |
+
|
1308 |
+
/*!
|
1309 |
+
* jQuery UI Effects Blind 1.11.4
|
1310 |
+
* http://jqueryui.com
|
1311 |
+
*
|
1312 |
+
* Copyright jQuery Foundation and other contributors
|
1313 |
+
* Released under the MIT license.
|
1314 |
+
* http://jquery.org/license
|
1315 |
+
*
|
1316 |
+
* http://api.jqueryui.com/blind-effect/
|
1317 |
+
*/
|
1318 |
+
|
1319 |
+
|
1320 |
+
var effectBlind = $.effects.effect.blind = function( o, done ) {
|
1321 |
+
// Create element
|
1322 |
+
var el = $( this ),
|
1323 |
+
rvertical = /up|down|vertical/,
|
1324 |
+
rpositivemotion = /up|left|vertical|horizontal/,
|
1325 |
+
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
|
1326 |
+
mode = $.effects.setMode( el, o.mode || "hide" ),
|
1327 |
+
direction = o.direction || "up",
|
1328 |
+
vertical = rvertical.test( direction ),
|
1329 |
+
ref = vertical ? "height" : "width",
|
1330 |
+
ref2 = vertical ? "top" : "left",
|
1331 |
+
motion = rpositivemotion.test( direction ),
|
1332 |
+
animation = {},
|
1333 |
+
show = mode === "show",
|
1334 |
+
wrapper, distance, margin;
|
1335 |
+
|
1336 |
+
// if already wrapped, the wrapper's properties are my property. #6245
|
1337 |
+
if ( el.parent().is( ".ui-effects-wrapper" ) ) {
|
1338 |
+
$.effects.save( el.parent(), props );
|
1339 |
+
} else {
|
1340 |
+
$.effects.save( el, props );
|
1341 |
+
}
|
1342 |
+
el.show();
|
1343 |
+
wrapper = $.effects.createWrapper( el ).css({
|
1344 |
+
overflow: "hidden"
|
1345 |
+
});
|
1346 |
+
|
1347 |
+
distance = wrapper[ ref ]();
|
1348 |
+
margin = parseFloat( wrapper.css( ref2 ) ) || 0;
|
1349 |
+
|
1350 |
+
animation[ ref ] = show ? distance : 0;
|
1351 |
+
if ( !motion ) {
|
1352 |
+
el
|
1353 |
+
.css( vertical ? "bottom" : "right", 0 )
|
1354 |
+
.css( vertical ? "top" : "left", "auto" )
|
1355 |
+
.css({ position: "absolute" });
|
1356 |
+
|
1357 |
+
animation[ ref2 ] = show ? margin : distance + margin;
|
1358 |
+
}
|
1359 |
+
|
1360 |
+
// start at 0 if we are showing
|
1361 |
+
if ( show ) {
|
1362 |
+
wrapper.css( ref, 0 );
|
1363 |
+
if ( !motion ) {
|
1364 |
+
wrapper.css( ref2, margin + distance );
|
1365 |
+
}
|
1366 |
+
}
|
1367 |
+
|
1368 |
+
// Animate
|
1369 |
+
wrapper.animate( animation, {
|
1370 |
+
duration: o.duration,
|
1371 |
+
easing: o.easing,
|
1372 |
+
queue: false,
|
1373 |
+
complete: function() {
|
1374 |
+
if ( mode === "hide" ) {
|
1375 |
+
el.hide();
|
1376 |
+
}
|
1377 |
+
$.effects.restore( el, props );
|
1378 |
+
$.effects.removeWrapper( el );
|
1379 |
+
done();
|
1380 |
+
}
|
1381 |
+
});
|
1382 |
+
};
|
1383 |
+
|
1384 |
+
|
1385 |
+
/*!
|
1386 |
+
* jQuery UI Effects Bounce 1.11.4
|
1387 |
+
* http://jqueryui.com
|
1388 |
+
*
|
1389 |
+
* Copyright jQuery Foundation and other contributors
|
1390 |
+
* Released under the MIT license.
|
1391 |
+
* http://jquery.org/license
|
1392 |
+
*
|
1393 |
+
* http://api.jqueryui.com/bounce-effect/
|
1394 |
+
*/
|
1395 |
+
|
1396 |
+
|
1397 |
+
var effectBounce = $.effects.effect.bounce = function( o, done ) {
|
1398 |
+
var el = $( this ),
|
1399 |
+
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
|
1400 |
+
|
1401 |
+
// defaults:
|
1402 |
+
mode = $.effects.setMode( el, o.mode || "effect" ),
|
1403 |
+
hide = mode === "hide",
|
1404 |
+
show = mode === "show",
|
1405 |
+
direction = o.direction || "up",
|
1406 |
+
distance = o.distance,
|
1407 |
+
times = o.times || 5,
|
1408 |
+
|
1409 |
+
// number of internal animations
|
1410 |
+
anims = times * 2 + ( show || hide ? 1 : 0 ),
|
1411 |
+
speed = o.duration / anims,
|
1412 |
+
easing = o.easing,
|
1413 |
+
|
1414 |
+
// utility:
|
1415 |
+
ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
|
1416 |
+
motion = ( direction === "up" || direction === "left" ),
|
1417 |
+
i,
|
1418 |
+
upAnim,
|
1419 |
+
downAnim,
|
1420 |
+
|
1421 |
+
// we will need to re-assemble the queue to stack our animations in place
|
1422 |
+
queue = el.queue(),
|
1423 |
+
queuelen = queue.length;
|
1424 |
+
|
1425 |
+
// Avoid touching opacity to prevent clearType and PNG issues in IE
|
1426 |
+
if ( show || hide ) {
|
1427 |
+
props.push( "opacity" );
|
1428 |
+
}
|
1429 |
+
|
1430 |
+
$.effects.save( el, props );
|
1431 |
+
el.show();
|
1432 |
+
$.effects.createWrapper( el ); // Create Wrapper
|
1433 |
+
|
1434 |
+
// default distance for the BIGGEST bounce is the outer Distance / 3
|
1435 |
+
if ( !distance ) {
|
1436 |
+
distance = el[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3;
|
1437 |
+
}
|
1438 |
+
|
1439 |
+
if ( show ) {
|
1440 |
+
downAnim = { opacity: 1 };
|
1441 |
+
downAnim[ ref ] = 0;
|
1442 |
+
|
1443 |
+
// if we are showing, force opacity 0 and set the initial position
|
1444 |
+
// then do the "first" animation
|
1445 |
+
el.css( "opacity", 0 )
|
1446 |
+
.css( ref, motion ? -distance * 2 : distance * 2 )
|
1447 |
+
.animate( downAnim, speed, easing );
|
1448 |
+
}
|
1449 |
+
|
1450 |
+
// start at the smallest distance if we are hiding
|
1451 |
+
if ( hide ) {
|
1452 |
+
distance = distance / Math.pow( 2, times - 1 );
|
1453 |
+
}
|
1454 |
+
|
1455 |
+
downAnim = {};
|
1456 |
+
downAnim[ ref ] = 0;
|
1457 |
+
// Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
|
1458 |
+
for ( i = 0; i < times; i++ ) {
|
1459 |
+
upAnim = {};
|
1460 |
+
upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
|
1461 |
+
|
1462 |
+
el.animate( upAnim, speed, easing )
|
1463 |
+
.animate( downAnim, speed, easing );
|
1464 |
+
|
1465 |
+
distance = hide ? distance * 2 : distance / 2;
|
1466 |
+
}
|
1467 |
+
|
1468 |
+
// Last Bounce when Hiding
|
1469 |
+
if ( hide ) {
|
1470 |
+
upAnim = { opacity: 0 };
|
1471 |
+
upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
|
1472 |
+
|
1473 |
+
el.animate( upAnim, speed, easing );
|
1474 |
+
}
|
1475 |
+
|
1476 |
+
el.queue(function() {
|
1477 |
+
if ( hide ) {
|
1478 |
+
el.hide();
|
1479 |
+
}
|
1480 |
+
$.effects.restore( el, props );
|
1481 |
+
$.effects.removeWrapper( el );
|
1482 |
+
done();
|
1483 |
+
});
|
1484 |
+
|
1485 |
+
// inject all the animations we just queued to be first in line (after "inprogress")
|
1486 |
+
if ( queuelen > 1) {
|
1487 |
+
queue.splice.apply( queue,
|
1488 |
+
[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
|
1489 |
+
}
|
1490 |
+
el.dequeue();
|
1491 |
+
|
1492 |
+
};
|
1493 |
+
|
1494 |
+
|
1495 |
+
/*!
|
1496 |
+
* jQuery UI Effects Clip 1.11.4
|
1497 |
+
* http://jqueryui.com
|
1498 |
+
*
|
1499 |
+
* Copyright jQuery Foundation and other contributors
|
1500 |
+
* Released under the MIT license.
|
1501 |
+
* http://jquery.org/license
|
1502 |
+
*
|
1503 |
+
* http://api.jqueryui.com/clip-effect/
|
1504 |
+
*/
|
1505 |
+
|
1506 |
+
|
1507 |
+
var effectClip = $.effects.effect.clip = function( o, done ) {
|
1508 |
+
// Create element
|
1509 |
+
var el = $( this ),
|
1510 |
+
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
|
1511 |
+
mode = $.effects.setMode( el, o.mode || "hide" ),
|
1512 |
+
show = mode === "show",
|
1513 |
+
direction = o.direction || "vertical",
|
1514 |
+
vert = direction === "vertical",
|
1515 |
+
size = vert ? "height" : "width",
|
1516 |
+
position = vert ? "top" : "left",
|
1517 |
+
animation = {},
|
1518 |
+
wrapper, animate, distance;
|
1519 |
+
|
1520 |
+
// Save & Show
|
1521 |
+
$.effects.save( el, props );
|
1522 |
+
el.show();
|
1523 |
+
|
1524 |
+
// Create Wrapper
|
1525 |
+
wrapper = $.effects.createWrapper( el ).css({
|
1526 |
+
overflow: "hidden"
|
1527 |
+
});
|
1528 |
+
animate = ( el[0].tagName === "IMG" ) ? wrapper : el;
|
1529 |
+
distance = animate[ size ]();
|
1530 |
+
|
1531 |
+
// Shift
|
1532 |
+
if ( show ) {
|
1533 |
+
animate.css( size, 0 );
|
1534 |
+
animate.css( position, distance / 2 );
|
1535 |
+
}
|
1536 |
+
|
1537 |
+
// Create Animation Object:
|
1538 |
+
animation[ size ] = show ? distance : 0;
|
1539 |
+
animation[ position ] = show ? 0 : distance / 2;
|
1540 |
+
|
1541 |
+
// Animate
|
1542 |
+
animate.animate( animation, {
|
1543 |
+
queue: false,
|
1544 |
+
duration: o.duration,
|
1545 |
+
easing: o.easing,
|
1546 |
+
complete: function() {
|
1547 |
+
if ( !show ) {
|
1548 |
+
el.hide();
|
1549 |
+
}
|
1550 |
+
$.effects.restore( el, props );
|
1551 |
+
$.effects.removeWrapper( el );
|
1552 |
+
done();
|
1553 |
+
}
|
1554 |
+
});
|
1555 |
+
|
1556 |
+
};
|
1557 |
+
|
1558 |
+
|
1559 |
+
/*!
|
1560 |
+
* jQuery UI Effects Drop 1.11.4
|
1561 |
+
* http://jqueryui.com
|
1562 |
+
*
|
1563 |
+
* Copyright jQuery Foundation and other contributors
|
1564 |
+
* Released under the MIT license.
|
1565 |
+
* http://jquery.org/license
|
1566 |
+
*
|
1567 |
+
* http://api.jqueryui.com/drop-effect/
|
1568 |
+
*/
|
1569 |
+
|
1570 |
+
|
1571 |
+
var effectDrop = $.effects.effect.drop = function( o, done ) {
|
1572 |
+
|
1573 |
+
var el = $( this ),
|
1574 |
+
props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ],
|
1575 |
+
mode = $.effects.setMode( el, o.mode || "hide" ),
|
1576 |
+
show = mode === "show",
|
1577 |
+
direction = o.direction || "left",
|
1578 |
+
ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
|
1579 |
+
motion = ( direction === "up" || direction === "left" ) ? "pos" : "neg",
|
1580 |
+
animation = {
|
1581 |
+
opacity: show ? 1 : 0
|
1582 |
+
},
|
1583 |
+
distance;
|
1584 |
+
|
1585 |
+
// Adjust
|
1586 |
+
$.effects.save( el, props );
|
1587 |
+
el.show();
|
1588 |
+
$.effects.createWrapper( el );
|
1589 |
+
|
1590 |
+
distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2;
|
1591 |
+
|
1592 |
+
if ( show ) {
|
1593 |
+
el
|
1594 |
+
.css( "opacity", 0 )
|
1595 |
+
.css( ref, motion === "pos" ? -distance : distance );
|
1596 |
+
}
|
1597 |
+
|
1598 |
+
// Animation
|
1599 |
+
animation[ ref ] = ( show ?
|
1600 |
+
( motion === "pos" ? "+=" : "-=" ) :
|
1601 |
+
( motion === "pos" ? "-=" : "+=" ) ) +
|
1602 |
+
distance;
|
1603 |
+
|
1604 |
+
// Animate
|
1605 |
+
el.animate( animation, {
|
1606 |
+
queue: false,
|
1607 |
+
duration: o.duration,
|
1608 |
+
easing: o.easing,
|
1609 |
+
complete: function() {
|
1610 |
+
if ( mode === "hide" ) {
|
1611 |
+
el.hide();
|
1612 |
+
}
|
1613 |
+
$.effects.restore( el, props );
|
1614 |
+
$.effects.removeWrapper( el );
|
1615 |
+
done();
|
1616 |
+
}
|
1617 |
+
});
|
1618 |
+
};
|
1619 |
+
|
1620 |
+
|
1621 |
+
/*!
|
1622 |
+
* jQuery UI Effects Explode 1.11.4
|
1623 |
+
* http://jqueryui.com
|
1624 |
+
*
|
1625 |
+
* Copyright jQuery Foundation and other contributors
|
1626 |
+
* Released under the MIT license.
|
1627 |
+
* http://jquery.org/license
|
1628 |
+
*
|
1629 |
+
* http://api.jqueryui.com/explode-effect/
|
1630 |
+
*/
|
1631 |
+
|
1632 |
+
|
1633 |
+
var effectExplode = $.effects.effect.explode = function( o, done ) {
|
1634 |
+
|
1635 |
+
var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,
|
1636 |
+
cells = rows,
|
1637 |
+
el = $( this ),
|
1638 |
+
mode = $.effects.setMode( el, o.mode || "hide" ),
|
1639 |
+
show = mode === "show",
|
1640 |
+
|
1641 |
+
// show and then visibility:hidden the element before calculating offset
|
1642 |
+
offset = el.show().css( "visibility", "hidden" ).offset(),
|
1643 |
+
|
1644 |
+
// width and height of a piece
|
1645 |
+
width = Math.ceil( el.outerWidth() / cells ),
|
1646 |
+
height = Math.ceil( el.outerHeight() / rows ),
|
1647 |
+
pieces = [],
|
1648 |
+
|
1649 |
+
// loop
|
1650 |
+
i, j, left, top, mx, my;
|
1651 |
+
|
1652 |
+
// children animate complete:
|
1653 |
+
function childComplete() {
|
1654 |
+
pieces.push( this );
|
1655 |
+
if ( pieces.length === rows * cells ) {
|
1656 |
+
animComplete();
|
1657 |
+
}
|
1658 |
+
}
|
1659 |
+
|
1660 |
+
// clone the element for each row and cell.
|
1661 |
+
for ( i = 0; i < rows ; i++ ) { // ===>
|
1662 |
+
top = offset.top + i * height;
|
1663 |
+
my = i - ( rows - 1 ) / 2 ;
|
1664 |
+
|
1665 |
+
for ( j = 0; j < cells ; j++ ) { // |||
|
1666 |
+
left = offset.left + j * width;
|
1667 |
+
mx = j - ( cells - 1 ) / 2 ;
|
1668 |
+
|
1669 |
+
// Create a clone of the now hidden main element that will be absolute positioned
|
1670 |
+
// within a wrapper div off the -left and -top equal to size of our pieces
|
1671 |
+
el
|
1672 |
+
.clone()
|
1673 |
+
.appendTo( "body" )
|
1674 |
+
.wrap( "<div></div>" )
|
1675 |
+
.css({
|
1676 |
+
position: "absolute",
|
1677 |
+
visibility: "visible",
|
1678 |
+
left: -j * width,
|
1679 |
+
top: -i * height
|
1680 |
+
})
|
1681 |
+
|
1682 |
+
// select the wrapper - make it overflow: hidden and absolute positioned based on
|
1683 |
+
// where the original was located +left and +top equal to the size of pieces
|
1684 |
+
.parent()
|
1685 |
+
.addClass( "ui-effects-explode" )
|
1686 |
+
.css({
|
1687 |
+
position: "absolute",
|
1688 |
+
overflow: "hidden",
|
1689 |
+
width: width,
|
1690 |
+
height: height,
|
1691 |
+
left: left + ( show ? mx * width : 0 ),
|
1692 |
+
top: top + ( show ? my * height : 0 ),
|
1693 |
+
opacity: show ? 0 : 1
|
1694 |
+
}).animate({
|
1695 |
+
left: left + ( show ? 0 : mx * width ),
|
1696 |
+
top: top + ( show ? 0 : my * height ),
|
1697 |
+
opacity: show ? 1 : 0
|
1698 |
+
}, o.duration || 500, o.easing, childComplete );
|
1699 |
+
}
|
1700 |
+
}
|
1701 |
+
|
1702 |
+
function animComplete() {
|
1703 |
+
el.css({
|
1704 |
+
visibility: "visible"
|
1705 |
+
});
|
1706 |
+
$( pieces ).remove();
|
1707 |
+
if ( !show ) {
|
1708 |
+
el.hide();
|
1709 |
+
}
|
1710 |
+
done();
|
1711 |
+
}
|
1712 |
+
};
|
1713 |
+
|
1714 |
+
|
1715 |
+
/*!
|
1716 |
+
* jQuery UI Effects Fade 1.11.4
|
1717 |
+
* http://jqueryui.com
|
1718 |
+
*
|
1719 |
+
* Copyright jQuery Foundation and other contributors
|
1720 |
+
* Released under the MIT license.
|
1721 |
+
* http://jquery.org/license
|
1722 |
+
*
|
1723 |
+
* http://api.jqueryui.com/fade-effect/
|
1724 |
+
*/
|
1725 |
+
|
1726 |
+
|
1727 |
+
var effectFade = $.effects.effect.fade = function( o, done ) {
|
1728 |
+
var el = $( this ),
|
1729 |
+
mode = $.effects.setMode( el, o.mode || "toggle" );
|
1730 |
+
|
1731 |
+
el.animate({
|
1732 |
+
opacity: mode
|
1733 |
+
}, {
|
1734 |
+
queue: false,
|
1735 |
+
duration: o.duration,
|
1736 |
+
easing: o.easing,
|
1737 |
+
complete: done
|
1738 |
+
});
|
1739 |
+
};
|
1740 |
+
|
1741 |
+
|
1742 |
+
/*!
|
1743 |
+
* jQuery UI Effects Fold 1.11.4
|
1744 |
+
* http://jqueryui.com
|
1745 |
+
*
|
1746 |
+
* Copyright jQuery Foundation and other contributors
|
1747 |
+
* Released under the MIT license.
|
1748 |
+
* http://jquery.org/license
|
1749 |
+
*
|
1750 |
+
* http://api.jqueryui.com/fold-effect/
|
1751 |
+
*/
|
1752 |
+
|
1753 |
+
|
1754 |
+
var effectFold = $.effects.effect.fold = function( o, done ) {
|
1755 |
+
|
1756 |
+
// Create element
|
1757 |
+
var el = $( this ),
|
1758 |
+
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
|
1759 |
+
mode = $.effects.setMode( el, o.mode || "hide" ),
|
1760 |
+
show = mode === "show",
|
1761 |
+
hide = mode === "hide",
|
1762 |
+
size = o.size || 15,
|
1763 |
+
percent = /([0-9]+)%/.exec( size ),
|
1764 |
+
horizFirst = !!o.horizFirst,
|
1765 |
+
widthFirst = show !== horizFirst,
|
1766 |
+
ref = widthFirst ? [ "width", "height" ] : [ "height", "width" ],
|
1767 |
+
duration = o.duration / 2,
|
1768 |
+
wrapper, distance,
|
1769 |
+
animation1 = {},
|
1770 |
+
animation2 = {};
|
1771 |
+
|
1772 |
+
$.effects.save( el, props );
|
1773 |
+
el.show();
|
1774 |
+
|
1775 |
+
// Create Wrapper
|
1776 |
+
wrapper = $.effects.createWrapper( el ).css({
|
1777 |
+
overflow: "hidden"
|
1778 |
+
});
|
1779 |
+
distance = widthFirst ?
|
1780 |
+
[ wrapper.width(), wrapper.height() ] :
|
1781 |
+
[ wrapper.height(), wrapper.width() ];
|
1782 |
+
|
1783 |
+
if ( percent ) {
|
1784 |
+
size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];
|
1785 |
+
}
|
1786 |
+
if ( show ) {
|
1787 |
+
wrapper.css( horizFirst ? {
|
1788 |
+
height: 0,
|
1789 |
+
width: size
|
1790 |
+
} : {
|
1791 |
+
height: size,
|
1792 |
+
width: 0
|
1793 |
+
});
|
1794 |
+
}
|
1795 |
+
|
1796 |
+
// Animation
|
1797 |
+
animation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size;
|
1798 |
+
animation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0;
|
1799 |
+
|
1800 |
+
// Animate
|
1801 |
+
wrapper
|
1802 |
+
.animate( animation1, duration, o.easing )
|
1803 |
+
.animate( animation2, duration, o.easing, function() {
|
1804 |
+
if ( hide ) {
|
1805 |
+
el.hide();
|
1806 |
+
}
|
1807 |
+
$.effects.restore( el, props );
|
1808 |
+
$.effects.removeWrapper( el );
|
1809 |
+
done();
|
1810 |
+
});
|
1811 |
+
|
1812 |
+
};
|
1813 |
+
|
1814 |
+
|
1815 |
+
/*!
|
1816 |
+
* jQuery UI Effects Highlight 1.11.4
|
1817 |
+
* http://jqueryui.com
|
1818 |
+
*
|
1819 |
+
* Copyright jQuery Foundation and other contributors
|
1820 |
+
* Released under the MIT license.
|
1821 |
+
* http://jquery.org/license
|
1822 |
+
*
|
1823 |
+
* http://api.jqueryui.com/highlight-effect/
|
1824 |
+
*/
|
1825 |
+
|
1826 |
+
|
1827 |
+
var effectHighlight = $.effects.effect.highlight = function( o, done ) {
|
1828 |
+
var elem = $( this ),
|
1829 |
+
props = [ "backgroundImage", "backgroundColor", "opacity" ],
|
1830 |
+
mode = $.effects.setMode( elem, o.mode || "show" ),
|
1831 |
+
animation = {
|
1832 |
+
backgroundColor: elem.css( "backgroundColor" )
|
1833 |
+
};
|
1834 |
+
|
1835 |
+
if (mode === "hide") {
|
1836 |
+
animation.opacity = 0;
|
1837 |
+
}
|
1838 |
+
|
1839 |
+
$.effects.save( elem, props );
|
1840 |
+
|
1841 |
+
elem
|
1842 |
+
.show()
|
1843 |
+
.css({
|
1844 |
+
backgroundImage: "none",
|
1845 |
+
backgroundColor: o.color || "#ffff99"
|
1846 |
+
})
|
1847 |
+
.animate( animation, {
|
1848 |
+
queue: false,
|
1849 |
+
duration: o.duration,
|
1850 |
+
easing: o.easing,
|
1851 |
+
complete: function() {
|
1852 |
+
if ( mode === "hide" ) {
|
1853 |
+
elem.hide();
|
1854 |
+
}
|
1855 |
+
$.effects.restore( elem, props );
|
1856 |
+
done();
|
1857 |
+
}
|
1858 |
+
});
|
1859 |
+
};
|
1860 |
+
|
1861 |
+
|
1862 |
+
/*!
|
1863 |
+
* jQuery UI Effects Size 1.11.4
|
1864 |
+
* http://jqueryui.com
|
1865 |
+
*
|
1866 |
+
* Copyright jQuery Foundation and other contributors
|
1867 |
+
* Released under the MIT license.
|
1868 |
+
* http://jquery.org/license
|
1869 |
+
*
|
1870 |
+
* http://api.jqueryui.com/size-effect/
|
1871 |
+
*/
|
1872 |
+
|
1873 |
+
|
1874 |
+
var effectSize = $.effects.effect.size = function( o, done ) {
|
1875 |
+
|
1876 |
+
// Create element
|
1877 |
+
var original, baseline, factor,
|
1878 |
+
el = $( this ),
|
1879 |
+
props0 = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ],
|
1880 |
+
|
1881 |
+
// Always restore
|
1882 |
+
props1 = [ "position", "top", "bottom", "left", "right", "overflow", "opacity" ],
|
1883 |
+
|
1884 |
+
// Copy for children
|
1885 |
+
props2 = [ "width", "height", "overflow" ],
|
1886 |
+
cProps = [ "fontSize" ],
|
1887 |
+
vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
|
1888 |
+
hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],
|
1889 |
+
|
1890 |
+
// Set options
|
1891 |
+
mode = $.effects.setMode( el, o.mode || "effect" ),
|
1892 |
+
restore = o.restore || mode !== "effect",
|
1893 |
+
scale = o.scale || "both",
|
1894 |
+
origin = o.origin || [ "middle", "center" ],
|
1895 |
+
position = el.css( "position" ),
|
1896 |
+
props = restore ? props0 : props1,
|
1897 |
+
zero = {
|
1898 |
+
height: 0,
|
1899 |
+
width: 0,
|
1900 |
+
outerHeight: 0,
|
1901 |
+
outerWidth: 0
|
1902 |
+
};
|
1903 |
+
|
1904 |
+
if ( mode === "show" ) {
|
1905 |
+
el.show();
|
1906 |
+
}
|
1907 |
+
original = {
|
1908 |
+
height: el.height(),
|
1909 |
+
width: el.width(),
|
1910 |
+
outerHeight: el.outerHeight(),
|
1911 |
+
outerWidth: el.outerWidth()
|
1912 |
+
};
|
1913 |
+
|
1914 |
+
if ( o.mode === "toggle" && mode === "show" ) {
|
1915 |
+
el.from = o.to || zero;
|
1916 |
+
el.to = o.from || original;
|
1917 |
+
} else {
|
1918 |
+
el.from = o.from || ( mode === "show" ? zero : original );
|
1919 |
+
el.to = o.to || ( mode === "hide" ? zero : original );
|
1920 |
+
}
|
1921 |
+
|
1922 |
+
// Set scaling factor
|
1923 |
+
factor = {
|
1924 |
+
from: {
|
1925 |
+
y: el.from.height / original.height,
|
1926 |
+
x: el.from.width / original.width
|
1927 |
+
},
|
1928 |
+
to: {
|
1929 |
+
y: el.to.height / original.height,
|
1930 |
+
x: el.to.width / original.width
|
1931 |
+
}
|
1932 |
+
};
|
1933 |
+
|
1934 |
+
// Scale the css box
|
1935 |
+
if ( scale === "box" || scale === "both" ) {
|
1936 |
+
|
1937 |
+
// Vertical props scaling
|
1938 |
+
if ( factor.from.y !== factor.to.y ) {
|
1939 |
+
props = props.concat( vProps );
|
1940 |
+
el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from );
|
1941 |
+
el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to );
|
1942 |
+
}
|
1943 |
+
|
1944 |
+
// Horizontal props scaling
|
1945 |
+
if ( factor.from.x !== factor.to.x ) {
|
1946 |
+
props = props.concat( hProps );
|
1947 |
+
el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from );
|
1948 |
+
el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to );
|
1949 |
+
}
|
1950 |
+
}
|
1951 |
+
|
1952 |
+
// Scale the content
|
1953 |
+
if ( scale === "content" || scale === "both" ) {
|
1954 |
+
|
1955 |
+
// Vertical props scaling
|
1956 |
+
if ( factor.from.y !== factor.to.y ) {
|
1957 |
+
props = props.concat( cProps ).concat( props2 );
|
1958 |
+
el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from );
|
1959 |
+
el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to );
|
1960 |
+
}
|
1961 |
+
}
|
1962 |
+
|
1963 |
+
$.effects.save( el, props );
|
1964 |
+
el.show();
|
1965 |
+
$.effects.createWrapper( el );
|
1966 |
+
el.css( "overflow", "hidden" ).css( el.from );
|
1967 |
+
|
1968 |
+
// Adjust
|
1969 |
+
if (origin) { // Calculate baseline shifts
|
1970 |
+
baseline = $.effects.getBaseline( origin, original );
|
1971 |
+
el.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y;
|
1972 |
+
el.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x;
|
1973 |
+
el.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y;
|
1974 |
+
el.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x;
|
1975 |
+
}
|
1976 |
+
el.css( el.from ); // set top & left
|
1977 |
+
|
1978 |
+
// Animate
|
1979 |
+
if ( scale === "content" || scale === "both" ) { // Scale the children
|
1980 |
+
|
1981 |
+
// Add margins/font-size
|
1982 |
+
vProps = vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps);
|
1983 |
+
hProps = hProps.concat([ "marginLeft", "marginRight" ]);
|
1984 |
+
props2 = props0.concat(vProps).concat(hProps);
|
1985 |
+
|
1986 |
+
el.find( "*[width]" ).each( function() {
|
1987 |
+
var child = $( this ),
|
1988 |
+
c_original = {
|
1989 |
+
height: child.height(),
|
1990 |
+
width: child.width(),
|
1991 |
+
outerHeight: child.outerHeight(),
|
1992 |
+
outerWidth: child.outerWidth()
|
1993 |
+
};
|
1994 |
+
if (restore) {
|
1995 |
+
$.effects.save(child, props2);
|
1996 |
+
}
|
1997 |
+
|
1998 |
+
child.from = {
|
1999 |
+
height: c_original.height * factor.from.y,
|
2000 |
+
width: c_original.width * factor.from.x,
|
2001 |
+
outerHeight: c_original.outerHeight * factor.from.y,
|
2002 |
+
outerWidth: c_original.outerWidth * factor.from.x
|
2003 |
+
};
|
2004 |
+
child.to = {
|
2005 |
+
height: c_original.height * factor.to.y,
|
2006 |
+
width: c_original.width * factor.to.x,
|
2007 |
+
outerHeight: c_original.height * factor.to.y,
|
2008 |
+
outerWidth: c_original.width * factor.to.x
|
2009 |
+
};
|
2010 |
+
|
2011 |
+
// Vertical props scaling
|
2012 |
+
if ( factor.from.y !== factor.to.y ) {
|
2013 |
+
child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from );
|
2014 |
+
child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to );
|
2015 |
+
}
|
2016 |
+
|
2017 |
+
// Horizontal props scaling
|
2018 |
+
if ( factor.from.x !== factor.to.x ) {
|
2019 |
+
child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from );
|
2020 |
+
child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to );
|
2021 |
+
}
|
2022 |
+
|
2023 |
+
// Animate children
|
2024 |
+
child.css( child.from );
|
2025 |
+
child.animate( child.to, o.duration, o.easing, function() {
|
2026 |
+
|
2027 |
+
// Restore children
|
2028 |
+
if ( restore ) {
|
2029 |
+
$.effects.restore( child, props2 );
|
2030 |
+
}
|
2031 |
+
});
|
2032 |
+
});
|
2033 |
+
}
|
2034 |
+
|
2035 |
+
// Animate
|
2036 |
+
el.animate( el.to, {
|
2037 |
+
queue: false,
|
2038 |
+
duration: o.duration,
|
2039 |
+
easing: o.easing,
|
2040 |
+
complete: function() {
|
2041 |
+
if ( el.to.opacity === 0 ) {
|
2042 |
+
el.css( "opacity", el.from.opacity );
|
2043 |
+
}
|
2044 |
+
if ( mode === "hide" ) {
|
2045 |
+
el.hide();
|
2046 |
+
}
|
2047 |
+
$.effects.restore( el, props );
|
2048 |
+
if ( !restore ) {
|
2049 |
+
|
2050 |
+
// we need to calculate our new positioning based on the scaling
|
2051 |
+
if ( position === "static" ) {
|
2052 |
+
el.css({
|
2053 |
+
position: "relative",
|
2054 |
+
top: el.to.top,
|
2055 |
+
left: el.to.left
|
2056 |
+
});
|
2057 |
+
} else {
|
2058 |
+
$.each([ "top", "left" ], function( idx, pos ) {
|
2059 |
+
el.css( pos, function( _, str ) {
|
2060 |
+
var val = parseInt( str, 10 ),
|
2061 |
+
toRef = idx ? el.to.left : el.to.top;
|
2062 |
+
|
2063 |
+
// if original was "auto", recalculate the new value from wrapper
|
2064 |
+
if ( str === "auto" ) {
|
2065 |
+
return toRef + "px";
|
2066 |
+
}
|
2067 |
+
|
2068 |
+
return val + toRef + "px";
|
2069 |
+
});
|
2070 |
+
});
|
2071 |
+
}
|
2072 |
+
}
|
2073 |
+
|
2074 |
+
$.effects.removeWrapper( el );
|
2075 |
+
done();
|
2076 |
+
}
|
2077 |
+
});
|
2078 |
+
|
2079 |
+
};
|
2080 |
+
|
2081 |
+
|
2082 |
+
/*!
|
2083 |
+
* jQuery UI Effects Scale 1.11.4
|
2084 |
+
* http://jqueryui.com
|
2085 |
+
*
|
2086 |
+
* Copyright jQuery Foundation and other contributors
|
2087 |
+
* Released under the MIT license.
|
2088 |
+
* http://jquery.org/license
|
2089 |
+
*
|
2090 |
+
* http://api.jqueryui.com/scale-effect/
|
2091 |
+
*/
|
2092 |
+
|
2093 |
+
|
2094 |
+
var effectScale = $.effects.effect.scale = function( o, done ) {
|
2095 |
+
|
2096 |
+
// Create element
|
2097 |
+
var el = $( this ),
|
2098 |
+
options = $.extend( true, {}, o ),
|
2099 |
+
mode = $.effects.setMode( el, o.mode || "effect" ),
|
2100 |
+
percent = parseInt( o.percent, 10 ) ||
|
2101 |
+
( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === "hide" ? 0 : 100 ) ),
|
2102 |
+
direction = o.direction || "both",
|
2103 |
+
origin = o.origin,
|
2104 |
+
original = {
|
2105 |
+
height: el.height(),
|
2106 |
+
width: el.width(),
|
2107 |
+
outerHeight: el.outerHeight(),
|
2108 |
+
outerWidth: el.outerWidth()
|
2109 |
+
},
|
2110 |
+
factor = {
|
2111 |
+
y: direction !== "horizontal" ? (percent / 100) : 1,
|
2112 |
+
x: direction !== "vertical" ? (percent / 100) : 1
|
2113 |
+
};
|
2114 |
+
|
2115 |
+
// We are going to pass this effect to the size effect:
|
2116 |
+
options.effect = "size";
|
2117 |
+
options.queue = false;
|
2118 |
+
options.complete = done;
|
2119 |
+
|
2120 |
+
// Set default origin and restore for show/hide
|
2121 |
+
if ( mode !== "effect" ) {
|
2122 |
+
options.origin = origin || [ "middle", "center" ];
|
2123 |
+
options.restore = true;
|
2124 |
+
}
|
2125 |
+
|
2126 |
+
options.from = o.from || ( mode === "show" ? {
|
2127 |
+
height: 0,
|
2128 |
+
width: 0,
|
2129 |
+
outerHeight: 0,
|
2130 |
+
outerWidth: 0
|
2131 |
+
} : original );
|
2132 |
+
options.to = {
|
2133 |
+
height: original.height * factor.y,
|
2134 |
+
width: original.width * factor.x,
|
2135 |
+
outerHeight: original.outerHeight * factor.y,
|
2136 |
+
outerWidth: original.outerWidth * factor.x
|
2137 |
+
};
|
2138 |
+
|
2139 |
+
// Fade option to support puff
|
2140 |
+
if ( options.fade ) {
|
2141 |
+
if ( mode === "show" ) {
|
2142 |
+
options.from.opacity = 0;
|
2143 |
+
options.to.opacity = 1;
|
2144 |
+
}
|
2145 |
+
if ( mode === "hide" ) {
|
2146 |
+
options.from.opacity = 1;
|
2147 |
+
options.to.opacity = 0;
|
2148 |
+
}
|
2149 |
+
}
|
2150 |
+
|
2151 |
+
// Animate
|
2152 |
+
el.effect( options );
|
2153 |
+
|
2154 |
+
};
|
2155 |
+
|
2156 |
+
|
2157 |
+
/*!
|
2158 |
+
* jQuery UI Effects Puff 1.11.4
|
2159 |
+
* http://jqueryui.com
|
2160 |
+
*
|
2161 |
+
* Copyright jQuery Foundation and other contributors
|
2162 |
+
* Released under the MIT license.
|
2163 |
+
* http://jquery.org/license
|
2164 |
+
*
|
2165 |
+
* http://api.jqueryui.com/puff-effect/
|
2166 |
+
*/
|
2167 |
+
|
2168 |
+
|
2169 |
+
var effectPuff = $.effects.effect.puff = function( o, done ) {
|
2170 |
+
var elem = $( this ),
|
2171 |
+
mode = $.effects.setMode( elem, o.mode || "hide" ),
|
2172 |
+
hide = mode === "hide",
|
2173 |
+
percent = parseInt( o.percent, 10 ) || 150,
|
2174 |
+
factor = percent / 100,
|
2175 |
+
original = {
|
2176 |
+
height: elem.height(),
|
2177 |
+
width: elem.width(),
|
2178 |
+
outerHeight: elem.outerHeight(),
|
2179 |
+
outerWidth: elem.outerWidth()
|
2180 |
+
};
|
2181 |
+
|
2182 |
+
$.extend( o, {
|
2183 |
+
effect: "scale",
|
2184 |
+
queue: false,
|
2185 |
+
fade: true,
|
2186 |
+
mode: mode,
|
2187 |
+
complete: done,
|
2188 |
+
percent: hide ? percent : 100,
|
2189 |
+
from: hide ?
|
2190 |
+
original :
|
2191 |
+
{
|
2192 |
+
height: original.height * factor,
|
2193 |
+
width: original.width * factor,
|
2194 |
+
outerHeight: original.outerHeight * factor,
|
2195 |
+
outerWidth: original.outerWidth * factor
|
2196 |
+
}
|
2197 |
+
});
|
2198 |
+
|
2199 |
+
elem.effect( o );
|
2200 |
+
};
|
2201 |
+
|
2202 |
+
|
2203 |
+
/*!
|
2204 |
+
* jQuery UI Effects Pulsate 1.11.4
|
2205 |
+
* http://jqueryui.com
|
2206 |
+
*
|
2207 |
+
* Copyright jQuery Foundation and other contributors
|
2208 |
+
* Released under the MIT license.
|
2209 |
+
* http://jquery.org/license
|
2210 |
+
*
|
2211 |
+
* http://api.jqueryui.com/pulsate-effect/
|
2212 |
+
*/
|
2213 |
+
|
2214 |
+
|
2215 |
+
var effectPulsate = $.effects.effect.pulsate = function( o, done ) {
|
2216 |
+
var elem = $( this ),
|
2217 |
+
mode = $.effects.setMode( elem, o.mode || "show" ),
|
2218 |
+
show = mode === "show",
|
2219 |
+
hide = mode === "hide",
|
2220 |
+
showhide = ( show || mode === "hide" ),
|
2221 |
+
|
2222 |
+
// showing or hiding leaves of the "last" animation
|
2223 |
+
anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
|
2224 |
+
duration = o.duration / anims,
|
2225 |
+
animateTo = 0,
|
2226 |
+
queue = elem.queue(),
|
2227 |
+
queuelen = queue.length,
|
2228 |
+
i;
|
2229 |
+
|
2230 |
+
if ( show || !elem.is(":visible")) {
|
2231 |
+
elem.css( "opacity", 0 ).show();
|
2232 |
+
animateTo = 1;
|
2233 |
+
}
|
2234 |
+
|
2235 |
+
// anims - 1 opacity "toggles"
|
2236 |
+
for ( i = 1; i < anims; i++ ) {
|
2237 |
+
elem.animate({
|
2238 |
+
opacity: animateTo
|
2239 |
+
}, duration, o.easing );
|
2240 |
+
animateTo = 1 - animateTo;
|
2241 |
+
}
|
2242 |
+
|
2243 |
+
elem.animate({
|
2244 |
+
opacity: animateTo
|
2245 |
+
}, duration, o.easing);
|
2246 |
+
|
2247 |
+
elem.queue(function() {
|
2248 |
+
if ( hide ) {
|
2249 |
+
elem.hide();
|
2250 |
+
}
|
2251 |
+
done();
|
2252 |
+
});
|
2253 |
+
|
2254 |
+
// We just queued up "anims" animations, we need to put them next in the queue
|
2255 |
+
if ( queuelen > 1 ) {
|
2256 |
+
queue.splice.apply( queue,
|
2257 |
+
[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
|
2258 |
+
}
|
2259 |
+
elem.dequeue();
|
2260 |
+
};
|
2261 |
+
|
2262 |
+
|
2263 |
+
/*!
|
2264 |
+
* jQuery UI Effects Shake 1.11.4
|
2265 |
+
* http://jqueryui.com
|
2266 |
+
*
|
2267 |
+
* Copyright jQuery Foundation and other contributors
|
2268 |
+
* Released under the MIT license.
|
2269 |
+
* http://jquery.org/license
|
2270 |
+
*
|
2271 |
+
* http://api.jqueryui.com/shake-effect/
|
2272 |
+
*/
|
2273 |
+
|
2274 |
+
|
2275 |
+
var effectShake = $.effects.effect.shake = function( o, done ) {
|
2276 |
+
|
2277 |
+
var el = $( this ),
|
2278 |
+
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
|
2279 |
+
mode = $.effects.setMode( el, o.mode || "effect" ),
|
2280 |
+
direction = o.direction || "left",
|
2281 |
+
distance = o.distance || 20,
|
2282 |
+
times = o.times || 3,
|
2283 |
+
anims = times * 2 + 1,
|
2284 |
+
speed = Math.round( o.duration / anims ),
|
2285 |
+
ref = (direction === "up" || direction === "down") ? "top" : "left",
|
2286 |
+
positiveMotion = (direction === "up" || direction === "left"),
|
2287 |
+
animation = {},
|
2288 |
+
animation1 = {},
|
2289 |
+
animation2 = {},
|
2290 |
+
i,
|
2291 |
+
|
2292 |
+
// we will need to re-assemble the queue to stack our animations in place
|
2293 |
+
queue = el.queue(),
|
2294 |
+
queuelen = queue.length;
|
2295 |
+
|
2296 |
+
$.effects.save( el, props );
|
2297 |
+
el.show();
|
2298 |
+
$.effects.createWrapper( el );
|
2299 |
+
|
2300 |
+
// Animation
|
2301 |
+
animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
|
2302 |
+
animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
|
2303 |
+
animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;
|
2304 |
+
|
2305 |
+
// Animate
|
2306 |
+
el.animate( animation, speed, o.easing );
|
2307 |
+
|
2308 |
+
// Shakes
|
2309 |
+
for ( i = 1; i < times; i++ ) {
|
2310 |
+
el.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing );
|
2311 |
+
}
|
2312 |
+
el
|
2313 |
+
.animate( animation1, speed, o.easing )
|
2314 |
+
.animate( animation, speed / 2, o.easing )
|
2315 |
+
.queue(function() {
|
2316 |
+
if ( mode === "hide" ) {
|
2317 |
+
el.hide();
|
2318 |
+
}
|
2319 |
+
$.effects.restore( el, props );
|
2320 |
+
$.effects.removeWrapper( el );
|
2321 |
+
done();
|
2322 |
+
});
|
2323 |
+
|
2324 |
+
// inject all the animations we just queued to be first in line (after "inprogress")
|
2325 |
+
if ( queuelen > 1) {
|
2326 |
+
queue.splice.apply( queue,
|
2327 |
+
[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
|
2328 |
+
}
|
2329 |
+
el.dequeue();
|
2330 |
+
|
2331 |
+
};
|
2332 |
+
|
2333 |
+
|
2334 |
+
/*!
|
2335 |
+
* jQuery UI Effects Slide 1.11.4
|
2336 |
+
* http://jqueryui.com
|
2337 |
+
*
|
2338 |
+
* Copyright jQuery Foundation and other contributors
|
2339 |
+
* Released under the MIT license.
|
2340 |
+
* http://jquery.org/license
|
2341 |
+
*
|
2342 |
+
* http://api.jqueryui.com/slide-effect/
|
2343 |
+
*/
|
2344 |
+
|
2345 |
+
|
2346 |
+
var effectSlide = $.effects.effect.slide = function( o, done ) {
|
2347 |
+
|
2348 |
+
// Create element
|
2349 |
+
var el = $( this ),
|
2350 |
+
props = [ "position", "top", "bottom", "left", "right", "width", "height" ],
|
2351 |
+
mode = $.effects.setMode( el, o.mode || "show" ),
|
2352 |
+
show = mode === "show",
|
2353 |
+
direction = o.direction || "left",
|
2354 |
+
ref = (direction === "up" || direction === "down") ? "top" : "left",
|
2355 |
+
positiveMotion = (direction === "up" || direction === "left"),
|
2356 |
+
distance,
|
2357 |
+
animation = {};
|
2358 |
+
|
2359 |
+
// Adjust
|
2360 |
+
$.effects.save( el, props );
|
2361 |
+
el.show();
|
2362 |
+
distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true );
|
2363 |
+
|
2364 |
+
$.effects.createWrapper( el ).css({
|
2365 |
+
overflow: "hidden"
|
2366 |
+
});
|
2367 |
+
|
2368 |
+
if ( show ) {
|
2369 |
+
el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -distance) : distance );
|
2370 |
+
}
|
2371 |
+
|
2372 |
+
// Animation
|
2373 |
+
animation[ ref ] = ( show ?
|
2374 |
+
( positiveMotion ? "+=" : "-=") :
|
2375 |
+
( positiveMotion ? "-=" : "+=")) +
|
2376 |
+
distance;
|
2377 |
+
|
2378 |
+
// Animate
|
2379 |
+
el.animate( animation, {
|
2380 |
+
queue: false,
|
2381 |
+
duration: o.duration,
|
2382 |
+
easing: o.easing,
|
2383 |
+
complete: function() {
|
2384 |
+
if ( mode === "hide" ) {
|
2385 |
+
el.hide();
|
2386 |
+
}
|
2387 |
+
$.effects.restore( el, props );
|
2388 |
+
$.effects.removeWrapper( el );
|
2389 |
+
done();
|
2390 |
+
}
|
2391 |
+
});
|
2392 |
+
};
|
2393 |
+
|
2394 |
+
|
2395 |
+
/*!
|
2396 |
+
* jQuery UI Effects Transfer 1.11.4
|
2397 |
+
* http://jqueryui.com
|
2398 |
+
*
|
2399 |
+
* Copyright jQuery Foundation and other contributors
|
2400 |
+
* Released under the MIT license.
|
2401 |
+
* http://jquery.org/license
|
2402 |
+
*
|
2403 |
+
* http://api.jqueryui.com/transfer-effect/
|
2404 |
+
*/
|
2405 |
+
|
2406 |
+
|
2407 |
+
var effectTransfer = $.effects.effect.transfer = function( o, done ) {
|
2408 |
+
var elem = $( this ),
|
2409 |
+
target = $( o.to ),
|
2410 |
+
targetFixed = target.css( "position" ) === "fixed",
|
2411 |
+
body = $("body"),
|
2412 |
+
fixTop = targetFixed ? body.scrollTop() : 0,
|
2413 |
+
fixLeft = targetFixed ? body.scrollLeft() : 0,
|
2414 |
+
endPosition = target.offset(),
|
2415 |
+
animation = {
|
2416 |
+
top: endPosition.top - fixTop,
|
2417 |
+
left: endPosition.left - fixLeft,
|
2418 |
+
height: target.innerHeight(),
|
2419 |
+
width: target.innerWidth()
|
2420 |
+
},
|
2421 |
+
startPosition = elem.offset(),
|
2422 |
+
transfer = $( "<div class='ui-effects-transfer'></div>" )
|
2423 |
+
.appendTo( document.body )
|
2424 |
+
.addClass( o.className )
|
2425 |
+
.css({
|
2426 |
+
top: startPosition.top - fixTop,
|
2427 |
+
left: startPosition.left - fixLeft,
|
2428 |
+
height: elem.innerHeight(),
|
2429 |
+
width: elem.innerWidth(),
|
2430 |
+
position: targetFixed ? "fixed" : "absolute"
|
2431 |
+
})
|
2432 |
+
.animate( animation, o.duration, o.easing, function() {
|
2433 |
+
transfer.remove();
|
2434 |
+
done();
|
2435 |
+
});
|
2436 |
+
};
|
2437 |
+
|
2438 |
+
|
2439 |
+
|
2440 |
+
}));
|