WP Photo Album Plus - Version 7.3.11.006

Version Description

= 7.3.11 =

  • This version addresses various bug fixes and feature requests.
Download this release

Release Info

Developer opajaap
Plugin Icon wp plugin WP Photo Album Plus
Version 7.3.11.006
Comparing to
See all releases

Code changes from version 7.3.10.002 to 7.3.11.006

changelog.txt CHANGED
@@ -1,5 +1,13 @@
1
  WP Photo Album Plus Changelog
2
 
 
 
 
 
 
 
 
 
3
  = 7.3.10 =
4
 
5
  * The behaviour of lazy load on filmstrips has been improved.
1
  WP Photo Album Plus Changelog
2
 
3
+ = 7.3.11 =
4
+
5
+ * New thumnail types: 1. Masonry style plus. See Table IV-C3. Make sure your thumbnail size equals the thumnail framesize (Table I-C1 and 3).
6
+ This type is like masonry style vertical, but is fully mobile friendly.
7
+ 2. Masonry style mix. Uses Masonry style vert on pc and plus on mobile. Best of two worlds.
8
+ * Some minor fixes.
9
+ * New setting: Table VII-B1.0: Max nesting level. Limits the ability to create subalbums to the indicated level.
10
+
11
  = 7.3.10 =
12
 
13
  * The behaviour of lazy load on filmstrips has been improved.
js/wppa-popup.js CHANGED
@@ -3,7 +3,7 @@
3
  // Contains popup modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
- var wppaJsPopupVersion = '7.1.01';
7
 
8
  // Popup of thumbnail images
9
  function wppaPopUp( mocc, elm, id, name, desc, rating, ncom, videohtml, maxsizex, maxsizey ) {
@@ -63,6 +63,15 @@ function wppaPopUp( mocc, elm, id, name, desc, rating, ncom, videohtml, maxsizex
63
  leftDivSmall = parseInt( elm.offsetLeft ) - 7 - 5 - 1; // thumbnail_area:padding, wppa-img:padding, wppa-border; jQuery().css( "padding" ) does not work for padding in css file, only when litaral in the tag
64
  topDivSmall = parseInt( elm.offsetTop ) - 7 - 1;
65
 
 
 
 
 
 
 
 
 
 
66
  // Compute starting sizes
67
  widthImgSmall = parseInt( elm.clientWidth );
68
  heightImgSmall = parseInt( elm.clientHeight );
3
  // Contains popup modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaJsPopupVersion = '7.3.11';
7
 
8
  // Popup of thumbnail images
9
  function wppaPopUp( mocc, elm, id, name, desc, rating, ncom, videohtml, maxsizex, maxsizey ) {
63
  leftDivSmall = parseInt( elm.offsetLeft ) - 7 - 5 - 1; // thumbnail_area:padding, wppa-img:padding, wppa-border; jQuery().css( "padding" ) does not work for padding in css file, only when litaral in the tag
64
  topDivSmall = parseInt( elm.offsetTop ) - 7 - 1;
65
 
66
+ // Is it mosonry plus?
67
+ if ( jQuery( '#grid-item-'+mocc+'-'+id ).length ) {
68
+ // var gridMarg = parseInt( jQuery( '#grid-'+mocc ).css( 'marginLeft' ) ) +
69
+ // ( wppaThumbnailPitch[mocc] - parseInt( jQuery( '#grid-item-'+mocc+'-'+id ).width() ) );
70
+ //wppaConsoleLog('GridMarg='+gridMarg,'force');
71
+ leftDivSmall += parseInt( jQuery( '#grid-item-'+mocc+'-'+id ).css( 'left' ) ) + 6;// + gridMarg;
72
+ topDivSmall += parseInt( jQuery( '#grid-item-'+mocc+'-'+id ).css( 'top' ) );
73
+ }
74
+
75
  // Compute starting sizes
76
  widthImgSmall = parseInt( elm.clientWidth );
77
  heightImgSmall = parseInt( elm.clientHeight );
js/wppa-popup.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsPopupVersion="7.1.01";function wppaPopUp(p,t,e,a,r,i,o,n,d,s){var c,l,u,w,m,g,y,h,x,f,b,v=jQuery("#wppa-thumb-area-"+p).width();if(document.getElementById("x-"+e+"-"+p)){var j=(a?'<div id="wppa-name-'+p+'" style="display:none; padding:1px;" class="wppa_pu_info">'+a+"</div>":"")+(r?'<div id="wppa-desc-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+r+"</div>":"")+(i?'<div id="wppa-rat-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+i+"</div>":"")+(o?'<div id="wppa-ncom-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+o+"</div>":""),k="";switch(wppaThumbTargetBlank&&(k='target="_blank"'),wppaPopupLinkType){case"none":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;case"fullpopup":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" onclick="'+wppaPopupOnclick[e]+'" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;default:t.onclick?(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>"),document.getElementById("wppa-img-"+p).onclick=t.onclick):(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;"><a id="wppa-a" href="'+document.getElementById("x-"+e+"-"+p).href+'" '+k+' style="line-height:1px;" >'+b+"</a>"+j+"</div>"))}}f=document.getElementById("wppa-img-"+p),y=parseInt(d),m=parseInt(s),f&&jQuery(".wppa_pu_info").css("width",(m<y?y:m)-8+"px"),w=parseInt(t.offsetLeft)-7-5-1,l=parseInt(t.offsetTop)-7-1,h=parseInt(t.clientWidth),g=parseInt(t.clientHeight),x=m<y?y:m,(u=w-parseInt((x-h)/2))<0&&(u=0),v<u+y+16&&(u=v-y-16),(c=l-parseInt((m-g)/2))<0&&(c=0);var I=parseInt((x-y)/2);jQuery("#wppa-img-"+p).css({maxWidth:y+"px"}),jQuery("#wppa-popup-"+p).css({marginLeft:w+"px",marginTop:l+"px"}),jQuery("#wppa-img-"+p).css({marginLeft:0,marginRight:0,width:h+"px",height:g+"px"}),jQuery("#wppa-popup-"+p).stop().animate({marginLeft:u+"px",marginTop:c+"px"},400),jQuery("#wppa-img-"+p).stop().animate({marginLeft:I+"px",marginRight:I+"px",width:y+"px",height:m+"px"},400),setTimeout("wppaPopReady( "+p+" )",400)}function wppaPopReady(p){jQuery("#wppa-name-"+p).show(),jQuery("#wppa-desc-"+p).show(),jQuery("#wppa-rat-"+p).show(),jQuery("#wppa-ncom-"+p).show(),wppaProtect()}function wppaPopDown(p){jQuery("#wppa-popup-"+p).html("")}function wppaFullPopUp(p,t,e,a,r){var i=r+50,o=a+14,n="",d="",s=document.getElementById("i-"+t+"-"+p);s&&(n=s.alt,d=s.title);var c=".pdf"==e.substr(e.length-4,e.length),l=window.open("","Print","width="+o+", height="+i+", location=no, resizable=no, menubar=yes ");if(l.document.write("<html>"),l.document.write("<head>"),l.document.write('<style type="text/css">body{margin:0; padding:6px; background-color:'+wppaBackgroundColorImage+"; text-align:center;}</style>"),l.document.write("<title>"+n+"</title>"),l.document.write('<script type="text/javascript" src="/wp-includes/js/jquery/jquery.js" ><\/script><script type="text/javascript">function wppa_downl() {jQuery.ajax( { \turl: \t\t\''+wppaAjaxUrl+"',data: \t\t'action=wppa&wppa-action=makeorigname&photo-id="+t+"&from=popup',async: \ttrue,type: \t\t'GET',timeout: \t10000,beforeSend:\tfunction( xhr ) {},success: \t\tfunction( result, status, xhr ) {result = result.split( \"||\" );if ( result[1] == \"0\" ) {window.open( result[2] );return true;}else {alert( \"Error: \"+result[1]+\" \"+result[2] );return false;}},error: \t\tfunction( xhr, status, error ) {wppaConsoleLog( 'wppaFullPopUp failed. Error = ' + error + ', status = ' + status, 'force' );},} );}<\/script>"),l.document.write('<script type="text/javascript">function wppa_print() {document.getElementById( "wppa_printer" ).style.visibility="hidden"; document.getElementById( "wppa_download" ).style.visibility="hidden"; window.print();}<\/script>'),l.document.write("</head>"),l.document.write("<body>"),l.document.write('<div style="width:'+a+'px;">'),c?l.document.write('<iframe src="'+e+'" style="padding-bottom:6px;width:100%;height:'+(i-60)+'px;" ></iframe><br />'):l.document.write('<img src="'+e+'" style="padding-bottom:6px;" /><br />'),l.document.write('<div style="text-align:center">'+d+"</div>"),!c){var u=a-66;l.document.write('<img src="'+wppaImageDirectory+'download.png" id="wppa_download" title="Download" style="position:absolute; top:6px; left:'+u+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_downl();" />'),u=a-30,l.document.write('<img src="'+wppaImageDirectory+'printer.png" id="wppa_printer" title="Print" style="position:absolute; top:6px; left:'+u+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_print();" />')}l.document.write("</div>"),l.document.write("</body>"),l.document.write("</html>"),wppaProtect()}wppaConsoleLog("wppa-popup.js version "+wppaJsPopupVersion+" loaded.","force");
1
+ var wppaJsPopupVersion="7.3.11";function wppaPopUp(p,t,e,r,a,i,o,n,d,s){var c,l,u,w,m,g,y,h,x,f,b,v=jQuery("#wppa-thumb-area-"+p).width();if(document.getElementById("x-"+e+"-"+p)){var j=(r?'<div id="wppa-name-'+p+'" style="display:none; padding:1px;" class="wppa_pu_info">'+r+"</div>":"")+(a?'<div id="wppa-desc-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+a+"</div>":"")+(i?'<div id="wppa-rat-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+i+"</div>":"")+(o?'<div id="wppa-ncom-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+o+"</div>":""),k="";switch(wppaThumbTargetBlank&&(k='target="_blank"'),wppaPopupLinkType){case"none":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;case"fullpopup":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" onclick="'+wppaPopupOnclick[e]+'" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;default:t.onclick?(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>"),document.getElementById("wppa-img-"+p).onclick=t.onclick):(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;"><a id="wppa-a" href="'+document.getElementById("x-"+e+"-"+p).href+'" '+k+' style="line-height:1px;" >'+b+"</a>"+j+"</div>"))}}f=document.getElementById("wppa-img-"+p),y=parseInt(d),m=parseInt(s),f&&jQuery(".wppa_pu_info").css("width",(m<y?y:m)-8+"px"),w=parseInt(t.offsetLeft)-7-5-1,l=parseInt(t.offsetTop)-7-1,jQuery("#grid-item-"+p+"-"+e).length&&(w+=parseInt(jQuery("#grid-item-"+p+"-"+e).css("left"))+6,l+=parseInt(jQuery("#grid-item-"+p+"-"+e).css("top"))),h=parseInt(t.clientWidth),g=parseInt(t.clientHeight),x=m<y?y:m,(u=w-parseInt((x-h)/2))<0&&(u=0),v<u+y+16&&(u=v-y-16),(c=l-parseInt((m-g)/2))<0&&(c=0);var I=parseInt((x-y)/2);jQuery("#wppa-img-"+p).css({maxWidth:y+"px"}),jQuery("#wppa-popup-"+p).css({marginLeft:w+"px",marginTop:l+"px"}),jQuery("#wppa-img-"+p).css({marginLeft:0,marginRight:0,width:h+"px",height:g+"px"}),jQuery("#wppa-popup-"+p).stop().animate({marginLeft:u+"px",marginTop:c+"px"},400),jQuery("#wppa-img-"+p).stop().animate({marginLeft:I+"px",marginRight:I+"px",width:y+"px",height:m+"px"},400),setTimeout("wppaPopReady( "+p+" )",400)}function wppaPopReady(p){jQuery("#wppa-name-"+p).show(),jQuery("#wppa-desc-"+p).show(),jQuery("#wppa-rat-"+p).show(),jQuery("#wppa-ncom-"+p).show(),wppaProtect()}function wppaPopDown(p){jQuery("#wppa-popup-"+p).html("")}function wppaFullPopUp(p,t,e,r,a){var i=a+50,o=r+14,n="",d="",s=document.getElementById("i-"+t+"-"+p);s&&(n=s.alt,d=s.title);var c=".pdf"==e.substr(e.length-4,e.length),l=window.open("","Print","width="+o+", height="+i+", location=no, resizable=no, menubar=yes ");if(l.document.write("<html>"),l.document.write("<head>"),l.document.write('<style type="text/css">body{margin:0; padding:6px; background-color:'+wppaBackgroundColorImage+"; text-align:center;}</style>"),l.document.write("<title>"+n+"</title>"),l.document.write('<script type="text/javascript" src="/wp-includes/js/jquery/jquery.js" ><\/script><script type="text/javascript">function wppa_downl() {jQuery.ajax( { \turl: \t\t\''+wppaAjaxUrl+"',data: \t\t'action=wppa&wppa-action=makeorigname&photo-id="+t+"&from=popup',async: \ttrue,type: \t\t'GET',timeout: \t10000,beforeSend:\tfunction( xhr ) {},success: \t\tfunction( result, status, xhr ) {result = result.split( \"||\" );if ( result[1] == \"0\" ) {window.open( result[2] );return true;}else {alert( \"Error: \"+result[1]+\" \"+result[2] );return false;}},error: \t\tfunction( xhr, status, error ) {wppaConsoleLog( 'wppaFullPopUp failed. Error = ' + error + ', status = ' + status, 'force' );},} );}<\/script>"),l.document.write('<script type="text/javascript">function wppa_print() {document.getElementById( "wppa_printer" ).style.visibility="hidden"; document.getElementById( "wppa_download" ).style.visibility="hidden"; window.print();}<\/script>'),l.document.write("</head>"),l.document.write("<body>"),l.document.write('<div style="width:'+r+'px;">'),c?l.document.write('<iframe src="'+e+'" style="padding-bottom:6px;width:100%;height:'+(i-60)+'px;" ></iframe><br />'):l.document.write('<img src="'+e+'" style="padding-bottom:6px;" /><br />'),l.document.write('<div style="text-align:center">'+d+"</div>"),!c){var u=r-66;l.document.write('<img src="'+wppaImageDirectory+'download.png" id="wppa_download" title="Download" style="position:absolute; top:6px; left:'+u+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_downl();" />'),u=r-30,l.document.write('<img src="'+wppaImageDirectory+'printer.png" id="wppa_printer" title="Print" style="position:absolute; top:6px; left:'+u+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_print();" />')}l.document.write("</div>"),l.document.write("</body>"),l.document.write("</html>"),wppaProtect()}wppaConsoleLog("wppa-popup.js version "+wppaJsPopupVersion+" loaded.","force");
js/wppa-utils.js CHANGED
@@ -382,6 +382,9 @@ var wppaLastLazy = 0;
382
  // Make lazy load images visible
383
  function wppaMakeLazyVisible(mocc, extended) {
384
 
 
 
 
385
  // No mocc or mocc = 0: all mocs
386
  if ( typeof ( mocc ) != 'number' ) mocc = 0;
387
 
@@ -428,6 +431,9 @@ function wppaMakeLazyVisible(mocc, extended) {
428
  if ( jQuery( '.wppa-lazy-'+mocc ).length == 0 ) {
429
  _wppaLazyDone[mocc] = true;
430
  }
 
 
 
431
  }
432
 
433
  // check all mocc's
@@ -449,6 +455,9 @@ function wppaMakeLazyVisible(mocc, extended) {
449
  if ( jQuery( '.wppa-lazy' ).length == 0 ) {
450
  _wppaLazyDone[0] = true;
451
  }
 
 
 
452
  }
453
 
454
  var t1 = d.getTime();
@@ -460,6 +469,9 @@ function wppaMakeLazyVisible(mocc, extended) {
460
  if ( c1 > 0 ) {
461
  wppaConsoleLog( 'Redo request lazy', 'force' );
462
  setTimeout( 'wppaMakeLazyVisible('+mocc+')', 500 );
 
 
 
463
  }
464
  }
465
 
382
  // Make lazy load images visible
383
  function wppaMakeLazyVisible(mocc, extended) {
384
 
385
+ // Init masonryplus
386
+ wppaInitMasonryPlus();
387
+
388
  // No mocc or mocc = 0: all mocs
389
  if ( typeof ( mocc ) != 'number' ) mocc = 0;
390
 
431
  if ( jQuery( '.wppa-lazy-'+mocc ).length == 0 ) {
432
  _wppaLazyDone[mocc] = true;
433
  }
434
+
435
+ // Init masonryplus
436
+ wppaInitMasonryPlus(mocc);
437
  }
438
 
439
  // check all mocc's
455
  if ( jQuery( '.wppa-lazy' ).length == 0 ) {
456
  _wppaLazyDone[0] = true;
457
  }
458
+
459
+ // Init masonryplus
460
+ wppaInitMasonryPlus();
461
  }
462
 
463
  var t1 = d.getTime();
469
  if ( c1 > 0 ) {
470
  wppaConsoleLog( 'Redo request lazy', 'force' );
471
  setTimeout( 'wppaMakeLazyVisible('+mocc+')', 500 );
472
+
473
+ // Init masonryplus
474
+ wppaInitMasonryPlus();
475
  }
476
  }
477
 
js/wppa-utils.min.js CHANGED
@@ -1 +1 @@
1
- var wppaDebug,wppaJsUtilsVersion="7.3.10";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){return wppaTrimRight(wppaTrimLeft(e,t),t)}function wppaTrimLeft(e,t){var a,p,r,o,i,n,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(i=!1,s=e;!i;){for(o=0,n=s;o<t.length;)s=wppaTrimLeft(s,t[o]),o++;i=n==s}a=s;break;default:return e.replace(/^\s\s*/,"")}return a}function wppaTrimRight(e,t){var a,p,r,o,i,n,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(i=!1,s=e;!i;){for(o=0,n=s;o<t.length;)s=wppaTrimRight(s,t[o]),o++;i=n==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){var t,a,p,r=document.cookie.split(";");for(t=0;t<r.length;t++)if(a=r[t].substr(0,r[t].indexOf("=")),p=r[t].substr(r[t].indexOf("=")+1),(a=a.replace(/^\s+|\s+$/g,""))==e)return unescape(p);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,t){if("undefined"!=typeof console&&(wppaDebug||"force"==t)){var a=(new Date).getTime()%864e5,p=Math.floor(a/36e5);a-=60*p*60*1e3;var r=Math.floor(a/6e4);a-=60*r*1e3;var o=Math.floor(a/1e3);a-=1e3*o,console.log("At: "+p+":"+r+":"+o+"."+a+" message: "+e)}}function wppaSvgHtml(e,t,a,p,r,o,i,n){var s,l,c;switch(r=r||"0",o=o||"10",i=i||"20",n=n||"50",wppaSvgCornerStyle){case"gif":case"none":radius=r;break;case"light":radius=o;break;case"medium":radius=i;break;case"heavy":radius=n}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){if("number"!=typeof e&&(e=0),!_wppaLazyDone[e]){var a=new Date,p=a.getTime();if(!(p<wppaLastLazy+250)){var r,o=0,i=0;0<e?(jQuery(".wppa-lazy-"+e).each(function(){(r=jQuery(this).attr("data-src"))?wppaLazyLoad&&!wppaIsElementInViewport(this,t)||(jQuery(this).attr("src",r),jQuery(this).removeAttr("data-src"),jQuery(this).removeClass("wppa-lazy"),jQuery(this).removeClass("wppa-lazy-"+e),i++):wppaIsElementInViewport(this)&&jQuery(this).removeClass("wppa-lazy-"+e),o++}),0==jQuery(".wppa-lazy-"+e).length&&(_wppaLazyDone[e]=!0)):(jQuery(".wppa-lazy").each(function(){(r=jQuery(this).attr("data-src"))&&(wppaLazyLoad&&!wppaIsElementInViewport(this)||(jQuery(this).attr("src",r),jQuery(this).removeAttr("data-src"),jQuery(this).removeClass("wppa-lazy"),i++)),o++}),0==jQuery(".wppa-lazy").length&&(_wppaLazyDone[0]=!0));var n=a.getTime();wppaConsoleLog("MakeLazyVisible("+e+") took "+((wppaLastLazy=n)-p)+" ms. Totoal count = "+o+", modcount = "+i),0<i&&(wppaConsoleLog("Redo request lazy","force"),setTimeout("wppaMakeLazyVisible("+e+")",500))}}}function wppaIsElementInViewport(e,t){var a;"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);var p=e.getBoundingClientRect();if(p){var r=wppaWindowWidth();t&&(r*=3),a=0<p.bottom&&0<p.right&&p.left<r&&p.top<wppaWindowHeight()}else a=!0;return a}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){return e.split("&amp;").join("&").split("&gt;").join(">").split("&lt;").join("<").split("&quot;").join('"').split("&#39;").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");
1
+ var wppaDebug,wppaJsUtilsVersion="7.3.10";function wppaAnimate(e,a,t,p,r){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css(a),r&&setTimeout(r,10)):jQuery(e).stop().animate(a,t,p,r)}function wppaFadeIn(e,a,t){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:""}),t&&setTimeout(t,10)):jQuery(e).stop().fadeIn(a,t)}function wppaFadeOut(e,a,t){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"none"}),t&&setTimeout(t,10)):jQuery(e).stop().fadeOut(a,t)}function wppaFadeTo(e,a,t,p){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"",opacity:t}),p&&setTimeout(p,10)):jQuery(e).stop().fadeTo(a,t,p)}function wppaTrim(e,a){return wppaTrimRight(wppaTrimLeft(e,a),a)}function wppaTrimLeft(e,a){var t,p,r,o,n,i,s;switch(typeof a){case"string":for(p=(t=e).length,r=a.length;r<=p&&t.substr(0,r)==a;)p=(t=t.substr(r)).length;break;case"object":for(n=!1,s=e;!n;){for(o=0,i=s;o<a.length;)s=wppaTrimLeft(s,a[o]),o++;n=i==s}t=s;break;default:return e.replace(/^\s\s*/,"")}return t}function wppaTrimRight(e,a){var t,p,r,o,n,i,s;switch(typeof a){case"string":for(p=(t=e).length,r=a.length;r<=p&&t.substr(p-r)==a;)p=(t=t.substr(0,p-r)).length;break;case"object":for(n=!1,s=e;!n;){for(o=0,i=s;o<a.length;)s=wppaTrimRight(s,a[o]),o++;n=i==s}t=s;break;default:return e.replace(/\s\s*$/,"")}return t}function wppa_setCookie(e,a,t){var p=new Date;p.setDate(p.getDate()+t);var r=escape(a)+(null==t?"":"; expires="+p.toUTCString());document.cookie=e+"="+r}function wppa_getCookie(e){var a,t,p,r=document.cookie.split(";");for(a=0;a<r.length;a++)if(t=r[a].substr(0,r[a].indexOf("=")),p=r[a].substr(r[a].indexOf("=")+1),(t=t.replace(/^\s+|\s+$/g,""))==e)return unescape(p);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,a){if("undefined"!=typeof console&&(wppaDebug||"force"==a)){var t=(new Date).getTime()%864e5,p=Math.floor(t/36e5);t-=60*p*60*1e3;var r=Math.floor(t/6e4);t-=60*r*1e3;var o=Math.floor(t/1e3);t-=1e3*o,console.log("At: "+p+":"+r+":"+o+"."+t+" message: "+e)}}function wppaSvgHtml(e,a,t,p,r,o,n,i){var s,l,c;switch(r=r||"0",o=o||"10",n=n||"20",i=i||"50",wppaSvgCornerStyle){case"gif":case"none":radius=r;break;case"light":radius=o;break;case"medium":radius=n;break;case"heavy":radius=i}a=a||"32px",l=t?(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;'+(a?"height:"+a+";":"")+"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:'+a+";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,a){if(wppaInitMasonryPlus(),"number"!=typeof e&&(e=0),!_wppaLazyDone[e]){var t=new Date,p=t.getTime();if(!(p<wppaLastLazy+250)){var r,o=0,n=0;0<e?(jQuery(".wppa-lazy-"+e).each(function(){(r=jQuery(this).attr("data-src"))?wppaLazyLoad&&!wppaIsElementInViewport(this,a)||(jQuery(this).attr("src",r),jQuery(this).removeAttr("data-src"),jQuery(this).removeClass("wppa-lazy"),jQuery(this).removeClass("wppa-lazy-"+e),n++):wppaIsElementInViewport(this)&&jQuery(this).removeClass("wppa-lazy-"+e),o++}),0==jQuery(".wppa-lazy-"+e).length&&(_wppaLazyDone[e]=!0),wppaInitMasonryPlus(e)):(jQuery(".wppa-lazy").each(function(){(r=jQuery(this).attr("data-src"))&&(wppaLazyLoad&&!wppaIsElementInViewport(this)||(jQuery(this).attr("src",r),jQuery(this).removeAttr("data-src"),jQuery(this).removeClass("wppa-lazy"),n++)),o++}),0==jQuery(".wppa-lazy").length&&(_wppaLazyDone[0]=!0),wppaInitMasonryPlus());var i=t.getTime();wppaConsoleLog("MakeLazyVisible("+e+") took "+((wppaLastLazy=i)-p)+" ms. Totoal count = "+o+", modcount = "+n),0<n&&(wppaConsoleLog("Redo request lazy","force"),setTimeout("wppaMakeLazyVisible("+e+")",500),wppaInitMasonryPlus())}}}function wppaIsElementInViewport(e,a){var t;"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);var p=e.getBoundingClientRect();if(p){var r=wppaWindowWidth();a&&(r*=3),t=0<p.bottom&&0<p.right&&p.left<r&&p.top<wppaWindowHeight()}else t=!0;return t}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,a,t){var p=t?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==p?a:(wppaIsMini[e]?p/2:p)+"px;"}function wppaEntityDecode(e){return e.split("&amp;").join("&").split("&gt;").join(">").split("&lt;").join("<").split("&quot;").join('"').split("&#39;").join("'")}function wppaSetMaxWidthToParentWidth(e){var a=e.parentNode.clientWidth;jQuery(e).css({maxWidth:a})}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.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // contains common vars and functions
4
  //
