Slideshow Gallery - Version 1.6

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 Icon 128x128 Slideshow Gallery
Version 1.6
Comparing to
See all releases

Code changes from version 1.5.3.4 to 1.6

Files changed (59) hide show
  1. css/colorbox.css +41 -9
  2. helpers/db.php +22 -0
  3. helpers/form.php +1 -1
  4. helpers/html.php +4 -16
  5. helpers/metabox.php +4 -0
  6. js/colorbox.js +0 -1086
  7. models/slide.php +9 -6
  8. models/slideshow.php +4 -4
  9. readme.txt +32 -2
  10. slideshow-gallery-plugin.php +52 -22
  11. slideshow-gallery.php +200 -121
  12. vendors/class.paginate.php +7 -1
  13. views/admin/err-top.php +1 -1
  14. views/admin/galleries/hardcode.php +1 -1
  15. views/admin/galleries/index.php +28 -5
  16. views/admin/galleries/save.php +6 -6
  17. views/admin/galleries/view.php +4 -4
  18. views/admin/head.php +6 -0
  19. views/admin/lite-upgrade.php +2 -2
  20. views/admin/metaboxes/settings-general.php +64 -2
  21. views/admin/metaboxes/settings-postspages.php +63 -0
  22. views/admin/metaboxes/settings-styles.php +9 -2
  23. views/admin/msg-top.php +1 -1
  24. views/admin/settings-submitserial.php +27 -0
  25. views/admin/settings.php +1 -1
  26. views/admin/slides/index.php +2 -2
  27. views/admin/slides/loop.php +63 -10
  28. views/admin/slides/order.php +1 -1
  29. views/admin/slides/save-multiple.php +2 -2
  30. views/admin/slides/save.php +42 -42
  31. views/default/css copy.php +43 -0
  32. views/default/css-responsive.php +18 -16
  33. views/default/css.php +13 -7
  34. views/default/css/colorbox.css +188 -36
  35. views/default/gallery.php +24 -20
  36. views/default/images/colorbox/border.png +0 -0
  37. views/default/images/colorbox/controls.png +0 -0
  38. views/default/images/colorbox/ie6/borderBottomCenter.png +0 -0
  39. views/default/images/colorbox/ie6/borderBottomLeft.png +0 -0
  40. views/default/images/colorbox/ie6/borderBottomRight.png +0 -0
  41. views/default/images/colorbox/ie6/borderMiddleLeft.png +0 -0
  42. views/default/images/colorbox/ie6/borderMiddleRight.png +0 -0
  43. views/default/images/colorbox/ie6/borderTopCenter.png +0 -0
  44. views/default/images/colorbox/ie6/borderTopLeft.png +0 -0
  45. views/default/images/colorbox/ie6/borderTopRight.png +0 -0
  46. views/default/images/colorbox/ie6/index.php +1 -0
  47. views/default/images/colorbox/index.php +1 -0
  48. views/default/images/colorbox/loading.gif +0 -0
  49. views/default/images/colorbox/loading_background.png +0 -0
  50. views/default/images/colorbox/overlay.png +0 -0
  51. views/default/images/left.gif +0 -0
  52. views/default/images/link.gif +0 -0
  53. views/default/images/right.gif +0 -0
  54. views/default/images/scroll-left.gif +0 -0
  55. views/default/images/scroll-right.gif +0 -0
  56. views/default/images/spinner.gif +0 -0
  57. views/default/js/colorbox.js +0 -1086
  58. views/default/js/gallery.js +86 -17
  59. 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
