Version Description
- The image dimension calculation algorithm now uses a more stable and more efficient way to determine the size of images.
- Added slideshow API.
- Fixed: WP Color Picker (Iris) adds a hashtag to color codes. As slideshow does this as well, text slides didn't display color properly.
Download this release
Release Info
Developer | stefanboonstra |
Plugin | Slideshow |
Version | 2.2.15 |
Comparing to | |
See all releases |
Code changes from version 2.2.14 to 2.2.15
- js/min/all.backend.min.js +1 -896
- js/min/all.frontend.min.js +1 -1
- readme.txt +6 -1
- slideshow.php +2 -2
- style/SlideshowPlugin/functional.css +132 -132
- views/SlideshowPluginSlideshowSlide/frontend_text.php +19 -5
js/min/all.backend.min.js
CHANGED
@@ -1,896 +1 @@
|
|
1 |
-
/**
|
2 |
-
* Slideshow backend script
|
3 |
-
*
|
4 |
-
* @author Stefan Boonstra
|
5 |
-
* @version 2.2.12
|
6 |
-
*/
|
7 |
-
slideshow_jquery_image_gallery_backend_script = function()
|
8 |
-
{
|
9 |
-
var $ = jQuery,
|
10 |
-
self = {};
|
11 |
-
|
12 |
-
self.isBackendInitialized = false;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Called by either jQuery's document ready event or JavaScript's window load event in case document ready fails to
|
16 |
-
* fire.
|
17 |
-
*
|
18 |
-
* Triggers the slideshowBackendReady on the document to inform all backend scripts they can start.
|
19 |
-
*/
|
20 |
-
self.init = function()
|
21 |
-
{
|
22 |
-
if (self.isBackendInitialized)
|
23 |
-
{
|
24 |
-
return;
|
25 |
-
}
|
26 |
-
|
27 |
-
self.isBackendInitialized = true;
|
28 |
-
|
29 |
-
$(document).trigger('slideshowBackendReady');
|
30 |
-
};
|
31 |
-
|
32 |
-
$(document).ready(self.init);
|
33 |
-
|
34 |
-
$(window).load(self.init);
|
35 |
-
|
36 |
-
return self;
|
37 |
-
}();
|
38 |
-
|
39 |
-
// @codekit-append backend/generalSettings.js
|
40 |
-
// @codekit-append backend/editSlideshow.js
|
41 |
-
// @codekit-append backend/shortcode.js
|
42 |
-
|
43 |
-
///**
|
44 |
-
// * Simple logging function for Internet Explorer
|
45 |
-
// *
|
46 |
-
// * @param message
|
47 |
-
// */
|
48 |
-
//function log(message)
|
49 |
-
//{
|
50 |
-
// var $ = jQuery;
|
51 |
-
//
|
52 |
-
// $('body').prepend('<p style="color: red;">' + message + '</p>');
|
53 |
-
//}
|
54 |
-
slideshow_jquery_image_gallery_backend_script.generalSettings = function()
|
55 |
-
{
|
56 |
-
var $ = jQuery,
|
57 |
-
self = { };
|
58 |
-
|
59 |
-
self.isCurrentPage = false;
|
60 |
-
|
61 |
-
/**
|
62 |
-
*
|
63 |
-
*/
|
64 |
-
self.init = function()
|
65 |
-
{
|
66 |
-
if (window.pagenow === 'slideshow_page_general_settings')
|
67 |
-
{
|
68 |
-
self.isCurrentPage = true;
|
69 |
-
|
70 |
-
self.activateUserCapabilities();
|
71 |
-
}
|
72 |
-
};
|
73 |
-
|
74 |
-
/**
|
75 |
-
* When either the 'Add slideshows' capability or the 'Delete slideshow' capability is changed, the 'Edit slideshows'
|
76 |
-
* checkbox should also be checked. Un-checking the 'Edit slideshows' checkbox needs to do the opposite.
|
77 |
-
*/
|
78 |
-
self.activateUserCapabilities = function()
|
79 |
-
{
|
80 |
-
$('input').change(function(event)
|
81 |
-
{
|
82 |
-
var $this = $(event.currentTarget),
|
83 |
-
addSlideshowsCapability = 'slideshow-jquery-image-gallery-add-slideshows',
|
84 |
-
editSlideshowsCapability = 'slideshow-jquery-image-gallery-edit-slideshows',
|
85 |
-
deleteSlideshowsCapability = 'slideshow-jquery-image-gallery-delete-slideshows',
|
86 |
-
idArray,
|
87 |
-
capability,
|
88 |
-
role;
|
89 |
-
|
90 |
-
// Check if the type was a checkbox
|
91 |
-
if ($this.attr('type').toLowerCase() != 'checkbox')
|
92 |
-
{
|
93 |
-
return;
|
94 |
-
}
|
95 |
-
|
96 |
-
// Get capability and role
|
97 |
-
idArray = $this.attr('id').split('_');
|
98 |
-
capability = idArray.shift();
|
99 |
-
role = idArray.join('_');
|
100 |
-
|
101 |
-
// When 'Edit slideshows' has been un-checked, set 'Add slideshows' and 'Delete slideshows' to un-checked as well
|
102 |
-
if (capability === editSlideshowsCapability &&
|
103 |
-
!$this.attr('checked'))
|
104 |
-
{
|
105 |
-
$('#' + addSlideshowsCapability + '_' + role).attr('checked', false);
|
106 |
-
$('#' + deleteSlideshowsCapability + '_' + role).attr('checked', false);
|
107 |
-
}
|
108 |
-
// When 'Add slideshows' or 'Delete slideshows' is checked, 'Edit slideshows' must be checked as well
|
109 |
-
else if (capability === addSlideshowsCapability ||
|
110 |
-
capability === deleteSlideshowsCapability)
|
111 |
-
{
|
112 |
-
$('#' + editSlideshowsCapability + '_' + role).attr('checked', true);
|
113 |
-
}
|
114 |
-
});
|
115 |
-
};
|
116 |
-
|
117 |
-
$(document).bind('slideshowBackendReady', self.init);
|
118 |
-
|
119 |
-
return self;
|
120 |
-
}();
|
121 |
-
|
122 |
-
// @codekit-append generalSettings.navigation.js
|
123 |
-
// @codekit-append generalSettings.customStyles.js
|
124 |
-
slideshow_jquery_image_gallery_backend_script.editSlideshow = function()
|
125 |
-
{
|
126 |
-
var $ = jQuery,
|
127 |
-
self = { };
|
128 |
-
|
129 |
-
self.isCurrentPage = false;
|
130 |
-
|
131 |
-
/**
|
132 |
-
*
|
133 |
-
*/
|
134 |
-
self.init = function()
|
135 |
-
{
|
136 |
-
if (window.pagenow === 'slideshow')
|
137 |
-
{
|
138 |
-
self.isCurrentPage = true;
|
139 |
-
|
140 |
-
self.activateSettingsVisibilityDependency();
|
141 |
-
}
|
142 |
-
};
|
143 |
-
|
144 |
-
/**
|
145 |
-
* Set fields, that depend on another field being a certain value, to show when that certain field becomes a certain
|
146 |
-
* value and to hide when that certain fields loses that certain value.
|
147 |
-
*/
|
148 |
-
self.activateSettingsVisibilityDependency = function()
|
149 |
-
{
|
150 |
-
$('.depends-on-field-value').each(function(key, field)
|
151 |
-
{
|
152 |
-
var $field = $(field),
|
153 |
-
attributes = $field.attr('class').split(' '),
|
154 |
-
$tr = $field.closest('tr');
|
155 |
-
|
156 |
-
// Check whether or not field should be shown
|
157 |
-
if ($('input[name="' + attributes[1] + '"]:checked').val() == attributes[2])
|
158 |
-
{
|
159 |
-
$tr.show();
|
160 |
-
}
|
161 |
-
else
|
162 |
-
{
|
163 |
-
$tr.hide();
|
164 |
-
}
|
165 |
-
|
166 |
-
// On change of the field that the current field depends on, set field's visibility
|
167 |
-
$('input[name="' + attributes[1] + '"]').change(attributes, function(event)
|
168 |
-
{
|
169 |
-
var $tr = $('.' + attributes[3]).closest('tr');
|
170 |
-
|
171 |
-
if ($(event.currentTarget).val() == attributes[2])
|
172 |
-
{
|
173 |
-
self.animateElementVisibility($tr, true);
|
174 |
-
}
|
175 |
-
else
|
176 |
-
{
|
177 |
-
self.animateElementVisibility($tr, false);
|
178 |
-
}
|
179 |
-
});
|
180 |
-
});
|
181 |
-
};
|
182 |
-
|
183 |
-
/**
|
184 |
-
* Animate an element's visibility
|
185 |
-
*
|
186 |
-
* @param element
|
187 |
-
* @param setVisible Optional, defaults to the current opposite when left empty.
|
188 |
-
*/
|
189 |
-
self.animateElementVisibility = function(element, setVisible)
|
190 |
-
{
|
191 |
-
var $element = $(element);
|
192 |
-
|
193 |
-
if (setVisible === undefined)
|
194 |
-
{
|
195 |
-
// Finish animation before checking visibility
|
196 |
-
$element.stop(true, true);
|
197 |
-
|
198 |
-
setVisible = !$element.is(':visible');
|
199 |
-
}
|
200 |
-
|
201 |
-
if (setVisible)
|
202 |
-
{
|
203 |
-
$element.show().css('background-color', '#c0dd52')
|
204 |
-
|
205 |
-
setTimeout(
|
206 |
-
function()
|
207 |
-
{
|
208 |
-
$element.stop(true, true).animate({ 'background-color': 'transparent' }, 1500);
|
209 |
-
},
|
210 |
-
500
|
211 |
-
);
|
212 |
-
}
|
213 |
-
else
|
214 |
-
{
|
215 |
-
$element.stop(true, true).hide();
|
216 |
-
}
|
217 |
-
};
|
218 |
-
|
219 |
-
$(document).bind('slideshowBackendReady', self.init);
|
220 |
-
|
221 |
-
return self;
|
222 |
-
}();
|
223 |
-
|
224 |
-
// @codekit-append editSlideshow.slideManager.js
|
225 |
-
slideshow_jquery_image_gallery_backend_script.shortcode = function()
|
226 |
-
{
|
227 |
-
var $ = jQuery,
|
228 |
-
self = { };
|
229 |
-
|
230 |
-
/**
|
231 |
-
*
|
232 |
-
*/
|
233 |
-
self.init = function()
|
234 |
-
{
|
235 |
-
self.activateShortcodeInserter();
|
236 |
-
};
|
237 |
-
|
238 |
-
/**
|
239 |
-
*
|
240 |
-
*/
|
241 |
-
self.activateShortcodeInserter = function()
|
242 |
-
{
|
243 |
-
$('.insertSlideshowShortcodeSlideshowInsertButton').click(function()
|
244 |
-
{
|
245 |
-
var undefinedSlideshowMessage = 'No slideshow selected.',
|
246 |
-
shortcode = 'slideshow_deploy',
|
247 |
-
slideshowID = parseInt($('#insertSlideshowShortcodeSlideshowSelect').val()),
|
248 |
-
extraData = window.slideshow_jquery_image_gallery_backend_script_shortcode;
|
249 |
-
|
250 |
-
if (typeof extraData === 'object')
|
251 |
-
{
|
252 |
-
if (typeof extraData.data === 'object' &&
|
253 |
-
extraData.data.shortcode !== undefined &&
|
254 |
-
extraData.data.shortcode.length > 0)
|
255 |
-
{
|
256 |
-
shortcode = extraData.data.shortcode;
|
257 |
-
}
|
258 |
-
|
259 |
-
if (typeof extraData.localization === 'object' &&
|
260 |
-
extraData.localization.undefinedSlideshow !== undefined &&
|
261 |
-
extraData.localization.undefinedSlideshow.length > 0)
|
262 |
-
{
|
263 |
-
undefinedSlideshowMessage = extraData.localization.undefinedSlideshow;
|
264 |
-
}
|
265 |
-
}
|
266 |
-
|
267 |
-
if (isNaN(slideshowID))
|
268 |
-
{
|
269 |
-
alert(undefinedSlideshowMessage);
|
270 |
-
|
271 |
-
return false;
|
272 |
-
}
|
273 |
-
|
274 |
-
send_to_editor('[' + shortcode + ' id=\'' + slideshowID + '\']');
|
275 |
-
|
276 |
-
tb_remove();
|
277 |
-
|
278 |
-
return true;
|
279 |
-
});
|
280 |
-
|
281 |
-
$('.insertSlideshowShortcodeCancelButton').click(function()
|
282 |
-
{
|
283 |
-
tb_remove();
|
284 |
-
|
285 |
-
return false;
|
286 |
-
});
|
287 |
-
};
|
288 |
-
|
289 |
-
$(document).bind('slideshowBackendReady', self.init);
|
290 |
-
|
291 |
-
return self;
|
292 |
-
}();slideshow_jquery_image_gallery_backend_script.generalSettings.customStyles = function()
|
293 |
-
{
|
294 |
-
var $ = jQuery,
|
295 |
-
self = { };
|
296 |
-
|
297 |
-
/**
|
298 |
-
*
|
299 |
-
*/
|
300 |
-
self.init = function()
|
301 |
-
{
|
302 |
-
if (!slideshow_jquery_image_gallery_backend_script.generalSettings.isCurrentPage)
|
303 |
-
{
|
304 |
-
return;
|
305 |
-
}
|
306 |
-
|
307 |
-
self.activateNavigation();
|
308 |
-
};
|
309 |
-
|
310 |
-
/**
|
311 |
-
* Binds functions to fire at click events on the navigation tabs
|
312 |
-
*/
|
313 |
-
self.activateNavigation = function()
|
314 |
-
{
|
315 |
-
// On click of navigation tab, show different settings page.
|
316 |
-
$('.nav-tab').click(function(event)
|
317 |
-
{
|
318 |
-
var $this = $(event.currentTarget),
|
319 |
-
$activeTab = $('.nav-tab-active'),
|
320 |
-
$referrer;
|
321 |
-
|
322 |
-
$activeTab.removeClass('nav-tab-active');
|
323 |
-
$this.addClass('nav-tab-active');
|
324 |
-
|
325 |
-
// Hide previously active tab's content
|
326 |
-
$($activeTab.attr('href').replace('#', '.')).hide();
|
327 |
-
|
328 |
-
// Show newly activated tab
|
329 |
-
$($this.attr('href').replace('#', '.')).show();
|
330 |
-
|
331 |
-
// Set referrer value to the current page to be able to return there after saving
|
332 |
-
$referrer = $('input[name=_wp_http_referer]');
|
333 |
-
$referrer.attr('value', $referrer.attr('value').split('#').shift() + $this.attr('href'));
|
334 |
-
});
|
335 |
-
|
336 |
-
// Navigate to correct tab by firing a click event on it. Click event needs to have already been registered on '.nav-tab'.
|
337 |
-
$('a[href="#' + document.URL.split('#').pop() + '"]').trigger('click');
|
338 |
-
};
|
339 |
-
|
340 |
-
$(document).bind('slideshowBackendReady', self.init);
|
341 |
-
|
342 |
-
return self;
|
343 |
-
}();slideshow_jquery_image_gallery_backend_script.generalSettings.customStyles = function()
|
344 |
-
{
|
345 |
-
var $ = jQuery,
|
346 |
-
self = { };
|
347 |
-
|
348 |
-
/**
|
349 |
-
*
|
350 |
-
*/
|
351 |
-
self.init = function()
|
352 |
-
{
|
353 |
-
if (!slideshow_jquery_image_gallery_backend_script.generalSettings.isCurrentPage)
|
354 |
-
{
|
355 |
-
return;
|
356 |
-
}
|
357 |
-
|
358 |
-
self.activateActionButtons();
|
359 |
-
self.activateDeleteButtons()
|
360 |
-
};
|
361 |
-
|
362 |
-
/**
|
363 |
-
*
|
364 |
-
*/
|
365 |
-
self.activateActionButtons = function()
|
366 |
-
{
|
367 |
-
// On click of the customize default style button
|
368 |
-
$('.custom-styles-tab .styles-list .style-action.style-default').click(function(event)
|
369 |
-
{
|
370 |
-
var $this = $(event.currentTarget),
|
371 |
-
title = $this.closest('li').find('.style-title').html(),
|
372 |
-
content = $this.closest('li').find('.style-content').html(),
|
373 |
-
externalData = window.slideshow_jquery_image_gallery_backend_script_generalSettings,
|
374 |
-
customStylesKey = 'slideshow-jquery-image-gallery-custom-styles',
|
375 |
-
customStyleID,
|
376 |
-
$editor,
|
377 |
-
$li,
|
378 |
-
$customStyleTemplates,
|
379 |
-
$customStylesList;
|
380 |
-
|
381 |
-
if (typeof content !== 'string' ||
|
382 |
-
content.length <= 0)
|
383 |
-
{
|
384 |
-
return;
|
385 |
-
}
|
386 |
-
|
387 |
-
if (typeof externalData === 'object')
|
388 |
-
{
|
389 |
-
// Prefix title with 'New'
|
390 |
-
if (typeof externalData.localization === 'object' &&
|
391 |
-
externalData.localization.newCustomizationPrefix !== undefined &&
|
392 |
-
externalData.localization.newCustomizationPrefix.length > 0)
|
393 |
-
{
|
394 |
-
title = externalData.localization.newCustomizationPrefix + ' - ' + title;
|
395 |
-
}
|
396 |
-
|
397 |
-
// Get custom styles key
|
398 |
-
if (typeof externalData.data === 'object' &&
|
399 |
-
externalData.data.customStylesKey !== undefined &&
|
400 |
-
externalData.data.customStylesKey.length > 0)
|
401 |
-
{
|
402 |
-
customStylesKey = externalData.data.customStylesKey;
|
403 |
-
}
|
404 |
-
}
|
405 |
-
|
406 |
-
customStyleID = customStylesKey + '_' + (self.getHighestCustomStyleID() + 1);
|
407 |
-
|
408 |
-
$customStyleTemplates = $('.custom-styles-tab .custom-style-templates');
|
409 |
-
|
410 |
-
// Clone editor template
|
411 |
-
$editor = $customStyleTemplates.find('.style-editor').clone();
|
412 |
-
|
413 |
-
// Add class to editor
|
414 |
-
$editor.addClass(customStyleID);
|
415 |
-
|
416 |
-
// Add value attributes
|
417 |
-
$editor.find('.new-custom-style-title').attr('value', title);
|
418 |
-
$editor.find('.new-custom-style-content').html(content);
|
419 |
-
|
420 |
-
// Add name attributes
|
421 |
-
$editor.find('.new-custom-style-title').attr('name', customStylesKey + '[' + customStyleID + '][title]');
|
422 |
-
$editor.find('.new-custom-style-content').attr('name', customStylesKey + '[' + customStyleID + '][style]');
|
423 |
-
|
424 |
-
// Add editor to DOM
|
425 |
-
$('.custom-styles-tab .style-editors').append($editor);
|
426 |
-
|
427 |
-
// Fade editor in
|
428 |
-
setTimeout(
|
429 |
-
function()
|
430 |
-
{
|
431 |
-
$editor.fadeIn(200);
|
432 |
-
},
|
433 |
-
200
|
434 |
-
);
|
435 |
-
|
436 |
-
// Clone custom styles list item (with events)
|
437 |
-
$li = $customStyleTemplates.find('.custom-styles-list-item').clone(true);
|
438 |
-
|
439 |
-
// Prepare
|
440 |
-
$li.removeClass('custom-styles-list-item');
|
441 |
-
$li.find('.style-title').html(title);
|
442 |
-
$li.find('.style-action').addClass(customStyleID);
|
443 |
-
$li.find('.style-delete').addClass(customStyleID);
|
444 |
-
|
445 |
-
$customStylesList = $('.custom-styles-tab .styles-list .custom-styles-list');
|
446 |
-
|
447 |
-
// Remove 'No custom stylesheets found message'
|
448 |
-
$customStylesList.find('.no-custom-styles-found').remove();
|
449 |
-
|
450 |
-
// Add custom styles list item to DOM
|
451 |
-
$customStylesList.append($li);
|
452 |
-
});
|
453 |
-
|
454 |
-
// On click of the edit custom style button
|
455 |
-
$('.custom-styles-tab .styles-list .style-action, .custom-styles-tab .custom-style-templates .custom-styles-list-item .style-action').click(function(event)
|
456 |
-
{
|
457 |
-
// Get custom style key
|
458 |
-
var customStyleKey = $(event.currentTarget).attr('class').split(' ')[1];
|
459 |
-
|
460 |
-
// Return if no style key was found
|
461 |
-
if (customStyleKey === undefined)
|
462 |
-
{
|
463 |
-
return;
|
464 |
-
}
|
465 |
-
|
466 |
-
// Fade editors out
|
467 |
-
$('.custom-styles-tab .style-editors .style-editor').each(function(key, editor)
|
468 |
-
{
|
469 |
-
$(editor).fadeOut(200);
|
470 |
-
});
|
471 |
-
|
472 |
-
// Fade active editor in
|
473 |
-
setTimeout(
|
474 |
-
function()
|
475 |
-
{
|
476 |
-
$('.style-editor.' + customStyleKey).fadeIn(200);
|
477 |
-
},
|
478 |
-
200
|
479 |
-
);
|
480 |
-
});
|
481 |
-
};
|
482 |
-
|
483 |
-
/**
|
484 |
-
*
|
485 |
-
*/
|
486 |
-
self.activateDeleteButtons = function()
|
487 |
-
{
|
488 |
-
$('.custom-styles-tab .styles-list .style-delete, .custom-styles-tab .custom-style-templates .custom-styles-list-item .style-delete').click(function(event)
|
489 |
-
{
|
490 |
-
// Get custom style key
|
491 |
-
var $this = $(event.currentTarget),
|
492 |
-
customStyleKey = $this.attr('class').split(' ')[1],
|
493 |
-
externalData = window.slideshow_jquery_image_gallery_backend_script_generalSettings,
|
494 |
-
confirmDeleteMessage = 'Are you sure you want to delete this custom style?';
|
495 |
-
|
496 |
-
// Return if no style key was found
|
497 |
-
if(customStyleKey === undefined)
|
498 |
-
{
|
499 |
-
return;
|
500 |
-
}
|
501 |
-
|
502 |
-
if (typeof externalData === 'object' &&
|
503 |
-
typeof externalData.localization === 'object' &&
|
504 |
-
externalData.localization.confirmDeleteMessage !== undefined &&
|
505 |
-
externalData.localization.confirmDeleteMessage.length > 0)
|
506 |
-
{
|
507 |
-
confirmDeleteMessage = externalData.localization.confirmDeleteMessage;
|
508 |
-
}
|
509 |
-
|
510 |
-
// Show confirm deletion message
|
511 |
-
if (!confirm(confirmDeleteMessage))
|
512 |
-
{
|
513 |
-
return;
|
514 |
-
}
|
515 |
-
|
516 |
-
// Delete custom style
|
517 |
-
$('.custom-styles-tab .style-editors .style-editor.' + customStyleKey).remove();
|
518 |
-
|
519 |
-
// Delete item from list
|
520 |
-
$this.closest('li').remove();
|
521 |
-
});
|
522 |
-
};
|
523 |
-
|
524 |
-
/**
|
525 |
-
* Returns highest custom style id in existence
|
526 |
-
*
|
527 |
-
* @return int highestCustomStyleID
|
528 |
-
*/
|
529 |
-
self.getHighestCustomStyleID = function()
|
530 |
-
{
|
531 |
-
var highestCustomStyleID = 0;
|
532 |
-
|
533 |
-
// Loop through style editors
|
534 |
-
$('.custom-styles-tab .style-editors .style-editor').each(function(key, editor)
|
535 |
-
{
|
536 |
-
var customStyleID = parseInt($(editor).attr('class').split('_').pop());
|
537 |
-
|
538 |
-
// Check if the ID is higher than any previously checked
|
539 |
-
if (customStyleID > highestCustomStyleID)
|
540 |
-
{
|
541 |
-
highestCustomStyleID = customStyleID;
|
542 |
-
}
|
543 |
-
});
|
544 |
-
|
545 |
-
// Return
|
546 |
-
return parseInt(highestCustomStyleID);
|
547 |
-
};
|
548 |
-
|
549 |
-
$(document).bind('slideshowBackendReady', self.init);
|
550 |
-
|
551 |
-
return self;
|
552 |
-
}();slideshow_jquery_image_gallery_backend_script.editSlideshow.slideManager = function()
|
553 |
-
{
|
554 |
-
var $ = jQuery,
|
555 |
-
self = { };
|
556 |
-
|
557 |
-
self.isCurrentPage = false;
|
558 |
-
|
559 |
-
/**
|
560 |
-
*
|
561 |
-
*/
|
562 |
-
self.init = function()
|
563 |
-
{
|
564 |
-
if (slideshow_jquery_image_gallery_backend_script.editSlideshow.isCurrentPage)
|
565 |
-
{
|
566 |
-
self.activate();
|
567 |
-
}
|
568 |
-
};
|
569 |
-
|
570 |
-
/**
|
571 |
-
*
|
572 |
-
*/
|
573 |
-
self.activate = function()
|
574 |
-
{
|
575 |
-
var $popup = $('#slideshow-slide-inserter-popup'),
|
576 |
-
$popupBackground = $('#slideshow-slide-inserter-popup-background'),
|
577 |
-
$searchBar = $popup.find('#search');
|
578 |
-
|
579 |
-
// Index first
|
580 |
-
self.indexSlidesOrder();
|
581 |
-
|
582 |
-
// Make list items in the sortables list sortable, exclude elements by using the cancel option
|
583 |
-
$('.sortable-slides-list').sortable({
|
584 |
-
revert: true,
|
585 |
-
placeholder: 'sortable-placeholder',
|
586 |
-
forcePlaceholderSize: true,
|
587 |
-
stop: function()
|
588 |
-
{
|
589 |
-
self.indexSlidesOrder();
|
590 |
-
},
|
591 |
-
cancel: 'input, select, p'
|
592 |
-
});
|
593 |
-
|
594 |
-
// Add the wp-color-picker plugin to the color fields
|
595 |
-
$('.wp-color-picker-field').wpColorPicker({ width: 234 });
|
596 |
-
|
597 |
-
// Make the black background stretch all the way down the document
|
598 |
-
$popupBackground.height($(document).outerHeight(true));
|
599 |
-
|
600 |
-
// Center the popup in the window
|
601 |
-
$popup.css({
|
602 |
-
'top': parseInt(($(window).height() / 2) - ($popup.outerHeight(true) / 2), 10),
|
603 |
-
'left': parseInt(($(window).width() / 2) - ($popup.outerWidth(true) / 2), 10)
|
604 |
-
});
|
605 |
-
|
606 |
-
// Focus on search bar
|
607 |
-
$searchBar.focus();
|
608 |
-
|
609 |
-
// Preload attachments
|
610 |
-
self.getSearchResults();
|
611 |
-
|
612 |
-
// Close popup when clicked on cross or background
|
613 |
-
$popup.find('#close').click(self.closePopup);
|
614 |
-
$popupBackground .click(self.closePopup);
|
615 |
-
|
616 |
-
// Send ajax request on click of the search button
|
617 |
-
$popup.find('#search-submit').click(self.getSearchResults);
|
618 |
-
|
619 |
-
// Make the 'enter' key do the same as the search button
|
620 |
-
$searchBar.keypress(function(event)
|
621 |
-
{
|
622 |
-
if (event.which == 13)
|
623 |
-
{
|
624 |
-
event.preventDefault();
|
625 |
-
|
626 |
-
self.getSearchResults();
|
627 |
-
}
|
628 |
-
});
|
629 |
-
|
630 |
-
// Open popup by click on button
|
631 |
-
$('#slideshow-insert-image-slide').click(function()
|
632 |
-
{
|
633 |
-
$popup .css({ display: 'block' });
|
634 |
-
$popupBackground.css({ display: 'block' });
|
635 |
-
});
|
636 |
-
|
637 |
-
// Insert text slide into the sortable list when the Insert Text Slide button is clicked
|
638 |
-
$('#slideshow-insert-text-slide').click(self.insertTextSlide);
|
639 |
-
|
640 |
-
// Insert video slide into the sortable list when the Insert Video Slide button is clicked
|
641 |
-
$('#slideshow-insert-video-slide').click(self.insertVideoSlide);
|
642 |
-
|
643 |
-
// Call self.deleteSlide on click
|
644 |
-
$('.slideshow-delete-slide').click(function(event)
|
645 |
-
{
|
646 |
-
self.deleteSlide($(event.currentTarget).closest('li'));
|
647 |
-
});
|
648 |
-
};
|
649 |
-
|
650 |
-
/**
|
651 |
-
* Deletes slide from DOM
|
652 |
-
*
|
653 |
-
* @param $slide
|
654 |
-
*/
|
655 |
-
self.deleteSlide = function($slide)
|
656 |
-
{
|
657 |
-
var confirmMessage = 'Are you sure you want to delete this slide?',
|
658 |
-
extraData = window.slideshow_jquery_image_gallery_backend_script_editSlideshow;
|
659 |
-
|
660 |
-
if (typeof extraData === 'object' &&
|
661 |
-
typeof extraData.localization === 'object' &&
|
662 |
-
extraData.localization.confirm !== undefined &&
|
663 |
-
extraData.localization.confirm.length > 0)
|
664 |
-
{
|
665 |
-
confirmMessage = extraData.localization.confirm;
|
666 |
-
}
|
667 |
-
|
668 |
-
if(!confirm(confirmMessage))
|
669 |
-
{
|
670 |
-
return;
|
671 |
-
}
|
672 |
-
|
673 |
-
// Remove slide from DOM
|
674 |
-
$slide.remove();
|
675 |
-
};
|
676 |
-
|
677 |
-
/**
|
678 |
-
* Loop through list items, setting slide orders
|
679 |
-
*/
|
680 |
-
self.indexSlidesOrder = function()
|
681 |
-
{
|
682 |
-
// Loop through sortables
|
683 |
-
$.each($('.sortable-slides-list').find('li'), function(slideID, slide)
|
684 |
-
{
|
685 |
-
// Loop through all fields to set their name attributes with the new index
|
686 |
-
$.each($(slide).find('input, select, textarea'), function(key, input)
|
687 |
-
{
|
688 |
-
var $input = $(input),
|
689 |
-
name = $input.attr('name');
|
690 |
-
|
691 |
-
if (name === undefined ||
|
692 |
-
name.length <= 0)
|
693 |
-
{
|
694 |
-
return;
|
695 |
-
}
|
696 |
-
|
697 |
-
name = name.replace(/[\[\]']+/g, ' ').split(' ');
|
698 |
-
|
699 |
-
// Put name with new order ID back on the page
|
700 |
-
$input.attr('name', name[0] + '[' + (slideID + 1) + '][' + name[2] + ']');
|
701 |
-
});
|
702 |
-
});
|
703 |
-
};
|
704 |
-
|
705 |
-
/**
|
706 |
-
* Sends an ajax post request with the search query and print retrieved html to the results table.
|
707 |
-
*
|
708 |
-
* If offset is set, append data to data that is already there
|
709 |
-
*
|
710 |
-
* @param offset (optional, defaults to 0)
|
711 |
-
*/
|
712 |
-
self.getSearchResults = function(offset)
|
713 |
-
{
|
714 |
-
var $popup = $('#slideshow-slide-inserter-popup'),
|
715 |
-
$resultsTable = $popup.find('#results'),
|
716 |
-
attachmentIDs = [];
|
717 |
-
|
718 |
-
offset = parseInt(offset);
|
719 |
-
|
720 |
-
if (isNaN(offset))
|
721 |
-
{
|
722 |
-
offset = 0;
|
723 |
-
|
724 |
-
$resultsTable.html('');
|
725 |
-
}
|
726 |
-
|
727 |
-
$.each($resultsTable.find('.result-table-row'), function(key, tr)
|
728 |
-
{
|
729 |
-
attachmentIDs.push(parseInt($(tr).attr('data-attachment-id')));
|
730 |
-
});
|
731 |
-
|
732 |
-
$.post(
|
733 |
-
window.ajaxurl,
|
734 |
-
{
|
735 |
-
action : 'slideshow_slide_inserter_search_query',
|
736 |
-
search : $popup.find('#search').attr('value'),
|
737 |
-
offset : offset,
|
738 |
-
attachmentIDs: attachmentIDs
|
739 |
-
},
|
740 |
-
function(response)
|
741 |
-
{
|
742 |
-
var $loadMoreResultsButton;
|
743 |
-
|
744 |
-
// Fill table
|
745 |
-
$resultsTable.append(response);
|
746 |
-
|
747 |
-
// When the insert button is clicked, the function to build a slide should be called. Unbind first so old entries don't have the event twice.
|
748 |
-
$resultsTable.find('.insert-attachment').unbind('click').click(function(event)
|
749 |
-
{
|
750 |
-
var $tr = $(event.currentTarget).closest('tr');
|
751 |
-
|
752 |
-
self.insertImageSlide(
|
753 |
-
$tr.attr('data-attachment-id'),
|
754 |
-
$tr.find('.title').text(),
|
755 |
-
$tr.find('.description').text(),
|
756 |
-
$tr.find('.image img').attr('src')
|
757 |
-
);
|
758 |
-
});
|
759 |
-
|
760 |
-
// Load more results on click of the 'Load more results' button
|
761 |
-
$loadMoreResultsButton = $('.load-more-results');
|
762 |
-
if($loadMoreResultsButton)
|
763 |
-
{
|
764 |
-
$loadMoreResultsButton.click(function(event)
|
765 |
-
{
|
766 |
-
// Get offset
|
767 |
-
var $this = $(event.currentTarget),
|
768 |
-
newOffset = $this.attr('data-offset');
|
769 |
-
|
770 |
-
$this.closest('tr').hide();
|
771 |
-
|
772 |
-
if (isNaN(parseInt(newOffset)))
|
773 |
-
{
|
774 |
-
return;
|
775 |
-
}
|
776 |
-
|
777 |
-
self.getSearchResults(newOffset);
|
778 |
-
});
|
779 |
-
}
|
780 |
-
}
|
781 |
-
);
|
782 |
-
};
|
783 |
-
|
784 |
-
/**
|
785 |
-
* Inserts image slide into the slides list
|
786 |
-
*
|
787 |
-
* @param id
|
788 |
-
* @param title
|
789 |
-
* @param description
|
790 |
-
* @param src
|
791 |
-
*/
|
792 |
-
self.insertImageSlide = function(id, title, description, src)
|
793 |
-
{
|
794 |
-
// Find and clone the image slide template
|
795 |
-
var $imageSlide = $('.image-slide-template').find('li').clone();
|
796 |
-
|
797 |
-
// Fill slide with data
|
798 |
-
$imageSlide.find('.attachment').attr('src', src);
|
799 |
-
$imageSlide.find('.attachment').attr('title', title);
|
800 |
-
$imageSlide.find('.attachment').attr('alt', title);
|
801 |
-
$imageSlide.find('.title').attr('value', title);
|
802 |
-
$imageSlide.find('.description').html(description);
|
803 |
-
$imageSlide.find('.postId').attr('value', id);
|
804 |
-
|
805 |
-
// Set names to be saved to the database
|
806 |
-
$imageSlide.find('.title').attr('name', 'slides[0][title]');
|
807 |
-
$imageSlide.find('.description').attr('name', 'slides[0][description]');
|
808 |
-
$imageSlide.find('.url').attr('name', 'slides[0][url]');
|
809 |
-
$imageSlide.find('.urlTarget').attr('name', 'slides[0][urlTarget]');
|
810 |
-
$imageSlide.find('.type').attr('name', 'slides[0][type]');
|
811 |
-
$imageSlide.find('.postId').attr('name', 'slides[0][postId]');
|
812 |
-
|
813 |
-
// Register delete link
|
814 |
-
$imageSlide.find('.slideshow-delete-slide').click(function(event)
|
815 |
-
{
|
816 |
-
self.deleteSlide($(event.currentTarget).closest('li'));
|
817 |
-
});
|
818 |
-
|
819 |
-
// Put slide in the sortables list.
|
820 |
-
$('.sortable-slides-list').prepend($imageSlide);
|
821 |
-
|
822 |
-
// Reindex
|
823 |
-
self.indexSlidesOrder();
|
824 |
-
};
|
825 |
-
|
826 |
-
/**
|
827 |
-
* Inserts text slide into the slides list
|
828 |
-
*/
|
829 |
-
self.insertTextSlide = function()
|
830 |
-
{
|
831 |
-
// Find and clone the text slide template
|
832 |
-
var $textSlide = $('.text-slide-template').find('li').clone();
|
833 |
-
|
834 |
-
// Set names to be saved to the database
|
835 |
-
$textSlide.find('.title').attr('name', 'slides[0][title]');
|
836 |
-
$textSlide.find('.description').attr('name', 'slides[0][description]');
|
837 |
-
$textSlide.find('.textColor').attr('name', 'slides[0][textColor]');
|
838 |
-
$textSlide.find('.color').attr('name', 'slides[0][color]');
|
839 |
-
$textSlide.find('.url').attr('name', 'slides[0][url]');
|
840 |
-
$textSlide.find('.urlTarget').attr('name', 'slides[0][urlTarget]');
|
841 |
-
$textSlide.find('.type').attr('name', 'slides[0][type]');
|
842 |
-
|
843 |
-
// Register delete link
|
844 |
-
$textSlide.find('.slideshow-delete-slide').click(function(event)
|
845 |
-
{
|
846 |
-
self.deleteSlide($(event.currentTarget).closest('li'));
|
847 |
-
});
|
848 |
-
|
849 |
-
// Add color picker
|
850 |
-
$textSlide.find('.color, .textColor').wpColorPicker();
|
851 |
-
|
852 |
-
// Put slide in the sortables list.
|
853 |
-
$('.sortable-slides-list').prepend($textSlide);
|
854 |
-
|
855 |
-
// Reindex slide orders
|
856 |
-
self.indexSlidesOrder();
|
857 |
-
};
|
858 |
-
|
859 |
-
/**
|
860 |
-
* Inserts video slide into the slides list
|
861 |
-
*/
|
862 |
-
self.insertVideoSlide = function()
|
863 |
-
{
|
864 |
-
// Find and clone the video slide template
|
865 |
-
var $videoSlide = $('.video-slide-template').find('li').clone();
|
866 |
-
|
867 |
-
// Set names to be saved to the database
|
868 |
-
$videoSlide.find('.videoId').attr('name', 'slides[0][videoId]');
|
869 |
-
$videoSlide.find('.showRelatedVideos').attr('name', 'slides[0][showRelatedVideos]');
|
870 |
-
$videoSlide.find('.type').attr('name', 'slides[0][type]');
|
871 |
-
|
872 |
-
// Register delete link
|
873 |
-
$videoSlide.find('.slideshow-delete-slide').click(function(event)
|
874 |
-
{
|
875 |
-
self.deleteSlide($(event.currentTarget).closest('li'));
|
876 |
-
});
|
877 |
-
|
878 |
-
// Put slide in the sortables list.
|
879 |
-
$('.sortable-slides-list').prepend($videoSlide);
|
880 |
-
|
881 |
-
// Reindex slide orders
|
882 |
-
self.indexSlidesOrder();
|
883 |
-
};
|
884 |
-
|
885 |
-
/**
|
886 |
-
* Closes popup
|
887 |
-
*/
|
888 |
-
self.closePopup = function()
|
889 |
-
{
|
890 |
-
$('#slideshow-slide-inserter-popup, #slideshow-slide-inserter-popup-background').css({ display: 'none' });
|
891 |
-
};
|
892 |
-
|
893 |
-
$(document).bind('slideshowBackendReady', self.init);
|
894 |
-
|
895 |
-
return self;
|
896 |
-
}();
|
1 |
+
slideshow_jquery_image_gallery_backend_script=function(){var t=jQuery,i={};return i.isBackendInitialized=!1,i.init=function(){i.isBackendInitialized||(i.isBackendInitialized=!0,t(document).trigger("slideshowBackendReady"))},t(document).ready(i.init),t(window).load(i.init),i}();slideshow_jquery_image_gallery_backend_script.generalSettings=function(){var t=jQuery,i={};return i.isCurrentPage=!1,i.init=function(){"slideshow_page_general_settings"===window.pagenow&&(i.isCurrentPage=!0,i.activateUserCapabilities())},i.activateUserCapabilities=function(){t("input").change(function(i){var e,s,n,o=t(i.currentTarget),a="slideshow-jquery-image-gallery-add-slideshows",h="slideshow-jquery-image-gallery-edit-slideshows",r="slideshow-jquery-image-gallery-delete-slideshows";"checkbox"==o.attr("type").toLowerCase()&&(e=o.attr("id").split("_"),s=e.shift(),n=e.join("_"),s!==h||o.attr("checked")?(s===a||s===r)&&t("#"+h+"_"+n).attr("checked",!0):(t("#"+a+"_"+n).attr("checked",!1),t("#"+r+"_"+n).attr("checked",!1)))})},t(document).bind("slideshowBackendReady",i.init),i}();slideshow_jquery_image_gallery_backend_script.editSlideshow=function(){var t=jQuery,i={};return i.isCurrentPage=!1,i.init=function(){"slideshow"===window.pagenow&&(i.isCurrentPage=!0,i.activateSettingsVisibilityDependency())},i.activateSettingsVisibilityDependency=function(){t(".depends-on-field-value").each(function(e,s){var n=t(s),o=n.attr("class").split(" "),a=n.closest("tr");t('input[name="'+o[1]+'"]:checked').val()==o[2]?a.show():a.hide(),t('input[name="'+o[1]+'"]').change(o,function(e){var s=t("."+o[3]).closest("tr");t(e.currentTarget).val()==o[2]?i.animateElementVisibility(s,!0):i.animateElementVisibility(s,!1)})})},i.animateElementVisibility=function(i,e){var s=t(i);void 0===e&&(s.stop(!0,!0),e=!s.is(":visible")),e?(s.show().css("background-color","#c0dd52"),setTimeout(function(){s.stop(!0,!0).animate({"background-color":"transparent"},1500)},500)):s.stop(!0,!0).hide()},t(document).bind("slideshowBackendReady",i.init),i}();slideshow_jquery_image_gallery_backend_script.shortcode=function(){var t=jQuery,i={};return i.init=function(){i.activateShortcodeInserter()},i.activateShortcodeInserter=function(){t(".insertSlideshowShortcodeSlideshowInsertButton").click(function(){var i="No slideshow selected.",e="slideshow_deploy",s=parseInt(t("#insertSlideshowShortcodeSlideshowSelect").val()),n=window.slideshow_jquery_image_gallery_backend_script_shortcode;return"object"==typeof n&&("object"==typeof n.data&&void 0!==n.data.shortcode&&n.data.shortcode.length>0&&(e=n.data.shortcode),"object"==typeof n.localization&&void 0!==n.localization.undefinedSlideshow&&n.localization.undefinedSlideshow.length>0&&(i=n.localization.undefinedSlideshow)),isNaN(s)?(alert(i),!1):(send_to_editor("["+e+" id='"+s+"']"),tb_remove(),!0)}),t(".insertSlideshowShortcodeCancelButton").click(function(){return tb_remove(),!1})},t(document).bind("slideshowBackendReady",i.init),i}();slideshow_jquery_image_gallery_backend_script.generalSettings.customStyles=function(){var t=jQuery,i={};return i.init=function(){slideshow_jquery_image_gallery_backend_script.generalSettings.isCurrentPage&&i.activateNavigation()},i.activateNavigation=function(){t(".nav-tab").click(function(i){var e,s=t(i.currentTarget),n=t(".nav-tab-active");n.removeClass("nav-tab-active"),s.addClass("nav-tab-active"),t(n.attr("href").replace("#",".")).hide(),t(s.attr("href").replace("#",".")).show(),e=t("input[name=_wp_http_referer]"),e.attr("value",e.attr("value").split("#").shift()+s.attr("href"))}),t('a[href="#'+document.URL.split("#").pop()+'"]').trigger("click")},t(document).bind("slideshowBackendReady",i.init),i}();slideshow_jquery_image_gallery_backend_script.generalSettings.customStyles=function(){var t=jQuery,i={};return i.init=function(){slideshow_jquery_image_gallery_backend_script.generalSettings.isCurrentPage&&(i.activateActionButtons(),i.activateDeleteButtons())},i.activateActionButtons=function(){t(".custom-styles-tab .styles-list .style-action.style-default").click(function(e){var s,n,o,a,h,r=t(e.currentTarget),l=r.closest("li").find(".style-title").html(),d=r.closest("li").find(".style-content").html(),c=window.slideshow_jquery_image_gallery_backend_script_generalSettings,u="slideshow-jquery-image-gallery-custom-styles";"string"!=typeof d||d.length<=0||("object"==typeof c&&("object"==typeof c.localization&&void 0!==c.localization.newCustomizationPrefix&&c.localization.newCustomizationPrefix.length>0&&(l=c.localization.newCustomizationPrefix+" - "+l),"object"==typeof c.data&&void 0!==c.data.customStylesKey&&c.data.customStylesKey.length>0&&(u=c.data.customStylesKey)),s=u+"_"+(i.getHighestCustomStyleID()+1),a=t(".custom-styles-tab .custom-style-templates"),n=a.find(".style-editor").clone(),n.addClass(s),n.find(".new-custom-style-title").attr("value",l),n.find(".new-custom-style-content").html(d),n.find(".new-custom-style-title").attr("name",u+"["+s+"][title]"),n.find(".new-custom-style-content").attr("name",u+"["+s+"][style]"),t(".custom-styles-tab .style-editors").append(n),setTimeout(function(){n.fadeIn(200)},200),o=a.find(".custom-styles-list-item").clone(!0),o.removeClass("custom-styles-list-item"),o.find(".style-title").html(l),o.find(".style-action").addClass(s),o.find(".style-delete").addClass(s),h=t(".custom-styles-tab .styles-list .custom-styles-list"),h.find(".no-custom-styles-found").remove(),h.append(o))}),t(".custom-styles-tab .styles-list .style-action, .custom-styles-tab .custom-style-templates .custom-styles-list-item .style-action").click(function(i){var e=t(i.currentTarget).attr("class").split(" ")[1];void 0!==e&&(t(".custom-styles-tab .style-editors .style-editor").each(function(i,e){t(e).fadeOut(200)}),setTimeout(function(){t(".style-editor."+e).fadeIn(200)},200))})},i.activateDeleteButtons=function(){t(".custom-styles-tab .styles-list .style-delete, .custom-styles-tab .custom-style-templates .custom-styles-list-item .style-delete").click(function(i){var e=t(i.currentTarget),s=e.attr("class").split(" ")[1],n=window.slideshow_jquery_image_gallery_backend_script_generalSettings,o="Are you sure you want to delete this custom style?";void 0!==s&&("object"==typeof n&&"object"==typeof n.localization&&void 0!==n.localization.confirmDeleteMessage&&n.localization.confirmDeleteMessage.length>0&&(o=n.localization.confirmDeleteMessage),confirm(o)&&(t(".custom-styles-tab .style-editors .style-editor."+s).remove(),e.closest("li").remove()))})},i.getHighestCustomStyleID=function(){var i=0;return t(".custom-styles-tab .style-editors .style-editor").each(function(e,s){var n=parseInt(t(s).attr("class").split("_").pop());n>i&&(i=n)}),parseInt(i)},t(document).bind("slideshowBackendReady",i.init),i}();slideshow_jquery_image_gallery_backend_script.editSlideshow.slideManager=function(){var t=jQuery,i={};return i.isCurrentPage=!1,i.init=function(){slideshow_jquery_image_gallery_backend_script.editSlideshow.isCurrentPage&&i.activate()},i.activate=function(){var e=t("#slideshow-slide-inserter-popup"),s=t("#slideshow-slide-inserter-popup-background"),n=e.find("#search");i.indexSlidesOrder(),t(".sortable-slides-list").sortable({revert:!0,placeholder:"sortable-placeholder",forcePlaceholderSize:!0,stop:function(){i.indexSlidesOrder()},cancel:"input, select, p"}),t(".wp-color-picker-field").wpColorPicker({width:234}),s.height(t(document).outerHeight(!0)),e.css({top:parseInt(t(window).height()/2-e.outerHeight(!0)/2,10),left:parseInt(t(window).width()/2-e.outerWidth(!0)/2,10)}),n.focus(),i.getSearchResults(),e.find("#close").click(i.closePopup),s.click(i.closePopup),e.find("#search-submit").click(i.getSearchResults),n.keypress(function(t){13==t.which&&(t.preventDefault(),i.getSearchResults())}),t("#slideshow-insert-image-slide").click(function(){e.css({display:"block"}),s.css({display:"block"})}),t("#slideshow-insert-text-slide").click(i.insertTextSlide),t("#slideshow-insert-video-slide").click(i.insertVideoSlide),t(".slideshow-delete-slide").click(function(e){i.deleteSlide(t(e.currentTarget).closest("li"))})},i.deleteSlide=function(t){var i="Are you sure you want to delete this slide?",e=window.slideshow_jquery_image_gallery_backend_script_editSlideshow;"object"==typeof e&&"object"==typeof e.localization&&void 0!==e.localization.confirm&&e.localization.confirm.length>0&&(i=e.localization.confirm),confirm(i)&&t.remove()},i.indexSlidesOrder=function(){t.each(t(".sortable-slides-list").find("li"),function(i,e){t.each(t(e).find("input, select, textarea"),function(e,s){var n=t(s),o=n.attr("name");void 0===o||o.length<=0||(o=o.replace(/[\[\]']+/g," ").split(" "),n.attr("name",o[0]+"["+(i+1)+"]["+o[2]+"]"))})})},i.getSearchResults=function(e){var s=t("#slideshow-slide-inserter-popup"),n=s.find("#results"),o=[];e=parseInt(e),isNaN(e)&&(e=0,n.html("")),t.each(n.find(".result-table-row"),function(i,e){o.push(parseInt(t(e).attr("data-attachment-id")))}),t.post(window.ajaxurl,{action:"slideshow_slide_inserter_search_query",search:s.find("#search").attr("value"),offset:e,attachmentIDs:o},function(e){var s;n.append(e),n.find(".insert-attachment").unbind("click").click(function(e){var s=t(e.currentTarget).closest("tr");i.insertImageSlide(s.attr("data-attachment-id"),s.find(".title").text(),s.find(".description").text(),s.find(".image img").attr("src"))}),s=t(".load-more-results"),s&&s.click(function(e){var s=t(e.currentTarget),n=s.attr("data-offset");s.closest("tr").hide(),isNaN(parseInt(n))||i.getSearchResults(n)})})},i.insertImageSlide=function(e,s,n,o){var a=t(".image-slide-template").find("li").clone();a.find(".attachment").attr("src",o),a.find(".attachment").attr("title",s),a.find(".attachment").attr("alt",s),a.find(".title").attr("value",s),a.find(".description").html(n),a.find(".postId").attr("value",e),a.find(".title").attr("name","slides[0][title]"),a.find(".description").attr("name","slides[0][description]"),a.find(".url").attr("name","slides[0][url]"),a.find(".urlTarget").attr("name","slides[0][urlTarget]"),a.find(".type").attr("name","slides[0][type]"),a.find(".postId").attr("name","slides[0][postId]"),a.find(".slideshow-delete-slide").click(function(e){i.deleteSlide(t(e.currentTarget).closest("li"))}),t(".sortable-slides-list").prepend(a),i.indexSlidesOrder()},i.insertTextSlide=function(){var e=t(".text-slide-template").find("li").clone();e.find(".title").attr("name","slides[0][title]"),e.find(".description").attr("name","slides[0][description]"),e.find(".textColor").attr("name","slides[0][textColor]"),e.find(".color").attr("name","slides[0][color]"),e.find(".url").attr("name","slides[0][url]"),e.find(".urlTarget").attr("name","slides[0][urlTarget]"),e.find(".type").attr("name","slides[0][type]"),e.find(".slideshow-delete-slide").click(function(e){i.deleteSlide(t(e.currentTarget).closest("li"))}),e.find(".color, .textColor").wpColorPicker(),t(".sortable-slides-list").prepend(e),i.indexSlidesOrder()},i.insertVideoSlide=function(){var e=t(".video-slide-template").find("li").clone();e.find(".videoId").attr("name","slides[0][videoId]"),e.find(".showRelatedVideos").attr("name","slides[0][showRelatedVideos]"),e.find(".type").attr("name","slides[0][type]"),e.find(".slideshow-delete-slide").click(function(e){i.deleteSlide(t(e.currentTarget).closest("li"))}),t(".sortable-slides-list").prepend(e),i.indexSlidesOrder()},i.closePopup=function(){t("#slideshow-slide-inserter-popup, #slideshow-slide-inserter-popup-background").css({display:"none"})},t(document).bind("slideshowBackendReady",i.init),i}();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/min/all.frontend.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function onYouTubeIframeAPIReady(){slideshow_jquery_image_gallery_script.youTubeAPIReady=!0}slideshow_jquery_image_gallery_script=function(){var e=jQuery,t={};return t.registeredSlideshows=[],t.youTubeAPIReady=!1,t.loadYouTubeAPICalled=!1,t.stylesheetURLChecked=!1,t.activateSlideshows=function(){e.each(jQuery(".slideshow_container"),function(a,i){var s=e(i),o=s.data("sessionId");isNaN(parseInt(o,10))&&(o=s.attr("data-session-id")),e.inArray(o,t.registeredSlideshows)<0&&new t.Slideshow(s)})},t.loadYouTubeAPI=function(){if(!(t.loadYouTubeAPICalled||(t.loadYouTubeAPICalled=!0,e(".slideshow_slide_video").length<=0))){var a=document.createElement("script"),i=document.getElementsByTagName("script")[0];a.src="//www.youtube.com/iframe_api",i.parentNode.insertBefore(a,i)}},t.checkStylesheetURL=function(){if(!t.stylesheetURLChecked){t.stylesheetURLChecked=!0;var a=e('[id*="slideshow-jquery-image-gallery-ajax-stylesheet_"]');a.length<=0||e.each(a,function(t,a){var i,s,o,l=e(a),d=e(a).attr("href");void 0!==d&&""!==d&&(i=l.attr("id").split("_"),s=i.splice(1,i.length-1).join("_").slice(0,-4),o=d.split("?"),(void 0===o[1]||""===o[1]||o[1].toLowerCase().indexOf("style=")<0)&&(o[1]="action=slideshow_jquery_image_gallery_load_stylesheet&style="+s+"&ver="+Math.round((new Date).getTime()/1e3),d=o.join("?"),l.attr("href",d)))})}},e(document).ready(function(){t.loadYouTubeAPI(),t.checkStylesheetURL(),t.activateSlideshows()}),e(window).load(function(){t.loadYouTubeAPI(),t.checkStylesheetURL(),t.activateSlideshows()}),t}();!function(){var i=jQuery,e=slideshow_jquery_image_gallery_script;e.Slideshow=function(t){if(this.$container=t,this.$content=this.$container.find(".slideshow_content"),this.$views=this.$container.find(".slideshow_view"),this.$slides=this.$container.find(".slideshow_slide"),this.$controlPanel=this.$container.find(".slideshow_controlPanel"),this.$togglePlayButton=this.$controlPanel.find(".slideshow_togglePlay"),this.$nextButton=this.$container.find(".slideshow_next"),this.$previousButton=this.$container.find(".slideshow_previous"),this.$pagination=this.$container.find(".slideshow_pagination"),this.$loadingIcon=this.$container.find(".slideshow_loading_icon"),this.ID=this.getID(),!isNaN(parseInt(this.ID,10))){this.settings=window["SlideshowPluginSettings_"+this.ID],i.each(this.settings,i.proxy(function(i,e){"true"==e?this.settings[i]=!0:"false"==e&&(this.settings[i]=!1)},this)),this.$parentElement=this.$container.parent(),this.viewData=[],this.viewIDs=[],this.navigationActive=!0,this.currentViewID=void 0,this.currentWidth=0,this.visibleViews=[],this.videoPlayers=[],this.interval=!1,this.mouseEnterTimer=!1,this.invisibilityTimer=!1,this.descriptionTimer=!1,this.randomNextHistoryViewIDs=[],this.randomPreviousHistoryViewIDs=[],this.randomAvailableViewIDs=[],e.registeredSlideshows.push(this.ID),i.each(this.$views,i.proxy(function(i){this.viewIDs.push(i)},this)),this.currentViewID=this.getNextViewID(),this.visibleViews=[this.currentViewID],this.recalculate(!1);var s=!0;i.each(this.$views,i.proxy(function(e,t){var a=i(t);this.recalculateView(e),e!=this.visibleViews[0]?a.css("top",this.$container.outerHeight(!0)):a.addClass("slideshow_currentView"),this.viewData[e]=[],i.each(a.find(".slideshow_slide"),i.proxy(function(t,a){var n=i(a);if(this.viewData[e][t]={imageDimension:""},this.settings.waitUntilLoaded&&n.hasClass("slideshow_slide_image")){var o=n.find("img");o.length>0?o.each(i.proxy(function(a,n){n.complete?this.viewData[e][t].loaded=1:(e===this.currentViewID&&(s=!1),this.viewData[e][t].loaded=0,o.load(i.proxy(function(){this.viewData[e][t].loaded=1,e===this.currentViewID&&this.isViewLoaded(e)&&this.firstStart()},this)).bind("error",i.proxy(function(){this.viewData[e][t].loaded=2},this)))},this)):this.viewData[e][t].loaded=-1}else this.viewData[e][t].loaded=-1},this))},this)),i(window).load(i.proxy(function(){this.recalculateVisibleViews()},this)),parseFloat(this.settings.intervalSpeed)<parseFloat(this.settings.slideSpeed)+.1&&(this.settings.intervalSpeed=parseFloat(this.settings.slideSpeed)+.1),this.activateDescriptions(),this.activateControlPanel(),this.activateNavigationButtons(),this.activatePagination(),this.activatePauseOnHover(),(!this.settings.waitUntilLoaded||s)&&this.firstStart()}}}();!function(){var i=jQuery,t=slideshow_jquery_image_gallery_script;t.Slideshow.prototype.firstStart=function(){this.$loadingIcon.length>0&&this.$loadingIcon.remove(),this.$content.show(),this.settings.enableResponsiveness&&i(window).resize(i.proxy(function(){this.recalculate(!0)},this)),this.start()},t.Slideshow.prototype.start=function(){this.settings.play&&!this.interval&&(this.interval=setInterval(i.proxy(function t(e,s){void 0===s&&(s=this),void 0===e&&(e=s.getNextViewID()),s.isViewLoaded(e)?(s.animateTo(e,1),s.start()):(s.stop(),setTimeout(i.proxy(function(){t(e,s)},s),100))},this),1e3*this.settings.intervalSpeed))},t.Slideshow.prototype.stop=function(){clearInterval(this.interval),this.interval=!1},t.Slideshow.prototype.isVideoPlaying=function(){for(var i in this.videoPlayers)if(this.videoPlayers.hasOwnProperty(i)){var t=this.videoPlayers[i].state;if(1==t||3==t)return!0}return!1},t.Slideshow.prototype.pauseAllVideos=function(){for(var i in this.videoPlayers)if(this.videoPlayers.hasOwnProperty(i)){var t=this.videoPlayers[i].player;null!=t&&"function"==typeof t.pauseVideo&&(this.videoPlayers[i].state=2,t.pauseVideo())}},t.Slideshow.prototype.isViewLoaded=function(t){var e=!0;return i.each(this.viewData[t],i.proxy(function(i,t){0==t.loaded&&(e=!1)},this)),e},t.Slideshow.prototype.getNextViewID=function(){var i=this.currentViewID;if(this.settings.random){var t=i;if(i=this.getNextRandomViewID(),i!=t)return i}return isNaN(parseInt(i,10))?0:i>=this.$views.length-1?this.settings.loop?0:this.currentViewID:i+1},t.Slideshow.prototype.getPreviousViewID=function(){var i=this.currentViewID;if(isNaN(parseInt(i,10))&&(i=0),this.settings.random){var t=i;if(i=this.getPreviousRandomViewID(),i!=t)return i}return 0>=i?this.settings.loop?i=this.$views.length-1:this.currentViewID:i-=1},t.Slideshow.prototype.getNextRandomViewID=function(){return isNaN(parseInt(this.currentViewID,10))||this.randomPreviousHistoryViewIDs.push(this.currentViewID),this.randomPreviousHistoryViewIDs.length>2*this.viewIDs.length&&this.randomPreviousHistoryViewIDs.shift(),this.randomNextHistoryViewIDs.length>0?this.randomNextHistoryViewIDs.pop():((void 0===this.randomAvailableViewIDs||this.randomAvailableViewIDs.length<=0)&&(this.randomAvailableViewIDs=i.extend(!0,[],this.viewIDs),this.randomAvailableViewIDs.splice(i.inArray(this.currentViewID,this.randomAvailableViewIDs))),this.randomAvailableViewIDs.splice(Math.floor(Math.random()*this.randomAvailableViewIDs.length),1).pop())},t.Slideshow.prototype.getPreviousRandomViewID=function(){return isNaN(parseInt(this.currentViewID,10))||this.randomNextHistoryViewIDs.push(this.currentViewID),this.randomNextHistoryViewIDs.length>2*this.viewIDs.length&&this.randomNextHistoryViewIDs.shift(),this.randomPreviousHistoryViewIDs.length>0?this.randomPreviousHistoryViewIDs.pop():this.viewIDs[Math.floor(Math.random()*this.viewIDs.length)]},t.Slideshow.prototype.getID=function(){var i=this.$container.data("sessionId");return isNaN(parseInt(i,10))&&(i=this.$container.attr("data-session-id")),i}}();!function(){var e=jQuery,t=slideshow_jquery_image_gallery_script;t.Slideshow.prototype.animateTo=function(t,i){if(!(this.isVideoPlaying()||0>t||t>=this.$views.length||t==this.currentViewID)){this.navigationActive=!1,(isNaN(parseInt(i,10))||0==i)&&(i=t<this.currentViewID?-1:1),this.visibleViews=[this.currentViewID,t];var s=this.settings.animation,o=["slide","slideRight","slideUp","slideDown","fade","directFade"];"random"==s&&(s=o[Math.floor(Math.random()*o.length)]);var n={slide:"slideRight",slideRight:"slide",slideUp:"slideDown",slideDown:"slideUp",fade:"fade",directFade:"directFade"};0>i&&(s=n[s]);var a=e(this.$views[this.currentViewID]),r=e(this.$views[t]);switch(a.stop(!0,!0),r.stop(!0,!0),r.addClass("slideshow_nextView"),this.recalculateVisibleViews(),this.currentViewID=t,this.$container.trigger("slideshowAnimate"),s){case"slide":r.css({top:0,left:this.$content.width()}),a.animate({left:-a.outerWidth(!0)},1e3*this.settings.slideSpeed),r.animate({left:0},1e3*this.settings.slideSpeed),setTimeout(e.proxy(function(){a.stop(!0,!0).css("top",this.$container.outerHeight(!0))},this),1e3*this.settings.slideSpeed);break;case"slideRight":r.css({top:0,left:-this.$content.width()}),a.animate({left:a.outerWidth(!0)},1e3*this.settings.slideSpeed),r.animate({left:0},1e3*this.settings.slideSpeed),setTimeout(e.proxy(function(){a.stop(!0,!0).css("top",this.$container.outerHeight(!0))},this),1e3*this.settings.slideSpeed);break;case"slideUp":r.css({top:this.$content.height(),left:0}),a.animate({top:-a.outerHeight(!0)},1e3*this.settings.slideSpeed),r.animate({top:0},1e3*this.settings.slideSpeed),setTimeout(e.proxy(function(){a.stop(!0,!0).css("top",this.$container.outerHeight(!0))},this),1e3*this.settings.slideSpeed);break;case"slideDown":r.css({top:-this.$content.height(),left:0}),a.animate({top:a.outerHeight(!0)},1e3*this.settings.slideSpeed),r.animate({top:0},1e3*this.settings.slideSpeed),setTimeout(e.proxy(function(){a.stop(!0,!0).css("top",this.$container.outerHeight(!0))},this),1e3*this.settings.slideSpeed);break;case"fade":r.css({top:0,left:0,display:"none"}),a.fadeOut(1e3*this.settings.slideSpeed/2),setTimeout(e.proxy(function(){r.fadeIn(1e3*this.settings.slideSpeed/2),a.stop(!0,!0).css({top:this.$container.outerHeight(!0),display:"block"})},this),1e3*this.settings.slideSpeed/2);break;case"directFade":r.css({top:0,left:0,"z-index":0,display:"none"}),a.css({"z-index":1}),r.stop(!0,!0).fadeIn(1e3*this.settings.slideSpeed),a.stop(!0,!0).fadeOut(1e3*this.settings.slideSpeed),setTimeout(e.proxy(function(){r.stop(!0,!0).css({"z-index":0}),a.stop(!0,!0).css({top:this.$container.outerHeight(!0),display:"block","z-index":0})},this),1e3*this.settings.slideSpeed)}setTimeout(e.proxy(function(){a.removeClass("slideshow_currentView"),r.removeClass("slideshow_nextView"),r.addClass("slideshow_currentView"),this.visibleViews=[t],this.navigationActive=!0},this),1e3*this.settings.slideSpeed)}}}();!function(){var t=jQuery,i=slideshow_jquery_image_gallery_script;i.Slideshow.prototype.recalculate=function(i){if(!this.$container.is(":visible"))return this.invisibilityTimer=setInterval(t.proxy(function(){this.$container.is(":visible")&&(this.recalculate(i),clearInterval(this.invisibilityTimer),this.invisibilityTimer=!1)},this),500),void 0;for(var e=this.$parentElement,s=0;e.width()<=0&&(e=e.parent(),!(s>50));s++);if(this.currentWidth!=e.width()){this.currentWidth=e.width();var h=e.width()-(this.$container.outerWidth()-this.$container.width());if(parseInt(this.settings.maxWidth,10)>0&&parseInt(this.settings.maxWidth,10)<h&&(h=parseInt(this.settings.maxWidth,10)),this.$container.css("width",Math.floor(h)),this.$content.css("width",Math.floor(h)-(this.$content.outerWidth(!0)-this.$content.width())),this.settings.preserveSlideshowDimensions){var o=h*this.settings.dimensionHeight/this.settings.dimensionWidth;this.$container.css("height",Math.floor(o)),this.$content.css("height",Math.floor(o)-(this.$content.outerHeight(!0)-this.$content.height()))}else this.$container.css("height",Math.floor(this.settings.height)),this.$content.css("height",Math.floor(this.settings.height));this.$views.each(t.proxy(function(i,e){t.inArray(i,this.visibleViews)<0&&t(e).css("top",this.$container.outerHeight(!0))},this)),this.$container.trigger("slideshowResize"),(i||void 0==i)&&this.recalculateVisibleViews()}},i.Slideshow.prototype.recalculateVisibleViews=function(){t.each(this.visibleViews,t.proxy(function(t,i){this.recalculateView(i)},this))},i.Slideshow.prototype.recalculateView=function(e){var s=t(this.$views[e]);if(this.$content.width()!=s.outerWidth(!0)){var h=s.find(".slideshow_slide");if(!(h.length<=0)){var o=this.$content.width()-(s.outerWidth(!0)-s.width()),n=this.$content.height()-(s.outerHeight(!0)-s.height()),a=Math.floor(o/h.length),r=n,d=o%h.length,l=0;t(h[0]).css("margin-left",0),t(h[h.length-1]).css("margin-right",0),t.each(h,t.proxy(function(s,o){var n=t(o),c=n.outerWidth(!0)-n.width(),w=n.outerHeight(!0)-n.height();if(s==h.length-1?n.width(a-c+d):n.width(a-c),n.height(r-w),n.hasClass("slideshow_slide_text")){var u=n.find(".slideshow_background_anchor");if(u.length<=0)return;var g=n.width()-(u.outerWidth(!0)-u.width()),p=n.height()-(u.outerHeight(!0)-u.height());u.css({width:g,height:p})}else if(n.hasClass("slideshow_slide_image")){var v=n.find("img");if(v.length<=0)return;var f=n.width()-(v.outerWidth(!0)-v.width()),y=n.height()-(v.outerHeight(!0)-v.height());if(this.settings.stretchImages)v.css({width:f,height:y}),v.attr({width:f,height:y});else if(v.width()>0&&v.height()>0){var m;"object"!=typeof this.viewData||"object"!=typeof this.viewData[e]||"object"!=typeof this.viewData[e][s]||isNaN(parseInt(this.viewData[e][s].imageDimension))?("object"!=typeof this.viewData[e]&&(this.viewData[e]=[]),"object"!=typeof this.viewData[e][s]&&(this.viewData[e][s]=[]),m=this.viewData[e][s].imageDimension=v.outerWidth(!0)/v.outerHeight(!0)):m=this.viewData[e][s].imageDimension;var I=n.width()/n.height();m>=I?(v.css({margin:"0px",width:f,height:Math.floor(f/m)}),v.attr({width:f,height:Math.floor(f/m)})):I>m&&(v.css({"margin-left":"auto","margin-right":"auto",display:"block",width:Math.floor(y*m),height:y}),v.attr({width:Math.floor(y*m),height:y}))}}else if(n.hasClass("slideshow_slide_video")){var D=n.find("iframe");if(D.length>0)D.attr({width:n.width(),height:n.height()});else var V=setInterval(t.proxy(function(){if(i.youTubeAPIReady){clearInterval(V);var e=n.find(".slideshow_slide_video_id");e.attr("id","slideshow_slide_video_"+Math.floor(1e6*Math.random())+"_"+e.text());var s=e.attr("data-show-related-videos"),h=new YT.Player(e.attr("id"),{width:n.width(),height:n.height(),videoId:e.text(),playerVars:{wmode:"opaque",rel:s},events:{onReady:function(){},onStateChange:t.proxy(function(t){this.videoPlayers[e.attr("id")].state=t.data},this)}}),o=t("#"+e.attr("id"));o.show(),o.attr("src",o.attr("src")+"&wmode=opaque"),this.videoPlayers[e.attr("id")]={player:h,state:-1}}},this),500)}l+=n.outerWidth(!0)},this)),s.css({width:o,height:n})}}}}();!function(){var t=jQuery,i=slideshow_jquery_image_gallery_script;i.Slideshow.prototype.activateDescriptions=function(){this.settings.showDescription&&(t.each(this.$slides.find(".slideshow_description"),t.proxy(function(i,e){var s=t(e);s.show(),this.settings.hideDescription?s.css({position:"absolute",top:this.$container.outerHeight(!0)}):s.css({position:"absolute",bottom:0})},this)),this.settings.hideDescription&&(this.$container.bind("slideshowResize",t.proxy(function(){t.each(this.$container.find(".slideshow_description"),t.proxy(function(i,e){t(e).css("top",this.$container.outerHeight(!0))},this))},this)),this.$container.bind("slideshowAnimate",t.proxy(function(){void 0!=this.visibleViews[1]&&t.each(t(this.$views[this.visibleViews[1]]).find(".slideshow_description"),t.proxy(function(i,e){t(e).css("top",this.$container.outerHeight(!0))},this))},this)),this.$slides.mouseenter(t.proxy(function(i){var e=t(i.currentTarget).find(".slideshow_description");this.descriptionTimer=setTimeout(t.proxy(function(){this.descriptionTimer="",e.stop(!0,!1).animate({top:this.$container.outerHeight(!0)-e.outerHeight(!0)},parseInt(1e3*this.settings.descriptionSpeed,10))},this),100)},this)),this.$slides.mouseleave(t.proxy(function(i){this.descriptionTimer===!1&&(clearInterval(this.descriptionTimer),this.descriptionTimer=!1),t(i.currentTarget).find(".slideshow_description").stop(!0,!1).animate({top:this.$container.outerHeight(!0)},parseInt(1e3*this.settings.descriptionSpeed,10))},this))))},i.Slideshow.prototype.activateNavigationButtons=function(){this.settings.controllable&&(this.$nextButton.click(t.proxy(function(){this.navigationActive&&(this.pauseAllVideos(),this.stop(),this.animateTo(this.getNextViewID(),1),this.start())},this)),this.$previousButton.click(t.proxy(function(){this.navigationActive&&(this.pauseAllVideos(),this.stop(),this.animateTo(this.getPreviousViewID(),-1),this.start())},this)),this.settings.hideNavigationButtons?(this.$container.mouseenter(t.proxy(function(){this.$nextButton.stop(!0,!0).fadeIn(100)},this)),this.$container.mouseleave(t.proxy(function(){this.$nextButton.stop(!0,!0).fadeOut(500)},this)),this.$container.mouseenter(t.proxy(function(){this.$previousButton.stop(!0,!0).fadeIn(100)},this)),this.$container.mouseleave(t.proxy(function(){this.$previousButton.stop(!0,!0).fadeOut(500)},this))):(this.$nextButton.show(),this.$previousButton.show()))},i.Slideshow.prototype.activateControlPanel=function(){this.settings.controlPanel&&(this.settings.play?this.$togglePlayButton.attr("class","slideshow_pause"):this.$togglePlayButton.attr("class","slideshow_play"),this.$togglePlayButton.click(t.proxy(function(i){this.settings.play?(this.settings.play=!1,t(i.currentTarget).attr("class","slideshow_play"),this.stop()):(this.settings.play=!0,t(i.currentTarget).attr("class","slideshow_pause"),this.start())},this)),this.settings.hideControlPanel?(this.$container.mouseenter(t.proxy(function(){this.$controlPanel.stop(!0,!0).fadeIn(100)},this)),this.$container.mouseleave(t.proxy(function(){this.$controlPanel.stop(!0,!0).fadeOut(500)},this))):this.$controlPanel.show())},i.Slideshow.prototype.activatePagination=function(){if(this.settings.showPagination){this.$pagination.find(".slideshow_pagination_center").html("<ul></ul>");var i=this.$pagination.find("ul");i.html(""),this.$views.each(t.proxy(function(t){var e="";t==this.currentViewID&&(e="slideshow_currentView"),i.append('<li class="slideshow_transparent '+e+'"><span style="display: none;">'+t+"</span></li>")},this)),this.$pagination.find("li").click(t.proxy(function(i){if(this.navigationActive){var e=t(i.currentTarget).find("span").text();isNaN(parseInt(e,10))||(this.pauseAllVideos(),this.stop(),this.animateTo(parseInt(e,10),0),this.start())}},this)),this.$container.bind("slideshowAnimate",t.proxy(function(){var i=this.$pagination.find("li");i.each(t.proxy(function(i,e){t(e).removeClass("slideshow_currentView")},this)),t(i[this.currentViewID]).addClass("slideshow_currentView")},this)),this.settings.hidePagination?(this.$container.mouseenter(t.proxy(function(){this.$pagination.stop(!0,!0).fadeIn(100)},this)),this.$container.mouseleave(t.proxy(function(){this.$pagination.stop(!0,!0).fadeOut(500)},this))):this.$pagination.show()}},i.Slideshow.prototype.activatePauseOnHover=function(){this.settings.pauseOnHover&&(this.$container.mouseenter(t.proxy(function(){clearTimeout(this.mouseEnterTimer),this.mouseEnterTimer=setTimeout(t.proxy(function(){this.stop()},this),500)},this)),this.$container.mouseleave(t.proxy(function(){clearTimeout(this.mouseEnterTimer),this.interval===!1&&this.start()},this)))}}();
|
1 |
+
function onYouTubeIframeAPIReady(){slideshow_jquery_image_gallery_script.youTubeAPIReady=!0}slideshow_jquery_image_gallery_script=function(){var t=jQuery,i={};return i.slideshowInstances={},i.initialized=!1,i.youTubeAPIReady=!1,i.init=function(){i.initialized||(i.initialized=!0,i.loadYouTubeAPI(),i.checkStylesheetURL(),i.activateSlideshows())},i.getSlideshowInstance=function(e){if(isNaN(parseInt(e,10))){if(e instanceof t&&e.length>0)for(var s in i.slideshowInstances)if(i.slideshowInstances.hasOwnProperty(s)){var n=i.slideshowInstances[s];if(n instanceof i.Slideshow&&n.$container.get(0)===e.get(0))return n}}else if(i.slideshowInstances[e]instanceof i.Slideshow)return i.slideshowInstances[e];return new i.Slideshow},i.activateSlideshows=function(){t.each(jQuery(".slideshow_container"),function(e,s){var n=t(s),o=n.data("sessionId");isNaN(parseInt(o,10))&&(o=n.attr("data-session-id")),i.slideshowInstances[o]instanceof i.Slideshow||(i.slideshowInstances[o]=new i.Slideshow(n))})},i.loadYouTubeAPI=function(){if(i.loadYouTubeAPICalled=!0,!(t(".slideshow_slide_video").length<=0)){var e=document.createElement("script"),s=document.getElementsByTagName("script")[0];e.src="//www.youtube.com/iframe_api",s.parentNode.insertBefore(e,s)}},i.checkStylesheetURL=function(){var i=t('[id*="slideshow-jquery-image-gallery-ajax-stylesheet_"]');i.length<=0||t.each(i,function(i,e){var s,n,o,a=t(e),h=t(e).attr("href");void 0!==h&&""!==h&&(s=a.attr("id").split("_"),n=s.splice(1,s.length-1).join("_").slice(0,-4),o=h.split("?"),(void 0===o[1]||""===o[1]||o[1].toLowerCase().indexOf("style=")<0)&&(o[1]="action=slideshow_jquery_image_gallery_load_stylesheet&style="+n+"&ver="+Math.round((new Date).getTime()/1e3),h=o.join("?"),a.attr("href",h)))})},t(document).ready(function(){i.init()}),t(window).load(function(){i.init()}),t.fn.getSlideshowInstance=function(){return i.getSlideshowInstance(this)},i}();!function(){var t=jQuery,i=slideshow_jquery_image_gallery_script;i.Slideshow=function(i){if(i instanceof t&&(this.$container=i,this.$content=this.$container.find(".slideshow_content"),this.$views=this.$container.find(".slideshow_view"),this.$slides=this.$container.find(".slideshow_slide"),this.$controlPanel=this.$container.find(".slideshow_controlPanel"),this.$togglePlayButton=this.$controlPanel.find(".slideshow_togglePlay"),this.$nextButton=this.$container.find(".slideshow_next"),this.$previousButton=this.$container.find(".slideshow_previous"),this.$pagination=this.$container.find(".slideshow_pagination"),this.$loadingIcon=this.$container.find(".slideshow_loading_icon"),this.ID=this.getID(),!isNaN(parseInt(this.ID,10)))){this.settings=window["SlideshowPluginSettings_"+this.ID],t.each(this.settings,t.proxy(function(t,i){"true"==i?this.settings[t]=!0:"false"==i&&(this.settings[t]=!1)},this)),this.$parentElement=this.$container.parent(),this.viewData=[],this.viewIDs=[],this.currentlyAnimating=!1,this.currentViewID=void 0,this.currentWidth=0,this.visibleViews=[],this.videoPlayers=[],this.PlayStates={PAUSED:-1,TEMPORARILY_PAUSED:0,PLAYING:1},this.playState=-1,this.interval=!1,this.pauseOnHoverTimer=!1,this.invisibilityTimer=!1,this.descriptionTimer=!1,this.randomNextHistoryViewIDs=[],this.randomPreviousHistoryViewIDs=[],this.randomAvailableViewIDs=[],t.each(this.$views,t.proxy(function(t){this.viewIDs.push(t)},this)),this.currentViewID=this.getNextViewID(),this.visibleViews=[this.currentViewID],this.recalculate(!1);var e=!0;t.each(this.$views,t.proxy(function(i,s){var n=t(s);i!=this.visibleViews[0]?n.css("top",this.$container.outerHeight(!0)):n.addClass("slideshow_currentView"),this.viewData[i]=[],t.each(n.find(".slideshow_slide"),t.proxy(function(s,n){var o=t(n);if(this.viewData[i][s]={},o.hasClass("slideshow_slide_image")){var a=o.find("img");a.length>0?a.get(0).complete?this.viewData[i][s].loaded=1:(i===this.currentViewID&&(e=!1),this.viewData[i][s].loaded=0,this.onImageLoad(a,t.proxy(function(t){this.viewData[i][s].loaded=t?1:2,this.settings.waitUntilLoaded&&i===this.currentViewID&&this.isViewLoaded(i)&&this.start()},this))):this.viewData[i][s].loaded=-1}else this.viewData[i][s].loaded=-1},this))},this)),t(window).load(t.proxy(function(){this.recalculateVisibleViews()},this)),parseFloat(this.settings.intervalSpeed)<parseFloat(this.settings.slideSpeed)+.1&&(this.settings.intervalSpeed=parseFloat(this.settings.slideSpeed)+.1),(!this.settings.waitUntilLoaded||this.settings.waitUntilLoaded&&e)&&this.start()}}}();!function(){var t=jQuery,i=slideshow_jquery_image_gallery_script;i.Slideshow.prototype.start=function(){this.activateDescriptions(),this.activateControlPanel(),this.activateNavigationButtons(),this.activatePagination(),this.activatePauseOnHover(),this.$loadingIcon.length>0&&this.$loadingIcon.remove(),this.$content.show(),this.recalculateViews(),this.settings.enableResponsiveness&&t(window).resize(t.proxy(function(){this.recalculate(!0)},this)),this.play()},i.Slideshow.prototype.play=function(){this.settings.play&&!this.interval&&(this.playState=this.PlayStates.PLAYING,this.$container.trigger("slideshowPlayStateChange",[this.playState]),this.interval=setInterval(t.proxy(function i(e,s){void 0===s&&(s=this),void 0===e&&(e=s.getNextViewID()),s.isViewLoaded(e)?(s.animateTo(e,1),s.play()):(s.pause(this.PlayStates.TEMPORARILY_PAUSED),setTimeout(t.proxy(function(){i(e,s)},s),100))},this),1e3*this.settings.intervalSpeed))},i.Slideshow.prototype.pause=function(t){clearInterval(this.interval),this.interval=!1,t!==this.PlayStates.PAUSED&&t!==this.PlayStates.TEMPORARILY_PAUSED&&(t=this.PlayStates.PAUSED),this.playState=t,this.$container.trigger("slideshowPlayStateChange",[this.playState])},i.Slideshow.prototype.next=function(){this.pause(this.PlayStates.TEMPORARILY_PAUSED),this.animateTo(this.getNextViewID(),1),this.play()},i.Slideshow.prototype.previous=function(){this.pause(this.PlayStates.TEMPORARILY_PAUSED),this.animateTo(this.getPreviousViewID(),-1),this.play()},i.Slideshow.prototype.isVideoPlaying=function(){for(var t in this.videoPlayers)if(this.videoPlayers.hasOwnProperty(t)){var i=this.videoPlayers[t].state;if(1==i||3==i)return!0}return!1},i.Slideshow.prototype.pauseAllVideos=function(){for(var t in this.videoPlayers)if(this.videoPlayers.hasOwnProperty(t)){var i=this.videoPlayers[t].player;null!=i&&"function"==typeof i.pauseVideo&&(this.videoPlayers[t].state=2,i.pauseVideo())}},i.Slideshow.prototype.isViewLoaded=function(i){var e=!0;return t.each(this.viewData[i],t.proxy(function(t,i){0==i.loaded&&(e=!1)},this)),e},i.Slideshow.prototype.getNaturalImageSize=function(i,e,s){return i.length<=0||!(i instanceof t)||"string"!=typeof i.attr("src")?(e(-1,-1,s),void 0):(this.onImageLoad(i,t.proxy(function(t,i){e(i.width,i.height,s)},this)),void 0)},i.Slideshow.prototype.onImageLoad=function(i,e,s){var n=new Image;return i.length<=0||!(i instanceof t)||"string"!=typeof i.attr("src")?(e(!1,n,s),void 0):(n.onload=t.proxy(function(){e(!0,n,s)},this),n.src=i.attr("src"),void 0)},i.Slideshow.prototype.getNextViewID=function(){var t=this.currentViewID;if(this.settings.random){var i=t;if(t=this.getNextRandomViewID(),t!=i)return t}return isNaN(parseInt(t,10))?0:t>=this.$views.length-1?this.settings.loop?0:this.currentViewID:t+1},i.Slideshow.prototype.getPreviousViewID=function(){var t=this.currentViewID;if(isNaN(parseInt(t,10))&&(t=0),this.settings.random){var i=t;if(t=this.getPreviousRandomViewID(),t!=i)return t}return 0>=t?this.settings.loop?t=this.$views.length-1:this.currentViewID:t-=1},i.Slideshow.prototype.getNextRandomViewID=function(){return isNaN(parseInt(this.currentViewID,10))||this.randomPreviousHistoryViewIDs.push(this.currentViewID),this.randomPreviousHistoryViewIDs.length>2*this.viewIDs.length&&this.randomPreviousHistoryViewIDs.shift(),this.randomNextHistoryViewIDs.length>0?this.randomNextHistoryViewIDs.pop():((void 0===this.randomAvailableViewIDs||this.randomAvailableViewIDs.length<=0)&&(this.randomAvailableViewIDs=t.extend(!0,[],this.viewIDs),this.randomAvailableViewIDs.splice(t.inArray(this.currentViewID,this.randomAvailableViewIDs))),this.randomAvailableViewIDs.splice(Math.floor(Math.random()*this.randomAvailableViewIDs.length),1).pop())},i.Slideshow.prototype.getPreviousRandomViewID=function(){return isNaN(parseInt(this.currentViewID,10))||this.randomNextHistoryViewIDs.push(this.currentViewID),this.randomNextHistoryViewIDs.length>2*this.viewIDs.length&&this.randomNextHistoryViewIDs.shift(),this.randomPreviousHistoryViewIDs.length>0?this.randomPreviousHistoryViewIDs.pop():this.viewIDs[Math.floor(Math.random()*this.viewIDs.length)]},i.Slideshow.prototype.getID=function(){var t=this.$container.data("sessionId");return isNaN(parseInt(t,10))&&(t=this.$container.attr("data-session-id")),t}}();!function(){var t=jQuery,i=slideshow_jquery_image_gallery_script;i.Slideshow.prototype.animateTo=function(i,e){if(!(this.isVideoPlaying()||0>i||i>=this.$views.length||i==this.currentViewID)){if(this.currentlyAnimating===!0)return this.$container.one("slideshowAnimationEnd",t.proxy(function(){this.pause(this.PlayStates.TEMPORARILY_PAUSED),this.animateTo(i,e),this.play()},this)),void 0;this.currentlyAnimating=!0,(isNaN(parseInt(e,10))||0==e)&&(e=i<this.currentViewID?-1:1),this.visibleViews=[this.currentViewID,i];var s=this.settings.animation,n=["slide","slideRight","slideUp","slideDown","fade","directFade"];"random"==s&&(s=n[Math.floor(Math.random()*n.length)]);var o={slide:"slideRight",slideRight:"slide",slideUp:"slideDown",slideDown:"slideUp",fade:"fade",directFade:"directFade"};0>e&&(s=o[s]);var a=t(this.$views[this.currentViewID]),h=t(this.$views[i]);switch(a.stop(!0,!0),h.stop(!0,!0),h.addClass("slideshow_nextView"),this.recalculateVisibleViews(),this.currentViewID=i,this.$container.trigger("slideshowAnimationStart",[i,s]),s){case"slide":h.css({top:0,left:this.$content.width()}),a.animate({left:-a.outerWidth(!0)},1e3*this.settings.slideSpeed),h.animate({left:0},1e3*this.settings.slideSpeed),setTimeout(t.proxy(function(){a.stop(!0,!0).css("top",this.$container.outerHeight(!0))},this),1e3*this.settings.slideSpeed);break;case"slideRight":h.css({top:0,left:-this.$content.width()}),a.animate({left:a.outerWidth(!0)},1e3*this.settings.slideSpeed),h.animate({left:0},1e3*this.settings.slideSpeed),setTimeout(t.proxy(function(){a.stop(!0,!0).css("top",this.$container.outerHeight(!0))},this),1e3*this.settings.slideSpeed);break;case"slideUp":h.css({top:this.$content.height(),left:0}),a.animate({top:-a.outerHeight(!0)},1e3*this.settings.slideSpeed),h.animate({top:0},1e3*this.settings.slideSpeed),setTimeout(t.proxy(function(){a.stop(!0,!0).css("top",this.$container.outerHeight(!0))},this),1e3*this.settings.slideSpeed);break;case"slideDown":h.css({top:-this.$content.height(),left:0}),a.animate({top:a.outerHeight(!0)},1e3*this.settings.slideSpeed),h.animate({top:0},1e3*this.settings.slideSpeed),setTimeout(t.proxy(function(){a.stop(!0,!0).css("top",this.$container.outerHeight(!0))},this),1e3*this.settings.slideSpeed);break;case"fade":h.css({top:0,left:0,display:"none"}),a.fadeOut(1e3*this.settings.slideSpeed/2),setTimeout(t.proxy(function(){h.fadeIn(1e3*this.settings.slideSpeed/2),a.stop(!0,!0).css({top:this.$container.outerHeight(!0),display:"block"})},this),1e3*this.settings.slideSpeed/2);break;case"directFade":h.css({top:0,left:0,"z-index":0,display:"none"}),a.css({"z-index":1}),h.stop(!0,!0).fadeIn(1e3*this.settings.slideSpeed),a.stop(!0,!0).fadeOut(1e3*this.settings.slideSpeed),setTimeout(t.proxy(function(){h.stop(!0,!0).css({"z-index":0}),a.stop(!0,!0).css({top:this.$container.outerHeight(!0),display:"block","z-index":0})},this),1e3*this.settings.slideSpeed)}setTimeout(t.proxy(function(){a.removeClass("slideshow_currentView"),h.removeClass("slideshow_nextView"),h.addClass("slideshow_currentView"),this.visibleViews=[i],this.currentlyAnimating=!1,this.$container.trigger("slideshowAnimationEnd")},this),1e3*this.settings.slideSpeed)}}}();!function(){var t=jQuery,i=slideshow_jquery_image_gallery_script;i.Slideshow.prototype.recalculate=function(i){if(!this.$container.is(":visible"))return this.invisibilityTimer=setInterval(t.proxy(function(){this.$container.is(":visible")&&(this.recalculate(i),clearInterval(this.invisibilityTimer),this.invisibilityTimer=!1)},this),500),void 0;for(var e=this.$parentElement,s=0;e.width()<=0&&(e=e.parent(),!(s>50));s++);if(this.currentWidth!=e.width()){this.currentWidth=e.width();var n=e.width()-(this.$container.outerWidth()-this.$container.width());if(parseInt(this.settings.maxWidth,10)>0&&parseInt(this.settings.maxWidth,10)<n&&(n=parseInt(this.settings.maxWidth,10)),this.$container.css("width",Math.floor(n)),this.$content.css("width",Math.floor(n)-(this.$content.outerWidth(!0)-this.$content.width())),this.settings.preserveSlideshowDimensions){var o=n*this.settings.dimensionHeight/this.settings.dimensionWidth;this.$container.css("height",Math.floor(o)),this.$content.css("height",Math.floor(o)-(this.$content.outerHeight(!0)-this.$content.height()))}else this.$container.css("height",Math.floor(this.settings.height)),this.$content.css("height",Math.floor(this.settings.height));this.$views.each(t.proxy(function(i,e){t.inArray(i,this.visibleViews)<0&&t(e).css("top",this.$container.outerHeight(!0))},this)),this.$container.trigger("slideshowResize"),(i||"boolean"!=typeof i)&&this.recalculateVisibleViews()}},i.Slideshow.prototype.recalculateViews=function(){t.each(this.$views,t.proxy(function(t){this.recalculateView(t,!1)},this))},i.Slideshow.prototype.recalculateVisibleViews=function(){t.each(this.visibleViews,t.proxy(function(t,i){this.recalculateView(i,!1)},this))},i.Slideshow.prototype.recalculateView=function(e,s){var n=t(this.$views[e]);if("boolean"==typeof s&&s||this.$content.width()!=n.outerWidth(!0)){var o=n.find(".slideshow_slide");if(!(o.length<=0)){var a=this.$content.width()-(n.outerWidth(!0)-n.width()),h=this.$content.height()-(n.outerHeight(!0)-n.height()),r=Math.floor(a/o.length),l=h,d=a%o.length,c=0;t(o[0]).css("margin-left",0),t(o[o.length-1]).css("margin-right",0),t.each(o,t.proxy(function(s,n){var a=t(n),h=a.outerWidth(!0)-a.width(),u=a.outerHeight(!0)-a.height();if(s==o.length-1?a.width(r-h+d):a.width(r-h),a.height(l-u),a.hasClass("slideshow_slide_text")){var p=a.find(".slideshow_background_anchor");if(p.length<=0)return;var w=a.width()-(p.outerWidth(!0)-p.width()),g=a.height()-(p.outerHeight(!0)-p.height());p.css({width:w,height:g})}else if(a.hasClass("slideshow_slide_image")){var f=a.find("img");if(f.length<=0)return;var y=f.outerWidth()-f.width(),v=f.outerHeight()-f.height(),m=a.width()-y,I=a.height()-v;this.settings.stretchImages?(f.css({width:m,height:I}),f.attr({width:m,height:I})):this.getNaturalImageSize(f,t.proxy(function(i,s){var n,o;return 0>=i||0>=s?(setTimeout(t.proxy(function(){this.recalculateView(e,!0)},this),500),void 0):(n=a.width()/a.height(),o=(i+y)/(s+v),o>=n?(f.css({margin:"0px",width:m,height:Math.floor(m/o)}),f.attr({width:m,height:Math.floor(m/o)})):(f.css({"margin-left":"auto","margin-right":"auto",display:"block",width:Math.floor(I*o),height:I}),f.attr({width:Math.floor(I*o),height:I})),void 0)},this))}else if(a.hasClass("slideshow_slide_video")){var $=a.find("iframe");if($.length>0)$.attr({width:a.width(),height:a.height()});else var S=setInterval(t.proxy(function(){if(i.youTubeAPIReady){clearInterval(S);var e=a.find(".slideshow_slide_video_id");e.attr("id","slideshow_slide_video_"+Math.floor(1e6*Math.random())+"_"+e.text());var s=e.attr("data-show-related-videos"),n=new YT.Player(e.attr("id"),{width:a.width(),height:a.height(),videoId:e.text(),playerVars:{wmode:"opaque",rel:s},events:{onReady:function(){},onStateChange:t.proxy(function(t){this.videoPlayers[e.attr("id")].state=t.data},this)}}),o=t("#"+e.attr("id"));o.show(),o.attr("src",o.attr("src")+"&wmode=opaque"),this.videoPlayers[e.attr("id")]={player:n,state:-1}}},this),500)}c+=a.outerWidth(!0)},this)),n.css({width:a,height:h})}}}}();!function(){var t=jQuery,i=slideshow_jquery_image_gallery_script;i.Slideshow.prototype.activateDescriptions=function(){this.settings.showDescription&&(t.each(this.$slides.find(".slideshow_description"),t.proxy(function(i,e){var s=t(e);s.show(),this.settings.hideDescription?s.css({position:"absolute",top:this.$container.outerHeight(!0)}):s.css({position:"absolute",bottom:0})},this)),this.settings.hideDescription&&(this.$container.bind("slideshowResize",t.proxy(function(){t.each(this.$container.find(".slideshow_description"),t.proxy(function(i,e){t(e).css("top",this.$container.outerHeight(!0))},this))},this)),this.$container.bind("slideshowAnimationStart",t.proxy(function(){void 0!=this.visibleViews[1]&&t.each(t(this.$views[this.visibleViews[1]]).find(".slideshow_description"),t.proxy(function(i,e){t(e).css("top",this.$container.outerHeight(!0))},this))},this)),this.$slides.mouseenter(t.proxy(function(i){var e=t(i.currentTarget).find(".slideshow_description");this.descriptionTimer=setTimeout(t.proxy(function(){this.descriptionTimer="",e.stop(!0,!1).animate({top:this.$container.outerHeight(!0)-e.outerHeight(!0)},parseInt(1e3*this.settings.descriptionSpeed,10))},this),100)},this)),this.$slides.mouseleave(t.proxy(function(i){this.descriptionTimer===!1&&(clearInterval(this.descriptionTimer),this.descriptionTimer=!1),t(i.currentTarget).find(".slideshow_description").stop(!0,!1).animate({top:this.$container.outerHeight(!0)},parseInt(1e3*this.settings.descriptionSpeed,10))},this))))},i.Slideshow.prototype.activateNavigationButtons=function(){this.settings.controllable&&(this.$nextButton.click(t.proxy(function(){this.currentlyAnimating||(this.pauseAllVideos(),this.pause(this.PlayStates.TEMPORARILY_PAUSED),this.animateTo(this.getNextViewID(),1),this.play())},this)),this.$previousButton.click(t.proxy(function(){this.currentlyAnimating||(this.pauseAllVideos(),this.pause(this.PlayStates.TEMPORARILY_PAUSED),this.animateTo(this.getPreviousViewID(),-1),this.play())},this)),this.settings.hideNavigationButtons?(this.$container.mouseenter(t.proxy(function(){this.$nextButton.stop(!0,!0).fadeIn(100)},this)),this.$container.mouseleave(t.proxy(function(){this.$nextButton.stop(!0,!0).fadeOut(500)},this)),this.$container.mouseenter(t.proxy(function(){this.$previousButton.stop(!0,!0).fadeIn(100)},this)),this.$container.mouseleave(t.proxy(function(){this.$previousButton.stop(!0,!0).fadeOut(500)},this))):(this.$nextButton.show(),this.$previousButton.show()))},i.Slideshow.prototype.activateControlPanel=function(){this.settings.controlPanel&&(this.$container.bind("slideshowPlayStateChange",t.proxy(function(t,i){i===this.PlayStates.PLAYING?this.$togglePlayButton.attr("class","slideshow_pause"):i===this.PlayStates.PAUSED&&this.$togglePlayButton.attr("class","slideshow_play")},this)),this.$togglePlayButton.click(t.proxy(function(i){this.settings.play?(this.settings.play=!1,t(i.currentTarget).attr("class","slideshow_play"),this.pause(this.PlayStates.PAUSED)):(this.settings.play=!0,t(i.currentTarget).attr("class","slideshow_pause"),this.play())},this)),this.settings.hideControlPanel?(this.$container.mouseenter(t.proxy(function(){this.$controlPanel.stop(!0,!0).fadeIn(100)},this)),this.$container.mouseleave(t.proxy(function(){this.$controlPanel.stop(!0,!0).fadeOut(500)},this))):this.$controlPanel.show())},i.Slideshow.prototype.activatePagination=function(){if(this.settings.showPagination){this.$pagination.find(".slideshow_pagination_center").html("<ul></ul>");var i=this.$pagination.find("ul");i.html(""),this.$views.each(t.proxy(function(t){var e="";t==this.currentViewID&&(e="slideshow_currentView"),i.append('<li class="slideshow_transparent '+e+'"><span style="display: none;">'+t+"</span></li>")},this)),this.$pagination.find("li").click(t.proxy(function(i){if(!this.currentlyAnimating){var e=t(i.currentTarget).find("span").text();isNaN(parseInt(e,10))||(this.pauseAllVideos(),this.pause(this.PlayStates.TEMPORARILY_PAUSED),this.animateTo(parseInt(e,10),0),this.play())}},this)),this.$container.bind("slideshowAnimationStart",t.proxy(function(){var i=this.$pagination.find("li");i.each(t.proxy(function(i,e){t(e).removeClass("slideshow_currentView")},this)),t(i[this.currentViewID]).addClass("slideshow_currentView")},this)),this.settings.hidePagination?(this.$container.mouseenter(t.proxy(function(){this.$pagination.stop(!0,!0).fadeIn(100)},this)),this.$container.mouseleave(t.proxy(function(){this.$pagination.stop(!0,!0).fadeOut(500)},this))):this.$pagination.show()}},i.Slideshow.prototype.activatePauseOnHover=function(){this.settings.pauseOnHover&&(this.$container.mouseenter(t.proxy(function(){clearTimeout(this.pauseOnHoverTimer),this.playState!==this.PlayStates.PAUSED&&(this.pauseOnHoverTimer=setTimeout(t.proxy(function(){this.pause(this.PlayStates.TEMPORARILY_PAUSED)},this),500))},this)),this.$container.mouseleave(t.proxy(function(){clearTimeout(this.pauseOnHoverTimer),this.playState!==this.PlayStates.PAUSED&&this.interval===!1&&this.play()},this)))}}();
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Donate link: http://stefanboonstra.com/donate-to-slideshow/
|
|
5 |
Tags: responsive, slideshow, slider, slide show, images, image, photo, video, text, gallery, galleries, jquery, javascript
|
6 |
Requires at least: 3.5
|
7 |
Tested up to: 3.6
|
8 |
-
Stable tag: 2.2.
|
9 |
License: GPLv2
|
10 |
|
11 |
Integrate a fancy slideshow in just five steps. - Rainbows. Rainbows everywhere.
|
@@ -177,6 +177,11 @@ personal taste.
|
|
177 |
|
178 |
== Changelog ==
|
179 |
|
|
|
|
|
|
|
|
|
|
|
180 |
= 2.2.14 =
|
181 |
* Fixed: Slideshow didn't show because of a JavaScript error when calculating an unstretched image's dimension.
|
182 |
|
5 |
Tags: responsive, slideshow, slider, slide show, images, image, photo, video, text, gallery, galleries, jquery, javascript
|
6 |
Requires at least: 3.5
|
7 |
Tested up to: 3.6
|
8 |
+
Stable tag: 2.2.15
|
9 |
License: GPLv2
|
10 |
|
11 |
Integrate a fancy slideshow in just five steps. - Rainbows. Rainbows everywhere.
|
177 |
|
178 |
== Changelog ==
|
179 |
|
180 |
+
= 2.2.15 =
|
181 |
+
* The image dimension calculation algorithm now uses a more stable and more efficient way to determine the size of images.
|
182 |
+
* Added slideshow API.
|
183 |
+
* Fixed: WP Color Picker (Iris) adds a hashtag to color codes. As slideshow does this as well, text slides didn't display color properly.
|
184 |
+
|
185 |
= 2.2.14 =
|
186 |
* Fixed: Slideshow didn't show because of a JavaScript error when calculating an unstretched image's dimension.
|
187 |
|
slideshow.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Slideshow
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/slideshow-jquery-image-gallery/
|
5 |
Description: The slideshow plugin is easily deployable on your website. Add any image that has already been uploaded to add to your slideshow, add text slides, or even add a video. Options and styles are customizable for every single slideshow on your website.
|
6 |
-
Version: 2.2.
|
7 |
Requires at least: 3.3
|
8 |
Author: StefanBoonstra
|
9 |
Author URI: http://stefanboonstra.com/
|
@@ -21,7 +21,7 @@
|
|
21 |
class SlideshowPluginMain
|
22 |
{
|
23 |
/** @var string $version */
|
24 |
-
static $version = '2.2.
|
25 |
|
26 |
/**
|
27 |
* Bootstraps the application by assigning the right functions to
|
3 |
Plugin Name: Slideshow
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/slideshow-jquery-image-gallery/
|
5 |
Description: The slideshow plugin is easily deployable on your website. Add any image that has already been uploaded to add to your slideshow, add text slides, or even add a video. Options and styles are customizable for every single slideshow on your website.
|
6 |
+
Version: 2.2.15
|
7 |
Requires at least: 3.3
|
8 |
Author: StefanBoonstra
|
9 |
Author URI: http://stefanboonstra.com/
|
21 |
class SlideshowPluginMain
|
22 |
{
|
23 |
/** @var string $version */
|
24 |
+
static $version = '2.2.15';
|
25 |
|
26 |
/**
|
27 |
* Bootstraps the application by assigning the right functions to
|
style/SlideshowPlugin/functional.css
CHANGED
@@ -1,132 +1,132 @@
|
|
1 |
-
.slideshow_container {
|
2 |
-
margin: 0;
|
3 |
-
position: relative;
|
4 |
-
width: 100%;
|
5 |
-
}
|
6 |
-
.slideshow_container div {
|
7 |
-
clear: none !important;
|
8 |
-
max-width: none;
|
9 |
-
padding: 0;
|
10 |
-
}
|
11 |
-
.slideshow_container img {
|
12 |
-
border: none;
|
13 |
-
margin: 0;
|
14 |
-
padding: 0;
|
15 |
-
max-width: none;
|
16 |
-
}
|
17 |
-
.slideshow_container p {
|
18 |
-
margin: 0;
|
19 |
-
padding: 10px;
|
20 |
-
}
|
21 |
-
.slideshow_container a {
|
22 |
-
margin: 0;
|
23 |
-
display: block !important;
|
24 |
-
}
|
25 |
-
.slideshow_container ul {
|
26 |
-
margin: 0;
|
27 |
-
padding: 0;
|
28 |
-
}
|
29 |
-
.slideshow_container ul li {
|
30 |
-
margin: 0;
|
31 |
-
padding: 0;
|
32 |
-
}
|
33 |
-
.slideshow_container h1,
|
34 |
-
.slideshow_container h2,
|
35 |
-
.slideshow_container h3,
|
36 |
-
.slideshow_container h4,
|
37 |
-
.slideshow_container h5,
|
38 |
-
.slideshow_container h6 {
|
39 |
-
margin: 0;
|
40 |
-
padding: 10px;
|
41 |
-
}
|
42 |
-
.slideshow_container .slideshow_transparent,
|
43 |
-
.slideshow_container .slideshow_transparent:hover {
|
44 |
-
zoom: 1;
|
45 |
-
}
|
46 |
-
.slideshow_container .slideshow_content {
|
47 |
-
position: relative;
|
48 |
-
overflow: hidden;
|
49 |
-
}
|
50 |
-
.slideshow_container .slideshow_view {
|
51 |
-
position: absolute;
|
52 |
-
width: 0;
|
53 |
-
height: 0;
|
54 |
-
overflow: hidden;
|
55 |
-
}
|
56 |
-
.slideshow_container .slideshow_view .slideshow_slide {
|
57 |
-
position: relative;
|
58 |
-
float: left !important;
|
59 |
-
overflow: hidden;
|
60 |
-
}
|
61 |
-
.slideshow_container .slideshow_view .slideshow_slide.slideshow_slide_text .slideshow_background_anchor {
|
62 |
-
position: absolute;
|
63 |
-
top: 0;
|
64 |
-
}
|
65 |
-
.slideshow_container .slideshow_view .slideshow_slide.slideshow_slide_image .slideshow_description {
|
66 |
-
display: none;
|
67 |
-
position: absolute;
|
68 |
-
width: 100%;
|
69 |
-
}
|
70 |
-
.slideshow_container .slideshow_controlPanel {
|
71 |
-
position: absolute;
|
72 |
-
top: 5px;
|
73 |
-
left: 50%;
|
74 |
-
display: none;
|
75 |
-
z-index: 2;
|
76 |
-
}
|
77 |
-
.slideshow_container .slideshow_controlPanel ul {
|
78 |
-
list-style: none;
|
79 |
-
margin: 0;
|
80 |
-
padding: 0;
|
81 |
-
}
|
82 |
-
.slideshow_container .slideshow_controlPanel ul li {
|
83 |
-
float: left;
|
84 |
-
}
|
85 |
-
.slideshow_container .slideshow_controlPanel ul li:hover {
|
86 |
-
cursor: pointer;
|
87 |
-
}
|
88 |
-
.slideshow_container .slideshow_button {
|
89 |
-
padding: 0;
|
90 |
-
position: absolute;
|
91 |
-
top: 50%;
|
92 |
-
cursor: pointer;
|
93 |
-
display: none;
|
94 |
-
z-index: 2;
|
95 |
-
}
|
96 |
-
.slideshow_container .slideshow_button.slideshow_previous {
|
97 |
-
left: 5px;
|
98 |
-
}
|
99 |
-
.slideshow_container .slideshow_button.slideshow_next {
|
100 |
-
right: 5px;
|
101 |
-
}
|
102 |
-
.slideshow_container .slideshow_pagination {
|
103 |
-
height: 0;
|
104 |
-
position: absolute;
|
105 |
-
width: 100%;
|
106 |
-
display: none;
|
107 |
-
z-index: 2;
|
108 |
-
}
|
109 |
-
.slideshow_container .slideshow_pagination .slideshow_pagination_center {
|
110 |
-
display: table;
|
111 |
-
margin: 0 auto;
|
112 |
-
}
|
113 |
-
.slideshow_container .slideshow_pagination .slideshow_pagination_center ul {
|
114 |
-
list-style: none;
|
115 |
-
margin: 0;
|
116 |
-
padding: 0;
|
117 |
-
}
|
118 |
-
.slideshow_container .slideshow_pagination .slideshow_pagination_center ul li {
|
119 |
-
display: inline;
|
120 |
-
float: left;
|
121 |
-
}
|
122 |
-
.slideshow_container .slideshow_pagination .slideshow_pagination_center ul li:hover {
|
123 |
-
cursor: pointer;
|
124 |
-
}
|
125 |
-
.slideshow_container .slideshow_manufacturer {
|
126 |
-
position: absolute !important;
|
127 |
-
height: 1px;
|
128 |
-
width: 1px;
|
129 |
-
overflow: hidden;
|
130 |
-
clip: rect(1px 1px 1px 1px);
|
131 |
-
clip: rect(1px, 1px, 1px, 1px);
|
132 |
-
}
|
1 |
+
.slideshow_container {
|
2 |
+
margin: 0;
|
3 |
+
position: relative;
|
4 |
+
width: 100%;
|
5 |
+
}
|
6 |
+
.slideshow_container div {
|
7 |
+
clear: none !important;
|
8 |
+
max-width: none;
|
9 |
+
padding: 0;
|
10 |
+
}
|
11 |
+
.slideshow_container img {
|
12 |
+
border: none;
|
13 |
+
margin: 0;
|
14 |
+
padding: 0;
|
15 |
+
max-width: none;
|
16 |
+
}
|
17 |
+
.slideshow_container p {
|
18 |
+
margin: 0;
|
19 |
+
padding: 10px;
|
20 |
+
}
|
21 |
+
.slideshow_container a {
|
22 |
+
margin: 0;
|
23 |
+
display: block !important;
|
24 |
+
}
|
25 |
+
.slideshow_container ul {
|
26 |
+
margin: 0;
|
27 |
+
padding: 0;
|
28 |
+
}
|
29 |
+
.slideshow_container ul li {
|
30 |
+
margin: 0;
|
31 |
+
padding: 0;
|
32 |
+
}
|
33 |
+
.slideshow_container h1,
|
34 |
+
.slideshow_container h2,
|
35 |
+
.slideshow_container h3,
|
36 |
+
.slideshow_container h4,
|
37 |
+
.slideshow_container h5,
|
38 |
+
.slideshow_container h6 {
|
39 |
+
margin: 0;
|
40 |
+
padding: 10px;
|
41 |
+
}
|
42 |
+
.slideshow_container .slideshow_transparent,
|
43 |
+
.slideshow_container .slideshow_transparent:hover {
|
44 |
+
zoom: 1;
|
45 |
+
}
|
46 |
+
.slideshow_container .slideshow_content {
|
47 |
+
position: relative;
|
48 |
+
overflow: hidden;
|
49 |
+
}
|
50 |
+
.slideshow_container .slideshow_view {
|
51 |
+
position: absolute;
|
52 |
+
width: 0;
|
53 |
+
height: 0;
|
54 |
+
overflow: hidden;
|
55 |
+
}
|
56 |
+
.slideshow_container .slideshow_view .slideshow_slide {
|
57 |
+
position: relative;
|
58 |
+
float: left !important;
|
59 |
+
overflow: hidden;
|
60 |
+
}
|
61 |
+
.slideshow_container .slideshow_view .slideshow_slide.slideshow_slide_text .slideshow_background_anchor {
|
62 |
+
position: absolute;
|
63 |
+
top: 0;
|
64 |
+
}
|
65 |
+
.slideshow_container .slideshow_view .slideshow_slide.slideshow_slide_image .slideshow_description {
|
66 |
+
display: none;
|
67 |
+
position: absolute;
|
68 |
+
width: 100%;
|
69 |
+
}
|
70 |
+
.slideshow_container .slideshow_controlPanel {
|
71 |
+
position: absolute;
|
72 |
+
top: 5px;
|
73 |
+
left: 50%;
|
74 |
+
display: none;
|
75 |
+
z-index: 2;
|
76 |
+
}
|
77 |
+
.slideshow_container .slideshow_controlPanel ul {
|
78 |
+
list-style: none;
|
79 |
+
margin: 0;
|
80 |
+
padding: 0;
|
81 |
+
}
|
82 |
+
.slideshow_container .slideshow_controlPanel ul li {
|
83 |
+
float: left;
|
84 |
+
}
|
85 |
+
.slideshow_container .slideshow_controlPanel ul li:hover {
|
86 |
+
cursor: pointer;
|
87 |
+
}
|
88 |
+
.slideshow_container .slideshow_button {
|
89 |
+
padding: 0;
|
90 |
+
position: absolute;
|
91 |
+
top: 50%;
|
92 |
+
cursor: pointer;
|
93 |
+
display: none;
|
94 |
+
z-index: 2;
|
95 |
+
}
|
96 |
+
.slideshow_container .slideshow_button.slideshow_previous {
|
97 |
+
left: 5px;
|
98 |
+
}
|
99 |
+
.slideshow_container .slideshow_button.slideshow_next {
|
100 |
+
right: 5px;
|
101 |
+
}
|
102 |
+
.slideshow_container .slideshow_pagination {
|
103 |
+
height: 0;
|
104 |
+
position: absolute;
|
105 |
+
width: 100%;
|
106 |
+
display: none;
|
107 |
+
z-index: 2;
|
108 |
+
}
|
109 |
+
.slideshow_container .slideshow_pagination .slideshow_pagination_center {
|
110 |
+
display: table;
|
111 |
+
margin: 0 auto;
|
112 |
+
}
|
113 |
+
.slideshow_container .slideshow_pagination .slideshow_pagination_center ul {
|
114 |
+
list-style: none;
|
115 |
+
margin: 0;
|
116 |
+
padding: 0;
|
117 |
+
}
|
118 |
+
.slideshow_container .slideshow_pagination .slideshow_pagination_center ul li {
|
119 |
+
display: inline;
|
120 |
+
float: left;
|
121 |
+
}
|
122 |
+
.slideshow_container .slideshow_pagination .slideshow_pagination_center ul li:hover {
|
123 |
+
cursor: pointer;
|
124 |
+
}
|
125 |
+
.slideshow_container .slideshow_manufacturer {
|
126 |
+
position: absolute !important;
|
127 |
+
height: 1px;
|
128 |
+
width: 1px;
|
129 |
+
overflow: hidden;
|
130 |
+
clip: rect(1px 1px 1px 1px);
|
131 |
+
clip: rect(1px, 1px, 1px, 1px);
|
132 |
+
}
|
views/SlideshowPluginSlideshowSlide/frontend_text.php
CHANGED
@@ -14,12 +14,26 @@ if (isset($properties['description']))
|
|
14 |
|
15 |
if (isset($properties['textColor']))
|
16 |
{
|
17 |
-
$textColor =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
}
|
19 |
|
20 |
if (isset($properties['color']))
|
21 |
{
|
22 |
-
$color =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
}
|
24 |
|
25 |
if (isset($properties['url']))
|
@@ -36,10 +50,10 @@ $anchorTagAttributes = (!empty($url) ? 'href="' . $url . '"' : '') . ' ' . (!emp
|
|
36 |
|
37 |
?>
|
38 |
|
39 |
-
<div class="slideshow_slide slideshow_slide_text" style="<?php echo !empty($color) ? 'background-color:
|
40 |
<?php if(!empty($title)): ?>
|
41 |
<h2>
|
42 |
-
<a <?php echo $anchorTagAttributes; ?> style="<?php echo !empty($textColor) ? 'color:
|
43 |
<?php echo $title; ?>
|
44 |
</a>
|
45 |
</h2>
|
@@ -47,7 +61,7 @@ $anchorTagAttributes = (!empty($url) ? 'href="' . $url . '"' : '') . ' ' . (!emp
|
|
47 |
|
48 |
<?php if(!empty($description)): ?>
|
49 |
<p>
|
50 |
-
<a <?php echo $anchorTagAttributes; ?> style="<?php echo !empty($textColor) ? 'color:
|
51 |
<?php echo $description; ?>
|
52 |
</a>
|
53 |
</p>
|
14 |
|
15 |
if (isset($properties['textColor']))
|
16 |
{
|
17 |
+
$textColor = $properties['textColor'];
|
18 |
+
|
19 |
+
if (substr($textColor, 0, 1) != '#')
|
20 |
+
{
|
21 |
+
$textColor = '#' . $textColor;
|
22 |
+
}
|
23 |
+
|
24 |
+
$textColor = htmlspecialchars($textColor);
|
25 |
}
|
26 |
|
27 |
if (isset($properties['color']))
|
28 |
{
|
29 |
+
$color = $properties['color'];
|
30 |
+
|
31 |
+
if (substr($color, 0, 1) != '#')
|
32 |
+
{
|
33 |
+
$color = '#' . $color;
|
34 |
+
}
|
35 |
+
|
36 |
+
$color = htmlspecialchars($color);
|
37 |
}
|
38 |
|
39 |
if (isset($properties['url']))
|
50 |
|
51 |
?>
|
52 |
|
53 |
+
<div class="slideshow_slide slideshow_slide_text" style="<?php echo !empty($color) ? 'background-color: ' . $color . ';' : '' ?>">
|
54 |
<?php if(!empty($title)): ?>
|
55 |
<h2>
|
56 |
+
<a <?php echo $anchorTagAttributes; ?> style="<?php echo !empty($textColor) ? 'color: ' . $textColor . ';' : ''; ?>">
|
57 |
<?php echo $title; ?>
|
58 |
</a>
|
59 |
</h2>
|
61 |
|
62 |
<?php if(!empty($description)): ?>
|
63 |
<p>
|
64 |
+
<a <?php echo $anchorTagAttributes; ?> style="<?php echo !empty($textColor) ? 'color: ' . $textColor . ';' : ''; ?>">
|
65 |
<?php echo $description; ?>
|
66 |
</a>
|
67 |
</p>
|