5
- var wppaJsVersion = '7.3.08';
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;
@@ -249,6 +249,8 @@ var wppaOvlShowStartStop = true;
249
  var wppaOvlRadius = 0;
250
  var wppaOvlBorderWidth = 16;
251
  var wppaOvlOpen = false;
 
 
252
 
253
  // The next lightbox var values become overwritten in wppa-non-admin.php -> wppa_load_footer()
254
  // Therefor they are placed here!
@@ -338,7 +340,9 @@ function wppaDoInit() {
338
  // Make Lazy load images visible
339
  jQuery(window).on('DOMContentLoaded load resize wppascrollend orientationchange', wppaMakeLazyVisible);
340
  jQuery('.wppa-divnicewrap').on('DOMContentLoaded load resize wppascrollend wheelend orientationchange', wppaMakeLazyVisible);
341
- // wppaMakeLazyVisible();
 
 
342
 
343
  // When the window size changes, filmstrip needs immediate adjustment
344
  jQuery(window).on('resize', function(){
@@ -362,7 +366,7 @@ function wppaDoInit() {
362
  }
363
  });
364
 
365
- // Resize nicescrollers
366
  jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange", function(){
367
 
368
  setTimeout( function() {
@@ -649,10 +653,10 @@ function _wppaDoAutocol( mocc, i ) {
649
  var h;
650
  var old;
651
  var exists;
652
-
653
  // Container
654
  w = jQuery('#wppa-container-'+mocc).width();
655
-
656
  // Anything to do here?
657
  var container = document.getElementById( 'wppa-container-' + mocc );
658
  if ( ! container ) {
@@ -734,7 +738,9 @@ function _wppaDoAutocol( mocc, i ) {
734
  if ( isGrid > 0 ) {
735
 
736
  // Set container linheight to 0
 
737
  jQuery('#wppa-container-'+mocc).css( 'line-height', '0' );
 
738
 
739
  // Calculate width
740
  var nItems = parseInt( ( w / wppaMaxCoverWidth ) + 0.9999 );
@@ -980,7 +986,9 @@ window.onpopstate = function( event ) {
980
  switch ( event.state.type ) {
981
  case 'html':
982
  // Restore wppa container content
 
983
  jQuery( '#wppa-container-'+occ ).html( event.state.html );
 
984
  break;
985
  case 'slide':
986
  // Go to specified slide without the didgoto switch to avoid a stackpush here
@@ -993,6 +1001,7 @@ window.onpopstate = function( event ) {
993
  occ = wppaFirstOccur;
994
  // Restore first modified occurrences content
995
  jQuery( '#wppa-container-'+occ ).html( wppaStartHtml[occ] );
 
996
  // Now we are back to the initial page
997
  wppaFirstOccur = 0;
998
  // If a photo number given goto that photo
@@ -1609,5 +1618,41 @@ function wppaGetUploadOptions( yalb, mocc, where, onComplete ) {
1609
  return options;
1610
  }
1611
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1612
  // Say we're in
1613
  wppaConsoleLog('wppa.js version '+wppaJsVersion+' loaded.', 'force' );
2
  //
3
  // contains common vars and functions
4
  //
5
+ var wppaJsVersion = '7.3.11';
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;
249
  var wppaOvlRadius = 0;
250
  var wppaOvlBorderWidth = 16;
251
  var wppaOvlOpen = false;
252
+ var wppaThumbSize = 100;
253
+ var wppaTfMargin = 4;
254
 
255
  // The next lightbox var values become overwritten in wppa-non-admin.php -> wppa_load_footer()
256
  // Therefor they are placed here!
340
  // Make Lazy load images visible
341
  jQuery(window).on('DOMContentLoaded load resize wppascrollend orientationchange', wppaMakeLazyVisible);
342
  jQuery('.wppa-divnicewrap').on('DOMContentLoaded load resize wppascrollend wheelend orientationchange', wppaMakeLazyVisible);
343
+
344
+ // Init masonryplus
345
+ jQuery(window).on('DOMContentLoaded load resize wppascrollend orientationchange', wppaInitMasonryPlus);
346
 
347
  // When the window size changes, filmstrip needs immediate adjustment
348
  jQuery(window).on('resize', function(){
366
  }
367
  });
368
 
369
+ // Resize nicescrollers, re-layout masonryplus
370
  jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange", function(){
371
 
372
  setTimeout( function() {
653
  var h;
654
  var old;
655
  var exists;
656
+ wppaConsoleLog('test 1A');
657
  // Container
658
  w = jQuery('#wppa-container-'+mocc).width();
659
+ wppaConsoleLog('test 1B');
660
  // Anything to do here?
661
  var container = document.getElementById( 'wppa-container-' + mocc );
662
  if ( ! container ) {
738
  if ( isGrid > 0 ) {
739
 
740
  // Set container linheight to 0
741
+ wppaConsoleLog('test 2A');
742
  jQuery('#wppa-container-'+mocc).css( 'line-height', '0' );
743
+ wppaConsoleLog('test 2B');
744
 
745
  // Calculate width
746
  var nItems = parseInt( ( w / wppaMaxCoverWidth ) + 0.9999 );
986
  switch ( event.state.type ) {
987
  case 'html':
988
  // Restore wppa container content
989
+ wppaConsoleLog('test 3A');
990
  jQuery( '#wppa-container-'+occ ).html( event.state.html );
991
+ wppaConsoleLog('test 3B');
992
  break;
993
  case 'slide':
994
  // Go to specified slide without the didgoto switch to avoid a stackpush here
1001
  occ = wppaFirstOccur;
1002
  // Restore first modified occurrences content
1003
  jQuery( '#wppa-container-'+occ ).html( wppaStartHtml[occ] );
1004
+
1005
  // Now we are back to the initial page
1006
  wppaFirstOccur = 0;
1007
  // If a photo number given goto that photo
1618
  return options;
1619
  }
1620
 
1621
+ function wppaInitMasonryPlus( mocc ) {
1622
+
1623
+ var fm, to, m;
1624
+ if ( parseInt( mocc ) > 0 ) {
1625
+ fm = mocc;
1626
+ to = mocc;
1627
+ }
1628
+ else {
1629
+ fm = 1;
1630
+ to = wppaTopMoc;
1631
+ }
1632
+ m = fm;
1633
+
1634
+ while ( m <= to ) {
1635
+
1636
+ if ( document.getElementById( 'grid-' + m ) ) {
1637
+
1638
+ var w = jQuery( '#wppa-container-' + m ).width() - wppaThumbnailAreaDelta;
1639
+ var cnt = parseInt( ( w + wppaTfMargin ) / ( wppaThumbSize * 0.75 + wppaTfMargin ) );
1640
+ var colWidth = w / cnt - wppaTfMargin;
1641
+
1642
+ wppaConsoleLog( 'Doing init masonry plus for mocc=' + m + ', w=' + w + ', colWidth=' + colWidth + ', count=' + cnt, 'force' );
1643
+
1644
+ jQuery(".grid-item").css('visibility', 'visible');
1645
+ jQuery(".grid-item-" + m).css('width', colWidth + 'px');
1646
+ jQuery('#grid-' + m ).masonry({
1647
+ itemSelector: '.grid-item-' + m,
1648
+ columnWidth: colWidth,
1649
+ gutter: wppaTfMargin,
1650
+ fitWidth: true
1651
+ });
1652
+ }
1653
+ m++;
1654
+ }
1655
+ }
1656
+
1657
  // Say we're in
1658
  wppaConsoleLog('wppa.js version '+wppaJsVersion+' loaded.', 'force' );
js/wppa.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsVersion="7.3.08",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,wppaThumbnailAreaDelta;if(!wppaAutoColumnWidth)var wppaAutoColumnWidth=[];if(!wppaAutoColumnFrac)var wppaAutoColumnFrac=[];var 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;if(!wppaColWidth)var wppaColWidth=[];if(!wppaMCRWidth)var wppaMCRWidth=[];var 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,_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=[],__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,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("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;if(a=jQuery("#wppa-container-"+p).width(),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 o=document.getElementById("wppa-albumlist-"+p).clientWidth,r=parseInt((o+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,i=r-1,s=parseInt((o+wppaCoverSpacing)/r-wppaCoverSpacing);if(wppaColWidth[p]!=o||wppaMCRWidth[p]!=s){wppaColWidth[p]=o,wppaMCRWidth[p]=s;for(var n=0;n<t.length;){switch(n%r){case 0:jQuery(t[n]).css({marginLeft:"0px",clear:"both",float:"left"});break;case i:jQuery(t[n]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(t[n]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}n++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:s-wppaTextFrameDelta},wppaResponseSpeed),jQuery(t[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:s},wppaResponseSpeed)}}else if(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"})}if(0<jQuery(".wppa-album-cover-grid-"+p).length){jQuery("#wppa-container-"+p).css("line-height","0");var l=parseInt(a/wppaMaxCoverWidth+.9999);l<1&&(l=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/l+"%"})}if(wppaThumbSpaceAuto){var w=parseInt(jQuery(".thumbnail-frame-"+p).css("width"));if(w){var u=wppaMinThumbSpace,c=a-wppaThumbnailAreaDelta-7,d=Math.max(1,parseInt(c/(w+u))),y=parseInt(.5+(c-d*w)/(d+1));jQuery(".thumbnail-frame-"+p).css({marginLeft:y})}}jQuery(".thumbnail-frame-comalt-"+p).css("width",a-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",a-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var m,h=1,g=jQuery("#wppa-mas-h-"+h+"-"+p).attr("data-height-perc");g;)m=g*(a-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+h+"-"+p).css("height",m),h++,g=jQuery("#wppa-mas-h-"+h+"-"+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 p=jQuery("#wppa-real-calendar-"+e).width();if(0<p){var a=!0,t=p*wppaThumbAspect/7;jQuery(".wppa-real-calendar-day-"+e).css({height:t});var o=p/50+2;jQuery("#wppa-real-calendar-"+e).css({fontSize:o});var r=o/4;jQuery(".wppa-real-calendar-head-td-"+e).css({marginTop:r,marginBottom:r});var i=t/2;jQuery(".wppa-realcalimg-"+e).each(function(){if(0==this.height)a=!1;else{var p=jQuery(this).attr("data-day");thisb=i-(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){var e,a=p.childNodes;for(e=0;e<a.length;e++){var t=a[e];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(/&quot;/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){if(e=wppaFirstOccur,jQuery("#wppa-container-"+e).html(wppaStartHtml[e]),(wppaFirstOccur=0)==e){var a=document.location.href.split("&wppa-occur=");e=parseInt(a[1])}a=document.location.href.split("&wppa-photo=");var 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){if(document.selection)p.focus(),sel=document.selection.createRange(),sel.text=e;else if(p.selectionStart||"0"==p.selectionStart){var 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}else 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){var e;if(void 0!==p){var a=(e=(e=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),t=0;for(e="";t<a.length;)e+=a[t],++t<a.length&&(e+="||PLUS||");return e}}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=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(a){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),t=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var i=jQuery(".wppa-ss-albumcat-"+p);for(r="",s=0;s<i.length;s++)"selected"==jQuery(i[s]).attr("selected")&&(r+="."+jQuery(i[s]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");i=jQuery(".wppa-ss-albumtext-"+p);for(r="",s=0;s<i.length;s++)"selected"==jQuery(i[s]).attr("selected")&&(r+="."+jQuery(i[s]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),t=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");i=jQuery(".wppa-ss-phototag-"+p);for(r="",s=0;s<i.length;s++)"selected"==jQuery(i[s]).attr("selected")&&(r+="."+jQuery(i[s]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var s;i=jQuery(".wppa-ss-phototext-"+p);for(r="",s=0;s<i.length;s++)"selected"==jQuery(i[s]).attr("selected")&&(r+="."+jQuery(i[s]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(r=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(r=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")))}}if(e){var n=jQuery("#wppa-ss-pageurl-"+p).val();-1==n.indexOf("?")?n+="?":n+="&",n+="occur=1&wppa-supersearch="+a+","+t+","+o+","+r,document.location.href=n}}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}wppaConsoleLog("wppa.js version "+wppaJsVersion+" loaded.","force");
1
+ var wppaJsVersion="7.3.11",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,wppaThumbnailAreaDelta;if(!wppaAutoColumnWidth)var wppaAutoColumnWidth=[];if(!wppaAutoColumnFrac)var wppaAutoColumnFrac=[];var 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;if(!wppaColWidth)var wppaColWidth=[];if(!wppaMCRWidth)var wppaMCRWidth=[];var 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,_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=[],__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;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 o=document.getElementById("wppa-albumlist-"+p).clientWidth,r=parseInt((o+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,i=r-1,s=parseInt((o+wppaCoverSpacing)/r-wppaCoverSpacing);if(wppaColWidth[p]!=o||wppaMCRWidth[p]!=s){wppaColWidth[p]=o,wppaMCRWidth[p]=s;for(var n=0;n<t.length;){switch(n%r){case 0:jQuery(t[n]).css({marginLeft:"0px",clear:"both",float:"left"});break;case i:jQuery(t[n]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(t[n]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}n++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:s-wppaTextFrameDelta},wppaResponseSpeed),jQuery(t[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:s},wppaResponseSpeed)}}else if(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"})}if(0<jQuery(".wppa-album-cover-grid-"+p).length){wppaConsoleLog("test 2A"),jQuery("#wppa-container-"+p).css("line-height","0"),wppaConsoleLog("test 2B");var w=parseInt(a/wppaMaxCoverWidth+.9999);w<1&&(w=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/w+"%"})}if(wppaThumbSpaceAuto){var l=parseInt(jQuery(".thumbnail-frame-"+p).css("width"));if(l){var u=wppaMinThumbSpace,c=a-wppaThumbnailAreaDelta-7,d=Math.max(1,parseInt(c/(l+u))),y=parseInt(.5+(c-d*l)/(d+1));jQuery(".thumbnail-frame-"+p).css({marginLeft:y})}}jQuery(".thumbnail-frame-comalt-"+p).css("width",a-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",a-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var m,h=1,g=jQuery("#wppa-mas-h-"+h+"-"+p).attr("data-height-perc");g;)m=g*(a-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+h+"-"+p).css("height",m),h++,g=jQuery("#wppa-mas-h-"+h+"-"+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 p=jQuery("#wppa-real-calendar-"+e).width();if(0<p){var a=!0,t=p*wppaThumbAspect/7;jQuery(".wppa-real-calendar-day-"+e).css({height:t});var o=p/50+2;jQuery("#wppa-real-calendar-"+e).css({fontSize:o});var r=o/4;jQuery(".wppa-real-calendar-head-td-"+e).css({marginTop:r,marginBottom:r});var i=t/2;jQuery(".wppa-realcalimg-"+e).each(function(){if(0==this.height)a=!1;else{var p=jQuery(this).attr("data-day");thisb=i-(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){var e,a=p.childNodes;for(e=0;e<a.length;e++){var t=a[e];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(/&quot;/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){if(e=wppaFirstOccur,jQuery("#wppa-container-"+e).html(wppaStartHtml[e]),(wppaFirstOccur=0)==e){var a=document.location.href.split("&wppa-occur=");e=parseInt(a[1])}a=document.location.href.split("&wppa-photo=");var 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){if(document.selection)p.focus(),sel=document.selection.createRange(),sel.text=e;else if(p.selectionStart||"0"==p.selectionStart){var 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}else 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){var e;if(void 0!==p){var a=(e=(e=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),t=0;for(e="";t<a.length;)e+=a[t],++t<a.length&&(e+="||PLUS||");return e}}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=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(a){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),t=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var i=jQuery(".wppa-ss-albumcat-"+p);for(r="",s=0;s<i.length;s++)"selected"==jQuery(i[s]).attr("selected")&&(r+="."+jQuery(i[s]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");i=jQuery(".wppa-ss-albumtext-"+p);for(r="",s=0;s<i.length;s++)"selected"==jQuery(i[s]).attr("selected")&&(r+="."+jQuery(i[s]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),t=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");i=jQuery(".wppa-ss-phototag-"+p);for(r="",s=0;s<i.length;s++)"selected"==jQuery(i[s]).attr("selected")&&(r+="."+jQuery(i[s]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var s;i=jQuery(".wppa-ss-phototext-"+p);for(r="",s=0;s<i.length;s++)"selected"==jQuery(i[s]).attr("selected")&&(r+="."+jQuery(i[s]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(r=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(r=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")))}}if(e){var n=jQuery("#wppa-ss-pageurl-"+p).val();-1==n.indexOf("?")?n+="?":n+="&",n+="occur=1&wppa-supersearch="+a+","+t+","+o+","+r,document.location.href=n}}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){var e,a,t;for(a=0<parseInt(p)?e=p:(e=1,wppaTopMoc),t=e;t<=a;){if(document.getElementById("grid-"+t)){var o=jQuery("#wppa-container-"+t).width()-wppaThumbnailAreaDelta,r=parseInt((o+wppaTfMargin)/(.75*wppaThumbSize+wppaTfMargin)),i=o/r-wppaTfMargin;wppaConsoleLog("Doing init masonry plus for mocc="+t+", w="+o+", colWidth="+i+", count="+r,"force"),jQuery(".grid-item").css("visibility","visible"),jQuery(".grid-item-"+t).css("width",i+"px"),jQuery("#grid-"+t).masonry({itemSelector:".grid-item-"+t,columnWidth:i,gutter:wppaTfMargin,fitWidth:!0})}t++}}wppaConsoleLog("wppa.js version "+wppaJsVersion+" loaded.","force");
readme.txt CHANGED
@@ -2,8 +2,8 @@
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&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
- Version: 7.3.10.002
6
- Stable tag: 7.3.09.005
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
@@ -137,7 +137,7 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
137
 
138
  == Upgrade Notice ==
139
 
140
- = 7.3.10 =
141
 
142
  * This version addresses various bug fixes and feature requests.
143
 
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&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
+ Version: 7.3.11.006
6
+ Stable tag: 7.3.10.002
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
137
 
138
  == Upgrade Notice ==
139
 
140
+ = 7.3.11 =
141
 
142
  * This version addresses various bug fixes and feature requests.
143
 
theme/wppa-theme.php CHANGED
@@ -3,11 +3,11 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the albums/photos/slideshow in a page or post
6
- * Version 7.2.10
7
  */
8
  function wppa_theme() {
9
 
10
- global $wppa_version; $wppa_version = '7.2.10.009'; // The version number of this file
11
  global $wppa;
12
  global $wppa_show_statistics; // Can be set to true by a custom page template
13
 
@@ -15,6 +15,7 @@ global $wppa_show_statistics; // Can be set to true by a custom page templa
15
  $didsome = false; // Required initializations for pagination
16
  $n_album_pages = '0'; // "
17
  $n_thumb_pages = '0'; // "
 
18
 
19
  // Delayed displsy?
20
  if ( wppa( 'delay' ) && wppa_switch( 'allow_ajax' ) && ! wppa_switch( 'defer_javascript' ) ) {
@@ -309,6 +310,71 @@ global $wppa_show_statistics; // Can be set to true by a custom page templa
309
 
310
  } // Masonry-h
311
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
  // Default
313
  elseif ( wppa_opt( 'thumbtype' ) == 'default' ) { // Do the thumbs As default
314
 
@@ -338,7 +404,7 @@ global $wppa_show_statistics; // Can be set to true by a custom page templa
338
 
339
  // Unimplemented thumbnail type
340
  else {
341
- wppa_out( 'Unimplemented thumbnail type' );
342
  }
343
  } // If thumbs
344
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the albums/photos/slideshow in a page or post
6
+ * Version 7.3.11.002
7
  */
8
  function wppa_theme() {
9
 
10
+ global $wppa_version; $wppa_version = '7.3.11.002'; // The version number of this file
11
  global $wppa;
12
  global $wppa_show_statistics; // Can be set to true by a custom page template
13
 
15
  $didsome = false; // Required initializations for pagination
16
  $n_album_pages = '0'; // "
17
  $n_thumb_pages = '0'; // "
18
+ $mocc = wppa( 'mocc' );
19
 
20
  // Delayed displsy?
21
  if ( wppa( 'delay' ) && wppa_switch( 'allow_ajax' ) && ! wppa_switch( 'defer_javascript' ) ) {
310
 
311
  } // Masonry-h
312
 
313
+ // Masonry plus
314
+ elseif ( wppa_opt( 'thumbtype' ) == 'masonry-plus' ) {
315
+
316
+ // The header
317
+ wppa_thumb_area( 'open' ); // Open Thumbarea sub-container
318
+ wppa_popup(); // Prepare Popup box
319
+ wppa_album_name( 'top' ); // Optionally display album name
320
+ wppa_album_desc( 'top' ); // Optionally display album description
321
+
322
+ // Init
323
+ $relpage = wppa_switch( 'thumbs_first' ) ? $curpage : $curpage - $n_album_pages;
324
+
325
+ // Process the thumbnails
326
+ if ( $thumbs ) {
327
+
328
+ // Open masonry contatiner
329
+ $html = '
330
+ <div
331
+ id="grid-' . $mocc . '"
332
+ class="grid-' . $mocc . ' grid-masonryplus"
333
+ style="padding-top:6px;padding-bottom:6px;padding-right:6px;margin:0 auto;"
334
+ >';
335
+
336
+ // Add css
337
+ $html .= '
338
+ <style type="text/css" >
339
+ .grid-item-' . $mocc . ' {
340
+ margin-bottom: ' . wppa_opt( 'tn_margin' ) . 'px;
341
+ line-height: 0;
342
+ visibility: hidden;
343
+ text-align: center;
344
+ }
345
+ .grid-item-' . $mocc . ' img {
346
+ width: 100%;
347
+ }
348
+ </style>';
349
+
350
+ // The thumbs
351
+ foreach ( $thumbs as $tt ) {
352
+ $counter_thumbs++;
353
+
354
+ if ( wppa_onpage( 'thumbs', $counter_thumbs, $relpage ) ) {
355
+
356
+ $didsome = true;
357
+ $html .= '
358
+ <div
359
+ style=""
360
+ id="grid-item-' . $mocc . '-' . $tt['id'] . '"
361
+ class="grid-item grid-item-' . $mocc . '" >' .
362
+ wppa_get_thumb_masonry( $tt['id'] ) . '
363
+ </div>';
364
+ }
365
+ }
366
+
367
+ // Close masonry container
368
+ $html .= '</div><div style="clear:both" ></div>';
369
+ }
370
+ wppa_out( wppa_compress_html( $html ) );
371
+
372
+ // The footer
373
+ wppa_album_name( 'bottom' ); // Optionally display album name
374
+ wppa_album_desc( 'bottom' ); // Optionally display album description
375
+ wppa_thumb_area( 'close' ); // Close Thumbarea sub-container
376
+ } // Masonry plus
377
+
378
  // Default
379
  elseif ( wppa_opt( 'thumbtype' ) == 'default' ) { // Do the thumbs As default
380
 
404
 
405
  // Unimplemented thumbnail type
406
  else {
407
+ wppa_out( 'Unimplemented thumbnail type: ' . wppa_opt( 'thumbtype' ) );
408
  }
409
  } // If thumbs
410
 
vendor/masonry/licence.txt ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ The MIT License (MIT)
3
+
4
+ Copyright © 2020 David DeSandro
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”),
7
+ to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute,
8
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
9
+ subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
14
+ THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
15
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
16
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
17
+ OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
vendor/masonry/masonry.js ADDED
@@ -0,0 +1,2504 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Masonry PACKAGED v4.2.2
3
+ * Cascading grid layout library
4
+ * https://masonry.desandro.com
5
+ * MIT License
6
+ * by David DeSandro
7
+ */
8
+
9
+ /**
10
+ * Bridget makes jQuery widgets
11
+ * v2.0.1
12
+ * MIT license
13
+ */
14
+
15
+ /* jshint browser: true, strict: true, undef: true, unused: true */
16
+
17
+ ( function( window, factory ) {
18
+ // universal module definition
19
+ /*jshint strict: false */ /* globals define, module, require */
20
+ if ( typeof define == 'function' && define.amd ) {
21
+ // AMD
22
+ define( 'jquery-bridget/jquery-bridget',[ 'jquery' ], function( jQuery ) {
23
+ return factory( window, jQuery );
24
+ });
25
+ } else if ( typeof module == 'object' && module.exports ) {
26
+ // CommonJS
27
+ module.exports = factory(
28
+ window,
29
+ require('jquery')
30
+ );
31
+ } else {
32
+ // browser global
33
+ window.jQueryBridget = factory(
34
+ window,
35
+ window.jQuery
36
+ );
37
+ }
38
+
39
+ }( window, function factory( window, jQuery ) {
40
+ 'use strict';
41
+
42
+ // ----- utils ----- //
43
+
44
+ var arraySlice = Array.prototype.slice;
45
+
46
+ // helper function for logging errors
47
+ // $.error breaks jQuery chaining
48
+ var console = window.console;
49
+ var logError = typeof console == 'undefined' ? function() {} :
50
+ function( message ) {
51
+ console.error( message );
52
+ };
53
+
54
+ // ----- jQueryBridget ----- //
55
+
56
+ function jQueryBridget( namespace, PluginClass, $ ) {
57
+ $ = $ || jQuery || window.jQuery;
58
+ if ( !$ ) {
59
+ return;
60
+ }
61
+
62
+ // add option method -> $().plugin('option', {...})
63
+ if ( !PluginClass.prototype.option ) {
64
+ // option setter
65
+ PluginClass.prototype.option = function( opts ) {
66
+ // bail out if not an object
67
+ if ( !$.isPlainObject( opts ) ){
68
+ return;
69
+ }
70
+ this.options = $.extend( true, this.options, opts );
71
+ };
72
+ }
73
+
74
+ // make jQuery plugin
75
+ $.fn[ namespace ] = function( arg0 /*, arg1 */ ) {
76
+ if ( typeof arg0 == 'string' ) {
77
+ // method call $().plugin( 'methodName', { options } )
78
+ // shift arguments by 1
79
+ var args = arraySlice.call( arguments, 1 );
80
+ return methodCall( this, arg0, args );
81
+ }
82
+ // just $().plugin({ options })
83
+ plainCall( this, arg0 );
84
+ return this;
85
+ };
86
+
87
+ // $().plugin('methodName')
88
+ function methodCall( $elems, methodName, args ) {
89
+ var returnValue;
90
+ var pluginMethodStr = '$().' + namespace + '("' + methodName + '")';
91
+
92
+ $elems.each( function( i, elem ) {
93
+ // get instance
94
+ var instance = $.data( elem, namespace );
95
+ if ( !instance ) {
96
+ logError( namespace + ' not initialized. Cannot call methods, i.e. ' +
97
+ pluginMethodStr );
98
+ return;
99
+ }
100
+
101
+ var method = instance[ methodName ];
102
+ if ( !method || methodName.charAt(0) == '_' ) {
103
+ logError( pluginMethodStr + ' is not a valid method' );
104
+ return;
105
+ }
106
+
107
+ // apply method, get return value
108
+ var value = method.apply( instance, args );
109
+ // set return value if value is returned, use only first value
110
+ returnValue = returnValue === undefined ? value : returnValue;
111
+ });
112
+
113
+ return returnValue !== undefined ? returnValue : $elems;
114
+ }
115
+
116
+ function plainCall( $elems, options ) {
117
+ $elems.each( function( i, elem ) {
118
+ var instance = $.data( elem, namespace );
119
+ if ( instance ) {
120
+ // set options & init
121
+ instance.option( options );
122
+ instance._init();
123
+ } else {
124
+ // initialize new instance
125
+ instance = new PluginClass( elem, options );
126
+ $.data( elem, namespace, instance );
127
+ }
128
+ });
129
+ }
130
+
131
+ updateJQuery( $ );
132
+
133
+ }
134
+
135
+ // ----- updateJQuery ----- //
136
+
137
+ // set $.bridget for v1 backwards compatibility
138
+ function updateJQuery( $ ) {
139
+ if ( !$ || ( $ && $.bridget ) ) {
140
+ return;
141
+ }
142
+ $.bridget = jQueryBridget;
143
+ }
144
+
145
+ updateJQuery( jQuery || window.jQuery );
146
+
147
+ // ----- ----- //
148
+
149
+ return jQueryBridget;
150
+
151
+ }));
152
+
153
+ /**
154
+ * EvEmitter v1.1.0
155
+ * Lil' event emitter
156
+ * MIT License
157
+ */
158
+
159
+ /* jshint unused: true, undef: true, strict: true */
160
+
161
+ ( function( global, factory ) {
162
+ // universal module definition
163
+ /* jshint strict: false */ /* globals define, module, window */
164
+ if ( typeof define == 'function' && define.amd ) {
165
+ // AMD - RequireJS
166
+ define( 'ev-emitter/ev-emitter',factory );
167
+ } else if ( typeof module == 'object' && module.exports ) {
168
+ // CommonJS - Browserify, Webpack
169
+ module.exports = factory();
170
+ } else {
171
+ // Browser globals
172
+ global.EvEmitter = factory();
173
+ }
174
+
175
+ }( typeof window != 'undefined' ? window : this, function() {
176
+
177
+
178
+
179
+ function EvEmitter() {}
180
+
181
+ var proto = EvEmitter.prototype;
182
+
183
+ proto.on = function( eventName, listener ) {
184
+ if ( !eventName || !listener ) {
185
+ return;
186
+ }
187
+ // set events hash
188
+ var events = this._events = this._events || {};
189
+ // set listeners array
190
+ var listeners = events[ eventName ] = events[ eventName ] || [];
191
+ // only add once
192
+ if ( listeners.indexOf( listener ) == -1 ) {
193
+ listeners.push( listener );
194
+ }
195
+
196
+ return this;
197
+ };
198
+
199
+ proto.once = function( eventName, listener ) {
200
+ if ( !eventName || !listener ) {
201
+ return;
202
+ }
203
+ // add event
204
+ this.on( eventName, listener );
205
+ // set once flag
206
+ // set onceEvents hash
207
+ var onceEvents = this._onceEvents = this._onceEvents || {};
208
+ // set onceListeners object
209
+ var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};
210
+ // set flag
211
+ onceListeners[ listener ] = true;
212
+
213
+ return this;
214
+ };
215
+
216
+ proto.off = function( eventName, listener ) {
217
+ var listeners = this._events && this._events[ eventName ];
218
+ if ( !listeners || !listeners.length ) {
219
+ return;
220
+ }
221
+ var index = listeners.indexOf( listener );
222
+ if ( index != -1 ) {
223
+ listeners.splice( index, 1 );
224
+ }
225
+
226
+ return this;
227
+ };
228
+
229
+ proto.emitEvent = function( eventName, args ) {
230
+ var listeners = this._events && this._events[ eventName ];
231
+ if ( !listeners || !listeners.length ) {
232
+ return;
233
+ }
234
+ // copy over to avoid interference if .off() in listener
235
+ listeners = listeners.slice(0);
236
+ args = args || [];
237
+ // once stuff
238
+ var onceListeners = this._onceEvents && this._onceEvents[ eventName ];
239
+
240
+ for ( var i=0; i < listeners.length; i++ ) {
241
+ var listener = listeners[i]
242
+ var isOnce = onceListeners && onceListeners[ listener ];
243
+ if ( isOnce ) {
244
+ // remove listener
245
+ // remove before trigger to prevent recursion
246
+ this.off( eventName, listener );
247
+ // unset once flag
248
+ delete onceListeners[ listener ];
249
+ }
250
+ // trigger listener
251
+ listener.apply( this, args );
252
+ }
253
+
254
+ return this;
255
+ };
256
+
257
+ proto.allOff = function() {
258
+ delete this._events;
259
+ delete this._onceEvents;
260
+ };
261
+
262
+ return EvEmitter;
263
+
264
+ }));
265
+
266
+ /*!
267
+ * getSize v2.0.3
268
+ * measure size of elements
269
+ * MIT license
270
+ */
271
+
272
+ /* jshint browser: true, strict: true, undef: true, unused: true */
273
+ /* globals console: false */
274
+
275
+ ( function( window, factory ) {
276
+ /* jshint strict: false */ /* globals define, module */
277
+ if ( typeof define == 'function' && define.amd ) {
278
+ // AMD
279
+ define( 'get-size/get-size',factory );
280
+ } else if ( typeof module == 'object' && module.exports ) {
281
+ // CommonJS
282
+ module.exports = factory();
283
+ } else {
284
+ // browser global
285
+ window.getSize = factory();
286
+ }
287
+
288
+ })( window, function factory() {
289
+ 'use strict';
290
+
291
+ // -------------------------- helpers -------------------------- //
292
+
293
+ // get a number from a string, not a percentage
294
+ function getStyleSize( value ) {
295
+ var num = parseFloat( value );
296
+ // not a percent like '100%', and a number
297
+ var isValid = value.indexOf('%') == -1 && !isNaN( num );
298
+ return isValid && num;
299
+ }
300
+
301
+ function noop() {}
302
+
303
+ var logError = typeof console == 'undefined' ? noop :
304
+ function( message ) {
305
+ console.error( message );
306
+ };
307
+
308
+ // -------------------------- measurements -------------------------- //
309
+
310
+ var measurements = [
311
+ 'paddingLeft',
312
+ 'paddingRight',
313
+ 'paddingTop',
314
+ 'paddingBottom',
315
+ 'marginLeft',
316
+ 'marginRight',
317
+ 'marginTop',
318
+ 'marginBottom',
319
+ 'borderLeftWidth',
320
+ 'borderRightWidth',
321
+ 'borderTopWidth',
322
+ 'borderBottomWidth'
323
+ ];
324
+
325
+ var measurementsLength = measurements.length;
326
+
327
+ function getZeroSize() {
328
+ var size = {
329
+ width: 0,
330
+ height: 0,
331
+ innerWidth: 0,
332
+ innerHeight: 0,
333
+ outerWidth: 0,
334
+ outerHeight: 0
335
+ };
336
+ for ( var i=0; i < measurementsLength; i++ ) {
337
+ var measurement = measurements[i];
338
+ size[ measurement ] = 0;
339
+ }
340
+ return size;
341
+ }
342
+
343
+ // -------------------------- getStyle -------------------------- //
344
+
345
+ /**
346
+ * getStyle, get style of element, check for Firefox bug
347
+ * https://bugzilla.mozilla.org/show_bug.cgi?id=548397
348
+ */
349
+ function getStyle( elem ) {
350
+ var style = getComputedStyle( elem );
351
+ if ( !style ) {
352
+ logError( 'Style returned ' + style +
353
+ '. Are you running this code in a hidden iframe on Firefox? ' +
354
+ 'See https://bit.ly/getsizebug1' );
355
+ }
356
+ return style;
357
+ }
358
+
359
+ // -------------------------- setup -------------------------- //
360
+
361
+ var isSetup = false;
362
+
363
+ var isBoxSizeOuter;
364
+
365
+ /**
366
+ * setup
367
+ * check isBoxSizerOuter
368
+ * do on first getSize() rather than on page load for Firefox bug
369
+ */
370
+ function setup() {
371
+ // setup once
372
+ if ( isSetup ) {
373
+ return;
374
+ }
375
+ isSetup = true;
376
+
377
+ // -------------------------- box sizing -------------------------- //
378
+
379
+ /**
380
+ * Chrome & Safari measure the outer-width on style.width on border-box elems
381
+ * IE11 & Firefox<29 measures the inner-width
382
+ */
383
+ var div = document.createElement('div');
384
+ div.style.width = '200px';
385
+ div.style.padding = '1px 2px 3px 4px';
386
+ div.style.borderStyle = 'solid';
387
+ div.style.borderWidth = '1px 2px 3px 4px';
388
+ div.style.boxSizing = 'border-box';
389
+
390
+ var body = document.body || document.documentElement;
391
+ body.appendChild( div );
392
+ var style = getStyle( div );
393
+ // round value for browser zoom. desandro/masonry#928
394
+ isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;
395
+ getSize.isBoxSizeOuter = isBoxSizeOuter;
396
+
397
+ body.removeChild( div );
398
+ }
399
+
400
+ // -------------------------- getSize -------------------------- //
401
+
402
+ function getSize( elem ) {
403
+ setup();
404
+
405
+ // use querySeletor if elem is string
406
+ if ( typeof elem == 'string' ) {
407
+ elem = document.querySelector( elem );
408
+ }
409
+
410
+ // do not proceed on non-objects
411
+ if ( !elem || typeof elem != 'object' || !elem.nodeType ) {
412
+ return;
413
+ }
414
+
415
+ var style = getStyle( elem );
416
+
417
+ // if hidden, everything is 0
418
+ if ( style.display == 'none' ) {
419
+ return getZeroSize();
420
+ }
421
+
422
+ var size = {};
423
+ size.width = elem.offsetWidth;
424
+ size.height = elem.offsetHeight;
425
+
426
+ var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box';
427
+
428
+ // get all measurements
429
+ for ( var i=0; i < measurementsLength; i++ ) {
430
+ var measurement = measurements[i];
431
+ var value = style[ measurement ];
432
+ var num = parseFloat( value );
433
+ // any 'auto', 'medium' value will be 0
434
+ size[ measurement ] = !isNaN( num ) ? num : 0;
435
+ }
436
+
437
+ var paddingWidth = size.paddingLeft + size.paddingRight;
438
+ var paddingHeight = size.paddingTop + size.paddingBottom;
439
+ var marginWidth = size.marginLeft + size.marginRight;
440
+ var marginHeight = size.marginTop + size.marginBottom;
441
+ var borderWidth = size.borderLeftWidth + size.borderRightWidth;
442
+ var borderHeight = size.borderTopWidth + size.borderBottomWidth;
443
+
444
+ var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter;
445
+
446
+ // overwrite width and height if we can get it from style
447
+ var styleWidth = getStyleSize( style.width );
448
+ if ( styleWidth !== false ) {
449
+ size.width = styleWidth +
450
+ // add padding and border unless it's already including it
451
+ ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth );
452
+ }
453
+
454
+ var styleHeight = getStyleSize( style.height );
455
+ if ( styleHeight !== false ) {
456
+ size.height = styleHeight +
457
+ // add padding and border unless it's already including it
458
+ ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight );
459
+ }
460
+
461
+ size.innerWidth = size.width - ( paddingWidth + borderWidth );
462
+ size.innerHeight = size.height - ( paddingHeight + borderHeight );
463
+
464
+ size.outerWidth = size.width + marginWidth;
465
+ size.outerHeight = size.height + marginHeight;
466
+
467
+ return size;
468
+ }
469
+
470
+ return getSize;
471
+
472
+ });
473
+
474
+ /**
475
+ * matchesSelector v2.0.2
476
+ * matchesSelector( element, '.selector' )
477
+ * MIT license
478
+ */
479
+
480
+ /*jshint browser: true, strict: true, undef: true, unused: true */
481
+
482
+ ( function( window, factory ) {
483
+ /*global define: false, module: false */
484
+ 'use strict';
485
+ // universal module definition
486
+ if ( typeof define == 'function' && define.amd ) {
487
+ // AMD
488
+ define( 'desandro-matches-selector/matches-selector',factory );
489
+ } else if ( typeof module == 'object' && module.exports ) {
490
+ // CommonJS
491
+ module.exports = factory();
492
+ } else {
493
+ // browser global
494
+ window.matchesSelector = factory();
495
+ }
496
+
497
+ }( window, function factory() {
498
+ 'use strict';
499
+
500
+ var matchesMethod = ( function() {
501
+ var ElemProto = window.Element.prototype;
502
+ // check for the standard method name first
503
+ if ( ElemProto.matches ) {
504
+ return 'matches';
505
+ }
506
+ // check un-prefixed
507
+ if ( ElemProto.matchesSelector ) {
508
+ return 'matchesSelector';
509
+ }
510
+ // check vendor prefixes
511
+ var prefixes = [ 'webkit', 'moz', 'ms', 'o' ];
512
+
513
+ for ( var i=0; i < prefixes.length; i++ ) {
514
+ var prefix = prefixes[i];
515
+ var method = prefix + 'MatchesSelector';
516
+ if ( ElemProto[ method ] ) {
517
+ return method;
518
+ }
519
+ }
520
+ })();
521
+
522
+ return function matchesSelector( elem, selector ) {
523
+ return elem[ matchesMethod ]( selector );
524
+ };
525
+
526
+ }));
527
+
528
+ /**
529
+ * Fizzy UI utils v2.0.7
530
+ * MIT license
531
+ */
532
+
533
+ /*jshint browser: true, undef: true, unused: true, strict: true */
534
+
535
+ ( function( window, factory ) {
536
+ // universal module definition
537
+ /*jshint strict: false */ /*globals define, module, require */
538
+
539
+ if ( typeof define == 'function' && define.amd ) {
540
+ // AMD
541
+ define( 'fizzy-ui-utils/utils',[
542
+ 'desandro-matches-selector/matches-selector'
543
+ ], function( matchesSelector ) {
544
+ return factory( window, matchesSelector );
545
+ });
546
+ } else if ( typeof module == 'object' && module.exports ) {
547
+ // CommonJS
548
+ module.exports = factory(
549
+ window,
550
+ require('desandro-matches-selector')
551
+ );
552
+ } else {
553
+ // browser global
554
+ window.fizzyUIUtils = factory(
555
+ window,
556
+ window.matchesSelector
557
+ );
558
+ }
559
+
560
+ }( window, function factory( window, matchesSelector ) {
561
+
562
+
563
+
564
+ var utils = {};
565
+
566
+ // ----- extend ----- //
567
+
568
+ // extends objects
569
+ utils.extend = function( a, b ) {
570
+ for ( var prop in b ) {
571
+ a[ prop ] = b[ prop ];
572
+ }
573
+ return a;
574
+ };
575
+
576
+ // ----- modulo ----- //
577
+
578
+ utils.modulo = function( num, div ) {
579
+ return ( ( num % div ) + div ) % div;
580
+ };
581
+
582
+ // ----- makeArray ----- //
583
+
584
+ var arraySlice = Array.prototype.slice;
585
+
586
+ // turn element or nodeList into an array
587
+ utils.makeArray = function( obj ) {
588
+ if ( Array.isArray( obj ) ) {
589
+ // use object if already an array
590
+ return obj;
591
+ }
592
+ // return empty array if undefined or null. #6
593
+ if ( obj === null || obj === undefined ) {
594
+ return [];
595
+ }
596
+
597
+ var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';
598
+ if ( isArrayLike ) {
599
+ // convert nodeList to array
600
+ return arraySlice.call( obj );
601
+ }
602
+
603
+ // array of single index
604
+ return [ obj ];
605
+ };
606
+
607
+ // ----- removeFrom ----- //
608
+
609
+ utils.removeFrom = function( ary, obj ) {
610
+ var index = ary.indexOf( obj );
611
+ if ( index != -1 ) {
612
+ ary.splice( index, 1 );
613
+ }
614
+ };
615
+
616
+ // ----- getParent ----- //
617
+
618
+ utils.getParent = function( elem, selector ) {
619
+ while ( elem.parentNode && elem != document.body ) {
620
+ elem = elem.parentNode;
621
+ if ( matchesSelector( elem, selector ) ) {
622
+ return elem;
623
+ }
624
+ }
625
+ };
626
+
627
+ // ----- getQueryElement ----- //
628
+
629
+ // use element as selector string
630
+ utils.getQueryElement = function( elem ) {
631
+ if ( typeof elem == 'string' ) {
632
+ return document.querySelector( elem );
633
+ }
634
+ return elem;
635
+ };
636
+
637
+ // ----- handleEvent ----- //
638
+
639
+ // enable .ontype to trigger from .addEventListener( elem, 'type' )
640
+ utils.handleEvent = function( event ) {
641
+ var method = 'on' + event.type;
642
+ if ( this[ method ] ) {
643
+ this[ method ]( event );
644
+ }
645
+ };
646
+
647
+ // ----- filterFindElements ----- //
648
+
649
+ utils.filterFindElements = function( elems, selector ) {
650
+ // make array of elems
651
+ elems = utils.makeArray( elems );
652
+ var ffElems = [];
653
+
654
+ elems.forEach( function( elem ) {
655
+ // check that elem is an actual element
656
+ if ( !( elem instanceof HTMLElement ) ) {
657
+ return;
658
+ }
659
+ // add elem if no selector
660
+ if ( !selector ) {
661
+ ffElems.push( elem );
662
+ return;
663
+ }
664
+ // filter & find items if we have a selector
665
+ // filter
666
+ if ( matchesSelector( elem, selector ) ) {
667
+ ffElems.push( elem );
668
+ }
669
+ // find children
670
+ var childElems = elem.querySelectorAll( selector );
671
+ // concat childElems to filterFound array
672
+ for ( var i=0; i < childElems.length; i++ ) {
673
+ ffElems.push( childElems[i] );
674
+ }
675
+ });
676
+
677
+ return ffElems;
678
+ };
679
+
680
+ // ----- debounceMethod ----- //
681
+
682
+ utils.debounceMethod = function( _class, methodName, threshold ) {
683
+ threshold = threshold || 100;
684
+ // original method
685
+ var method = _class.prototype[ methodName ];
686
+ var timeoutName = methodName + 'Timeout';
687
+
688
+ _class.prototype[ methodName ] = function() {
689
+ var timeout = this[ timeoutName ];
690
+ clearTimeout( timeout );
691
+
692
+ var args = arguments;
693
+ var _this = this;
694
+ this[ timeoutName ] = setTimeout( function() {
695
+ method.apply( _this, args );
696
+ delete _this[ timeoutName ];
697
+ }, threshold );
698
+ };
699
+ };
700
+
701
+ // ----- docReady ----- //
702
+
703
+ utils.docReady = function( callback ) {
704
+ var readyState = document.readyState;
705
+ if ( readyState == 'complete' || readyState == 'interactive' ) {
706
+ // do async to allow for other scripts to run. metafizzy/flickity#441
707
+ setTimeout( callback );
708
+ } else {
709
+ document.addEventListener( 'DOMContentLoaded', callback );
710
+ }
711
+ };
712
+
713
+ // ----- htmlInit ----- //
714
+
715
+ // http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/
716
+ utils.toDashed = function( str ) {
717
+ return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) {
718
+ return $1 + '-' + $2;
719
+ }).toLowerCase();
720
+ };
721
+
722
+ var console = window.console;
723
+ /**
724
+ * allow user to initialize classes via [data-namespace] or .js-namespace class
725
+ * htmlInit( Widget, 'widgetName' )
726
+ * options are parsed from data-namespace-options
727
+ */
728
+ utils.htmlInit = function( WidgetClass, namespace ) {
729
+ utils.docReady( function() {
730
+ var dashedNamespace = utils.toDashed( namespace );
731
+ var dataAttr = 'data-' + dashedNamespace;
732
+ var dataAttrElems = document.querySelectorAll( '[' + dataAttr + ']' );
733
+ var jsDashElems = document.querySelectorAll( '.js-' + dashedNamespace );
734
+ var elems = utils.makeArray( dataAttrElems )
735
+ .concat( utils.makeArray( jsDashElems ) );
736
+ var dataOptionsAttr = dataAttr + '-options';
737
+ var jQuery = window.jQuery;
738
+
739
+ elems.forEach( function( elem ) {
740
+ var attr = elem.getAttribute( dataAttr ) ||
741
+ elem.getAttribute( dataOptionsAttr );
742
+ var options;
743
+ try {
744
+ options = attr && JSON.parse( attr );
745
+ } catch ( error ) {
746
+ // log error, do not initialize
747
+ if ( console ) {
748
+ console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className +
749
+ ': ' + error );
750
+ }
751
+ return;
752
+ }
753
+ // initialize
754
+ var instance = new WidgetClass( elem, options );
755
+ // make available via $().data('namespace')
756
+ if ( jQuery ) {
757
+ jQuery.data( elem, namespace, instance );
758
+ }
759
+ });
760
+
761
+ });
762
+ };
763
+
764
+ // ----- ----- //
765
+
766
+ return utils;
767
+
768
+ }));
769
+
770
+ /**
771
+ * Outlayer Item
772
+ */
773
+
774
+ ( function( window, factory ) {
775
+ // universal module definition
776
+ /* jshint strict: false */ /* globals define, module, require */
777
+ if ( typeof define == 'function' && define.amd ) {
778
+ // AMD - RequireJS
779
+ define( 'outlayer/item',[
780
+ 'ev-emitter/ev-emitter',
781
+ 'get-size/get-size'
782
+ ],
783
+ factory
784
+ );
785
+ } else if ( typeof module == 'object' && module.exports ) {
786
+ // CommonJS - Browserify, Webpack
787
+ module.exports = factory(
788
+ require('ev-emitter'),
789
+ require('get-size')
790
+ );
791
+ } else {
792
+ // browser global
793
+ window.Outlayer = {};
794
+ window.Outlayer.Item = factory(
795
+ window.EvEmitter,
796
+ window.getSize
797
+ );
798
+ }
799
+
800
+ }( window, function factory( EvEmitter, getSize ) {
801
+ 'use strict';
802
+
803
+ // ----- helpers ----- //
804
+
805
+ function isEmptyObj( obj ) {
806
+ for ( var prop in obj ) {
807
+ return false;
808
+ }
809
+ prop = null;
810
+ return true;
811
+ }
812
+
813
+ // -------------------------- CSS3 support -------------------------- //
814
+
815
+
816
+ var docElemStyle = document.documentElement.style;
817
+
818
+ var transitionProperty = typeof docElemStyle.transition == 'string' ?
819
+ 'transition' : 'WebkitTransition';
820
+ var transformProperty = typeof docElemStyle.transform == 'string' ?
821
+ 'transform' : 'WebkitTransform';
822
+
823
+ var transitionEndEvent = {
824
+ WebkitTransition: 'webkitTransitionEnd',
825
+ transition: 'transitionend'
826
+ }[ transitionProperty ];
827
+
828
+ // cache all vendor properties that could have vendor prefix
829
+ var vendorProperties = {
830
+ transform: transformProperty,
831
+ transition: transitionProperty,
832
+ transitionDuration: transitionProperty + 'Duration',
833
+ transitionProperty: transitionProperty + 'Property',
834
+ transitionDelay: transitionProperty + 'Delay'
835
+ };
836
+
837
+ // -------------------------- Item -------------------------- //
838
+
839
+ function Item( element, layout ) {
840
+ if ( !element ) {
841
+ return;
842
+ }
843
+
844
+ this.element = element;
845
+ // parent layout class, i.e. Masonry, Isotope, or Packery
846
+ this.layout = layout;
847
+ this.position = {
848
+ x: 0,
849
+ y: 0
850
+ };
851
+
852
+ this._create();
853
+ }
854
+
855
+ // inherit EvEmitter
856
+ var proto = Item.prototype = Object.create( EvEmitter.prototype );
857
+ proto.constructor = Item;
858
+
859
+ proto._create = function() {
860
+ // transition objects
861
+ this._transn = {
862
+ ingProperties: {},
863
+ clean: {},
864
+ onEnd: {}
865
+ };
866
+
867
+ this.css({
868
+ position: 'absolute'
869
+ });
870
+ };
871
+
872
+ // trigger specified handler for event type
873
+ proto.handleEvent = function( event ) {
874
+ var method = 'on' + event.type;
875
+ if ( this[ method ] ) {
876
+ this[ method ]( event );
877
+ }
878
+ };
879
+
880
+ proto.getSize = function() {
881
+ this.size = getSize( this.element );
882
+ };
883
+
884
+ /**
885
+ * apply CSS styles to element
886
+ * @param {Object} style
887
+ */
888
+ proto.css = function( style ) {
889
+ var elemStyle = this.element.style;
890
+
891
+ for ( var prop in style ) {
892
+ // use vendor property if available
893
+ var supportedProp = vendorProperties[ prop ] || prop;
894
+ elemStyle[ supportedProp ] = style[ prop ];
895
+ }
896
+ };
897
+
898
+ // measure position, and sets it
899
+ proto.getPosition = function() {
900
+ var style = getComputedStyle( this.element );
901
+ var isOriginLeft = this.layout._getOption('originLeft');
902
+ var isOriginTop = this.layout._getOption('originTop');
903
+ var xValue = style[ isOriginLeft ? 'left' : 'right' ];
904
+ var yValue = style[ isOriginTop ? 'top' : 'bottom' ];
905
+ var x = parseFloat( xValue );
906
+ var y = parseFloat( yValue );
907
+ // convert percent to pixels
908
+ var layoutSize = this.layout.size;
909
+ if ( xValue.indexOf('%') != -1 ) {
910
+ x = ( x / 100 ) * layoutSize.width;
911
+ }
912
+ if ( yValue.indexOf('%') != -1 ) {
913
+ y = ( y / 100 ) * layoutSize.height;
914
+ }
915
+ // clean up 'auto' or other non-integer values
916
+ x = isNaN( x ) ? 0 : x;
917
+ y = isNaN( y ) ? 0 : y;
918
+ // remove padding from measurement
919
+ x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight;
920
+ y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom;
921
+
922
+ this.position.x = x;
923
+ this.position.y = y;
924
+ };
925
+
926
+ // set settled position, apply padding
927
+ proto.layoutPosition = function() {
928
+ var layoutSize = this.layout.size;
929
+ var style = {};
930
+ var isOriginLeft = this.layout._getOption('originLeft');
931
+ var isOriginTop = this.layout._getOption('originTop');
932
+
933
+ // x
934
+ var xPadding = isOriginLeft ? 'paddingLeft' : 'paddingRight';
935
+ var xProperty = isOriginLeft ? 'left' : 'right';
936
+ var xResetProperty = isOriginLeft ? 'right' : 'left';
937
+
938
+ var x = this.position.x + layoutSize[ xPadding ];
939
+ // set in percentage or pixels
940
+ style[ xProperty ] = this.getXValue( x );
941
+ // reset other property
942
+ style[ xResetProperty ] = '';
943
+
944
+ // y
945
+ var yPadding = isOriginTop ? 'paddingTop' : 'paddingBottom';
946
+ var yProperty = isOriginTop ? 'top' : 'bottom';
947
+ var yResetProperty = isOriginTop ? 'bottom' : 'top';
948
+
949
+ var y = this.position.y + layoutSize[ yPadding ];
950
+ // set in percentage or pixels
951
+ style[ yProperty ] = this.getYValue( y );
952
+ // reset other property
953
+ style[ yResetProperty ] = '';
954
+
955
+ this.css( style );
956
+ this.emitEvent( 'layout', [ this ] );
957
+ };
958
+
959
+ proto.getXValue = function( x ) {
960
+ var isHorizontal = this.layout._getOption('horizontal');
961
+ return this.layout.options.percentPosition && !isHorizontal ?
962
+ ( ( x / this.layout.size.width ) * 100 ) + '%' : x + 'px';
963
+ };
964
+
965
+ proto.getYValue = function( y ) {
966
+ var isHorizontal = this.layout._getOption('horizontal');
967
+ return this.layout.options.percentPosition && isHorizontal ?
968
+ ( ( y / this.layout.size.height ) * 100 ) + '%' : y + 'px';
969
+ };
970
+
971
+ proto._transitionTo = function( x, y ) {
972
+ this.getPosition();
973
+ // get current x & y from top/left
974
+ var curX = this.position.x;
975
+ var curY = this.position.y;
976
+
977
+ var didNotMove = x == this.position.x && y == this.position.y;
978
+
979
+ // save end position
980
+ this.setPosition( x, y );
981
+
982
+ // if did not move and not transitioning, just go to layout
983
+ if ( didNotMove && !this.isTransitioning ) {
984
+ this.layoutPosition();
985
+ return;
986
+ }
987
+
988
+ var transX = x - curX;
989
+ var transY = y - curY;
990
+ var transitionStyle = {};
991
+ transitionStyle.transform = this.getTranslate( transX, transY );
992
+
993
+ this.transition({
994
+ to: transitionStyle,
995
+ onTransitionEnd: {
996
+ transform: this.layoutPosition
997
+ },
998
+ isCleaning: true
999
+ });
1000
+ };
1001
+
1002
+ proto.getTranslate = function( x, y ) {
1003
+ // flip cooridinates if origin on right or bottom
1004
+ var isOriginLeft = this.layout._getOption('originLeft');
1005
+ var isOriginTop = this.layout._getOption('originTop');
1006
+ x = isOriginLeft ? x : -x;
1007
+ y = isOriginTop ? y : -y;
1008
+ return 'translate3d(' + x + 'px, ' + y + 'px, 0)';
1009
+ };
1010
+
1011
+ // non transition + transform support
1012
+ proto.goTo = function( x, y ) {
1013
+ this.setPosition( x, y );
1014
+ this.layoutPosition();
1015
+ };
1016
+
1017
+ proto.moveTo = proto._transitionTo;
1018
+
1019
+ proto.setPosition = function( x, y ) {
1020
+ this.position.x = parseFloat( x );
1021
+ this.position.y = parseFloat( y );
1022
+ };
1023
+
1024
+ // ----- transition ----- //
1025
+
1026
+ /**
1027
+ * @param {Object} style - CSS
1028
+ * @param {Function} onTransitionEnd
1029
+ */
1030
+
1031
+ // non transition, just trigger callback
1032
+ proto._nonTransition = function( args ) {
1033
+ this.css( args.to );
1034
+ if ( args.isCleaning ) {
1035
+ this._removeStyles( args.to );
1036
+ }
1037
+ for ( var prop in args.onTransitionEnd ) {
1038
+ args.onTransitionEnd[ prop ].call( this );
1039
+ }
1040
+ };
1041
+
1042
+ /**
1043
+ * proper transition
1044
+ * @param {Object} args - arguments
1045
+ * @param {Object} to - style to transition to
1046
+ * @param {Object} from - style to start transition from
1047
+ * @param {Boolean} isCleaning - removes transition styles after transition
1048
+ * @param {Function} onTransitionEnd - callback
1049
+ */
1050
+ proto.transition = function( args ) {
1051
+ // redirect to nonTransition if no transition duration
1052
+ if ( !parseFloat( this.layout.options.transitionDuration ) ) {
1053
+ this._nonTransition( args );
1054
+ return;
1055
+ }
1056
+
1057
+ var _transition = this._transn;
1058
+ // keep track of onTransitionEnd callback by css property
1059
+ for ( var prop in args.onTransitionEnd ) {
1060
+ _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ];
1061
+ }
1062
+ // keep track of properties that are transitioning
1063
+ for ( prop in args.to ) {
1064
+ _transition.ingProperties[ prop ] = true;
1065
+ // keep track of properties to clean up when transition is done
1066
+ if ( args.isCleaning ) {
1067
+ _transition.clean[ prop ] = true;
1068
+ }
1069
+ }
1070
+
1071
+ // set from styles
1072
+ if ( args.from ) {
1073
+ this.css( args.from );
1074
+ // force redraw. http://blog.alexmaccaw.com/css-transitions
1075
+ var h = this.element.offsetHeight;
1076
+ // hack for JSHint to hush about unused var
1077
+ h = null;
1078
+ }
1079
+ // enable transition
1080
+ this.enableTransition( args.to );
1081
+ // set styles that are transitioning
1082
+ this.css( args.to );
1083
+
1084
+ this.isTransitioning = true;
1085
+
1086
+ };
1087
+
1088
+ // dash before all cap letters, including first for
1089
+ // WebkitTransform => -webkit-transform
1090
+ function toDashedAll( str ) {
1091
+ return str.replace( /([A-Z])/g, function( $1 ) {
1092
+ return '-' + $1.toLowerCase();
1093
+ });
1094
+ }
1095
+
1096
+ var transitionProps = 'opacity,' + toDashedAll( transformProperty );
1097
+
1098
+ proto.enableTransition = function(/* style */) {
1099
+ // HACK changing transitionProperty during a transition
1100
+ // will cause transition to jump
1101
+ if ( this.isTransitioning ) {
1102
+ return;
1103
+ }
1104
+
1105
+ // make `transition: foo, bar, baz` from style object
1106
+ // HACK un-comment this when enableTransition can work
1107
+ // while a transition is happening
1108
+ // var transitionValues = [];
1109
+ // for ( var prop in style ) {
1110
+ // // dash-ify camelCased properties like WebkitTransition
1111
+ // prop = vendorProperties[ prop ] || prop;
1112
+ // transitionValues.push( toDashedAll( prop ) );
1113
+ // }
1114
+ // munge number to millisecond, to match stagger
1115
+ var duration = this.layout.options.transitionDuration;
1116
+ duration = typeof duration == 'number' ? duration + 'ms' : duration;
1117
+ // enable transition styles
1118
+ this.css({
1119
+ transitionProperty: transitionProps,
1120
+ transitionDuration: duration,
1121
+ transitionDelay: this.staggerDelay || 0
1122
+ });
1123
+ // listen for transition end event
1124
+ this.element.addEventListener( transitionEndEvent, this, false );
1125
+ };
1126
+
1127
+ // ----- events ----- //
1128
+
1129
+ proto.onwebkitTransitionEnd = function( event ) {
1130
+ this.ontransitionend( event );
1131
+ };
1132
+
1133
+ proto.onotransitionend = function( event ) {
1134
+ this.ontransitionend( event );
1135
+ };
1136
+
1137
+ // properties that I munge to make my life easier
1138
+ var dashedVendorProperties = {
1139
+ '-webkit-transform': 'transform'
1140
+ };
1141
+
1142
+ proto.ontransitionend = function( event ) {
1143
+ // disregard bubbled events from children
1144
+ if ( event.target !== this.element ) {
1145
+ return;
1146
+ }
1147
+ var _transition = this._transn;
1148
+ // get property name of transitioned property, convert to prefix-free
1149
+ var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName;
1150
+
1151
+ // remove property that has completed transitioning
1152
+ delete _transition.ingProperties[ propertyName ];
1153
+ // check if any properties are still transitioning
1154
+ if ( isEmptyObj( _transition.ingProperties ) ) {
1155
+ // all properties have completed transitioning
1156
+ this.disableTransition();
1157
+ }
1158
+ // clean style
1159
+ if ( propertyName in _transition.clean ) {
1160
+ // clean up style
1161
+ this.element.style[ event.propertyName ] = '';
1162
+ delete _transition.clean[ propertyName ];
1163
+ }
1164
+ // trigger onTransitionEnd callback
1165
+ if ( propertyName in _transition.onEnd ) {
1166
+ var onTransitionEnd = _transition.onEnd[ propertyName ];
1167
+ onTransitionEnd.call( this );
1168
+ delete _transition.onEnd[ propertyName ];
1169
+ }
1170
+
1171
+ this.emitEvent( 'transitionEnd', [ this ] );
1172
+ };
1173
+
1174
+ proto.disableTransition = function() {
1175
+ this.removeTransitionStyles();
1176
+ this.element.removeEventListener( transitionEndEvent, this, false );
1177
+ this.isTransitioning = false;
1178
+ };
1179
+
1180
+ /**
1181
+ * removes style property from element
1182
+ * @param {Object} style
1183
+ **/
1184
+ proto._removeStyles = function( style ) {
1185
+ // clean up transition styles
1186
+ var cleanStyle = {};
1187
+ for ( var prop in style ) {
1188
+ cleanStyle[ prop ] = '';
1189
+ }
1190
+ this.css( cleanStyle );
1191
+ };
1192
+
1193
+ var cleanTransitionStyle = {
1194
+ transitionProperty: '',
1195
+ transitionDuration: '',
1196
+ transitionDelay: ''
1197
+ };
1198
+
1199
+ proto.removeTransitionStyles = function() {
1200
+ // remove transition
1201
+ this.css( cleanTransitionStyle );
1202
+ };
1203
+
1204
+ // ----- stagger ----- //
1205
+
1206
+ proto.stagger = function( delay ) {
1207
+ delay = isNaN( delay ) ? 0 : delay;
1208
+ this.staggerDelay = delay + 'ms';
1209
+ };
1210
+
1211
+ // ----- show/hide/remove ----- //
1212
+
1213
+ // remove element from DOM
1214
+ proto.removeElem = function() {
1215
+ this.element.parentNode.removeChild( this.element );
1216
+ // remove display: none
1217
+ this.css({ display: '' });
1218
+ this.emitEvent( 'remove', [ this ] );
1219
+ };
1220
+
1221
+ proto.remove = function() {
1222
+ // just remove element if no transition support or no transition
1223
+ if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) {
1224
+ this.removeElem();
1225
+ return;
1226
+ }
1227
+
1228
+ // start transition
1229
+ this.once( 'transitionEnd', function() {
1230
+ this.removeElem();
1231
+ });
1232
+ this.hide();
1233
+ };
1234
+
1235
+ proto.reveal = function() {
1236
+ delete this.isHidden;
1237
+ // remove display: none
1238
+ this.css({ display: '' });
1239
+
1240
+ var options = this.layout.options;
1241
+
1242
+ var onTransitionEnd = {};
1243
+ var transitionEndProperty = this.getHideRevealTransitionEndProperty('visibleStyle');
1244
+ onTransitionEnd[ transitionEndProperty ] = this.onRevealTransitionEnd;
1245
+
1246
+ this.transition({
1247
+ from: options.hiddenStyle,
1248
+ to: options.visibleStyle,
1249
+ isCleaning: true,
1250
+ onTransitionEnd: onTransitionEnd
1251
+ });
1252
+ };
1253
+
1254
+ proto.onRevealTransitionEnd = function() {
1255
+ // check if still visible
1256
+ // during transition, item may have been hidden
1257
+ if ( !this.isHidden ) {
1258
+ this.emitEvent('reveal');
1259
+ }
1260
+ };
1261
+
1262
+ /**
1263
+ * get style property use for hide/reveal transition end
1264
+ * @param {String} styleProperty - hiddenStyle/visibleStyle
1265
+ * @returns {String}
1266
+ */
1267
+ proto.getHideRevealTransitionEndProperty = function( styleProperty ) {
1268
+ var optionStyle = this.layout.options[ styleProperty ];
1269
+ // use opacity
1270
+ if ( optionStyle.opacity ) {
1271
+ return 'opacity';
1272
+ }
1273
+ // get first property
1274
+ for ( var prop in optionStyle ) {
1275
+ return prop;
1276
+ }
1277
+ };
1278
+
1279
+ proto.hide = function() {
1280
+ // set flag
1281
+ this.isHidden = true;
1282
+ // remove display: none
1283
+ this.css({ display: '' });
1284
+
1285
+ var options = this.layout.options;
1286
+
1287
+ var onTransitionEnd = {};
1288
+ var transitionEndProperty = this.getHideRevealTransitionEndProperty('hiddenStyle');
1289
+ onTransitionEnd[ transitionEndProperty ] = this.onHideTransitionEnd;
1290
+
1291
+ this.transition({
1292
+ from: options.visibleStyle,
1293
+ to: options.hiddenStyle,
1294
+ // keep hidden stuff hidden
1295
+ isCleaning: true,
1296
+ onTransitionEnd: onTransitionEnd
1297
+ });
1298
+ };
1299
+
1300
+ proto.onHideTransitionEnd = function() {
1301
+ // check if still hidden
1302
+ // during transition, item may have been un-hidden
1303
+ if ( this.isHidden ) {
1304
+ this.css({ display: 'none' });
1305
+ this.emitEvent('hide');
1306
+ }
1307
+ };
1308
+
1309
+ proto.destroy = function() {
1310
+ this.css({
1311
+ position: '',
1312
+ left: '',
1313
+ right: '',
1314
+ top: '',
1315
+ bottom: '',
1316
+ transition: '',
1317
+ transform: ''
1318
+ });
1319
+ };
1320
+
1321
+ return Item;
1322
+
1323
+ }));
1324
+
1325
+ /*!
1326
+ * Outlayer v2.1.1
1327
+ * the brains and guts of a layout library
1328
+ * MIT license
1329
+ */
1330
+
1331
+ ( function( window, factory ) {
1332
+ 'use strict';
1333
+ // universal module definition
1334
+ /* jshint strict: false */ /* globals define, module, require */
1335
+ if ( typeof define == 'function' && define.amd ) {
1336
+ // AMD - RequireJS
1337
+ define( 'outlayer/outlayer',[
1338
+ 'ev-emitter/ev-emitter',
1339
+ 'get-size/get-size',
1340
+ 'fizzy-ui-utils/utils',
1341
+ './item'
1342
+ ],
1343
+ function( EvEmitter, getSize, utils, Item ) {
1344
+ return factory( window, EvEmitter, getSize, utils, Item);
1345
+ }
1346
+ );
1347
+ } else if ( typeof module == 'object' && module.exports ) {
1348
+ // CommonJS - Browserify, Webpack
1349
+ module.exports = factory(
1350
+ window,
1351
+ require('ev-emitter'),
1352
+ require('get-size'),
1353
+ require('fizzy-ui-utils'),
1354
+ require('./item')
1355
+ );
1356
+ } else {
1357
+ // browser global
1358
+ window.Outlayer = factory(
1359
+ window,
1360
+ window.EvEmitter,
1361
+ window.getSize,
1362
+ window.fizzyUIUtils,
1363
+ window.Outlayer.Item
1364
+ );
1365
+ }
1366
+
1367
+ }( window, function factory( window, EvEmitter, getSize, utils, Item ) {
1368
+ 'use strict';
1369
+
1370
+ // ----- vars ----- //
1371
+
1372
+ var console = window.console;
1373
+ var jQuery = window.jQuery;
1374
+ var noop = function() {};
1375
+
1376
+ // -------------------------- Outlayer -------------------------- //
1377
+
1378
+ // globally unique identifiers
1379
+ var GUID = 0;
1380
+ // internal store of all Outlayer intances
1381
+ var instances = {};
1382
+
1383
+
1384
+ /**
1385
+ * @param {Element, String} element
1386
+ * @param {Object} options
1387
+ * @constructor
1388
+ */
1389
+ function Outlayer( element, options ) {
1390
+ var queryElement = utils.getQueryElement( element );
1391
+ if ( !queryElement ) {
1392
+ if ( console ) {
1393
+ console.error( 'Bad element for ' + this.constructor.namespace +
1394
+ ': ' + ( queryElement || element ) );
1395
+ }
1396
+ return;
1397
+ }
1398
+ this.element = queryElement;
1399
+ // add jQuery
1400
+ if ( jQuery ) {
1401
+ this.$element = jQuery( this.element );
1402
+ }
1403
+
1404
+ // options
1405
+ this.options = utils.extend( {}, this.constructor.defaults );
1406
+ this.option( options );
1407
+
1408
+ // add id for Outlayer.getFromElement
1409
+ var id = ++GUID;
1410
+ this.element.outlayerGUID = id; // expando
1411
+ instances[ id ] = this; // associate via id
1412
+
1413
+ // kick it off
1414
+ this._create();
1415
+
1416
+ var isInitLayout = this._getOption('initLayout');
1417
+ if ( isInitLayout ) {
1418
+ this.layout();
1419
+ }
1420
+ }
1421
+
1422
+ // settings are for internal use only
1423
+ Outlayer.namespace = 'outlayer';
1424
+ Outlayer.Item = Item;
1425
+
1426
+ // default options
1427
+ Outlayer.defaults = {
1428
+ containerStyle: {
1429
+ position: 'relative'
1430
+ },
1431
+ initLayout: true,
1432
+ originLeft: true,
1433
+ originTop: true,
1434
+ resize: true,
1435
+ resizeContainer: true,
1436
+ // item options
1437
+ transitionDuration: '0.4s',
1438
+ hiddenStyle: {
1439
+ opacity: 0,
1440
+ transform: 'scale(0.001)'
1441
+ },
1442
+ visibleStyle: {
1443
+ opacity: 1,
1444
+ transform: 'scale(1)'
1445
+ }
1446
+ };
1447
+
1448
+ var proto = Outlayer.prototype;
1449
+ // inherit EvEmitter
1450
+ utils.extend( proto, EvEmitter.prototype );
1451
+
1452
+ /**
1453
+ * set options
1454
+ * @param {Object} opts
1455
+ */
1456
+ proto.option = function( opts ) {
1457
+ utils.extend( this.options, opts );
1458
+ };
1459
+
1460
+ /**
1461
+ * get backwards compatible option value, check old name
1462
+ */
1463
+ proto._getOption = function( option ) {
1464
+ var oldOption = this.constructor.compatOptions[ option ];
1465
+ return oldOption && this.options[ oldOption ] !== undefined ?
1466
+ this.options[ oldOption ] : this.options[ option ];
1467
+ };
1468
+
1469
+ Outlayer.compatOptions = {
1470
+ // currentName: oldName
1471
+ initLayout: 'isInitLayout',
1472
+ horizontal: 'isHorizontal',
1473
+ layoutInstant: 'isLayoutInstant',
1474
+ originLeft: 'isOriginLeft',
1475
+ originTop: 'isOriginTop',
1476
+ resize: 'isResizeBound',
1477
+ resizeContainer: 'isResizingContainer'
1478
+ };
1479
+
1480
+ proto._create = function() {
1481
+ // get items from children
1482
+ this.reloadItems();
1483
+ // elements that affect layout, but are not laid out
1484
+ this.stamps = [];
1485
+ this.stamp( this.options.stamp );
1486
+ // set container style
1487
+ utils.extend( this.element.style, this.options.containerStyle );
1488
+
1489
+ // bind resize method
1490
+ var canBindResize = this._getOption('resize');
1491
+ if ( canBindResize ) {
1492
+ this.bindResize();
1493
+ }
1494
+ };
1495
+
1496
+ // goes through all children again and gets bricks in proper order
1497
+ proto.reloadItems = function() {
1498
+ // collection of item elements
1499
+ this.items = this._itemize( this.element.children );
1500
+ };
1501
+
1502
+
1503
+ /**
1504
+ * turn elements into Outlayer.Items to be used in layout
1505
+ * @param {Array or NodeList or HTMLElement} elems
1506
+ * @returns {Array} items - collection of new Outlayer Items
1507
+ */
1508
+ proto._itemize = function( elems ) {
1509
+
1510
+ var itemElems = this._filterFindItemElements( elems );
1511
+ var Item = this.constructor.Item;
1512
+
1513
+ // create new Outlayer Items for collection
1514
+ var items = [];
1515
+ for ( var i=0; i < itemElems.length; i++ ) {
1516
+ var elem = itemElems[i];
1517
+ var item = new Item( elem, this );
1518
+ items.push( item );
1519
+ }
1520
+
1521
+ return items;
1522
+ };
1523
+
1524
+ /**
1525
+ * get item elements to be used in layout
1526
+ * @param {Array or NodeList or HTMLElement} elems
1527
+ * @returns {Array} items - item elements
1528
+ */
1529
+ proto._filterFindItemElements = function( elems ) {
1530
+ return utils.filterFindElements( elems, this.options.itemSelector );
1531
+ };
1532
+
1533
+ /**
1534
+ * getter method for getting item elements
1535
+ * @returns {Array} elems - collection of item elements
1536
+ */
1537
+ proto.getItemElements = function() {
1538
+ return this.items.map( function( item ) {
1539
+ return item.element;
1540
+ });
1541
+ };
1542
+
1543
+ // ----- init & layout ----- //
1544
+
1545
+ /**
1546
+ * lays out all items
1547
+ */
1548
+ proto.layout = function() {
1549
+ this._resetLayout();
1550
+ this._manageStamps();
1551
+
1552
+ // don't animate first layout
1553
+ var layoutInstant = this._getOption('layoutInstant');
1554
+ var isInstant = layoutInstant !== undefined ?
1555
+ layoutInstant : !this._isLayoutInited;
1556
+ this.layoutItems( this.items, isInstant );
1557
+
1558
+ // flag for initalized
1559
+ this._isLayoutInited = true;
1560
+ };
1561
+
1562
+ // _init is alias for layout
1563
+ proto._init = proto.layout;
1564
+
1565
+ /**
1566
+ * logic before any new layout
1567
+ */
1568
+ proto._resetLayout = function() {
1569
+ this.getSize();
1570
+ };
1571
+
1572
+
1573
+ proto.getSize = function() {
1574
+ this.size = getSize( this.element );
1575
+ };
1576
+
1577
+ /**
1578
+ * get measurement from option, for columnWidth, rowHeight, gutter
1579
+ * if option is String -> get element from selector string, & get size of element
1580
+ * if option is Element -> get size of element
1581
+ * else use option as a number
1582
+ *
1583
+ * @param {String} measurement
1584
+ * @param {String} size - width or height
1585
+ * @private
1586
+ */
1587
+ proto._getMeasurement = function( measurement, size ) {
1588
+ var option = this.options[ measurement ];
1589
+ var elem;
1590
+ if ( !option ) {
1591
+ // default to 0
1592
+ this[ measurement ] = 0;
1593
+ } else {
1594
+ // use option as an element
1595
+ if ( typeof option == 'string' ) {
1596
+ elem = this.element.querySelector( option );
1597
+ } else if ( option instanceof HTMLElement ) {
1598
+ elem = option;
1599
+ }
1600
+ // use size of element, if element
1601
+ this[ measurement ] = elem ? getSize( elem )[ size ] : option;
1602
+ }
1603
+ };
1604
+
1605
+ /**
1606
+ * layout a collection of item elements
1607
+ * @api public
1608
+ */
1609
+ proto.layoutItems = function( items, isInstant ) {
1610
+ items = this._getItemsForLayout( items );
1611
+
1612
+ this._layoutItems( items, isInstant );
1613
+
1614
+ this._postLayout();
1615
+ };
1616
+
1617
+ /**
1618
+ * get the items to be laid out
1619
+ * you may want to skip over some items
1620
+ * @param {Array} items
1621
+ * @returns {Array} items
1622
+ */
1623
+ proto._getItemsForLayout = function( items ) {
1624
+ return items.filter( function( item ) {
1625
+ return !item.isIgnored;
1626
+ });
1627
+ };
1628
+
1629
+ /**
1630
+ * layout items
1631
+ * @param {Array} items
1632
+ * @param {Boolean} isInstant
1633
+ */
1634
+ proto._layoutItems = function( items, isInstant ) {
1635
+ this._emitCompleteOnItems( 'layout', items );
1636
+
1637
+ if ( !items || !items.length ) {
1638
+ // no items, emit event with empty array
1639
+ return;
1640
+ }
1641
+
1642
+ var queue = [];
1643
+
1644
+ items.forEach( function( item ) {
1645
+ // get x/y object from method
1646
+ var position = this._getItemLayoutPosition( item );
1647
+ // enqueue
1648
+ position.item = item;
1649
+ position.isInstant = isInstant || item.isLayoutInstant;
1650
+ queue.push( position );
1651
+ }, this );
1652
+
1653
+ this._processLayoutQueue( queue );
1654
+ };
1655
+
1656
+ /**
1657
+ * get item layout position
1658
+ * @param {Outlayer.Item} item
1659
+ * @returns {Object} x and y position
1660
+ */
1661
+ proto._getItemLayoutPosition = function( /* item */ ) {
1662
+ return {
1663
+ x: 0,
1664
+ y: 0
1665
+ };
1666
+ };
1667
+
1668
+ /**
1669
+ * iterate over array and position each item
1670
+ * Reason being - separating this logic prevents 'layout invalidation'
1671
+ * thx @paul_irish
1672
+ * @param {Array} queue
1673
+ */
1674
+ proto._processLayoutQueue = function( queue ) {
1675
+ this.updateStagger();
1676
+ queue.forEach( function( obj, i ) {
1677
+ this._positionItem( obj.item, obj.x, obj.y, obj.isInstant, i );
1678
+ }, this );
1679
+ };
1680
+
1681
+ // set stagger from option in milliseconds number
1682
+ proto.updateStagger = function() {
1683
+ var stagger = this.options.stagger;
1684
+ if ( stagger === null || stagger === undefined ) {
1685
+ this.stagger = 0;
1686
+ return;
1687
+ }
1688
+ this.stagger = getMilliseconds( stagger );
1689
+ return this.stagger;
1690
+ };
1691
+
1692
+ /**
1693
+ * Sets position of item in DOM
1694
+ * @param {Outlayer.Item} item
1695
+ * @param {Number} x - horizontal position
1696
+ * @param {Number} y - vertical position
1697
+ * @param {Boolean} isInstant - disables transitions
1698
+ */
1699
+ proto._positionItem = function( item, x, y, isInstant, i ) {
1700
+ if ( isInstant ) {
1701
+ // if not transition, just set CSS
1702
+ item.goTo( x, y );
1703
+ } else {
1704
+ item.stagger( i * this.stagger );
1705
+ item.moveTo( x, y );
1706
+ }
1707
+ };
1708
+
1709
+ /**
1710
+ * Any logic you want to do after each layout,
1711
+ * i.e. size the container
1712
+ */
1713
+ proto._postLayout = function() {
1714
+ this.resizeContainer();
1715
+ };
1716
+
1717
+ proto.resizeContainer = function() {
1718
+ var isResizingContainer = this._getOption('resizeContainer');
1719
+ if ( !isResizingContainer ) {
1720
+ return;
1721
+ }
1722
+ var size = this._getContainerSize();
1723
+ if ( size ) {
1724
+ this._setContainerMeasure( size.width, true );
1725
+ this._setContainerMeasure( size.height, false );
1726
+ }
1727
+ };
1728
+
1729
+ /**
1730
+ * Sets width or height of container if returned
1731
+ * @returns {Object} size
1732
+ * @param {Number} width
1733
+ * @param {Number} height
1734
+ */
1735
+ proto._getContainerSize = noop;
1736
+
1737
+ /**
1738
+ * @param {Number} measure - size of width or height
1739
+ * @param {Boolean} isWidth
1740
+ */
1741
+ proto._setContainerMeasure = function( measure, isWidth ) {
1742
+ if ( measure === undefined ) {
1743
+ return;
1744
+ }
1745
+
1746
+ var elemSize = this.size;
1747
+ // add padding and border width if border box
1748
+ if ( elemSize.isBorderBox ) {
1749
+ measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight +
1750
+ elemSize.borderLeftWidth + elemSize.borderRightWidth :
1751
+ elemSize.paddingBottom + elemSize.paddingTop +
1752
+ elemSize.borderTopWidth + elemSize.borderBottomWidth;
1753
+ }
1754
+
1755
+ measure = Math.max( measure, 0 );
1756
+ this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px';
1757
+ };
1758
+
1759
+ /**
1760
+ * emit eventComplete on a collection of items events
1761
+ * @param {String} eventName
1762
+ * @param {Array} items - Outlayer.Items
1763
+ */
1764
+ proto._emitCompleteOnItems = function( eventName, items ) {
1765
+ var _this = this;
1766
+ function onComplete() {
1767
+ _this.dispatchEvent( eventName + 'Complete', null, [ items ] );
1768
+ }
1769
+
1770
+ var count = items.length;
1771
+ if ( !items || !count ) {
1772
+ onComplete();
1773
+ return;
1774
+ }
1775
+
1776
+ var doneCount = 0;
1777
+ function tick() {
1778
+ doneCount++;
1779
+ if ( doneCount == count ) {
1780
+ onComplete();
1781
+ }
1782
+ }
1783
+
1784
+ // bind callback
1785
+ items.forEach( function( item ) {
1786
+ item.once( eventName, tick );
1787
+ });
1788
+ };
1789
+
1790
+ /**
1791
+ * emits events via EvEmitter and jQuery events
1792
+ * @param {String} type - name of event
1793
+ * @param {Event} event - original event
1794
+ * @param {Array} args - extra arguments
1795
+ */
1796
+ proto.dispatchEvent = function( type, event, args ) {
1797
+ // add original event to arguments
1798
+ var emitArgs = event ? [ event ].concat( args ) : args;
1799
+ this.emitEvent( type, emitArgs );
1800
+
1801
+ if ( jQuery ) {
1802
+ // set this.$element
1803
+ this.$element = this.$element || jQuery( this.element );
1804
+ if ( event ) {
1805
+ // create jQuery event
1806
+ var $event = jQuery.Event( event );
1807
+ $event.type = type;
1808
+ this.$element.trigger( $event, args );
1809
+ } else {
1810
+ // just trigger with type if no event available
1811
+ this.$element.trigger( type, args );
1812
+ }
1813
+ }
1814
+ };
1815
+
1816
+ // -------------------------- ignore & stamps -------------------------- //
1817
+
1818
+
1819
+ /**
1820
+ * keep item in collection, but do not lay it out
1821
+ * ignored items do not get skipped in layout
1822
+ * @param {Element} elem
1823
+ */
1824
+ proto.ignore = function( elem ) {
1825
+ var item = this.getItem( elem );
1826
+ if ( item ) {
1827
+ item.isIgnored = true;
1828
+ }
1829
+ };
1830
+
1831
+ /**
1832
+ * return item to layout collection
1833
+ * @param {Element} elem
1834
+ */
1835
+ proto.unignore = function( elem ) {
1836
+ var item = this.getItem( elem );
1837
+ if ( item ) {
1838
+ delete item.isIgnored;
1839
+ }
1840
+ };
1841
+
1842
+ /**
1843
+ * adds elements to stamps
1844
+ * @param {NodeList, Array, Element, or String} elems
1845
+ */
1846
+ proto.stamp = function( elems ) {
1847
+ elems = this._find( elems );
1848
+ if ( !elems ) {
1849
+ return;
1850
+ }
1851
+
1852
+ this.stamps = this.stamps.concat( elems );
1853
+ // ignore
1854
+ elems.forEach( this.ignore, this );
1855
+ };
1856
+
1857
+ /**
1858
+ * removes elements to stamps
1859
+ * @param {NodeList, Array, or Element} elems
1860
+ */
1861
+ proto.unstamp = function( elems ) {
1862
+ elems = this._find( elems );
1863
+ if ( !elems ){
1864
+ return;
1865
+ }
1866
+
1867
+ elems.forEach( function( elem ) {
1868
+ // filter out removed stamp elements
1869
+ utils.removeFrom( this.stamps, elem );
1870
+ this.unignore( elem );
1871
+ }, this );
1872
+ };
1873
+
1874
+ /**
1875
+ * finds child elements
1876
+ * @param {NodeList, Array, Element, or String} elems
1877
+ * @returns {Array} elems
1878
+ */
1879
+ proto._find = function( elems ) {
1880
+ if ( !elems ) {
1881
+ return;
1882
+ }
1883
+ // if string, use argument as selector string
1884
+ if ( typeof elems == 'string' ) {
1885
+ elems = this.element.querySelectorAll( elems );
1886
+ }
1887
+ elems = utils.makeArray( elems );
1888
+ return elems;
1889
+ };
1890
+
1891
+ proto._manageStamps = function() {
1892
+ if ( !this.stamps || !this.stamps.length ) {
1893
+ return;
1894
+ }
1895
+
1896
+ this._getBoundingRect();
1897
+
1898
+ this.stamps.forEach( this._manageStamp, this );
1899
+ };
1900
+
1901
+ // update boundingLeft / Top
1902
+ proto._getBoundingRect = function() {
1903
+ // get bounding rect for container element
1904
+ var boundingRect = this.element.getBoundingClientRect();
1905
+ var size = this.size;
1906
+ this._boundingRect = {
1907
+ left: boundingRect.left + size.paddingLeft + size.borderLeftWidth,
1908
+ top: boundingRect.top + size.paddingTop + size.borderTopWidth,
1909
+ right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ),
1910
+ bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth )
1911
+ };
1912
+ };
1913
+
1914
+ /**
1915
+ * @param {Element} stamp
1916
+ **/
1917
+ proto._manageStamp = noop;
1918
+
1919
+ /**
1920
+ * get x/y position of element relative to container element
1921
+ * @param {Element} elem
1922
+ * @returns {Object} offset - has left, top, right, bottom
1923
+ */
1924
+ proto._getElementOffset = function( elem ) {
1925
+ var boundingRect = elem.getBoundingClientRect();
1926
+ var thisRect = this._boundingRect;
1927
+ var size = getSize( elem );
1928
+ var offset = {
1929
+ left: boundingRect.left - thisRect.left - size.marginLeft,
1930
+ top: boundingRect.top - thisRect.top - size.marginTop,
1931
+ right: thisRect.right - boundingRect.right - size.marginRight,
1932
+ bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom
1933
+ };
1934
+ return offset;
1935
+ };
1936
+
1937
+ // -------------------------- resize -------------------------- //
1938
+
1939
+ // enable event handlers for listeners
1940
+ // i.e. resize -> onresize
1941
+ proto.handleEvent = utils.handleEvent;
1942
+
1943
+ /**
1944
+ * Bind layout to window resizing
1945
+ */
1946
+ proto.bindResize = function() {
1947
+ window.addEventListener( 'resize', this );
1948
+ this.isResizeBound = true;
1949
+ };
1950
+
1951
+ /**
1952
+ * Unbind layout to window resizing
1953
+ */
1954
+ proto.unbindResize = function() {
1955
+ window.removeEventListener( 'resize', this );
1956
+ this.isResizeBound = false;
1957
+ };
1958
+
1959
+ proto.onresize = function() {
1960
+ this.resize();
1961
+ };
1962
+
1963
+ utils.debounceMethod( Outlayer, 'onresize', 100 );
1964
+
1965
+ proto.resize = function() {
1966
+ // don't trigger if size did not change
1967
+ // or if resize was unbound. See #9
1968
+ if ( !this.isResizeBound || !this.needsResizeLayout() ) {
1969
+ return;
1970
+ }
1971
+
1972
+ this.layout();
1973
+ };
1974
+
1975
+ /**
1976
+ * check if layout is needed post layout
1977
+ * @returns Boolean
1978
+ */
1979
+ proto.needsResizeLayout = function() {
1980
+ var size = getSize( this.element );
1981
+ // check that this.size and size are there
1982
+ // IE8 triggers resize on body size change, so they might not be
1983
+ var hasSizes = this.size && size;
1984
+ return hasSizes && size.innerWidth !== this.size.innerWidth;
1985
+ };
1986
+
1987
+ // -------------------------- methods -------------------------- //
1988
+
1989
+ /**
1990
+ * add items to Outlayer instance
1991
+ * @param {Array or NodeList or Element} elems
1992
+ * @returns {Array} items - Outlayer.Items
1993
+ **/
1994
+ proto.addItems = function( elems ) {
1995
+ var items = this._itemize( elems );
1996
+ // add items to collection
1997
+ if ( items.length ) {
1998
+ this.items = this.items.concat( items );
1999
+ }
2000
+ return items;
2001
+ };
2002
+
2003
+ /**
2004
+ * Layout newly-appended item elements
2005
+ * @param {Array or NodeList or Element} elems
2006
+ */
2007
+ proto.appended = function( elems ) {
2008
+ var items = this.addItems( elems );
2009
+ if ( !items.length ) {
2010
+ return;
2011
+ }
2012
+ // layout and reveal just the new items
2013
+ this.layoutItems( items, true );
2014
+ this.reveal( items );
2015
+ };
2016
+
2017
+ /**
2018
+ * Layout prepended elements
2019
+ * @param {Array or NodeList or Element} elems
2020
+ */
2021
+ proto.prepended = function( elems ) {
2022
+ var items = this._itemize( elems );
2023
+ if ( !items.length ) {
2024
+ return;
2025
+ }
2026
+ // add items to beginning of collection
2027
+ var previousItems = this.items.slice(0);
2028
+ this.items = items.concat( previousItems );
2029
+ // start new layout
2030
+ this._resetLayout();
2031
+ this._manageStamps();
2032
+ // layout new stuff without transition
2033
+ this.layoutItems( items, true );
2034
+ this.reveal( items );
2035
+ // layout previous items
2036
+ this.layoutItems( previousItems );
2037
+ };
2038
+
2039
+ /**
2040
+ * reveal a collection of items
2041
+ * @param {Array of Outlayer.Items} items
2042
+ */
2043
+ proto.reveal = function( items ) {
2044
+ this._emitCompleteOnItems( 'reveal', items );
2045
+ if ( !items || !items.length ) {
2046
+ return;
2047
+ }
2048
+ var stagger = this.updateStagger();
2049
+ items.forEach( function( item, i ) {
2050
+ item.stagger( i * stagger );
2051
+ item.reveal();
2052
+ });
2053
+ };
2054
+
2055
+ /**
2056
+ * hide a collection of items
2057
+ * @param {Array of Outlayer.Items} items
2058
+ */
2059
+ proto.hide = function( items ) {
2060
+ this._emitCompleteOnItems( 'hide', items );
2061
+ if ( !items || !items.length ) {
2062
+ return;
2063
+ }
2064
+ var stagger = this.updateStagger();
2065
+ items.forEach( function( item, i ) {
2066
+ item.stagger( i * stagger );
2067
+ item.hide();
2068
+ });
2069
+ };
2070
+
2071
+ /**
2072
+ * reveal item elements
2073
+ * @param {Array}, {Element}, {NodeList} items
2074
+ */
2075
+ proto.revealItemElements = function( elems ) {
2076
+ var items = this.getItems( elems );
2077
+ this.reveal( items );
2078
+ };
2079
+
2080
+ /**
2081
+ * hide item elements
2082
+ * @param {Array}, {Element}, {NodeList} items
2083
+ */
2084
+ proto.hideItemElements = function( elems ) {
2085
+ var items = this.getItems( elems );
2086
+ this.hide( items );
2087
+ };
2088
+
2089
+ /**
2090
+ * get Outlayer.Item, given an Element
2091
+ * @param {Element} elem
2092
+ * @param {Function} callback
2093
+ * @returns {Outlayer.Item} item
2094
+ */
2095
+ proto.getItem = function( elem ) {
2096
+ // loop through items to get the one that matches
2097
+ for ( var i=0; i < this.items.length; i++ ) {
2098
+ var item = this.items[i];
2099
+ if ( item.element == elem ) {
2100
+ // return item
2101
+ return item;
2102
+ }
2103
+ }
2104
+ };
2105
+
2106
+ /**
2107
+ * get collection of Outlayer.Items, given Elements
2108
+ * @param {Array} elems
2109
+ * @returns {Array} items - Outlayer.Items
2110
+ */
2111
+ proto.getItems = function( elems ) {
2112
+ elems = utils.makeArray( elems );
2113
+ var items = [];
2114
+ elems.forEach( function( elem ) {
2115
+ var item = this.getItem( elem );
2116
+ if ( item ) {
2117
+ items.push( item );
2118
+ }
2119
+ }, this );
2120
+
2121
+ return items;
2122
+ };
2123
+
2124
+ /**
2125
+ * remove element(s) from instance and DOM
2126
+ * @param {Array or NodeList or Element} elems
2127
+ */
2128
+ proto.remove = function( elems ) {
2129
+ var removeItems = this.getItems( elems );
2130
+
2131
+ this._emitCompleteOnItems( 'remove', removeItems );
2132
+
2133
+ // bail if no items to remove
2134
+ if ( !removeItems || !removeItems.length ) {
2135
+ return;
2136
+ }
2137
+
2138
+ removeItems.forEach( function( item ) {
2139
+ item.remove();
2140
+ // remove item from collection
2141
+ utils.removeFrom( this.items, item );
2142
+ }, this );
2143
+ };
2144
+
2145
+ // ----- destroy ----- //
2146
+
2147
+ // remove and disable Outlayer instance
2148
+ proto.destroy = function() {
2149
+ // clean up dynamic styles
2150
+ var style = this.element.style;
2151
+ style.height = '';
2152
+ style.position = '';
2153
+ style.width = '';
2154
+ // destroy items
2155
+ this.items.forEach( function( item ) {
2156
+ item.destroy();
2157
+ });
2158
+
2159
+ this.unbindResize();
2160
+
2161
+ var id = this.element.outlayerGUID;
2162
+ delete instances[ id ]; // remove reference to instance by id
2163
+ delete this.element.outlayerGUID;
2164
+ // remove data for jQuery
2165
+ if ( jQuery ) {
2166
+ jQuery.removeData( this.element, this.constructor.namespace );
2167
+ }
2168
+
2169
+ };
2170
+
2171
+ // -------------------------- data -------------------------- //
2172
+
2173
+ /**
2174
+ * get Outlayer instance from element
2175
+ * @param {Element} elem
2176
+ * @returns {Outlayer}
2177
+ */
2178
+ Outlayer.data = function( elem ) {
2179
+ elem = utils.getQueryElement( elem );
2180
+ var id = elem && elem.outlayerGUID;
2181
+ return id && instances[ id ];
2182
+ };
2183
+
2184
+
2185
+ // -------------------------- create Outlayer class -------------------------- //
2186
+
2187
+ /**
2188
+ * create a layout class
2189
+ * @param {String} namespace
2190
+ */
2191
+ Outlayer.create = function( namespace, options ) {
2192
+ // sub-class Outlayer
2193
+ var Layout = subclass( Outlayer );
2194
+ // apply new options and compatOptions
2195
+ Layout.defaults = utils.extend( {}, Outlayer.defaults );
2196
+ utils.extend( Layout.defaults, options );
2197
+ Layout.compatOptions = utils.extend( {}, Outlayer.compatOptions );
2198
+
2199
+ Layout.namespace = namespace;
2200
+
2201
+ Layout.data = Outlayer.data;
2202
+
2203
+ // sub-class Item
2204
+ Layout.Item = subclass( Item );
2205
+
2206
+ // -------------------------- declarative -------------------------- //
2207
+
2208
+ utils.htmlInit( Layout, namespace );
2209
+
2210
+ // -------------------------- jQuery bridge -------------------------- //
2211
+
2212
+ // make into jQuery plugin
2213
+ if ( jQuery && jQuery.bridget ) {
2214
+ jQuery.bridget( namespace, Layout );
2215
+ }
2216
+
2217
+ return Layout;
2218
+ };
2219
+
2220
+ function subclass( Parent ) {
2221
+ function SubClass() {
2222
+ Parent.apply( this, arguments );
2223
+ }
2224
+
2225
+ SubClass.prototype = Object.create( Parent.prototype );
2226
+ SubClass.prototype.constructor = SubClass;
2227
+
2228
+ return SubClass;
2229
+ }
2230
+
2231
+ // ----- helpers ----- //
2232
+
2233
+ // how many milliseconds are in each unit
2234
+ var msUnits = {
2235
+ ms: 1,
2236
+ s: 1000
2237
+ };
2238
+
2239
+ // munge time-like parameter into millisecond number
2240
+ // '0.4s' -> 40
2241
+ function getMilliseconds( time ) {
2242
+ if ( typeof time == 'number' ) {
2243
+ return time;
2244
+ }
2245
+ var matches = time.match( /(^\d*\.?\d*)(\w*)/ );
2246
+ var num = matches && matches[1];
2247
+ var unit = matches && matches[2];
2248
+ if ( !num.length ) {
2249
+ return 0;
2250
+ }
2251
+ num = parseFloat( num );
2252
+ var mult = msUnits[ unit ] || 1;
2253
+ return num * mult;
2254
+ }
2255
+
2256
+ // ----- fin ----- //
2257
+
2258
+ // back in global
2259
+ Outlayer.Item = Item;
2260
+
2261
+ return Outlayer;
2262
+
2263
+ }));
2264
+
2265
+ /*!
2266
+ * Masonry v4.2.2
2267
+ * Cascading grid layout library
2268
+ * https://masonry.desandro.com
2269
+ * MIT License
2270
+ * by David DeSandro
2271
+ */
2272
+
2273
+ ( function( window, factory ) {
2274
+ // universal module definition
2275
+ /* jshint strict: false */ /*globals define, module, require */
2276
+ if ( typeof define == 'function' && define.amd ) {
2277
+ // AMD
2278
+ define( [
2279
+ 'outlayer/outlayer',
2280
+ 'get-size/get-size'
2281
+ ],
2282
+ factory );
2283
+ } else if ( typeof module == 'object' && module.exports ) {
2284
+ // CommonJS
2285
+ module.exports = factory(
2286
+ require('outlayer'),
2287
+ require('get-size')
2288
+ );
2289
+ } else {
2290
+ // browser global
2291
+ window.Masonry = factory(
2292
+ window.Outlayer,
2293
+ window.getSize
2294
+ );
2295
+ }
2296
+
2297
+ }( window, function factory( Outlayer, getSize ) {
2298
+
2299
+
2300
+
2301
+ // -------------------------- masonryDefinition -------------------------- //
2302
+
2303
+ // create an Outlayer layout class
2304
+ var Masonry = Outlayer.create('masonry');
2305
+ // isFitWidth -> fitWidth
2306
+ Masonry.compatOptions.fitWidth = 'isFitWidth';
2307
+
2308
+ var proto = Masonry.prototype;
2309
+
2310
+ proto._resetLayout = function() {
2311
+ this.getSize();
2312
+ this._getMeasurement( 'columnWidth', 'outerWidth' );
2313
+ this._getMeasurement( 'gutter', 'outerWidth' );
2314
+ this.measureColumns();
2315
+
2316
+ // reset column Y
2317
+ this.colYs = [];
2318
+ for ( var i=0; i < this.cols; i++ ) {
2319
+ this.colYs.push( 0 );
2320
+ }
2321
+
2322
+ this.maxY = 0;
2323
+ this.horizontalColIndex = 0;
2324
+ };
2325
+
2326
+ proto.measureColumns = function() {
2327
+ this.getContainerWidth();
2328
+ // if columnWidth is 0, default to outerWidth of first item
2329
+ if ( !this.columnWidth ) {
2330
+ var firstItem = this.items[0];
2331
+ var firstItemElem = firstItem && firstItem.element;
2332
+ // columnWidth fall back to item of first element
2333
+ this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth ||
2334
+ // if first elem has no width, default to size of container
2335
+ this.containerWidth;
2336
+ }
2337
+
2338
+ var columnWidth = this.columnWidth += this.gutter;
2339
+
2340
+ // calculate columns
2341
+ var containerWidth = this.containerWidth + this.gutter;
2342
+ var cols = containerWidth / columnWidth;
2343
+ // fix rounding errors, typically with gutters
2344
+ var excess = columnWidth - containerWidth % columnWidth;
2345
+ // if overshoot is less than a pixel, round up, otherwise floor it
2346
+ var mathMethod = excess && excess < 1 ? 'round' : 'floor';
2347
+ cols = Math[ mathMethod ]( cols );
2348
+ this.cols = Math.max( cols, 1 );
2349
+ };
2350
+
2351
+ proto.getContainerWidth = function() {
2352
+ // container is parent if fit width
2353
+ var isFitWidth = this._getOption('fitWidth');
2354
+ var container = isFitWidth ? this.element.parentNode : this.element;
2355
+ // check that this.size and size are there
2356
+ // IE8 triggers resize on body size change, so they might not be
2357
+ var size = getSize( container );
2358
+ this.containerWidth = size && size.innerWidth;
2359
+ };
2360
+
2361
+ proto._getItemLayoutPosition = function( item ) {
2362
+ item.getSize();
2363
+ // how many columns does this brick span
2364
+ var remainder = item.size.outerWidth % this.columnWidth;
2365
+ var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';
2366
+ // round if off by 1 pixel, otherwise use ceil
2367
+ var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );
2368
+ colSpan = Math.min( colSpan, this.cols );
2369
+ // use horizontal or top column position
2370
+ var colPosMethod = this.options.horizontalOrder ?
2371
+ '_getHorizontalColPosition' : '_getTopColPosition';
2372
+ var colPosition = this[ colPosMethod ]( colSpan, item );
2373
+ // position the brick
2374
+ var position = {
2375
+ x: this.columnWidth * colPosition.col,
2376
+ y: colPosition.y
2377
+ };
2378
+ // apply setHeight to necessary columns
2379
+ var setHeight = colPosition.y + item.size.outerHeight;
2380
+ var setMax = colSpan + colPosition.col;
2381
+ for ( var i = colPosition.col; i < setMax; i++ ) {
2382
+ this.colYs[i] = setHeight;
2383
+ }
2384
+
2385
+ return position;
2386
+ };
2387
+
2388
+ proto._getTopColPosition = function( colSpan ) {
2389
+ var colGroup = this._getTopColGroup( colSpan );
2390
+ // get the minimum Y value from the columns
2391
+ var minimumY = Math.min.apply( Math, colGroup );
2392
+
2393
+ return {
2394
+ col: colGroup.indexOf( minimumY ),
2395
+ y: minimumY,
2396
+ };
2397
+ };
2398
+
2399
+ /**
2400
+ * @param {Number} colSpan - number of columns the element spans
2401
+ * @returns {Array} colGroup
2402
+ */
2403
+ proto._getTopColGroup = function( colSpan ) {
2404
+ if ( colSpan < 2 ) {
2405
+ // if brick spans only one column, use all the column Ys
2406
+ return this.colYs;
2407
+ }
2408
+
2409
+ var colGroup = [];
2410
+ // how many different places could this brick fit horizontally
2411
+ var groupCount = this.cols + 1 - colSpan;
2412
+ // for each group potential horizontal position
2413
+ for ( var i = 0; i < groupCount; i++ ) {
2414
+ colGroup[i] = this._getColGroupY( i, colSpan );
2415
+ }
2416
+ return colGroup;
2417
+ };
2418
+
2419
+ proto._getColGroupY = function( col, colSpan ) {
2420
+ if ( colSpan < 2 ) {
2421
+ return this.colYs[ col ];
2422
+ }
2423
+ // make an array of colY values for that one group
2424
+ var groupColYs = this.colYs.slice( col, col + colSpan );
2425
+ // and get the max value of the array
2426
+ return Math.max.apply( Math, groupColYs );
2427
+ };
2428
+
2429
+ // get column position based on horizontal index. #873
2430
+ proto._getHorizontalColPosition = function( colSpan, item ) {
2431
+ var col = this.horizontalColIndex % this.cols;
2432
+ var isOver = colSpan > 1 && col + colSpan > this.cols;
2433
+ // shift to next row if item can't fit on current row
2434
+ col = isOver ? 0 : col;
2435
+ // don't let zero-size items take up space
2436
+ var hasSize = item.size.outerWidth && item.size.outerHeight;
2437
+ this.horizontalColIndex = hasSize ? col + colSpan : this.horizontalColIndex;
2438
+
2439
+ return {
2440
+ col: col,
2441
+ y: this._getColGroupY( col, colSpan ),
2442
+ };
2443
+ };
2444
+
2445
+ proto._manageStamp = function( stamp ) {
2446
+ var stampSize = getSize( stamp );
2447
+ var offset = this._getElementOffset( stamp );
2448
+ // get the columns that this stamp affects
2449
+ var isOriginLeft = this._getOption('originLeft');
2450
+ var firstX = isOriginLeft ? offset.left : offset.right;
2451
+ var lastX = firstX + stampSize.outerWidth;
2452
+ var firstCol = Math.floor( firstX / this.columnWidth );
2453
+ firstCol = Math.max( 0, firstCol );
2454
+ var lastCol = Math.floor( lastX / this.columnWidth );
2455
+ // lastCol should not go over if multiple of columnWidth #425
2456
+ lastCol -= lastX % this.columnWidth ? 0 : 1;
2457
+ lastCol = Math.min( this.cols - 1, lastCol );
2458
+ // set colYs to bottom of the stamp
2459
+
2460
+ var isOriginTop = this._getOption('originTop');
2461
+ var stampMaxY = ( isOriginTop ? offset.top : offset.bottom ) +
2462
+ stampSize.outerHeight;
2463
+ for ( var i = firstCol; i <= lastCol; i++ ) {
2464
+ this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );
2465
+ }
2466
+ };
2467
+
2468
+ proto._getContainerSize = function() {
2469
+ this.maxY = Math.max.apply( Math, this.colYs );
2470
+ var size = {
2471
+ height: this.maxY
2472
+ };
2473
+
2474
+ if ( this._getOption('fitWidth') ) {
2475
+ size.width = this._getContainerFitWidth();
2476
+ }
2477
+
2478
+ return size;
2479
+ };
2480
+
2481
+ proto._getContainerFitWidth = function() {
2482
+ var unusedCols = 0;
2483
+ // count unused columns
2484
+ var i = this.cols;
2485
+ while ( --i ) {
2486
+ if ( this.colYs[i] !== 0 ) {
2487
+ break;
2488
+ }
2489
+ unusedCols++;
2490
+ }
2491
+ // fit container to columns that have been used
2492
+ return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;
2493
+ };
2494
+
2495
+ proto.needsResizeLayout = function() {
2496
+ var previousWidth = this.containerWidth;
2497
+ this.getContainerWidth();
2498
+ return previousWidth != this.containerWidth;
2499
+ };
2500
+
2501
+ return Masonry;
2502
+
2503
+ }));
2504
+
vendor/masonry/masonry.min.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Masonry PACKAGED v4.2.2
3
+ * Cascading grid layout library
4
+ * https://masonry.desandro.com
5
+ * MIT License
6
+ * by David DeSandro
7
+ */
8
+
9
+ !function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(t,r),delete n[r]),r.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=-1==t.indexOf("%")&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;u>e;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);s=200==Math.round(t(o.width)),r.isBoxSizeOuter=s,i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,E=d&&s,b=t(r.width);b!==!1&&(a.width=b+(E?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(E?0:g+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+z),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i],o=n+"MatchesSelector";if(t[o])return o}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e};var n=Array.prototype.slice;i.makeArray=function(t){if(Array.isArray(t))return t;if(null===t||void 0===t)return[];var e="object"==typeof t&&"number"==typeof t.length;return e?n.call(t):[t]},i.removeFrom=function(t,e){var i=t.indexOf(e);-1!=i&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,n){t=i.makeArray(t);var o=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!n)return void o.push(t);e(t,n)&&o.push(t);for(var i=t.querySelectorAll(n),r=0;r<i.length;r++)o.push(i[r])}}),o},i.debounceMethod=function(t,e,i){i=i||100;var n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout(function(){n.apply(r,e),delete r[o]},i)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var o=t.console;return i.htmlInit=function(e,n){i.docReady(function(){var r=i.toDashed(n),s="data-"+r,a=document.querySelectorAll("["+s+"]"),h=document.querySelectorAll(".js-"+r),u=i.makeArray(a).concat(i.makeArray(h)),d=s+"-options",l=t.jQuery;u.forEach(function(t){var i,r=t.getAttribute(s)||t.getAttribute(d);try{i=r&&JSON.parse(r)}catch(a){return void(o&&o.error("Error parsing "+s+" on "+t.className+": "+a))}var h=new e(t,i);l&&l.data(t,n,h)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function n(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function o(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var r=document.documentElement.style,s="string"==typeof r.transition?"transition":"WebkitTransition",a="string"==typeof r.transform?"transform":"WebkitTransform",h={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[s],u={transform:a,transition:s,transitionDuration:s+"Duration",transitionProperty:s+"Property",transitionDelay:s+"Delay"},d=n.prototype=Object.create(t.prototype);d.constructor=n,d._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},d.getSize=function(){this.size=e(this.element)},d.css=function(t){var e=this.element.style;for(var i in t){var n=u[i]||i;e[n]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=t[e?"left":"right"],o=t[i?"top":"bottom"],r=parseFloat(n),s=parseFloat(o),a=this.layout.size;-1!=n.indexOf("%")&&(r=r/100*a.width),-1!=o.indexOf("%")&&(s=s/100*a.height),r=isNaN(r)?0:r,s=isNaN(s)?0:s,r-=e?a.paddingLeft:a.paddingRight,s-=i?a.paddingTop:a.paddingBottom,this.position.x=r,this.position.y=s},d.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),o=i?"paddingLeft":"paddingRight",r=i?"left":"right",s=i?"right":"left",a=this.position.x+t[o];e[r]=this.getXValue(a),e[s]="";var h=n?"paddingTop":"paddingBottom",u=n?"top":"bottom",d=n?"bottom":"top",l=this.position.y+t[h];e[u]=this.getYValue(l),e[d]="",this.css(e),this.emitEvent("layout",[this])},d.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},d.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},d._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),o&&!this.isTransitioning)return void this.layoutPosition();var r=t-i,s=e-n,a={};a.transform=this.getTranslate(r,s),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop");return t=i?t:-t,e=n?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},d.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},d.moveTo=d._transitionTo,d.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},d._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},d.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var n=this.element.offsetHeight;n=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+o(a);d.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(h,this,!1)}},d.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.onotransitionend=function(t){this.ontransitionend(t)};var c={"-webkit-transform":"transform"};d.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,n=c[t.propertyName]||t.propertyName;if(delete e.ingProperties[n],i(e.ingProperties)&&this.disableTransition(),n in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[n]),n in e.onEnd){var o=e.onEnd[n];o.call(this),delete e.onEnd[n]}this.emitEvent("transitionEnd",[this])}},d.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(h,this,!1),this.isTransitioning=!1},d._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return d.removeTransitionStyles=function(){this.css(f)},d.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},d.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},d.remove=function(){return s&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},d.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},d.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},d.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},d.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},d.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},d.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},n}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,n,o,r){return e(t,i,n,o,r)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,n,o){"use strict";function r(t,e){var i=n.getQueryElement(t);if(!i)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,u&&(this.$element=u(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e);var o=++l;this.element.outlayerGUID=o,c[o]=this,this._create();var r=this._getOption("initLayout");r&&this.layout()}function s(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],n=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var o=m[n]||1;return i*o}var h=t.console,u=t.jQuery,d=function(){},l=0,c={};r.namespace="outlayer",r.Item=o,r.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var f=r.prototype;n.extend(f,e.prototype),f.option=function(t){n.extend(this.options,t)},f._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},r.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0;o<e.length;o++){var r=e[o],s=new i(r,this);n.push(s)}return n},f._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},f.getItemElements=function(){return this.items.map(function(t){return t.element})},f.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},f._init=f.layout,f._resetLayout=function(){this.getSize()},f.getSize=function(){this.size=i(this.element)},f._getMeasurement=function(t,e){var n,o=this.options[t];o?("string"==typeof o?n=this.element.querySelector(o):o instanceof HTMLElement&&(n=o),this[t]=n?i(n)[e]:o):this[t]=0},f.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},f._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},f._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var n=this._getItemLayoutPosition(t);n.item=t,n.isInstant=e||t.isLayoutInstant,i.push(n)},this),this._processLayoutQueue(i)}},f._getItemLayoutPosition=function(){return{x:0,y:0}},f._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},f.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},f._positionItem=function(t,e,i,n,o){n?t.goTo(e,i):(t.stagger(o*this.stagger),t.moveTo(e,i))},f._postLayout=function(){this.resizeContainer()},f.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},f._getContainerSize=d,f._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},f._emitCompleteOnItems=function(t,e){function i(){o.dispatchEvent(t+"Complete",null,[e])}function n(){s++,s==r&&i()}var o=this,r=e.length;if(!e||!r)return void i();var s=0;e.forEach(function(e){e.once(t,n)})},f.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),u)if(this.$element=this.$element||u(this.element),e){var o=u.Event(e);o.type=t,this.$element.trigger(o,i)}else this.$element.trigger(t,i)},f.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},f.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},f.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},f.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){n.removeFrom(this.stamps,t),this.unignore(t)},this)},f._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)):void 0},f._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},f._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},f._manageStamp=d,f._getElementOffset=function(t){var e=t.getBoundingClientRect(),n=this._boundingRect,o=i(t),r={left:e.left-n.left-o.marginLeft,top:e.top-n.top-o.marginTop,right:n.right-e.right-o.marginRight,bottom:n.bottom-e.bottom-o.marginBottom};return r},f.handleEvent=n.handleEvent,f.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},f.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},f.onresize=function(){this.resize()},n.debounceMethod(r,"onresize",100),f.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},f.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},f.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},f.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},f.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},f.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},f.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},f.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},f.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},f.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},f.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},f.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),n.removeFrom(this.items,t)},this)},f.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete c[e],delete this.element.outlayerGUID,u&&u.removeData(this.element,this.constructor.namespace)},r.data=function(t){t=n.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&c[e]},r.create=function(t,e){var i=s(r);return i.defaults=n.extend({},r.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},r.compatOptions),i.namespace=t,i.data=r.data,i.Item=s(o),n.htmlInit(i,t),u&&u.bridget&&u.bridget(t,i),i};var m={ms:1,s:1e3};return r.Item=o,r}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var n=i.prototype;return n._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},n.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var n=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,r=o/n,s=n-o%n,a=s&&1>s?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},n.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},n._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",r=this[o](n,t),s={x:this.columnWidth*r.col,y:r.y},a=r.y+t.size.outerHeight,h=n+r.col,u=r.col;h>u;u++)this.colYs[u]=a;return s},n._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},n._getTopColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++)e[n]=this._getColGroupY(n,t);return e},n._getColGroupY=function(t,e){if(2>e)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},n._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,n=t>1&&i+t>this.cols;i=n?0:i;var o=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=o?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),r=o?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var h=Math.floor(s/this.columnWidth);h-=s%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var u=this._getOption("originTop"),d=(u?n.top:n.bottom)+i.outerHeight,l=a;h>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i});
wppa-admin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains the admin menu and startups the admin pages
6
- * Version 7.3.07
7
  *
8
  */
9
 
@@ -119,6 +119,13 @@ global $wppa_api_version;
119
  if ( wppa_opt( 'image_magick' ) ) {
120
  wp_enqueue_script( 'cropperjs', WPPA_URL . '/vendor/cropperjs/dist/cropper.min.js', array(), $wppa_api_version );
121
  }
 
 
 
 
 
 
 
122
  // wp_enqueue_script( 'wppa-utils', WPPA_URL . '/js/wppa-utils.js', array(), $wppa_api_version );
123
  // wp_enqueue_script( 'wppa-utils', WPPA_URL . '/js/wppa-utils.js', array(), $wppa_api_version );
124
  /*
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains the admin menu and startups the admin pages
6
+ * Version 7.3.11
7
  *
8
  */
9
 
119
  if ( wppa_opt( 'image_magick' ) ) {
120
  wp_enqueue_script( 'cropperjs', WPPA_URL . '/vendor/cropperjs/dist/cropper.min.js', array(), $wppa_api_version );
121
  }
122
+
123
+ // Masonry
124
+ if ( true ) {
125
+ $masonry_url = WPPA_URL . '/vendor/masonry/masonry.min.js';
126
+ wp_enqueue_script( 'masonry-min-js', $masonry_url, array( 'jquery' ), $wppa_api_version );
127
+ }
128
+
129
  // wp_enqueue_script( 'wppa-utils', WPPA_URL . '/js/wppa-utils.js', array(), $wppa_api_version );
130
  // wp_enqueue_script( 'wppa-utils', WPPA_URL . '/js/wppa-utils.js', array(), $wppa_api_version );
131
  /*
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 7.3.09
6
  *
7
  */
8
 
@@ -2961,6 +2961,9 @@ global $wppa_log_file;
2961
  case 'wppa_cover_spacing':
2962
  wppa_ajax_check_range( $value, false, '0', '50', __( 'Cover spacing', 'wp-photo-album-plus' ) );
2963
  break;
 
 
 
2964
  /*
2965
  case 'wppa_start_pause_symbol_size':
2966
  wppa_ajax_check_range( $value, false, '0', false, __('Start/pause symbol size', 'wp-photo-album-plus') );
@@ -3470,6 +3473,7 @@ global $wppa_log_file;
3470
  wppa_unlink( $wppa_log_file );
3471
  }
3472
  delete_option( 'wppa_recursive_log' );
 
3473
  break;
3474
 
3475
  case 'wppa_pl_dirname':
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 7.3.11
6
  *
7
  */
8
 
2961
  case 'wppa_cover_spacing':
2962
  wppa_ajax_check_range( $value, false, '0', '50', __( 'Cover spacing', 'wp-photo-album-plus' ) );
2963
  break;
2964
+ case 'wppa_user_create_max_level':
2965
+ wppa_ajax_check_range( $value, false, '0', '99', __( 'Max nesting level', 'wp-photo-album-plus' ) );
2966
+ break;
2967
  /*
2968
  case 'wppa_start_pause_symbol_size':
2969
  wppa_ajax_check_range( $value, false, '0', false, __('Start/pause symbol size', 'wp-photo-album-plus') );
3473
  wppa_unlink( $wppa_log_file );
3474
  }
3475
  delete_option( 'wppa_recursive_log' );
3476
+ delete_option( 'wppa_last_error' );
3477
  break;
3478
 
3479
  case 'wppa_pl_dirname':
wppa-album-admin-autosave.php CHANGED
@@ -1618,7 +1618,7 @@ global $wpdb;
1618
  <?php $url = get_admin_url().'admin.php?page=wppa_admin_menu&amp;order_by='; ?>
1619
  <td style="min-width: 50px;" >
1620
  <a href="<?php echo wppa_dbg_url($url.'id') ?>">
1621
- <?php _e('ID', 'wp-photo-album-plus');
1622
  if ($order == 'id') {
1623
  if ( $reverse ) echo $upimg;
1624
  else echo $downimg;
@@ -1712,7 +1712,7 @@ global $wpdb;
1712
  // $pendcount = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM $wpdb->wppa_photos WHERE album=%s AND status=%s", $album['id'], 'pending'));
1713
  ?>
1714
  <tr <?php echo($alt); if ($pendcount) echo 'style="background-color:#ffdddd"' ?>>
1715
- <td><?php echo($album['id']) ?></td>
1716
  <td><?php echo(esc_attr(__(stripslashes($album['name'])))) ?></td>
1717
  <td><small><?php echo(esc_attr(__(stripslashes($album['description'])))) ?></small></td>
1718
  <?php if (current_user_can('administrator')) { ?>
@@ -2076,7 +2076,7 @@ global $wpdb;
2076
  <?php $url = get_admin_url().'admin.php?page=wppa_admin_menu&amp;order_by='; ?>
2077
  <td colspan="6" style="min-width: 50px;" >
2078
  <a href="<?php echo wppa_dbg_url($url.'id') ?>">
2079
- <?php _e('ID', 'wp-photo-album-plus');
2080
  if ($order == 'id') {
2081
  if ( $reverse ) echo $upimg;
2082
  else echo $downimg;
@@ -2566,7 +2566,7 @@ global $wpdb;
2566
  echo '</td>';
2567
 
2568
  // The album id td element
2569
- echo '<td style="padding:2px;" >' . $id . '</td>';
2570
 
2571
  // Fillers after the arrow
2572
  $i = $indent;
1618
  <?php $url = get_admin_url().'admin.php?page=wppa_admin_menu&amp;order_by='; ?>
1619
  <td style="min-width: 50px;" >
1620
  <a href="<?php echo wppa_dbg_url($url.'id') ?>">
1621
+ <?php _e('ID(nl)', 'wp-photo-album-plus');
1622
  if ($order == 'id') {
1623
  if ( $reverse ) echo $upimg;
1624
  else echo $downimg;
1712
  // $pendcount = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM $wpdb->wppa_photos WHERE album=%s AND status=%s", $album['id'], 'pending'));
1713
  ?>
1714
  <tr <?php echo($alt); if ($pendcount) echo 'style="background-color:#ffdddd"' ?>>
1715
+ <td><?php echo($album['id'] . '('. wppa_get_nesting_level($album['id']).')') ?></td>
1716
  <td><?php echo(esc_attr(__(stripslashes($album['name'])))) ?></td>
1717
  <td><small><?php echo(esc_attr(__(stripslashes($album['description'])))) ?></small></td>
1718
  <?php if (current_user_can('administrator')) { ?>
2076
  <?php $url = get_admin_url().'admin.php?page=wppa_admin_menu&amp;order_by='; ?>
2077
  <td colspan="6" style="min-width: 50px;" >
2078
  <a href="<?php echo wppa_dbg_url($url.'id') ?>">
2079
+ <?php _e('ID(nl)', 'wp-photo-album-plus');
2080
  if ($order == 'id') {
2081
  if ( $reverse ) echo $upimg;
2082
  else echo $downimg;
2566
  echo '</td>';
2567
 
2568
  // The album id td element
2569
+ echo '<td style="padding:2px;" >' . $id . '('. wppa_get_nesting_level( $album['id'] ) . ')</td>';
2570
 
2571
  // Fillers after the arrow
2572
  $i = $indent;
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 7.3.09
7
  *
8
  */
9
 
@@ -2148,6 +2148,11 @@ function wppa_get_user_create_html( $alb, $width, $where = '', $mcr = false ) {
2148
  return '';
2149
  }
2150
 
 
 
 
 
 
2151
  // Init
2152
  $result = '';
2153
  $mocc = wppa( 'mocc' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 7.3.11
7
  *
8
  */
9
 
2148
  return '';
2149
  }
2150
 
2151
+ // Test for max nesting level
2152
+ if ( wppa_get_nesting_level( $alb ) >= wppa_opt( 'user_create_max_level' ) ) {
2153
+ return '';
2154
+ }
2155
+
2156
  // Init
2157
  $result = '';
2158
  $mocc = wppa( 'mocc' );
wppa-common-functions.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
- * Version 7.3.08
6
  *
7
  */
8
 
@@ -55,10 +55,22 @@ global $wppa_defaults;
55
  }
56
  }
57
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  // Reset runtime parms
59
  wppa_reset_occurrance();
60
 
61
- // Check if gran parents mudt be made
62
  // If there is only one grant parent, make sure the granted album is created regardless of if it is used.
63
  if ( ! wppa_is_cron() && ! wppa( 'ajax' ) ) {
64
  if ( wppa_is_int( wppa_get_option( 'wppa_grant_parent' ) ) ) {
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
+ * Version 7.3.11
6
  *
7
  */
8
 
55
  }
56
  }