- /* 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
- #cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%;}
 
 
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: -24px;
37
  left: -11px;
38
  color: #ccc;
39
- font-size: 110%;
40
  font-weight: bold;
41
  }
42
  #cboxCurrent{position: absolute;
43
- top: -24px;
44
  right: 11px;
45
  color: #ccc;
46
- font-size: 110%;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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:16px;
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: -24px;
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 = '', $args = array()) {
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 = '', $href = '/', $args = array()) {
77
  $defaults = array(
78
- 'title' => (empty($args['title'])) ? $title : $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 = '', $el = "p") {
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));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
- $filename = GalleryHtmlHelper::sanitize($file_name) . '.' . $file_ext;
 
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, $image_ext) !== false) {
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 = @fopen($filefull, "w");
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&#37;) 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&#37;) 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&#37;) 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&#37;) 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.3
7
- Stable tag: 1.5.3.4
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.5.3.4';
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
- _e('Slides have been ordered', $this -> plugin_name);
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.5.3.4") < 0) {
281
 
282
  $this -> initialize_options();
283
 
284
- $version = "1.5.3.4";
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
- $data = $paginate -> start_paging($_GET[$this -> pre . 'page']);
 
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
- if (!empty($_GET['page']) && in_array($_GET['page'], (array) $this -> sections)) {
 
 
 
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 ($_GET['page'] == 'slideshow-settings') {
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 ($_GET['page'] == "slideshow-slides" && $_GET['method'] == "order") {
586
  wp_enqueue_script('jquery-ui-sortable');
587
  }
588
 
589
- if ($_GET['page'] == $this -> sections -> slides && ($_GET['method'] == "save" || $_GET['method'] == "save-multiple")) {
590
  wp_enqueue_media();
591
  }
592
 
593
  add_thickbox();
594
  }
595
 
596
- wp_enqueue_script('colorbox', $this -> render_url('js/colorbox.js', "admin"), array('jquery'), '1.3.19');
 
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', $this -> render_url('js/colorbox.js', "default"), array('jquery'), '1.3.19');
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('fontawesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css', false, '4.4.0', "all");
 
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>&lt;?php if (function_exists('slideshow')) { slideshow($output = true, $post_id = false, $gallery_id = false, $params = array()); } ?&gt;</code>.
9
- Version: 1.5.3.4
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 Gallery extends GalleryPlugin {
30
 
31
- function Gallery() {
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 &amp; 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 &amp; 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
- if (!empty($_GET[$this -> pre . 'message'])) {
 
206
  $msg_type = (!empty($_GET[$this -> pre . 'updated'])) ? 'msg' : 'err';
207
- call_user_func(array($this, 'render_' . $msg_type), $_GET[$this -> pre . 'message']);
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
- if (!$this -> ci_serial_valid() && (empty($_GET['page']) || $_GET['page'] != $this -> sections -> submitserial)) {
 
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' : 'slide'),
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('created', "DESC"), $productsnumber);
373
  break;
374
  case 'featured' :
375
- $products = $wpcoDb -> find_all(array('featured' => "1"), false, array('created', "DESC"), $productsnumber);
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' => 'post', // posts only
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
- list($orderf, $orderd) = $orderby;
 
 
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
- $slides = $this -> Slide -> find_all(null, null, $orderby);
 
 
 
 
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 ($_GET['method']) {
511
  case 'delete' :
512
- if (!empty($_GET['id'])) {
513
- if ($this -> Slide -> delete($_GET['id'])) {
 
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
- $orderfield = (empty($_GET['orderby'])) ? 'modified' : $_GET['orderby'];
643
- $orderdirection = (empty($_GET['order'])) ? 'DESC' : strtoupper($_GET['order']);
644
- $order = array($orderfield, $orderdirection);
645
- $data = $this -> paginate('Slide', false, false, false, false, 50, $order);
646
- $this -> render('slides' . DS . 'index', array('slides' => $data[$this -> Slide -> model], 'paginate' => $data['Paginate']), true, 'admin');
 
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
- $data = $this -> paginate('GallerySlides', "*", $this -> sections -> galleries . '&method=view&id=' . $gallery -> id, array('gallery_id' => $gallery -> id));
 
 
 
 
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
- $orderfield = (empty($_GET['orderby'])) ? 'modified' : $_GET['orderby'];
739
- $orderdirection = (empty($_GET['order'])) ? 'DESC' : strtoupper($_GET['order']);
740
- $order = array($orderfield, $orderdirection);
741
- $data = $this -> paginate('Gallery', false, false, false, false, 10, $order);
742
- $this -> render('galleries' . DS . 'index', array('galleries' => $data[$this -> Gallery -> model], 'paginate' => $data['Paginate']), true, 'admin');
 
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 Gallery();
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 Gallery();
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>&lt;?php if (function_exists('slideshow')) { slideshow($output = true, $post_id = false, $gallery_id = false, $params = array()); } ?&gt;</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 &amp; 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 &amp; 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 `" . $osortby . "` " . $osort . " LIMIT " . $this -> begRecord . " , " . $this -> per_page . ";";
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><?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; ?>
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
- <h2><?php echo sprintf(__('Hardcode Gallery: %s', $this -> plugin_name), __($gallery -> title)); ?></h2>
9
  <div style="float:none;" class="subsubsub"><?php echo $this -> Html -> link(__('&larr; 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(__('&larr; 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
- <h2><?php _e('Manage Galleries', $this -> plugin_name); ?> <?php echo $this -> Html -> link(__('Add New', $this -> plugin_name), $this -> url . '&amp;method=save', array('class' => "add-new-h2")); ?></h2>
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("Y-m-d", strtotime($gallery -> modified)); ?></abbr></td>
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 . '&amp;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
- <h2><?php _e('Save a Gallery', $this -> plugin_name); ?></h2>
10
 
11
  <form action="<?php echo $this -> url; ?>&amp;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; ?>&amp;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
- <h2><?php echo sprintf(__('View Gallery: %s', $this -> plugin_name), __($gallery -> title)); ?></h2>
9
 
10
  <div style="float:none;" class="subsubsub"><?php echo $this -> Html -> link(__('&larr; 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; ?>&amp;method=save&amp;id=<?php echo $gallery -> id; ?>" class="button" title="<?php _e('Edit', $this -> plugin_name); ?>"><?php _e('Edit Gallery', $this -> plugin_name); ?></a>
15
- <a href="?page=<?php echo $this -> sections -> galleries; ?>&amp;method=hardcode&amp;id=<?php echo $gallery -> id; ?>" class="button" title="<?php _e('Hardcode', $this -> plugin_name); ?>"><?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; ?>&amp;method=delete&amp;id=<?php echo $gallery -> id; ?>" class="button button-highlighted" title="<?php _e('Delete', $this -> plugin_name); ?>"><?php _e('Delete Gallery', $this -> plugin_name); ?></a>
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(__('&larr; 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; ?>&amp;method=save&amp;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; ?>&amp;method=hardcode&amp;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; ?>&amp;method=delete&amp;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
- <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>
27
- <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>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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><?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; ?>
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
- <h2><?php _e('Configuration Settings', $this -> plugin_name); ?></h2>
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
- <h2><?php _e('Manage Slides', $this -> plugin_name); ?>
9
  <?php echo $this -> Html -> link(__('Add New', $this -> plugin_name), $this -> url . '&amp;method=save', array('class' => "add-new-h2")); ?>
10
- <?php echo $this -> Html -> link(__('Add Multiple', $this -> plugin_name), $this -> url . '&amp;method=save-multiple', array('class' => "add-new-h2")); ?></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 . '&amp;method=save', array('class' => "add-new-h2")); ?>
10
+ <?php echo $this -> Html -> link(__('Add Multiple', $this -> plugin_name), $this -> url . '&amp;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; ?>&amp;method=order&amp;gallery_id=<?php echo $gallery -> id; ?>" class="button"><?php _e('Order Slides', $this -> plugin_name); ?></a>
16
  <?php else : ?>
17
- <a href="<?php echo $this -> url; ?>&amp;method=order" title="<?php _e('Order all your slides', $this -> plugin_name); ?>" class="button"><?php _e('Order Slides', $this -> plugin_name); ?></a>
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 style="color:green;"><?php _e('Yes', $this -> plugin_name); ?></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"><?php _e('No', $this -> plugin_name); ?></span>
157
  <?php endif; ?>
158
  </td>
159
- <td><abbr title="<?php echo $slide -> modified; ?>"><?php echo date("Y-m-d", strtotime($slide -> modified)); ?></abbr></td>
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; ?>&amp;method=order&amp;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; ?>&amp;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
- <h2><?php _e('Order Slides', $this -> plugin_name); ?><?php echo (!empty($gallery)) ? ': ' . __($gallery -> title) : ''; ?></h2>
9
 
10
  <div style="float:none;" class="subsubsub">
11
  <a href="<?php echo $this -> url; ?>"><?php _e('&larr; 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('&larr; 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
- <h2><?php _e('Save Multiple Slides', $this -> plugin_name); ?></h2>
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
- <h2><?php _e('Save a Slide', $this -> plugin_name); ?></h2>
17
 
18
  <form action="<?php echo $this -> url; ?>&amp;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; ?>&amp;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; ?> { -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; }
27
- #<?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; }
 
 
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 { background:transparent url('images/link.gif') center center no-repeat !important; text-indent:-9999px; opacity:.4 !important; filter:alpha(opacity=40) !important; }
30
- #<?php echo $styles['wrapperid']; ?> #thumbnails<?php echo $unique; ?> { background:<?php echo $styles['background']; ?>; height:<?php echo $sliderheight; ?>px; }
 
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; ?> { float:left; position:absolute; left:0; z-index:150; width:20px; height:<?php echo $sliderheight; ?>px; background:url('images/scroll-left.gif') center center no-repeat; background-color:#222; }
 
34
  #<?php echo $styles['wrapperid']; ?> #slideleft<?php echo $unique; ?>:hover { background-color:#333; }
35
- #<?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 url('images/scroll-right.gif') center center no-repeat; }
 
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:calc(100% - 40px); margin:0 20px; height:<?php echo $sliderheight; ?>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 $sliderheight; ?>px; padding:3px 0 0 5px; }
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
- @media (max-width:480px) {
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; ?> { -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; }
27
- #<?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; }
 
 
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 { background:transparent url('images/link.gif') center center no-repeat !important; text-indent:-9999px; opacity:.4 !important; filter:alpha(opacity=40) !important; }
 
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; ?> { 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; }
 
34
  #<?php echo $styles['wrapperid']; ?> #slideleft<?php echo $unique; ?>:hover { background-color:#333; }
35
- #<?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; }
 
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
- Colorbox Core Style:
3
  The following CSS is consistent between example themes and should not be altered.
4
  */
