Version Description
= 7.4.02 =
- This version addresses various bug fixes and feature requests.
Download this release
Release Info
Developer | opajaap |
Plugin | WP Photo Album Plus |
Version | 7.4.02.003 |
Comparing to | |
See all releases |
Code changes from version 7.4.02.002 to 7.4.02.003
- changelog.txt +3 -0
- js/wppa-lightbox.js +86 -97
- js/wppa-lightbox.min.js +1 -1
- js/wppa-utils.js +5 -5
- js/wppa-utils.min.js +1 -1
- js/wppa-zoom.js +501 -0
- js/wppa-zoom.min.js +1 -0
- js/wppa.js +14 -13
- js/wppa.min.js +1 -1
- readme.txt +1 -1
- wppa-ajax.php +1 -1
- wppa-boxes-html.php +4 -3
- wppa-defaults.php +3 -1
- wppa-gutenberg-wppa.php +4 -3
- wppa-mailing.php +104 -5
- wppa-non-admin.php +192 -182
- wppa-picture.php +772 -581
- wppa-settings-autosave.php +19 -0
- wppa-statistics.php +4 -4
- wppa-tinymce-common.php +7 -8
- wppa-tinymce-shortcodes.php +6 -6
- wppa-utils.php +22 -48
- wppa.php +2 -2
changelog.txt
CHANGED
@@ -5,6 +5,9 @@ WP Photo Album Plus Changelog
|
|
5 |
* Missing IPTC or EXIF data will no longer be displayed as N.a., but will show empty.
|
6 |
* The parent shortcode attribute will now also work for virtual albums. E.g. [wppa type="content" parent="#featen,1,5"].
|
7 |
* Shortcode type="url" did no longer work due to concatenated html comment. Fixed.
|
|
|
|
|
|
|
8 |
|
9 |
= 7.4.01 =
|
10 |
|
5 |
* Missing IPTC or EXIF data will no longer be displayed as N.a., but will show empty.
|
6 |
* The parent shortcode attribute will now also work for virtual albums. E.g. [wppa type="content" parent="#featen,1,5"].
|
7 |
* Shortcode type="url" did no longer work due to concatenated html comment. Fixed.
|
8 |
+
* New setting: Table IV-A37: Enable zooming.
|
9 |
+
* New setting: Table IX-B21: The max number of photos in the selectionbox in the shortcode generators is now selectable.
|
10 |
+
* You should no longer receive duplicate emails.
|
11 |
|
12 |
= 7.4.01 =
|
13 |
|
js/wppa-lightbox.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
// Conatins lightbox modules
|
4 |
// Dependancies: wppa.js and default wp jQuery library
|
5 |
//
|
6 |
-
var wppaLightboxVersion = '7.
|
7 |
|
8 |
// Global inits
|
9 |
var wppaNormsBtnOpac = 0.75;
|
@@ -332,7 +332,7 @@ wppaConsoleLog( 'wppaOvlShow arg=' + arg );
|
|
332 |
decodeURI( jQuery( anchor ).attr( 'data-audiohtml' ) ) == decodeURI( jQuery( arg ).attr( 'data-audiohtml' ) ) &&
|
333 |
anchor.href == arg.href ) {
|
334 |
wppaOvlIdx = j; // Current index
|
335 |
-
wppaConsoleLog('Found '+j+': '+arg.href);
|
336 |
}
|
337 |
j++;
|
338 |
}
|
@@ -387,7 +387,7 @@ wppaConsoleLog( 'wppaOvlShow arg=' + arg );
|
|
387 |
// Show the lightbox overlay.
|
388 |
// idx is the numeric index to current lightbox set
|
389 |
function _wppaOvlShow( idx ) {
|
390 |
-
wppaConsoleLog( '_wppaOvlShow, idx='+idx );
|
391 |
|
392 |
// Globalize index
|
393 |
wppaOvlCurIdx = idx;
|
@@ -407,9 +407,9 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
|
|
407 |
if ( wppaOvlUrls[idx].length > 0 && ! wppaIsVideo ) {
|
408 |
wppaOvlImgs[idx] = new Image();
|
409 |
wppaOvlImgs[idx].src = wppaOvlUrls[idx]; // Preload
|
410 |
-
wppaConsoleLog( 'Preloading ' + ( idx + 1 ) + '/' + wppaOvlUrls.length + ' (current)' );
|
411 |
if ( ! wppaIsIe && ! wppaOvlImgs[idx].complete && wppaOvlOpen ) {
|
412 |
-
wppaConsoleLog( 'Retrying preload current image' );
|
413 |
setTimeout( '_wppaOvlShow(' + idx + ')', 500 );
|
414 |
return;
|
415 |
}
|
@@ -429,7 +429,7 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
|
|
429 |
if ( wppaOvlVideoHtmls[next] == '' && wppaOvlOpen ) {
|
430 |
wppaOvlImgs[next] = new Image();
|
431 |
wppaOvlImgs[next].src = wppaOvlUrls[next]; // Preload
|
432 |
-
wppaConsoleLog( 'Preloading > ' + ( next + 1 ) );
|
433 |
}
|
434 |
|
435 |
// Preload previous ( for hitting the prev button )
|
@@ -445,7 +445,7 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
|
|
445 |
if ( wppaOvlVideoHtmls[prev] == '' ) {
|
446 |
wppaOvlImgs[prev] = new Image();
|
447 |
wppaOvlImgs[prev].src = wppaOvlUrls[prev]; // Preload
|
448 |
-
wppaConsoleLog( 'Preloading < ' + ( prev + 1 ) );
|
449 |
}
|
450 |
}
|
451 |
|
@@ -762,8 +762,8 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
|
|
762 |
else {
|
763 |
html += '<img' +
|
764 |
' id="wppa-overlay-img"'+
|
765 |
-
' onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);"' +
|
766 |
-
' onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);"' +
|
767 |
' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );"' +
|
768 |
' ontouchend="wppaTouchEnd( event );"' +
|
769 |
' ontouchmove="wppaTouchMove( event );"' +
|
@@ -843,99 +843,91 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
|
|
843 |
'</div>';
|
844 |
}
|
845 |
|
846 |
-
// Show browse buttons only if we are in a set
|
847 |
-
if ( ! wppaOvlIsSingle ) {
|
848 |
-
|
849 |
-
// The prev button
|
850 |
-
html += '<div' +
|
851 |
-
' id="wppa-ovl-prev-btn"' +
|
852 |
-
' class="wppa-ovl-nav-btn"' +
|
853 |
-
' style="' +
|
854 |
-
'position:absolute;' +
|
855 |
-
'z-index:100101;' +
|
856 |
-
'width:48px;' +
|
857 |
-
'top:50%;' +
|
858 |
-
'margin-top:-24px;' +
|
859 |
-
'left:1px;' +
|
860 |
-
'box-shadow:none;' +
|
861 |
-
( wppaOvlFirst ? 'opacity:1;' : 'opacity:0;' ) +
|
862 |
-
'"' +
|
863 |
-
' onclick="wppaOvlShowPrev()"' +
|
864 |
-
' onmouseover="jQuery(this).stop().fadeTo(200,1);"' +
|
865 |
-
' onmouseout="jQuery(this).stop().fadeTo(200,0);"' +
|
866 |
-
' ontouchstart="jQuery(this).stop().fadeTo(200,1);"' +
|
867 |
-
' onload="jQuery(this).stop().fadeTo(5000,0);"' +
|
868 |
-
' >' +
|
869 |
-
wppaSvgHtml( 'Prev-Button', wppaOvlIconSize, true, true ) +
|
870 |
-
'</div>';
|
871 |
-
|
872 |
-
// The next button
|
873 |
-
html += '<div' +
|
874 |
-
' id="wppa-ovl-next-btn"' +
|
875 |
-
' class="wppa-ovl-nav-btn"' +
|
876 |
-
' style="' +
|
877 |
-
'position:absolute;' +
|
878 |
-
'z-index:100101;' +
|
879 |
-
'width:48px;' +
|
880 |
-
'top:50%;' +
|
881 |
-
'margin-top:-24px;' +
|
882 |
-
'right:1px;' +
|
883 |
-
'box-shadow:none;' +
|
884 |
-
( wppaOvlFirst ? 'opacity:1;' : 'opacity:0;' ) +
|
885 |
-
'"' +
|
886 |
-
' onclick="wppaOvlShowNext()"' +
|
887 |
-
' onmouseover="jQuery(this).stop().fadeTo(200,1);"' +
|
888 |
-
' onmouseout="jQuery(this).stop().fadeTo(200,0);"' +
|
889 |
-
' ontouchstart="jQuery(this).stop().fadeTo(200,1);"' +
|
890 |
-
' onload="jQuery(this).stop().fadeTo(5000,0);"' +
|
891 |
-
' >' +
|
892 |
-
wppaSvgHtml( 'Next-Button', wppaOvlIconSize, true, true ) +
|
893 |
-
'</div>';
|
894 |
-
}
|
895 |
-
|
896 |
// Close the #img-sb-img-cont
|
897 |
html += '</div>';
|
898 |
|
899 |
// The subtext container
|
900 |
var showCounter = ! wppaOvlIsSingle && wppaOvlShowCounter;
|
901 |
-
html +=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
902 |
' style="' +
|
903 |
-
'
|
904 |
-
'
|
905 |
-
'
|
906 |
-
'color:' + txtcol + ';' +
|
907 |
-
'text-align:center;' +
|
908 |
-
'font-family:' + wppaOvlFontFamily + ';' +
|
909 |
-
'font-size:' + wppaOvlFontSize + 'px;' +
|
910 |
-
'font-weight:' + wppaOvlFontWeight + ';' +
|
911 |
-
'line-height:' + wppaOvlLineHeight + 'px;' +
|
912 |
'box-shadow:none;' +
|
913 |
-
'border-bottom-left-radius:'+wppaOvlRadius+'px;' +
|
914 |
-
'border-bottom-right-radius:'+wppaOvlRadius+'px;' +
|
915 |
'"' +
|
|
|
916 |
' >' +
|
917 |
-
|
918 |
-
' id="wppa-overlay-txt"' +
|
919 |
-
' style="' +
|
920 |
-
'text-align:center;' +
|
921 |
-
'min-height:36px;' +
|
922 |
-
'width:100%;' +
|
923 |
-
( wppaOvlTxtHeight == 'auto' ? 'max-height:200px;' : 'max-height:' + wppaOvlTxtHeight + 'px;' ) +
|
924 |
-
'overflow:auto;' +
|
925 |
-
'box-shadow:none;' +
|
926 |
-
'"' +
|
927 |
-
' >' +
|
928 |
-
( showCounter ? ( wppaOvlIdx + 1 ) + '/' + wppaOvlUrls.length + '<br />' : '' ) +
|
929 |
-
wppaOvlTitles[idx] +
|
930 |
-
'</div>';
|
931 |
'</div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
932 |
|
933 |
// Insert the html
|
934 |
jQuery( '#wppa-overlay-ic' ).html( html );
|
935 |
|
936 |
-
// Replace svg img src to html
|
937 |
-
// wppaReplaceSvg();
|
938 |
-
|
939 |
// Restore opacity of fs and exit buttons
|
940 |
wppaShowFsButtons();
|
941 |
|
@@ -1025,13 +1017,14 @@ wppaConsoleLog( 'wppaOvlSize' );
|
|
1025 |
|
1026 |
var mh; // max image height
|
1027 |
var tch = jQuery( '#wppa-overlay-txt' ).height();
|
|
|
1028 |
|
1029 |
if ( wppaOvlTxtHeight == 'auto' ) {
|
1030 |
if ( tch == 0 ) tch = 20 + 2 * wppaOvlBorderWidth;
|
1031 |
-
mh = ih - tch -
|
1032 |
}
|
1033 |
else {
|
1034 |
-
mh = ih - wppaOvlTxtHeight -
|
1035 |
}
|
1036 |
|
1037 |
var mw = parseInt( mh * nw / nh );
|
@@ -1085,8 +1078,8 @@ wppaConsoleLog( 'wppaOvlSize' );
|
|
1085 |
// Done?
|
1086 |
if ( ! done ) {
|
1087 |
setTimeout( function(){ wppaOvlSize(wppaOvlAnimSpeed) }, speed + 10 );
|
1088 |
-
wppaConsoleLog( 'Not done '+wppaOvlIdx+' saved='+wppaSavedImageWidth+', wid='+wid+', cw='+cw+', nw='+nw+
|
1089 |
-
', img complete='+document.getElementById( 'wppa-overlay-img' ).complete );
|
1090 |
}
|
1091 |
else {
|
1092 |
|
@@ -1100,7 +1093,7 @@ wppaConsoleLog( 'wppaOvlSize' );
|
|
1100 |
|
1101 |
// Show fullscreen lightbox image
|
1102 |
function wppaOvlFormatFull() {
|
1103 |
-
wppaConsoleLog( 'wppaOvlFormatFull '+wppaOvlMode );
|
1104 |
|
1105 |
// Are we still in?
|
1106 |
if ( ! wppaOvlOpen ) {
|
@@ -1552,10 +1545,6 @@ wppaConsoleLog( 'wppaOvlResize' );
|
|
1552 |
|
1553 |
// Panoramas do their own resize
|
1554 |
if ( wppaOvlActivePanorama > 0 ) {
|
1555 |
-
// setTimeout(function(){
|
1556 |
-
// wppaConsoleLog('kicking panorama from wppaOvlResize');
|
1557 |
-
// jQuery(window).trigger("kickpanorama");
|
1558 |
-
// },125);
|
1559 |
return;
|
1560 |
}
|
1561 |
|
3 |
// Conatins lightbox modules
|
4 |
// Dependancies: wppa.js and default wp jQuery library
|
5 |
//
|
6 |
+
var wppaLightboxVersion = '7.4.02';
|
7 |
|
8 |
// Global inits
|
9 |
var wppaNormsBtnOpac = 0.75;
|
332 |
decodeURI( jQuery( anchor ).attr( 'data-audiohtml' ) ) == decodeURI( jQuery( arg ).attr( 'data-audiohtml' ) ) &&
|
333 |
anchor.href == arg.href ) {
|
334 |
wppaOvlIdx = j; // Current index
|
335 |
+
// wppaConsoleLog('Found '+j+': '+arg.href);
|
336 |
}
|
337 |
j++;
|
338 |
}
|
387 |
// Show the lightbox overlay.
|
388 |
// idx is the numeric index to current lightbox set
|
389 |
function _wppaOvlShow( idx ) {
|
390 |
+
//wppaConsoleLog( '_wppaOvlShow, idx='+idx );
|
391 |
|
392 |
// Globalize index
|
393 |
wppaOvlCurIdx = idx;
|
407 |
if ( wppaOvlUrls[idx].length > 0 && ! wppaIsVideo ) {
|
408 |
wppaOvlImgs[idx] = new Image();
|
409 |
wppaOvlImgs[idx].src = wppaOvlUrls[idx]; // Preload
|
410 |
+
// wppaConsoleLog( 'Preloading ' + ( idx + 1 ) + '/' + wppaOvlUrls.length + ' (current)' );
|
411 |
if ( ! wppaIsIe && ! wppaOvlImgs[idx].complete && wppaOvlOpen ) {
|
412 |
+
// wppaConsoleLog( 'Retrying preload current image' );
|
413 |
setTimeout( '_wppaOvlShow(' + idx + ')', 500 );
|
414 |
return;
|
415 |
}
|
429 |
if ( wppaOvlVideoHtmls[next] == '' && wppaOvlOpen ) {
|
430 |
wppaOvlImgs[next] = new Image();
|
431 |
wppaOvlImgs[next].src = wppaOvlUrls[next]; // Preload
|
432 |
+
// wppaConsoleLog( 'Preloading > ' + ( next + 1 ) );
|
433 |
}
|
434 |
|
435 |
// Preload previous ( for hitting the prev button )
|
445 |
if ( wppaOvlVideoHtmls[prev] == '' ) {
|
446 |
wppaOvlImgs[prev] = new Image();
|
447 |
wppaOvlImgs[prev].src = wppaOvlUrls[prev]; // Preload
|
448 |
+
// wppaConsoleLog( 'Preloading < ' + ( prev + 1 ) );
|
449 |
}
|
450 |
}
|
451 |
|
762 |
else {
|
763 |
html += '<img' +
|
764 |
' id="wppa-overlay-img"'+
|
765 |
+
// ' onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);"' +
|
766 |
+
// ' onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);"' +
|
767 |
' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );"' +
|
768 |
' ontouchend="wppaTouchEnd( event );"' +
|
769 |
' ontouchmove="wppaTouchMove( event );"' +
|
843 |
'</div>';
|
844 |
}
|
845 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
846 |
// Close the #img-sb-img-cont
|
847 |
html += '</div>';
|
848 |
|
849 |
// The subtext container
|
850 |
var showCounter = ! wppaOvlIsSingle && wppaOvlShowCounter;
|
851 |
+
html +=
|
852 |
+
'<div id="wppa-overlay-txt-container"' +
|
853 |
+
' style="' +
|
854 |
+
'position:relative;' +
|
855 |
+
'padding:10px;' +
|
856 |
+
'background-color:' + wppaOvlTheme + ';' +
|
857 |
+
'color:' + txtcol + ';' +
|
858 |
+
'text-align:center;' +
|
859 |
+
'font-family:' + wppaOvlFontFamily + ';' +
|
860 |
+
'font-size:' + wppaOvlFontSize + 'px;' +
|
861 |
+
'font-weight:' + wppaOvlFontWeight + ';' +
|
862 |
+
'line-height:' + wppaOvlLineHeight + 'px;' +
|
863 |
+
'box-shadow:none;' +
|
864 |
+
'border-bottom-left-radius:'+wppaOvlRadius+'px;' +
|
865 |
+
'border-bottom-right-radius:'+wppaOvlRadius+'px;' +
|
866 |
+
'"' +
|
867 |
+
' >';
|
868 |
+
|
869 |
+
// The prev button
|
870 |
+
if ( ! wppaOvlIsSingle ) {
|
871 |
+
|
872 |
+
html +=
|
873 |
+
'<div' +
|
874 |
+
' id="wppa-ovl-prev-btn"' +
|
875 |
+
' class="wppa-ovl-nav-btn"' +
|
876 |
' style="' +
|
877 |
+
'float:left;' +
|
878 |
+
'z-index:100101;' +
|
879 |
+
'width:' + wppaOvlIconSize + ';' +
|
|
|
|
|
|
|
|
|
|
|
|
|
880 |
'box-shadow:none;' +
|
|
|
|
|
881 |
'"' +
|
882 |
+
' onclick="wppaOvlShowPrev()"' +
|
883 |
' >' +
|
884 |
+
wppaSvgHtml( 'Prev-Button', wppaOvlIconSize, true, true ) +
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
885 |
'</div>';
|
886 |
+
}
|
887 |
+
|
888 |
+
// The next button
|
889 |
+
if ( ! wppaOvlIsSingle ) {
|
890 |
+
|
891 |
+
html +=
|
892 |
+
'<div' +
|
893 |
+
' id="wppa-ovl-next-btn"' +
|
894 |
+
' class="wppa-ovl-nav-btn"' +
|
895 |
+
' style="' +
|
896 |
+
'float:right;' +
|
897 |
+
'z-index:100101;' +
|
898 |
+
'width:' + wppaOvlIconSize + ';' +
|
899 |
+
'box-shadow:none;' +
|
900 |
+
'"' +
|
901 |
+
' onclick="wppaOvlShowNext()"' +
|
902 |
+
' >' +
|
903 |
+
wppaSvgHtml( 'Next-Button', wppaOvlIconSize, true, true ) +
|
904 |
+
'</div>';
|
905 |
+
}
|
906 |
+
|
907 |
+
// The actual text
|
908 |
+
html +=
|
909 |
+
'<div' +
|
910 |
+
' id="wppa-overlay-txt"' +
|
911 |
+
' style="' +
|
912 |
+
'text-align:center;' +
|
913 |
+
'min-height:36px;' +
|
914 |
+
( wppaOvlTxtHeight == 'auto' ? 'max-height:200px;' : 'max-height:' + wppaOvlTxtHeight + 'px;' ) +
|
915 |
+
'overflow:auto;' +
|
916 |
+
'box-shadow:none;' +
|
917 |
+
'"' +
|
918 |
+
' >' +
|
919 |
+
( showCounter ? ( wppaOvlIdx + 1 ) + '/' + wppaOvlUrls.length + '<br />' : '' ) +
|
920 |
+
wppaOvlTitles[idx] +
|
921 |
+
'</div>';
|
922 |
+
|
923 |
+
// Close the subtext
|
924 |
+
html +=
|
925 |
+
'<div style="clear:both;" ></div>' +
|
926 |
+
'</div>';
|
927 |
|
928 |
// Insert the html
|
929 |
jQuery( '#wppa-overlay-ic' ).html( html );
|
930 |
|
|
|
|
|
|
|
931 |
// Restore opacity of fs and exit buttons
|
932 |
wppaShowFsButtons();
|
933 |
|
1017 |
|
1018 |
var mh; // max image height
|
1019 |
var tch = jQuery( '#wppa-overlay-txt' ).height();
|
1020 |
+
tch = Math.max( tch, wppaOvlIconSize );
|
1021 |
|
1022 |
if ( wppaOvlTxtHeight == 'auto' ) {
|
1023 |
if ( tch == 0 ) tch = 20 + 2 * wppaOvlBorderWidth;
|
1024 |
+
mh = ih - tch - 40 - 2 * wppaOvlBorderWidth;
|
1025 |
}
|
1026 |
else {
|
1027 |
+
mh = ih - wppaOvlTxtHeight - 40 - 2 * wppaOvlBorderWidth;
|
1028 |
}
|
1029 |
|
1030 |
var mw = parseInt( mh * nw / nh );
|
1078 |
// Done?
|
1079 |
if ( ! done ) {
|
1080 |
setTimeout( function(){ wppaOvlSize(wppaOvlAnimSpeed) }, speed + 10 );
|
1081 |
+
// wppaConsoleLog( 'Not done '+wppaOvlIdx+' saved='+wppaSavedImageWidth+', wid='+wid+', cw='+cw+', nw='+nw+
|
1082 |
+
// ', img complete='+document.getElementById( 'wppa-overlay-img' ).complete );
|
1083 |
}
|
1084 |
else {
|
1085 |
|
1093 |
|
1094 |
// Show fullscreen lightbox image
|
1095 |
function wppaOvlFormatFull() {
|
1096 |
+
// wppaConsoleLog( 'wppaOvlFormatFull '+wppaOvlMode );
|
1097 |
|
1098 |
// Are we still in?
|
1099 |
if ( ! wppaOvlOpen ) {
|
1545 |
|
1546 |
// Panoramas do their own resize
|
1547 |
if ( wppaOvlActivePanorama > 0 ) {
|
|
|
|
|
|
|
|
|
1548 |
return;
|
1549 |
}
|
1550 |
|
js/wppa-lightbox.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaRenderer,wppaScene,wppaCamera,wppaSphere,wppaSphereMaterial,wppaSphereMesh,wppaLightboxVersion="7.3.01",wppaNormsBtnOpac=.75,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlFsExitBtnSize="48",wppaOvlActivePanorama=0,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaSavedContainerWidth=0;function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",10)}function wppaOvlKeyboardHandler(p){var a,e;e=(a=null==p?event.keyCode:p.keyCode,27);var t=String.fromCharCode(a).toLowerCase();switch(a){case e:wppaStopVideo(0),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(t){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"d":jQuery("#wppa-ovl-legenda-1").css("visibility","hidden"),jQuery("#wppa-ovl-legenda-2").css("visibility","hidden"),wppaShowLegenda="hidden";break;case"f":wppaOvlFull();break;case"l":wppaOvlNorm();break;case"q":case"x":wppaStopVideo(0),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide()}return!1}function wppaOvlFull(p){wppaConsoleLog("wppaOvlFull"),wppaNormsBtnOpac=.75;var a=wppaOvlMode;p||wppaOvlStepMode();var e=document.getElementById("wppa-overlay-ic");e&&(!p&&"normal"!=a||(e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()),"normal"==wppaOvlMode&&(document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()),setTimeout(function(){wppaShowFsButtons(.75)},30),jQuery("#wppa-ovl-legenda-1").html(""))}function wppaOvlNorm(p){wppaConsoleLog("wppaOvlNorm"),wppaOvlMode="normal",wppaNormsBtnOpac=.75,document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen(),p?wppaOvlMode=wppaOvlModeInitial:(setTimeout(function(){wppaShowFsButtons(.75)},30),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50))}function wppaOvlShow(p){var a,e;if(wppaConsoleLog("wppaOvlShow arg="+p),0<wppaOvlActivePanorama?jQuery("#wppa-overlay-ic").css({top:0,left:0}):jQuery("#wppa-overlay-ic").css({top:"50%",left:"50%"}),wppaOvlFirst&&(jQuery("#weaver-final").removeClass("wvr-hide-bang"),jQuery("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaKbHandlerInstalled||(jQuery(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),jQuery("#wppa-overlay-bg").css({width:window.innerWidth,height:window.innerHeight}),"normal"!=wppaOvlModeInitial&&wppaOvlFull(!0),jQuery(window).trigger("wppalightboxstart")),"object"==typeof p){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var t=(p.rel?p.rel:!!jQuery(p).attr("data-rel")&&jQuery(p).attr("data-rel")).split("[");if(t[1]){var o,l,i=t[1],n=jQuery("a"),r=0;for(l=0;l<n.length;l++)o=n[l],1<(t=!!jQuery(o).attr("data-rel")&&jQuery(o).attr("data-rel").split("[")).length&&"wppa"==t[0]&&t[1]==i&&(wppaOvlUrls[r]=o.href,jQuery(o).attr("data-lbtitle")?wppaOvlTitles[r]=wppaRepairScriptTags(jQuery(o).attr("data-lbtitle")):wppaOvlTitles[r]=wppaRepairScriptTags(o.title),wppaOvlIds[r]=jQuery(o).attr("data-id")?jQuery(o).attr("data-id"):"0",wppaOvlAlts[r]=jQuery(o).attr("data-alt")?jQuery(o).attr("data-alt"):"",wppaOvlVideoHtmls[r]=jQuery(o).attr("data-videohtml")?decodeURI(jQuery(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[r]=jQuery(o).attr("data-pdfhtml")?decodeURI(jQuery(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[r]=jQuery(o).attr("data-audiohtml")?decodeURI(jQuery(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[r]=jQuery(o).attr("data-videonatwidth")?jQuery(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[r]=jQuery(o).attr("data-videonatheight")?jQuery(o).attr("data-videonatheight"):"",0<(a=jQuery(o).attr("data-panorama")?jQuery(o).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[r]=a.substr(e+1),wppaOvlPanoramaIds[r]=a.substr(0,e)):(wppaOvlPanoramaHtml[r]="",wppaOvlPanoramaIds[r]=0),decodeURI(jQuery(o).attr("data-pdfhtml"))==decodeURI(jQuery(p).attr("data-pdfhtml"))&&decodeURI(jQuery(o).attr("data-videohtml"))==decodeURI(jQuery(p).attr("data-videohtml"))&&decodeURI(jQuery(o).attr("data-audiohtml"))==decodeURI(jQuery(p).attr("data-audiohtml"))&&o.href==p.href&&(wppaOvlIdx=r,wppaConsoleLog("Found "+r+": "+p.href)),r++)}else wppaOvlUrls[0]=p.href,jQuery(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlIds[0]=jQuery(p).attr("data-id")?jQuery(p).attr("data-id"):"0",wppaOvlAlts[0]=jQuery(p).attr("data-alt")?jQuery(p).attr("data-alt"):"",wppaOvlVideoHtmls[0]=jQuery(p).attr("data-videohtml")?decodeURI(jQuery(p).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=jQuery(p).attr("data-audiohtml")?decodeURI(jQuery(p).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=jQuery(p).attr("data-pdfhtml")?decodeURI(jQuery(p).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=jQuery(p).attr("data-videonatwidth")?jQuery(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=jQuery(p).attr("data-videonatheight")?jQuery(p).attr("data-videonatheight"):"",0<(a=jQuery(p).attr("data-panorama")?jQuery(p).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[0]=a.substr(e+1),wppaOvlPanoramaIds[0]=a.substr(0,e)):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0),wppaOvlIdx=0}else wppaOvlIdx=p;wppaOvlOpen=!0,setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},1)}function _wppaOvlShow(p){if(wppaConsoleLog("_wppaOvlShow, idx="+p),wppaOvlCurIdx=p,wppaOvlFirst&&jQuery("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[p],0<wppaOvlUrls[p].length&&!wppaIsVideo&&(wppaOvlImgs[p]=new Image,wppaOvlImgs[p].src=wppaOvlUrls[p],wppaConsoleLog("Preloading "+(p+1)+"/"+wppaOvlUrls.length+" (current)"),!wppaIsIe&&!wppaOvlImgs[p].complete&&wppaOvlOpen))return wppaConsoleLog("Retrying preload current image"),void setTimeout("_wppaOvlShow("+p+")",500);var a,e;if(a=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,""==wppaOvlVideoHtmls[a]&&wppaOvlOpen&&(wppaOvlImgs[a]=new Image,wppaOvlImgs[a].src=wppaOvlUrls[a],wppaConsoleLog("Preloading > "+(a+1))),!wppaOvlRunning&&wppaOvlOpen&&(e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1,""==wppaOvlVideoHtmls[e]&&(wppaOvlImgs[e]=new Image,wppaOvlImgs[e].src=wppaOvlUrls[e],wppaConsoleLog("Preloading < "+(e+1)))),_bumpViewCount(wppaOvlIds[p]),wppaOvlIsSingle=1==wppaOvlUrls.length,0<wppaOvlPanoramaIds[p]?(wppaOvlActivePanorama=wppaOvlPanoramaIds[p],jQuery("#wppa-overlay-ic").css({top:0,left:0})):(wppaOvlActivePanorama=0,jQuery("#wppa-overlay-ic").css({top:"50%",left:"50%",display:"block"})),"normal"!=wppaOvlMode||wppaOvlActivePanorama){wppaOvlActivePanorama?(l=wppaOvlPanoramaHtml[p]+"<div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >",wppaOvlShowLegenda&&"normal"!=wppaOvlMode&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode=fullscreen. '+(wppaOvlIsSingle?wppaOvlFullLegendaSinglePanorama:wppaOvlFullLegendaPanorama)+"</div>")):(wppaIsVideo?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video><div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >":wppaOvlIsPdf?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[p]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+"\" ></iframe><div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >":(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[p]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),l+="<div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >"),wppaOvlShowLegenda&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode='+wppaOvlMode+". "+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+"</div>")),l+="</div>";var t=(wppaIsMobile,"0.1");return l+='<div id="wppa-exit-btn" style="height:'+wppaOvlFsExitBtnSize+"px;z-index:100098;position:fixed;top:0;right:0;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlHide()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>","normal"!=wppaOvlMode&&(l+='<div id="wppa-norms-btn" style="height:48px;z-index:100098;position:fixed;top:0;right:'+wppaOvlFsExitBtnSize+"px;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlNorm()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit-Full-Screen",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),jQuery("#wppa-overlay-ic").html(l)),0<wppaOvlPanoramaIds[p]&&wppaOvlIsSingle&&jQuery(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout("wppaOvlFormatFull()",10),wppaIsVideo||wppaHasAudio?setTimeout("wppaOvlUpdateFsId()",20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaShowFsButtons(),!1}wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);var o="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(o=wppaOvlFontColor);wppaOvlUrls.length;jQuery("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video>",wppaOvlIsVideo=!0):wppaOvlIsPdf?l+="<iframe "+wppaOvlPdfHtmls[p]+' id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" ></iframe>':(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[p]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),wppaOvlIsVideo=!1),!wppaOvlShowStartStop||wppaOvlIsSingle||wppaIsVideo||wppaOvlIsPdf||(l+='<div id="wppa-ovl-start-stop-btn" class="wppa-ovl-nav-btn" style="z-index:100101;position:absolute;top:50%;margin-top:-24px;left:50%;margin-left:-24px;'+(-1==wppaOvlIdx?"visibility:hidden;":"")+"box-shadow:none;"+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlStartStop()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button",wppaOvlIconSize,!0,!0,"0","20","50","50")+"</div>"),wppaOvlIsSingle||(l+='<div id="wppa-ovl-prev-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;left:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowPrev()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+"</div>",l+='<div id="wppa-ovl-next-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;right:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowNext()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</div>"),l+="</div>";var i=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+o+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >'+(i?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[p]+"</div>",jQuery("#wppa-overlay-ic").html(l),wppaShowFsButtons(),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),0==wppaOvlPanoramaIds[p]&&wppaOvlResize(),wppaOvlFirst&&wppaShowFsButtons(),!1}function wppaOvlSize(p){if(wppaConsoleLog("wppaOvlSize"),!wppaOvlActivePanorama){var a=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(a&&e&&"none"!=jQuery("#wppa-overlay-bg").css("display")){if("normal"==wppaOvlMode){var t,o,l,i,n,r,w,d=wppaWindowWidth(),v=wppaWindowHeight();l=wppaOvlIsVideo?(t=a.clientWidth,o=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(t=.9*wppaWindowWidth(),o=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t=a.clientWidth,o=a.naturalWidth,a.naturalHeight),void 0===o&&(o=a.clientWidth,l=a.clientHeight),(r=(i=(d-3*wppaOvlBorderWidth)/o)<(n=v/l)?i:n)<1&&(o=parseInt(o*r),l=parseInt(l*r));var s=jQuery("#wppa-overlay-txt").height();w="auto"==wppaOvlTxtHeight?(0==s&&(s=20+2*wppaOvlBorderWidth),v-s-20-2*wppaOvlBorderWidth):v-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;var u=parseInt(w*o/l),h=(wppaOvlPadTop,parseInt((d-u)/2),u);l<w&&(wppaOvlPadTop,parseInt((d-o)/2),h=o);var c=wppaSavedImageWidth-h<3&&h-wppaSavedImageWidth<3;return h<=10&&(l=180,c=!(o=h=240)),h=parseInt(h),wppaSavedImageWidth=parseInt(h),wppaSavedImageHeight=parseInt(h*l/o),wppaSavedMarginLeft=-parseInt(h/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(h+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+jQuery("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),jQuery("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},p),jQuery("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p),c?(jQuery("#wppa-ovl-spin").hide(),wppaConsoleLog("Done "+wppaOvlIdx),wppaOvlFirst=!1):(setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+10),wppaConsoleLog("Not done "+wppaOvlIdx+" saved="+wppaSavedImageWidth+", wid="+h+", cw="+t+", nw="+o+", img complete="+document.getElementById("wppa-overlay-img").complete)),!0}wppaOvlFormatFull()}}}function wppaOvlFormatFull(){if(wppaConsoleLog("wppaOvlFormatFull "+wppaOvlMode),wppaOvlOpen&&!(0<wppaOvlActivePanorama)){var p,a,e;if(wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),a=wppaOvlVideoNaturalWidths[wppaOvlIdx],e=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)p=document.getElementById("wppa-overlay-img"),a=screen.width,e=screen.height;else{if(p=document.getElementById("wppa-overlay-img"),!(wppaIsIe||p&&p.complete))return void setTimeout("wppaOvlFormatFull()",10);a=p.naturalWidth,e=p.naturalHeight}var t=screen.width/screen.height,o=a/e,l=0,i=0,n=0,r=0,w=0,d=0,v="hidden";switch(wppaOvlMode){case"padded":r=o<t?(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,screen.height*o):(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,screen.width);break;case"stretched":i=l=0,n=screen.height,r=screen.width;break;case"clipped":r=o<t?(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,screen.width):(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,screen.height*o);break;case"realsize":(l=(screen.width-a)/2)<0&&(d=parseInt(-l),l=0),(i=(screen.height-e)/2)<0&&(w=parseInt(-i),i=0),n=e,r=a,v="auto"}return l=parseInt(l),i=parseInt(i),n=parseInt(n),r=parseInt(r),jQuery(p).css({height:n,width:r,marginLeft:l,marginTop:i,left:0,top:0,maxWidth:1e4}),jQuery(p).css({visibility:"visible"}),jQuery("#wppa-ovl-full-bg").css({overflow:v}),jQuery("#wppa-ovl-full-bg").scrollTop(w),jQuery("#wppa-ovl-full-bg").scrollLeft(d),jQuery("#wppa-ovl-spin").hide(),!0}}function wppaOvlUpdateFsId(){wppaConsoleLog("wppaOvlUpdateFsId"),wppaOvlFsPhotoId=wppaPhotoId}function wppaOvlStartAudio(){wppaConsoleLog("wppaOvlStartAudio");var p=document.getElementById("wppa-overlay-audio");p&&"function"==typeof p.play&&(p.play(),wppaConsoleLog("Audio play wppa-overlay-audio"))}function wppaOvlStepMode(){wppaConsoleLog("wppaOvlStepMode from "+wppaOvlMode);for(var p=new Array("normal","padded","stretched","clipped","realsize","padded"),a=0;a<p.length;){if(wppaOvlMode==p[a])return wppaOvlMode=p[a+1],void wppaOvlShow(wppaOvlIdx);a++}}function wppaOvlStartStop(){wppaConsoleLog("wppaOvlStartStop called. Running="+wppaOvlRunning),wppaOvlRunning?(wppaOvlRunning=!1,jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button",wppaOvlIconSize,!0,!0,"0","20","50","50")),-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&jQuery("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&jQuery("#wppa-ovl-next-btn").css("visibility","visible"))):(jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml((wppaOvlRunning,"Pause-Button"),wppaOvlIconSize,!0,!0,"0","20","50","50")),wppaOvlRunning=!0,wppaOvlRun())}function wppaOvlRun(){if(wppaConsoleLog("wppaOvlRun, running="+wppaOvlRunning),wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout("wppaOvlRun()",50);else{if(!wppaIsVideo){var p=document.getElementById("wppa-overlay-img");if(p&&!wppaIsIe&&!p.complete)return wppaConsoleLog("Wait during run"),void setTimeout("wppaOvlRun()",50)}var a;a=wppaOvlIdx>=wppaOvlUrls.length-1?0:wppaOvlIdx+1,wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlShow(a),setTimeout("wppaOvlRun()",wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){return wppaConsoleLog("wppaOvlShowPrev"),wppaOvlIsSingle||(wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1)),!1}function wppaOvlShowNext(){return wppaConsoleLog("wppaOvlShowNext"),wppaOvlIsSingle||(jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIdx>=wppaOvlUrls.length-1&&(wppaOvlIdx=-1),wppaOvlShow(wppaOvlIdx+1)),!1}function wppaOvlHide(){wppaConsoleLog("wppaOvlHide"),wppaStopAudio(),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),jQuery("#wppa-overlay-ic").html(""),jQuery("#wppa-overlay-bg").fadeOut(300),jQuery(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,wppaOvlMode=wppaOvlModeInitial,wppaNormsBtnOpac=.75,jQuery("#wppa-ovl-spin").hide(),jQuery("#wppa-fulls-btn").stop().fadeOut(300),jQuery("#wppa-exit-btn").stop().fadeOut(300),jQuery("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,wppaOvlOpen=!1,document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null),jQuery(window).trigger("wppalightboxend"),jQuery(window).trigger("resize")}function wppaOvlOnclick(p){switch(wppaConsoleLog("wppaOvlOnClick"),wppaOvlOnclickType){case"none":break;case"close":"normal"==wppaOvlMode&&wppaOvlHide();break;case"browse":var a=p.screenX-window.screenX;48<p.clientY&&(a<screen.width/2?wppaOvlShowPrev():wppaOvlShowNext());break;default:alert("Unimplemented action: "+wppaOvlOnclickType)}return!0}function wppaInitOverlay(){jQuery(".wp-caption").each(function(){var p=jQuery(this),a=p.find("IMG[alt]").attr("alt")||"",e=p.find(".wp-caption-text").html()||"",t=p.find("a"),o=a+"<br>"+e;t.attr("data-lbtitle")||t.attr("data-lbtitle",o)}),""==wppaOvlMode&&(wppaOvlMode=wppaOvlModeInitial);var p,a,e=jQuery("a"),t=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=wppaOvlCurIdx=0)==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),a=0;a<e.length;a++)if(p=e[a],jQuery(p).attr("data-rel")?t=jQuery(p).attr("data-rel").split("["):p.rel?t=p.rel.split("["):t[0]="","wppa"==t[0])switch(wppaWppaOverlayActivated=!0,jQuery(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaMagnifierCursor){case"pointer":jQuery(p).css("cursor","pointer");break;case"":jQuery(p).css("cursor","default");break;default:jQuery(p).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange)}function wppaOvlResize(){wppaConsoleLog("wppaOvlResize"),0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout("wppaOvlStartAudio()",100))}function wppaShowFsButtons(p){void 0!==p&&(wppaNormsBtnOpac=p),jQuery("#wppa-exit-btn").stop().fadeTo(3,wppaNormsBtnOpac),"normal"==wppaOvlMode?jQuery("#wppa-fulls-btn").stop().fadeTo(3,wppaNormsBtnOpac):jQuery("#wppa-norms-btn").stop().fadeTo(3,wppaNormsBtnOpac)}function wppaOvlImgClick(p){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(p.screenX<screen.width/2?wppaOvlShowPrev():wppaOvlShowNext())}jQuery(document).ready(function(p){wppaInitOverlay()}),jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth}),wppaOvlResize()}),wppaConsoleLog("wppa-lightbox.js version "+wppaLightboxVersion+" loaded.","force");
|
1 |
+
var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaRenderer,wppaScene,wppaCamera,wppaSphere,wppaSphereMaterial,wppaSphereMesh,wppaLightboxVersion="7.4.02",wppaNormsBtnOpac=.75,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlFsExitBtnSize="48",wppaOvlActivePanorama=0,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaSavedContainerWidth=0;function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",10)}function wppaOvlKeyboardHandler(p){var a,e=(a=null==p?event.keyCode:p.keyCode,27),t=String.fromCharCode(a).toLowerCase();switch(a){case e:wppaStopVideo(0),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(t){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"d":jQuery("#wppa-ovl-legenda-1").css("visibility","hidden"),jQuery("#wppa-ovl-legenda-2").css("visibility","hidden"),wppaShowLegenda="hidden";break;case"f":wppaOvlFull();break;case"l":wppaOvlNorm();break;case"q":case"x":wppaStopVideo(0),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide()}return!1}function wppaOvlFull(p){wppaConsoleLog("wppaOvlFull"),wppaNormsBtnOpac=.75;var a=wppaOvlMode;p||wppaOvlStepMode();var e=document.getElementById("wppa-overlay-ic");e&&(!p&&"normal"!=a||(e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()),"normal"==wppaOvlMode&&(document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()),setTimeout(function(){wppaShowFsButtons(.75)},30),jQuery("#wppa-ovl-legenda-1").html(""))}function wppaOvlNorm(p){wppaConsoleLog("wppaOvlNorm"),wppaOvlMode="normal",wppaNormsBtnOpac=.75,document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen(),p?wppaOvlMode=wppaOvlModeInitial:(setTimeout(function(){wppaShowFsButtons(.75)},30),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50))}function wppaOvlShow(p){var a,e;if(wppaConsoleLog("wppaOvlShow arg="+p),0<wppaOvlActivePanorama?jQuery("#wppa-overlay-ic").css({top:0,left:0}):jQuery("#wppa-overlay-ic").css({top:"50%",left:"50%"}),wppaOvlFirst&&(jQuery("#weaver-final").removeClass("wvr-hide-bang"),jQuery("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaKbHandlerInstalled||(jQuery(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),jQuery("#wppa-overlay-bg").css({width:window.innerWidth,height:window.innerHeight}),"normal"!=wppaOvlModeInitial&&wppaOvlFull(!0),jQuery(window).trigger("wppalightboxstart")),"object"==typeof p){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var t=(p.rel?p.rel:!!jQuery(p).attr("data-rel")&&jQuery(p).attr("data-rel")).split("[");if(t[1])for(var o,l=t[1],i=jQuery("a"),n=0,r=0;r<i.length;r++)o=i[r],1<(t=!!jQuery(o).attr("data-rel")&&jQuery(o).attr("data-rel").split("[")).length&&"wppa"==t[0]&&t[1]==l&&(wppaOvlUrls[n]=o.href,jQuery(o).attr("data-lbtitle")?wppaOvlTitles[n]=wppaRepairScriptTags(jQuery(o).attr("data-lbtitle")):wppaOvlTitles[n]=wppaRepairScriptTags(o.title),wppaOvlIds[n]=jQuery(o).attr("data-id")?jQuery(o).attr("data-id"):"0",wppaOvlAlts[n]=jQuery(o).attr("data-alt")?jQuery(o).attr("data-alt"):"",wppaOvlVideoHtmls[n]=jQuery(o).attr("data-videohtml")?decodeURI(jQuery(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[n]=jQuery(o).attr("data-pdfhtml")?decodeURI(jQuery(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[n]=jQuery(o).attr("data-audiohtml")?decodeURI(jQuery(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[n]=jQuery(o).attr("data-videonatwidth")?jQuery(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[n]=jQuery(o).attr("data-videonatheight")?jQuery(o).attr("data-videonatheight"):"",0<(a=jQuery(o).attr("data-panorama")?jQuery(o).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[n]=a.substr(e+1),wppaOvlPanoramaIds[n]=a.substr(0,e)):(wppaOvlPanoramaHtml[n]="",wppaOvlPanoramaIds[n]=0),decodeURI(jQuery(o).attr("data-pdfhtml"))==decodeURI(jQuery(p).attr("data-pdfhtml"))&&decodeURI(jQuery(o).attr("data-videohtml"))==decodeURI(jQuery(p).attr("data-videohtml"))&&decodeURI(jQuery(o).attr("data-audiohtml"))==decodeURI(jQuery(p).attr("data-audiohtml"))&&o.href==p.href&&(wppaOvlIdx=n),n++);else wppaOvlUrls[0]=p.href,jQuery(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlIds[0]=jQuery(p).attr("data-id")?jQuery(p).attr("data-id"):"0",wppaOvlAlts[0]=jQuery(p).attr("data-alt")?jQuery(p).attr("data-alt"):"",wppaOvlVideoHtmls[0]=jQuery(p).attr("data-videohtml")?decodeURI(jQuery(p).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=jQuery(p).attr("data-audiohtml")?decodeURI(jQuery(p).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=jQuery(p).attr("data-pdfhtml")?decodeURI(jQuery(p).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=jQuery(p).attr("data-videonatwidth")?jQuery(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=jQuery(p).attr("data-videonatheight")?jQuery(p).attr("data-videonatheight"):"",0<(a=jQuery(p).attr("data-panorama")?jQuery(p).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[0]=a.substr(e+1),wppaOvlPanoramaIds[0]=a.substr(0,e)):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0),wppaOvlIdx=0}else wppaOvlIdx=p;wppaOvlOpen=!0,setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},1)}function _wppaOvlShow(p){if(wppaOvlCurIdx=p,wppaOvlFirst&&jQuery("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[p],!(0<wppaOvlUrls[p].length)||wppaIsVideo||(wppaOvlImgs[p]=new Image,wppaOvlImgs[p].src=wppaOvlUrls[p],wppaIsIe||wppaOvlImgs[p].complete||!wppaOvlOpen)){var a,e=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1;if(""==wppaOvlVideoHtmls[e]&&wppaOvlOpen&&(wppaOvlImgs[e]=new Image,wppaOvlImgs[e].src=wppaOvlUrls[e]),!wppaOvlRunning&&wppaOvlOpen&&(a=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1,""==wppaOvlVideoHtmls[a]&&(wppaOvlImgs[a]=new Image,wppaOvlImgs[a].src=wppaOvlUrls[a])),_bumpViewCount(wppaOvlIds[p]),wppaOvlIsSingle=1==wppaOvlUrls.length,0<wppaOvlPanoramaIds[p]?(wppaOvlActivePanorama=wppaOvlPanoramaIds[p],jQuery("#wppa-overlay-ic").css({top:0,left:0})):(wppaOvlActivePanorama=0,jQuery("#wppa-overlay-ic").css({top:"50%",left:"50%",display:"block"})),"normal"!=wppaOvlMode||wppaOvlActivePanorama){wppaOvlActivePanorama?(l=wppaOvlPanoramaHtml[p]+"<div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >",wppaOvlShowLegenda&&"normal"!=wppaOvlMode&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode=fullscreen. '+(wppaOvlIsSingle?wppaOvlFullLegendaSinglePanorama:wppaOvlFullLegendaPanorama)+"</div>")):(wppaIsVideo?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video><div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >":wppaOvlIsPdf?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[p]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+"\" ></iframe><div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >":(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[p]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),l+="<div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >"),wppaOvlShowLegenda&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode='+wppaOvlMode+". "+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+"</div>")),l+="</div>";var t=(wppaIsMobile,"0.1");return l+='<div id="wppa-exit-btn" style="height:'+wppaOvlFsExitBtnSize+"px;z-index:100098;position:fixed;top:0;right:0;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlHide()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>","normal"!=wppaOvlMode&&(l+='<div id="wppa-norms-btn" style="height:48px;z-index:100098;position:fixed;top:0;right:'+wppaOvlFsExitBtnSize+"px;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlNorm()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit-Full-Screen",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),jQuery("#wppa-overlay-ic").html(l)),0<wppaOvlPanoramaIds[p]&&wppaOvlIsSingle&&jQuery(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout("wppaOvlFormatFull()",10),wppaIsVideo||wppaHasAudio?setTimeout("wppaOvlUpdateFsId()",20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaShowFsButtons(),!1}wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);var o="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(o=wppaOvlFontColor);wppaOvlUrls.length;jQuery("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video>",wppaOvlIsVideo=!0):wppaOvlIsPdf?l+="<iframe "+wppaOvlPdfHtmls[p]+' id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" ></iframe>':(l+='<img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[p]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),wppaOvlIsVideo=!1),!wppaOvlShowStartStop||wppaOvlIsSingle||wppaIsVideo||wppaOvlIsPdf||(l+='<div id="wppa-ovl-start-stop-btn" class="wppa-ovl-nav-btn" style="z-index:100101;position:absolute;top:50%;margin-top:-24px;left:50%;margin-left:-24px;'+(-1==wppaOvlIdx?"visibility:hidden;":"")+"box-shadow:none;"+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlStartStop()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button",wppaOvlIconSize,!0,!0,"0","20","50","50")+"</div>"),l+="</div>";var i=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+o+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" >',wppaOvlIsSingle||(l+='<div id="wppa-ovl-prev-btn" class="wppa-ovl-nav-btn" style="float:left;z-index:100101;width:'+wppaOvlIconSize+';box-shadow:none;" onclick="wppaOvlShowPrev()" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+"</div>"),wppaOvlIsSingle||(l+='<div id="wppa-ovl-next-btn" class="wppa-ovl-nav-btn" style="float:right;z-index:100101;width:'+wppaOvlIconSize+';box-shadow:none;" onclick="wppaOvlShowNext()" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</div>"),l+='<div id="wppa-overlay-txt" style="text-align:center;min-height:36px;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >'+(i?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[p]+"</div>",l+='<div style="clear:both;" ></div></div>',jQuery("#wppa-overlay-ic").html(l),wppaShowFsButtons(),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),0==wppaOvlPanoramaIds[p]&&wppaOvlResize(),wppaOvlFirst&&wppaShowFsButtons(),!1}setTimeout("_wppaOvlShow("+p+")",500)}function wppaOvlSize(p){if(wppaConsoleLog("wppaOvlSize"),!wppaOvlActivePanorama){var a=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(a&&e&&"none"!=jQuery("#wppa-overlay-bg").css("display")){if("normal"==wppaOvlMode){var t,o,l,i,n=wppaWindowWidth(),r=wppaWindowHeight(),w=wppaOvlIsVideo?(a.clientWidth,t=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(wppaWindowWidth(),t=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(a.clientWidth,t=a.naturalWidth,a.naturalHeight);void 0===t&&(t=a.clientWidth,w=a.clientHeight),(i=(o=(n-3*wppaOvlBorderWidth)/t)<(l=r/w)?o:l)<1&&(t=parseInt(t*i),w=parseInt(w*i));var d=jQuery("#wppa-overlay-txt").height(),d=Math.max(d,wppaOvlIconSize),v="auto"==wppaOvlTxtHeight?(0==d&&(d=20+2*wppaOvlBorderWidth),r-d-40-2*wppaOvlBorderWidth):r-wppaOvlTxtHeight-40-2*wppaOvlBorderWidth,s=parseInt(v*t/w),u=(wppaOvlPadTop,parseInt((n-s)/2),s);w<v&&(wppaOvlPadTop,parseInt((n-t)/2),u=t);var h=wppaSavedImageWidth-u<3&&u-wppaSavedImageWidth<3;return u<=10&&(w=180,h=!(t=u=240)),u=parseInt(u),wppaSavedImageWidth=parseInt(u),wppaSavedImageHeight=parseInt(u*w/t),wppaSavedMarginLeft=-parseInt(u/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(u+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+jQuery("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),jQuery("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},p),jQuery("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p),h?(jQuery("#wppa-ovl-spin").hide(),wppaConsoleLog("Done "+wppaOvlIdx),wppaOvlFirst=!1):setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+10),!0}wppaOvlFormatFull()}}}function wppaOvlFormatFull(){if(wppaOvlOpen&&!(0<wppaOvlActivePanorama)){var p,a,e;if(wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),a=wppaOvlVideoNaturalWidths[wppaOvlIdx],e=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)p=document.getElementById("wppa-overlay-img"),a=screen.width,e=screen.height;else{if(p=document.getElementById("wppa-overlay-img"),!(wppaIsIe||p&&p.complete))return void setTimeout("wppaOvlFormatFull()",10);a=p.naturalWidth,e=p.naturalHeight}var t=screen.width/screen.height,o=a/e,l=0,i=0,n=0,r=0,w=0,d=0,v="hidden";switch(wppaOvlMode){case"padded":r=o<t?(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,screen.height*o):(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,screen.width);break;case"stretched":i=l=0,n=screen.height,r=screen.width;break;case"clipped":r=o<t?(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,screen.width):(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,screen.height*o);break;case"realsize":(l=(screen.width-a)/2)<0&&(d=parseInt(-l),l=0),(i=(screen.height-e)/2)<0&&(w=parseInt(-i),i=0),n=e,r=a,v="auto"}return l=parseInt(l),i=parseInt(i),n=parseInt(n),r=parseInt(r),jQuery(p).css({height:n,width:r,marginLeft:l,marginTop:i,left:0,top:0,maxWidth:1e4}),jQuery(p).css({visibility:"visible"}),jQuery("#wppa-ovl-full-bg").css({overflow:v}),jQuery("#wppa-ovl-full-bg").scrollTop(w),jQuery("#wppa-ovl-full-bg").scrollLeft(d),jQuery("#wppa-ovl-spin").hide(),!0}}function wppaOvlUpdateFsId(){wppaConsoleLog("wppaOvlUpdateFsId"),wppaOvlFsPhotoId=wppaPhotoId}function wppaOvlStartAudio(){wppaConsoleLog("wppaOvlStartAudio");var p=document.getElementById("wppa-overlay-audio");p&&"function"==typeof p.play&&(p.play(),wppaConsoleLog("Audio play wppa-overlay-audio"))}function wppaOvlStepMode(){wppaConsoleLog("wppaOvlStepMode from "+wppaOvlMode);for(var p=new Array("normal","padded","stretched","clipped","realsize","padded"),a=0;a<p.length;){if(wppaOvlMode==p[a])return wppaOvlMode=p[a+1],void wppaOvlShow(wppaOvlIdx);a++}}function wppaOvlStartStop(){wppaConsoleLog("wppaOvlStartStop called. Running="+wppaOvlRunning),wppaOvlRunning?(wppaOvlRunning=!1,jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button",wppaOvlIconSize,!0,!0,"0","20","50","50")),-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&jQuery("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&jQuery("#wppa-ovl-next-btn").css("visibility","visible"))):(jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml((wppaOvlRunning,"Pause-Button"),wppaOvlIconSize,!0,!0,"0","20","50","50")),wppaOvlRunning=!0,wppaOvlRun())}function wppaOvlRun(){if(wppaConsoleLog("wppaOvlRun, running="+wppaOvlRunning),wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout("wppaOvlRun()",50);else{if(!wppaIsVideo){var p=document.getElementById("wppa-overlay-img");if(p&&!wppaIsIe&&!p.complete)return wppaConsoleLog("Wait during run"),void setTimeout("wppaOvlRun()",50)}var a=wppaOvlIdx>=wppaOvlUrls.length-1?0:wppaOvlIdx+1;wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlShow(a),setTimeout("wppaOvlRun()",wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){return wppaConsoleLog("wppaOvlShowPrev"),wppaOvlIsSingle||(wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1)),!1}function wppaOvlShowNext(){return wppaConsoleLog("wppaOvlShowNext"),wppaOvlIsSingle||(jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIdx>=wppaOvlUrls.length-1&&(wppaOvlIdx=-1),wppaOvlShow(wppaOvlIdx+1)),!1}function wppaOvlHide(){wppaConsoleLog("wppaOvlHide"),wppaStopAudio(),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),jQuery("#wppa-overlay-ic").html(""),jQuery("#wppa-overlay-bg").fadeOut(300),jQuery(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,wppaOvlMode=wppaOvlModeInitial,wppaNormsBtnOpac=.75,jQuery("#wppa-ovl-spin").hide(),jQuery("#wppa-fulls-btn").stop().fadeOut(300),jQuery("#wppa-exit-btn").stop().fadeOut(300),jQuery("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,wppaOvlOpen=!1,document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null),jQuery(window).trigger("wppalightboxend"),jQuery(window).trigger("resize")}function wppaOvlOnclick(p){switch(wppaConsoleLog("wppaOvlOnClick"),wppaOvlOnclickType){case"none":break;case"close":"normal"==wppaOvlMode&&wppaOvlHide();break;case"browse":var a=p.screenX-window.screenX;48<p.clientY&&(a<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)();break;default:alert("Unimplemented action: "+wppaOvlOnclickType)}return!0}function wppaInitOverlay(){jQuery(".wp-caption").each(function(){var p=jQuery(this),a=p.find("IMG[alt]").attr("alt")||"",e=p.find(".wp-caption-text").html()||"",t=p.find("a"),o=a+"<br>"+e;t.attr("data-lbtitle")||t.attr("data-lbtitle",o)}),""==wppaOvlMode&&(wppaOvlMode=wppaOvlModeInitial);var p,a,e=jQuery("a"),t=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=wppaOvlCurIdx=0)==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),a=0;a<e.length;a++)if(p=e[a],jQuery(p).attr("data-rel")?t=jQuery(p).attr("data-rel").split("["):p.rel?t=p.rel.split("["):t[0]="","wppa"==t[0])switch(wppaWppaOverlayActivated=!0,jQuery(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaMagnifierCursor){case"pointer":jQuery(p).css("cursor","pointer");break;case"":jQuery(p).css("cursor","default");break;default:jQuery(p).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange)}function wppaOvlResize(){wppaConsoleLog("wppaOvlResize"),0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout("wppaOvlStartAudio()",100))}function wppaShowFsButtons(p){void 0!==p&&(wppaNormsBtnOpac=p),jQuery("#wppa-exit-btn").stop().fadeTo(3,wppaNormsBtnOpac),"normal"==wppaOvlMode?jQuery("#wppa-fulls-btn").stop().fadeTo(3,wppaNormsBtnOpac):jQuery("#wppa-norms-btn").stop().fadeTo(3,wppaNormsBtnOpac)}function wppaOvlImgClick(p){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(p.screenX<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}jQuery(document).ready(function(p){wppaInitOverlay()}),jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth}),wppaOvlResize()}),wppaConsoleLog("wppa-lightbox.js version "+wppaLightboxVersion+" loaded.","force");
|
js/wppa-utils.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
//
|
3 |
// conatins common vars and functions
|
4 |
//
|
5 |
-
var wppaJsUtilsVersion = '7.
|
6 |
var wppaDebug;
|
7 |
|
8 |
// Handle animation dependant of setting for mobile
|
@@ -431,7 +431,7 @@ function wppaMakeLazyVisible(mocc, extended) {
|
|
431 |
if ( jQuery( '.wppa-lazy-'+mocc ).length == 0 ) {
|
432 |
_wppaLazyDone[mocc] = true;
|
433 |
}
|
434 |
-
|
435 |
// Init masonryplus
|
436 |
wppaInitMasonryPlus(mocc);
|
437 |
}
|
@@ -455,7 +455,7 @@ function wppaMakeLazyVisible(mocc, extended) {
|
|
455 |
if ( jQuery( '.wppa-lazy' ).length == 0 ) {
|
456 |
_wppaLazyDone[0] = true;
|
457 |
}
|
458 |
-
|
459 |
// Init masonryplus
|
460 |
wppaInitMasonryPlus();
|
461 |
}
|
@@ -463,13 +463,13 @@ function wppaMakeLazyVisible(mocc, extended) {
|
|
463 |
var t1 = d.getTime();
|
464 |
wppaLastLazy = t1;
|
465 |
|
466 |
-
wppaConsoleLog( 'MakeLazyVisible('+mocc+') took '+(t1-t0)+' ms. Totoal count = '+c0+', modcount = '+c1 );
|
467 |
|
468 |
// Redo after 500 ms when we found something to do
|
469 |
if ( c1 > 0 ) {
|
470 |
wppaConsoleLog( 'Redo request lazy', 'force' );
|
471 |
setTimeout( 'wppaMakeLazyVisible('+mocc+')', 500 );
|
472 |
-
|
473 |
// Init masonryplus
|
474 |
wppaInitMasonryPlus();
|
475 |
}
|
2 |
//
|
3 |
// conatins common vars and functions
|
4 |
//
|
5 |
+
var wppaJsUtilsVersion = '7.4.02';
|
6 |
var wppaDebug;
|
7 |
|
8 |
// Handle animation dependant of setting for mobile
|
431 |
if ( jQuery( '.wppa-lazy-'+mocc ).length == 0 ) {
|
432 |
_wppaLazyDone[mocc] = true;
|
433 |
}
|
434 |
+
|
435 |
// Init masonryplus
|
436 |
wppaInitMasonryPlus(mocc);
|
437 |
}
|
455 |
if ( jQuery( '.wppa-lazy' ).length == 0 ) {
|
456 |
_wppaLazyDone[0] = true;
|
457 |
}
|
458 |
+
|
459 |
// Init masonryplus
|
460 |
wppaInitMasonryPlus();
|
461 |
}
|
463 |
var t1 = d.getTime();
|
464 |
wppaLastLazy = t1;
|
465 |
|
466 |
+
// wppaConsoleLog( 'MakeLazyVisible('+mocc+') took '+(t1-t0)+' ms. Totoal count = '+c0+', modcount = '+c1 );
|
467 |
|
468 |
// Redo after 500 ms when we found something to do
|
469 |
if ( c1 > 0 ) {
|
470 |
wppaConsoleLog( 'Redo request lazy', 'force' );
|
471 |
setTimeout( 'wppaMakeLazyVisible('+mocc+')', 500 );
|
472 |
+
|
473 |
// Init masonryplus
|
474 |
wppaInitMasonryPlus();
|
475 |
}
|
js/wppa-utils.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var wppaDebug,wppaJsUtilsVersion="7.
|
1 |
+
var wppaDebug,wppaJsUtilsVersion="7.4.02";function wppaAnimate(e,t,a,p,r){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css(t),r&&setTimeout(r,10)):jQuery(e).stop().animate(t,a,p,r)}function wppaFadeIn(e,t,a){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:""}),a&&setTimeout(a,10)):jQuery(e).stop().fadeIn(t,a)}function wppaFadeOut(e,t,a){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"none"}),a&&setTimeout(a,10)):jQuery(e).stop().fadeOut(t,a)}function wppaFadeTo(e,t,a,p){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"",opacity:a}),p&&setTimeout(p,10)):jQuery(e).stop().fadeTo(t,a,p)}function wppaTrim(e,t){var a=wppaTrimLeft(e,t);return a=wppaTrimRight(a,t)}function wppaTrimLeft(e,t){var a,p,r,n,o,i,s;switch(typeof t){case"string":for(p=(a=e).length,r=t.length;r<=p&&a.substr(0,r)==t;)p=(a=a.substr(r)).length;break;case"object":for(o=!1,s=e;!o;){for(n=0,i=s;n<t.length;)s=wppaTrimLeft(s,t[n]),n++;o=i==s}a=s;break;default:return e.replace(/^\s\s*/,"")}return a}function wppaTrimRight(e,t){var a,p,r,n,o,i,s;switch(typeof t){case"string":for(p=(a=e).length,r=t.length;r<=p&&a.substr(p-r)==t;)p=(a=a.substr(0,p-r)).length;break;case"object":for(o=!1,s=e;!o;){for(n=0,i=s;n<t.length;)s=wppaTrimRight(s,t[n]),n++;o=i==s}a=s;break;default:return e.replace(/\s\s*$/,"")}return a}function wppa_setCookie(e,t,a){var p=new Date;p.setDate(p.getDate()+a);var r=escape(t)+(null==a?"":"; expires="+p.toUTCString());document.cookie=e+"="+r}function wppa_getCookie(e){for(var t,a,p=document.cookie.split(";"),r=0;r<p.length;r++)if(t=p[r].substr(0,p[r].indexOf("=")),a=p[r].substr(p[r].indexOf("=")+1),(t=t.replace(/^\s+|\s+$/g,""))==e)return unescape(a);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,t){var a,p,r,n;"undefined"==typeof console||!wppaDebug&&"force"!=t||(a=(new Date).getTime()%864e5,a-=60*(p=Math.floor(a/36e5))*60*1e3,a-=60*(r=Math.floor(a/6e4))*1e3,n=Math.floor(a/1e3),console.log("At: "+p+":"+r+":"+n+"."+(a-=1e3*n)+" message: "+e))}function wppaSvgHtml(e,t,a,p,r,n,o,i){var s,l,c;switch(r=r||"0",n=n||"10",o=o||"20",i=i||"50",wppaSvgCornerStyle){case"gif":case"none":radius=r;break;case"light":radius=n;break;case"medium":radius=o;break;case"heavy":radius=i}t=t||"32px",l=a?(s=wppaOvlSvgFillcolor,wppaOvlSvgBgcolor):(s=wppaSvgFillcolor,wppaSvgBgcolor),c=wppaUseSvg?wppaImageDirectory+e+".svg":wppaImageDirectory+e+".png";if(wppaUseSvg&&"-1"!=jQuery.inArray(e,["Next-Button","Prev-Button","Backward-Button","Forward-Button","Pause-Button","Play-Button","Stop-Button","Eagle-1","Snail","Exit","Full-Screen","Exit-Full-Screen","Content-View"])){var u='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;'+(t?"height:"+t+";":"")+"fill:"+s+";background-color:"+l+";text-decoration:none !important;vertical-align:middle;"+(radius?"border-radius:"+radius+"%;":"")+'" xml:space="preserve" ><g>';switch(e){case"Next-Button":u+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.3-0.2,0.5-0.5,0.5S19,20.8,19,20.5v-4.2l-8.3,4.6c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1c-0.2-0.1-0.2-0.3-0.2-0.4v-11c0-0.2,0.1-0.4,0.3-0.4c0.2-0.1,0.4-0.1,0.5,0l8.2,5.5V9.5C19,9.2,19.2,9,19.5,9S20,9.2,20,9.5V20.5z" />';break;case"Prev-Button":u+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.2-0.1,0.4-0.3,0.4c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1L11,15.4v5.1c0,0.3-0.2,0.5-0.5,0.5S10,20.8,10,20.5v-11C10,9.2,10.2,9,10.5,9S11,9.2,11,9.5v4.2l8.3-4.6c0.2-0.1,0.3-0.1,0.5,0S20,9.3,20,9.5V20.5z" />';break;case"Pause-Button":u+='<path d="M30,0H0V30H30V0z M14,20.5c0,0.3-0.2,0.5-0.5,0.5h-4C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h4C13.8,9,14,9.2,14,9.5V20.5z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-4c-0.3,0-0.5-0.2-0.5-0.5v-11C16,9.2,16.2,9,16.5,9h4C20.8,9,21,9.2,21,9.5V20.5z" />';break;case"Play-Button":u+='<path d="M30,0H0V30H30V0zM19.8,14.9l-8,5C11.7,20,11.6,20,11.5,20c-0.1,0-0.2,0-0.2-0.1c-0.2-0.1-0.3-0.3-0.3-0.4v-9c0-0.2,0.1-0.3,0.2-0.4c0.1-0.1,0.3-0.1,0.5,0l8,4c0.2,0.1,0.3,0.2,0.3,0.4C20,14.7,19.9,14.8,19.8,14.9z" />';break;case"Stop-Button":u+='<path d="M30,0H0V30H30V0z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-11C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h11C20.8,9,21,9.2,21,9.5V20.5z"/>';break;case"Exit":u+='<path d="M30 24.398l-8.406-8.398 8.406-8.398-5.602-5.602-8.398 8.402-8.402-8.402-5.598 5.602 8.398 8.398-8.398 8.398 5.598 5.602 8.402-8.402 8.398 8.402z"></path>';break;case"Full-Screen":u+='<path d="M27.414 24.586l-4.586-4.586-2.828 2.828 4.586 4.586-4.586 4.586h12v-12zM12 0h-12v12l4.586-4.586 4.543 4.539 2.828-2.828-4.543-4.539zM12 22.828l-2.828-2.828-4.586 4.586-4.586-4.586v12h12l-4.586-4.586zM32 0h-12l4.586 4.586-4.543 4.539 2.828 2.828 4.543-4.539 4.586 4.586z"></path>';break;case"Exit-Full-Screen":u+='<path d="M24.586 27.414l4.586 4.586 2.828-2.828-4.586-4.586 4.586-4.586h-12v12zM0 12h12v-12l-4.586 4.586-4.539-4.543-2.828 2.828 4.539 4.543zM0 29.172l2.828 2.828 4.586-4.586 4.586 4.586v-12h-12l4.586 4.586zM20 12h12l-4.586-4.586 4.547-4.543-2.828-2.828-4.547 4.543-4.586-4.586z"></path>';break;default:alert("Native svg "+e+" not implemented")}u+="</g></svg>"}else u='<img src="'+c+'"'+(wppaUseSvg?' class="wppa-svg"':"")+' style="height:'+t+";fill:"+s+";background-color:"+l+";"+(radius?"border-radius:"+radius+"%;":"")+(wppaUseSvg?"display:none;":"")+'text-decoration:none !important;vertical-align:middle;" />';return u}var wppaLastLazy=0;function wppaMakeLazyVisible(e,t){var a,p,r,n;wppaInitMasonryPlus(),"number"!=typeof e&&(e=0),_wppaLazyDone[e]||((a=new Date).getTime()<wppaLastLazy+250||((r=0)<e?(jQuery(".wppa-lazy-"+e).each(function(){(p=jQuery(this).attr("data-src"))?wppaLazyLoad&&!wppaIsElementInViewport(this,t)||(jQuery(this).attr("src",p),jQuery(this).removeAttr("data-src"),jQuery(this).removeClass("wppa-lazy"),jQuery(this).removeClass("wppa-lazy-"+e),r++):wppaIsElementInViewport(this)&&jQuery(this).removeClass("wppa-lazy-"+e),0}),0==jQuery(".wppa-lazy-"+e).length&&(_wppaLazyDone[e]=!0),wppaInitMasonryPlus(e)):(jQuery(".wppa-lazy").each(function(){(p=jQuery(this).attr("data-src"))&&(wppaLazyLoad&&!wppaIsElementInViewport(this)||(jQuery(this).attr("src",p),jQuery(this).removeAttr("data-src"),jQuery(this).removeClass("wppa-lazy"),r++)),0}),0==jQuery(".wppa-lazy").length&&(_wppaLazyDone[0]=!0),wppaInitMasonryPlus()),n=a.getTime(),wppaLastLazy=n,0<r&&(wppaConsoleLog("Redo request lazy","force"),setTimeout("wppaMakeLazyVisible("+e+")",500),wppaInitMasonryPlus())))}function wppaIsElementInViewport(e,t){"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);var a,p=e.getBoundingClientRect();return!p||(a=wppaWindowWidth(),t&&(a*=3),0<p.bottom&&0<p.right&&p.left<a&&p.top<wppaWindowHeight())}function wppaSizeArea(){0<wppaAreaMaxFrac&&wppaAreaMaxFrac<1&&(jQuery(".wppa-thumb-area").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac),jQuery(".albumlist").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac))}function wppaIconSize(e,t,a){var p=a?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==p?t:(wppaIsMini[e]?p/2:p)+"px;"}function wppaEntityDecode(e){var t=e;return t=(t=(t=(t=(t=t.split("&").join("&")).split(">").join(">")).split("<").join("<")).split(""").join('"')).split("'").join("'")}function wppaSetMaxWidthToParentWidth(e){var t=e.parentNode.clientWidth;jQuery(e).css({maxWidth:t})}function wppaWindowHeight(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function wppaWindowWidth(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}wppaConsoleLog("wppa-utils.js version "+wppaJsUtilsVersion+" loaded.","force");
|
js/wppa-zoom.js
ADDED
@@ -0,0 +1,501 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// wppa-zoom.js
|
2 |
+
//
|
3 |
+
// contains wppa functions for simple zoomable photos
|
4 |
+
//
|
5 |
+
var wppaJsZoomVersion = '7.4.02';
|
6 |
+
|
7 |
+
if ( typeof $ == 'undefined' ) $ = jQuery;
|
8 |
+
|
9 |
+
// The main proccedure
|
10 |
+
function wppaDoZoomPan() {
|
11 |
+
|
12 |
+
// Wait until all the image files have been completely loaded
|
13 |
+
var mocc;
|
14 |
+
var args;
|
15 |
+
var needRedo = false;
|
16 |
+
for ( mocc = 0; mocc < wppaZoomableData.length; mocc++ ) {
|
17 |
+
if ( typeof wppaZoomableData[mocc] != 'undefined' ) {
|
18 |
+
args = wppaZoomableData[mocc];
|
19 |
+
if ( ! args.image.complete ) {
|
20 |
+
needRedo = true;
|
21 |
+
}
|
22 |
+
else if ( ! args.initialized ) {
|
23 |
+
|
24 |
+
// Find additional data
|
25 |
+
args = wppaZoomableData[mocc];
|
26 |
+
args.manualControl = false;
|
27 |
+
args.deltaX = 0;
|
28 |
+
args.deltaY = 0;
|
29 |
+
args.deltaFactor = 1.0;
|
30 |
+
args.run = 4;
|
31 |
+
args.busy = false;
|
32 |
+
args.abort = false;
|
33 |
+
args.itemid = args.mocc + '-' + args.id;
|
34 |
+
args.div = $( "#wppa-pan-div-" + args.itemid );
|
35 |
+
args.canvas = document.getElementById( "wppa-pan-canvas-" + args.itemid );
|
36 |
+
args.left = $( "#wppa-pctl-left-" + args.itemid );
|
37 |
+
args.right = $( "#wppa-pctl-right-" + args.itemid );
|
38 |
+
args.up = $( "#wppa-pctl-up-" + args.itemid );
|
39 |
+
args.down = $( "#wppa-pctl-down-" + args.itemid );
|
40 |
+
args.zoomin = $( "#wppa-pctl-zoomin-" + args.itemid );
|
41 |
+
args.zoomout = $( "#wppa-pctl-zoomout-" + args.itemid );
|
42 |
+
args.prev = $( "#wppa-pctl-prev-" + args.itemid );
|
43 |
+
args.next = $( "#wppa-pctl-next-" + args.itemid );
|
44 |
+
args.canvasWidth = args.width;
|
45 |
+
args.canvasHeight = args.height;
|
46 |
+
args.savedCanvasX = 0;
|
47 |
+
args.savedCanvasY = 0;
|
48 |
+
args.fromHeight = args.image.height;
|
49 |
+
args.fromWidth = args.image.width;
|
50 |
+
args.fromX = 0;
|
51 |
+
args.fromY = 0;
|
52 |
+
args.centerX = args.fromX + args.fromWidth / 2;
|
53 |
+
args.centerY = args.fromY + args.fromHeight / 2;
|
54 |
+
args.ctx = null;
|
55 |
+
|
56 |
+
// Install event listeners
|
57 |
+
if ( args.isMobile ) {
|
58 |
+
args.right.on("touchstart", onRightMouseDown);
|
59 |
+
args.right.on("touchend", onButtonUp);
|
60 |
+
args.left.on("touchstart", onLeftMouseDown);
|
61 |
+
args.left.on("touchend", onButtonUp);
|
62 |
+
args.up.on("touchstart", onUpMouseDown);
|
63 |
+
args.up.on("touchend", onButtonUp);
|
64 |
+
args.down.on("touchstart", onDownMouseDown);
|
65 |
+
args.down.on("touchend", onButtonUp);
|
66 |
+
args.zoomin.on("touchstart", onZoomInMouseDown);
|
67 |
+
args.zoomin.on("touchend", onButtonUp);
|
68 |
+
args.zoomout.on("touchstart", onZoomOutMouseDown);
|
69 |
+
args.zoomout.on("touchend", onButtonUp);
|
70 |
+
}
|
71 |
+
else {
|
72 |
+
args.canvas.addEventListener("mousedown", onCanvasMouseDown);
|
73 |
+
args.canvas.addEventListener("mousemove", onCanvasMouseMove);
|
74 |
+
args.canvas.addEventListener("mouseup", onCanvasMouseUp);
|
75 |
+
args.canvas.addEventListener("mouseout", onCanvasMouseUp);
|
76 |
+
document.getElementById("wppa-pan-canvas-" + args.itemid ).addEventListener("wheel", onDivWheel);
|
77 |
+
|
78 |
+
args.right.on("mousedown", onRightMouseDown);
|
79 |
+
args.right.on("mouseup", onButtonUp);
|
80 |
+
args.left.on("mousedown", onLeftMouseDown);
|
81 |
+
args.left.on("mouseup", onButtonUp);
|
82 |
+
args.up.on("mousedown", onUpMouseDown);
|
83 |
+
args.up.on("mouseup", onButtonUp);
|
84 |
+
args.down.on("mousedown", onDownMouseDown);
|
85 |
+
args.down.on("mouseup", onButtonUp);
|
86 |
+
args.zoomin.on("mousedown", onZoomInMouseDown);
|
87 |
+
args.zoomin.on("mouseup", onButtonUp);
|
88 |
+
args.zoomout.on("mousedown", onZoomOutMouseDown);
|
89 |
+
args.zoomout.on("mouseup", onButtonUp);
|
90 |
+
}
|
91 |
+
|
92 |
+
// Common event handlers
|
93 |
+
if ( args.isLightbox ) {
|
94 |
+
|
95 |
+
$( "#wppa-fulls-btn" ).on( "click", function() { abort=true; } );
|
96 |
+
|
97 |
+
if ( args.prev ) {
|
98 |
+
args.prev.on("click", panPrev);
|
99 |
+
args.next.on("click", panNext);
|
100 |
+
}
|
101 |
+
}
|
102 |
+
|
103 |
+
// Install Resize handler
|
104 |
+
$(window).on("DOMContentLoaded load resize orientationchange",onResize);
|
105 |
+
|
106 |
+
// Do the rendering
|
107 |
+
render(mocc);
|
108 |
+
|
109 |
+
// Resize
|
110 |
+
onResize(mocc);
|
111 |
+
|
112 |
+
// We did initialize this occ
|
113 |
+
args.initialized = true;
|
114 |
+
}
|
115 |
+
}
|
116 |
+
}
|
117 |
+
|
118 |
+
if ( needRedo ) {
|
119 |
+
setTimeout( function() {wppaDoZoomPan()}, 100 );
|
120 |
+
return;
|
121 |
+
}
|
122 |
+
|
123 |
+
// Remove spinner
|
124 |
+
$("#wppa-ovl-spin").hide();
|
125 |
+
|
126 |
+
|
127 |
+
// The render function
|
128 |
+
function render(mocc){
|
129 |
+
|
130 |
+
args = wppaZoomableData[mocc];
|
131 |
+
|
132 |
+
if ( args.isLightbox ) {
|
133 |
+
|
134 |
+
if ( ! wppaOvlOpen ) {
|
135 |
+
args.abort=true;
|
136 |
+
}
|
137 |
+
}
|
138 |
+
|
139 |
+
if ( args.abort ) {
|
140 |
+
args.ctx = null;
|
141 |
+
args.prevctx = null;
|
142 |
+
return;
|
143 |
+
}
|
144 |
+
|
145 |
+
if (args.run==0) return;
|
146 |
+
if (args.busy) return;
|
147 |
+
args.busy = true;
|
148 |
+
|
149 |
+
// manualControl is true when a drag on the canvas is being performed
|
150 |
+
if( ! args.manualControl ) {
|
151 |
+
|
152 |
+
// Panning
|
153 |
+
args.fromX += args.deltaX;
|
154 |
+
args.fromY += args.deltaY;
|
155 |
+
|
156 |
+
// Zooming
|
157 |
+
var newHeight = args.fromHeight / args.deltaFactor;
|
158 |
+
var newWidth = args.fromWidth / args.deltaFactor;
|
159 |
+
|
160 |
+
// Keep zooming in range
|
161 |
+
if ( args.deltaFactor != 1 && newHeight <= args.image.height && newHeight > 50 ) {
|
162 |
+
args.fromX -= ( newWidth - args.fromWidth ) / 2;
|
163 |
+
args.fromY -= ( newHeight - args.fromHeight ) / 2;
|
164 |
+
args.fromWidth = newWidth;
|
165 |
+
args.fromHeight = newHeight;
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
+
// Keep viewport within image boundaries
|
170 |
+
args.fromX = Math.max(0, Math.min(args.image.width-args.fromWidth, args.fromX));
|
171 |
+
args.fromY = Math.max(0, Math.min(args.image.height-args.fromHeight, args.fromY));
|
172 |
+
|
173 |
+
// Draw the image
|
174 |
+
args.ctx = args.canvas.getContext("2d");
|
175 |
+
args.ctx.drawImage(args.image,args.fromX,args.fromY,args.fromWidth,args.fromHeight,0,0,args.canvas.width,args.canvas.height);
|
176 |
+
|
177 |
+
// Done so far
|
178 |
+
args.busy = false;
|
179 |
+
|
180 |
+
// Re-render if needed
|
181 |
+
if (args.run>0) {
|
182 |
+
if (args.manualControl){setTimeout(function(){render(mocc)},25);}
|
183 |
+
else {setTimeout(function(){render(mocc)},5);}
|
184 |
+
}
|
185 |
+
if(args.run<5)args.run--;
|
186 |
+
|
187 |
+
}
|
188 |
+
|
189 |
+
|
190 |
+
// Previous
|
191 |
+
function panPrev(e) {
|
192 |
+
|
193 |
+
e.preventDefault();
|
194 |
+
this.abort = true;
|
195 |
+
var stop;
|
196 |
+
if ( ! stop ) {
|
197 |
+
stop = true;
|
198 |
+
$("#wppa-overlay-ic").css({display:"none"});
|
199 |
+
$("#wppa-ovl-spin").show();
|
200 |
+
wppaOvlShowPrev();
|
201 |
+
}
|
202 |
+
}
|
203 |
+
|
204 |
+
// Next
|
205 |
+
function panNext(e) {
|
206 |
+
|
207 |
+
e.preventDefault();
|
208 |
+
this.abort = true;
|
209 |
+
var stop;
|
210 |
+
if ( ! stop ) {
|
211 |
+
stop = true;
|
212 |
+
$("#wppa-overlay-ic").css({display:"none"});
|
213 |
+
$("#wppa-ovl-spin").show();
|
214 |
+
wppaOvlShowNext();
|
215 |
+
}
|
216 |
+
}
|
217 |
+
|
218 |
+
// Horizontal movement right by button
|
219 |
+
function onRightMouseDown(e){
|
220 |
+
|
221 |
+
var mocc = jQuery(this).attr('data-mocc');
|
222 |
+
if ( ! wppaZoomableData[mocc] ) return;
|
223 |
+
|
224 |
+
e.preventDefault();
|
225 |
+
wppaZoomableData[mocc].run=5;
|
226 |
+
wppaZoomableData[mocc].deltaX=3;
|
227 |
+
render(mocc);
|
228 |
+
}
|
229 |
+
|
230 |
+
// Horizontal movement left by button
|
231 |
+
function onLeftMouseDown(e){
|
232 |
+
|
233 |
+
var mocc = jQuery(this).attr('data-mocc');
|
234 |
+
if ( ! wppaZoomableData[mocc] ) return;
|
235 |
+
|
236 |
+
e.preventDefault();
|
237 |
+
wppaZoomableData[mocc].run=5;
|
238 |
+
wppaZoomableData[mocc].deltaX=-3;
|
239 |
+
render(mocc);
|
240 |
+
}
|
241 |
+
|
242 |
+
// Vertical movement up by button
|
243 |
+
function onUpMouseDown(e){
|
244 |
+
|
245 |
+
var mocc = jQuery(this).attr('data-mocc');
|
246 |
+
if ( ! wppaZoomableData[mocc] ) return;
|
247 |
+
|
248 |
+
e.preventDefault();
|
249 |
+
wppaZoomableData[mocc].run=5;
|
250 |
+
wppaZoomableData[mocc].deltaY=-3;
|
251 |
+
render(mocc);
|
252 |
+
}
|
253 |
+
|
254 |
+
// Vertical movement down by button
|
255 |
+
function onDownMouseDown(e){
|
256 |
+
|
257 |
+
var mocc = jQuery(this).attr('data-mocc');
|
258 |
+
if ( ! wppaZoomableData[mocc] ) return;
|
259 |
+
|
260 |
+
e.preventDefault();
|
261 |
+
wppaZoomableData[mocc].run=5;
|
262 |
+
wppaZoomableData[mocc].deltaY=3;
|
263 |
+
render(mocc);
|
264 |
+
}
|
265 |
+
|
266 |
+
// Zoom in by mousedown
|
267 |
+
function onZoomInMouseDown(e){
|
268 |
+
|
269 |
+
var mocc = jQuery(this).attr('data-mocc');
|
270 |
+
if ( ! wppaZoomableData[mocc] ) return;
|
271 |
+
|
272 |
+
e.preventDefault();
|
273 |
+
wppaZoomableData[mocc].run=5;
|
274 |
+
wppaZoomableData[mocc].deltaFactor=1.005;
|
275 |
+
render(mocc);
|
276 |
+
}
|
277 |
+
|
278 |
+
// Zoom out by mousedown
|
279 |
+
function onZoomOutMouseDown(e){
|
280 |
+
|
281 |
+
var mocc = jQuery(this).attr('data-mocc');
|
282 |
+
if ( ! wppaZoomableData[mocc] ) return;
|
283 |
+
|
284 |
+
e.preventDefault();
|
285 |
+
wppaZoomableData[mocc].run=5;
|
286 |
+
wppaZoomableData[mocc].deltaFactor=0.995;
|
287 |
+
render(mocc);
|
288 |
+
}
|
289 |
+
|
290 |
+
// Mouse wheel
|
291 |
+
function onDivWheel(e) {
|
292 |
+
|
293 |
+
var mocc = jQuery(this).attr('data-mocc');
|
294 |
+
if ( ! wppaZoomableData[mocc] ) return;
|
295 |
+
|
296 |
+
e.preventDefault();
|
297 |
+
wppaZoomableData[mocc].run=4;
|
298 |
+
wppaZoomableData[mocc].deltaFactor = 1 + e.deltaY * wppaZoomableData[mocc].zoomsensitivity / 1000;
|
299 |
+
render(mocc);
|
300 |
+
setTimeout(function(){wppaZoomableData[mocc].deltaFactor = 1}, 25);
|
301 |
+
e.stopPropagation();
|
302 |
+
}
|
303 |
+
|
304 |
+
// When a navigation button is released, stop and reset all deltas
|
305 |
+
function onButtonUp(e) {
|
306 |
+
|
307 |
+
var mocc = jQuery(this).attr('data-mocc');
|
308 |
+
if ( ! wppaZoomableData[mocc] ) return;
|
309 |
+
|
310 |
+
e.preventDefault();
|
311 |
+
wppaZoomableData[mocc].deltaX=0;
|
312 |
+
wppaZoomableData[mocc].deltaY=0;
|
313 |
+
wppaZoomableData[mocc].deltaFactor=1;
|
314 |
+
if ( wppaZoomableData[mocc].isLightbox ) wppaZoomableData[mocc].run--;
|
315 |
+
else wppaZoomableData[mocc].run=4;
|
316 |
+
}
|
317 |
+
|
318 |
+
// When a (responsive) resize is required, we resize the wppaScene
|
319 |
+
function onResize(e){
|
320 |
+
|
321 |
+
var mocc;
|
322 |
+
for ( mocc = 0; mocc < wppaZoomableData.length; mocc++ ) {
|
323 |
+
if ( wppaZoomableData[mocc] && wppaZoomableData[mocc].canvas && ! wppaZoomableData[mocc].abort ) {
|
324 |
+
|
325 |
+
var args = wppaZoomableData[mocc];
|
326 |
+
|
327 |
+
if ( args.isLightbox ) { // moet nog aangepast worden
|
328 |
+
|
329 |
+
// Show image container
|
330 |
+
$("#wppa-overlay-ic").css("display", "");
|
331 |
+
|
332 |
+
// There are 4 possiblilities: all combi of 'Width is the limit or not' and 'Mode is normal or fullscreen'
|
333 |
+
var widthIsLim,
|
334 |
+
modeIsNormal = wppaOvlMode == "normal";
|
335 |
+
|
336 |
+
// First find container dimensions dependant of mode
|
337 |
+
var contWidth, contHeight;
|
338 |
+
|
339 |
+
if ( modeIsNormal ) {
|
340 |
+
contWidth = window.innerWidth ? window.innerWidth : screen.width;
|
341 |
+
contHeight = window.innerHeight ? window.innerHeight : screen.height;
|
342 |
+
}
|
343 |
+
else {
|
344 |
+
contWidth = screen.width;
|
345 |
+
contHeight = screen.height;
|
346 |
+
}
|
347 |
+
wppaConsoleLog( 'contw='+contWidth+', conth='+contHeight, 'force');
|
348 |
+
// Initialize new display sizes
|
349 |
+
var newWidth,
|
350 |
+
newHeight,
|
351 |
+
topMarg,
|
352 |
+
leftMarg,
|
353 |
+
extraX = 8,
|
354 |
+
extraY = 24 + ( args.controls ? args.icsize : 0 ) + contWidth * args.height / args.width + 40;
|
355 |
+
wppaConsoleLog( 'args.icsize='+args.icsize+', args.width='+args.width, 'force');
|
356 |
+
|
357 |
+
wppaConsoleLog( '1 extrax='+extraX+', extray='+extraY, 'force');
|
358 |
+
var ratio = args.image.width / args.image.height;
|
359 |
+
wppaConsoleLog( 'ratio='+ratio);
|
360 |
+
wppaConsoleLog( '2 extrax='+extraX+', extray='+extraY, 'force');
|
361 |
+
// Add borderwidth in case of mode == normal
|
362 |
+
if ( modeIsNormal ) {
|
363 |
+
extraX += 2 * args.borderWidth;
|
364 |
+
extraY += 2 * args.borderWidth;
|
365 |
+
}
|
366 |
+
|
367 |
+
// Find out if the width is the limitng dimension
|
368 |
+
widthIsLim = ( contHeight > ( ( contWidth / ratio ) + extraY ) );
|
369 |
+
wppaConsoleLog('widthislim='+widthIsLim, 'force');
|
370 |
+
// Compute new sizes and margins
|
371 |
+
if ( widthIsLim ) {
|
372 |
+
newWidth = contWidth - extraX;
|
373 |
+
newHeight = newWidth / 2;
|
374 |
+
topMarg = ( contHeight - newHeight - extraY ) / ratio + 20;
|
375 |
+
}
|
376 |
+
else {
|
377 |
+
newWidth = ratio * ( contHeight - ( args.controls ? args.icsize : 0 ) - 24 - 40 );
|
378 |
+
newHeight = newWidth / ratio;
|
379 |
+
topMarg = 20;
|
380 |
+
}
|
381 |
+
|
382 |
+
// Set css common for all 4 situations
|
383 |
+
$("#wppa-ovl-pan-container").css({marginTop:topMarg});
|
384 |
+
$("#wppa-overlay-ic").css({marginTop:0});
|
385 |
+
|
386 |
+
args.canvasWidth = newWidth;
|
387 |
+
args.canvasHeight = newHeight;
|
388 |
+
args.canvas.width = args.canvasWidth;
|
389 |
+
args.canvas.height = args.canvasHeight;
|
390 |
+
|
391 |
+
|
392 |
+
// Now set css for all 4 situations: Mode is normal
|
393 |
+
if ( modeIsNormal ) {
|
394 |
+
|
395 |
+
// Common for mode normal
|
396 |
+
$("#wppa-ovl-pan-container").css({
|
397 |
+
backgroundColor:"' . wppa_opt( 'ovl_theme' ) . '",
|
398 |
+
padding:"' . wppa_opt( 'ovl_border_width' ) . 'px",
|
399 |
+
borderRadius:"' . wppa_opt( 'ovl_border_radius' ) . 'px",
|
400 |
+
borderWidth:args.borderWidth,
|
401 |
+
width:newWidth,
|
402 |
+
marginLeft:0
|
403 |
+
});
|
404 |
+
|
405 |
+
$( "#wppa-pctl-div-" + args.itemid ).css({marginLeft:0});
|
406 |
+
|
407 |
+
// Limit specific
|
408 |
+
if ( widthIsLim ) {
|
409 |
+
$("#wppa-overlay-ic").css({marginLeft:4});
|
410 |
+
}
|
411 |
+
else {
|
412 |
+
$("#wppa-overlay-ic").css({marginLeft:(contWidth-newWidth)/2});
|
413 |
+
}
|
414 |
+
}
|
415 |
+
|
416 |
+
// Mode is fullscreen
|
417 |
+
else {
|
418 |
+
|
419 |
+
// Common for mode fullscreen
|
420 |
+
$("#wppa-overlay-ic").css({marginLeft:0});
|
421 |
+
$("#wppa-ovl-pan-container").css({
|
422 |
+
backgroundColor:"transparent",
|
423 |
+
padding:0,
|
424 |
+
borderRadius:0,
|
425 |
+
borderWidth:0,
|
426 |
+
width:newWidth,
|
427 |
+
marginLeft:(contWidth-newWidth)/2
|
428 |
+
});
|
429 |
+
$("#wppa-pctl-div-" + args.itemid ).css({marginLeft:0});
|
430 |
+
}
|
431 |
+
|
432 |
+
run=4;
|
433 |
+
render(mocc);
|
434 |
+
}
|
435 |
+
|
436 |
+
// Not lightbox
|
437 |
+
else {
|
438 |
+
args.canvasWidth = $(args.div).parent().width();
|
439 |
+
args.canvasHeight = args.canvasWidth * args.canvas.height / args.canvas.width;
|
440 |
+
args.canvas.width = args.canvasWidth;
|
441 |
+
args.canvas.height = args.canvasHeight;
|
442 |
+
args.run=4;
|
443 |
+
render(mocc);
|
444 |
+
}
|
445 |
+
}
|
446 |
+
}
|
447 |
+
}
|
448 |
+
|
449 |
+
// when the mouse is pressed on the canvas, we switch to manual control and save current coordinates
|
450 |
+
function onCanvasMouseDown(e){
|
451 |
+
|
452 |
+
var mocc = jQuery(this).attr('data-mocc');
|
453 |
+
if ( ! wppaZoomableData[mocc] ) return;
|
454 |
+
|
455 |
+
var args = wppaZoomableData[mocc];
|
456 |
+
|
457 |
+
e.preventDefault();
|
458 |
+
args.manualControl = true;
|
459 |
+
args.savedCanvasX = e.offsetX;
|
460 |
+
args.savedCanvasY = e.offsetY;
|
461 |
+
args.run=5;
|
462 |
+
render(mocc);
|
463 |
+
}
|
464 |
+
|
465 |
+
// When the mouse is down (manual control) and moved adjust the coorinates
|
466 |
+
function onCanvasMouseMove(e){
|
467 |
+
|
468 |
+
var mocc = jQuery(this).attr('data-mocc');
|
469 |
+
if ( ! wppaZoomableData[mocc] ) return;
|
470 |
+
var args = wppaZoomableData[mocc];
|
471 |
+
|
472 |
+
if ( args.manualControl ){
|
473 |
+
var factor = args.canvas.width / args.fromWidth;
|
474 |
+
var x = ( args.savedCanvasX - e.offsetX ) / factor + args.fromX;
|
475 |
+
var y = ( args.savedCanvasY - e.offsetY ) / factor + args.fromY;
|
476 |
+
|
477 |
+
if ( x > 0 && y > 0 && ( x + args.fromWidth ) < args.image.width && ( y + args.fromHeight ) < args.image.height ) {
|
478 |
+
args.fromX = x;
|
479 |
+
args.fromY = y;
|
480 |
+
args.savedCanvasX = e.offsetX;
|
481 |
+
args.savedCanvasY = e.offsetY;
|
482 |
+
}
|
483 |
+
}
|
484 |
+
}
|
485 |
+
|
486 |
+
// When the mouse is released, reset manual control
|
487 |
+
function onCanvasMouseUp(e){
|
488 |
+
|
489 |
+
var mocc = jQuery(this).attr('data-mocc');
|
490 |
+
if ( ! wppaZoomableData[mocc] ) return;
|
491 |
+
var args = wppaZoomableData[mocc];
|
492 |
+
|
493 |
+
if ( args.manualControl ) {
|
494 |
+
args.run=4;
|
495 |
+
args.manualControl = false;
|
496 |
+
}
|
497 |
+
}
|
498 |
+
|
499 |
+
}
|
500 |
+
|
501 |
+
wppaConsoleLog( 'wppa-zoom.js version '+wppaJsZoomVersion+' loaded.', 'force' );
|
js/wppa-zoom.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
var wppaJsZoomVersion="7.4.02";function wppaDoZoomPan(){for(var e,a=!1,o=0;o<wppaZoomableData.length;o++)void 0!==wppaZoomableData[o]&&((e=wppaZoomableData[o]).image.complete?e.initialized||((e=wppaZoomableData[o]).manualControl=!1,e.deltaX=0,e.deltaY=0,e.deltaFactor=1,e.run=4,e.busy=!1,e.abort=!1,e.itemid=e.mocc+"-"+e.id,e.div=$("#wppa-pan-div-"+e.itemid),e.canvas=document.getElementById("wppa-pan-canvas-"+e.itemid),e.left=$("#wppa-pctl-left-"+e.itemid),e.right=$("#wppa-pctl-right-"+e.itemid),e.up=$("#wppa-pctl-up-"+e.itemid),e.down=$("#wppa-pctl-down-"+e.itemid),e.zoomin=$("#wppa-pctl-zoomin-"+e.itemid),e.zoomout=$("#wppa-pctl-zoomout-"+e.itemid),e.prev=$("#wppa-pctl-prev-"+e.itemid),e.next=$("#wppa-pctl-next-"+e.itemid),e.canvasWidth=e.width,e.canvasHeight=e.height,e.savedCanvasX=0,e.savedCanvasY=0,e.fromHeight=e.image.height,e.fromWidth=e.image.width,e.fromX=0,e.fromY=0,e.centerX=e.fromX+e.fromWidth/2,e.centerY=e.fromY+e.fromHeight/2,e.ctx=null,e.isMobile?(e.right.on("touchstart",i),e.right.on("touchend",c),e.left.on("touchstart",p),e.left.on("touchend",c),e.up.on("touchstart",r),e.up.on("touchend",c),e.down.on("touchstart",m),e.down.on("touchend",c),e.zoomin.on("touchstart",d),e.zoomin.on("touchend",c),e.zoomout.on("touchstart",s),e.zoomout.on("touchend",c)):(e.canvas.addEventListener("mousedown",h),e.canvas.addEventListener("mousemove",v),e.canvas.addEventListener("mouseup",f),e.canvas.addEventListener("mouseout",f),document.getElementById("wppa-pan-canvas-"+e.itemid).addEventListener("wheel",l),e.right.on("mousedown",i),e.right.on("mouseup",c),e.left.on("mousedown",p),e.left.on("mouseup",c),e.up.on("mousedown",r),e.up.on("mouseup",c),e.down.on("mousedown",m),e.down.on("mouseup",c),e.zoomin.on("mousedown",d),e.zoomin.on("mouseup",c),e.zoomout.on("mousedown",s),e.zoomout.on("mouseup",c)),e.isLightbox&&($("#wppa-fulls-btn").on("click",function(){abort=!0}),e.prev&&(e.prev.on("click",t),e.next.on("click",n))),$(window).on("DOMContentLoaded load resize orientationchange",u),w(o),u(),e.initialized=!0):a=!0);function w(a){if((e=wppaZoomableData[a]).isLightbox&&(wppaOvlOpen||(e.abort=!0)),e.abort)return e.ctx=null,void(e.prevctx=null);var o,t;0!=e.run&&(e.busy||(e.busy=!0,e.manualControl||(e.fromX+=e.deltaX,e.fromY+=e.deltaY,o=e.fromHeight/e.deltaFactor,t=e.fromWidth/e.deltaFactor,1!=e.deltaFactor&&o<=e.image.height&&50<o&&(e.fromX-=(t-e.fromWidth)/2,e.fromY-=(o-e.fromHeight)/2,e.fromWidth=t,e.fromHeight=o)),e.fromX=Math.max(0,Math.min(e.image.width-e.fromWidth,e.fromX)),e.fromY=Math.max(0,Math.min(e.image.height-e.fromHeight,e.fromY)),e.ctx=e.canvas.getContext("2d"),e.ctx.drawImage(e.image,e.fromX,e.fromY,e.fromWidth,e.fromHeight,0,0,e.canvas.width,e.canvas.height),e.busy=!1,0<e.run&&(e.manualControl?setTimeout(function(){w(a)},25):setTimeout(function(){w(a)},5)),e.run<5&&e.run--))}function t(a){var o;a.preventDefault(),this.abort=!0,o||(o=!0,$("#wppa-overlay-ic").css({display:"none"}),$("#wppa-ovl-spin").show(),wppaOvlShowPrev())}function n(a){var o;a.preventDefault(),this.abort=!0,o||(o=!0,$("#wppa-overlay-ic").css({display:"none"}),$("#wppa-ovl-spin").show(),wppaOvlShowNext())}function i(a){var o=jQuery(this).attr("data-mocc");wppaZoomableData[o]&&(a.preventDefault(),wppaZoomableData[o].run=5,wppaZoomableData[o].deltaX=3,w(o))}function p(a){var o=jQuery(this).attr("data-mocc");wppaZoomableData[o]&&(a.preventDefault(),wppaZoomableData[o].run=5,wppaZoomableData[o].deltaX=-3,w(o))}function r(a){var o=jQuery(this).attr("data-mocc");wppaZoomableData[o]&&(a.preventDefault(),wppaZoomableData[o].run=5,wppaZoomableData[o].deltaY=-3,w(o))}function m(a){var o=jQuery(this).attr("data-mocc");wppaZoomableData[o]&&(a.preventDefault(),wppaZoomableData[o].run=5,wppaZoomableData[o].deltaY=3,w(o))}function d(a){var o=jQuery(this).attr("data-mocc");wppaZoomableData[o]&&(a.preventDefault(),wppaZoomableData[o].run=5,wppaZoomableData[o].deltaFactor=1.005,w(o))}function s(a){var o=jQuery(this).attr("data-mocc");wppaZoomableData[o]&&(a.preventDefault(),wppaZoomableData[o].run=5,wppaZoomableData[o].deltaFactor=.995,w(o))}function l(a){var o=jQuery(this).attr("data-mocc");wppaZoomableData[o]&&(a.preventDefault(),wppaZoomableData[o].run=4,wppaZoomableData[o].deltaFactor=1+a.deltaY*wppaZoomableData[o].zoomsensitivity/1e3,w(o),setTimeout(function(){wppaZoomableData[o].deltaFactor=1},25),a.stopPropagation())}function c(a){var o=jQuery(this).attr("data-mocc");wppaZoomableData[o]&&(a.preventDefault(),wppaZoomableData[o].deltaX=0,wppaZoomableData[o].deltaY=0,wppaZoomableData[o].deltaFactor=1,wppaZoomableData[o].isLightbox?wppaZoomableData[o].run--:wppaZoomableData[o].run=4)}function u(a){for(var o,t,e,n,i,p,r,m,d,s,l,c=0;c<wppaZoomableData.length;c++){wppaZoomableData[c]&&wppaZoomableData[c].canvas&&!wppaZoomableData[c].abort&&((o=wppaZoomableData[c]).isLightbox?($("#wppa-overlay-ic").css("display",""),i=(e="normal"==wppaOvlMode)?(n=window.innerWidth?window.innerWidth:screen.width,window.innerHeight?window.innerHeight:screen.height):(n=screen.width,screen.height),wppaConsoleLog("contw="+n+", conth="+i,"force"),d=8,s=24+(o.controls?o.icsize:0)+n*o.height/o.width+40,wppaConsoleLog("args.icsize="+o.icsize+", args.width="+o.width,"force"),wppaConsoleLog("1 extrax="+d+", extray="+s,"force"),l=o.image.width/o.image.height,wppaConsoleLog("ratio="+l),wppaConsoleLog("2 extrax="+d+", extray="+s,"force"),e&&(d+=2*o.borderWidth,s+=2*o.borderWidth),t=n/l+s<i,wppaConsoleLog("widthislim="+t,"force"),m=t?(i-(r=(p=n-d)/2)-s)/l+20:(r=(p=l*(i-(o.controls?o.icsize:0)-24-40))/l,20),$("#wppa-ovl-pan-container").css({marginTop:m}),$("#wppa-overlay-ic").css({marginTop:0}),o.canvasWidth=p,o.canvasHeight=r,o.canvas.width=o.canvasWidth,o.canvas.height=o.canvasHeight,e?($("#wppa-ovl-pan-container").css({backgroundColor:"' . wppa_opt( 'ovl_theme' ) . '",padding:"' . wppa_opt( 'ovl_border_width' ) . 'px",borderRadius:"' . wppa_opt( 'ovl_border_radius' ) . 'px",borderWidth:o.borderWidth,width:p,marginLeft:0}),$("#wppa-pctl-div-"+o.itemid).css({marginLeft:0}),t?$("#wppa-overlay-ic").css({marginLeft:4}):$("#wppa-overlay-ic").css({marginLeft:(n-p)/2})):($("#wppa-overlay-ic").css({marginLeft:0}),$("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:0,borderWidth:0,width:p,marginLeft:(n-p)/2}),$("#wppa-pctl-div-"+o.itemid).css({marginLeft:0})),run=4):(o.canvasWidth=$(o.div).parent().width(),o.canvasHeight=o.canvasWidth*o.canvas.height/o.canvas.width,o.canvas.width=o.canvasWidth,o.canvas.height=o.canvasHeight,o.run=4),w(c))}}function h(a){var o,t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(o=wppaZoomableData[t],a.preventDefault(),o.manualControl=!0,o.savedCanvasX=a.offsetX,o.savedCanvasY=a.offsetY,o.run=5,w(t))}function v(a){var o,t,e,n,i=jQuery(this).attr("data-mocc");!wppaZoomableData[i]||(o=wppaZoomableData[i]).manualControl&&(t=o.canvas.width/o.fromWidth,e=(o.savedCanvasX-a.offsetX)/t+o.fromX,n=(o.savedCanvasY-a.offsetY)/t+o.fromY,0<e&&0<n&&e+o.fromWidth<o.image.width&&n+o.fromHeight<o.image.height&&(o.fromX=e,o.fromY=n,o.savedCanvasX=a.offsetX,o.savedCanvasY=a.offsetY))}function f(a){var o,t=jQuery(this).attr("data-mocc");!wppaZoomableData[t]||(o=wppaZoomableData[t]).manualControl&&(o.run=4,o.manualControl=!1)}a?setTimeout(function(){wppaDoZoomPan()},100):$("#wppa-ovl-spin").hide()}"undefined"==typeof $&&($=jQuery),wppaConsoleLog("wppa-zoom.js version "+wppaJsZoomVersion+" loaded.","force");
|
js/wppa.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
//
|
3 |
// contains common vars and functions
|
4 |
//
|
5 |
-
var wppaJsVersion = '7.4.
|
6 |
|
7 |
// Language dependant vars. i18n for js does not work. Values are filled in by wppa_add_page_specific_urls_and_language() in wppa-non-admin.php
|
8 |
var wppaSlideShow;
|
@@ -254,6 +254,7 @@ var wppaOvlBorderWidth = 16;
|
|
254 |
var wppaOvlOpen = false;
|
255 |
var wppaThumbSize = 100;
|
256 |
var wppaTfMargin = 4;
|
|
|
257 |
|
258 |
// The next lightbox var values become overwritten in wppa-non-admin.php -> wppa_load_footer()
|
259 |
// Therefor they are placed here!
|
@@ -377,27 +378,27 @@ function wppaDoInit() {
|
|
377 |
jQuery(".wppa-thumb-area").each(function(){
|
378 |
if (jQuery(this).getNiceScroll) {
|
379 |
jQuery(this).getNiceScroll().resize();
|
380 |
-
wppaConsoleLog('Resize .wppa-thumb-area nice');
|
381 |
}
|
382 |
});
|
383 |
|
384 |
jQuery(".albumlist").each(function(){
|
385 |
if (jQuery(this).getNiceScroll) {
|
386 |
jQuery(this).getNiceScroll().resize();
|
387 |
-
wppaConsoleLog('Resize .albumlist nice');
|
388 |
}
|
389 |
});
|
390 |
|
391 |
jQuery(".wppa-div").each(function(){
|
392 |
if (jQuery(this).getNiceScroll) {
|
393 |
jQuery(this).getNiceScroll().resize();
|
394 |
-
wppaConsoleLog('Resize .wppa-div nice');
|
395 |
}
|
396 |
});
|
397 |
|
398 |
if (jQuery("body").getNiceScroll) {
|
399 |
jQuery("body").getNiceScroll().resize();
|
400 |
-
wppaConsoleLog('Resize body nice');
|
401 |
}
|
402 |
|
403 |
}, 2000);
|
@@ -431,7 +432,7 @@ jQuery(document).ready(function(){
|
|
431 |
jQuery(window).on( 'scroll wheel touchmove', function () {
|
432 |
clearTimeout( wppaScrollEndTimer );
|
433 |
wppaScrollEndTimer = setTimeout( function () {
|
434 |
-
wppaConsoleLog('Scroll end triggered');
|
435 |
jQuery(window).trigger('wppascrollend');
|
436 |
}, wppaScrollEndDelay );
|
437 |
});
|
@@ -455,7 +456,7 @@ function wppaSizeAutoDiv() {
|
|
455 |
function wppaDoAllAutocols(e) {
|
456 |
|
457 |
// Report where it comes from
|
458 |
-
wppaConsoleLog('Do all auto cols from '+e.type,'force');
|
459 |
|
460 |
setTimeout(function(){_wppaDoAllAutocols(-1)}, wppaExtendedResizeDelay);
|
461 |
}
|
@@ -656,10 +657,10 @@ function _wppaDoAutocol( mocc, i ) {
|
|
656 |
var h;
|
657 |
var old;
|
658 |
var exists;
|
659 |
-
wppaConsoleLog('test 1A');
|
660 |
// Container
|
661 |
w = jQuery('#wppa-container-'+mocc).width();
|
662 |
-
wppaConsoleLog('test 1B');
|
663 |
// Anything to do here?
|
664 |
var container = document.getElementById( 'wppa-container-' + mocc );
|
665 |
if ( ! container ) {
|
@@ -741,9 +742,9 @@ wppaConsoleLog('test 1B');
|
|
741 |
if ( isGrid > 0 ) {
|
742 |
|
743 |
// Set container linheight to 0
|
744 |
-
wppaConsoleLog('test 2A');
|
745 |
jQuery('#wppa-container-'+mocc).css( 'line-height', '0' );
|
746 |
-
wppaConsoleLog('test 2B');
|
747 |
|
748 |
// Calculate width
|
749 |
var nItems = parseInt( ( w / wppaMaxCoverWidth ) + 0.9999 );
|
@@ -989,9 +990,9 @@ window.onpopstate = function( event ) {
|
|
989 |
switch ( event.state.type ) {
|
990 |
case 'html':
|
991 |
// Restore wppa container content
|
992 |
-
wppaConsoleLog('test 3A');
|
993 |
jQuery( '#wppa-container-'+occ ).html( event.state.html );
|
994 |
-
wppaConsoleLog('test 3B');
|
995 |
break;
|
996 |
case 'slide':
|
997 |
// Go to specified slide without the didgoto switch to avoid a stackpush here
|
2 |
//
|
3 |
// contains common vars and functions
|
4 |
//
|
5 |
+
var wppaJsVersion = '7.4.02';
|
6 |
|
7 |
// Language dependant vars. i18n for js does not work. Values are filled in by wppa_add_page_specific_urls_and_language() in wppa-non-admin.php
|
8 |
var wppaSlideShow;
|
254 |
var wppaOvlOpen = false;
|
255 |
var wppaThumbSize = 100;
|
256 |
var wppaTfMargin = 4;
|
257 |
+
var wppaZoomableData = [];
|
258 |
|
259 |
// The next lightbox var values become overwritten in wppa-non-admin.php -> wppa_load_footer()
|
260 |
// Therefor they are placed here!
|
378 |
jQuery(".wppa-thumb-area").each(function(){
|
379 |
if (jQuery(this).getNiceScroll) {
|
380 |
jQuery(this).getNiceScroll().resize();
|
381 |
+
// wppaConsoleLog('Resize .wppa-thumb-area nice');
|
382 |
}
|
383 |
});
|
384 |
|
385 |
jQuery(".albumlist").each(function(){
|
386 |
if (jQuery(this).getNiceScroll) {
|
387 |
jQuery(this).getNiceScroll().resize();
|
388 |
+
// wppaConsoleLog('Resize .albumlist nice');
|
389 |
}
|
390 |
});
|
391 |
|
392 |
jQuery(".wppa-div").each(function(){
|
393 |
if (jQuery(this).getNiceScroll) {
|
394 |
jQuery(this).getNiceScroll().resize();
|
395 |
+
// wppaConsoleLog('Resize .wppa-div nice');
|
396 |
}
|
397 |
});
|
398 |
|
399 |
if (jQuery("body").getNiceScroll) {
|
400 |
jQuery("body").getNiceScroll().resize();
|
401 |
+
// wppaConsoleLog('Resize body nice');
|
402 |
}
|
403 |
|
404 |
}, 2000);
|
432 |
jQuery(window).on( 'scroll wheel touchmove', function () {
|
433 |
clearTimeout( wppaScrollEndTimer );
|
434 |
wppaScrollEndTimer = setTimeout( function () {
|
435 |
+
// wppaConsoleLog('Scroll end triggered');
|
436 |
jQuery(window).trigger('wppascrollend');
|
437 |
}, wppaScrollEndDelay );
|
438 |
});
|
456 |
function wppaDoAllAutocols(e) {
|
457 |
|
458 |
// Report where it comes from
|
459 |
+
// wppaConsoleLog('Do all auto cols from '+e.type,'force');
|
460 |
|
461 |
setTimeout(function(){_wppaDoAllAutocols(-1)}, wppaExtendedResizeDelay);
|
462 |
}
|
657 |
var h;
|
658 |
var old;
|
659 |
var exists;
|
660 |
+
//wppaConsoleLog('test 1A');
|
661 |
// Container
|
662 |
w = jQuery('#wppa-container-'+mocc).width();
|
663 |
+
//wppaConsoleLog('test 1B');
|
664 |
// Anything to do here?
|
665 |
var container = document.getElementById( 'wppa-container-' + mocc );
|
666 |
if ( ! container ) {
|
742 |
if ( isGrid > 0 ) {
|
743 |
|
744 |
// Set container linheight to 0
|
745 |
+
// wppaConsoleLog('test 2A');
|
746 |
jQuery('#wppa-container-'+mocc).css( 'line-height', '0' );
|
747 |
+
// wppaConsoleLog('test 2B');
|
748 |
|
749 |
// Calculate width
|
750 |
var nItems = parseInt( ( w / wppaMaxCoverWidth ) + 0.9999 );
|
990 |
switch ( event.state.type ) {
|
991 |
case 'html':
|
992 |
// Restore wppa container content
|
993 |
+
// wppaConsoleLog('test 3A');
|
994 |
jQuery( '#wppa-container-'+occ ).html( event.state.html );
|
995 |
+
// wppaConsoleLog('test 3B');
|
996 |
break;
|
997 |
case 'slide':
|
998 |
// Go to specified slide without the didgoto switch to avoid a stackpush here
|
js/wppa.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var wppaJsVersion="7.4.01",wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaStart,wppaStop,wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaProcessing,wppaDone,wppaUploadFailed,wppaServerError,wppaVersion="0",wppaIsIe=!1,wppaUseSvg=!0,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth,wppaAutoColumnWidth=wppaAutoColumnWidth||[],wppaAutoColumnFrac,wppaAutoColumnFrac=wppaAutoColumnFrac||[],wppaThumbnailAreaDelta,wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaMiniTreshold=300,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth,wppaColWidth=wppaColWidth||[],wppaMCRWidth,wppaMCRWidth=wppaMCRWidth||[],wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaGeoZoom=10,wppaLazyLoad=!0,wppaAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,wppaResponseSpeed=500,wppaExtendedResizeCount=0,wppaExtendedResizeDelay=200,wppaThumbAspect=.75,wppaFilmonlyContinuous=!1,wppaNoAnimateOnMobile=!1,wppaAjaxScroll=!0,wppaFilmInit=[],wppaResizeEndDelay=200,wppaScrollEndDelay=200,wppaArtmonkeyFileNotSource=!1,wppaRequestInfoDialogText="Please specify your question",_wppaId=[],_wppaRealId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],_wppaLastIdx=[],_wppaLazyDone=[],_wppaStopping=[],_wppaFilename=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaThumbSize=100,wppaTfMargin=4,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8,wppaResizeEndTimer,wppaScrollEndTimer;function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),wppaIsMobile&&wppaNoAnimateOnMobile&&(_wppaTextDelay=10),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("#ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaMakeLazyVisible),jQuery(".wppa-divnicewrap").on("DOMContentLoaded load resize wppascrollend wheelend orientationchange",wppaMakeLazyVisible),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaInitMasonryPlus),jQuery(window).on("resize",function(){for(var p=1;p<=wppaTopMoc;)wppaFilmInit[p]=!1,jQuery("#wppa-filmstrip-"+p).stop(),_wppaAdjustFilmstrip(p),p++}),jQuery(window).on("wpparesizeend",function(){for(var p=1;p<=wppaTopMoc;)wppaFilmInit[p]=!0,p++}),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",function(){setTimeout(function(){jQuery(".wppa-thumb-area").each(function(){jQuery(this).getNiceScroll&&(jQuery(this).getNiceScroll().resize(),wppaConsoleLog("Resize .wppa-thumb-area nice"))}),jQuery(".albumlist").each(function(){jQuery(this).getNiceScroll&&(jQuery(this).getNiceScroll().resize(),wppaConsoleLog("Resize .albumlist nice"))}),jQuery(".wppa-div").each(function(){jQuery(this).getNiceScroll&&(jQuery(this).getNiceScroll().resize(),wppaConsoleLog("Resize .wppa-div nice"))}),jQuery("body").getNiceScroll&&(jQuery("body").getNiceScroll().resize(),wppaConsoleLog("Resize body nice"))},2e3)}),jQuery(window).trigger("resize"),wppaProtect()}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var e=jQuery(window).height(),a=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:e*a})})}function wppaDoAllAutocols(p){wppaConsoleLog("Do all auto cols from "+p.type,"force"),setTimeout(function(){_wppaDoAllAutocols(-1)},wppaExtendedResizeDelay)}function _wppaDoAllAutocols(p){Date.now();p++;for(var e=1;e<=wppaAutoColumnWidth.length;)wppaAutoColumnWidth[e]&&_wppaDoAutocol(e,p),wppaMakeLazyVisible(e),e++;(p<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){_wppaDoAllAutocols(p)},wppaExtendedResizeDelay);Date.now();return!0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var e,a,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,a=0;a<3;)1==++a&&0!=p||(e=document.getElementById(t[a]))&&"function"==typeof e.pause&&e.pause()}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var e=jQuery("audio");if(0<e.length)for(var a=0;a<e.length;)"wppa"==jQuery(e[a]).attr("data-from")&&e[a].pause(),a++}}function wppaMakeFullsizeUrl(p){var e,a;p=(e=(p=p.replace("/thumbs/","/")).split("//"))[1]?(a=e[1].split("/"),e[0]+"//"):(a=e[0].split("/"),"");for(var t=0;t<a.length;){var o=a[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var e=document.getElementById("wppa-container-"+p),a=0;if(!wppaAutoColumnWidth[p])return e.clientWidth;for(;0==a;)e=e.parentNode,a=jQuery(e).width();return parseInt(a*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p,e){if(!wppaAutoColumnWidth[p])return!0;var a,t,o,r,i,n,s;if(wppaConsoleLog("test 1A"),a=jQuery("#wppa-container-"+p).width(),wppaConsoleLog("test 1B"),document.getElementById("wppa-container-"+p)){if(wppaCoverImageResponsive[p]||1<(t=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(t[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:a-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:a})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:a-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:a},wppaResponseSpeed))),1<(t=jQuery(".wppa-cover-box-mcr-"+p)).length){var w=document.getElementById("wppa-albumlist-"+p).clientWidth,l=parseInt((w+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,u=l-1,c=parseInt((w+wppaCoverSpacing)/l-wppaCoverSpacing);if(wppaColWidth[p]!=w||wppaMCRWidth[p]!=c){wppaColWidth[p]=w,wppaMCRWidth[p]=c;for(var d=0;d<t.length;){switch(d%l){case 0:jQuery(t[d]).css({marginLeft:"0px",clear:"both",float:"left"});break;case u:jQuery(t[d]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(t[d]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}d++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:c-wppaTextFrameDelta},wppaResponseSpeed),jQuery(t[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:c},wppaResponseSpeed)}}else{1==t.length&&(wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:a-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})))}0<jQuery(".wppa-album-cover-grid-"+p).length&&(wppaConsoleLog("test 2A"),jQuery("#wppa-container-"+p).css("line-height","0"),wppaConsoleLog("test 2B"),(o=parseInt(a/wppaMaxCoverWidth+.9999))<1&&(o=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/o+"%"})),!wppaThumbSpaceAuto||(r=parseInt(jQuery(".thumbnail-frame-"+p).css("width")))&&(i=a-wppaThumbnailAreaDelta-7,n=Math.max(1,parseInt(i/(r+wppaMinThumbSpace))),s=parseInt(.5+(i-n*r)/(n+1)),jQuery(".thumbnail-frame-"+p).css({marginLeft:s})),jQuery(".thumbnail-frame-comalt-"+p).css("width",a-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",a-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var y,m=1,h=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");h;)y=h*(a-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+m+"-"+p).css("height",y),m++,h=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),document.getElementById("slide_frame-"+p)&&wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",a-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*a),wppaFilmStripLength[p]=a-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",a),jQuery(".wppa-simg-"+p).css("width",a-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",a+10),jQuery(".wppa-mimg-"+p).css("width",a),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(a/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%")),jQuery(".wppa-upload-album-"+p).css("maxWidth",.6*a),wppaSetRealCalendarHeights(p),!0}}function wppaSetRealCalendarHeights(e){var a,t,p,o,r,i=jQuery("#wppa-real-calendar-"+e).width();0<i&&(a=!0,t=i*wppaThumbAspect/7,jQuery(".wppa-real-calendar-day-"+e).css({height:t}),p=i/50+2,jQuery("#wppa-real-calendar-"+e).css({fontSize:p}),o=p/4,jQuery(".wppa-real-calendar-head-td-"+e).css({marginTop:o,marginBottom:o}),r=t/2,jQuery(".wppa-realcalimg-"+e).each(function(){var p;0==this.height?a=!1:(p=jQuery(this).attr("data-day"),thisb=r-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+e).css({bottom:thisb}))}),a||setTimeout(function(){wppaSetRealCalendarHeights(e)},100))}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var e=jQuery(".wppa-mas-h-"+p),a=wppaMinThumbSpace,t=0;t<e.length;t++){var o=wppaGetChildI(e[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var r=o.naturalWidth/o.naturalHeight*o.height+a;jQuery(e[t]).css({width:r})}}}function wppaGetChildI(p){for(var e=p.childNodes,a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("resize load",function(){clearTimeout(wppaResizeEndTimer),wppaResizeEndTimer=setTimeout(function(){wppaConsoleLog("Resize end triggered"),jQuery(window).trigger("wpparesizeend")},wppaResizeEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("scroll wheel touchmove",function(){clearTimeout(wppaScrollEndTimer),wppaScrollEndTimer=setTimeout(function(){wppaConsoleLog("Scroll end triggered"),jQuery(window).trigger("wppascrollend")},wppaScrollEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeAutoDiv)}),jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var e=1;e<=wppaMaxOccur;)wppaStartHtml[e]=jQuery("#wppa-container-"+e).html(),e++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,e){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(e),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,e)):setTimeout("wppaFotomotoToolbar( "+p+',"'+e+'" )',200))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var e=["?","&","#","/",'"',"'"],a=0;a<e.length;){if(-1!=p.indexOf(e[a]))return!0;a++}return!1}function wppaPushStateSlide(p,e,a){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=a)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:e},"---",a)}catch(p){}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />").replace("[a","<a").replace(/"/g,'"').replace('"]','">').replace("[/a]","</a>").replace("[img","<img").replace("/]","/>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var e=0;if(wppaCanPushState){if(p.state)switch(e=p.state.occur,p.state.type){case"html":wppaConsoleLog("test 3A"),jQuery("#wppa-container-"+e).html(p.state.html),wppaConsoleLog("test 3B");break;case"slide":_wppaGoto(e,p.state.slide)}else if(wppaUpdateAddressLine){e=wppaFirstOccur,jQuery("#wppa-container-"+e).html(wppaStartHtml[e]),(wppaFirstOccur=0)==e&&(a=document.location.href.split("&wppa-occur="),e=parseInt(a[1]));var a=document.location.href.split("&wppa-photo="),t=parseInt(a[1]);if(0<t){for(var o=0;o<_wppaId[e].length&&_wppaId[e][o]!=t;)o++;o<_wppaId[e].length&&_wppaGoto(e,o)}}document.getElementById("theslide0-"+e)&&_wppaStop(e)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy?wppaConsoleLog("Fb Init busy"):"undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):(wppaConsoleLog("Fb wait"),setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,e){var a,t;document.selection?(p.focus(),sel=document.selection.createRange(),sel.text=e):p.selectionStart||"0"==p.selectionStart?(a=p.selectionStart,t=p.selectionEnd,p.value=p.value.substring(0,a)+e+p.value.substring(t,p.value.length),p.selectionStart=a+e.length,p.selectionEnd=a+e.length):p.value+=e}function wppaGeoInit(p,e,a){var t=new google.maps.LatLng(e,a),o={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:t},r=new google.maps.Map(document.getElementById("map-canvas-"+p),o),i=new google.maps.Marker({position:t,map:r,title:""});google.maps.event.addListener(r,"center_changed",function(){window.setTimeout(function(){r.panTo(i.getPosition())},1e3)})}function wppaEncode(p){if(void 0!==p){for(var e=(t=(t=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,t="";a<e.length;)t+=e[a],++a<e.length&&(t+="||PLUS||");return t}}function wppaUrlToId(p){var e=p.split("/wppa/");return 1==e.length&&(e=p.split("/upload/")),1==e.length?0:e=(e=(e=(e=(e=(e=(e=e[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,e){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var a,t=jQuery("#wppa-ss-pa-"+p).val(),o="",r="",i="";switch(t){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),o=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var n=jQuery(".wppa-ss-albumcat-"+p),i="";for(s=0;s<n.length;s++)"selected"==jQuery(n[s]).attr("selected")&&(i+="."+jQuery(n[s]).val());""!=(i=i.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(i=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");n=jQuery(".wppa-ss-albumtext-"+p);for(i="",s=0;s<n.length;s++)"selected"==jQuery(n[s]).attr("selected")&&(i+="."+jQuery(n[s]).val());""!=(i=i.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),o=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(i=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(i=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");n=jQuery(".wppa-ss-phototag-"+p);for(i="",s=0;s<n.length;s++)"selected"==jQuery(n[s]).attr("selected")&&(i+="."+jQuery(n[s]).val());""!=(i=i.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var s,n=jQuery(".wppa-ss-phototext-"+p);for(i="",s=0;s<n.length;s++)"selected"==jQuery(n[s]).attr("selected")&&(i+="."+jQuery(n[s]).val());""!=(i=i.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(r=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<r.length&&(r=r.replace("#","H")),""!=r&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=r?(wppaAjaxGetSsIptcList(p,r,"wppa-ss-iptcopts-"+p),wppaLastIptc=r):null!=(i=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=i&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(r=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<r.length&&(r=r.replace("#","H")),""!=r&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=r?(wppaAjaxGetSsExifList(p,r,"wppa-ss-exifopts-"+p),wppaLastExif=r):null!=(i=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=i&&jQuery("#wppa-ss-button-"+p).css("display","")))}}e&&(-1==(a=jQuery("#wppa-ss-pageurl-"+p).val()).indexOf("?")?a+="?":a+="&",a+="occur=1&wppa-supersearch="+t+","+o+","+r+","+i,document.location.href=a)}function wppaAjaxGetSsIptcList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaAjaxGetSsExifList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,e){var a=jQuery(p).length;6<a&&(a=6),a<2&&(a=2),jQuery(e).attr("size",a)}function wppaUpdateSearchRoot(p,e){for(var a=jQuery(".wppa-search-root"),t=0;t<a.length;)jQuery(a[t]).html(p),t++;for(a=jQuery(".wppa-rootbox"),t=0;t<a.length;)e?(jQuery(a[t]).prop("checked",!1),jQuery(a[t]).prop("disabled",!1)):(jQuery(a[t]).prop("checked",!0),jQuery(a[t]).prop("disabled",!0)),t++;for(a=jQuery(".wppa-search-root-id"),t=0;t<a.length;)jQuery(a[t]).val(e),t++}function wppaSubboxChange(p){jQuery(p).prop("checked")&&jQuery(".wppa-rootbox").each(function(p){jQuery(this).prop("checked",!0)})}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),e=0;e<p.length;)jQuery(p[e]).html(""),e++;for(p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).attr("disabled","disabled"),e++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).removeAttr("disabled"),e++}function wppaDisplaySelectedFiles(p){for(var e=jQuery("#"+p),a=0,t="";a<e[0].files.length;)t+=e[0].files[a].name+" ",a++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return null==p||(void 0===p||(""==p||(0==p||(0==p||void 0))))}function wppaGetUploadOptions(yalb,mocc,where,onComplete){var options={beforeSend:function(){jQuery("#progress-"+yalb+"-"+mocc).show(),jQuery("#bar-"+yalb+"-"+mocc).width("0%"),jQuery("#message-"+yalb+"-"+mocc).html(""),jQuery("#percent-"+yalb+"-"+mocc).html("")},uploadProgress:function(p,e,a,t){jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#7F7"),jQuery("#bar-"+yalb+"-"+mocc).width(t+"%"),t<95?jQuery("#percent-"+yalb+"-"+mocc).html(t+"%"):jQuery("#percent-"+yalb+"-"+mocc).html(wppaProcessing)},success:function(){jQuery("#bar-"+yalb+"-"+mocc).width("100%"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaDone),jQuery(".wppa-upload-button").val(wppaUploadButtonText)},complete:function(response){-1!=response.responseText.indexOf(wppaUploadFailed)?(jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed),jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>")):(jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>"),"thumb"!=where&&"cover"!=where||eval(onComplete))},error:function(){jQuery("#message-"+yalb+"-"+mocc).html('<span style="color: red;" >'+wppaServerError+"</span>"),jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed)}};return options}function wppaInitMasonryPlus(p){for(var e,a,t,o,r=0<parseInt(p)?e=p:(e=1,wppaTopMoc),i=e;i<=r;){document.getElementById("grid-"+i)&&(o=(a=jQuery("#wppa-container-"+i).width()-wppaThumbnailAreaDelta)/(t=parseInt((a+wppaTfMargin)/(.75*wppaThumbSize+wppaTfMargin)))-wppaTfMargin,wppaConsoleLog("Doing init masonry plus for mocc="+i+", w="+a+", colWidth="+o+", count="+t,"force"),jQuery(".grid-item").css("visibility","visible"),jQuery(".grid-item-"+i).css("width",o+"px"),jQuery("#grid-"+i).masonry({itemSelector:".grid-item-"+i,columnWidth:o,gutter:wppaTfMargin,fitWidth:!0})),i++}}wppaConsoleLog("wppa.js version "+wppaJsVersion+" loaded.","force");
|
1 |
+
var wppaJsVersion="7.4.02",wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaStart,wppaStop,wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaProcessing,wppaDone,wppaUploadFailed,wppaServerError,wppaVersion="0",wppaIsIe=!1,wppaUseSvg=!0,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth,wppaAutoColumnWidth=wppaAutoColumnWidth||[],wppaAutoColumnFrac,wppaAutoColumnFrac=wppaAutoColumnFrac||[],wppaThumbnailAreaDelta,wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaMiniTreshold=300,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth,wppaColWidth=wppaColWidth||[],wppaMCRWidth,wppaMCRWidth=wppaMCRWidth||[],wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaGeoZoom=10,wppaLazyLoad=!0,wppaAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,wppaResponseSpeed=500,wppaExtendedResizeCount=0,wppaExtendedResizeDelay=200,wppaThumbAspect=.75,wppaFilmonlyContinuous=!1,wppaNoAnimateOnMobile=!1,wppaAjaxScroll=!0,wppaFilmInit=[],wppaResizeEndDelay=200,wppaScrollEndDelay=200,wppaArtmonkeyFileNotSource=!1,wppaRequestInfoDialogText="Please specify your question",_wppaId=[],_wppaRealId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],_wppaLastIdx=[],_wppaLazyDone=[],_wppaStopping=[],_wppaFilename=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaThumbSize=100,wppaTfMargin=4,wppaZoomableData=[],wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8,wppaResizeEndTimer,wppaScrollEndTimer;function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),wppaIsMobile&&wppaNoAnimateOnMobile&&(_wppaTextDelay=10),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("#ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaMakeLazyVisible),jQuery(".wppa-divnicewrap").on("DOMContentLoaded load resize wppascrollend wheelend orientationchange",wppaMakeLazyVisible),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaInitMasonryPlus),jQuery(window).on("resize",function(){for(var p=1;p<=wppaTopMoc;)wppaFilmInit[p]=!1,jQuery("#wppa-filmstrip-"+p).stop(),_wppaAdjustFilmstrip(p),p++}),jQuery(window).on("wpparesizeend",function(){for(var p=1;p<=wppaTopMoc;)wppaFilmInit[p]=!0,p++}),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",function(){setTimeout(function(){jQuery(".wppa-thumb-area").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery(".albumlist").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery(".wppa-div").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery("body").getNiceScroll&&jQuery("body").getNiceScroll().resize()},2e3)}),jQuery(window).trigger("resize"),wppaProtect()}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var e=jQuery(window).height(),a=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:e*a})})}function wppaDoAllAutocols(p){setTimeout(function(){_wppaDoAllAutocols(-1)},wppaExtendedResizeDelay)}function _wppaDoAllAutocols(p){Date.now();p++;for(var e=1;e<=wppaAutoColumnWidth.length;)wppaAutoColumnWidth[e]&&_wppaDoAutocol(e,p),wppaMakeLazyVisible(e),e++;(p<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){_wppaDoAllAutocols(p)},wppaExtendedResizeDelay);Date.now();return!0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var e,a,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,a=0;a<3;)1==++a&&0!=p||(e=document.getElementById(t[a]))&&"function"==typeof e.pause&&e.pause()}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var e=jQuery("audio");if(0<e.length)for(var a=0;a<e.length;)"wppa"==jQuery(e[a]).attr("data-from")&&e[a].pause(),a++}}function wppaMakeFullsizeUrl(p){var e,a;p=(e=(p=p.replace("/thumbs/","/")).split("//"))[1]?(a=e[1].split("/"),e[0]+"//"):(a=e[0].split("/"),"");for(var t=0;t<a.length;){var o=a[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var e=document.getElementById("wppa-container-"+p),a=0;if(!wppaAutoColumnWidth[p])return e.clientWidth;for(;0==a;)e=e.parentNode,a=jQuery(e).width();return parseInt(a*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p,e){if(!wppaAutoColumnWidth[p])return!0;var a,t,o,r,i,n,s=jQuery("#wppa-container-"+p).width();if(document.getElementById("wppa-container-"+p)){if(wppaCoverImageResponsive[p]||1<(a=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(a[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:s-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:s})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:s-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:s},wppaResponseSpeed))),1<(a=jQuery(".wppa-cover-box-mcr-"+p)).length){var w=document.getElementById("wppa-albumlist-"+p).clientWidth,l=parseInt((w+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,u=l-1,c=parseInt((w+wppaCoverSpacing)/l-wppaCoverSpacing);if(wppaColWidth[p]!=w||wppaMCRWidth[p]!=c){wppaColWidth[p]=w,wppaMCRWidth[p]=c;for(var d=0;d<a.length;){switch(d%l){case 0:jQuery(a[d]).css({marginLeft:"0px",clear:"both",float:"left"});break;case u:jQuery(a[d]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(a[d]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}d++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:c-wppaTextFrameDelta},wppaResponseSpeed),jQuery(a[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:c},wppaResponseSpeed)}}else{1==a.length&&(wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:s-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})))}0<jQuery(".wppa-album-cover-grid-"+p).length&&(jQuery("#wppa-container-"+p).css("line-height","0"),(t=parseInt(s/wppaMaxCoverWidth+.9999))<1&&(t=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/t+"%"})),!wppaThumbSpaceAuto||(o=parseInt(jQuery(".thumbnail-frame-"+p).css("width")))&&(r=s-wppaThumbnailAreaDelta-7,i=Math.max(1,parseInt(r/(o+wppaMinThumbSpace))),n=parseInt(.5+(r-i*o)/(i+1)),jQuery(".thumbnail-frame-"+p).css({marginLeft:n})),jQuery(".thumbnail-frame-comalt-"+p).css("width",s-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",s-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var y,m=1,h=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");h;)y=h*(s-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+m+"-"+p).css("height",y),m++,h=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),document.getElementById("slide_frame-"+p)&&wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",s-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*s),wppaFilmStripLength[p]=s-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",s),jQuery(".wppa-simg-"+p).css("width",s-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",s+10),jQuery(".wppa-mimg-"+p).css("width",s),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(s/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%")),jQuery(".wppa-upload-album-"+p).css("maxWidth",.6*s),wppaSetRealCalendarHeights(p),!0}}function wppaSetRealCalendarHeights(e){var a,t,p,o,r,i=jQuery("#wppa-real-calendar-"+e).width();0<i&&(a=!0,t=i*wppaThumbAspect/7,jQuery(".wppa-real-calendar-day-"+e).css({height:t}),p=i/50+2,jQuery("#wppa-real-calendar-"+e).css({fontSize:p}),o=p/4,jQuery(".wppa-real-calendar-head-td-"+e).css({marginTop:o,marginBottom:o}),r=t/2,jQuery(".wppa-realcalimg-"+e).each(function(){var p;0==this.height?a=!1:(p=jQuery(this).attr("data-day"),thisb=r-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+e).css({bottom:thisb}))}),a||setTimeout(function(){wppaSetRealCalendarHeights(e)},100))}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var e=jQuery(".wppa-mas-h-"+p),a=wppaMinThumbSpace,t=0;t<e.length;t++){var o=wppaGetChildI(e[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var r=o.naturalWidth/o.naturalHeight*o.height+a;jQuery(e[t]).css({width:r})}}}function wppaGetChildI(p){for(var e=p.childNodes,a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("resize load",function(){clearTimeout(wppaResizeEndTimer),wppaResizeEndTimer=setTimeout(function(){wppaConsoleLog("Resize end triggered"),jQuery(window).trigger("wpparesizeend")},wppaResizeEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("scroll wheel touchmove",function(){clearTimeout(wppaScrollEndTimer),wppaScrollEndTimer=setTimeout(function(){jQuery(window).trigger("wppascrollend")},wppaScrollEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeAutoDiv)}),jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var e=1;e<=wppaMaxOccur;)wppaStartHtml[e]=jQuery("#wppa-container-"+e).html(),e++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,e){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(e),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,e)):setTimeout("wppaFotomotoToolbar( "+p+',"'+e+'" )',200))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var e=["?","&","#","/",'"',"'"],a=0;a<e.length;){if(-1!=p.indexOf(e[a]))return!0;a++}return!1}function wppaPushStateSlide(p,e,a){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=a)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:e},"---",a)}catch(p){}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />").replace("[a","<a").replace(/"/g,'"').replace('"]','">').replace("[/a]","</a>").replace("[img","<img").replace("/]","/>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var e=0;if(wppaCanPushState){if(p.state)switch(e=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+e).html(p.state.html);break;case"slide":_wppaGoto(e,p.state.slide)}else if(wppaUpdateAddressLine){e=wppaFirstOccur,jQuery("#wppa-container-"+e).html(wppaStartHtml[e]),(wppaFirstOccur=0)==e&&(a=document.location.href.split("&wppa-occur="),e=parseInt(a[1]));var a=document.location.href.split("&wppa-photo="),t=parseInt(a[1]);if(0<t){for(var o=0;o<_wppaId[e].length&&_wppaId[e][o]!=t;)o++;o<_wppaId[e].length&&_wppaGoto(e,o)}}document.getElementById("theslide0-"+e)&&_wppaStop(e)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy?wppaConsoleLog("Fb Init busy"):"undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):(wppaConsoleLog("Fb wait"),setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,e){var a,t;document.selection?(p.focus(),sel=document.selection.createRange(),sel.text=e):p.selectionStart||"0"==p.selectionStart?(a=p.selectionStart,t=p.selectionEnd,p.value=p.value.substring(0,a)+e+p.value.substring(t,p.value.length),p.selectionStart=a+e.length,p.selectionEnd=a+e.length):p.value+=e}function wppaGeoInit(p,e,a){var t=new google.maps.LatLng(e,a),o={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:t},r=new google.maps.Map(document.getElementById("map-canvas-"+p),o),i=new google.maps.Marker({position:t,map:r,title:""});google.maps.event.addListener(r,"center_changed",function(){window.setTimeout(function(){r.panTo(i.getPosition())},1e3)})}function wppaEncode(p){if(void 0!==p){for(var e=(t=(t=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,t="";a<e.length;)t+=e[a],++a<e.length&&(t+="||PLUS||");return t}}function wppaUrlToId(p){var e=p.split("/wppa/");return 1==e.length&&(e=p.split("/upload/")),1==e.length?0:e=(e=(e=(e=(e=(e=(e=e[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,e){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var a,t=jQuery("#wppa-ss-pa-"+p).val(),o="",r="",i="";switch(t){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),o=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var n=jQuery(".wppa-ss-albumcat-"+p),i="";for(s=0;s<n.length;s++)"selected"==jQuery(n[s]).attr("selected")&&(i+="."+jQuery(n[s]).val());""!=(i=i.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(i=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");n=jQuery(".wppa-ss-albumtext-"+p);for(i="",s=0;s<n.length;s++)"selected"==jQuery(n[s]).attr("selected")&&(i+="."+jQuery(n[s]).val());""!=(i=i.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),o=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(i=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(i=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");n=jQuery(".wppa-ss-phototag-"+p);for(i="",s=0;s<n.length;s++)"selected"==jQuery(n[s]).attr("selected")&&(i+="."+jQuery(n[s]).val());""!=(i=i.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var s,n=jQuery(".wppa-ss-phototext-"+p);for(i="",s=0;s<n.length;s++)"selected"==jQuery(n[s]).attr("selected")&&(i+="."+jQuery(n[s]).val());""!=(i=i.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(r=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<r.length&&(r=r.replace("#","H")),""!=r&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=r?(wppaAjaxGetSsIptcList(p,r,"wppa-ss-iptcopts-"+p),wppaLastIptc=r):null!=(i=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=i&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(r=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<r.length&&(r=r.replace("#","H")),""!=r&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=r?(wppaAjaxGetSsExifList(p,r,"wppa-ss-exifopts-"+p),wppaLastExif=r):null!=(i=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=i&&jQuery("#wppa-ss-button-"+p).css("display","")))}}e&&(-1==(a=jQuery("#wppa-ss-pageurl-"+p).val()).indexOf("?")?a+="?":a+="&",a+="occur=1&wppa-supersearch="+t+","+o+","+r+","+i,document.location.href=a)}function wppaAjaxGetSsIptcList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaAjaxGetSsExifList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,e){var a=jQuery(p).length;6<a&&(a=6),a<2&&(a=2),jQuery(e).attr("size",a)}function wppaUpdateSearchRoot(p,e){for(var a=jQuery(".wppa-search-root"),t=0;t<a.length;)jQuery(a[t]).html(p),t++;for(a=jQuery(".wppa-rootbox"),t=0;t<a.length;)e?(jQuery(a[t]).prop("checked",!1),jQuery(a[t]).prop("disabled",!1)):(jQuery(a[t]).prop("checked",!0),jQuery(a[t]).prop("disabled",!0)),t++;for(a=jQuery(".wppa-search-root-id"),t=0;t<a.length;)jQuery(a[t]).val(e),t++}function wppaSubboxChange(p){jQuery(p).prop("checked")&&jQuery(".wppa-rootbox").each(function(p){jQuery(this).prop("checked",!0)})}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),e=0;e<p.length;)jQuery(p[e]).html(""),e++;for(p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).attr("disabled","disabled"),e++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).removeAttr("disabled"),e++}function wppaDisplaySelectedFiles(p){for(var e=jQuery("#"+p),a=0,t="";a<e[0].files.length;)t+=e[0].files[a].name+" ",a++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return null==p||(void 0===p||(""==p||(0==p||(0==p||void 0))))}function wppaGetUploadOptions(yalb,mocc,where,onComplete){var options={beforeSend:function(){jQuery("#progress-"+yalb+"-"+mocc).show(),jQuery("#bar-"+yalb+"-"+mocc).width("0%"),jQuery("#message-"+yalb+"-"+mocc).html(""),jQuery("#percent-"+yalb+"-"+mocc).html("")},uploadProgress:function(p,e,a,t){jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#7F7"),jQuery("#bar-"+yalb+"-"+mocc).width(t+"%"),t<95?jQuery("#percent-"+yalb+"-"+mocc).html(t+"%"):jQuery("#percent-"+yalb+"-"+mocc).html(wppaProcessing)},success:function(){jQuery("#bar-"+yalb+"-"+mocc).width("100%"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaDone),jQuery(".wppa-upload-button").val(wppaUploadButtonText)},complete:function(response){-1!=response.responseText.indexOf(wppaUploadFailed)?(jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed),jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>")):(jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>"),"thumb"!=where&&"cover"!=where||eval(onComplete))},error:function(){jQuery("#message-"+yalb+"-"+mocc).html('<span style="color: red;" >'+wppaServerError+"</span>"),jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed)}};return options}function wppaInitMasonryPlus(p){for(var e,a,t,o,r=0<parseInt(p)?e=p:(e=1,wppaTopMoc),i=e;i<=r;){document.getElementById("grid-"+i)&&(o=(a=jQuery("#wppa-container-"+i).width()-wppaThumbnailAreaDelta)/(t=parseInt((a+wppaTfMargin)/(.75*wppaThumbSize+wppaTfMargin)))-wppaTfMargin,wppaConsoleLog("Doing init masonry plus for mocc="+i+", w="+a+", colWidth="+o+", count="+t,"force"),jQuery(".grid-item").css("visibility","visible"),jQuery(".grid-item-"+i).css("width",o+"px"),jQuery("#grid-"+i).masonry({itemSelector:".grid-item-"+i,columnWidth:o,gutter:wppaTfMargin,fitWidth:!0})),i++}}wppaConsoleLog("wppa.js version "+wppaJsVersion+" loaded.","force");
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: opajaap
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source¤cy_code=USD&lc=US
|
4 |
Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
|
5 |
-
Version: 7.4.02.
|
6 |
Stable tag: 7.4.01.005
|
7 |
Author: J.N. Breetvelt
|
8 |
Author URI: http://www.opajaap.nl/
|
2 |
Contributors: opajaap
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source¤cy_code=USD&lc=US
|
4 |
Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
|
5 |
+
Version: 7.4.02.003
|
6 |
Stable tag: 7.4.01.005
|
7 |
Author: J.N. Breetvelt
|
8 |
Author URI: http://www.opajaap.nl/
|
wppa-ajax.php
CHANGED
@@ -539,7 +539,7 @@ wppa_log('obs', 'POST args are: '.wppa_compress_html(var_export(array_keys($_POS
|
|
539 |
|
540 |
if ( $iret ) {
|
541 |
if ( wppa_switch( 'search_comments' ) ) {
|
542 |
-
wppa_update_photo( $
|
543 |
}
|
544 |
echo 'OK';
|
545 |
}
|
539 |
|
540 |
if ( $iret ) {
|
541 |
if ( wppa_switch( 'search_comments' ) ) {
|
542 |
+
wppa_update_photo( $pid );
|
543 |
}
|
544 |
echo 'OK';
|
545 |
}
|
wppa-boxes-html.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various wppa boxes
|
6 |
-
* Version 7.4.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -3067,7 +3067,7 @@ static $albums_granted;
|
|
3067 |
|
3068 |
// Predefined desc ?
|
3069 |
elseif ( wppa_switch( 'apply_newphoto_desc_user' ) ) {
|
3070 |
-
|
3071 |
$result .=
|
3072 |
'<input' .
|
3073 |
' id="wppa-name-user-' . $mocc . '-' . $seqno . '"' .
|
@@ -3075,6 +3075,7 @@ static $albums_granted;
|
|
3075 |
' value="' . esc_attr( wppa_opt( 'newphoto_description' ) ) . '"' .
|
3076 |
' name="wppa-user-desc"' .
|
3077 |
' />';
|
|
|
3078 |
}
|
3079 |
|
3080 |
// Custom fields
|
@@ -6234,7 +6235,7 @@ function wppa_get_responsive_widget_js_html( $mocc ) {
|
|
6234 |
wppaAutoColumnFrac['.$mocc.'] = 1.0;
|
6235 |
if ( ! wppaColWidth ) var wppaColWidth = [];
|
6236 |
wppaColWidth['.$mocc.'] = 0;
|
6237 |
-
wppaTopMoc = Math.max(wppaTopMoc,'.$mocc.');
|
6238 |
</script>';
|
6239 |
|
6240 |
return $result;
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various wppa boxes
|
6 |
+
* Version 7.4.02
|
7 |
*
|
8 |
*/
|
9 |
|
3067 |
|
3068 |
// Predefined desc ?
|
3069 |
elseif ( wppa_switch( 'apply_newphoto_desc_user' ) ) {
|
3070 |
+
/*
|
3071 |
$result .=
|
3072 |
'<input' .
|
3073 |
' id="wppa-name-user-' . $mocc . '-' . $seqno . '"' .
|
3075 |
' value="' . esc_attr( wppa_opt( 'newphoto_description' ) ) . '"' .
|
3076 |
' name="wppa-user-desc"' .
|
3077 |
' />';
|
3078 |
+
*/
|
3079 |
}
|
3080 |
|
3081 |
// Custom fields
|
6235 |
wppaAutoColumnFrac['.$mocc.'] = 1.0;
|
6236 |
if ( ! wppaColWidth ) var wppaColWidth = [];
|
6237 |
wppaColWidth['.$mocc.'] = 0;
|
6238 |
+
if ( typeof( wppaTopMoc ) == "number" ) wppaTopMoc = Math.max(wppaTopMoc,'.$mocc.');
|
6239 |
</script>';
|
6240 |
|
6241 |
return $result;
|
wppa-defaults.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains default settings
|
6 |
-
* Version 7.4.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -564,6 +564,7 @@ horizrailenabled:false,";
|
|
564 |
'wppa_request_info' => 'no',
|
565 |
'wppa_request_info_text' => __('Please specify your question', 'wp-photo-album-plus'),
|
566 |
'wppa_album_use_gallery' => 'no',
|
|
|
567 |
|
568 |
// B Full size and Slideshow
|
569 |
'wppa_fullvalign' => 'center',
|
@@ -1030,6 +1031,7 @@ horizrailenabled:false,";
|
|
1030 |
'wppa_log_email' => 'no',
|
1031 |
'wppa_log_tim' => 'no',
|
1032 |
'wppa_moderate_bulk' => 'no', // B20
|
|
|
1033 |
'wppa_retry_mails' => '0', // A10
|
1034 |
'wppa_minimum_tags' => '', // A11
|
1035 |
'wppa_predef_tags_only' => 'no',
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains default settings
|
6 |
+
* Version 7.4.02
|
7 |
*
|
8 |
*/
|
9 |
|
564 |
'wppa_request_info' => 'no',
|
565 |
'wppa_request_info_text' => __('Please specify your question', 'wp-photo-album-plus'),
|
566 |
'wppa_album_use_gallery' => 'no',
|
567 |
+
'wppa_zoom_on' => 'no',
|
568 |
|
569 |
// B Full size and Slideshow
|
570 |
'wppa_fullvalign' => 'center',
|
1031 |
'wppa_log_email' => 'no',
|
1032 |
'wppa_log_tim' => 'no',
|
1033 |
'wppa_moderate_bulk' => 'no', // B20
|
1034 |
+
'wppa_generator_max' => '100', // B21
|
1035 |
'wppa_retry_mails' => '0', // A10
|
1036 |
'wppa_minimum_tags' => '', // A11
|
1037 |
'wppa_predef_tags_only' => 'no',
|
wppa-gutenberg-wppa.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-gutenberg-wppa.php
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
-
* Version 7.
|
6 |
*/
|
7 |
|
8 |
function wppa_gutenberg_wppa_block() {
|
@@ -53,7 +53,8 @@ global $wpdb;
|
|
53 |
}
|
54 |
|
55 |
// Prepare photoinfo
|
56 |
-
$photos = $wpdb->get_results( "SELECT id, name, album, ext FROM $wpdb->wppa_photos
|
|
|
57 |
|
58 |
// Get Tags/cats
|
59 |
$tags = wppa_get_taglist();
|
@@ -475,7 +476,7 @@ global $wpdb;
|
|
475 |
'<br />'.
|
476 |
'<small style="display:none;" class="wppagallery-photo" >'.
|
477 |
__('Specify the photo to be used', 'wp-photo-album-plus').'<br />'.
|
478 |
-
__('You can select from a maximum of
|
479 |
'</small>'.
|
480 |
'</td>'.
|
481 |
'</tr>'.
|
2 |
/* wppa-gutenberg-wppa.php
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
+
* Version 7.4.02
|
6 |
*/
|
7 |
|
8 |
function wppa_gutenberg_wppa_block() {
|
53 |
}
|
54 |
|
55 |
// Prepare photoinfo
|
56 |
+
$photos = $wpdb->get_results( $wpdb->prepare( "SELECT id, name, album, ext FROM $wpdb->wppa_photos
|
57 |
+
ORDER BY timestamp DESC LIMIT %d", wppa_opt( 'generator_max' ) ), ARRAY_A );
|
58 |
|
59 |
// Get Tags/cats
|
60 |
$tags = wppa_get_taglist();
|
476 |
'<br />'.
|
477 |
'<small style="display:none;" class="wppagallery-photo" >'.
|
478 |
__('Specify the photo to be used', 'wp-photo-album-plus').'<br />'.
|
479 |
+
sprintf( __('You can select from a maximum of %d most recently added photos', 'wp-photo-album-plus'), wppa_opt( 'generator_max' )).'<br />'.
|
480 |
'</small>'.
|
481 |
'</td>'.
|
482 |
'</tr>'.
|
wppa-mailing.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* Contains mailing functions
|
6 |
*
|
7 |
-
* Version 7.4.
|
8 |
*
|
9 |
*/
|
10 |
|
@@ -687,7 +687,7 @@ global $wpdb;
|
|
687 |
|
688 |
// If the comment is already approved by a vote when comment needs vote is on, we're done
|
689 |
if ( $comment['status'] == 'approved' ) {
|
690 |
-
wppa_log( 'eml', '
|
691 |
wppa_exit();
|
692 |
}
|
693 |
|
@@ -974,29 +974,128 @@ function wppa_send_mail( $args ) {
|
|
974 |
'</html>';
|
975 |
|
976 |
$subject = '['.str_replace(''', '', get_bloginfo('name') ).'] '.$subj;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
977 |
|
978 |
// Try to send it with extra headers and with html
|
979 |
$iret = wp_mail( $to,
|
980 |
$subject,
|
981 |
-
$
|
982 |
$headers,
|
983 |
'' );
|
984 |
if ( $iret ) {
|
985 |
wppa_log( 'eml', 'Mail send to: ' . $to . ' (' . $id . ') subject: ' . $subject . ', photo: ' . ( $photo ? ( is_array( $photo ) ? serialize( $photo ) : $photo ) : 'not supplied.' ) );
|
|
|
986 |
return;
|
987 |
}
|
988 |
|
989 |
-
wppa_log( 'Err', 'Mail sending failed. to=' . $to . ', subject=' . $subject . ', message=' . $
|
990 |
|
991 |
// Failed
|
992 |
if ( ! wppa_is_cron() ) {
|
993 |
echo 'Mail sending Failed';
|
994 |
wppa_process_failed_mail( $to,
|
995 |
$subject,
|
996 |
-
$
|
997 |
$headers,
|
998 |
'' );
|
999 |
}
|
|
|
|
|
|
|
|
|
1000 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1001 |
}
|
1002 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
*
|
5 |
* Contains mailing functions
|
6 |
*
|
7 |
+
* Version 7.4.02
|
8 |
*
|
9 |
*/
|
10 |
|
687 |
|
688 |
// If the comment is already approved by a vote when comment needs vote is on, we're done
|
689 |
if ( $comment['status'] == 'approved' ) {
|
690 |
+
wppa_log( 'eml', 'Comment approved by voting. Mailing moderte comment aborted' );
|
691 |
wppa_exit();
|
692 |
}
|
693 |
|
974 |
'</html>';
|
975 |
|
976 |
$subject = '['.str_replace(''', '', get_bloginfo('name') ).'] '.$subj;
|
977 |
+
$message = $message_part_1 . $message_part_2 . $message_part_3;
|
978 |
+
$message_for_hash = $message_part_1 . $message_part_2;
|
979 |
+
|
980 |
+
// If this mail has already been sent, skip and report
|
981 |
+
if ( wppa_has_mail_been_sent( $to, $subject, $message_for_hash, $headers ) ) {
|
982 |
+
wppa_log( 'eml', 'Sending duplicate mail skipped to: ' . $to . ' (' . $id . ') subject: ' . $subject );
|
983 |
+
return;
|
984 |
+
}
|
985 |
|
986 |
// Try to send it with extra headers and with html
|
987 |
$iret = wp_mail( $to,
|
988 |
$subject,
|
989 |
+
$message,
|
990 |
$headers,
|
991 |
'' );
|
992 |
if ( $iret ) {
|
993 |
wppa_log( 'eml', 'Mail send to: ' . $to . ' (' . $id . ') subject: ' . $subject . ', photo: ' . ( $photo ? ( is_array( $photo ) ? serialize( $photo ) : $photo ) : 'not supplied.' ) );
|
994 |
+
wppa_process_success_mail( $to, $subject, $message_for_hash, $headers );
|
995 |
return;
|
996 |
}
|
997 |
|
998 |
+
wppa_log( 'Err', 'Mail sending failed. to=' . $to . ', subject=' . $subject . ', message=' . $message );
|
999 |
|
1000 |
// Failed
|
1001 |
if ( ! wppa_is_cron() ) {
|
1002 |
echo 'Mail sending Failed';
|
1003 |
wppa_process_failed_mail( $to,
|
1004 |
$subject,
|
1005 |
+
$message,
|
1006 |
$headers,
|
1007 |
'' );
|
1008 |
}
|
1009 |
+
}
|
1010 |
+
|
1011 |
+
// Compute mail id
|
1012 |
+
function wppa_get_mail_hash( $to = '', $subject = '', $message = '', $headers = '', $att = '' ) {
|
1013 |
|
1014 |
+
return md5( ( is_array( $to ) ? implode( '|', $to ) : $to ) . $subject . $message );
|
1015 |
+
}
|
1016 |
+
|
1017 |
+
// Has mail been sent already?
|
1018 |
+
function wppa_has_mail_been_sent( $to = '', $subject = '', $message = '', $headers = '', $att = '' ) {
|
1019 |
+
|
1020 |
+
$hash = wppa_get_mail_hash( $to, $subject, $message, $headers, $att );
|
1021 |
+
$sent_mails = get_option( 'wppa_sent_mails' );
|
1022 |
+
if ( $sent_mails ) {
|
1023 |
+
$sent_mails = explode( ',', $sent_mails );
|
1024 |
+
}
|
1025 |
+
else {
|
1026 |
+
$sent_mails = array();
|
1027 |
+
}
|
1028 |
+
if ( in_array( $hash, $sent_mails ) ) {
|
1029 |
+
return true;
|
1030 |
+
}
|
1031 |
+
return false;
|
1032 |
+
}
|
1033 |
+
|
1034 |
+
// Register mail has been sent
|
1035 |
+
function wppa_process_success_mail( $to = '', $subject = '', $message = '', $headers = '', $att = '' ) {
|
1036 |
+
|
1037 |
+
$hash = wppa_get_mail_hash( $to, $subject, $message, $headers, $att );
|
1038 |
+
$sent_mails = get_option( 'wppa_sent_mails' );
|
1039 |
+
if ( $sent_mails ) {
|
1040 |
+
$sent_mails = explode( ',', $sent_mails );
|
1041 |
+
}
|
1042 |
+
else {
|
1043 |
+
$sent_mails = array();
|
1044 |
+
}
|
1045 |
+
if ( count( $sent_mails ) > 100 ) {
|
1046 |
+
unset( $sent_mails[0] );
|
1047 |
+
unset( $sent_mails[1] );
|
1048 |
+
}
|
1049 |
+
$sent_mails[] = $hash;
|
1050 |
+
$sent_mails = implode( ',', $sent_mails );
|
1051 |
+
update_option( 'wppa_sent_mails', $sent_mails );
|
1052 |
}
|
1053 |
|
1054 |
+
// Save failed mail data to retry later
|
1055 |
+
function wppa_process_failed_mail( $to = '', $subject = '', $message = '', $headers = '', $att = '' ) {
|
1056 |
+
|
1057 |
+
// Ignore mails that lack essential data
|
1058 |
+
if ( ! $to || ! $subject || ! $message ) {
|
1059 |
+
return;
|
1060 |
+
}
|
1061 |
+
|
1062 |
+
// Log mail failed
|
1063 |
+
wppa_log( 'Err', 'Failed mail. To = ' . ( is_array( $to ) ? implode( '|', $to ) : $to ) . ', Subject = ' . $subject . ', Message = ' . $message );
|
1064 |
+
|
1065 |
+
// Compute mail id
|
1066 |
+
$id = wppa_get_mail_hash( $to, $subject, $message, $headers, $att );
|
1067 |
+
|
1068 |
+
// Get stack of failed mails
|
1069 |
+
$failed_mails = wppa_get_option( 'wppa_failed_mails' );
|
1070 |
+
|
1071 |
+
// If no failed mails yet, create array
|
1072 |
+
if ( ! is_array( $failed_mails ) ) {
|
1073 |
+
$failed_mails = array();
|
1074 |
+
}
|
1075 |
+
|
1076 |
+
// See if this mail appears in the failed mails list
|
1077 |
+
$found = false;
|
1078 |
+
foreach( array_keys( $failed_mails ) as $key ) {
|
1079 |
+
if ( $id == $key ) {
|
1080 |
+
$found = true;
|
1081 |
+
}
|
1082 |
+
}
|
1083 |
+
|
1084 |
+
// Found? do nothing
|
1085 |
+
if ( $found ) {
|
1086 |
+
return;
|
1087 |
+
}
|
1088 |
+
|
1089 |
+
// Not found, add it
|
1090 |
+
$failed_mails[$id] = array( 'to' => $to,
|
1091 |
+
'subj' => $subject,
|
1092 |
+
'message' => $message,
|
1093 |
+
'headers' => $headers,
|
1094 |
+
'att' => $att,
|
1095 |
+
'retry' => wppa_opt( 'retry_mails' ),
|
1096 |
+
);
|
1097 |
+
|
1098 |
+
// Store list
|
1099 |
+
update_option( 'wppa_failed_mails', $failed_mails );
|
1100 |
+
|
1101 |
+
}
|
wppa-non-admin.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the non admin stuff
|
6 |
-
* Version 7.4.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -278,6 +278,7 @@ global $wppa_opt;
|
|
278 |
'wppa-popup',
|
279 |
'wppa-touch',
|
280 |
'wppa-utils',
|
|
|
281 |
);
|
282 |
|
283 |
$js_dept1 = array( 'jquery', 'jquery-form', 'wppa-utils' );
|
@@ -292,6 +293,7 @@ global $wppa_opt;
|
|
292 |
array( 'jquery' ),
|
293 |
array( 'jquery' ),
|
294 |
array( 'jquery' ),
|
|
|
295 |
);
|
296 |
|
297 |
$js_doits = array ( true,
|
@@ -301,6 +303,7 @@ global $wppa_opt;
|
|
301 |
true,
|
302 |
wppa_switch( 'slide_swipe' ) || $any_lightbox,
|
303 |
true,
|
|
|
304 |
);
|
305 |
|
306 |
$js_footer = array ( $footer,
|
@@ -310,6 +313,7 @@ global $wppa_opt;
|
|
310 |
$footer,
|
311 |
$footer,
|
312 |
$footer,
|
|
|
313 |
);
|
314 |
|
315 |
foreach ( array_keys( $js_files ) as $idx ) {
|
@@ -421,205 +425,211 @@ global $wpdb;
|
|
421 |
global $wppa_session;
|
422 |
|
423 |
// If no wppa on the page, quit
|
424 |
-
if ( ! wppa( 'mocc' ) && ! wppa_switch( 'lightbox_global' ) ) {
|
425 |
return;
|
426 |
}
|
427 |
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
'
|
444 |
-
|
445 |
-
'
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
'
|
465 |
-
|
466 |
-
'
|
467 |
-
'
|
468 |
-
'
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
|
|
|
|
|
|
477 |
|
478 |
-
|
479 |
-
|
480 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
481 |
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
'jQuery(\'#wppa-exit-btn\').on(\'touchend\',function(){jQuery(\'#wppa-exit-btn\').stop().fadeTo(300,' . $dark . ');});' .
|
515 |
-
'</script>' );
|
516 |
-
|
517 |
-
// The 'fullscreen' icon
|
518 |
-
echo
|
519 |
-
'<div' .
|
520 |
-
' id="wppa-fulls-btn"' .
|
521 |
-
' style="height:' . wppa_opt( 'ovl_fsx_btn_size' ) . 'px;z-index:100098;position:fixed;top:0;right:' . wppa_opt( 'ovl_fsx_btn_size' ) . 'px;opacity:0.75;display:none;"' .
|
522 |
-
' onclick="wppaOvlFull()"' .
|
523 |
-
' onmouseover="jQuery(this).stop().fadeTo(300,1);"' .
|
524 |
-
' onmouseout="jQuery(this).stop().fadeTo(300,' . $dark . ');"' .
|
525 |
-
' >' .
|
526 |
-
wppa_get_svghtml( 'Full-Screen', wppa_opt( 'ovl_fsx_btn_size' ) . 'px', true, true, '0', '0', '0', '0' ) .
|
527 |
-
'</div>' .
|
528 |
-
wppa_js(
|
529 |
-
'<script type="text/javascript" >' .
|
530 |
-
'jQuery(\'#wppa-fulls-btn\').on(\'touchstart\',function(){jQuery(\'#wppa-fulls-btn\').stop().fadeTo(300,1);});' .
|
531 |
-
'jQuery(\'#wppa-fulls-btn\').on(\'touchend\',function(){jQuery(\'#wppa-fulls-btn\').stop().fadeTo(300,' . $dark . ');});' .
|
532 |
-
'</script>' );
|
533 |
-
|
534 |
-
// The Spinner image
|
535 |
-
echo wppa_get_spinner_svg_html( array( 'id' => 'wppa-ovl-spin',
|
536 |
-
'position' => 'fixed',
|
537 |
-
'lightbox' => true,
|
538 |
-
) );
|
539 |
-
|
540 |
-
// The init vars
|
541 |
-
$data = '
|
542 |
-
<script type="text/javascript" >
|
543 |
-
|
544 |
-
/* START Lightbox vars */
|
545 |
-
jQuery("#wppa-overlay-bg").css({height:window.innerHeight});
|
546 |
-
wppaOvlModeInitial = "'.( wppa( 'is_mobile' ) ? wppa_opt( 'ovl_mode_initial_mob' ) : wppa_opt( 'ovl_mode_initial' ) ).'";
|
547 |
-
wppaOvlTxtHeight = "'.$ovlh.'";
|
548 |
-
wppaOvlOpacity = '.(wppa_opt( 'ovl_opacity' )/100).';
|
549 |
-
wppaOvlOnclickType = "'.wppa_opt( 'ovl_onclick' ).'";
|
550 |
-
wppaOvlTheme = "'.wppa_opt( 'ovl_theme' ).'";
|
551 |
-
wppaOvlAnimSpeed = '.wppa_opt( 'ovl_anim' ).';
|
552 |
-
wppaOvlSlideSpeed = '.wppa_opt( 'ovl_slide' ).';
|
553 |
-
wppaVer4WindowWidth = 800;
|
554 |
-
wppaVer4WindowHeight = 600;
|
555 |
-
wppaOvlShowCounter = '.( wppa_switch( 'ovl_show_counter') ? 'true' : 'false' ).';
|
556 |
-
'.( wppa_opt( 'fontfamily_lightbox' ) ? 'wppaOvlFontFamily = "'.wppa_opt( 'fontfamily_lightbox' ).'"' : '').'
|
557 |
-
wppaOvlFontSize = "'.$fontsize_lightbox.'";
|
558 |
-
'.( wppa_opt( 'fontcolor_lightbox' ) ? 'wppaOvlFontColor = "'.wppa_opt( 'fontcolor_lightbox' ).'"' : '').'
|
559 |
-
'.( wppa_opt( 'fontweight_lightbox' ) ? 'wppaOvlFontWeight = "'.wppa_opt( 'fontweight_lightbox' ).'"' : '').'
|
560 |
-
'.( wppa_opt( 'fontsize_lightbox' ) ? 'wppaOvlLineHeight = "'.(wppa_opt( 'fontsize_lightbox' ) + '2').'"' : '').'
|
561 |
-
wppaOvlFullLegenda = "'.__('Keys: f = next mode; q,x = exit; p = previous, n = next, s = start/stop, d = dismiss this notice.', 'wp-photo-album-plus').'";
|
562 |
-
wppaOvlFullLegendaSingle = "'.__('Keys: f = next mode; q,x = exit; d = dismiss this notice.', 'wp-photo-album-plus').'";
|
563 |
-
wppaOvlFullLegendaPanorama = "'.__('Keys: q,x = exit; p = previous, n = next, s = start/stop, d = dismiss this notice.', 'wp-photo-album-plus').'";
|
564 |
-
wppaOvlFullLegendaSinglePanorama = "'.__('Keys: q,x = exit; d = dismiss this notice.', 'wp-photo-album-plus').'";
|
565 |
-
wppaOvlVideoStart = '.( wppa_switch( 'ovl_video_start' ) ? 'true' : 'false' ).';
|
566 |
-
wppaOvlAudioStart = '.( wppa_switch( 'ovl_audio_start' ) ? 'true' : 'false' ).';
|
567 |
-
wppaOvlShowLegenda = '.( wppa_switch( 'ovl_show_legenda' ) && ! wppa( 'is_mobile' ) ? 'true' : 'false' ).';
|
568 |
-
wppaOvlShowStartStop = '.( wppa_switch( 'ovl_show_startstop' ) ? 'true' : 'false' ).';
|
569 |
-
wppaToggleFullScreen = "'. __( 'Toggle fullscreen', 'wp-photo-album-plus' ) . '";
|
570 |
-
wppaIsMobile = '.( wppa_is_mobile() ? 'true' : 'false' ).';
|
571 |
-
wppaOvlFsExitBtnSize = "'.wppa_opt( 'ovl_fsx_btn_size' ).'";
|
572 |
-
wppaOvlIconSize = "'.wppa_opt( 'nav_icon_size_lightbox' ).'px";
|
573 |
-
wppaOvlBrowseOnClick = '.( wppa_switch( 'ovl_browse_on_click' ) ? 'true' : 'false' ).';
|
574 |
-
/* END Lightbox vars */
|
575 |
-
</script>
|
576 |
';
|
577 |
-
|
578 |
-
|
579 |
|
580 |
-
|
581 |
-
|
582 |
<script type="text/javascript" >
|
583 |
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
|
|
589 |
}
|
590 |
-
|
591 |
-
|
592 |
-
/* END Vieuwcounts */
|
593 |
</script>';
|
594 |
-
|
595 |
|
596 |
-
|
597 |
-
|
598 |
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
|
|
|
|
605 |
}
|
606 |
-
wppa_dbg_msg('End Active Plugins');
|
607 |
-
}
|
608 |
|
609 |
-
|
610 |
<!-- Nonce for various wppa actions -->';
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
|
615 |
-
|
616 |
<!-- Do user upload -->';
|
617 |
-
|
618 |
-
|
619 |
|
620 |
-
|
621 |
-
|
622 |
<!-- Done user upload -->';
|
|
|
623 |
|
624 |
// Window nicescroller
|
625 |
if ( wppa_switch( 'nicescroll_window' ) ) {
|
@@ -1012,8 +1022,8 @@ wppaTfMargin = ' . wppa_opt( 'tn_margin' ) . ';
|
|
1012 |
wppaArtmonkeyFileNotSource = ' . ( wppa_opt( 'art_monkey_link' ) == 'file' &&
|
1013 |
wppa_opt( 'art_monkey_display' ) == 'text' &&
|
1014 |
! wppa_switch( 'artmonkey_use_source' ) ? 'true' : 'false' ) . '
|
1015 |
-
wppaRequestInfoDialogText = "' . wppa_opt( 'request_info_text' ) . '";
|
1016 |
-
|
1017 |
|
1018 |
// Thumbnail aspect (for real calendar)
|
1019 |
$aspect = 1;
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the non admin stuff
|
6 |
+
* Version 7.4.02
|
7 |
*
|
8 |
*/
|
9 |
|
278 |
'wppa-popup',
|
279 |
'wppa-touch',
|
280 |
'wppa-utils',
|
281 |
+
'wppa-zoom',
|
282 |
);
|
283 |
|
284 |
$js_dept1 = array( 'jquery', 'jquery-form', 'wppa-utils' );
|
293 |
array( 'jquery' ),
|
294 |
array( 'jquery' ),
|
295 |
array( 'jquery' ),
|
296 |
+
array( 'jquery' ),
|
297 |
);
|
298 |
|
299 |
$js_doits = array ( true,
|
303 |
true,
|
304 |
wppa_switch( 'slide_swipe' ) || $any_lightbox,
|
305 |
true,
|
306 |
+
wppa_switch( 'zoom_on' ),
|
307 |
);
|
308 |
|
309 |
$js_footer = array ( $footer,
|
313 |
$footer,
|
314 |
$footer,
|
315 |
$footer,
|
316 |
+
$footer,
|
317 |
);
|
318 |
|
319 |
foreach ( array_keys( $js_files ) as $idx ) {
|
425 |
global $wppa_session;
|
426 |
|
427 |
// If no wppa on the page, quit
|
428 |
+
if ( ! wppa( 'mocc' ) && ! wppa_switch( 'lightbox_global' ) && ! wppa_switch( 'nicescroll_window' ) ) {
|
429 |
return;
|
430 |
}
|
431 |
|
432 |
+
if ( wppa( 'mocc' ) || wppa_switch( 'lightbox_global' ) ) {
|
433 |
+
echo '
|
434 |
+
<!-- start WPPA+ Footer data -->
|
435 |
+
';
|
436 |
+
|
437 |
+
// Do they use our lightbox?
|
438 |
+
if ( wppa_opt( 'lightbox_name' ) == 'wppa' ) {
|
439 |
+
$fontsize_lightbox = wppa_opt( 'fontsize_lightbox' ) ? wppa_opt( 'fontsize_lightbox' ) : '10';
|
440 |
+
$d = wppa_switch( 'ovl_show_counter') ? 1 : 0;
|
441 |
+
$ovlh = wppa_opt( 'ovl_txt_lines' ) == 'auto' ? 'auto' : ((wppa_opt( 'ovl_txt_lines' ) + $d) * ($fontsize_lightbox + 2));
|
442 |
+
$txtcol = wppa_opt( 'ovl_theme' ) == 'black' ? '#a7a7a7' : '#272727';
|
443 |
+
$dark = wppa( 'is_mobile' ) ? '0.1' : '0.1';
|
444 |
+
|
445 |
+
// The lightbox overlay background
|
446 |
+
echo
|
447 |
+
'<div' .
|
448 |
+
' id="wppa-overlay-bg"' .
|
449 |
+
' style="' .
|
450 |
+
'text-align:center;' .
|
451 |
+
'display:none;' .
|
452 |
+
'position:fixed;' .
|
453 |
+
'top:0;' .
|
454 |
+
'left:0;' .
|
455 |
+
'z-index:100000;' .
|
456 |
+
'width:100%;' .
|
457 |
+
'height:2048px;' .
|
458 |
+
'background-color:'.wppa_opt( 'ovl_bgcolor' ).';' .
|
459 |
+
'"' .
|
460 |
+
' onclick="wppaOvlOnclick(event)"' .
|
461 |
+
' onwheel="return false;"' .
|
462 |
+
' onscroll="return false;"' .
|
463 |
+
' >';
|
464 |
+
|
465 |
+
// Display legenda
|
466 |
+
if ( wppa_switch( 'ovl_show_legenda' ) && ! wppa( 'is_mobile' ) ) {
|
467 |
+
echo
|
468 |
+
'<div' .
|
469 |
+
' id="wppa-ovl-legenda-1"' .
|
470 |
+
' onmouseover="jQuery(this).css(\'visibility\',\'visible\');"' .
|
471 |
+
' onmouseout="jQuery(this).css(\'visibility\',\'hidden\');"' .
|
472 |
+
' style="' .
|
473 |
+
'position:absolute;' .
|
474 |
+
'left:0;' .
|
475 |
+
'top:0;' .
|
476 |
+
'background-color:'.wppa_opt( 'ovl_theme' ).';' .
|
477 |
+
'color:'.$txtcol.';' .
|
478 |
+
'visibility:visible;' .
|
479 |
+
'"' .
|
480 |
+
' >
|
481 |
+
'.__( 'Press f for fullscreen.' , 'wp-photo-album-plus').'
|
482 |
+
</div>';
|
483 |
+
}
|
484 |
|
485 |
+
// Close lightbox overlay background
|
486 |
+
echo
|
487 |
+
'</div>';
|
488 |
+
|
489 |
+
// The Lightbox Image container
|
490 |
+
echo
|
491 |
+
'<div'.
|
492 |
+
' id="wppa-overlay-ic"'.
|
493 |
+
' style="' .
|
494 |
+
'position:fixed;' .
|
495 |
+
'top:50%;' .
|
496 |
+
'left:50%;' .
|
497 |
+
'z-index:100005;' .
|
498 |
+
'opacity:1;' .
|
499 |
+
'box-shadow:none;' .
|
500 |
+
'box-sizing:content-box;' .
|
501 |
+
'text-align:center;' . // for panorama
|
502 |
+
'background-color:transparent;' .
|
503 |
+
'"' .
|
504 |
+
' onwheel="return false;"' .
|
505 |
+
' onscroll="return false;"' .
|
506 |
+
' >' .
|
507 |
+
'</div>';
|
508 |
+
|
509 |
+
// The 'exit' icon
|
510 |
+
echo
|
511 |
+
'<div' .
|
512 |
+
' id="wppa-exit-btn"' .
|
513 |
+
' style="height:' . wppa_opt( 'ovl_fsx_btn_size' ) . 'px;z-index:100098;position:fixed;top:0;right:0;opacity:0.75;display:none;"' .
|
514 |
+
' onclick="wppaOvlHide()"' .
|
515 |
+
' onmouseover="if(wppaOvlOpen){jQuery(this).stop().fadeTo(300,1);}else{jQuery(this).stop().fadeOut(300);}"' .
|
516 |
+
' onmouseout="if(wppaOvlOpen){jQuery(this).stop().fadeTo(300,' . $dark . ');}else{jQuery(this).stop().fadeOut(300);}"' .
|
517 |
+
' >' .
|
518 |
+
wppa_get_svghtml( 'Exit', wppa_opt( 'ovl_fsx_btn_size' ) . 'px', true, true, '0', '0', '0', '0' ) .
|
519 |
+
'</div>' .
|
520 |
+
wppa_js(
|
521 |
+
'<script type="text/javascript" >' .
|
522 |
+
'jQuery(\'#wppa-exit-btn\').on(\'touchstart\',function(){jQuery(\'#wppa-exit-btn\').stop().fadeTo(300,1);});' .
|
523 |
+
'jQuery(\'#wppa-exit-btn\').on(\'touchend\',function(){jQuery(\'#wppa-exit-btn\').stop().fadeTo(300,' . $dark . ');});' .
|
524 |
+
'</script>' );
|
525 |
+
|
526 |
+
// The 'fullscreen' icon
|
527 |
+
echo
|
528 |
+
'<div' .
|
529 |
+
' id="wppa-fulls-btn"' .
|
530 |
+
' style="height:' . wppa_opt( 'ovl_fsx_btn_size' ) . 'px;z-index:100098;position:fixed;top:0;right:' . wppa_opt( 'ovl_fsx_btn_size' ) . 'px;opacity:0.75;display:none;"' .
|
531 |
+
' onclick="wppaOvlFull()"' .
|
532 |
+
' onmouseover="jQuery(this).stop().fadeTo(300,1);"' .
|
533 |
+
' onmouseout="jQuery(this).stop().fadeTo(300,' . $dark . ');"' .
|
534 |
+
' >' .
|
535 |
+
wppa_get_svghtml( 'Full-Screen', wppa_opt( 'ovl_fsx_btn_size' ) . 'px', true, true, '0', '0', '0', '0' ) .
|
536 |
+
'</div>' .
|
537 |
+
wppa_js(
|
538 |
+
'<script type="text/javascript" >' .
|
539 |
+
'jQuery(\'#wppa-fulls-btn\').on(\'touchstart\',function(){jQuery(\'#wppa-fulls-btn\').stop().fadeTo(300,1);});' .
|
540 |
+
'jQuery(\'#wppa-fulls-btn\').on(\'touchend\',function(){jQuery(\'#wppa-fulls-btn\').stop().fadeTo(300,' . $dark . ');});' .
|
541 |
+
'</script>' );
|
542 |
+
|
543 |
+
// The Spinner image
|
544 |
+
echo wppa_get_spinner_svg_html( array( 'id' => 'wppa-ovl-spin',
|
545 |
+
'position' => 'fixed',
|
546 |
+
'lightbox' => true,
|
547 |
+
) );
|
548 |
+
|
549 |
+
// The init vars
|
550 |
+
$data = '
|
551 |
+
<script type="text/javascript" >
|
552 |
|
553 |
+
/* START Lightbox vars */
|
554 |
+
jQuery("#wppa-overlay-bg").css({height:window.innerHeight});
|
555 |
+
wppaOvlModeInitial = "'.( wppa( 'is_mobile' ) ? wppa_opt( 'ovl_mode_initial_mob' ) : wppa_opt( 'ovl_mode_initial' ) ).'";
|
556 |
+
wppaOvlTxtHeight = "'.$ovlh.'";
|
557 |
+
wppaOvlOpacity = '.(wppa_opt( 'ovl_opacity' )/100).';
|
558 |
+
wppaOvlOnclickType = "'.wppa_opt( 'ovl_onclick' ).'";
|
559 |
+
wppaOvlTheme = "'.wppa_opt( 'ovl_theme' ).'";
|
560 |
+
wppaOvlAnimSpeed = '.wppa_opt( 'ovl_anim' ).';
|
561 |
+
wppaOvlSlideSpeed = '.wppa_opt( 'ovl_slide' ).';
|
562 |
+
wppaVer4WindowWidth = 800;
|
563 |
+
wppaVer4WindowHeight = 600;
|
564 |
+
wppaOvlShowCounter = '.( wppa_switch( 'ovl_show_counter') ? 'true' : 'false' ).';
|
565 |
+
'.( wppa_opt( 'fontfamily_lightbox' ) ? 'wppaOvlFontFamily = "'.wppa_opt( 'fontfamily_lightbox' ).'"' : '').'
|
566 |
+
wppaOvlFontSize = "'.$fontsize_lightbox.'";
|
567 |
+
'.( wppa_opt( 'fontcolor_lightbox' ) ? 'wppaOvlFontColor = "'.wppa_opt( 'fontcolor_lightbox' ).'"' : '').'
|
568 |
+
'.( wppa_opt( 'fontweight_lightbox' ) ? 'wppaOvlFontWeight = "'.wppa_opt( 'fontweight_lightbox' ).'"' : '').'
|
569 |
+
'.( wppa_opt( 'fontsize_lightbox' ) ? 'wppaOvlLineHeight = "'.(wppa_opt( 'fontsize_lightbox' ) + '2').'"' : '').'
|
570 |
+
wppaOvlFullLegenda = "'.__('Keys: f = next mode; q,x = exit; p = previous, n = next, s = start/stop, d = dismiss this notice.', 'wp-photo-album-plus').'";
|
571 |
+
wppaOvlFullLegendaSingle = "'.__('Keys: f = next mode; q,x = exit; d = dismiss this notice.', 'wp-photo-album-plus').'";
|
572 |
+
wppaOvlFullLegendaPanorama = "'.__('Keys: q,x = exit; p = previous, n = next, s = start/stop, d = dismiss this notice.', 'wp-photo-album-plus').'";
|
573 |
+
wppaOvlFullLegendaSinglePanorama = "'.__('Keys: q,x = exit; d = dismiss this notice.', 'wp-photo-album-plus').'";
|
574 |
+
wppaOvlVideoStart = '.( wppa_switch( 'ovl_video_start' ) ? 'true' : 'false' ).';
|
575 |
+
wppaOvlAudioStart = '.( wppa_switch( 'ovl_audio_start' ) ? 'true' : 'false' ).';
|
576 |
+
wppaOvlShowLegenda = '.( wppa_switch( 'ovl_show_legenda' ) && ! wppa( 'is_mobile' ) ? 'true' : 'false' ).';
|
577 |
+
wppaOvlShowStartStop = '.( wppa_switch( 'ovl_show_startstop' ) ? 'true' : 'false' ).';
|
578 |
+
wppaToggleFullScreen = "'. __( 'Toggle fullscreen', 'wp-photo-album-plus' ) . '";
|
579 |
+
wppaIsMobile = '.( wppa_is_mobile() ? 'true' : 'false' ).';
|
580 |
+
wppaOvlFsExitBtnSize = "'.wppa_opt( 'ovl_fsx_btn_size' ).'";
|
581 |
+
wppaOvlIconSize = "'.wppa_opt( 'nav_icon_size_lightbox' ).'px";
|
582 |
+
wppaOvlBrowseOnClick = '.( wppa_switch( 'ovl_browse_on_click' ) ? 'true' : 'false' ).';
|
583 |
+
/* END Lightbox vars */
|
584 |
+
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
585 |
';
|
586 |
+
echo wppa_js( $data );
|
587 |
+
}
|
588 |
|
589 |
+
// The photo views cache
|
590 |
+
$data = '
|
591 |
<script type="text/javascript" >
|
592 |
|
593 |
+
/* START Viewcounts */';
|
594 |
+
if ( isset( $wppa_session['photo'] ) ) {
|
595 |
+
foreach ( array_keys( $wppa_session['photo'] ) as $p ) {
|
596 |
+
$data .= '
|
597 |
+
wppaPhotoView[' . $p . '] = true;';
|
598 |
+
}
|
599 |
}
|
600 |
+
$data .= '
|
601 |
+
/* END Vieuwcounts */
|
|
|
602 |
</script>';
|
603 |
+
echo wppa_js( $data );
|
604 |
|
605 |
+
// Debugging, show queries
|
606 |
+
wppa_dbg_cachecounts('print');
|
607 |
|
608 |
+
// Debugging, show active plugins
|
609 |
+
if ( wppa( 'debug' ) ) {
|
610 |
+
$plugins = wppa_get_option('active_plugins');
|
611 |
+
wppa_dbg_msg('Active Plugins');
|
612 |
+
foreach ( $plugins as $plugin ) {
|
613 |
+
wppa_dbg_msg($plugin);
|
614 |
+
}
|
615 |
+
wppa_dbg_msg('End Active Plugins');
|
616 |
}
|
|
|
|
|
617 |
|
618 |
+
echo '
|
619 |
<!-- Nonce for various wppa actions -->';
|
620 |
+
// Nonce field for Ajax bump view counter from lightbox, and rating
|
621 |
+
wp_nonce_field( 'wppa-check', 'wppa-nonce', false, true );
|
622 |
+
wp_nonce_field( 'wppa-qr-nonce', 'wppa-qr-nonce', false, true );
|
623 |
|
624 |
+
echo '
|
625 |
<!-- Do user upload -->';
|
626 |
+
// Do the upload if required and not yet done
|
627 |
+
wppa_user_upload();
|
628 |
|
629 |
+
// Done
|
630 |
+
echo '
|
631 |
<!-- Done user upload -->';
|
632 |
+
}
|
633 |
|
634 |
// Window nicescroller
|
635 |
if ( wppa_switch( 'nicescroll_window' ) ) {
|
1022 |
wppaArtmonkeyFileNotSource = ' . ( wppa_opt( 'art_monkey_link' ) == 'file' &&
|
1023 |
wppa_opt( 'art_monkey_display' ) == 'text' &&
|
1024 |
! wppa_switch( 'artmonkey_use_source' ) ? 'true' : 'false' ) . '
|
1025 |
+
wppaRequestInfoDialogText = "' . wppa_opt( 'request_info_text' ) . '";
|
1026 |
+
wppaZoomOn = ' . ( wppa_switch( 'zoom_on' ) ? 'true' : 'false' ) . ';';
|
1027 |
|
1028 |
// Thumbnail aspect (for real calendar)
|
1029 |
$aspect = 1;
|
wppa-picture.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Make the picture html
|
6 |
-
* Version 7.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -85,7 +85,19 @@ function wppa_get_picture_html( $args ) {
|
|
85 |
// Get other data
|
86 |
$link = wppa_get_imglnk_a( $type, $id );
|
87 |
$isthumb = strpos( $type, 'thumb' ) !== false;
|
88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
|
90 |
if ( $args['width'] && $args['height'] ) {
|
91 |
$href = $isthumb ? wppa_get_thumb_url( $id, true, '', $args['width'], $args['height'] ) :
|
@@ -94,7 +106,7 @@ function wppa_get_picture_html( $args ) {
|
|
94 |
else {
|
95 |
$href = $isthumb ? wppa_get_thumb_url( $id ) : wppa_get_photo_url( $id );
|
96 |
}
|
97 |
-
if ( $is_pdf ) {
|
98 |
$href = wppa_get_hires_url( $id );
|
99 |
}
|
100 |
|
@@ -185,7 +197,7 @@ function wppa_get_picture_html( $args ) {
|
|
185 |
wppa_get_lb_panorama_full_html( $id ) .
|
186 |
( $link['target'] ? ' target="' . $link['target'] . '"' : '' ) .
|
187 |
' class="thumb-img"' .
|
188 |
-
' id="a-' . $id . '-' .
|
189 |
' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
|
190 |
' style="cursor:' . wppa_wait() . ';"' .
|
191 |
' onclick="return false;"' .
|
@@ -202,7 +214,7 @@ function wppa_get_picture_html( $args ) {
|
|
202 |
) .
|
203 |
' title="' . $link['title'] . '"' .
|
204 |
' class="thumb-img"' .
|
205 |
-
' id="a-' . $id . '-' .
|
206 |
' style="cursor:pointer;"' .
|
207 |
' >';
|
208 |
}
|
@@ -234,7 +246,7 @@ function wppa_get_picture_html( $args ) {
|
|
234 |
elseif ( $is_pdf ) {
|
235 |
$result .= '
|
236 |
<iframe
|
237 |
-
id="pdf-' . $id . '-' .
|
238 |
src="' . $href . '" ' .
|
239 |
wppa_get_imgalt( $id ) .
|
240 |
( $class ? ' class="' . $class . '" ' : '' ) .
|
@@ -246,15 +258,33 @@ function wppa_get_picture_html( $args ) {
|
|
246 |
|
247 |
// No video, just a photo
|
248 |
else {
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
(
|
255 |
-
|
256 |
-
|
257 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
}
|
259 |
|
260 |
// Close the link
|
@@ -347,19 +377,25 @@ function wppa_get_panorama_html( $args ) {
|
|
347 |
$args['autorunspeed'] = wppa_opt( 'panorama_autorun_speed' );
|
348 |
$args['zoomsensitivity'] = wppa_opt( 'panorama_wheel_sensitivity' );
|
349 |
|
350 |
-
|
|
|
|
|
351 |
|
352 |
-
|
353 |
-
|
354 |
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
|
|
|
|
|
|
|
|
363 |
}
|
364 |
|
365 |
return $result;
|
@@ -915,19 +951,19 @@ function wppa_get_flat_pan_html( $args ) {
|
|
915 |
|
916 |
// Init
|
917 |
$defaults = array( 'id' => '0',
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
|
930 |
-
$args
|
931 |
|
932 |
$id = strval( intval ( $args['id'] ) );
|
933 |
$mocc = $args['mocc'] ? $args['mocc'] : wppa( 'mocc' );
|
@@ -944,589 +980,744 @@ function wppa_get_flat_pan_html( $args ) {
|
|
944 |
$zoomsensitivity = $args['zoomsensitivity'];
|
945 |
|
946 |
switch ( $autorun ) {
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
}
|
956 |
|
957 |
$url = esc_url( wppa_is_mobile() ? wppa_get_photo_url( $id ) : wppa_get_hires_url( $id ) );
|
958 |
|
959 |
$result =
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
// The overall container
|
964 |
-
( $lightbox ? '<div id="wppa-ovl-pan-container" >' : '' ) .
|
965 |
-
|
966 |
-
// The canvas container
|
967 |
-
'<div
|
968 |
-
id="wppa-pan-div-' . $mocc . '"
|
969 |
-
class="wppa-pan-div wppa-pan-div-' . $mocc . '"
|
970 |
-
style="' . ( $controls ? 'margin-bottom:4px;' : '' ) . 'line-height:0;"
|
971 |
-
>' .
|
972 |
-
|
973 |
-
// The actual drawing area
|
974 |
-
'<canvas
|
975 |
-
id="wppa-pan-canvas-' . $mocc . '"
|
976 |
-
style="background-color:black;' . ( $manual ? 'cursor:grab;' : '' ) . '"
|
977 |
-
width="' . $width . '"
|
978 |
-
height="' . ( $width / 2 ) . '"
|
979 |
-
></canvas>' .
|
980 |
-
|
981 |
-
// The preview image
|
982 |
-
'<canvas
|
983 |
-
id="wppa-pan-prev-canvas-' . $mocc . '"
|
984 |
-
style="margin-top:4px;background-color:black;"
|
985 |
-
width="' . $width . '"
|
986 |
-
height=' . $height . '"
|
987 |
-
></canvas>
|
988 |
-
|
989 |
-
</div>' .
|
990 |
-
|
991 |
-
// The controlbar
|
992 |
-
( $controls ?
|
993 |
-
'<div
|
994 |
-
id="wppa-pctl-div-' . $mocc . '"
|
995 |
-
class="wppa-pctl-div wppa-pctl-div-' . $mocc . '"
|
996 |
-
style="text-align:center;"
|
997 |
-
>' .
|
998 |
-
( $lightbox ?
|
999 |
-
'<span
|
1000 |
-
id="wppa-pctl-prev-' . $mocc . '"
|
1001 |
-
class="wppa-pan-prevnext"
|
1002 |
-
style="margin:0 2px 0 0;float:left;display:inline-block;"
|
1003 |
-
>' .
|
1004 |
-
wppa_get_svghtml( 'Prev-Button', $iconsize, true ) .
|
1005 |
-
'</span>'
|
1006 |
-
:
|
1007 |
-
''
|
1008 |
-
) .
|
1009 |
-
'<span
|
1010 |
-
id="wppa-pctl-left-' . $mocc . '"
|
1011 |
-
style="margin:0 2px;display:inline-block;"
|
1012 |
-
>' .
|
1013 |
-
wppa_get_svghtml( 'Left-4', $iconsize, true ) .
|
1014 |
-
'</span>
|
1015 |
-
<span
|
1016 |
-
id="wppa-pctl-right-' . $mocc . '"
|
1017 |
-
style="margin:0 2px;display:inline-block;"
|
1018 |
-
>' .
|
1019 |
-
wppa_get_svghtml( 'Right-4', $iconsize, true ) .
|
1020 |
-
'</span>
|
1021 |
-
<span
|
1022 |
-
id="wppa-pctl-up-' . $mocc . '"
|
1023 |
-
style="margin:0 2px;display:inline-block;"
|
1024 |
-
>' .
|
1025 |
-
wppa_get_svghtml( 'Up-4', $iconsize, true ) .
|
1026 |
-
'</span>
|
1027 |
-
<span
|
1028 |
-
id="wppa-pctl-down-' . $mocc . '"
|
1029 |
-
style="margin:0 2px;display:inline-block;"
|
1030 |
-
>' .
|
1031 |
-
wppa_get_svghtml( 'Down-4', $iconsize, true ) .
|
1032 |
-
'</span>
|
1033 |
-
<span
|
1034 |
-
id="wppa-pctl-zoomin-' . $mocc . '"
|
1035 |
-
style="margin:0 2px;display:inline-block;"
|
1036 |
-
>' .
|
1037 |
-
wppa_get_svghtml( 'ZoomIn', $iconsize, true ) .
|
1038 |
-
'</span>
|
1039 |
-
<span
|
1040 |
-
id="wppa-pctl-zoomout-' . $mocc . '"
|
1041 |
-
style="margin:0 2px;display:inline-block;"
|
1042 |
-
>' .
|
1043 |
-
wppa_get_svghtml( 'ZoomOut', $iconsize, true ) .
|
1044 |
-
'</span>' .
|
1045 |
-
( $lightbox ?
|
1046 |
-
'<span
|
1047 |
-
id="wppa-pctl-next-' . $mocc . '"
|
1048 |
-
class="wppa-pan-prevnext"
|
1049 |
-
style="margin:0 0 0 2px;float:right;display:inline-block;"
|
1050 |
-
>' .
|
1051 |
-
wppa_get_svghtml( 'Next-Button', $iconsize, true ) .
|
1052 |
-
'</span>'
|
1053 |
-
:
|
1054 |
-
''
|
1055 |
-
) .
|
1056 |
-
'</div>'
|
1057 |
-
:
|
1058 |
-
'' ) .
|
1059 |
-
|
1060 |
-
( $lightbox ? '</div>' : '' ) .
|
1061 |
-
|
1062 |
-
'<script>' .
|
1063 |
-
|
1064 |
-
// Create image object and add the image url to it
|
1065 |
-
'var image' . $mocc . ' = new Image();
|
1066 |
-
image' . $mocc . '.src = "' . $url . '";' .
|
1067 |
-
|
1068 |
-
// When document complete, run the main proc
|
1069 |
-
'jQuery(document).ready(function(){wppaDoFlatPanorama' . $mocc . '();});' .
|
1070 |
-
|
1071 |
-
// The main proccedure
|
1072 |
-
'function wppaDoFlatPanorama' . $mocc . '(){' .
|
1073 |
-
|
1074 |
-
// Wait until the image file has been completely loaded
|
1075 |
-
'if (!image' . $mocc . '.complete){setTimeout( wppaDoFlatPanorama' . $mocc . ', 100 );return;}' .
|
1076 |
-
|
1077 |
-
// Var declarations
|
1078 |
-
'var
|
1079 |
-
$ = jQuery,
|
1080 |
-
manualControl = false,
|
1081 |
-
zoomsensitivity = ' . $zoomsensitivity . ',
|
1082 |
-
deltaX = ' . $deltaX . ',
|
1083 |
-
deltaY = 0,
|
1084 |
-
deltaFactor = 1.0,
|
1085 |
-
autorun = ' . ( $autorun ? 'true' : 'false' ) . ',
|
1086 |
-
run = deltaX ? 5 : 4,
|
1087 |
-
busy = false,
|
1088 |
-
abort = false,
|
1089 |
-
div = $("#wppa-pan-div-' . $mocc . '"),
|
1090 |
-
canvas = document.getElementById("wppa-pan-canvas-' . $mocc . '"),
|
1091 |
-
prevCanvas = document.getElementById("wppa-pan-prev-canvas-' . $mocc . '"),
|
1092 |
-
left = $("#wppa-pctl-left-' . $mocc . '"),
|
1093 |
-
right = $("#wppa-pctl-right-' . $mocc . '"),
|
1094 |
-
up = $("#wppa-pctl-up-' . $mocc . '"),
|
1095 |
-
down = $("#wppa-pctl-down-' . $mocc . '"),
|
1096 |
-
zoomin = $("#wppa-pctl-zoomin-' . $mocc . '"),
|
1097 |
-
zoomout = $("#wppa-pctl-zoomout-' . $mocc . '"),
|
1098 |
-
prev = $("#wppa-pctl-prev-' . $mocc . '"),
|
1099 |
-
next = $("#wppa-pctl-next-' . $mocc . '"),
|
1100 |
-
canvasWidth = $(div).parent().width(),
|
1101 |
-
canvasHeight = canvasWidth / 2,
|
1102 |
-
savedCanvasX = 0,
|
1103 |
-
savedCanvasY = 0,
|
1104 |
-
fromHeight = image' . $mocc . '.height / 2,
|
1105 |
-
fromWidth = fromHeight * 2,
|
1106 |
-
fromX = ( image' . $mocc . '.width - fromWidth ) / 2,
|
1107 |
-
fromY = ( image' . $mocc . '.height - fromHeight ) / 2,
|
1108 |
-
centerX = fromX + fromWidth / 2,
|
1109 |
-
centerY = fromY + fromHeight / 2;' .
|
1110 |
-
|
1111 |
-
// Install listeners
|
1112 |
-
( wppa_is_mobile() ?
|
1113 |
-
'right.on("touchstart", onRightMouseDown);
|
1114 |
-
right.on("touchend", onButtonUp);
|
1115 |
-
left.on("touchstart", onLeftMouseDown);
|
1116 |
-
left.on("touchend", onButtonUp);
|
1117 |
-
up.on("touchstart", onUpMouseDown);
|
1118 |
-
up.on("touchend", onButtonUp);
|
1119 |
-
down.on("touchstart", onDownMouseDown);
|
1120 |
-
down.on("touchend", onButtonUp);
|
1121 |
-
zoomin.on("touchstart", onZoomInMouseDown);
|
1122 |
-
zoomin.on("touchend", onButtonUp);
|
1123 |
-
zoomout.on("touchstart", onZoomOutMouseDown);
|
1124 |
-
zoomout.on("touchend", onButtonUp);'
|
1125 |
-
:
|
1126 |
-
( $manual ?
|
1127 |
-
'canvas.addEventListener("mousedown", onCanvasMouseDown);
|
1128 |
-
canvas.addEventListener("mousemove", onCanvasMouseMove);
|
1129 |
-
canvas.addEventListener("mouseup", onCanvasMouseUp);
|
1130 |
-
canvas.addEventListener("mouseout", onCanvasMouseUp);
|
1131 |
-
document.getElementById("wppa-pan-canvas-' . $mocc . '").addEventListener("wheel", onDivWheel);
|
1132 |
-
prevCanvas.addEventListener("mousedown", onCanvasMouseDown);
|
1133 |
-
prevCanvas.addEventListener("mousemove", onPrevCanvasMouseMove);
|
1134 |
-
prevCanvas.addEventListener("mouseup", onCanvasMouseUp);
|
1135 |
-
prevCanvas.addEventListener("mouseout", onCanvasMouseUp);' : '' ) .
|
1136 |
-
'right.on("mousedown", onRightMouseDown);
|
1137 |
-
right.on("mouseup", onButtonUp);
|
1138 |
-
left.on("mousedown", onLeftMouseDown);
|
1139 |
-
left.on("mouseup", onButtonUp);
|
1140 |
-
up.on("mousedown", onUpMouseDown);
|
1141 |
-
up.on("mouseup", onButtonUp);
|
1142 |
-
down.on("mousedown", onDownMouseDown);
|
1143 |
-
down.on("mouseup", onButtonUp);
|
1144 |
-
zoomin.on("mousedown", onZoomInMouseDown);
|
1145 |
-
zoomin.on("mouseup", onButtonUp);
|
1146 |
-
zoomout.on("mousedown", onZoomOutMouseDown);
|
1147 |
-
zoomout.on("mouseup", onButtonUp);'
|
1148 |
-
) .
|
1149 |
-
|
1150 |
-
// Common event handlers
|
1151 |
-
( $lightbox ? '
|
1152 |
-
$("#wppa-fulls-btn").on("click", function(){abort=true;});
|
1153 |
-
if (prev) {
|
1154 |
-
prev.on("click", panPrev);
|
1155 |
-
next.on("click", panNext);
|
1156 |
-
}' : '' ) .
|
1157 |
-
|
1158 |
-
// Install Resize handler
|
1159 |
-
'$(window).on("DOMContentLoaded load resize orientationchange",onResize' . $mocc . ');' .
|
1160 |
-
|
1161 |
-
// Remove spinner
|
1162 |
-
'$("#wppa-ovl-spin").hide();' .
|
1163 |
-
|
1164 |
-
// Do the rendering
|
1165 |
-
'render();' .
|
1166 |
-
|
1167 |
-
// Resize
|
1168 |
-
'onResize' . $mocc . '();' .
|
1169 |
-
|
1170 |
-
// The render function
|
1171 |
-
'function render(){' .
|
1172 |
-
|
1173 |
-
( $lightbox ? 'if (!wppaOvlOpen) abort=true;' :'' ) .
|
1174 |
-
'if (abort) {
|
1175 |
-
ctx = null;
|
1176 |
-
prevctx = null;
|
1177 |
-
return;
|
1178 |
-
}
|
1179 |
-
if (run==0) return;
|
1180 |
-
if (busy) return;
|
1181 |
-
busy = true;' .
|
1182 |
-
|
1183 |
-
( $lightbox ? 'if ( wppaOvlActivePanorama != ' . $id . ' ) return;' : '' ) .
|
1184 |
-
|
1185 |
-
// manualControl is true when a drag on the canvas is being performed
|
1186 |
-
'if(!manualControl){' .
|
1187 |
-
|
1188 |
-
// Panning
|
1189 |
-
'fromX += deltaX;
|
1190 |
-
fromY += deltaY;' .
|
1191 |
-
|
1192 |
-
// Zooming
|
1193 |
-
'var newHeight = fromHeight / deltaFactor;
|
1194 |
-
var newWidth = fromWidth / deltaFactor;' .
|
1195 |
-
|
1196 |
-
// Keep zooming in range
|
1197 |
-
'if ( deltaFactor != 1 && newHeight <= image' . $mocc . '.height && newHeight > 50 ) {
|
1198 |
-
fromX -= ( newWidth - fromWidth ) / 2;
|
1199 |
-
fromY -= ( newHeight - fromHeight ) / 2;
|
1200 |
-
fromWidth = newWidth;
|
1201 |
-
fromHeight = newHeight;
|
1202 |
-
}
|
1203 |
-
}' .
|
1204 |
-
|
1205 |
-
// Keep viewport within image boundaries
|
1206 |
-
'fromX = Math.max(0, Math.min(image' . $mocc . '.width-fromWidth, fromX));' .
|
1207 |
-
'fromY = Math.max(0, Math.min(image' . $mocc . '.height-fromHeight, fromY));' .
|
1208 |
-
|
1209 |
-
// Check for turningpoint in case autrun
|
1210 |
-
'if ( autorun ) {
|
1211 |
-
if ( fromX == 0 || fromX == ( image' . $mocc . '.width-fromWidth ) ) {
|
1212 |
-
deltaX *= -1;
|
1213 |
-
}
|
1214 |
-
}' .
|
1215 |
-
|
1216 |
-
// Draw the image
|
1217 |
-
'var ctx = canvas.getContext("2d");' .
|
1218 |
-
'ctx.drawImage(image' . $mocc . ',fromX,fromY,fromWidth,fromHeight,0,0,canvas.width,canvas.height);' .
|
1219 |
-
|
1220 |
-
// Draw the preview image
|
1221 |
-
'var prevctx = prevCanvas.getContext("2d");' .
|
1222 |
-
'prevctx.clearRect(0, 0, prevCanvas.width, prevCanvas.height);' .
|
1223 |
-
'prevctx.drawImage(image' . $mocc . ',0,0,image' . $mocc . '.width,image' . $mocc . '.height,0,0,prevCanvas.width,prevCanvas.height);' .
|
1224 |
-
|
1225 |
-
// Draw viewport rect on preview image
|
1226 |
-
'var factor = prevCanvas.width / image' . $mocc . '.width;' .
|
1227 |
-
'prevctx.strokeRect(factor*fromX,factor*fromY,factor*fromWidth,factor*fromHeight);' .
|
1228 |
-
|
1229 |
-
// Done so far
|
1230 |
-
'busy = false;' .
|
1231 |
-
|
1232 |
-
// Re-render if needed
|
1233 |
-
'if (run>0) {' .
|
1234 |
-
'if (manualControl||autorun){setTimeout(function(){render()},25);}' .
|
1235 |
-
'else {setTimeout(function(){render()},5);}' .
|
1236 |
-
'}
|
1237 |
-
if(run<5)run--;' .
|
1238 |
-
'}' .
|
1239 |
-
|
1240 |
-
// Previous
|
1241 |
-
'function panPrev(e) {
|
1242 |
-
e.preventDefault();
|
1243 |
-
abort = true;
|
1244 |
-
var stop;
|
1245 |
-
if ( ! stop ) {
|
1246 |
-
stop = true;
|
1247 |
-
$(this).css({opacity:0.5});
|
1248 |
-
$("#wppa-overlay-ic").css({display:"none"});
|
1249 |
-
$("#wppa-ovl-spin").show();
|
1250 |
-
wppaOvlShowPrev();
|
1251 |
-
}
|
1252 |
-
}' .
|
1253 |
-
|
1254 |
-
// Next
|
1255 |
-
'function panNext(e) {
|
1256 |
-
e.preventDefault();
|
1257 |
-
abort = true;
|
1258 |
-
var stop;
|
1259 |
-
if ( ! stop ) {
|
1260 |
-
stop = true;
|
1261 |
-
$(this).css({opacity:0.5});
|
1262 |
-
$("#wppa-overlay-ic").css({display:"none"});
|
1263 |
-
$("#wppa-ovl-spin").show();
|
1264 |
-
wppaOvlShowNext();
|
1265 |
-
}
|
1266 |
-
}' .
|
1267 |
-
|
1268 |
-
// Horizontal movement by button
|
1269 |
-
'function onRightMouseDown(e){
|
1270 |
-
e.preventDefault();
|
1271 |
-
run=5;deltaX=3;render();
|
1272 |
-
}' .
|
1273 |
-
|
1274 |
-
'function onLeftMouseDown(e){
|
1275 |
-
e.preventDefault();
|
1276 |
-
run=5;deltaX=-3;render();
|
1277 |
-
}' .
|
1278 |
-
|
1279 |
-
// Vertical movement by button
|
1280 |
-
'function onUpMouseDown(e){
|
1281 |
-
e.preventDefault();
|
1282 |
-
run=5;deltaY=-3;render();
|
1283 |
-
}' .
|
1284 |
-
|
1285 |
-
'function onDownMouseDown(e){
|
1286 |
-
e.preventDefault();
|
1287 |
-
run=5;deltaY=3;render();
|
1288 |
-
}' .
|
1289 |
-
|
1290 |
-
// Zooming
|
1291 |
-
'function onZoomInMouseDown(e){
|
1292 |
-
e.preventDefault();
|
1293 |
-
run=5;deltaFactor=1.005;render();
|
1294 |
-
}' .
|
1295 |
-
|
1296 |
-
'function onZoomOutMouseDown(e){
|
1297 |
-
e.preventDefault();
|
1298 |
-
run=5;deltaFactor=0.995;render();
|
1299 |
-
}' .
|
1300 |
-
|
1301 |
-
// Mouse wheel
|
1302 |
-
'function onDivWheel(e) {
|
1303 |
-
e.preventDefault();
|
1304 |
-
run=(autorun?5:4);
|
1305 |
-
deltaFactor = 1 + e.deltaY * zoomsensitivity / 1000;
|
1306 |
-
if ( ! autorun ) render();
|
1307 |
-
setTimeout(function(){deltaFactor = 1}, 25);
|
1308 |
-
e.stopPropagation();
|
1309 |
-
}' .
|
1310 |
-
|
1311 |
-
// When a navigation button is released, stop and reset all deltas
|
1312 |
-
'function onButtonUp(e) {
|
1313 |
-
e.preventDefault();
|
1314 |
-
deltaX=0;deltaY=0;deltaFactor=1;
|
1315 |
-
if ( ! ' . $lightbox . ' ) run--;
|
1316 |
-
run=4;
|
1317 |
-
}' .
|
1318 |
-
|
1319 |
-
// When a (responsive) resize is required, we resize the wppaScene
|
1320 |
-
'function onResize' . $mocc . '(e){' .
|
1321 |
-
|
1322 |
-
'if (abort) return;' .
|
1323 |
-
|
1324 |
-
( $lightbox ?
|
1325 |
-
|
1326 |
-
// Show image container
|
1327 |
-
'$("#wppa-overlay-ic").css("display", "");' .
|
1328 |
-
|
1329 |
-
// There are 4 possiblilities: all combi of 'Width is the limit or not' and 'Mode is normal or fullscreen'
|
1330 |
-
'var widthIsLim,
|
1331 |
-
modeIsNormal = wppaOvlMode == "normal";' .
|
1332 |
-
|
1333 |
-
// First find container dimensions dependant of mode
|
1334 |
-
'var contWidth, contHeight;
|
1335 |
-
|
1336 |
-
if ( modeIsNormal ) {
|
1337 |
-
contWidth = window.innerWidth ? window.innerWidth : screen.width;
|
1338 |
-
contHeight = window.innerHeight ? window.innerHeight : screen.height;
|
1339 |
-
}
|
1340 |
-
else {
|
1341 |
-
contWidth = screen.width;
|
1342 |
-
contHeight = screen.height;
|
1343 |
-
}
|
1344 |
-
newWidth = parseInt(newWidth);
|
1345 |
-
newHeight = parseInt(newHeight);
|
1346 |
-
' .
|
1347 |
-
|
1348 |
-
// Initialize new display sizes
|
1349 |
-
'var newWidth,
|
1350 |
-
newHeight,
|
1351 |
-
topMarg,
|
1352 |
-
leftMarg,
|
1353 |
-
extraX = 8,
|
1354 |
-
extraY = 24 + ' . ( $controls ? $icsiz : 0 ) . ' + contWidth * ' . $height . ' / ' . $width . ' + 40;' .
|
1355 |
-
|
1356 |
-
// Add borderwidth in case of mode == normal
|
1357 |
-
'if ( modeIsNormal ) {
|
1358 |
-
extraX += 2 * ' . wppa_opt( 'ovl_border_width' ) . ';
|
1359 |
-
extraY += 2 * ' . wppa_opt( 'ovl_border_width' ) . ';
|
1360 |
-
}
|
1361 |
-
' .
|
1362 |
-
|
1363 |
-
// Find out if the width is the limitng dimension
|
1364 |
-
'widthIsLim = ( contHeight > ( ( contWidth / 2 ) + extraY ) );' .
|
1365 |
-
|
1366 |
-
// Compute new sizes and margins
|
1367 |
-
'if ( widthIsLim ) {
|
1368 |
-
newWidth = contWidth - extraX;
|
1369 |
-
newHeight = newWidth / 2;
|
1370 |
-
topMarg = ( contHeight - newHeight - extraY ) / 2 + 20;' .
|
1371 |
-
'}
|
1372 |
-
else {
|
1373 |
-
newWidth = 2 * ( contHeight - ' . ( $controls ? $icsiz : 0 ) . ' - 24 - 40 ) / ( 1 + 2 * ' . $height . ' / ' . $width . ' );
|
1374 |
-
newHeight = newWidth / 2;
|
1375 |
-
topMarg = 20;' .
|
1376 |
-
|
1377 |
-
'}' .
|
1378 |
-
|
1379 |
-
// Set css common for all 4 situations
|
1380 |
-
'$("#wppa-ovl-pan-container").css({marginTop:topMarg});
|
1381 |
-
$("#wppa-overlay-ic").css({marginTop:0});
|
1382 |
-
|
1383 |
-
canvas.width = newWidth;
|
1384 |
-
canvas.height = newHeight;
|
1385 |
-
prevCanvas.width = newWidth;
|
1386 |
-
prevCanvas.height = newWidth * ' . $height . ' / ' . $width . ';' .
|
1387 |
-
|
1388 |
-
// Now set css for all 4 situations: Mode is normal
|
1389 |
-
'if ( modeIsNormal ) {' .
|
1390 |
-
|
1391 |
-
// Common for mode normal
|
1392 |
-
'$("#wppa-ovl-pan-container").css({
|
1393 |
-
backgroundColor:"' . wppa_opt( 'ovl_theme' ) . '",
|
1394 |
-
padding:"' . wppa_opt( 'ovl_border_width' ) . 'px",
|
1395 |
-
borderRadius:"' . wppa_opt( 'ovl_border_radius' ) . 'px",
|
1396 |
-
width:newWidth,
|
1397 |
-
marginLeft:0
|
1398 |
-
});
|
1399 |
-
$( "#wppa-pctl-div-' . $mocc . '" ).css({marginLeft:0});' .
|
1400 |
|
1401 |
-
|
1402 |
-
|
1403 |
-
$("#wppa-overlay-ic").css({marginLeft:4});
|
1404 |
-
}
|
1405 |
-
else {
|
1406 |
-
$("#wppa-overlay-ic").css({marginLeft:(contWidth-newWidth)/2});
|
1407 |
-
}
|
1408 |
|
1409 |
-
|
|
|
|
|
|
|
|
|
|
|
1410 |
|
1411 |
-
|
1412 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1413 |
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
marginLeft:(contWidth-newWidth)/2
|
1422 |
-
});
|
1423 |
-
$("#wppa-pctl-div-' . $mocc . '").css({marginLeft:0});' .
|
1424 |
|
1425 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1426 |
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1432 |
|
1433 |
-
|
1434 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1435 |
|
1436 |
-
|
1437 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1438 |
|
1439 |
-
|
1440 |
-
|
1441 |
-
'canvasHeight = canvasWidth / 2;' .
|
1442 |
-
'canvas.width = canvasWidth;' .
|
1443 |
-
'canvas.height = canvasHeight;' .
|
1444 |
-
'prevCanvas.width = canvasWidth;' .
|
1445 |
-
'prevCanvas.height = canvasWidth * ' . $height . ' / ' . $width . ';' .
|
1446 |
-
'run=(autorun?5:4);' .
|
1447 |
-
'render();'
|
1448 |
-
) .
|
1449 |
|
1450 |
-
|
|
|
1451 |
|
1452 |
-
|
1453 |
-
|
1454 |
|
1455 |
-
|
|
|
1456 |
|
1457 |
-
|
|
|
1458 |
|
1459 |
-
|
1460 |
-
savedCanvasY = e.offsetY;
|
1461 |
|
1462 |
-
|
1463 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1464 |
|
1465 |
-
|
1466 |
|
1467 |
-
|
|
|
1468 |
|
1469 |
-
|
|
|
|
|
1470 |
|
1471 |
-
|
|
|
|
|
1472 |
|
1473 |
-
|
1474 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1475 |
|
1476 |
-
|
|
|
|
|
1477 |
|
1478 |
-
|
1479 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1480 |
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
|
|
|
|
1486 |
|
1487 |
-
|
|
|
1488 |
|
1489 |
-
|
|
|
1490 |
|
1491 |
-
|
1492 |
-
|
1493 |
-
e.offsetY > factor * fromY &&
|
1494 |
-
e.offsetY < factor * ( fromY + fromHeight ) ) {
|
1495 |
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1501 |
|
1502 |
-
|
1503 |
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1508 |
|
1509 |
-
|
1510 |
-
|
|
|
1511 |
|
1512 |
-
|
1513 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1514 |
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1518 |
|
1519 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1520 |
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1527 |
|
1528 |
-
|
1529 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1530 |
|
1531 |
return wppa_pan_min( $result );
|
1532 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Make the picture html
|
6 |
+
* Version 7.4.02
|
7 |
*
|
8 |
*/
|
9 |
|
85 |
// Get other data
|
86 |
$link = wppa_get_imglnk_a( $type, $id );
|
87 |
$isthumb = strpos( $type, 'thumb' ) !== false;
|
88 |
+
if ( $isthumb ) {
|
89 |
+
$file = wppa_get_thumb_path( $id );
|
90 |
+
}
|
91 |
+
elseif ( wppa_switch( 'zoom_on' ) ) {
|
92 |
+
$file = wppa_get_source_path( $id );
|
93 |
+
if ( ! wppa_is_file( $file ) ) {
|
94 |
+
$file = wppa_get_photo_path( $id );
|
95 |
+
}
|
96 |
+
}
|
97 |
+
else {
|
98 |
+
$file = wppa_get_photo_path( $id );
|
99 |
+
}
|
100 |
+
// $file = $isthumb ? wppa_get_thumb_path( $id ) : wppa_get_photo_path( $id );
|
101 |
|
102 |
if ( $args['width'] && $args['height'] ) {
|
103 |
$href = $isthumb ? wppa_get_thumb_url( $id, true, '', $args['width'], $args['height'] ) :
|
106 |
else {
|
107 |
$href = $isthumb ? wppa_get_thumb_url( $id ) : wppa_get_photo_url( $id );
|
108 |
}
|
109 |
+
if ( $is_pdf || ( wppa_is_photo( $id ) && wppa_switch( 'zoom_on' ) && ! $isthumb ) ) {
|
110 |
$href = wppa_get_hires_url( $id );
|
111 |
}
|
112 |
|
197 |
wppa_get_lb_panorama_full_html( $id ) .
|
198 |
( $link['target'] ? ' target="' . $link['target'] . '"' : '' ) .
|
199 |
' class="thumb-img"' .
|
200 |
+
' id="a-' . $id . '-' . $mocc . '"' .
|
201 |
' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
|
202 |
' style="cursor:' . wppa_wait() . ';"' .
|
203 |
' onclick="return false;"' .
|
214 |
) .
|
215 |
' title="' . $link['title'] . '"' .
|
216 |
' class="thumb-img"' .
|
217 |
+
' id="a-' . $id . '-' . $mocc . '"' .
|
218 |
' style="cursor:pointer;"' .
|
219 |
' >';
|
220 |
}
|
246 |
elseif ( $is_pdf ) {
|
247 |
$result .= '
|
248 |
<iframe
|
249 |
+
id="pdf-' . $id . '-' . $mocc . '"
|
250 |
src="' . $href . '" ' .
|
251 |
wppa_get_imgalt( $id ) .
|
252 |
( $class ? ' class="' . $class . '" ' : '' ) .
|
258 |
|
259 |
// No video, just a photo
|
260 |
else {
|
261 |
+
|
262 |
+
// Zoom?
|
263 |
+
if ( wppa_switch( 'zoom_on' ) && wppa_browser_can_html5() ) {
|
264 |
+
|
265 |
+
$result .=
|
266 |
+
wppa_get_zoom_pan_html( array(
|
267 |
+
'mocc' => $mocc,
|
268 |
+
'id' => $id,
|
269 |
+
'controls' => ( wppa_opt( 'panorama_control' ) == 'all' ) || ( wppa_opt( 'panorama_control' ) == 'mobile' && wppa_is_mobile() ),
|
270 |
+
'manual' => true,
|
271 |
+
'zoomsensitivity' => wppa_opt( 'panorama_wheel_sensitivity' ),
|
272 |
+
|
273 |
+
) );
|
274 |
+
}
|
275 |
+
else {
|
276 |
+
$imgid = 'ph-'.$id.'-'.$mocc;
|
277 |
+
|
278 |
+
$result .=
|
279 |
+
'<img' .
|
280 |
+
' id="' . $imgid . '"' .
|
281 |
+
' src="' . $href . '"' .
|
282 |
+
' ' . wppa_get_imgalt( $id ) .
|
283 |
+
( $class ? ' class="' . $class . '" ' : '' ) .
|
284 |
+
( $title ? ' title="' . $title . '" ' : '' ) .
|
285 |
+
' style="' . $style . '"' .
|
286 |
+
' />';
|
287 |
+
}
|
288 |
}
|
289 |
|
290 |
// Close the link
|
377 |
$args['autorunspeed'] = wppa_opt( 'panorama_autorun_speed' );
|
378 |
$args['zoomsensitivity'] = wppa_opt( 'panorama_wheel_sensitivity' );
|
379 |
|
380 |
+
if ( wppa_is_zoomable( $args['id'] ) ) {
|
381 |
+
$result = wppa_get_zoom_pan_html( $args );
|
382 |
+
}
|
383 |
|
384 |
+
else {
|
385 |
+
switch( wppa_is_panorama( $args['id'] ) ) {
|
386 |
|
387 |
+
case '1':
|
388 |
+
$result = wppa_get_spheric_pan_html( $args );
|
389 |
+
|
390 |
+
// Save we have a spheric panorama on board for loading THREE.js
|
391 |
+
wppa( 'has_panorama', true );
|
392 |
+
break;
|
393 |
+
case '2':
|
394 |
+
$result = wppa_get_flat_pan_html( $args );
|
395 |
+
break;
|
396 |
+
default:
|
397 |
+
$result = '';
|
398 |
+
}
|
399 |
}
|
400 |
|
401 |
return $result;
|
951 |
|
952 |
// Init
|
953 |
$defaults = array( 'id' => '0',
|
954 |
+
'mocc' => '0',
|
955 |
+
'width' => false,
|
956 |
+
'height' => false,
|
957 |
+
'haslink' => false,
|
958 |
+
'lightbox' => 0,
|
959 |
+
'controls' => true,
|
960 |
+
'autorun' => '',
|
961 |
+
'manual' => true,
|
962 |
+
'autorunspeed' => '3',
|
963 |
+
'zoomsensitivity' => '3',
|
964 |
+
);
|
965 |
|
966 |
+
$args = wp_parse_args( $args, $defaults );
|
967 |
|
968 |
$id = strval( intval ( $args['id'] ) );
|
969 |
$mocc = $args['mocc'] ? $args['mocc'] : wppa( 'mocc' );
|
980 |
$zoomsensitivity = $args['zoomsensitivity'];
|
981 |
|
982 |
switch ( $autorun ) {
|
983 |
+
case 'right':
|
984 |
+
$deltaX = $autorunspeed / 3;
|
985 |
+
break;
|
986 |
+
case 'left':
|
987 |
+
$deltaX = - $autorunspeed / 3;
|
988 |
+
break;
|
989 |
+
default:
|
990 |
+
$deltaX = '0';
|
991 |
}
|
992 |
|
993 |
$url = esc_url( wppa_is_mobile() ? wppa_get_photo_url( $id ) : wppa_get_hires_url( $id ) );
|
994 |
|
995 |
$result =
|
996 |
+
( $lightbox ? $id . '.' : '' ) .
|
997 |
+
( $haslink ? '</a>' : '' ) .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
998 |
|
999 |
+
// The overall container
|
1000 |
+
( $lightbox ? '<div id="wppa-ovl-pan-container" >' : '' ) .
|
|
|
|
|
|
|
|
|
|
|
1001 |
|
1002 |
+
// The canvas container
|
1003 |
+
'<div
|
1004 |
+
id="wppa-pan-div-' . $mocc . '"
|
1005 |
+
class="wppa-pan-div wppa-pan-div-' . $mocc . '"
|
1006 |
+
style="' . ( $controls ? 'margin-bottom:4px;' : '' ) . 'line-height:0;"
|
1007 |
+
>' .
|
1008 |
|
1009 |
+
// The actual drawing area
|
1010 |
+
'<canvas
|
1011 |
+
id="wppa-pan-canvas-' . $mocc . '"
|
1012 |
+
style="background-color:black;' . ( $manual ? 'cursor:grab;' : '' ) . '"
|
1013 |
+
width="' . $width . '"
|
1014 |
+
height="' . ( $width / 2 ) . '"
|
1015 |
+
>
|
1016 |
+
</canvas>' .
|
1017 |
+
|
1018 |
+
// The preview image
|
1019 |
+
'<canvas
|
1020 |
+
id="wppa-pan-prev-canvas-' . $mocc . '"
|
1021 |
+
style="margin-top:4px;background-color:black;"
|
1022 |
+
width="' . $width . '"
|
1023 |
+
height=' . $height . '"
|
1024 |
+
>
|
1025 |
+
</canvas>
|
1026 |
+
</div>' .
|
1027 |
|
1028 |
+
// The controlbar
|
1029 |
+
( $controls ?
|
1030 |
+
'<div
|
1031 |
+
id="wppa-pctl-div-' . $mocc . '"
|
1032 |
+
class="wppa-pctl-div wppa-pctl-div-' . $mocc . '"
|
1033 |
+
style="text-align:center;"
|
1034 |
+
>' .
|
|
|
|
|
|
|
1035 |
|
1036 |
+
// If lightbox: prev button
|
1037 |
+
( $lightbox ?
|
1038 |
+
'<span
|
1039 |
+
id="wppa-pctl-prev-' . $mocc . '"
|
1040 |
+
class="wppa-pan-prevnext"
|
1041 |
+
style="margin:0 2px 0 0;float:left;display:inline-block;"
|
1042 |
+
>' .
|
1043 |
+
wppa_get_svghtml( 'Prev-Button', $iconsize, true ) .
|
1044 |
+
'</span>' :
|
1045 |
+
'' ) .
|
1046 |
|
1047 |
+
// The nav buttons
|
1048 |
+
'<span
|
1049 |
+
id="wppa-pctl-left-' . $mocc . '"
|
1050 |
+
style="margin:0 2px;display:inline-block;"
|
1051 |
+
>' .
|
1052 |
+
wppa_get_svghtml( 'Left-4', $iconsize, true ) .
|
1053 |
+
'</span>
|
1054 |
+
<span
|
1055 |
+
id="wppa-pctl-right-' . $mocc . '"
|
1056 |
+
style="margin:0 2px;display:inline-block;"
|
1057 |
+
>' .
|
1058 |
+
wppa_get_svghtml( 'Right-4', $iconsize, true ) .
|
1059 |
+
'</span>
|
1060 |
+
<span
|
1061 |
+
id="wppa-pctl-up-' . $mocc . '"
|
1062 |
+
style="margin:0 2px;display:inline-block;"
|
1063 |
+
>' .
|
1064 |
+
wppa_get_svghtml( 'Up-4', $iconsize, true ) .
|
1065 |
+
'</span>
|
1066 |
+
<span
|
1067 |
+
id="wppa-pctl-down-' . $mocc . '"
|
1068 |
+
style="margin:0 2px;display:inline-block;"
|
1069 |
+
>' .
|
1070 |
+
wppa_get_svghtml( 'Down-4', $iconsize, true ) .
|
1071 |
+
'</span>
|
1072 |
+
<span
|
1073 |
+
id="wppa-pctl-zoomin-' . $mocc . '"
|
1074 |
+
style="margin:0 2px;display:inline-block;"
|
1075 |
+
>' .
|
1076 |
+
wppa_get_svghtml( 'ZoomIn', $iconsize, true ) .
|
1077 |
+
'</span>
|
1078 |
+
<span
|
1079 |
+
id="wppa-pctl-zoomout-' . $mocc . '"
|
1080 |
+
style="margin:0 2px;display:inline-block;"
|
1081 |
+
>' .
|
1082 |
+
wppa_get_svghtml( 'ZoomOut', $iconsize, true ) .
|
1083 |
+
'</span>' .
|
1084 |
|
1085 |
+
// If lightbox: next button
|
1086 |
+
( $lightbox ?
|
1087 |
+
'<span
|
1088 |
+
id="wppa-pctl-next-' . $mocc . '"
|
1089 |
+
class="wppa-pan-prevnext"
|
1090 |
+
style="margin:0 0 0 2px;float:right;display:inline-block;"
|
1091 |
+
>' .
|
1092 |
+
wppa_get_svghtml( 'Next-Button', $iconsize, true ) .
|
1093 |
+
'</span>' :
|
1094 |
+
'' ) .
|
1095 |
+
'</div>' :
|
1096 |
+
'' ) .
|
1097 |
+
|
1098 |
+
// wppa-ovl-pan-container
|
1099 |
+
( $lightbox ? '</div>' : '' );
|
1100 |
+
|
1101 |
+
// The js part
|
1102 |
+
$result .=
|
1103 |
+
'<script>' .
|
1104 |
+
|
1105 |
+
// Create image object and add the image url to it
|
1106 |
+
'var image' . $mocc . ' = new Image();
|
1107 |
+
image' . $mocc . '.src = "' . $url . '";' .
|
1108 |
+
|
1109 |
+
// When document complete, run the main proc
|
1110 |
+
'jQuery(document).ready(function(){wppaDoFlatPanorama' . $mocc . '();});' .
|
1111 |
+
|
1112 |
+
// The main proccedure
|
1113 |
+
'function wppaDoFlatPanorama' . $mocc . '(){' .
|
1114 |
+
|
1115 |
+
// Wait until the image file has been completely loaded
|
1116 |
+
'if (!image' . $mocc . '.complete){setTimeout( wppaDoFlatPanorama' . $mocc . ', 100 );return;}' .
|
1117 |
+
|
1118 |
+
// Var declarations
|
1119 |
+
'var
|
1120 |
+
$ = jQuery,
|
1121 |
+
manualControl = false,
|
1122 |
+
zoomsensitivity = ' . $zoomsensitivity . ',
|
1123 |
+
deltaX = ' . $deltaX . ',
|
1124 |
+
deltaY = 0,
|
1125 |
+
deltaFactor = 1.0,
|
1126 |
+
autorun = ' . ( $autorun ? 'true' : 'false' ) . ',
|
1127 |
+
run = deltaX ? 5 : 4,
|
1128 |
+
busy = false,
|
1129 |
+
abort = false,
|
1130 |
+
div = $("#wppa-pan-div-' . $mocc . '"),
|
1131 |
+
canvas = document.getElementById("wppa-pan-canvas-' . $mocc . '"),
|
1132 |
+
prevCanvas = document.getElementById("wppa-pan-prev-canvas-' . $mocc . '"),
|
1133 |
+
left = $("#wppa-pctl-left-' . $mocc . '"),
|
1134 |
+
right = $("#wppa-pctl-right-' . $mocc . '"),
|
1135 |
+
up = $("#wppa-pctl-up-' . $mocc . '"),
|
1136 |
+
down = $("#wppa-pctl-down-' . $mocc . '"),
|
1137 |
+
zoomin = $("#wppa-pctl-zoomin-' . $mocc . '"),
|
1138 |
+
zoomout = $("#wppa-pctl-zoomout-' . $mocc . '"),
|
1139 |
+
prev = $("#wppa-pctl-prev-' . $mocc . '"),
|
1140 |
+
next = $("#wppa-pctl-next-' . $mocc . '"),
|
1141 |
+
canvasWidth = $(div).parent().width(),
|
1142 |
+
canvasHeight = canvasWidth / 2,
|
1143 |
+
savedCanvasX = 0,
|
1144 |
+
savedCanvasY = 0,
|
1145 |
+
fromHeight = image' . $mocc . '.height / 2,
|
1146 |
+
fromWidth = fromHeight * 2,
|
1147 |
+
fromX = ( image' . $mocc . '.width - fromWidth ) / 2,
|
1148 |
+
fromY = ( image' . $mocc . '.height - fromHeight ) / 2,
|
1149 |
+
centerX = fromX + fromWidth / 2,
|
1150 |
+
centerY = fromY + fromHeight / 2;' .
|
1151 |
+
|
1152 |
+
// Install listeners
|
1153 |
+
( wppa_is_mobile() ?
|
1154 |
+
'right.on("touchstart", onRightMouseDown);
|
1155 |
+
right.on("touchend", onButtonUp);
|
1156 |
+
left.on("touchstart", onLeftMouseDown);
|
1157 |
+
left.on("touchend", onButtonUp);
|
1158 |
+
up.on("touchstart", onUpMouseDown);
|
1159 |
+
up.on("touchend", onButtonUp);
|
1160 |
+
down.on("touchstart", onDownMouseDown);
|
1161 |
+
down.on("touchend", onButtonUp);
|
1162 |
+
zoomin.on("touchstart", onZoomInMouseDown);
|
1163 |
+
zoomin.on("touchend", onButtonUp);
|
1164 |
+
zoomout.on("touchstart", onZoomOutMouseDown);
|
1165 |
+
zoomout.on("touchend", onButtonUp);'
|
1166 |
+
:
|
1167 |
+
( $manual ?
|
1168 |
+
'canvas.addEventListener("mousedown", onCanvasMouseDown);
|
1169 |
+
canvas.addEventListener("mousemove", onCanvasMouseMove);
|
1170 |
+
canvas.addEventListener("mouseup", onCanvasMouseUp);
|
1171 |
+
canvas.addEventListener("mouseout", onCanvasMouseUp);
|
1172 |
+
document.getElementById("wppa-pan-canvas-' . $mocc . '").addEventListener("wheel", onDivWheel);
|
1173 |
+
prevCanvas.addEventListener("mousedown", onCanvasMouseDown);
|
1174 |
+
prevCanvas.addEventListener("mousemove", onPrevCanvasMouseMove);
|
1175 |
+
prevCanvas.addEventListener("mouseup", onCanvasMouseUp);
|
1176 |
+
prevCanvas.addEventListener("mouseout", onCanvasMouseUp);'
|
1177 |
+
: '' ) .
|
1178 |
+
|
1179 |
+
'right.on("mousedown", onRightMouseDown);
|
1180 |
+
right.on("mouseup", onButtonUp);
|
1181 |
+
left.on("mousedown", onLeftMouseDown);
|
1182 |
+
left.on("mouseup", onButtonUp);
|
1183 |
+
up.on("mousedown", onUpMouseDown);
|
1184 |
+
up.on("mouseup", onButtonUp);
|
1185 |
+
down.on("mousedown", onDownMouseDown);
|
1186 |
+
down.on("mouseup", onButtonUp);
|
1187 |
+
zoomin.on("mousedown", onZoomInMouseDown);
|
1188 |
+
zoomin.on("mouseup", onButtonUp);
|
1189 |
+
zoomout.on("mousedown", onZoomOutMouseDown);
|
1190 |
+
zoomout.on("mouseup", onButtonUp);'
|
1191 |
+
) .
|
1192 |
|
1193 |
+
// Common event handlers
|
1194 |
+
( $lightbox ? '
|
1195 |
+
$("#wppa-fulls-btn").on("click", function(){abort=true;});
|
1196 |
+
if (prev) {
|
1197 |
+
prev.on("click", panPrev);
|
1198 |
+
next.on("click", panNext);
|
1199 |
+
}' :
|
1200 |
+
''
|
1201 |
+
) .
|
1202 |
|
1203 |
+
// Install Resize handler
|
1204 |
+
'$(window).on("DOMContentLoaded load resize orientationchange",onResize' . $mocc . ');' .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1205 |
|
1206 |
+
// Remove spinner
|
1207 |
+
'$("#wppa-ovl-spin").hide();' .
|
1208 |
|
1209 |
+
// Do the rendering
|
1210 |
+
'render();' .
|
1211 |
|
1212 |
+
// Resize
|
1213 |
+
'onResize' . $mocc . '();' .
|
1214 |
|
1215 |
+
// The render function
|
1216 |
+
'function render(){' .
|
1217 |
|
1218 |
+
( $lightbox ? 'if (!wppaOvlOpen) abort=true;' :'' ) .
|
|
|
1219 |
|
1220 |
+
'if (abort) {
|
1221 |
+
ctx = null;
|
1222 |
+
prevctx = null;
|
1223 |
+
return;
|
1224 |
+
}
|
1225 |
+
if (run==0) return;
|
1226 |
+
if (busy) return;
|
1227 |
+
busy = true;' .
|
1228 |
|
1229 |
+
( $lightbox ? 'if ( wppaOvlActivePanorama != ' . $id . ' ) return;' : '' ) .
|
1230 |
|
1231 |
+
// manualControl is true when a drag on the canvas is being performed
|
1232 |
+
'if(!manualControl){' .
|
1233 |
|
1234 |
+
// Panning
|
1235 |
+
'fromX += deltaX;
|
1236 |
+
fromY += deltaY;' .
|
1237 |
|
1238 |
+
// Zooming
|
1239 |
+
'var newHeight = fromHeight / deltaFactor;
|
1240 |
+
var newWidth = fromWidth / deltaFactor;' .
|
1241 |
|
1242 |
+
// Keep zooming in range
|
1243 |
+
'if ( deltaFactor != 1 && newHeight <= image' . $mocc . '.height && newHeight > 50 ) {
|
1244 |
+
fromX -= ( newWidth - fromWidth ) / 2;
|
1245 |
+
fromY -= ( newHeight - fromHeight ) / 2;
|
1246 |
+
fromWidth = newWidth;
|
1247 |
+
fromHeight = newHeight;
|
1248 |
+
}
|
1249 |
+
}' .
|
1250 |
|
1251 |
+
// Keep viewport within image boundaries
|
1252 |
+
'fromX = Math.max(0, Math.min(image' . $mocc . '.width-fromWidth, fromX));' .
|
1253 |
+
'fromY = Math.max(0, Math.min(image' . $mocc . '.height-fromHeight, fromY));' .
|
1254 |
|
1255 |
+
// Check for turningpoint in case autrun
|
1256 |
+
'if ( autorun ) {
|
1257 |
+
if ( fromX == 0 || fromX == ( image' . $mocc . '.width-fromWidth ) ) {
|
1258 |
+
deltaX *= -1;
|
1259 |
+
}
|
1260 |
+
}' .
|
1261 |
+
|
1262 |
+
// Draw the image
|
1263 |
+
'var ctx = canvas.getContext("2d");' .
|
1264 |
+
'ctx.drawImage(image' . $mocc . ',fromX,fromY,fromWidth,fromHeight,0,0,canvas.width,canvas.height);' .
|
1265 |
+
|
1266 |
+
// Draw the preview image
|
1267 |
+
'var prevctx = prevCanvas.getContext("2d");' .
|
1268 |
+
'prevctx.clearRect(0, 0, prevCanvas.width, prevCanvas.height);' .
|
1269 |
+
'prevctx.drawImage(image' . $mocc . ',0,0,image' . $mocc . '.width,image' . $mocc . '.height,0,0,prevCanvas.width,prevCanvas.height);' .
|
1270 |
+
|
1271 |
+
// Draw viewport rect on preview image
|
1272 |
+
'var factor = prevCanvas.width / image' . $mocc . '.width;' .
|
1273 |
+
'prevctx.strokeRect(factor*fromX,factor*fromY,factor*fromWidth,factor*fromHeight);' .
|
1274 |
+
|
1275 |
+
// Done so far
|
1276 |
+
'busy = false;' .
|
1277 |
+
|
1278 |
+
// Re-render if needed
|
1279 |
+
'if (run>0) {' .
|
1280 |
+
'if (manualControl||autorun){setTimeout(function(){render()},25);}' .
|
1281 |
+
'else {setTimeout(function(){render()},5);}' .
|
1282 |
+
'}
|
1283 |
+
if(run<5)run--;' .
|
1284 |
+
'}' .
|
1285 |
+
|
1286 |
+
// Previous
|
1287 |
+
'function panPrev(e) {
|
1288 |
+
e.preventDefault();
|
1289 |
+
abort = true;
|
1290 |
+
var stop;
|
1291 |
+
if ( ! stop ) {
|
1292 |
+
stop = true;
|
1293 |
+
$(this).css({opacity:0.5});
|
1294 |
+
$("#wppa-overlay-ic").css({display:"none"});
|
1295 |
+
$("#wppa-ovl-spin").show();
|
1296 |
+
wppaOvlShowPrev();
|
1297 |
+
}
|
1298 |
+
}' .
|
1299 |
+
|
1300 |
+
// Next
|
1301 |
+
'function panNext(e) {
|
1302 |
+
e.preventDefault();
|
1303 |
+
abort = true;
|
1304 |
+
var stop;
|
1305 |
+
if ( ! stop ) {
|
1306 |
+
stop = true;
|
1307 |
+
$(this).css({opacity:0.5});
|
1308 |
+
$("#wppa-overlay-ic").css({display:"none"});
|
1309 |
+
$("#wppa-ovl-spin").show();
|
1310 |
+
wppaOvlShowNext();
|
1311 |
+
}
|
1312 |
+
}' .
|
1313 |
+
|
1314 |
+
// Horizontal movement by button
|
1315 |
+
'function onRightMouseDown(e){
|
1316 |
+
e.preventDefault();
|
1317 |
+
run=5;deltaX=3;render();
|
1318 |
+
}' .
|
1319 |
+
|
1320 |
+
'function onLeftMouseDown(e){
|
1321 |
+
e.preventDefault();
|
1322 |
+
run=5;deltaX=-3;render();
|
1323 |
+
}' .
|
1324 |
+
|
1325 |
+
// Vertical movement by button
|
1326 |
+
'function onUpMouseDown(e){
|
1327 |
+
e.preventDefault();
|
1328 |
+
run=5;deltaY=-3;render();
|
1329 |
+
}' .
|
1330 |
+
|
1331 |
+
'function onDownMouseDown(e){
|
1332 |
+
e.preventDefault();
|
1333 |
+
run=5;deltaY=3;render();
|
1334 |
+
}' .
|
1335 |
+
|
1336 |
+
// Zooming
|
1337 |
+
'function onZoomInMouseDown(e){
|
1338 |
+
e.preventDefault();
|
1339 |
+
run=5;deltaFactor=1.005;render();
|
1340 |
+
}' .
|
1341 |
+
|
1342 |
+
'function onZoomOutMouseDown(e){
|
1343 |
+
e.preventDefault();
|
1344 |
+
run=5;deltaFactor=0.995;render();
|
1345 |
+
}' .
|
1346 |
+
|
1347 |
+
// Mouse wheel
|
1348 |
+
'function onDivWheel(e) {
|
1349 |
+
e.preventDefault();
|
1350 |
+
run=(autorun?5:4);
|
1351 |
+
deltaFactor = 1 + e.deltaY * zoomsensitivity / 1000;
|
1352 |
+
if ( ! autorun ) render();
|
1353 |
+
setTimeout(function(){deltaFactor = 1}, 25);
|
1354 |
+
e.stopPropagation();
|
1355 |
+
}' .
|
1356 |
+
|
1357 |
+
// When a navigation button is released, stop and reset all deltas
|
1358 |
+
'function onButtonUp(e) {
|
1359 |
+
e.preventDefault();
|
1360 |
+
deltaX=0;deltaY=0;deltaFactor=1;
|
1361 |
+
if ( ! ' . $lightbox . ' ) run--;
|
1362 |
+
run=4;
|
1363 |
+
}' .
|
1364 |
+
|
1365 |
+
// When a (responsive) resize is required, we resize the wppaScene
|
1366 |
+
'function onResize' . $mocc . '(e){' .
|
1367 |
+
|
1368 |
+
'if (abort) return;' .
|
1369 |
+
|
1370 |
+
( $lightbox ?
|
1371 |
+
|
1372 |
+
// Show image container
|
1373 |
+
'$("#wppa-overlay-ic").css("display", "");' .
|
1374 |
+
|
1375 |
+
// There are 4 possiblilities: all combi of 'Width is the limit or not' and 'Mode is normal or fullscreen'
|
1376 |
+
'var widthIsLim,
|
1377 |
+
modeIsNormal = wppaOvlMode == "normal";' .
|
1378 |
+
|
1379 |
+
// First find container dimensions dependant of mode
|
1380 |
+
'var contWidth, contHeight;
|
1381 |
+
|
1382 |
+
if ( modeIsNormal ) {
|
1383 |
+
contWidth = window.innerWidth ? window.innerWidth : screen.width;
|
1384 |
+
contHeight = window.innerHeight ? window.innerHeight : screen.height;
|
1385 |
+
}
|
1386 |
+
else {
|
1387 |
+
contWidth = screen.width;
|
1388 |
+
contHeight = screen.height;
|
1389 |
+
}
|
1390 |
+
newWidth = parseInt(newWidth);
|
1391 |
+
newHeight = parseInt(newHeight);
|
1392 |
+
' .
|
1393 |
+
|
1394 |
+
// Initialize new display sizes
|
1395 |
+
'var newWidth,
|
1396 |
+
newHeight,
|
1397 |
+
topMarg,
|
1398 |
+
leftMarg,
|
1399 |
+
extraX = 8,
|
1400 |
+
extraY = 24 + ' . ( $controls ? $icsiz : 0 ) . ' + contWidth * ' . $height . ' / ' . $width . ' + 40;' .
|
1401 |
+
|
1402 |
+
// Add borderwidth in case of mode == normal
|
1403 |
+
'if ( modeIsNormal ) {
|
1404 |
+
extraX += 2 * ' . wppa_opt( 'ovl_border_width' ) . ';
|
1405 |
+
extraY += 2 * ' . wppa_opt( 'ovl_border_width' ) . ';
|
1406 |
+
}
|
1407 |
+
' .
|
1408 |
+
|
1409 |
+
// Find out if the width is the limitng dimension
|
1410 |
+
'widthIsLim = ( contHeight > ( ( contWidth / 2 ) + extraY ) );' .
|
1411 |
+
|
1412 |
+
// Compute new sizes and margins
|
1413 |
+
'if ( widthIsLim ) {
|
1414 |
+
newWidth = contWidth - extraX;
|
1415 |
+
newHeight = newWidth / 2;
|
1416 |
+
topMarg = ( contHeight - newHeight - extraY ) / 2 + 20;' .
|
1417 |
+
'}
|
1418 |
+
else {
|
1419 |
+
newWidth = 2 * ( contHeight - ' . ( $controls ? $icsiz : 0 ) . ' - 24 - 40 ) / ( 1 + 2 * ' . $height . ' / ' . $width . ' );
|
1420 |
+
newHeight = newWidth / 2;
|
1421 |
+
topMarg = 20;' .
|
1422 |
+
'}' .
|
1423 |
+
|
1424 |
+
// Set css common for all 4 situations
|
1425 |
+
'$("#wppa-ovl-pan-container").css({marginTop:topMarg});
|
1426 |
+
$("#wppa-overlay-ic").css({marginTop:0});
|
1427 |
+
|
1428 |
+
canvas.width = newWidth;
|
1429 |
+
canvas.height = newHeight;
|
1430 |
+
prevCanvas.width = newWidth;
|
1431 |
+
prevCanvas.height = newWidth * ' . $height . ' / ' . $width . ';' .
|
1432 |
+
|
1433 |
+
// Now set css for all 4 situations: Mode is normal
|
1434 |
+
'if ( modeIsNormal ) {' .
|
1435 |
+
|
1436 |
+
// Common for mode normal
|
1437 |
+
'$("#wppa-ovl-pan-container").css({
|
1438 |
+
backgroundColor:"' . wppa_opt( 'ovl_theme' ) . '",
|
1439 |
+
padding:"' . wppa_opt( 'ovl_border_width' ) . 'px",
|
1440 |
+
borderRadius:"' . wppa_opt( 'ovl_border_radius' ) . 'px",
|
1441 |
+
width:newWidth,
|
1442 |
+
marginLeft:0
|
1443 |
+
});
|
1444 |
+
$( "#wppa-pctl-div-' . $mocc . '" ).css({marginLeft:0});' .
|
1445 |
+
|
1446 |
+
// Limit specific
|
1447 |
+
'if ( widthIsLim ) {
|
1448 |
+
$("#wppa-overlay-ic").css({marginLeft:4});
|
1449 |
+
}
|
1450 |
+
else {
|
1451 |
+
$("#wppa-overlay-ic").css({marginLeft:(contWidth-newWidth)/2});
|
1452 |
+
}
|
1453 |
+
}' .
|
1454 |
+
|
1455 |
+
// Mode is fullscreen
|
1456 |
+
'else {' .
|
1457 |
+
|
1458 |
+
// Common for mode fullscreen
|
1459 |
+
'$("#wppa-overlay-ic").css({marginLeft:0});
|
1460 |
+
$("#wppa-ovl-pan-container").css({
|
1461 |
+
backgroundColor:"transparent",
|
1462 |
+
padding:0,
|
1463 |
+
borderRadius:0,
|
1464 |
+
width:newWidth,
|
1465 |
+
marginLeft:(contWidth-newWidth)/2
|
1466 |
+
});
|
1467 |
+
$("#wppa-pctl-div-' . $mocc . '").css({marginLeft:0});
|
1468 |
+
}' .
|
1469 |
+
|
1470 |
+
'run=(autorun?5:4);
|
1471 |
+
render();
|
1472 |
+
' :
|
1473 |
+
|
1474 |
+
// Not lightbox
|
1475 |
+
'canvasWidth = $(div).parent().width();' .
|
1476 |
+
'canvasHeight = canvasWidth / 2;' .
|
1477 |
+
'canvas.width = canvasWidth;' .
|
1478 |
+
'canvas.height = canvasHeight;' .
|
1479 |
+
'prevCanvas.width = canvasWidth;' .
|
1480 |
+
'prevCanvas.height = canvasWidth * ' . $height . ' / ' . $width . ';' .
|
1481 |
+
'run=(autorun?5:4);' .
|
1482 |
+
'render();'
|
1483 |
+
) .
|
1484 |
+
|
1485 |
+
'}' .
|
1486 |
+
|
1487 |
+
// when the mouse is pressed on the canvas, we switch to manual control and save current coordinates
|
1488 |
+
'function onCanvasMouseDown(e){
|
1489 |
+
e.preventDefault();
|
1490 |
+
manualControl = true;
|
1491 |
+
savedCanvasX = e.offsetX;
|
1492 |
+
savedCanvasY = e.offsetY;
|
1493 |
+
run=5;
|
1494 |
+
render();
|
1495 |
+
}' .
|
1496 |
+
|
1497 |
+
'function onCanvasMouseMove(e){
|
1498 |
+
if ( manualControl ){
|
1499 |
+
var factor = canvas.width / fromWidth;
|
1500 |
+
var x = ( savedCanvasX - e.offsetX ) / factor + fromX;
|
1501 |
+
var y = ( savedCanvasY - e.offsetY ) / factor + fromY;
|
1502 |
+
|
1503 |
+
if ( x > 0 && y > 0 && ( x + fromWidth ) < image' . $mocc . '.width && ( y + fromHeight ) < image' . $mocc . '.height ) {
|
1504 |
+
fromX = x;
|
1505 |
+
fromY = y;
|
1506 |
+
savedCanvasX = e.offsetX;
|
1507 |
+
savedCanvasY = e.offsetY;
|
1508 |
+
}
|
1509 |
+
}
|
1510 |
+
}' .
|
1511 |
+
|
1512 |
+
'function onPrevCanvasMouseMove(e){
|
1513 |
+
var factor = prevCanvas.width / image' . $mocc . '.width;
|
1514 |
+
|
1515 |
+
if (e.offsetX > factor * fromX &&
|
1516 |
+
e.offsetX < factor * ( fromX + fromWidth ) &&
|
1517 |
+
e.offsetY > factor * fromY &&
|
1518 |
+
e.offsetY < factor * ( fromY + fromHeight ) ) {
|
1519 |
+
$(prevCanvas).css("cursor","grab");
|
1520 |
+
}
|
1521 |
+
else {
|
1522 |
+
$(prevCanvas).css("cursor","default");
|
1523 |
+
}
|
1524 |
+
|
1525 |
+
if ( manualControl && !busy ){
|
1526 |
+
if (e.offsetX > factor * fromX &&
|
1527 |
+
e.offsetX < factor * ( fromX + fromWidth ) &&
|
1528 |
+
e.offsetY > factor * fromY &&
|
1529 |
+
e.offsetY < factor * ( fromY + fromHeight ) ) {
|
1530 |
+
fromX = ( e.offsetX - savedCanvasX ) / factor + fromX;
|
1531 |
+
fromY = ( e.offsetY - savedCanvasY ) / factor + fromY;
|
1532 |
+
savedCanvasX = e.offsetX;
|
1533 |
+
savedCanvasY = e.offsetY;
|
1534 |
+
}
|
1535 |
+
}
|
1536 |
+
}' .
|
1537 |
|
1538 |
+
'function onCanvasMouseUp(e){
|
1539 |
+
if ( manualControl ) {
|
1540 |
+
run=4;
|
1541 |
+
manualControl = false;
|
1542 |
+
}
|
1543 |
+
}' .
|
1544 |
+
'}
|
1545 |
|
1546 |
+
</script>
|
1547 |
+
' . ( $haslink ? '<a>' : '' ) . '';
|
1548 |
|
1549 |
+
return wppa_pan_min( $result );
|
1550 |
+
}
|
1551 |
|
1552 |
+
// Just zoomable/pannable
|
1553 |
+
function wppa_get_zoom_pan_html( $args ) {
|
|
|
|
|
1554 |
|
1555 |
+
// Init
|
1556 |
+
$defaults = array( 'id' => '0',
|
1557 |
+
'mocc' => '0',
|
1558 |
+
'width' => false,
|
1559 |
+
'height' => false,
|
1560 |
+
'haslink' => false,
|
1561 |
+
'lightbox' => 0,
|
1562 |
+
'controls' => true,
|
1563 |
+
'autorun' => '',
|
1564 |
+
'manual' => true,
|
1565 |
+
'autorunspeed' => '3',
|
1566 |
+
'zoomsensitivity' => '3',
|
1567 |
+
);
|
1568 |
|
1569 |
+
$args = wp_parse_args( $args, $defaults );
|
1570 |
|
1571 |
+
$id = strval( intval ( $args['id'] ) );
|
1572 |
+
$mocc = $args['mocc'] ? $args['mocc'] : wppa( 'mocc' );
|
1573 |
+
$itemid = $mocc . '-' . $id;
|
1574 |
+
$width = $args['width'] ? $args['width'] : wppa_get_container_width();
|
1575 |
+
$height = $args['height'] ? $args['height'] : round( $width * wppa_get_photoy( $id ) / wppa_get_photox( $id ) );
|
1576 |
+
$haslink = $args['haslink'];
|
1577 |
+
$icsiz = wppa_opt( 'nav_icon_size_panorama' );
|
1578 |
+
$iconsize = $icsiz . 'px;';
|
1579 |
+
$lightbox = $args['lightbox'];
|
1580 |
+
$controls = $args['controls'];
|
1581 |
+
$zoomsensitivity = $args['zoomsensitivity'];
|
1582 |
+
$url = esc_url( wppa_is_mobile() ? wppa_get_photo_url( $id ) : wppa_get_hires_url( $id ) );
|
1583 |
+
$manual = $args['manual'];
|
1584 |
|
1585 |
+
$result =
|
1586 |
+
( $lightbox ? $id . '.' : '' ) .
|
1587 |
+
( $haslink ? '</a>' : '' ) .
|
1588 |
|
1589 |
+
// The overall container
|
1590 |
+
( $lightbox ?
|
1591 |
+
'<div
|
1592 |
+
id="wppa-ovl-pan-container"
|
1593 |
+
style="background-color:' . wppa_opt( 'ovl_theme' ) . ';"
|
1594 |
+
>' : '' ) .
|
1595 |
+
|
1596 |
+
// The canvas container
|
1597 |
+
'<div
|
1598 |
+
id="wppa-pan-div-' . $itemid . '"
|
1599 |
+
class="wppa-pan-div wppa-pan-div-' . $mocc . '"
|
1600 |
+
style="' . ( $controls ? 'margin-bottom:4px;' : '' ) . 'line-height:0;"
|
1601 |
+
>' .
|
1602 |
|
1603 |
+
// The actual drawing area
|
1604 |
+
'<canvas
|
1605 |
+
id="wppa-pan-canvas-' . $itemid . '"
|
1606 |
+
style="background-color:black;' . ( $manual ? 'cursor:grab;' : '' ) . '
|
1607 |
+
width:' . $width . ';height:' . $height . ';"
|
1608 |
+
data-mocc="' . $mocc . '"
|
1609 |
+
>
|
1610 |
+
</canvas>
|
1611 |
+
</div>' .
|
1612 |
+
|
1613 |
+
// The controlbar
|
1614 |
+
( $controls ?
|
1615 |
+
'<div
|
1616 |
+
id="wppa-pctl-div-' . $itemid . '"
|
1617 |
+
class="wppa-pctl-div wppa-pctl-div-' . $itemid . '"
|
1618 |
+
style="text-align:center;"
|
1619 |
+
>' .
|
1620 |
|
1621 |
+
// If lightbox: prev button
|
1622 |
+
( $lightbox ?
|
1623 |
+
'<span
|
1624 |
+
id="wppa-pctl-prev-' . $itemid . '"
|
1625 |
+
class="wppa-pan-prevnext"
|
1626 |
+
style="margin:0 2px 0 0;float:left;display:inline-block;"
|
1627 |
+
>' .
|
1628 |
+
wppa_get_svghtml( 'Prev-Button', $iconsize, true ) .
|
1629 |
+
'</span>' :
|
1630 |
+
'' ) .
|
1631 |
|
1632 |
+
// The nav buttons
|
1633 |
+
'<span
|
1634 |
+
id="wppa-pctl-left-' . $itemid . '"
|
1635 |
+
style="margin:0 2px;display:inline-block;"
|
1636 |
+
data-mocc="' . $mocc . '"
|
1637 |
+
>' .
|
1638 |
+
wppa_get_svghtml( 'Left-4', $iconsize, true ) .
|
1639 |
+
'</span>
|
1640 |
+
<span
|
1641 |
+
id="wppa-pctl-right-' . $itemid . '"
|
1642 |
+
style="margin:0 2px;display:inline-block;"
|
1643 |
+
data-mocc="' . $mocc . '"
|
1644 |
+
>' .
|
1645 |
+
wppa_get_svghtml( 'Right-4', $iconsize, true ) .
|
1646 |
+
'</span>
|
1647 |
+
<span
|
1648 |
+
id="wppa-pctl-up-' . $itemid . '"
|
1649 |
+
style="margin:0 2px;display:inline-block;"
|
1650 |
+
data-mocc="' . $mocc . '"
|
1651 |
+
>' .
|
1652 |
+
wppa_get_svghtml( 'Up-4', $iconsize, true ) .
|
1653 |
+
'</span>
|
1654 |
+
<span
|
1655 |
+
id="wppa-pctl-down-' . $itemid . '"
|
1656 |
+
style="margin:0 2px;display:inline-block;"
|
1657 |
+
data-mocc="' . $mocc . '"
|
1658 |
+
>' .
|
1659 |
+
wppa_get_svghtml( 'Down-4', $iconsize, true ) .
|
1660 |
+
'</span>
|
1661 |
+
<span
|
1662 |
+
id="wppa-pctl-zoomin-' . $itemid . '"
|
1663 |
+
style="margin:0 2px;display:inline-block;"
|
1664 |
+
data-mocc="' . $mocc . '"
|
1665 |
+
>' .
|
1666 |
+
wppa_get_svghtml( 'ZoomIn', $iconsize, true ) .
|
1667 |
+
'</span>
|
1668 |
+
<span
|
1669 |
+
id="wppa-pctl-zoomout-' . $itemid . '"
|
1670 |
+
style="margin:0 2px;display:inline-block;"
|
1671 |
+
data-mocc="' . $mocc . '"
|
1672 |
+
>' .
|
1673 |
+
wppa_get_svghtml( 'ZoomOut', $iconsize, true ) .
|
1674 |
+
'</span>' .
|
1675 |
|
1676 |
+
// If lightbox: next button
|
1677 |
+
( $lightbox ?
|
1678 |
+
'<span
|
1679 |
+
id="wppa-pctl-next-' . $itemid . '"
|
1680 |
+
class="wppa-pan-prevnext"
|
1681 |
+
style="margin:0 0 0 2px;float:right;display:inline-block;"
|
1682 |
+
>' .
|
1683 |
+
wppa_get_svghtml( 'Next-Button', $iconsize, true ) .
|
1684 |
+
'</span>' :
|
1685 |
+
'' ) .
|
1686 |
+
'</div>' :
|
1687 |
+
'' ) .
|
1688 |
+
|
1689 |
+
// wppa-ovl-pan-container
|
1690 |
+
( $lightbox ?
|
1691 |
+
'</div>' : '' );
|
1692 |
+
|
1693 |
+
// The js part
|
1694 |
+
$result .=
|
1695 |
+
'<script>' .
|
1696 |
+
|
1697 |
+
// Create image object and add the image url to it
|
1698 |
+
'var image = new Image();
|
1699 |
+
image.src = "' . $url . '";' .
|
1700 |
+
|
1701 |
+
'var args={ mocc:' . $mocc . ',
|
1702 |
+
id:' . $id . ',
|
1703 |
+
isLightbox:' . ( $lightbox ? 'true' : 'false' ) . ',
|
1704 |
+
image:image,
|
1705 |
+
zoomsensitivity:' . $zoomsensitivity . ',
|
1706 |
+
isMobile:' . ( wppa_is_mobile() ? 'true' : 'false' ) . ',
|
1707 |
+
borderWidth:' . wppa_opt( 'ovl_border_width' ) . ',
|
1708 |
+
controls:' . ( $controls ? 'true' : 'false' ) . ',
|
1709 |
+
height:' . $height . ',
|
1710 |
+
width:' . $width . ',
|
1711 |
+
initialized:false,
|
1712 |
+
icsize:' . wppa_opt( 'nav_icon_size_panorama' ) . '
|
1713 |
+
};
|
1714 |
+
wppaZoomableData[' . $mocc . '] = args;' .
|
1715 |
+
|
1716 |
+
// When document complete, run the main proc
|
1717 |
+
'jQuery(document).ready(function(){wppaDoZoomPan();});' .
|
1718 |
+
|
1719 |
+
'</script>
|
1720 |
+
' . ( $haslink ? '<a>' : '' ) . '';
|
1721 |
|
1722 |
return wppa_pan_min( $result );
|
1723 |
}
|
wppa-settings-autosave.php
CHANGED
@@ -4560,6 +4560,15 @@ global $wppa_supported_camara_brands;
|
|
4560 |
$tags = 'system';
|
4561 |
wppa_setting($slug, '36', $name, $desc, $html, $help, $clas, $tags);
|
4562 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4563 |
}
|
4564 |
wppa_setting_subheader( 'B', '1', __( 'Slideshow related settings' , 'wp-photo-album-plus') );
|
4565 |
{
|
@@ -9433,6 +9442,16 @@ global $wppa_supported_camara_brands;
|
|
9433 |
$clas = '';
|
9434 |
$tags = 'system';
|
9435 |
wppa_setting($slug, '20', $name, $desc, $html, $help, $clas, $tags);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9436 |
}
|
9437 |
wppa_setting_subheader( 'C', '1', __( 'SEO related settings' , 'wp-photo-album-plus') );
|
9438 |
{
|
4560 |
$tags = 'system';
|
4561 |
wppa_setting($slug, '36', $name, $desc, $html, $help, $clas, $tags);
|
4562 |
|
4563 |
+
$name = __('Enable zooming', 'wp-photo-album-plus');
|
4564 |
+
$desc = __('Enable zooming and panning', 'wp-photo-album-plus');
|
4565 |
+
$help = '';
|
4566 |
+
$slug = 'wppa_zoom_on';
|
4567 |
+
$html = wppa_checkbox($slug);
|
4568 |
+
$clas = '';
|
4569 |
+
$tags = 'system';
|
4570 |
+
wppa_setting($slug, '37', $name, $desc, $html, $help, $clas, $tags);
|
4571 |
+
|
4572 |
}
|
4573 |
wppa_setting_subheader( 'B', '1', __( 'Slideshow related settings' , 'wp-photo-album-plus') );
|
4574 |
{
|
9442 |
$clas = '';
|
9443 |
$tags = 'system';
|
9444 |
wppa_setting($slug, '20', $name, $desc, $html, $help, $clas, $tags);
|
9445 |
+
|
9446 |
+
$name = __('Max in shortcode generator', 'wp-photo-album-plus');
|
9447 |
+
$desc = __('Maximum nuber of selectable photos in the shortcode generators', 'wp-photo-album-plus');
|
9448 |
+
$help = '';
|
9449 |
+
$slug = 'wppa_generator_max';
|
9450 |
+
$opts = array( '5', '10', '20', '50', '100', '200', '500', '1000', '2000', '5000' );
|
9451 |
+
$vals = $opts;
|
9452 |
+
$html = wppa_select($slug, $opts, $vals);
|
9453 |
+
wppa_setting($slug, '21', $name, $desc, $html, $help, $clas, $tags);
|
9454 |
+
|
9455 |
}
|
9456 |
wppa_setting_subheader( 'C', '1', __( 'SEO related settings' , 'wp-photo-album-plus') );
|
9457 |
{
|
wppa-statistics.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* Functions for counts etc
|
6 |
* Common use front and admin
|
7 |
-
* Version 7.
|
8 |
*
|
9 |
*/
|
10 |
|
@@ -256,13 +256,13 @@ global $wppa_session;
|
|
256 |
$count = $wpdb->get_var( $wpdb->prepare( "SELECT views FROM $wpdb->wppa_albums WHERE id = %d", $id ) );
|
257 |
$count++;
|
258 |
$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->wppa_albums SET views = %d WHERE id = %d", $count, $id ) );
|
259 |
-
wppa_log( 'dbg', 'Bumped viewcount for album ' . $id . ' to ' . $count );
|
260 |
}
|
261 |
else {
|
262 |
$count = $wpdb->get_var( $wpdb->prepare( "SELECT views FROM $wpdb->wppa_photos WHERE id = %d", $id ) );
|
263 |
$count++;
|
264 |
$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->wppa_photos SET views = %d WHERE id = %d", $count, $id ) );
|
265 |
-
wppa_log( 'dbg', 'Bumped viewcount for photo ' . $id . ' to ' . $count );
|
266 |
}
|
267 |
|
268 |
// If 'wppa_owner_to_name'
|
@@ -277,7 +277,7 @@ global $wppa_session;
|
|
277 |
}
|
278 |
}
|
279 |
else {
|
280 |
-
wppa_log( 'dbg', 'Viewcount not bumped for ' . $type . ' nr ' . $id . ', duplicate.' );
|
281 |
}
|
282 |
}
|
283 |
|
4 |
*
|
5 |
* Functions for counts etc
|
6 |
* Common use front and admin
|
7 |
+
* Version 7.4.02
|
8 |
*
|
9 |
*/
|
10 |
|
256 |
$count = $wpdb->get_var( $wpdb->prepare( "SELECT views FROM $wpdb->wppa_albums WHERE id = %d", $id ) );
|
257 |
$count++;
|
258 |
$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->wppa_albums SET views = %d WHERE id = %d", $count, $id ) );
|
259 |
+
// wppa_log( 'dbg', 'Bumped viewcount for album ' . $id . ' to ' . $count );
|
260 |
}
|
261 |
else {
|
262 |
$count = $wpdb->get_var( $wpdb->prepare( "SELECT views FROM $wpdb->wppa_photos WHERE id = %d", $id ) );
|
263 |
$count++;
|
264 |
$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->wppa_photos SET views = %d WHERE id = %d", $count, $id ) );
|
265 |
+
// wppa_log( 'dbg', 'Bumped viewcount for photo ' . $id . ' to ' . $count );
|
266 |
}
|
267 |
|
268 |
// If 'wppa_owner_to_name'
|
277 |
}
|
278 |
}
|
279 |
else {
|
280 |
+
// wppa_log( 'dbg', 'Viewcount not bumped for ' . $type . ' nr ' . $id . ', duplicate.' );
|
281 |
}
|
282 |
}
|
283 |
|
wppa-tinymce-common.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-tinymce-common.php
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
-
* Version 7.
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -117,7 +117,7 @@ global $wpdb;
|
|
117 |
'<br />'.
|
118 |
'<small style="" class="wppamyphoto-photo" >'.
|
119 |
__('Specify the photo to be used', 'wp-photo-album-plus').'<br />'.
|
120 |
-
__('You can select one of your photos from a maximum of
|
121 |
'</small>'.
|
122 |
'</td>'.
|
123 |
'</tr>' .
|
@@ -133,7 +133,7 @@ global $wpdb;
|
|
133 |
'<br />' .
|
134 |
'<small style="" class="wppaphoto-allphoto" >'.
|
135 |
__('Specify the photo to be used', 'wp-photo-album-plus').'<br />'.
|
136 |
-
__('You can select from a maximum of
|
137 |
'</small>'.
|
138 |
'</td>'.
|
139 |
'</tr>'.
|
@@ -344,7 +344,7 @@ global $wpdb;
|
|
344 |
FROM $wpdb->wppa_photos
|
345 |
WHERE owner = %s
|
346 |
ORDER BY timestamp DESC
|
347 |
-
LIMIT
|
348 |
|
349 |
if ( $my_photos ) {
|
350 |
|
@@ -406,10 +406,9 @@ global $wpdb;
|
|
406 |
$result = '';
|
407 |
|
408 |
// Prepare photoinfo
|
409 |
-
$all_photos = $wpdb->get_results(
|
410 |
-
|
411 |
-
|
412 |
-
ARRAY_A );
|
413 |
|
414 |
if ( $all_photos ) {
|
415 |
|
2 |
/* wppa-tinymce-common.php
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
+
* Version 7.4.02
|
6 |
*
|
7 |
*/
|
8 |
|
117 |
'<br />'.
|
118 |
'<small style="" class="wppamyphoto-photo" >'.
|
119 |
__('Specify the photo to be used', 'wp-photo-album-plus').'<br />'.
|
120 |
+
sprintf( __('You can select one of your photos from a maximum of %d most recently added', 'wp-photo-album-plus'), wppa_opt( 'generator_max' ) ).'<br />'.
|
121 |
'</small>'.
|
122 |
'</td>'.
|
123 |
'</tr>' .
|
133 |
'<br />' .
|
134 |
'<small style="" class="wppaphoto-allphoto" >'.
|
135 |
__('Specify the photo to be used', 'wp-photo-album-plus').'<br />'.
|
136 |
+
sprintf( __('You can select from a maximum of %d most recently added photos', 'wp-photo-album-plus'), wppa_opt( 'generator_max' ) ).'<br />'.
|
137 |
'</small>'.
|
138 |
'</td>'.
|
139 |
'</tr>'.
|
344 |
FROM $wpdb->wppa_photos
|
345 |
WHERE owner = %s
|
346 |
ORDER BY timestamp DESC
|
347 |
+
LIMIT %d", wppa_get_user(), wppa_opt( 'generator_max' ) ), ARRAY_A );
|
348 |
|
349 |
if ( $my_photos ) {
|
350 |
|
406 |
$result = '';
|
407 |
|
408 |
// Prepare photoinfo
|
409 |
+
$all_photos = $wpdb->get_results( $wpdb->prepare( "SELECT id, name, album, ext
|
410 |
+
FROM $wpdb->wppa_photos
|
411 |
+
ORDER BY timestamp DESC LIMIT %d", wppa_opt( 'generator_max' ) ), ARRAY_A );
|
|
|
412 |
|
413 |
if ( $all_photos ) {
|
414 |
|
wppa-tinymce-shortcodes.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-tinymce-shortcodes.php
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
-
* Version 7.
|
6 |
*/
|
7 |
|
8 |
if ( ! defined( 'ABSPATH' ) )
|
@@ -82,10 +82,10 @@ global $wpdb;
|
|
82 |
}
|
83 |
|
84 |
// Prepare photoinfo
|
85 |
-
$photos = $wpdb->get_results( "SELECT id, name, album, ext
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
|
90 |
// Get Tags/cats
|
91 |
$tags = wppa_get_taglist();
|
@@ -531,7 +531,7 @@ global $wpdb;
|
|
531 |
'<br />'.
|
532 |
'<small style="display:none;" class="wppagallery-photo" >'.
|
533 |
__('Specify the photo to be used', 'wp-photo-album-plus').'<br />'.
|
534 |
-
__('You can select from a maximum of
|
535 |
'</small>'.
|
536 |
'</td>'.
|
537 |
'</tr>'.
|
2 |
/* wppa-tinymce-shortcodes.php
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
+
* Version 7.4.02
|
6 |
*/
|
7 |
|
8 |
if ( ! defined( 'ABSPATH' ) )
|
82 |
}
|
83 |
|
84 |
// Prepare photoinfo
|
85 |
+
$photos = $wpdb->get_results( $wpdb->prepare( "SELECT id, name, album, ext
|
86 |
+
FROM $wpdb->wppa_photos
|
87 |
+
ORDER BY timestamp DESC
|
88 |
+
LIMIT %d", wppa_opt( 'generator_max' ) ), ARRAY_A );
|
89 |
|
90 |
// Get Tags/cats
|
91 |
$tags = wppa_get_taglist();
|
531 |
'<br />'.
|
532 |
'<small style="display:none;" class="wppagallery-photo" >'.
|
533 |
__('Specify the photo to be used', 'wp-photo-album-plus').'<br />'.
|
534 |
+
sprintf( __('You can select from a maximum of $d most recently added photos', 'wp-photo-album-plus'), wppa_opt( 'generator_max' ) ).'<br />'.
|
535 |
'</small>'.
|
536 |
'</td>'.
|
537 |
'</tr>'.
|
wppa-utils.php
CHANGED
@@ -3030,6 +3030,28 @@ function wppa_is_multi( $id ) {
|
|
3030 |
return ( $ext == 'xxx' );
|
3031 |
}
|
3032 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3033 |
function wppa_fix_poster_ext( $fileorurl, $id ) {
|
3034 |
|
3035 |
// Has it extension .xxx ?
|
@@ -3904,54 +3926,6 @@ function wppa_print_tree( $path ) {
|
|
3904 |
}
|
3905 |
}
|
3906 |
|
3907 |
-
function wppa_process_failed_mail( $to = '', $subject = '', $message = '', $headers = '', $att = '' ) {
|
3908 |
-
|
3909 |
-
// Ignore mails that lack essential data
|
3910 |
-
if ( ! $to || ! $subject || ! $message ) {
|
3911 |
-
return;
|
3912 |
-
}
|
3913 |
-
|
3914 |
-
// Log mail failed
|
3915 |
-
wppa_log( 'Err', 'Failed mail. To = ' . ( is_array( $to ) ? implode( '|', $to ) : $to ) . ', Subject = ' . $subject . ', Message = ' . $message );
|
3916 |
-
|
3917 |
-
// Compute mail id
|
3918 |
-
$id = md5( ( is_array( $to ) ? implode( '|', $to ) : $to ) . $subject . $message );
|
3919 |
-
|
3920 |
-
// Get stack of failed mails
|
3921 |
-
$failed_mails = wppa_get_option( 'wppa_failed_mails' );
|
3922 |
-
|
3923 |
-
// If no failed mails yet, create array
|
3924 |
-
if ( ! is_array( $failed_mails ) ) {
|
3925 |
-
$failed_mails = array();
|
3926 |
-
}
|
3927 |
-
|
3928 |
-
// See if this mail appears in the failed mails list
|
3929 |
-
$found = false;
|
3930 |
-
foreach( array_keys( $failed_mails ) as $key ) {
|
3931 |
-
if ( $id == $key ) {
|
3932 |
-
$found = true;
|
3933 |
-
}
|
3934 |
-
}
|
3935 |
-
|
3936 |
-
// Found? do nothing
|
3937 |
-
if ( $found ) {
|
3938 |
-
return;
|
3939 |
-
}
|
3940 |
-
|
3941 |
-
// Not found, add it
|
3942 |
-
$failed_mails[$id] = array( 'to' => $to,
|
3943 |
-
'subj' => $subject,
|
3944 |
-
'message' => $message,
|
3945 |
-
'headers' => $headers,
|
3946 |
-
'att' => $att,
|
3947 |
-
'retry' => wppa_opt( 'retry_mails' ),
|
3948 |
-
);
|
3949 |
-
|
3950 |
-
// Store list
|
3951 |
-
update_option( 'wppa_failed_mails', $failed_mails );
|
3952 |
-
|
3953 |
-
}
|
3954 |
-
|
3955 |
// Returns available memory in bytes
|
3956 |
function wppa_memry_limit() {
|
3957 |
|
3030 |
return ( $ext == 'xxx' );
|
3031 |
}
|
3032 |
|
3033 |
+
// If it just a photo?
|
3034 |
+
function wppa_is_photo( $id ) {
|
3035 |
+
|
3036 |
+
if ( ! $id ) return false;
|
3037 |
+
|
3038 |
+
if ( wppa_is_multi( $id ) ) return false;
|
3039 |
+
if ( wppa_is_pdf( $id ) ) return false;
|
3040 |
+
|
3041 |
+
return true;
|
3042 |
+
}
|
3043 |
+
|
3044 |
+
// Is it a zoomable photo?
|
3045 |
+
function wppa_is_zoomable( $id ) {
|
3046 |
+
|
3047 |
+
if ( ! $id ) return false;
|
3048 |
+
|
3049 |
+
if ( ! wppa_is_photo( $id ) ) return false;
|
3050 |
+
if ( wppa_is_panorama( $id ) ) return false;
|
3051 |
+
|
3052 |
+
return ( wppa_switch( 'zoom_on' ) );
|
3053 |
+
}
|
3054 |
+
|
3055 |
function wppa_fix_poster_ext( $fileorurl, $id ) {
|
3056 |
|
3057 |
// Has it extension .xxx ?
|
3926 |
}
|
3927 |
}
|
3928 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3929 |
// Returns available memory in bytes
|
3930 |
function wppa_memry_limit() {
|
3931 |
|
wppa.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
* Plugin Name: WP Photo Album Plus
|
4 |
* Description: Easily manage and display your photo albums and slideshows within your WordPress site.
|
5 |
-
* Version: 7.4.02.
|
6 |
* Author: J.N. Breetvelt a.k.a. OpaJaap
|
7 |
* Author URI: http://wppa.opajaap.nl/
|
8 |
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
|
@@ -24,7 +24,7 @@ global $wp_version;
|
|
24 |
|
25 |
/* WPPA GLOBALS */
|
26 |
global $wppa_revno; $wppa_revno = '7402'; // WPPA db version
|
27 |
-
global $wppa_api_version; $wppa_api_version = '7.4.02.
|
28 |
|
29 |
/* Init page js data */
|
30 |
global $wppa_js_page_data; $wppa_js_page_data = '';
|
2 |
/*
|
3 |
* Plugin Name: WP Photo Album Plus
|
4 |
* Description: Easily manage and display your photo albums and slideshows within your WordPress site.
|
5 |
+
* Version: 7.4.02.003
|
6 |
* Author: J.N. Breetvelt a.k.a. OpaJaap
|
7 |
* Author URI: http://wppa.opajaap.nl/
|
8 |
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
|
24 |
|
25 |
/* WPPA GLOBALS */
|
26 |
global $wppa_revno; $wppa_revno = '7402'; // WPPA db version
|
27 |
+
global $wppa_api_version; $wppa_api_version = '7.4.02.003'; // WPPA software version
|
28 |
|
29 |
/* Init page js data */
|
30 |
global $wppa_js_page_data; $wppa_js_page_data = '';
|