57
 
58
+ // Fix mobile/fixed dependant settings
59
+ if ( wppa_is_mobile() ) {
60
+ if ( $wppa_opt['wppa_thumbtype'] == 'masonry-mix' ) {
61
+ $wppa_opt['wppa_thumbtype'] = 'masonry-plus';
62
+ }
63
+ }
64
+ else {
65
+ if ( $wppa_opt['wppa_thumbtype'] == 'masonry-mix' ) {
66
+ $wppa_opt['wppa_thumbtype'] = 'masonry-v';
67
+ }
68
+ }
69
+
70
  // Reset runtime parms
71
  wppa_reset_occurrance();
72
 
73
+ // Check if grant parents must be made
74
  // If there is only one grant parent, make sure the granted album is created regardless of if it is used.
75
  if ( ! wppa_is_cron() && ! wppa( 'ajax' ) ) {
76
  if ( wppa_is_int( wppa_get_option( 'wppa_grant_parent' ) ) ) {
wppa-defaults.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains default settings
6
- * Version 7.3.10
7
  *
8
  */
9
 
@@ -14,6 +14,11 @@
14
  function wppa_set_defaults( $force = false ) {
15
  global $wppa_defaults;
16
 
 
 
 
 
 
17
  $npd = '
18
  <a onClick="jQuery(\'.wppa-dtl\').css(\'display\', \'block\'); jQuery(\'.wppa-more\').css(\'display\', \'none\'); wppaOvlResize();">
19
  <div class="wppa-more">
@@ -835,6 +840,7 @@ horizrailenabled:false,";
835
  'wppa_comment_captcha' => 'none',
836
  'wppa_spam_maxage' => 'none',
837
  'wppa_user_create_on' => 'no',
 
838
  'wppa_user_create_login' => 'yes',
839
  'wppa_user_create_captcha' => 'yes', // VII-B3
840
  'wppa_user_destroy_on' => 'no',
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains default settings
6
+ * Version 7.3.11
7
  *
8
  */
9
 
14
  function wppa_set_defaults( $force = false ) {
15
  global $wppa_defaults;
16
 
17
+ // Test for too early
18
+ if ( ! defined('WPPA_UPLOAD') ) {
19
+ wppa_log( 'err', 'WPPA_UPLOAD not defined in wppa_set_defaults().', true );
20
+ }
21
+
22
  $npd = '
23
  <a onClick="jQuery(\'.wppa-dtl\').css(\'display\', \'block\'); jQuery(\'.wppa-more\').css(\'display\', \'none\'); wppaOvlResize();">
24
  <div class="wppa-more">
840
  'wppa_comment_captcha' => 'none',
841
  'wppa_spam_maxage' => 'none',
842
  'wppa_user_create_on' => 'no',
843
+ 'wppa_user_create_max_level' => '99',
844
  'wppa_user_create_login' => 'yes',
845
  'wppa_user_create_captcha' => 'yes', // VII-B3
846
  'wppa_user_destroy_on' => 'no',
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 7.3.10
7
  *
8
  */
9
 
@@ -957,7 +957,7 @@ global $locale;
957
  }
958
  else wppa_out( '<span style="color:red">ERROR: Missing function wppa_theme(), check the installation of WPPA+. Remove customized wppa_theme.php</span>' );
959
  global $wppa_version;
960
- $expected_version = '7.2.10.009';
961
  if ( $wppa_version != $expected_version ) {
962
  wppa_dbg_msg( 'WARNING: customized wppa-theme.php is out of rev. Expected version: ' . $expected_version . ' found: ' . $wppa_version, 'red' );
963
  }
@@ -2217,7 +2217,7 @@ global $wpdb;
2217
 
2218
  // Log query
2219
  // wppa_dbg_msg( $query, 'red' ); // , 'force' ); /**/
2220
- if ( strlen( $query ) > 10000 ) {
2221
  wppa_log( 'war', 'Long query: ' . substr( htmlspecialchars( $query ), 0, 100 ) . '...' , true );
2222
  }
2223
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 7.3.11
7
  *
8
  */
9
 
957
  }
958
  else wppa_out( '<span style="color:red">ERROR: Missing function wppa_theme(), check the installation of WPPA+. Remove customized wppa_theme.php</span>' );
959
  global $wppa_version;
960
+ $expected_version = '7.3.11.002';
961
  if ( $wppa_version != $expected_version ) {
962
  wppa_dbg_msg( 'WARNING: customized wppa-theme.php is out of rev. Expected version: ' . $expected_version . ' found: ' . $wppa_version, 'red' );
963
  }
2217
 
2218
  // Log query
2219
  // wppa_dbg_msg( $query, 'red' ); // , 'force' ); /**/
2220
+ if ( strlen( $query ) > 100000 ) {
2221
  wppa_log( 'war', 'Long query: ' . substr( htmlspecialchars( $query ), 0, 100 ) . '...' , true );
2222
  }
2223
 
wppa-maintenance.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
- * Version 7.3.10
7
  *
8
  */
9
 
@@ -1324,6 +1324,13 @@ global $wppa_log_file;
1324
  $rec . '<br /><br />';
1325
  }
1326
 
 
 
 
 
 
 
 
1327
  if ( ! wppa_is_file( $wppa_log_file ) ) {
1328
  $result .= __( 'There are no log messages', 'wp-photo-album-plus' );
1329
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
+ * Version 7.3.11
7
  *
8
  */
9
 
1324
  $rec . '<br /><br />';
1325
  }
1326
 
1327
+ $pre = wppa_get_option( 'wppa_last_error', '' );
1328
+ if ( $pre ) {
1329
+ $result .= __( 'Last pre-initialisation error', '' ) . ': ' .
1330
+ str_replace( array( '{', '}' ), array( '<', '>' ), $pre ) .
1331
+ '<br /><br />';
1332
+ }
1333
+
1334
  if ( ! wppa_is_file( $wppa_log_file ) ) {
1335
  $result .= __( 'There are no log messages', 'wp-photo-album-plus' );
1336
  }
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.3.05
7
  *
8
  */
9
 
@@ -23,7 +23,7 @@ function wppa_add_style() {
23
  global $wppa_api_version;
24
 
25
  // Are we allowed to look in theme?
26
- if ( wppa_switch( 'use_custom_style_file' ) ) {
27
 
28
  // In child theme?
29
  $userstyle = get_theme_root() . '/' . wppa_get_option('stylesheet') . '/wppa-style.css';
@@ -47,7 +47,7 @@ global $wppa_api_version;
47
  wp_enqueue_style('wppa_style');
48
 
49
  // Dynamic css
50
- if ( ! wppa_switch( 'inline_css' ) ) {
51
  if ( ! file_exists( WPPA_UPLOAD_PATH.'/dynamic/wppa-dynamic.css' ) ) {
52
  wppa_create_wppa_dynamic_css();
53
  update_option( 'wppa_dynamic_css_version', wppa_get_option( 'wppa_dynamic_css_version', '0' ) + '1' );
@@ -341,6 +341,12 @@ global $wppa_opt;
341
  wp_enqueue_script( 'nicescrollr-easing-min-js', $easing_url, array( 'jquery' ), 'all' );
342
  }
343
 
 
 
 
 
 
 
344
  // Panorama
345
  if ( wppa_switch( 'enable_panorama' ) ) {
346
 
@@ -1000,7 +1006,9 @@ wppaExtendedResizeDelay = ' . wppa_opt( 'extended_resize_delay' ) . ';
1000
  wppaCoverSpacing = ' . wppa_opt( 'cover_spacing' ) . ';
1001
  wppaFilmonlyContinuous = ' . ( wppa_switch( 'filmonly_continuous' ) ? 'true' : 'false' ) . ';
1002
  wppaNoAnimateOnMobile = ' . ( wppa_switch( 'no_animate_on_mobile' ) ? 'true' : 'false' ) . ';
1003
- wppaAjaxScroll = ' . ( wppa_switch( 'ajax_scroll' ) ? 'true' : 'false' ) . ';';
 
 
1004
 
1005
 
1006
  // Thumbnail aspect (for real calendar)
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
+ * Version 7.3.11
7
  *
8
  */
9
 
23
  global $wppa_api_version;
24
 
25
  // Are we allowed to look in theme?
26
+ if ( get_option( 'wppa_use_custom_style_file', 'no' ) == 'yes' ) {
27
 
28
  // In child theme?
29
  $userstyle = get_theme_root() . '/' . wppa_get_option('stylesheet') . '/wppa-style.css';
47
  wp_enqueue_style('wppa_style');
48
 
49
  // Dynamic css
50
+ if ( get_option( 'wppa_inline_css', 'yes' ) == 'no' ) {
51
  if ( ! file_exists( WPPA_UPLOAD_PATH.'/dynamic/wppa-dynamic.css' ) ) {
52
  wppa_create_wppa_dynamic_css();
53
  update_option( 'wppa_dynamic_css_version', wppa_get_option( 'wppa_dynamic_css_version', '0' ) + '1' );
341
  wp_enqueue_script( 'nicescrollr-easing-min-js', $easing_url, array( 'jquery' ), 'all' );
342
  }
343
 
344
+ // Masonry
345
+ if ( true ) {
346
+ $masonry_url = WPPA_URL . '/vendor/masonry/masonry.min.js';
347
+ wp_enqueue_script( 'masonry-min-js', $masonry_url, array( 'jquery' ), $wppa_api_version, $footer );
348
+ }
349
+
350
  // Panorama
351
  if ( wppa_switch( 'enable_panorama' ) ) {
352
 
1006
  wppaCoverSpacing = ' . wppa_opt( 'cover_spacing' ) . ';
1007
  wppaFilmonlyContinuous = ' . ( wppa_switch( 'filmonly_continuous' ) ? 'true' : 'false' ) . ';
1008
  wppaNoAnimateOnMobile = ' . ( wppa_switch( 'no_animate_on_mobile' ) ? 'true' : 'false' ) . ';
1009
+ wppaAjaxScroll = ' . ( wppa_switch( 'ajax_scroll' ) ? 'true' : 'false' ) . ';
1010
+ wppaThumbSize = ' . wppa_opt( 'thumbsize' ) . ';
1011
+ wppaTfMargin = ' . wppa_opt( 'tn_margin' ) . ';';
1012
 
1013
 
1014
  // Thumbnail aspect (for real calendar)
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 7.3.10
7
  *
8
  */
9
 
@@ -4737,8 +4737,22 @@ global $wppa_supported_camara_brands;
4737
  $desc = __('The way the thumbnail images are displayed.', 'wp-photo-album-plus');
4738
  $help = (__('You may select an altenative display method for thumbnails. Note that some of the thumbnail settings do not apply to all available display methods.', 'wp-photo-album-plus'));
4739
  $slug = 'wppa_thumbtype';
4740
- $options = array(__('--- default ---', 'wp-photo-album-plus'), __('like album covers', 'wp-photo-album-plus'), __('like album covers mcr', 'wp-photo-album-plus'), __('masonry style columns', 'wp-photo-album-plus'), __('masonry style rows', 'wp-photo-album-plus'));
4741
- $values = array('default', 'ascovers', 'ascovers-mcr', 'masonry-v', 'masonry-h' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4742
  $onchange = 'wppaCheckThumbType()';
4743
  $html = wppa_select($slug, $options, $values, $onchange);
4744
  $clas = '';
@@ -7072,6 +7086,18 @@ global $wppa_supported_camara_brands;
7072
  $tags = 'access,album';
7073
  wppa_setting($slug, '1', $name, $desc, $html, $help, $clas, $tags);
7074
 
 
 
 
 
 
 
 
 
 
 
 
 
7075
  $name = __('User edit album', 'wp-photo-album-plus');
7076
  $desc = __('Enable frontend edit album name and description.', 'wp-photo-album-plus');
7077
  $help = '';
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 7.3.11
7
  *
8
  */
9
 
4737
  $desc = __('The way the thumbnail images are displayed.', 'wp-photo-album-plus');
4738
  $help = (__('You may select an altenative display method for thumbnails. Note that some of the thumbnail settings do not apply to all available display methods.', 'wp-photo-album-plus'));
4739
  $slug = 'wppa_thumbtype';
4740
+ $options = array( __('--- default ---', 'wp-photo-album-plus'),
4741
+ __('like album covers', 'wp-photo-album-plus'),
4742
+ __('like album covers mcr', 'wp-photo-album-plus'),
4743
+ __('masonry style columns', 'wp-photo-album-plus'),
4744
+ __('masonry style rows', 'wp-photo-album-plus'),
4745
+ __('masonry style plus', 'wp-photo-album-plus'),
4746
+ __('masonry style mixed', 'wp-photo-album-plus'),
4747
+ );
4748
+ $values = array('default',
4749
+ 'ascovers',
4750
+ 'ascovers-mcr',
4751
+ 'masonry-v',
4752
+ 'masonry-h',
4753
+ 'masonry-plus',
4754
+ 'masonry-mix',
4755
+ );
4756
  $onchange = 'wppaCheckThumbType()';
4757
  $html = wppa_select($slug, $options, $values, $onchange);
4758
  $clas = '';
7086
  $tags = 'access,album';
7087
  wppa_setting($slug, '1', $name, $desc, $html, $help, $clas, $tags);
7088
 
7089
+ $name = __('Max nesting level', 'wp-photo-album-plus');
7090
+ $desc = __('Limits the max nesting level for frontent created albums', 'wp-photo-album-plus');
7091
+ $help = '';
7092
+ $slug = 'wppa_user_create_max_level';
7093
+ $onch = '';
7094
+ $html1 = wppa_number($slug, '0', '99');
7095
+ $html2 = '';
7096
+ $html = array( $html1, $html2 );
7097
+ $clas = '';
7098
+ $tags = 'access,album';
7099
+ wppa_setting($slug, '1.0', $name, $desc, $html, $help, $clas, $tags);
7100
+
7101
  $name = __('User edit album', 'wp-photo-album-plus');
7102
  $desc = __('Enable frontend edit album name and description.', 'wp-photo-album-plus');
7103
  $help = '';
wppa-thumbnails.php CHANGED
@@ -5,7 +5,7 @@
5
  * Various funcions to display a thumbnail image
6
  * Contains all possible frontend thumbnail types
7
  *
8
- * Version 7.3.10
9
  *
10
  */
11
 
@@ -1078,6 +1078,9 @@ global $wpdb;
1078
  }
1079
  $result = '';
1080
  $mocc = wppa( 'mocc' );
 
 
 
1081
 
1082
  // Encrypted photo id
1083
  $xid = wppa_encrypt_photo( $id );
@@ -1117,7 +1120,7 @@ global $wpdb;
1117
  $imgattr_a = wppa_get_imgstyle_a( $id, $imgsrc, wppa_opt( 'thumbsize'.$alt ), 'optional', 'thumb' );
1118
 
1119
  // Verical style ?
1120
- if ( wppa_opt( 'thumbtype' ) == 'masonry-v' ) {
1121
  $imgwidth = wppa_opt( 'thumbsize' );
1122
  $imgheight = $imgwidth * wppa_get_thumbratioyx( $id );
1123
  $imgstyle = 'width:100%; height:auto; margin:0; position:relative; box-sizing:border-box;';
@@ -1125,7 +1128,7 @@ global $wpdb;
1125
  }
1126
 
1127
  // Horizontal style ?
1128
- else {
1129
  $imgheight = wppa_opt( 'thumbsize' );
1130
  $imgwidth = $imgheight * wppa_get_thumbratioxy( $id );
1131
  $imgstyle = 'height:100%;' .
@@ -1137,6 +1140,14 @@ global $wpdb;
1137
  $frame_h = 'height:100%; ';
1138
  }
1139
 
 
 
 
 
 
 
 
 
1140
  // Mouseover effect?
1141
  if ( wppa_switch( 'use_thumb_opacity' ) ) {
1142
  $opac = wppa_opt( 'thumb_opacity' );
@@ -1144,17 +1155,15 @@ global $wpdb;
1144
  }
1145
 
1146
  // Padding
1147
- if ( wppa_is_int( wppa_opt( 'tn_margin' ) / 2 ) ) {
1148
- $imgstyle .= ' padding:'.( wppa_opt( 'tn_margin' ) / 2 ).'px;';
1149
  }
1150
  else {
1151
- $p1 = floor( wppa_opt( 'tn_margin' ) / 2 );
1152
- $p2 = ceil( wppa_opt( 'tn_margin' ) / 2 );
1153
- $imgstyle .= ' padding:'.$p1.'px '.$p2.'px '.$p2.'px '.$p1.'px;';
1154
  }
1155
 
1156
  // Cursor
1157
- $cursor = $imgattr_a['cursor'];
1158
 
1159
  // Popup ?
1160
  if ( wppa_switch( 'use_thumb_popup' ) ) {
@@ -1180,7 +1189,7 @@ global $wpdb;
1180
 
1181
  $imgurl = wppa_get_thumb_url( $id, true, '', $popwidth, $popheight );
1182
  $events = wppa_get_imgevents( 'thumb', $id );
1183
- $imgalt = wppa_get_imgalt( $id ); // returns something like ' alt="Any text" '
1184
  $title = esc_attr( wppa_get_masonry_title( $id ) ); // esc_attr( wppa_get_photo_name( $id ) );
1185
 
1186
  // Feed ?
@@ -1216,8 +1225,10 @@ global $wpdb;
1216
  ( $is_ie_or_chrome && wppa_opt( 'thumbtype' ) == 'masonry-h' ? ' class="wppa-mas-h-' . $mocc . '"' : '' ) .
1217
  ' style="' .
1218
  $frame_h .
 
 
 
1219
  'position:static;' .
1220
- 'float:left;' .
1221
  'font-size:12px;' .
1222
  'line-height:8px;' .
1223
  'overflow:hidden;' .
@@ -2075,6 +2086,7 @@ function wppa_get_medal_html_a( $args ) {
2075
  'padding:0;' .
2076
  'box-shadow:none;' .
2077
  'height:' . $size . 'px;' .
 
2078
  'top:' . $top . 'px;' .
2079
  'background-color:white' .
2080
  '"' .
5
  * Various funcions to display a thumbnail image
6
  * Contains all possible frontend thumbnail types
7
  *
8
+ * Version 7.3.11
9
  *
10
  */
11
 
1078
  }
1079
  $result = '';
1080
  $mocc = wppa( 'mocc' );
1081
+ $plus = ( wppa_opt( 'thumbtype' ) == 'masonry-plus' );
1082
+ $hor = ( wppa_opt( 'thumbtype' ) == 'masonry-h' );
1083
+ $vert = ( wppa_opt( 'thumbtype' ) == 'masonry-v' );
1084
 
1085
  // Encrypted photo id
1086
  $xid = wppa_encrypt_photo( $id );
1120
  $imgattr_a = wppa_get_imgstyle_a( $id, $imgsrc, wppa_opt( 'thumbsize'.$alt ), 'optional', 'thumb' );
1121
 
1122
  // Verical style ?
1123
+ if ( $vert ) {
1124
  $imgwidth = wppa_opt( 'thumbsize' );
1125
  $imgheight = $imgwidth * wppa_get_thumbratioyx( $id );
1126
  $imgstyle = 'width:100%; height:auto; margin:0; position:relative; box-sizing:border-box;';
1128
  }
1129
 
1130
  // Horizontal style ?
1131
+ elseif ( $hor ) {
1132
  $imgheight = wppa_opt( 'thumbsize' );
1133
  $imgwidth = $imgheight * wppa_get_thumbratioxy( $id );
1134
  $imgstyle = 'height:100%;' .
1140
  $frame_h = 'height:100%; ';
1141
  }
1142
 
1143
+ // Masonry plus
1144
+ else {
1145
+ $imgwidth = wppa_get_thumbx( $id );
1146
+ $imgheight = wppa_get_thumby( $id );
1147
+ $imgstyle = 'width:100%;height:auto;margin:0;position:relative;box-sizing:border-box;float:left;';
1148
+ $frame_h = '';
1149
+ }
1150
+
1151
  // Mouseover effect?
1152
  if ( wppa_switch( 'use_thumb_opacity' ) ) {
1153
  $opac = wppa_opt( 'thumb_opacity' );
1155
  }
1156
 
1157
  // Padding
1158
+ if ( $plus ) {
1159
+ $imgstyle .= 'padding:0;';
1160
  }
1161
  else {
1162
+ $imgstyle .= ' padding:' . ( wppa_opt( 'tn_margin' ) / 2 ) . 'px;';
 
 
1163
  }
1164
 
1165
  // Cursor
1166
+ $cursor = $imgattr_a['cursor'];
1167
 
1168
  // Popup ?
1169
  if ( wppa_switch( 'use_thumb_popup' ) ) {
1189
 
1190
  $imgurl = wppa_get_thumb_url( $id, true, '', $popwidth, $popheight );
1191
  $events = wppa_get_imgevents( 'thumb', $id );
1192
+ $imgalt = $plus ? '' : wppa_get_imgalt( $id ); // returns something like ' alt="Any text" '
1193
  $title = esc_attr( wppa_get_masonry_title( $id ) ); // esc_attr( wppa_get_photo_name( $id ) );
1194
 
1195
  // Feed ?
1225
  ( $is_ie_or_chrome && wppa_opt( 'thumbtype' ) == 'masonry-h' ? ' class="wppa-mas-h-' . $mocc . '"' : '' ) .
1226
  ' style="' .
1227
  $frame_h .
1228
+ ( ( wppa_opt( 'thumbtype' ) == 'masonry-plus' ) ?
1229
+ 'width:100%;' :
1230
+ 'float:left;' ) .
1231
  'position:static;' .
 
1232
  'font-size:12px;' .
1233
  'line-height:8px;' .
1234
  'overflow:hidden;' .
2086
  'padding:0;' .
2087
  'box-shadow:none;' .
2088
  'height:' . $size . 'px;' .
2089
+ 'width:' .$size . 'px;' .
2090
  'top:' . $top . 'px;' .
2091
  'background-color:white' .
2092
  '"' .
wppa-tinymce-shortcodes.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-tinymce-shortcodes.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
- * Version 7.3.06
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) )
@@ -502,13 +502,23 @@ global $wpdb;
502
  else {
503
  $value = $val;
504
  }
505
-
506
- $result .= '<option' .
 
 
 
 
507
  ' value="' . $value . '"' .
508
  ' >' .
509
  $name .
510
  ' (' . wppa_get_album_name( $photo['album'] ) . ')' .
511
- '</option>';
 
 
 
 
 
 
512
  }
513
  $result .= '<option value="#last" >-- '.__('The most recently uploaded photo', 'wp-photo-album-plus').' --</option>'.
514
  '<option value="#potd" >-- '.__('The photo of the day', 'wp-photo-album-plus').' --</option>';
2
  /* wppa-tinymce-shortcodes.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
+ * Version 7.3.011
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) )
502
  else {
503
  $value = $val;
504
  }
505
+ /** changed by fgbmaster
506
+ * convert string, if not utf8 encoded
507
+ * Either album names or file names with umlauts cause encoding in ISO-8859-1.
508
+ * This causes AJAX to return an empty string.
509
+ */
510
+ $fgb = '<option' .
511
  ' value="' . $value . '"' .
512
  ' >' .
513
  $name .
514
  ' (' . wppa_get_album_name( $photo['album'] ) . ')' .
515
+ '</option>';
516
+
517
+ if(!seems_utf8($fgb)) {
518
+ $fgb = utf8_encode($fgb);
519
+ }
520
+ $result .= $fgb;
521
+ /** end by fgbmaster */
522
  }
523
  $result .= '<option value="#last" >-- '.__('The most recently uploaded photo', 'wp-photo-album-plus').' --</option>'.
524
  '<option value="#potd" >-- '.__('The photo of the day', 'wp-photo-album-plus').' --</option>';
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 7.3.09
7
  *
8
  */
9
 
@@ -1284,7 +1284,7 @@ global $wpdb;
1284
  "SELECT COUNT(*) FROM $wpdb->wppa_photos
1285
  WHERE ( filename = %s OR filename = %s )
1286
  AND album = %s",
1287
- $photoinfo['filename'],
1288
  wppa_strip_ext( $photoinfo['filename'] ) . '.xxx', // May be a multimedia iten
1289
  $album
1290
  ) );
@@ -1667,7 +1667,7 @@ static $repeat_count;
1667
  }
1668
 
1669
  // Get existing log if it exists
1670
- if ( wppa_is_file( $wppa_log_file, false ) ) {
1671
 
1672
  $contents = wppa_get_contents_array( $wppa_log_file, false ); // Do not log error on read
1673
 
@@ -1720,7 +1720,7 @@ static $repeat_count;
1720
  // Log stacktrace 5 levels
1721
  if ( $trace ) {
1722
 
1723
- $data = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 6 );
1724
  $traceline = '';
1725
  if ( is_array( $data ) ) {
1726
  $i = 1;
@@ -1752,7 +1752,13 @@ static $repeat_count;
1752
  }
1753
 
1754
  // Done
1755
- wppa_put_contents( $wppa_log_file, implode( '', $contents ), false );
 
 
 
 
 
 
1756
  $busy = false;
1757
  }
1758
 
@@ -5041,4 +5047,23 @@ function wppa_compress_html( $txt ) {
5041
  $result = str_replace( '<ul></ul>', '', $result );
5042
 
5043
  return $result;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5044
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 7.3.11
7
  *
8
  */
9
 
1284
  "SELECT COUNT(*) FROM $wpdb->wppa_photos
1285
  WHERE ( filename = %s OR filename = %s )
1286
  AND album = %s",
1287
+ $photoinfo['filename'],
1288
  wppa_strip_ext( $photoinfo['filename'] ) . '.xxx', // May be a multimedia iten
1289
  $album
1290
  ) );
1667
  }
1668
 
1669
  // Get existing log if it exists
1670
+ if ( $wppa_log_file && wppa_is_file( $wppa_log_file, false ) ) {
1671
 
1672
  $contents = wppa_get_contents_array( $wppa_log_file, false ); // Do not log error on read
1673
 
1720
  // Log stacktrace 5 levels
1721
  if ( $trace ) {
1722
 
1723
+ $data = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 10 );
1724
  $traceline = '';
1725
  if ( is_array( $data ) ) {
1726
  $i = 1;
1752
  }
1753
 
1754
  // Done
1755
+ $txt = implode( '', $contents );
1756
+ if ( $wppa_log_file ) {
1757
+ wppa_put_contents( $wppa_log_file, $txt, false );
1758
+ }
1759
+ else {
1760
+ update_option( 'wppa_last_error', $txt );
1761
+ }
1762
  $busy = false;
1763
  }
1764
 
5047
  $result = str_replace( '<ul></ul>', '', $result );
5048
 
5049
  return $result;
5050
+ }
5051
+
5052
+ // Find albums nesting level
5053
+ function wppa_get_nesting_level( $id ) {
5054
+ static $level;
5055
+
5056
+ $level = _wppa_get_nesting_level( $id );
5057
+
5058
+ return $level;
5059
+ }
5060
+ function _wppa_get_nesting_level( $id ) {
5061
+
5062
+ $alb = wppa_cache_album( $id );
5063
+ if ( is_array( $alb ) && $alb['a_parent'] > '0' ) {
5064
+ return _wppa_get_nesting_level( $alb['a_parent'] ) + '1';
5065
+ }
5066
+ else {
5067
+ return '0';
5068
+ }
5069
  }
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.3.10.002
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/
@@ -23,8 +23,8 @@ global $wpdb;
23
  global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
- global $wppa_revno; $wppa_revno = '7310'; // WPPA db version
27
- global $wppa_api_version; $wppa_api_version = '7.3.10.002'; // WPPA software version
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.3.11.006
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/
23
  global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
+ global $wppa_revno; $wppa_revno = '7311'; // WPPA db version
27
+ global $wppa_api_version; $wppa_api_version = '7.3.11.006'; // WPPA software version
28
 
29
  /* Init page js data */
30
  global $wppa_js_page_data; $wppa_js_page_data = '';