5
- #colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
6
- #cboxWrapper {max-width:none;}
 
 
 
 
7
  #cboxOverlay{position:fixed; width:100%; height:100%;}
8
  #cboxMiddleLeft, #cboxBottomLeft{clear:left;}
9
  #cboxContent{position:relative;}
10
- #cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
11
  #cboxTitle{margin:0;}
12
- #cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
 
 
13
  #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
14
- .cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
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 modify the appearance of Colorbox. They are
21
  ordered & tabbed in a way that represents the nesting of the generated HTML.
22
  */
23
- #cboxOverlay{background:url(../images/colorbox/overlay.png) repeat 0 0;}
 
24
  #colorbox{outline:0;}
25
- #cboxTopLeft{width:21px; height:21px; background:url(../images/colorbox/controls.png) no-repeat -101px 0;}
26
- #cboxTopRight{width:21px; height:21px; background:url(../images/colorbox/controls.png) no-repeat -130px 0;}
27
- #cboxBottomLeft{width:21px; height:21px; background:url(../images/colorbox/controls.png) no-repeat -101px -29px;}
28
- #cboxBottomRight{width:21px; height:21px; background:url(../images/colorbox/controls.png) no-repeat -130px -29px;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
- .cboxIframe{background:#fff;}
35
- #cboxError{padding:50px; border:1px solid #ccc;}
36
- #cboxLoadedContent{margin-bottom:28px;}
37
- #cboxTitle{position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494;}
38
- #cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;}
39
- #cboxLoadingOverlay{background:url(../images/colorbox/loading_background.png) no-repeat center center;}
40
- #cboxLoadingGraphic{background:url(../images/colorbox/loading.gif) no-repeat center center;}
41
-
42
- /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
43
- #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
44
-
45
- /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
46
- #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
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 or needed in IE9.
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
- <?php /*<p><?php echo stripslashes(__(get_the_excerpt())); ?></p>*/ ?>
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="slideshow<?php echo $unique; ?>overlay"<?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>
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="slideshow<?php echo $unique; ?>overlay"<?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>
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="slideshow<?php echo $unique; ?>overlay"<?php endif; ?> href="<?php echo $slide -> guid; ?>" title="<?php echo __($slide -> post_title); ?>"></a>
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 setup_postdata($slide); ?>
 
 
 
 
 
 
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="slideshow<?php echo $unique; ?>overlay"<?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,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="slideshow<?php echo $unique; ?>overlay"<?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,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="slideshow<?php echo $unique; ?>overlay"<?php endif; ?> rel="slideshow<?php echo $unique; ?>overlay" target="_<?php echo $slide -> linktarget; ?>" title="<?php echo __($slide -> title); ?>"></a>
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; ?>"><img src="<?php echo $this -> url(); ?>/images/spinner.gif"></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,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));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
- if (this.effect == "fade") {
196
- //TINY.alpha.set(this.i,100,this.imgSpeed);
197
- this.oi(m[(m.length - 2)], this.i);
198
- } else {
199
- if (m.length > 1) {
200
- this.mi(m[(m.length - 2)], this.i);
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
- TINY.height.set(this.f.parentNode,(jQuery(this.i).height()),this.infoSpeed/2,-1);
 
 
 
 
 
 
 
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:"' + unique + 'overlay", maxWidth:"90%", maxHeight:"90%"}); jQuery("#' + uniqueimglinkid + '").click(); return false;');
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
- TINY.height.set(this.r,h,this.infoSpeed,0);
252
- TINY.alpha.set(this.r,s.io,5);
 
 
 
 
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
 
views/default/js/jquery-ui.js ADDED
@@ -0,0 +1,2440 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ }));