Version Description
- 08.18.2021
- NEW: Added support for unanimated WebP images
- Fixed: PHP warning was generated when enqueueing frontend resources
- Fixed: "Scan folder for new images" was failing with PHP 8+
Download this release
Release Info
Developer | photocrati |
Plugin | NextGEN Gallery – WordPress Gallery Plugin |
Version | 3.14 |
Comparing to | |
See all releases |
Code changes from version 3.13 to 3.14
- changelog.txt +5 -0
- composer.json +1 -1
- composer.lock +1 -1
- nggallery.php +18 -3
- products/photocrati_nextgen/modules/lightbox/package.module.lightbox.php +1 -1
- products/photocrati_nextgen/modules/lightbox/static/fancybox/jquery.fancybox-1.3.4.js +1 -1
- products/photocrati_nextgen/modules/lightbox/static/fancybox/jquery.fancybox-1.3.4.min.js +1 -1
- products/photocrati_nextgen/modules/lightbox/static/fancybox/jquery.fancybox-1.3.4.pack.js +1 -1
- products/photocrati_nextgen/modules/lightbox/static/fancybox/jquery.fancybox-1.3.4.pack.min.js +1 -1
- products/photocrati_nextgen/modules/lightbox/static/lightbox_context.js +1 -1
- products/photocrati_nextgen/modules/lightbox/static/lightbox_context.min.js +1 -1
- products/photocrati_nextgen/modules/lightbox/static/shutter/shutter.js +1 -1
- products/photocrati_nextgen/modules/lightbox/static/shutter/shutter.min.js +1 -1
- products/photocrati_nextgen/modules/lightbox/static/shutter_reloaded/shutter.js +1 -1
- products/photocrati_nextgen/modules/lightbox/static/shutter_reloaded/shutter.min.js +1 -1
- products/photocrati_nextgen/modules/lightbox/static/thickbox/thickbox.js +340 -0
- products/photocrati_nextgen/modules/lightbox/static/thickbox/thickbox.min.js +1 -0
- products/photocrati_nextgen/modules/mvc/package.module.mvc.php +3 -0
- products/photocrati_nextgen/modules/nextgen_addgallery_page/package.module.nextgen_addgallery_page.php +1 -5
- products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php +64 -18
- products/photocrati_nextgen/modules/nextgen_gallery_display/module.nextgen_gallery_display.php +5 -0
- products/photocrati_nextgen/modules/ngglegacy/admin/admin.php +4 -1
- products/photocrati_nextgen/modules/ngglegacy/admin/functions.php +1 -1
- products/photocrati_nextgen/modules/ngglegacy/lib/gd.thumbnail.inc.php +32 -8
- products/photocrati_nextgen/modules/ngglegacy/lib/ngg-db.php +1 -1
- readme.txt +7 -2
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +3 -3
- vendor/imagely/pope-framework/lib/class.base_module.php +14 -14
- vendor/imagely/pope-framework/lib/class.component_registry.php +28 -31
changelog.txt
CHANGED
@@ -1,6 +1,11 @@
|
|
1 |
NextGEN Gallery
|
2 |
by Imagely
|
3 |
|
|
|
|
|
|
|
|
|
|
|
4 |
= V3.13 - 08.04.2021
|
5 |
* Fixed: All WP-Admin links had "/wp-admin/" removed for some users
|
6 |
|
1 |
NextGEN Gallery
|
2 |
by Imagely
|
3 |
|
4 |
+
= V3.14 - 08.18.2021
|
5 |
+
* NEW: Added support for unanimated WebP images
|
6 |
+
* Fixed: PHP warning was generated when enqueueing frontend resources
|
7 |
+
* Fixed: "Scan folder for new images" was failing with PHP 8+
|
8 |
+
|
9 |
= V3.13 - 08.04.2021
|
10 |
* Fixed: All WP-Admin links had "/wp-admin/" removed for some users
|
11 |
|
composer.json
CHANGED
@@ -15,6 +15,6 @@
|
|
15 |
"ezyang/htmlpurifier": "^4.13"
|
16 |
},
|
17 |
"require-dev": {
|
18 |
-
"nikic/php-parser": "^4.
|
19 |
}
|
20 |
}
|
15 |
"ezyang/htmlpurifier": "^4.13"
|
16 |
},
|
17 |
"require-dev": {
|
18 |
+
"nikic/php-parser": "^4.12"
|
19 |
}
|
20 |
}
|
composer.lock
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
5 |
"This file is @generated automatically"
|
6 |
],
|
7 |
-
"content-hash": "
|
8 |
"packages": [
|
9 |
{
|
10 |
"name": "ezyang/htmlpurifier",
|
4 |
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
5 |
"This file is @generated automatically"
|
6 |
],
|
7 |
+
"content-hash": "065f055ec7f42c14604615434d627a40",
|
8 |
"packages": [
|
9 |
{
|
10 |
"name": "ezyang/htmlpurifier",
|
nggallery.php
CHANGED
@@ -4,7 +4,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
|
|
4 |
/**
|
5 |
* Plugin Name: NextGEN Gallery
|
6 |
* Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 30 million downloads.
|
7 |
-
* Version: 3.
|
8 |
* Author: Imagely
|
9 |
* Plugin URI: https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/
|
10 |
* Author URI: https://www.imagely.com
|
@@ -712,7 +712,7 @@ class C_NextGEN_Bootstrap
|
|
712 |
define('NGG_PRODUCT_URL', path_join(str_replace("\\" , '/', NGG_PLUGIN_URL), 'products'));
|
713 |
define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
|
714 |
define('NGG_PLUGIN_STARTED_AT', microtime());
|
715 |
-
define('NGG_PLUGIN_VERSION', '3.
|
716 |
|
717 |
define(
|
718 |
'NGG_SCRIPT_VERSION',
|
@@ -777,9 +777,24 @@ class C_NextGEN_Bootstrap
|
|
777 |
if (!defined('NGG_GALLERY_ROOT_TYPE')) {
|
778 |
define('NGG_GALLERY_ROOT_TYPE', 'site'); // "content" is the other possible value
|
779 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
780 |
}
|
781 |
|
782 |
-
|
783 |
* Defines the NextGEN Test Suite
|
784 |
* @param array $suites
|
785 |
* @return array
|
4 |
/**
|
5 |
* Plugin Name: NextGEN Gallery
|
6 |
* Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 30 million downloads.
|
7 |
+
* Version: 3.14
|
8 |
* Author: Imagely
|
9 |
* Plugin URI: https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/
|
10 |
* Author URI: https://www.imagely.com
|
712 |
define('NGG_PRODUCT_URL', path_join(str_replace("\\" , '/', NGG_PLUGIN_URL), 'products'));
|
713 |
define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
|
714 |
define('NGG_PLUGIN_STARTED_AT', microtime());
|
715 |
+
define('NGG_PLUGIN_VERSION', '3.14');
|
716 |
|
717 |
define(
|
718 |
'NGG_SCRIPT_VERSION',
|
777 |
if (!defined('NGG_GALLERY_ROOT_TYPE')) {
|
778 |
define('NGG_GALLERY_ROOT_TYPE', 'site'); // "content" is the other possible value
|
779 |
}
|
780 |
+
|
781 |
+
// Define what file extensions and mime are accepted, with optional WebP
|
782 |
+
$default_extensions_list = ['jpeg', 'jpg', 'png', 'gif'];
|
783 |
+
$default_mime_list = ['image/gif', 'image/jpg', 'image/jpeg', 'image/pjpeg', 'image/png'];
|
784 |
+
if (function_exists('imagewebp'))
|
785 |
+
{
|
786 |
+
$default_extensions_list[] = 'webp';
|
787 |
+
$default_mime_list[] = 'image/webp';
|
788 |
+
}
|
789 |
+
|
790 |
+
if (!defined('NGG_DEFAULT_ALLOWED_FILE_TYPES'))
|
791 |
+
define('NGG_DEFAULT_ALLOWED_FILE_TYPES', $default_extensions_list);
|
792 |
+
|
793 |
+
if (!defined('NGG_DEFAULT_ALLOWED_MIME_TYPES'))
|
794 |
+
define('NGG_DEFAULT_ALLOWED_MIME_TYPES', $default_mime_list);
|
795 |
}
|
796 |
|
797 |
+
/**
|
798 |
* Defines the NextGEN Test Suite
|
799 |
* @param array $suites
|
800 |
* @return array
|
products/photocrati_nextgen/modules/lightbox/package.module.lightbox.php
CHANGED
@@ -87,7 +87,7 @@ class C_Lightbox_Library_Manager
|
|
87 |
$thickbox->title = __('Thickbox', 'nggallery');
|
88 |
$thickbox->code = "class='thickbox' rel='%GALLERY_NAME%'";
|
89 |
$thickbox->styles = array('wordpress#thickbox');
|
90 |
-
$thickbox->scripts = array('photocrati-lightbox#thickbox/nextgen_thickbox_init.js', '
|
91 |
$thickbox->values = array('nextgen_thickbox_i18n' => array('next' => __('Next >', 'nggallery'), 'prev' => __('< Prev', 'nggallery'), 'image' => __('Image', 'nggallery'), 'of' => __('of', 'nggallery'), 'close' => __('Close', 'nggallery'), 'noiframes' => __('This feature requires inline frames. You have iframes disabled or your browser does not support them.', 'nggallery')));
|
92 |
$this->register('thickbox', $thickbox);
|
93 |
// Allow third parties to integrate
|
87 |
$thickbox->title = __('Thickbox', 'nggallery');
|
88 |
$thickbox->code = "class='thickbox' rel='%GALLERY_NAME%'";
|
89 |
$thickbox->styles = array('wordpress#thickbox');
|
90 |
+
$thickbox->scripts = array('photocrati-lightbox#thickbox/nextgen_thickbox_init.js', 'photocrati-lightbox#thickbox/thickbox.js');
|
91 |
$thickbox->values = array('nextgen_thickbox_i18n' => array('next' => __('Next >', 'nggallery'), 'prev' => __('< Prev', 'nggallery'), 'image' => __('Image', 'nggallery'), 'of' => __('of', 'nggallery'), 'close' => __('Close', 'nggallery'), 'noiframes' => __('This feature requires inline frames. You have iframes disabled or your browser does not support them.', 'nggallery')));
|
92 |
$this->register('thickbox', $thickbox);
|
93 |
// Allow third parties to integrate
|
products/photocrati_nextgen/modules/lightbox/static/fancybox/jquery.fancybox-1.3.4.js
CHANGED
@@ -22,7 +22,7 @@
|
|
22 |
|
23 |
selectedIndex = 0, selectedOpts = {}, selectedArray = [], currentIndex = 0, currentOpts = {}, currentArray = [],
|
24 |
|
25 |
-
ajaxLoader = null, imgPreloader = new Image(), imgRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i, swfRegExp = /[^\.]\.(swf)\s*$/i,
|
26 |
|
27 |
loadingTimer, loadingFrame = 1,
|
28 |
|
22 |
|
23 |
selectedIndex = 0, selectedOpts = {}, selectedArray = [], currentIndex = 0, currentOpts = {}, currentArray = [],
|
24 |
|
25 |
+
ajaxLoader = null, imgPreloader = new Image(), imgRegExp = /\.(jpg|gif|png|bmp|jpeg|webp)(.*)?$/i, swfRegExp = /[^\.]\.(swf)\s*$/i,
|
26 |
|
27 |
loadingTimer, loadingFrame = 1,
|
28 |
|
products/photocrati_nextgen/modules/lightbox/static/fancybox/jquery.fancybox-1.3.4.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
"use strict";function _typeof(t){"@babel/helpers - typeof";return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t){var e,i,n,a,o,d,c,r,h,s,f,l,p,g=0,y={},u=[],b=0,w={},m=[],v=null,x=new Image,I=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,C=/[^\.]\.(swf)\s*$/i,k=1,O=0,j="",S=!1,T=t.extend(t("<div/>")[0],{prop:0}),D=function(){i.hide(),x.onerror=x.onload=null,v&&v.abort(),e.empty()},A=function(){if(!1===y.onError(u,g,y))return i.hide(),void(S=!1);y.titleShow=!1,y.width="auto",y.height="auto",e.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>'),F()},E=function(){var n,a,o,c,r,h,s=u[g];if(D(),y=t.extend({},t.fn.fancybox.defaults,void 0===t(s).data("fancybox")?y:t(s).data("fancybox")),!1===(h=y.onStart(u,g,y)))return void(S=!1);if("object"==_typeof(h)&&(y=t.extend(y,h)),o=y.title||(s.nodeName?t(s).attr("title"):s.title)||"",s.nodeName&&!y.orig&&(y.orig=t(s).children("img:first").length?t(s).children("img:first"):t(s)),""===o&&y.orig&&y.titleFromAlt&&(o=y.orig.attr("alt")),n=y.href||(s.nodeName?t(s).attr("href"):s.href)||null,(/^(?:javascript)/i.test(n)||"#"==n)&&(n=null),y.type?(a=y.type,n||(n=y.content)):y.content?a="html":n&&(a=n.match(I)?"image":n.match(C)?"swf":t(s).hasClass("iframe")?"iframe":0===n.indexOf("#")?"inline":"ajax"),!a)return void A();switch("inline"==a&&(s=n.substr(n.indexOf("#")),a=t(s).length>0?"inline":"ajax"),y.type=a,y.href=n,y.title=o,y.autoDimensions&&("html"==y.type||"inline"==y.type||"ajax"==y.type?(y.width="auto",y.height="auto"):y.autoDimensions=!1),y.modal&&(y.overlayShow=!0,y.hideOnOverlayClick=!1,y.hideOnContentClick=!1,y.enableEscapeButton=!1,y.showCloseButton=!1),y.padding=parseInt(y.padding,10),y.margin=parseInt(y.margin,10),e.css("padding",y.padding+y.margin),t(".fancybox-inline-tmp").off("fancybox-cancel").on("fancybox-change",function(){t(this).replaceWith(d.children())}),a){case"html":e.html(y.content),F();break;case"inline":if(!0===t(s).parent().is("#fancybox-content"))return void(S=!1);t('<div class="fancybox-inline-tmp" />').hide().insertBefore(t(s)).on("fancybox-cleanup",function(){t(this).replaceWith(d.children())}).on("fancybox-cancel",function(){t(this).replaceWith(e.children())}),t(s).appendTo(e),F();break;case"image":S=!1,t.fancybox.showActivity(),x=new Image,x.onerror=function(){A()},x.onload=function(){S=!0,x.onerror=x.onload=null,N()},x.src=n;break;case"swf":y.scrolling="no",c='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+y.width+'" height="'+y.height+'"><param name="movie" value="'+n+'"></param>',r="",t.each(y.swf,function(t,e){c+='<param name="'+t+'" value="'+e+'"></param>',r+=" "+t+'="'+e+'"'}),c+='<embed src="'+n+'" type="application/x-shockwave-flash" width="'+y.width+'" height="'+y.height+'"'+r+"></embed></object>",e.html(c),F();break;case"ajax":S=!1,t.fancybox.showActivity(),y.ajax.win=y.ajax.success,v=t.ajax(t.extend({},y.ajax,{url:n,data:y.ajax.data||{},error:function(t,e,i){t.status>0&&A()},success:function(t,a,o){if(200==("object"==_typeof(o)?o:v).status){if("function"==typeof y.ajax.win){if(!1===(h=y.ajax.win(n,t,a,o)))return void i.hide();"string"!=typeof h&&"object"!=_typeof(h)||(t=h)}e.html(t),F()}}}));break;case"iframe":P()}},F=function(){var i=y.width,n=y.height;i=i.toString().indexOf("%")>-1?parseInt((t(window).width()-2*y.margin)*parseFloat(i)/100,10)+"px":"auto"==i?"auto":i+"px",n=n.toString().indexOf("%")>-1?parseInt((t(window).height()-2*y.margin)*parseFloat(n)/100,10)+"px":"auto"==n?"auto":n+"px",e.wrapInner('<div style="width:'+i+";height:"+n+";overflow: "+("auto"==y.scrolling?"auto":"yes"==y.scrolling?"scroll":"hidden")+';position:relative;"></div>'),y.width=e.width(),y.height=e.height(),P()},N=function(){y.width=x.width,y.height=x.height,t("<img />").attr({id:"fancybox-img",src:x.src,alt:y.title}).appendTo(e),P()},P=function(){var o,f;return i.hide(),a.is(":visible")&&!1===w.onCleanup(m,b,w)?(t.event.trigger("fancybox-cancel"),void(S=!1)):(S=!0,t(d.add(n)).off(),t(window).off("resize.fb scroll.fb"),t(document).off("keydown.fb"),a.is(":visible")&&"outside"!==w.titlePosition&&a.css("height",a.height()),m=u,b=g,w=y,w.overlayShow?(n.css({"background-color":w.overlayColor,opacity:w.overlayOpacity,cursor:w.hideOnOverlayClick?"pointer":"auto",height:t(document).height()}),n.is(":visible")||n.show()):n.hide(),p=Q(),_(),a.is(":visible")?(t(c.add(h).add(s)).hide(),o=a.position(),l={top:o.top,left:o.left,width:a.width(),height:a.height()},f=l.width==p.width&&l.height==p.height,void d.fadeTo(w.changeFade,.3,function(){var i=function(){d.html(e.contents()).fadeTo(w.changeFade,1,M)};t.event.trigger("fancybox-change"),d.empty().removeAttr("filter").css({"border-width":w.padding,width:p.width-2*w.padding,height:y.autoDimensions?"auto":p.height-O-2*w.padding}),f?i():(T.prop=0,t(T).animate({prop:1},{duration:w.changeSpeed,easing:w.easingChange,step:H,complete:i}))})):(a.removeAttr("style"),d.css("border-width",w.padding),"elastic"==w.transitionIn?(l=W(),d.html(e.contents()),a.show(),w.opacity&&(p.opacity=0),T.prop=0,void t(T).animate({prop:1},{duration:w.speedIn,easing:w.easingIn,step:H,complete:M})):("inside"==w.titlePosition&&O>0&&r.show(),d.css({width:p.width-2*w.padding,height:y.autoDimensions?"auto":p.height-O-2*w.padding}).html(e.contents()),void a.css(p).fadeIn("none"==w.transitionIn?0:w.speedIn,M))))},B=function(t){return!(!t||!t.length)&&("float"==w.titlePosition?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+t+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+w.titlePosition+'">'+t+"</div>")},_=function(){if(j=w.title||"",O=0,r.empty().removeAttr("style").removeClass(),!1===w.titleShow)return void r.hide();if(!(j=function(t){return"function"==typeof t}(w.titleFormat)?w.titleFormat(j,m,b,w):B(j))||""===j)return void r.hide();switch(r.addClass("fancybox-title-"+w.titlePosition).html(j).appendTo("body").show(),w.titlePosition){case"inside":r.css({width:p.width-2*w.padding,marginLeft:w.padding,marginRight:w.padding}),O=r.outerHeight(!0),r.appendTo(o),p.height+=O;break;case"over":r.css({marginLeft:w.padding,width:p.width-2*w.padding,bottom:w.padding}).appendTo(o);break;case"float":r.css("left",-1*parseInt((r.width()-p.width-40)/2,10)).appendTo(a);break;default:r.css({width:p.width-2*w.padding,paddingLeft:w.padding,paddingRight:w.padding}).appendTo(a)}r.hide()},L=function(){if((w.enableEscapeButton||w.enableKeyboardNav)&&t(document).on("keydown.fb",function(e){27==e.keyCode&&w.enableEscapeButton?(e.preventDefault(),t.fancybox.close()):37!=e.keyCode&&39!=e.keyCode||!w.enableKeyboardNav||"INPUT"===e.target.tagName||"TEXTAREA"===e.target.tagName||"SELECT"===e.target.tagName||(e.preventDefault(),t.fancybox[37==e.keyCode?"prev":"next"]())}),!w.showNavArrows)return h.hide(),void s.hide();(w.cyclic&&m.length>1||0!==b)&&h.show(),(w.cyclic&&m.length>1||b!=m.length-1)&&s.show()},M=function(){t.support.opacity||(d.get(0).style.removeProperty("filter"),a.get(0).style.removeProperty("filter")),y.autoDimensions&&d.css("height","auto"),a.css("height","auto"),j&&j.length&&r.show(),w.showCloseButton&&c.show(),L(),w.hideOnContentClick&&d.on("click",t.fancybox.close),w.hideOnOverlayClick&&n.on("click",t.fancybox.close),t(window).on("resize.fb",t.fancybox.resize),w.centerOnScroll&&t(window).on("scroll.fb",t.fancybox.center),"iframe"==w.type&&t('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" scrolling="'+y.scrolling+'" src="'+w.href+'"></iframe>').appendTo(d),a.show(),S=!1,t.fancybox.center(),w.onComplete(m,b,w),z()},z=function(){var t,e;m.length-1>b&&void 0!==(t=m[b+1].href)&&t.match(I)&&(e=new Image,e.src=t),b>0&&void 0!==(t=m[b-1].href)&&t.match(I)&&(e=new Image,e.src=t)},H=function(t){var e={width:parseInt(l.width+(p.width-l.width)*t,10),height:parseInt(l.height+(p.height-l.height)*t,10),top:parseInt(l.top+(p.top-l.top)*t,10),left:parseInt(l.left+(p.left-l.left)*t,10)};void 0!==p.opacity&&(e.opacity=t<.5?.5:t),a.css(e),d.css({width:e.width-2*w.padding,height:e.height-O*t-2*w.padding})},K=function(){return[t(window).width()-2*w.margin,t(window).height()-2*w.margin,t(document).scrollLeft()+w.margin,t(document).scrollTop()+w.margin]},Q=function(){var t,e=K(),i={},n=w.autoScale,a=2*w.padding;return w.width.toString().indexOf("%")>-1?i.width=parseInt(e[0]*parseFloat(w.width)/100,10):i.width=w.width+a,w.height.toString().indexOf("%")>-1?i.height=parseInt(e[1]*parseFloat(w.height)/100,10):i.height=w.height+a,n&&(i.width>e[0]||i.height>e[1])&&("image"==y.type||"swf"==y.type?(t=w.width/w.height,i.width>e[0]&&(i.width=e[0],i.height=parseInt((i.width-a)/t+a,10)),i.height>e[1]&&(i.height=e[1],i.width=parseInt((i.height-a)*t+a,10))):(i.width=Math.min(i.width,e[0]),i.height=Math.min(i.height,e[1]))),i.top=parseInt(Math.max(e[3]-20,e[3]+.5*(e[1]-i.height-40)),10),i.left=parseInt(Math.max(e[2]-20,e[2]+.5*(e[0]-i.width-40)),10),i},R=function(t){var e=t.offset();return e.top+=parseInt(t.css("paddingTop"),10)||0,e.left+=parseInt(t.css("paddingLeft"),10)||0,e.top+=parseInt(t.css("border-top-width"),10)||0,e.left+=parseInt(t.css("border-left-width"),10)||0,e.width=t.width(),e.height=t.height(),e},W=function(){var e,i,n=!!y.orig&&t(y.orig),a={};return n&&n.length?(e=R(n),a={width:e.width+2*w.padding,height:e.height+2*w.padding,top:e.top-w.padding-20,left:e.left-w.padding-20}):(i=K(),a={width:2*w.padding,height:2*w.padding,top:parseInt(i[3]+.5*i[1],10),left:parseInt(i[2]+.5*i[0],10)}),a},$=function(){if(!i.is(":visible"))return void clearInterval(f);t("div",i).css("top",-40*k+"px"),k=(k+1)%12};t.fn.fancybox=function(e){return t(this).length?(t(this).data("fancybox",t.extend({},e,t.metadata?t(this).metadata():{})).off("click.fb").on("click.fb",function(e){if(e.preventDefault(),!S){S=!0,t(this).trigger("blur"),u=[],g=0;var i=t(this).attr("rel")||"";i&&""!=i&&"nofollow"!==i?(u=t("a[rel="+i+"], area[rel="+i+"]"),g=u.index(this)):u.push(this),E()}}),this):this},t.fancybox=function(e){var i;if(!S){if(S=!0,i=void 0!==arguments[1]?arguments[1]:{},u=[],g=parseInt(i.index,10)||0,Array.isArray(e)){for(var n=0,a=e.length;n<a;n++)"object"==_typeof(e[n])?t(e[n]).data("fancybox",t.extend({},i,e[n])):e[n]=t({}).data("fancybox",t.extend({content:e[n]},i));u=jQuery.merge(u,e)}else"object"==_typeof(e)?t(e).data("fancybox",t.extend({},i,e)):e=t({}).data("fancybox",t.extend({content:e},i)),u.push(e);(g>u.length||g<0)&&(g=0),E()}},t.fancybox.showActivity=function(){clearInterval(f),i.show(),f=setInterval($,66)},t.fancybox.hideActivity=function(){i.hide()},t.fancybox.next=function(){return t.fancybox.pos(b+1)},t.fancybox.prev=function(){return t.fancybox.pos(b-1)},t.fancybox.pos=function(t){S||(t=parseInt(t),u=m,t>-1&&t<m.length?(g=t,E()):w.cyclic&&m.length>1&&(g=t>=m.length?0:m.length-1,E()))},t.fancybox.cancel=function(){S||(S=!0,t.event.trigger("fancybox-cancel"),D(),y.onCancel(u,g,y),S=!1)},t.fancybox.close=function(){function e(){n.fadeOut("fast"),r.empty().hide(),a.hide(),t.event.trigger("fancybox-cleanup"),d.empty(),w.onClosed(m,b,w),m=y=[],b=g=0,w=y={},S=!1}if(!S&&!a.is(":hidden")){if(S=!0,w&&!1===w.onCleanup(m,b,w))return void(S=!1);if(D(),t(c.add(h).add(s)).hide(),t(d.add(n)).off(),t(window).off("resize.fb scroll.fb"),t(document).off("keydown.fb"),d.find("iframe").attr("src","about:blank"),"inside"!==w.titlePosition&&r.empty(),a.stop(),"elastic"==w.transitionOut){l=W();var i=a.position();p={top:i.top,left:i.left,width:a.width(),height:a.height()},w.opacity&&(p.opacity=1),r.empty().hide(),T.prop=1,t(T).animate({prop:0},{duration:w.speedOut,easing:w.easingOut,step:H,complete:e})}else a.fadeOut("none"==w.transitionOut?0:w.speedOut,e)}},t.fancybox.resize=function(){n.is(":visible")&&n.css("height",t(document).height()),t.fancybox.center(!0)},t.fancybox.center=function(){var t,e;S||(e=!0===arguments[0]?1:0,t=K(),!e&&(a.width()>t[0]||a.height()>t[1])||a.stop().animate({top:parseInt(Math.max(t[3]-20,t[3]+.5*(t[1]-d.height()-40)-w.padding)),left:parseInt(Math.max(t[2]-20,t[2]+.5*(t[0]-d.width()-40)-w.padding))},"number"==typeof arguments[0]?arguments[0]:200))},t.fancybox.init=function(){t("#fancybox-wrap").length||(t("body").append(e=t('<div id="fancybox-tmp"></div>'),i=t('<div id="fancybox-loading"><div></div></div>'),n=t('<div id="fancybox-overlay"></div>'),a=t('<div id="fancybox-wrap"></div>')),o=t('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(a),o.append(d=t('<div id="fancybox-content"></div>'),c=t('<a id="fancybox-close"></a>'),r=t('<div id="fancybox-title"></div>'),h=t('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),s=t('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')),c.on("click",t.fancybox.close),i.on("click",t.fancybox.cancel),h.on("click",function(e){e.preventDefault(),t.fancybox.prev()}),s.on("click",function(e){e.preventDefault(),t.fancybox.next()}),t.fn.mousewheel&&a.on("mousewheel.fb",function(e,i){S?e.preventDefault():0!=t(e.target).get(0).clientHeight&&t(e.target).get(0).scrollHeight!==t(e.target).get(0).clientHeight||(e.preventDefault(),t.fancybox[i>0?"prev":"next"]())}),t.support.opacity||a.addClass("fancybox-ie"))},t.fn.fancybox.defaults={padding:10,margin:40,opacity:!1,modal:!1,cyclic:!1,scrolling:"auto",width:560,height:340,autoScale:!0,autoDimensions:!0,centerOnScroll:!1,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:!0,hideOnContentClick:!1,overlayShow:!0,overlayOpacity:.7,overlayColor:"#777",titleShow:!0,titlePosition:"float",titleFormat:null,titleFromAlt:!1,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:!0,showNavArrows:!0,enableEscapeButton:!0,enableKeyboardNav:!0,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}},jQuery(function(t){t.fancybox.init()})}(jQuery);
|
1 |
+
"use strict";function _typeof(t){"@babel/helpers - typeof";return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t){var e,i,n,a,o,d,c,r,h,s,f,l,p,g=0,y={},u=[],b=0,w={},m=[],v=null,x=new Image,I=/\.(jpg|gif|png|bmp|jpeg|webp)(.*)?$/i,C=/[^\.]\.(swf)\s*$/i,k=1,O=0,j="",S=!1,T=t.extend(t("<div/>")[0],{prop:0}),D=function(){i.hide(),x.onerror=x.onload=null,v&&v.abort(),e.empty()},A=function(){if(!1===y.onError(u,g,y))return i.hide(),void(S=!1);y.titleShow=!1,y.width="auto",y.height="auto",e.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>'),F()},E=function(){var n,a,o,c,r,h,s=u[g];if(D(),y=t.extend({},t.fn.fancybox.defaults,void 0===t(s).data("fancybox")?y:t(s).data("fancybox")),!1===(h=y.onStart(u,g,y)))return void(S=!1);if("object"==_typeof(h)&&(y=t.extend(y,h)),o=y.title||(s.nodeName?t(s).attr("title"):s.title)||"",s.nodeName&&!y.orig&&(y.orig=t(s).children("img:first").length?t(s).children("img:first"):t(s)),""===o&&y.orig&&y.titleFromAlt&&(o=y.orig.attr("alt")),n=y.href||(s.nodeName?t(s).attr("href"):s.href)||null,(/^(?:javascript)/i.test(n)||"#"==n)&&(n=null),y.type?(a=y.type,n||(n=y.content)):y.content?a="html":n&&(a=n.match(I)?"image":n.match(C)?"swf":t(s).hasClass("iframe")?"iframe":0===n.indexOf("#")?"inline":"ajax"),!a)return void A();switch("inline"==a&&(s=n.substr(n.indexOf("#")),a=t(s).length>0?"inline":"ajax"),y.type=a,y.href=n,y.title=o,y.autoDimensions&&("html"==y.type||"inline"==y.type||"ajax"==y.type?(y.width="auto",y.height="auto"):y.autoDimensions=!1),y.modal&&(y.overlayShow=!0,y.hideOnOverlayClick=!1,y.hideOnContentClick=!1,y.enableEscapeButton=!1,y.showCloseButton=!1),y.padding=parseInt(y.padding,10),y.margin=parseInt(y.margin,10),e.css("padding",y.padding+y.margin),t(".fancybox-inline-tmp").off("fancybox-cancel").on("fancybox-change",function(){t(this).replaceWith(d.children())}),a){case"html":e.html(y.content),F();break;case"inline":if(!0===t(s).parent().is("#fancybox-content"))return void(S=!1);t('<div class="fancybox-inline-tmp" />').hide().insertBefore(t(s)).on("fancybox-cleanup",function(){t(this).replaceWith(d.children())}).on("fancybox-cancel",function(){t(this).replaceWith(e.children())}),t(s).appendTo(e),F();break;case"image":S=!1,t.fancybox.showActivity(),x=new Image,x.onerror=function(){A()},x.onload=function(){S=!0,x.onerror=x.onload=null,N()},x.src=n;break;case"swf":y.scrolling="no",c='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+y.width+'" height="'+y.height+'"><param name="movie" value="'+n+'"></param>',r="",t.each(y.swf,function(t,e){c+='<param name="'+t+'" value="'+e+'"></param>',r+=" "+t+'="'+e+'"'}),c+='<embed src="'+n+'" type="application/x-shockwave-flash" width="'+y.width+'" height="'+y.height+'"'+r+"></embed></object>",e.html(c),F();break;case"ajax":S=!1,t.fancybox.showActivity(),y.ajax.win=y.ajax.success,v=t.ajax(t.extend({},y.ajax,{url:n,data:y.ajax.data||{},error:function(t,e,i){t.status>0&&A()},success:function(t,a,o){if(200==("object"==_typeof(o)?o:v).status){if("function"==typeof y.ajax.win){if(!1===(h=y.ajax.win(n,t,a,o)))return void i.hide();"string"!=typeof h&&"object"!=_typeof(h)||(t=h)}e.html(t),F()}}}));break;case"iframe":P()}},F=function(){var i=y.width,n=y.height;i=i.toString().indexOf("%")>-1?parseInt((t(window).width()-2*y.margin)*parseFloat(i)/100,10)+"px":"auto"==i?"auto":i+"px",n=n.toString().indexOf("%")>-1?parseInt((t(window).height()-2*y.margin)*parseFloat(n)/100,10)+"px":"auto"==n?"auto":n+"px",e.wrapInner('<div style="width:'+i+";height:"+n+";overflow: "+("auto"==y.scrolling?"auto":"yes"==y.scrolling?"scroll":"hidden")+';position:relative;"></div>'),y.width=e.width(),y.height=e.height(),P()},N=function(){y.width=x.width,y.height=x.height,t("<img />").attr({id:"fancybox-img",src:x.src,alt:y.title}).appendTo(e),P()},P=function(){var o,f;return i.hide(),a.is(":visible")&&!1===w.onCleanup(m,b,w)?(t.event.trigger("fancybox-cancel"),void(S=!1)):(S=!0,t(d.add(n)).off(),t(window).off("resize.fb scroll.fb"),t(document).off("keydown.fb"),a.is(":visible")&&"outside"!==w.titlePosition&&a.css("height",a.height()),m=u,b=g,w=y,w.overlayShow?(n.css({"background-color":w.overlayColor,opacity:w.overlayOpacity,cursor:w.hideOnOverlayClick?"pointer":"auto",height:t(document).height()}),n.is(":visible")||n.show()):n.hide(),p=Q(),_(),a.is(":visible")?(t(c.add(h).add(s)).hide(),o=a.position(),l={top:o.top,left:o.left,width:a.width(),height:a.height()},f=l.width==p.width&&l.height==p.height,void d.fadeTo(w.changeFade,.3,function(){var i=function(){d.html(e.contents()).fadeTo(w.changeFade,1,M)};t.event.trigger("fancybox-change"),d.empty().removeAttr("filter").css({"border-width":w.padding,width:p.width-2*w.padding,height:y.autoDimensions?"auto":p.height-O-2*w.padding}),f?i():(T.prop=0,t(T).animate({prop:1},{duration:w.changeSpeed,easing:w.easingChange,step:H,complete:i}))})):(a.removeAttr("style"),d.css("border-width",w.padding),"elastic"==w.transitionIn?(l=W(),d.html(e.contents()),a.show(),w.opacity&&(p.opacity=0),T.prop=0,void t(T).animate({prop:1},{duration:w.speedIn,easing:w.easingIn,step:H,complete:M})):("inside"==w.titlePosition&&O>0&&r.show(),d.css({width:p.width-2*w.padding,height:y.autoDimensions?"auto":p.height-O-2*w.padding}).html(e.contents()),void a.css(p).fadeIn("none"==w.transitionIn?0:w.speedIn,M))))},B=function(t){return!(!t||!t.length)&&("float"==w.titlePosition?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+t+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+w.titlePosition+'">'+t+"</div>")},_=function(){if(j=w.title||"",O=0,r.empty().removeAttr("style").removeClass(),!1===w.titleShow)return void r.hide();if(!(j=function(t){return"function"==typeof t}(w.titleFormat)?w.titleFormat(j,m,b,w):B(j))||""===j)return void r.hide();switch(r.addClass("fancybox-title-"+w.titlePosition).html(j).appendTo("body").show(),w.titlePosition){case"inside":r.css({width:p.width-2*w.padding,marginLeft:w.padding,marginRight:w.padding}),O=r.outerHeight(!0),r.appendTo(o),p.height+=O;break;case"over":r.css({marginLeft:w.padding,width:p.width-2*w.padding,bottom:w.padding}).appendTo(o);break;case"float":r.css("left",-1*parseInt((r.width()-p.width-40)/2,10)).appendTo(a);break;default:r.css({width:p.width-2*w.padding,paddingLeft:w.padding,paddingRight:w.padding}).appendTo(a)}r.hide()},L=function(){if((w.enableEscapeButton||w.enableKeyboardNav)&&t(document).on("keydown.fb",function(e){27==e.keyCode&&w.enableEscapeButton?(e.preventDefault(),t.fancybox.close()):37!=e.keyCode&&39!=e.keyCode||!w.enableKeyboardNav||"INPUT"===e.target.tagName||"TEXTAREA"===e.target.tagName||"SELECT"===e.target.tagName||(e.preventDefault(),t.fancybox[37==e.keyCode?"prev":"next"]())}),!w.showNavArrows)return h.hide(),void s.hide();(w.cyclic&&m.length>1||0!==b)&&h.show(),(w.cyclic&&m.length>1||b!=m.length-1)&&s.show()},M=function(){t.support.opacity||(d.get(0).style.removeProperty("filter"),a.get(0).style.removeProperty("filter")),y.autoDimensions&&d.css("height","auto"),a.css("height","auto"),j&&j.length&&r.show(),w.showCloseButton&&c.show(),L(),w.hideOnContentClick&&d.on("click",t.fancybox.close),w.hideOnOverlayClick&&n.on("click",t.fancybox.close),t(window).on("resize.fb",t.fancybox.resize),w.centerOnScroll&&t(window).on("scroll.fb",t.fancybox.center),"iframe"==w.type&&t('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" scrolling="'+y.scrolling+'" src="'+w.href+'"></iframe>').appendTo(d),a.show(),S=!1,t.fancybox.center(),w.onComplete(m,b,w),z()},z=function(){var t,e;m.length-1>b&&void 0!==(t=m[b+1].href)&&t.match(I)&&(e=new Image,e.src=t),b>0&&void 0!==(t=m[b-1].href)&&t.match(I)&&(e=new Image,e.src=t)},H=function(t){var e={width:parseInt(l.width+(p.width-l.width)*t,10),height:parseInt(l.height+(p.height-l.height)*t,10),top:parseInt(l.top+(p.top-l.top)*t,10),left:parseInt(l.left+(p.left-l.left)*t,10)};void 0!==p.opacity&&(e.opacity=t<.5?.5:t),a.css(e),d.css({width:e.width-2*w.padding,height:e.height-O*t-2*w.padding})},K=function(){return[t(window).width()-2*w.margin,t(window).height()-2*w.margin,t(document).scrollLeft()+w.margin,t(document).scrollTop()+w.margin]},Q=function(){var t,e=K(),i={},n=w.autoScale,a=2*w.padding;return w.width.toString().indexOf("%")>-1?i.width=parseInt(e[0]*parseFloat(w.width)/100,10):i.width=w.width+a,w.height.toString().indexOf("%")>-1?i.height=parseInt(e[1]*parseFloat(w.height)/100,10):i.height=w.height+a,n&&(i.width>e[0]||i.height>e[1])&&("image"==y.type||"swf"==y.type?(t=w.width/w.height,i.width>e[0]&&(i.width=e[0],i.height=parseInt((i.width-a)/t+a,10)),i.height>e[1]&&(i.height=e[1],i.width=parseInt((i.height-a)*t+a,10))):(i.width=Math.min(i.width,e[0]),i.height=Math.min(i.height,e[1]))),i.top=parseInt(Math.max(e[3]-20,e[3]+.5*(e[1]-i.height-40)),10),i.left=parseInt(Math.max(e[2]-20,e[2]+.5*(e[0]-i.width-40)),10),i},R=function(t){var e=t.offset();return e.top+=parseInt(t.css("paddingTop"),10)||0,e.left+=parseInt(t.css("paddingLeft"),10)||0,e.top+=parseInt(t.css("border-top-width"),10)||0,e.left+=parseInt(t.css("border-left-width"),10)||0,e.width=t.width(),e.height=t.height(),e},W=function(){var e,i,n=!!y.orig&&t(y.orig),a={};return n&&n.length?(e=R(n),a={width:e.width+2*w.padding,height:e.height+2*w.padding,top:e.top-w.padding-20,left:e.left-w.padding-20}):(i=K(),a={width:2*w.padding,height:2*w.padding,top:parseInt(i[3]+.5*i[1],10),left:parseInt(i[2]+.5*i[0],10)}),a},$=function(){if(!i.is(":visible"))return void clearInterval(f);t("div",i).css("top",-40*k+"px"),k=(k+1)%12};t.fn.fancybox=function(e){return t(this).length?(t(this).data("fancybox",t.extend({},e,t.metadata?t(this).metadata():{})).off("click.fb").on("click.fb",function(e){if(e.preventDefault(),!S){S=!0,t(this).trigger("blur"),u=[],g=0;var i=t(this).attr("rel")||"";i&&""!=i&&"nofollow"!==i?(u=t("a[rel="+i+"], area[rel="+i+"]"),g=u.index(this)):u.push(this),E()}}),this):this},t.fancybox=function(e){var i;if(!S){if(S=!0,i=void 0!==arguments[1]?arguments[1]:{},u=[],g=parseInt(i.index,10)||0,Array.isArray(e)){for(var n=0,a=e.length;n<a;n++)"object"==_typeof(e[n])?t(e[n]).data("fancybox",t.extend({},i,e[n])):e[n]=t({}).data("fancybox",t.extend({content:e[n]},i));u=jQuery.merge(u,e)}else"object"==_typeof(e)?t(e).data("fancybox",t.extend({},i,e)):e=t({}).data("fancybox",t.extend({content:e},i)),u.push(e);(g>u.length||g<0)&&(g=0),E()}},t.fancybox.showActivity=function(){clearInterval(f),i.show(),f=setInterval($,66)},t.fancybox.hideActivity=function(){i.hide()},t.fancybox.next=function(){return t.fancybox.pos(b+1)},t.fancybox.prev=function(){return t.fancybox.pos(b-1)},t.fancybox.pos=function(t){S||(t=parseInt(t),u=m,t>-1&&t<m.length?(g=t,E()):w.cyclic&&m.length>1&&(g=t>=m.length?0:m.length-1,E()))},t.fancybox.cancel=function(){S||(S=!0,t.event.trigger("fancybox-cancel"),D(),y.onCancel(u,g,y),S=!1)},t.fancybox.close=function(){function e(){n.fadeOut("fast"),r.empty().hide(),a.hide(),t.event.trigger("fancybox-cleanup"),d.empty(),w.onClosed(m,b,w),m=y=[],b=g=0,w=y={},S=!1}if(!S&&!a.is(":hidden")){if(S=!0,w&&!1===w.onCleanup(m,b,w))return void(S=!1);if(D(),t(c.add(h).add(s)).hide(),t(d.add(n)).off(),t(window).off("resize.fb scroll.fb"),t(document).off("keydown.fb"),d.find("iframe").attr("src","about:blank"),"inside"!==w.titlePosition&&r.empty(),a.stop(),"elastic"==w.transitionOut){l=W();var i=a.position();p={top:i.top,left:i.left,width:a.width(),height:a.height()},w.opacity&&(p.opacity=1),r.empty().hide(),T.prop=1,t(T).animate({prop:0},{duration:w.speedOut,easing:w.easingOut,step:H,complete:e})}else a.fadeOut("none"==w.transitionOut?0:w.speedOut,e)}},t.fancybox.resize=function(){n.is(":visible")&&n.css("height",t(document).height()),t.fancybox.center(!0)},t.fancybox.center=function(){var t,e;S||(e=!0===arguments[0]?1:0,t=K(),!e&&(a.width()>t[0]||a.height()>t[1])||a.stop().animate({top:parseInt(Math.max(t[3]-20,t[3]+.5*(t[1]-d.height()-40)-w.padding)),left:parseInt(Math.max(t[2]-20,t[2]+.5*(t[0]-d.width()-40)-w.padding))},"number"==typeof arguments[0]?arguments[0]:200))},t.fancybox.init=function(){t("#fancybox-wrap").length||(t("body").append(e=t('<div id="fancybox-tmp"></div>'),i=t('<div id="fancybox-loading"><div></div></div>'),n=t('<div id="fancybox-overlay"></div>'),a=t('<div id="fancybox-wrap"></div>')),o=t('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(a),o.append(d=t('<div id="fancybox-content"></div>'),c=t('<a id="fancybox-close"></a>'),r=t('<div id="fancybox-title"></div>'),h=t('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),s=t('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')),c.on("click",t.fancybox.close),i.on("click",t.fancybox.cancel),h.on("click",function(e){e.preventDefault(),t.fancybox.prev()}),s.on("click",function(e){e.preventDefault(),t.fancybox.next()}),t.fn.mousewheel&&a.on("mousewheel.fb",function(e,i){S?e.preventDefault():0!=t(e.target).get(0).clientHeight&&t(e.target).get(0).scrollHeight!==t(e.target).get(0).clientHeight||(e.preventDefault(),t.fancybox[i>0?"prev":"next"]())}),t.support.opacity||a.addClass("fancybox-ie"))},t.fn.fancybox.defaults={padding:10,margin:40,opacity:!1,modal:!1,cyclic:!1,scrolling:"auto",width:560,height:340,autoScale:!0,autoDimensions:!0,centerOnScroll:!1,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:!0,hideOnContentClick:!1,overlayShow:!0,overlayOpacity:.7,overlayColor:"#777",titleShow:!0,titlePosition:"float",titleFormat:null,titleFromAlt:!1,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:!0,showNavArrows:!0,enableEscapeButton:!0,enableKeyboardNav:!0,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}},jQuery(function(t){t.fancybox.init()})}(jQuery);
|
products/photocrati_nextgen/modules/lightbox/static/fancybox/jquery.fancybox-1.3.4.pack.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(c){function r(){l.hide(),j.onerror=j.onload=null,O&&O.abort(),s.empty()}function h(){if(!1===m.onError(v,x,m))return l.hide(),F=!1;m.titleShow=!1,m.width="auto",m.height="auto",s.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>'),P()}function a(){var n,t,e,i,a,o,d=v[x];if(r(),m=c.extend({},c.fn.fancybox.defaults,void 0===c(d).data("fancybox")?m:c(d).data("fancybox")),!1!==(o=m.onStart(v,x,m)))if("object"==typeof o&&(m=c.extend(m,o)),e=m.title||(d.nodeName?c(d).attr("title"):d.title)||"",d.nodeName&&!m.orig&&(m.orig=c(d).children("img:first").length?c(d).children("img:first"):c(d)),""===e&&m.orig&&m.titleFromAlt&&(e=m.orig.attr("alt")),n=m.href||(d.nodeName?c(d).attr("href"):d.href)||null,!/^(?:javascript)/i.test(n)&&"#"!=n||(n=null),m.type?(t=m.type,n=n||m.content):m.content?t="html":n&&(t=n.match(S)?"image":n.match(T)?"swf":c(d).hasClass("iframe")?"iframe":0===n.indexOf("#")?"inline":"ajax"),t)switch("inline"==t&&(d=n.substr(n.indexOf("#")),t=0<c(d).length?"inline":"ajax"),m.type=t,m.href=n,m.title=e,m.autoDimensions&&("html"==m.type||"inline"==m.type||"ajax"==m.type?(m.width="auto",m.height="auto"):m.autoDimensions=!1),m.modal&&(m.overlayShow=!0,m.hideOnOverlayClick=!1,m.hideOnContentClick=!1,m.enableEscapeButton=!1,m.showCloseButton=!1),m.padding=parseInt(m.padding,10),m.margin=parseInt(m.margin,10),s.css("padding",m.padding+m.margin),c(".fancybox-inline-tmp").off("fancybox-cancel").on("fancybox-change",function(){c(this).replaceWith(f.children())}),t){case"html":s.html(m.content),P();break;case"inline":if(!0===c(d).parent().is("#fancybox-content"))return F=!1,0;c('<div class="fancybox-inline-tmp" />').hide().insertBefore(c(d)).on("fancybox-cleanup",function(){c(this).replaceWith(f.children())}).on("fancybox-cancel",function(){c(this).replaceWith(s.children())}),c(d).appendTo(s),P();break;case"image":F=!1,c.fancybox.showActivity(),(j=new Image).onerror=function(){h()},j.onload=function(){F=!0,j.onerror=j.onload=null,B()},j.src=n;break;case"swf":m.scrolling="no",i='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+m.width+'" height="'+m.height+'"><param name="movie" value="'+n+'"></param>',a="",c.each(m.swf,function(t,e){i+='<param name="'+t+'" value="'+e+'"></param>',a+=" "+t+'="'+e+'"'}),i+='<embed src="'+n+'" type="application/x-shockwave-flash" width="'+m.width+'" height="'+m.height+'"'+a+"></embed></object>",s.html(i),P();break;case"ajax":F=!1,c.fancybox.showActivity(),m.ajax.win=m.ajax.success,O=c.ajax(c.extend({},m.ajax,{url:n,data:m.ajax.data||{},error:function(t,e,i){0<t.status&&h()},success:function(t,e,i){if(200==("object"==typeof i?i:O).status){if("function"==typeof m.ajax.win){if(!1===(o=m.ajax.win(n,t,e,i)))return void l.hide();"string"!=typeof o&&"object"!=typeof o||(t=o)}s.html(t),P()}}}));break;case"iframe":L()}else h();else F=!1}function o(){return[c(window).width()-2*C.margin,c(window).height()-2*C.margin,c(document).scrollLeft()+C.margin,c(document).scrollTop()+C.margin]}function t(){l.is(":visible")?(c("div",l).css("top",-40*D+"px"),D=(D+1)%12):clearInterval(b)}var s,l,i,n,e,f,d,p,g,y,b,u,w,x=0,m={},v=[],I=0,C={},k=[],O=null,j=new Image,S=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,T=/[^\.]\.(swf)\s*$/i,D=1,A=0,E="",F=!1,N=c.extend(c("<div/>")[0],{prop:0}),P=function(){var t=m.width,e=m.height,t=-1<t.toString().indexOf("%")?parseInt((c(window).width()-2*m.margin)*parseFloat(t)/100,10)+"px":"auto"==t?"auto":t+"px",e=-1<e.toString().indexOf("%")?parseInt((c(window).height()-2*m.margin)*parseFloat(e)/100,10)+"px":"auto"==e?"auto":e+"px";s.wrapInner('<div style="width:'+t+";height:"+e+";overflow: "+("auto"==m.scrolling?"auto":"yes"==m.scrolling?"scroll":"hidden")+';position:relative;"></div>'),m.width=s.width(),m.height=s.height(),L()},B=function(){m.width=j.width,m.height=j.height,c("<img />").attr({id:"fancybox-img",src:j.src,alt:m.title}).appendTo(s),L()},L=function(){var t,e;return l.hide(),n.is(":visible")&&!1===C.onCleanup(k,I,C)?(c.event.trigger("fancybox-cancel"),void(F=!1)):(F=!0,c(f.add(i)).off(),c(window).off("resize.fb scroll.fb"),c(document).off("keydown.fb"),n.is(":visible")&&"outside"!==C.titlePosition&&n.css("height",n.height()),k=v,I=x,(C=m).overlayShow?(i.css({"background-color":C.overlayColor,opacity:C.overlayOpacity,cursor:C.hideOnOverlayClick?"pointer":"auto",height:c(document).height()}),i.is(":visible")||i.show()):i.hide(),w=Q(),M(),n.is(":visible")?(c(d.add(g).add(y)).hide(),t=n.position(),u={top:t.top,left:t.left,width:n.width(),height:n.height()},e=u.width==w.width&&u.height==w.height,void f.fadeTo(C.changeFade,.3,function(){function t(){f.html(s.contents()).fadeTo(C.changeFade,1,z)}c.event.trigger("fancybox-change"),f.empty().removeAttr("filter").css({"border-width":C.padding,width:w.width-2*C.padding,height:m.autoDimensions?"auto":w.height-A-2*C.padding}),e?t():(N.prop=0,c(N).animate({prop:1},{duration:C.changeSpeed,easing:C.easingChange,step:K,complete:t}))})):(n.removeAttr("style"),f.css("border-width",C.padding),"elastic"==C.transitionIn?(u=R(),f.html(s.contents()),n.show(),C.opacity&&(w.opacity=0),N.prop=0,void c(N).animate({prop:1},{duration:C.speedIn,easing:C.easingIn,step:K,complete:z})):("inside"==C.titlePosition&&0<A&&p.show(),f.css({width:w.width-2*C.padding,height:m.autoDimensions?"auto":w.height-A-2*C.padding}).html(s.contents()),void n.css(w).fadeIn("none"==C.transitionIn?0:C.speedIn,z))))},M=function(){if(E=C.title||"",A=0,p.empty().removeAttr("style").removeClass(),!1!==C.titleShow){var t;if((E="function"==typeof C.titleFormat?C.titleFormat(E,k,I,C):!(!(t=E)||!t.length)&&("float"==C.titlePosition?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+t+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+C.titlePosition+'">'+t+"</div>"))&&""!==E){switch(p.addClass("fancybox-title-"+C.titlePosition).html(E).appendTo("body").show(),C.titlePosition){case"inside":p.css({width:w.width-2*C.padding,marginLeft:C.padding,marginRight:C.padding}),A=p.outerHeight(!0),p.appendTo(e),w.height+=A;break;case"over":p.css({marginLeft:C.padding,width:w.width-2*C.padding,bottom:C.padding}).appendTo(e);break;case"float":p.css("left",-1*parseInt((p.width()-w.width-40)/2,10)).appendTo(n);break;default:p.css({width:w.width-2*C.padding,paddingLeft:C.padding,paddingRight:C.padding}).appendTo(n)}p.hide()}else p.hide()}else p.hide()},z=function(){c.support.opacity||(f.get(0).style.removeProperty("filter"),n.get(0).style.removeProperty("filter")),m.autoDimensions&&f.css("height","auto"),n.css("height","auto"),E&&E.length&&p.show(),C.showCloseButton&&d.show(),function(){if((C.enableEscapeButton||C.enableKeyboardNav)&&c(document).on("keydown.fb",function(t){27==t.keyCode&&C.enableEscapeButton?(t.preventDefault(),c.fancybox.close()):37!=t.keyCode&&39!=t.keyCode||!C.enableKeyboardNav||"INPUT"===t.target.tagName||"TEXTAREA"===t.target.tagName||"SELECT"===t.target.tagName||(t.preventDefault(),c.fancybox[37==t.keyCode?"prev":"next"]())}),!C.showNavArrows)return g.hide(),y.hide();(C.cyclic&&1<k.length||0!==I)&&g.show(),(C.cyclic&&1<k.length||I!=k.length-1)&&y.show()}(),C.hideOnContentClick&&f.on("click",c.fancybox.close),C.hideOnOverlayClick&&i.on("click",c.fancybox.close),c(window).on("resize.fb",c.fancybox.resize),C.centerOnScroll&&c(window).on("scroll.fb",c.fancybox.center),"iframe"==C.type&&c('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" scrolling="'+m.scrolling+'" src="'+C.href+'"></iframe>').appendTo(f),n.show(),F=!1,c.fancybox.center(),C.onComplete(k,I,C),H()},H=function(){var t;k.length-1>I&&void 0!==(t=k[I+1].href)&&t.match(S)&&((new Image).src=t),0<I&&void 0!==(t=k[I-1].href)&&t.match(S)&&((new Image).src=t)},K=function(t){var e={width:parseInt(u.width+(w.width-u.width)*t,10),height:parseInt(u.height+(w.height-u.height)*t,10),top:parseInt(u.top+(w.top-u.top)*t,10),left:parseInt(u.left+(w.left-u.left)*t,10)};void 0!==w.opacity&&(e.opacity=t<.5?.5:t),n.css(e),f.css({width:e.width-2*C.padding,height:e.height-A*t-2*C.padding})},Q=function(){var t,e=o(),i={},n=C.autoScale,a=2*C.padding;return-1<C.width.toString().indexOf("%")?i.width=parseInt(e[0]*parseFloat(C.width)/100,10):i.width=C.width+a,-1<C.height.toString().indexOf("%")?i.height=parseInt(e[1]*parseFloat(C.height)/100,10):i.height=C.height+a,n&&(i.width>e[0]||i.height>e[1])&&("image"==m.type||"swf"==m.type?(t=C.width/C.height,i.width>e[0]&&(i.width=e[0],i.height=parseInt((i.width-a)/t+a,10)),i.height>e[1]&&(i.height=e[1],i.width=parseInt((i.height-a)*t+a,10))):(i.width=Math.min(i.width,e[0]),i.height=Math.min(i.height,e[1]))),i.top=parseInt(Math.max(e[3]-20,e[3]+.5*(e[1]-i.height-40)),10),i.left=parseInt(Math.max(e[2]-20,e[2]+.5*(e[0]-i.width-40)),10),i},R=function(){var t,e,i,n=!!m.orig&&c(m.orig);return n&&n.length?((i=(e=n).offset()).top+=parseInt(e.css("paddingTop"),10)||0,i.left+=parseInt(e.css("paddingLeft"),10)||0,i.top+=parseInt(e.css("border-top-width"),10)||0,i.left+=parseInt(e.css("border-left-width"),10)||0,i.width=e.width(),i.height=e.height(),{width:i.width+2*C.padding,height:i.height+2*C.padding,top:i.top-C.padding-20,left:i.left-C.padding-20}):(t=o(),{width:2*C.padding,height:2*C.padding,top:parseInt(t[3]+.5*t[1],10),left:parseInt(t[2]+.5*t[0],10)})};c.fn.fancybox=function(t){return c(this).length&&c(this).data("fancybox",c.extend({},t,c.metadata?c(this).metadata():{})).off("click.fb").on("click.fb",function(t){var e;t.preventDefault(),F||(F=!0,c(this).trigger("blur"),v=[],x=0,(e=c(this).attr("rel")||"")&&""!=e&&"nofollow"!==e?(v=c("a[rel="+e+"], area[rel="+e+"]"),x=v.index(this)):v.push(this),a())}),this},c.fancybox=function(t){var e;if(!F){if(F=!0,e=void 0!==arguments[1]?arguments[1]:{},v=[],x=parseInt(e.index,10)||0,Array.isArray(t)){for(var i=0,n=t.length;i<n;i++)"object"==typeof t[i]?c(t[i]).data("fancybox",c.extend({},e,t[i])):t[i]=c({}).data("fancybox",c.extend({content:t[i]},e));v=jQuery.merge(v,t)}else"object"==typeof t?c(t).data("fancybox",c.extend({},e,t)):t=c({}).data("fancybox",c.extend({content:t},e)),v.push(t);(x>v.length||x<0)&&(x=0),a()}},c.fancybox.showActivity=function(){clearInterval(b),l.show(),b=setInterval(t,66)},c.fancybox.hideActivity=function(){l.hide()},c.fancybox.next=function(){return c.fancybox.pos(I+1)},c.fancybox.prev=function(){return c.fancybox.pos(I-1)},c.fancybox.pos=function(t){F||(t=parseInt(t),v=k,-1<t&&t<k.length?(x=t,a()):C.cyclic&&1<k.length&&(x=t>=k.length?0:k.length-1,a()))},c.fancybox.cancel=function(){F||(F=!0,c.event.trigger("fancybox-cancel"),r(),m.onCancel(v,x,m),F=!1)},c.fancybox.close=function(){var t;function e(){i.fadeOut("fast"),p.empty().hide(),n.hide(),c.event.trigger("fancybox-cleanup"),f.empty(),C.onClosed(k,I,C),k=m=[],I=x=0,C=m={},F=!1}F||n.is(":hidden")||(F=!0,C&&!1===C.onCleanup(k,I,C)?F=!1:(r(),c(d.add(g).add(y)).hide(),c(f.add(i)).off(),c(window).off("resize.fb scroll.fb"),c(document).off("keydown.fb"),f.find("iframe").attr("src","about:blank"),"inside"!==C.titlePosition&&p.empty(),n.stop(),"elastic"==C.transitionOut?(u=R(),t=n.position(),w={top:t.top,left:t.left,width:n.width(),height:n.height()},C.opacity&&(w.opacity=1),p.empty().hide(),N.prop=1,c(N).animate({prop:0},{duration:C.speedOut,easing:C.easingOut,step:K,complete:e})):n.fadeOut("none"==C.transitionOut?0:C.speedOut,e)))},c.fancybox.resize=function(){i.is(":visible")&&i.css("height",c(document).height()),c.fancybox.center(!0)},c.fancybox.center=function(){var t,e;F||(e=!0===arguments[0]?1:0,t=o(),!e&&(n.width()>t[0]||n.height()>t[1])||n.stop().animate({top:parseInt(Math.max(t[3]-20,t[3]+.5*(t[1]-f.height()-40)-C.padding)),left:parseInt(Math.max(t[2]-20,t[2]+.5*(t[0]-f.width()-40)-C.padding))},"number"==typeof arguments[0]?arguments[0]:200))},c.fancybox.init=function(){c("#fancybox-wrap").length||(c("body").append(s=c('<div id="fancybox-tmp"></div>'),l=c('<div id="fancybox-loading"><div></div></div>'),i=c('<div id="fancybox-overlay"></div>'),n=c('<div id="fancybox-wrap"></div>')),(e=c('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(n)).append(f=c('<div id="fancybox-content"></div>'),d=c('<a id="fancybox-close"></a>'),p=c('<div id="fancybox-title"></div>'),g=c('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),y=c('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')),d.on("click",c.fancybox.close),l.on("click",c.fancybox.cancel),g.on("click",function(t){t.preventDefault(),c.fancybox.prev()}),y.on("click",function(t){t.preventDefault(),c.fancybox.next()}),c.fn.mousewheel&&n.on("mousewheel.fb",function(t,e){F?t.preventDefault():0!=c(t.target).get(0).clientHeight&&c(t.target).get(0).scrollHeight!==c(t.target).get(0).clientHeight||(t.preventDefault(),c.fancybox[0<e?"prev":"next"]())}),c.support.opacity||n.addClass("fancybox-ie"))},c.fn.fancybox.defaults={padding:10,margin:40,opacity:!1,modal:!1,cyclic:!1,scrolling:"auto",width:560,height:340,autoScale:!0,autoDimensions:!0,centerOnScroll:!1,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:!0,hideOnContentClick:!1,overlayShow:!0,overlayOpacity:.7,overlayColor:"#777",titleShow:!0,titlePosition:"float",titleFormat:null,titleFromAlt:!1,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:!0,showNavArrows:!0,enableEscapeButton:!0,enableKeyboardNav:!0,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}},jQuery(function(t){t.fancybox.init()})}(jQuery);
|
1 |
+
!function(c){function r(){l.hide(),j.onerror=j.onload=null,O&&O.abort(),s.empty()}function h(){if(!1===m.onError(v,x,m))return l.hide(),F=!1;m.titleShow=!1,m.width="auto",m.height="auto",s.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>'),P()}function a(){var n,t,e,i,a,o,d=v[x];if(r(),m=c.extend({},c.fn.fancybox.defaults,void 0===c(d).data("fancybox")?m:c(d).data("fancybox")),!1!==(o=m.onStart(v,x,m)))if("object"==typeof o&&(m=c.extend(m,o)),e=m.title||(d.nodeName?c(d).attr("title"):d.title)||"",d.nodeName&&!m.orig&&(m.orig=c(d).children("img:first").length?c(d).children("img:first"):c(d)),""===e&&m.orig&&m.titleFromAlt&&(e=m.orig.attr("alt")),n=m.href||(d.nodeName?c(d).attr("href"):d.href)||null,!/^(?:javascript)/i.test(n)&&"#"!=n||(n=null),m.type?(t=m.type,n=n||m.content):m.content?t="html":n&&(t=n.match(S)?"image":n.match(T)?"swf":c(d).hasClass("iframe")?"iframe":0===n.indexOf("#")?"inline":"ajax"),t)switch("inline"==t&&(d=n.substr(n.indexOf("#")),t=0<c(d).length?"inline":"ajax"),m.type=t,m.href=n,m.title=e,m.autoDimensions&&("html"==m.type||"inline"==m.type||"ajax"==m.type?(m.width="auto",m.height="auto"):m.autoDimensions=!1),m.modal&&(m.overlayShow=!0,m.hideOnOverlayClick=!1,m.hideOnContentClick=!1,m.enableEscapeButton=!1,m.showCloseButton=!1),m.padding=parseInt(m.padding,10),m.margin=parseInt(m.margin,10),s.css("padding",m.padding+m.margin),c(".fancybox-inline-tmp").off("fancybox-cancel").on("fancybox-change",function(){c(this).replaceWith(f.children())}),t){case"html":s.html(m.content),P();break;case"inline":if(!0===c(d).parent().is("#fancybox-content"))return F=!1,0;c('<div class="fancybox-inline-tmp" />').hide().insertBefore(c(d)).on("fancybox-cleanup",function(){c(this).replaceWith(f.children())}).on("fancybox-cancel",function(){c(this).replaceWith(s.children())}),c(d).appendTo(s),P();break;case"image":F=!1,c.fancybox.showActivity(),(j=new Image).onerror=function(){h()},j.onload=function(){F=!0,j.onerror=j.onload=null,B()},j.src=n;break;case"swf":m.scrolling="no",i='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+m.width+'" height="'+m.height+'"><param name="movie" value="'+n+'"></param>',a="",c.each(m.swf,function(t,e){i+='<param name="'+t+'" value="'+e+'"></param>',a+=" "+t+'="'+e+'"'}),i+='<embed src="'+n+'" type="application/x-shockwave-flash" width="'+m.width+'" height="'+m.height+'"'+a+"></embed></object>",s.html(i),P();break;case"ajax":F=!1,c.fancybox.showActivity(),m.ajax.win=m.ajax.success,O=c.ajax(c.extend({},m.ajax,{url:n,data:m.ajax.data||{},error:function(t,e,i){0<t.status&&h()},success:function(t,e,i){if(200==("object"==typeof i?i:O).status){if("function"==typeof m.ajax.win){if(!1===(o=m.ajax.win(n,t,e,i)))return void l.hide();"string"!=typeof o&&"object"!=typeof o||(t=o)}s.html(t),P()}}}));break;case"iframe":L()}else h();else F=!1}function o(){return[c(window).width()-2*C.margin,c(window).height()-2*C.margin,c(document).scrollLeft()+C.margin,c(document).scrollTop()+C.margin]}function t(){l.is(":visible")?(c("div",l).css("top",-40*D+"px"),D=(D+1)%12):clearInterval(b)}var s,l,i,n,e,f,d,p,g,y,b,u,w,x=0,m={},v=[],I=0,C={},k=[],O=null,j=new Image,S=/\.(jpg|gif|png|bmp|jpeg|webp)(.*)?$/i,T=/[^\.]\.(swf)\s*$/i,D=1,A=0,E="",F=!1,N=c.extend(c("<div/>")[0],{prop:0}),P=function(){var t=m.width,e=m.height,t=-1<t.toString().indexOf("%")?parseInt((c(window).width()-2*m.margin)*parseFloat(t)/100,10)+"px":"auto"==t?"auto":t+"px",e=-1<e.toString().indexOf("%")?parseInt((c(window).height()-2*m.margin)*parseFloat(e)/100,10)+"px":"auto"==e?"auto":e+"px";s.wrapInner('<div style="width:'+t+";height:"+e+";overflow: "+("auto"==m.scrolling?"auto":"yes"==m.scrolling?"scroll":"hidden")+';position:relative;"></div>'),m.width=s.width(),m.height=s.height(),L()},B=function(){m.width=j.width,m.height=j.height,c("<img />").attr({id:"fancybox-img",src:j.src,alt:m.title}).appendTo(s),L()},L=function(){var t,e;return l.hide(),n.is(":visible")&&!1===C.onCleanup(k,I,C)?(c.event.trigger("fancybox-cancel"),void(F=!1)):(F=!0,c(f.add(i)).off(),c(window).off("resize.fb scroll.fb"),c(document).off("keydown.fb"),n.is(":visible")&&"outside"!==C.titlePosition&&n.css("height",n.height()),k=v,I=x,(C=m).overlayShow?(i.css({"background-color":C.overlayColor,opacity:C.overlayOpacity,cursor:C.hideOnOverlayClick?"pointer":"auto",height:c(document).height()}),i.is(":visible")||i.show()):i.hide(),w=Q(),M(),n.is(":visible")?(c(d.add(g).add(y)).hide(),t=n.position(),u={top:t.top,left:t.left,width:n.width(),height:n.height()},e=u.width==w.width&&u.height==w.height,void f.fadeTo(C.changeFade,.3,function(){function t(){f.html(s.contents()).fadeTo(C.changeFade,1,z)}c.event.trigger("fancybox-change"),f.empty().removeAttr("filter").css({"border-width":C.padding,width:w.width-2*C.padding,height:m.autoDimensions?"auto":w.height-A-2*C.padding}),e?t():(N.prop=0,c(N).animate({prop:1},{duration:C.changeSpeed,easing:C.easingChange,step:K,complete:t}))})):(n.removeAttr("style"),f.css("border-width",C.padding),"elastic"==C.transitionIn?(u=R(),f.html(s.contents()),n.show(),C.opacity&&(w.opacity=0),N.prop=0,void c(N).animate({prop:1},{duration:C.speedIn,easing:C.easingIn,step:K,complete:z})):("inside"==C.titlePosition&&0<A&&p.show(),f.css({width:w.width-2*C.padding,height:m.autoDimensions?"auto":w.height-A-2*C.padding}).html(s.contents()),void n.css(w).fadeIn("none"==C.transitionIn?0:C.speedIn,z))))},M=function(){if(E=C.title||"",A=0,p.empty().removeAttr("style").removeClass(),!1!==C.titleShow){var t;if((E="function"==typeof C.titleFormat?C.titleFormat(E,k,I,C):!(!(t=E)||!t.length)&&("float"==C.titlePosition?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+t+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+C.titlePosition+'">'+t+"</div>"))&&""!==E){switch(p.addClass("fancybox-title-"+C.titlePosition).html(E).appendTo("body").show(),C.titlePosition){case"inside":p.css({width:w.width-2*C.padding,marginLeft:C.padding,marginRight:C.padding}),A=p.outerHeight(!0),p.appendTo(e),w.height+=A;break;case"over":p.css({marginLeft:C.padding,width:w.width-2*C.padding,bottom:C.padding}).appendTo(e);break;case"float":p.css("left",-1*parseInt((p.width()-w.width-40)/2,10)).appendTo(n);break;default:p.css({width:w.width-2*C.padding,paddingLeft:C.padding,paddingRight:C.padding}).appendTo(n)}p.hide()}else p.hide()}else p.hide()},z=function(){c.support.opacity||(f.get(0).style.removeProperty("filter"),n.get(0).style.removeProperty("filter")),m.autoDimensions&&f.css("height","auto"),n.css("height","auto"),E&&E.length&&p.show(),C.showCloseButton&&d.show(),function(){if((C.enableEscapeButton||C.enableKeyboardNav)&&c(document).on("keydown.fb",function(t){27==t.keyCode&&C.enableEscapeButton?(t.preventDefault(),c.fancybox.close()):37!=t.keyCode&&39!=t.keyCode||!C.enableKeyboardNav||"INPUT"===t.target.tagName||"TEXTAREA"===t.target.tagName||"SELECT"===t.target.tagName||(t.preventDefault(),c.fancybox[37==t.keyCode?"prev":"next"]())}),!C.showNavArrows)return g.hide(),y.hide();(C.cyclic&&1<k.length||0!==I)&&g.show(),(C.cyclic&&1<k.length||I!=k.length-1)&&y.show()}(),C.hideOnContentClick&&f.on("click",c.fancybox.close),C.hideOnOverlayClick&&i.on("click",c.fancybox.close),c(window).on("resize.fb",c.fancybox.resize),C.centerOnScroll&&c(window).on("scroll.fb",c.fancybox.center),"iframe"==C.type&&c('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" scrolling="'+m.scrolling+'" src="'+C.href+'"></iframe>').appendTo(f),n.show(),F=!1,c.fancybox.center(),C.onComplete(k,I,C),H()},H=function(){var t;k.length-1>I&&void 0!==(t=k[I+1].href)&&t.match(S)&&((new Image).src=t),0<I&&void 0!==(t=k[I-1].href)&&t.match(S)&&((new Image).src=t)},K=function(t){var e={width:parseInt(u.width+(w.width-u.width)*t,10),height:parseInt(u.height+(w.height-u.height)*t,10),top:parseInt(u.top+(w.top-u.top)*t,10),left:parseInt(u.left+(w.left-u.left)*t,10)};void 0!==w.opacity&&(e.opacity=t<.5?.5:t),n.css(e),f.css({width:e.width-2*C.padding,height:e.height-A*t-2*C.padding})},Q=function(){var t,e=o(),i={},n=C.autoScale,a=2*C.padding;return-1<C.width.toString().indexOf("%")?i.width=parseInt(e[0]*parseFloat(C.width)/100,10):i.width=C.width+a,-1<C.height.toString().indexOf("%")?i.height=parseInt(e[1]*parseFloat(C.height)/100,10):i.height=C.height+a,n&&(i.width>e[0]||i.height>e[1])&&("image"==m.type||"swf"==m.type?(t=C.width/C.height,i.width>e[0]&&(i.width=e[0],i.height=parseInt((i.width-a)/t+a,10)),i.height>e[1]&&(i.height=e[1],i.width=parseInt((i.height-a)*t+a,10))):(i.width=Math.min(i.width,e[0]),i.height=Math.min(i.height,e[1]))),i.top=parseInt(Math.max(e[3]-20,e[3]+.5*(e[1]-i.height-40)),10),i.left=parseInt(Math.max(e[2]-20,e[2]+.5*(e[0]-i.width-40)),10),i},R=function(){var t,e,i,n=!!m.orig&&c(m.orig);return n&&n.length?((i=(e=n).offset()).top+=parseInt(e.css("paddingTop"),10)||0,i.left+=parseInt(e.css("paddingLeft"),10)||0,i.top+=parseInt(e.css("border-top-width"),10)||0,i.left+=parseInt(e.css("border-left-width"),10)||0,i.width=e.width(),i.height=e.height(),{width:i.width+2*C.padding,height:i.height+2*C.padding,top:i.top-C.padding-20,left:i.left-C.padding-20}):(t=o(),{width:2*C.padding,height:2*C.padding,top:parseInt(t[3]+.5*t[1],10),left:parseInt(t[2]+.5*t[0],10)})};c.fn.fancybox=function(t){return c(this).length&&c(this).data("fancybox",c.extend({},t,c.metadata?c(this).metadata():{})).off("click.fb").on("click.fb",function(t){var e;t.preventDefault(),F||(F=!0,c(this).trigger("blur"),v=[],x=0,(e=c(this).attr("rel")||"")&&""!=e&&"nofollow"!==e?(v=c("a[rel="+e+"], area[rel="+e+"]"),x=v.index(this)):v.push(this),a())}),this},c.fancybox=function(t){var e;if(!F){if(F=!0,e=void 0!==arguments[1]?arguments[1]:{},v=[],x=parseInt(e.index,10)||0,Array.isArray(t)){for(var i=0,n=t.length;i<n;i++)"object"==typeof t[i]?c(t[i]).data("fancybox",c.extend({},e,t[i])):t[i]=c({}).data("fancybox",c.extend({content:t[i]},e));v=jQuery.merge(v,t)}else"object"==typeof t?c(t).data("fancybox",c.extend({},e,t)):t=c({}).data("fancybox",c.extend({content:t},e)),v.push(t);(x>v.length||x<0)&&(x=0),a()}},c.fancybox.showActivity=function(){clearInterval(b),l.show(),b=setInterval(t,66)},c.fancybox.hideActivity=function(){l.hide()},c.fancybox.next=function(){return c.fancybox.pos(I+1)},c.fancybox.prev=function(){return c.fancybox.pos(I-1)},c.fancybox.pos=function(t){F||(t=parseInt(t),v=k,-1<t&&t<k.length?(x=t,a()):C.cyclic&&1<k.length&&(x=t>=k.length?0:k.length-1,a()))},c.fancybox.cancel=function(){F||(F=!0,c.event.trigger("fancybox-cancel"),r(),m.onCancel(v,x,m),F=!1)},c.fancybox.close=function(){var t;function e(){i.fadeOut("fast"),p.empty().hide(),n.hide(),c.event.trigger("fancybox-cleanup"),f.empty(),C.onClosed(k,I,C),k=m=[],I=x=0,C=m={},F=!1}F||n.is(":hidden")||(F=!0,C&&!1===C.onCleanup(k,I,C)?F=!1:(r(),c(d.add(g).add(y)).hide(),c(f.add(i)).off(),c(window).off("resize.fb scroll.fb"),c(document).off("keydown.fb"),f.find("iframe").attr("src","about:blank"),"inside"!==C.titlePosition&&p.empty(),n.stop(),"elastic"==C.transitionOut?(u=R(),t=n.position(),w={top:t.top,left:t.left,width:n.width(),height:n.height()},C.opacity&&(w.opacity=1),p.empty().hide(),N.prop=1,c(N).animate({prop:0},{duration:C.speedOut,easing:C.easingOut,step:K,complete:e})):n.fadeOut("none"==C.transitionOut?0:C.speedOut,e)))},c.fancybox.resize=function(){i.is(":visible")&&i.css("height",c(document).height()),c.fancybox.center(!0)},c.fancybox.center=function(){var t,e;F||(e=!0===arguments[0]?1:0,t=o(),!e&&(n.width()>t[0]||n.height()>t[1])||n.stop().animate({top:parseInt(Math.max(t[3]-20,t[3]+.5*(t[1]-f.height()-40)-C.padding)),left:parseInt(Math.max(t[2]-20,t[2]+.5*(t[0]-f.width()-40)-C.padding))},"number"==typeof arguments[0]?arguments[0]:200))},c.fancybox.init=function(){c("#fancybox-wrap").length||(c("body").append(s=c('<div id="fancybox-tmp"></div>'),l=c('<div id="fancybox-loading"><div></div></div>'),i=c('<div id="fancybox-overlay"></div>'),n=c('<div id="fancybox-wrap"></div>')),(e=c('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(n)).append(f=c('<div id="fancybox-content"></div>'),d=c('<a id="fancybox-close"></a>'),p=c('<div id="fancybox-title"></div>'),g=c('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),y=c('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')),d.on("click",c.fancybox.close),l.on("click",c.fancybox.cancel),g.on("click",function(t){t.preventDefault(),c.fancybox.prev()}),y.on("click",function(t){t.preventDefault(),c.fancybox.next()}),c.fn.mousewheel&&n.on("mousewheel.fb",function(t,e){F?t.preventDefault():0!=c(t.target).get(0).clientHeight&&c(t.target).get(0).scrollHeight!==c(t.target).get(0).clientHeight||(t.preventDefault(),c.fancybox[0<e?"prev":"next"]())}),c.support.opacity||n.addClass("fancybox-ie"))},c.fn.fancybox.defaults={padding:10,margin:40,opacity:!1,modal:!1,cyclic:!1,scrolling:"auto",width:560,height:340,autoScale:!0,autoDimensions:!0,centerOnScroll:!1,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:!0,hideOnContentClick:!1,overlayShow:!0,overlayOpacity:.7,overlayColor:"#777",titleShow:!0,titlePosition:"float",titleFormat:null,titleFromAlt:!1,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:!0,showNavArrows:!0,enableEscapeButton:!0,enableKeyboardNav:!0,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}},jQuery(function(t){t.fancybox.init()})}(jQuery);
|
products/photocrati_nextgen/modules/lightbox/static/fancybox/jquery.fancybox-1.3.4.pack.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
"use strict";function _typeof(t){"@babel/helpers - typeof";return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t){function e(){c.hide(),j.onerror=j.onload=null,O&&O.abort(),d.empty()}function i(){if(!1===x.onError(v,m,x))return c.hide(),F=!1;x.titleShow=!1,x.width="auto",x.height="auto",d.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>'),P()}function n(){var n,a,o,r,s,h,f=v[m];if(e(),x=t.extend({},t.fn.fancybox.defaults,void 0===t(f).data("fancybox")?x:t(f).data("fancybox")),!1!==(h=x.onStart(v,m,x)))if("object"==_typeof(h)&&(x=t.extend(x,h)),o=x.title||(f.nodeName?t(f).attr("title"):f.title)||"",f.nodeName&&!x.orig&&(x.orig=t(f).children("img:first").length?t(f).children("img:first"):t(f)),""===o&&x.orig&&x.titleFromAlt&&(o=x.orig.attr("alt")),n=x.href||(f.nodeName?t(f).attr("href"):f.href)||null,!/^(?:javascript)/i.test(n)&&"#"!=n||(n=null),x.type?(a=x.type,n=n||x.content):x.content?a="html":n&&(a=n.match(S)?"image":n.match(T)?"swf":t(f).hasClass("iframe")?"iframe":0===n.indexOf("#")?"inline":"ajax"),a)switch("inline"==a&&(f=n.substr(n.indexOf("#")),a=0<t(f).length?"inline":"ajax"),x.type=a,x.href=n,x.title=o,x.autoDimensions&&("html"==x.type||"inline"==x.type||"ajax"==x.type?(x.width="auto",x.height="auto"):x.autoDimensions=!1),x.modal&&(x.overlayShow=!0,x.hideOnOverlayClick=!1,x.hideOnContentClick=!1,x.enableEscapeButton=!1,x.showCloseButton=!1),x.padding=parseInt(x.padding,10),x.margin=parseInt(x.margin,10),d.css("padding",x.padding+x.margin),t(".fancybox-inline-tmp").off("fancybox-cancel").on("fancybox-change",function(){t(this).replaceWith(l.children())}),a){case"html":d.html(x.content),P();break;case"inline":if(!0===t(f).parent().is("#fancybox-content"))return F=!1,0;t('<div class="fancybox-inline-tmp" />').hide().insertBefore(t(f)).on("fancybox-cleanup",function(){t(this).replaceWith(l.children())}).on("fancybox-cancel",function(){t(this).replaceWith(d.children())}),t(f).appendTo(d),P();break;case"image":F=!1,t.fancybox.showActivity(),(j=new Image).onerror=function(){i()},j.onload=function(){F=!0,j.onerror=j.onload=null,B()},j.src=n;break;case"swf":x.scrolling="no",r='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+x.width+'" height="'+x.height+'"><param name="movie" value="'+n+'"></param>',s="",t.each(x.swf,function(t,e){r+='<param name="'+t+'" value="'+e+'"></param>',s+=" "+t+'="'+e+'"'}),r+='<embed src="'+n+'" type="application/x-shockwave-flash" width="'+x.width+'" height="'+x.height+'"'+s+"></embed></object>",d.html(r),P();break;case"ajax":F=!1,t.fancybox.showActivity(),x.ajax.win=x.ajax.success,O=t.ajax(t.extend({},x.ajax,{url:n,data:x.ajax.data||{},error:function(t,e,n){0<t.status&&i()},success:function(t,e,i){if(200==("object"==_typeof(i)?i:O).status){if("function"==typeof x.ajax.win){if(!1===(h=x.ajax.win(n,t,e,i)))return void c.hide();"string"!=typeof h&&"object"!=_typeof(h)||(t=h)}d.html(t),P()}}}));break;case"iframe":_()}else i();else F=!1}function a(){return[t(window).width()-2*C.margin,t(window).height()-2*C.margin,t(document).scrollLeft()+C.margin,t(document).scrollTop()+C.margin]}function o(){c.is(":visible")?(t("div",c).css("top",-40*D+"px"),D=(D+1)%12):clearInterval(b)}var d,c,r,s,h,l,f,p,g,y,b,u,w,m=0,x={},v=[],I=0,C={},k=[],O=null,j=new Image,S=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,T=/[^\.]\.(swf)\s*$/i,D=1,A=0,E="",F=!1,N=t.extend(t("<div/>")[0],{prop:0}),P=function(){var e=x.width,i=x.height,e=-1<e.toString().indexOf("%")?parseInt((t(window).width()-2*x.margin)*parseFloat(e)/100,10)+"px":"auto"==e?"auto":e+"px",i=-1<i.toString().indexOf("%")?parseInt((t(window).height()-2*x.margin)*parseFloat(i)/100,10)+"px":"auto"==i?"auto":i+"px";d.wrapInner('<div style="width:'+e+";height:"+i+";overflow: "+("auto"==x.scrolling?"auto":"yes"==x.scrolling?"scroll":"hidden")+';position:relative;"></div>'),x.width=d.width(),x.height=d.height(),_()},B=function(){x.width=j.width,x.height=j.height,t("<img />").attr({id:"fancybox-img",src:j.src,alt:x.title}).appendTo(d),_()},_=function(){var e,i;return c.hide(),s.is(":visible")&&!1===C.onCleanup(k,I,C)?(t.event.trigger("fancybox-cancel"),void(F=!1)):(F=!0,t(l.add(r)).off(),t(window).off("resize.fb scroll.fb"),t(document).off("keydown.fb"),s.is(":visible")&&"outside"!==C.titlePosition&&s.css("height",s.height()),k=v,I=m,(C=x).overlayShow?(r.css({"background-color":C.overlayColor,opacity:C.overlayOpacity,cursor:C.hideOnOverlayClick?"pointer":"auto",height:t(document).height()}),r.is(":visible")||r.show()):r.hide(),w=K(),L(),s.is(":visible")?(t(f.add(g).add(y)).hide(),e=s.position(),u={top:e.top,left:e.left,width:s.width(),height:s.height()},i=u.width==w.width&&u.height==w.height,void l.fadeTo(C.changeFade,.3,function(){function e(){l.html(d.contents()).fadeTo(C.changeFade,1,M)}t.event.trigger("fancybox-change"),l.empty().removeAttr("filter").css({"border-width":C.padding,width:w.width-2*C.padding,height:x.autoDimensions?"auto":w.height-A-2*C.padding}),i?e():(N.prop=0,t(N).animate({prop:1},{duration:C.changeSpeed,easing:C.easingChange,step:H,complete:e}))})):(s.removeAttr("style"),l.css("border-width",C.padding),"elastic"==C.transitionIn?(u=Q(),l.html(d.contents()),s.show(),C.opacity&&(w.opacity=0),N.prop=0,void t(N).animate({prop:1},{duration:C.speedIn,easing:C.easingIn,step:H,complete:M})):("inside"==C.titlePosition&&0<A&&p.show(),l.css({width:w.width-2*C.padding,height:x.autoDimensions?"auto":w.height-A-2*C.padding}).html(d.contents()),void s.css(w).fadeIn("none"==C.transitionIn?0:C.speedIn,M))))},L=function(){if(E=C.title||"",A=0,p.empty().removeAttr("style").removeClass(),!1!==C.titleShow){var t;if((E="function"==typeof C.titleFormat?C.titleFormat(E,k,I,C):!(!(t=E)||!t.length)&&("float"==C.titlePosition?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+t+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+C.titlePosition+'">'+t+"</div>"))&&""!==E){switch(p.addClass("fancybox-title-"+C.titlePosition).html(E).appendTo("body").show(),C.titlePosition){case"inside":p.css({width:w.width-2*C.padding,marginLeft:C.padding,marginRight:C.padding}),A=p.outerHeight(!0),p.appendTo(h),w.height+=A;break;case"over":p.css({marginLeft:C.padding,width:w.width-2*C.padding,bottom:C.padding}).appendTo(h);break;case"float":p.css("left",-1*parseInt((p.width()-w.width-40)/2,10)).appendTo(s);break;default:p.css({width:w.width-2*C.padding,paddingLeft:C.padding,paddingRight:C.padding}).appendTo(s)}p.hide()}else p.hide()}else p.hide()},M=function(){t.support.opacity||(l.get(0).style.removeProperty("filter"),s.get(0).style.removeProperty("filter")),x.autoDimensions&&l.css("height","auto"),s.css("height","auto"),E&&E.length&&p.show(),C.showCloseButton&&f.show(),function(){if((C.enableEscapeButton||C.enableKeyboardNav)&&t(document).on("keydown.fb",function(e){27==e.keyCode&&C.enableEscapeButton?(e.preventDefault(),t.fancybox.close()):37!=e.keyCode&&39!=e.keyCode||!C.enableKeyboardNav||"INPUT"===e.target.tagName||"TEXTAREA"===e.target.tagName||"SELECT"===e.target.tagName||(e.preventDefault(),t.fancybox[37==e.keyCode?"prev":"next"]())}),!C.showNavArrows)return g.hide(),y.hide();(C.cyclic&&1<k.length||0!==I)&&g.show(),(C.cyclic&&1<k.length||I!=k.length-1)&&y.show()}(),C.hideOnContentClick&&l.on("click",t.fancybox.close),C.hideOnOverlayClick&&r.on("click",t.fancybox.close),t(window).on("resize.fb",t.fancybox.resize),C.centerOnScroll&&t(window).on("scroll.fb",t.fancybox.center),"iframe"==C.type&&t('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" scrolling="'+x.scrolling+'" src="'+C.href+'"></iframe>').appendTo(l),s.show(),F=!1,t.fancybox.center(),C.onComplete(k,I,C),z()},z=function(){var t;k.length-1>I&&void 0!==(t=k[I+1].href)&&t.match(S)&&((new Image).src=t),0<I&&void 0!==(t=k[I-1].href)&&t.match(S)&&((new Image).src=t)},H=function(t){var e={width:parseInt(u.width+(w.width-u.width)*t,10),height:parseInt(u.height+(w.height-u.height)*t,10),top:parseInt(u.top+(w.top-u.top)*t,10),left:parseInt(u.left+(w.left-u.left)*t,10)};void 0!==w.opacity&&(e.opacity=t<.5?.5:t),s.css(e),l.css({width:e.width-2*C.padding,height:e.height-A*t-2*C.padding})},K=function(){var t,e=a(),i={},n=C.autoScale,o=2*C.padding;return-1<C.width.toString().indexOf("%")?i.width=parseInt(e[0]*parseFloat(C.width)/100,10):i.width=C.width+o,-1<C.height.toString().indexOf("%")?i.height=parseInt(e[1]*parseFloat(C.height)/100,10):i.height=C.height+o,n&&(i.width>e[0]||i.height>e[1])&&("image"==x.type||"swf"==x.type?(t=C.width/C.height,i.width>e[0]&&(i.width=e[0],i.height=parseInt((i.width-o)/t+o,10)),i.height>e[1]&&(i.height=e[1],i.width=parseInt((i.height-o)*t+o,10))):(i.width=Math.min(i.width,e[0]),i.height=Math.min(i.height,e[1]))),i.top=parseInt(Math.max(e[3]-20,e[3]+.5*(e[1]-i.height-40)),10),i.left=parseInt(Math.max(e[2]-20,e[2]+.5*(e[0]-i.width-40)),10),i},Q=function(){var e,i,n,o=!!x.orig&&t(x.orig);return o&&o.length?((n=(i=o).offset()).top+=parseInt(i.css("paddingTop"),10)||0,n.left+=parseInt(i.css("paddingLeft"),10)||0,n.top+=parseInt(i.css("border-top-width"),10)||0,n.left+=parseInt(i.css("border-left-width"),10)||0,n.width=i.width(),n.height=i.height(),{width:n.width+2*C.padding,height:n.height+2*C.padding,top:n.top-C.padding-20,left:n.left-C.padding-20}):(e=a(),{width:2*C.padding,height:2*C.padding,top:parseInt(e[3]+.5*e[1],10),left:parseInt(e[2]+.5*e[0],10)})};t.fn.fancybox=function(e){return t(this).length&&t(this).data("fancybox",t.extend({},e,t.metadata?t(this).metadata():{})).off("click.fb").on("click.fb",function(e){var i;e.preventDefault(),F||(F=!0,t(this).trigger("blur"),v=[],m=0,(i=t(this).attr("rel")||"")&&""!=i&&"nofollow"!==i?(v=t("a[rel="+i+"], area[rel="+i+"]"),m=v.index(this)):v.push(this),n())}),this},t.fancybox=function(e){var i;if(!F){if(F=!0,i=void 0!==arguments[1]?arguments[1]:{},v=[],m=parseInt(i.index,10)||0,Array.isArray(e)){for(var a=0,o=e.length;a<o;a++)"object"==_typeof(e[a])?t(e[a]).data("fancybox",t.extend({},i,e[a])):e[a]=t({}).data("fancybox",t.extend({content:e[a]},i));v=jQuery.merge(v,e)}else"object"==_typeof(e)?t(e).data("fancybox",t.extend({},i,e)):e=t({}).data("fancybox",t.extend({content:e},i)),v.push(e);(m>v.length||m<0)&&(m=0),n()}},t.fancybox.showActivity=function(){clearInterval(b),c.show(),b=setInterval(o,66)},t.fancybox.hideActivity=function(){c.hide()},t.fancybox.next=function(){return t.fancybox.pos(I+1)},t.fancybox.prev=function(){return t.fancybox.pos(I-1)},t.fancybox.pos=function(t){F||(t=parseInt(t),v=k,-1<t&&t<k.length?(m=t,n()):C.cyclic&&1<k.length&&(m=t>=k.length?0:k.length-1,n()))},t.fancybox.cancel=function(){F||(F=!0,t.event.trigger("fancybox-cancel"),e(),x.onCancel(v,m,x),F=!1)},t.fancybox.close=function(){function i(){r.fadeOut("fast"),p.empty().hide(),s.hide(),t.event.trigger("fancybox-cleanup"),l.empty(),C.onClosed(k,I,C),k=x=[],I=m=0,C=x={},F=!1}var n;F||s.is(":hidden")||(F=!0,C&&!1===C.onCleanup(k,I,C)?F=!1:(e(),t(f.add(g).add(y)).hide(),t(l.add(r)).off(),t(window).off("resize.fb scroll.fb"),t(document).off("keydown.fb"),l.find("iframe").attr("src","about:blank"),"inside"!==C.titlePosition&&p.empty(),s.stop(),"elastic"==C.transitionOut?(u=Q(),n=s.position(),w={top:n.top,left:n.left,width:s.width(),height:s.height()},C.opacity&&(w.opacity=1),p.empty().hide(),N.prop=1,t(N).animate({prop:0},{duration:C.speedOut,easing:C.easingOut,step:H,complete:i})):s.fadeOut("none"==C.transitionOut?0:C.speedOut,i)))},t.fancybox.resize=function(){r.is(":visible")&&r.css("height",t(document).height()),t.fancybox.center(!0)},t.fancybox.center=function(){var t,e;F||(e=!0===arguments[0]?1:0,t=a(),!e&&(s.width()>t[0]||s.height()>t[1])||s.stop().animate({top:parseInt(Math.max(t[3]-20,t[3]+.5*(t[1]-l.height()-40)-C.padding)),left:parseInt(Math.max(t[2]-20,t[2]+.5*(t[0]-l.width()-40)-C.padding))},"number"==typeof arguments[0]?arguments[0]:200))},t.fancybox.init=function(){t("#fancybox-wrap").length||(t("body").append(d=t('<div id="fancybox-tmp"></div>'),c=t('<div id="fancybox-loading"><div></div></div>'),r=t('<div id="fancybox-overlay"></div>'),s=t('<div id="fancybox-wrap"></div>')),(h=t('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(s)).append(l=t('<div id="fancybox-content"></div>'),f=t('<a id="fancybox-close"></a>'),p=t('<div id="fancybox-title"></div>'),g=t('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),y=t('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')),f.on("click",t.fancybox.close),c.on("click",t.fancybox.cancel),g.on("click",function(e){e.preventDefault(),t.fancybox.prev()}),y.on("click",function(e){e.preventDefault(),t.fancybox.next()}),t.fn.mousewheel&&s.on("mousewheel.fb",function(e,i){F?e.preventDefault():0!=t(e.target).get(0).clientHeight&&t(e.target).get(0).scrollHeight!==t(e.target).get(0).clientHeight||(e.preventDefault(),t.fancybox[0<i?"prev":"next"]())}),t.support.opacity||s.addClass("fancybox-ie"))},t.fn.fancybox.defaults={padding:10,margin:40,opacity:!1,modal:!1,cyclic:!1,scrolling:"auto",width:560,height:340,autoScale:!0,autoDimensions:!0,centerOnScroll:!1,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:!0,hideOnContentClick:!1,overlayShow:!0,overlayOpacity:.7,overlayColor:"#777",titleShow:!0,titlePosition:"float",titleFormat:null,titleFromAlt:!1,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:!0,showNavArrows:!0,enableEscapeButton:!0,enableKeyboardNav:!0,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}},jQuery(function(t){t.fancybox.init()})}(jQuery);
|
1 |
+
"use strict";function _typeof(t){"@babel/helpers - typeof";return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t){function e(){c.hide(),j.onerror=j.onload=null,O&&O.abort(),d.empty()}function i(){if(!1===x.onError(v,m,x))return c.hide(),F=!1;x.titleShow=!1,x.width="auto",x.height="auto",d.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>'),P()}function n(){var n,a,o,r,s,h,f=v[m];if(e(),x=t.extend({},t.fn.fancybox.defaults,void 0===t(f).data("fancybox")?x:t(f).data("fancybox")),!1!==(h=x.onStart(v,m,x)))if("object"==_typeof(h)&&(x=t.extend(x,h)),o=x.title||(f.nodeName?t(f).attr("title"):f.title)||"",f.nodeName&&!x.orig&&(x.orig=t(f).children("img:first").length?t(f).children("img:first"):t(f)),""===o&&x.orig&&x.titleFromAlt&&(o=x.orig.attr("alt")),n=x.href||(f.nodeName?t(f).attr("href"):f.href)||null,!/^(?:javascript)/i.test(n)&&"#"!=n||(n=null),x.type?(a=x.type,n=n||x.content):x.content?a="html":n&&(a=n.match(S)?"image":n.match(T)?"swf":t(f).hasClass("iframe")?"iframe":0===n.indexOf("#")?"inline":"ajax"),a)switch("inline"==a&&(f=n.substr(n.indexOf("#")),a=0<t(f).length?"inline":"ajax"),x.type=a,x.href=n,x.title=o,x.autoDimensions&&("html"==x.type||"inline"==x.type||"ajax"==x.type?(x.width="auto",x.height="auto"):x.autoDimensions=!1),x.modal&&(x.overlayShow=!0,x.hideOnOverlayClick=!1,x.hideOnContentClick=!1,x.enableEscapeButton=!1,x.showCloseButton=!1),x.padding=parseInt(x.padding,10),x.margin=parseInt(x.margin,10),d.css("padding",x.padding+x.margin),t(".fancybox-inline-tmp").off("fancybox-cancel").on("fancybox-change",function(){t(this).replaceWith(l.children())}),a){case"html":d.html(x.content),P();break;case"inline":if(!0===t(f).parent().is("#fancybox-content"))return F=!1,0;t('<div class="fancybox-inline-tmp" />').hide().insertBefore(t(f)).on("fancybox-cleanup",function(){t(this).replaceWith(l.children())}).on("fancybox-cancel",function(){t(this).replaceWith(d.children())}),t(f).appendTo(d),P();break;case"image":F=!1,t.fancybox.showActivity(),(j=new Image).onerror=function(){i()},j.onload=function(){F=!0,j.onerror=j.onload=null,B()},j.src=n;break;case"swf":x.scrolling="no",r='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+x.width+'" height="'+x.height+'"><param name="movie" value="'+n+'"></param>',s="",t.each(x.swf,function(t,e){r+='<param name="'+t+'" value="'+e+'"></param>',s+=" "+t+'="'+e+'"'}),r+='<embed src="'+n+'" type="application/x-shockwave-flash" width="'+x.width+'" height="'+x.height+'"'+s+"></embed></object>",d.html(r),P();break;case"ajax":F=!1,t.fancybox.showActivity(),x.ajax.win=x.ajax.success,O=t.ajax(t.extend({},x.ajax,{url:n,data:x.ajax.data||{},error:function(t,e,n){0<t.status&&i()},success:function(t,e,i){if(200==("object"==_typeof(i)?i:O).status){if("function"==typeof x.ajax.win){if(!1===(h=x.ajax.win(n,t,e,i)))return void c.hide();"string"!=typeof h&&"object"!=_typeof(h)||(t=h)}d.html(t),P()}}}));break;case"iframe":_()}else i();else F=!1}function a(){return[t(window).width()-2*C.margin,t(window).height()-2*C.margin,t(document).scrollLeft()+C.margin,t(document).scrollTop()+C.margin]}function o(){c.is(":visible")?(t("div",c).css("top",-40*D+"px"),D=(D+1)%12):clearInterval(b)}var d,c,r,s,h,l,f,p,g,y,b,u,w,m=0,x={},v=[],I=0,C={},k=[],O=null,j=new Image,S=/\.(jpg|gif|png|bmp|jpeg|webp)(.*)?$/i,T=/[^\.]\.(swf)\s*$/i,D=1,A=0,E="",F=!1,N=t.extend(t("<div/>")[0],{prop:0}),P=function(){var e=x.width,i=x.height,e=-1<e.toString().indexOf("%")?parseInt((t(window).width()-2*x.margin)*parseFloat(e)/100,10)+"px":"auto"==e?"auto":e+"px",i=-1<i.toString().indexOf("%")?parseInt((t(window).height()-2*x.margin)*parseFloat(i)/100,10)+"px":"auto"==i?"auto":i+"px";d.wrapInner('<div style="width:'+e+";height:"+i+";overflow: "+("auto"==x.scrolling?"auto":"yes"==x.scrolling?"scroll":"hidden")+';position:relative;"></div>'),x.width=d.width(),x.height=d.height(),_()},B=function(){x.width=j.width,x.height=j.height,t("<img />").attr({id:"fancybox-img",src:j.src,alt:x.title}).appendTo(d),_()},_=function(){var e,i;return c.hide(),s.is(":visible")&&!1===C.onCleanup(k,I,C)?(t.event.trigger("fancybox-cancel"),void(F=!1)):(F=!0,t(l.add(r)).off(),t(window).off("resize.fb scroll.fb"),t(document).off("keydown.fb"),s.is(":visible")&&"outside"!==C.titlePosition&&s.css("height",s.height()),k=v,I=m,(C=x).overlayShow?(r.css({"background-color":C.overlayColor,opacity:C.overlayOpacity,cursor:C.hideOnOverlayClick?"pointer":"auto",height:t(document).height()}),r.is(":visible")||r.show()):r.hide(),w=K(),L(),s.is(":visible")?(t(f.add(g).add(y)).hide(),e=s.position(),u={top:e.top,left:e.left,width:s.width(),height:s.height()},i=u.width==w.width&&u.height==w.height,void l.fadeTo(C.changeFade,.3,function(){function e(){l.html(d.contents()).fadeTo(C.changeFade,1,M)}t.event.trigger("fancybox-change"),l.empty().removeAttr("filter").css({"border-width":C.padding,width:w.width-2*C.padding,height:x.autoDimensions?"auto":w.height-A-2*C.padding}),i?e():(N.prop=0,t(N).animate({prop:1},{duration:C.changeSpeed,easing:C.easingChange,step:H,complete:e}))})):(s.removeAttr("style"),l.css("border-width",C.padding),"elastic"==C.transitionIn?(u=Q(),l.html(d.contents()),s.show(),C.opacity&&(w.opacity=0),N.prop=0,void t(N).animate({prop:1},{duration:C.speedIn,easing:C.easingIn,step:H,complete:M})):("inside"==C.titlePosition&&0<A&&p.show(),l.css({width:w.width-2*C.padding,height:x.autoDimensions?"auto":w.height-A-2*C.padding}).html(d.contents()),void s.css(w).fadeIn("none"==C.transitionIn?0:C.speedIn,M))))},L=function(){if(E=C.title||"",A=0,p.empty().removeAttr("style").removeClass(),!1!==C.titleShow){var t;if((E="function"==typeof C.titleFormat?C.titleFormat(E,k,I,C):!(!(t=E)||!t.length)&&("float"==C.titlePosition?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+t+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+C.titlePosition+'">'+t+"</div>"))&&""!==E){switch(p.addClass("fancybox-title-"+C.titlePosition).html(E).appendTo("body").show(),C.titlePosition){case"inside":p.css({width:w.width-2*C.padding,marginLeft:C.padding,marginRight:C.padding}),A=p.outerHeight(!0),p.appendTo(h),w.height+=A;break;case"over":p.css({marginLeft:C.padding,width:w.width-2*C.padding,bottom:C.padding}).appendTo(h);break;case"float":p.css("left",-1*parseInt((p.width()-w.width-40)/2,10)).appendTo(s);break;default:p.css({width:w.width-2*C.padding,paddingLeft:C.padding,paddingRight:C.padding}).appendTo(s)}p.hide()}else p.hide()}else p.hide()},M=function(){t.support.opacity||(l.get(0).style.removeProperty("filter"),s.get(0).style.removeProperty("filter")),x.autoDimensions&&l.css("height","auto"),s.css("height","auto"),E&&E.length&&p.show(),C.showCloseButton&&f.show(),function(){if((C.enableEscapeButton||C.enableKeyboardNav)&&t(document).on("keydown.fb",function(e){27==e.keyCode&&C.enableEscapeButton?(e.preventDefault(),t.fancybox.close()):37!=e.keyCode&&39!=e.keyCode||!C.enableKeyboardNav||"INPUT"===e.target.tagName||"TEXTAREA"===e.target.tagName||"SELECT"===e.target.tagName||(e.preventDefault(),t.fancybox[37==e.keyCode?"prev":"next"]())}),!C.showNavArrows)return g.hide(),y.hide();(C.cyclic&&1<k.length||0!==I)&&g.show(),(C.cyclic&&1<k.length||I!=k.length-1)&&y.show()}(),C.hideOnContentClick&&l.on("click",t.fancybox.close),C.hideOnOverlayClick&&r.on("click",t.fancybox.close),t(window).on("resize.fb",t.fancybox.resize),C.centerOnScroll&&t(window).on("scroll.fb",t.fancybox.center),"iframe"==C.type&&t('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" scrolling="'+x.scrolling+'" src="'+C.href+'"></iframe>').appendTo(l),s.show(),F=!1,t.fancybox.center(),C.onComplete(k,I,C),z()},z=function(){var t;k.length-1>I&&void 0!==(t=k[I+1].href)&&t.match(S)&&((new Image).src=t),0<I&&void 0!==(t=k[I-1].href)&&t.match(S)&&((new Image).src=t)},H=function(t){var e={width:parseInt(u.width+(w.width-u.width)*t,10),height:parseInt(u.height+(w.height-u.height)*t,10),top:parseInt(u.top+(w.top-u.top)*t,10),left:parseInt(u.left+(w.left-u.left)*t,10)};void 0!==w.opacity&&(e.opacity=t<.5?.5:t),s.css(e),l.css({width:e.width-2*C.padding,height:e.height-A*t-2*C.padding})},K=function(){var t,e=a(),i={},n=C.autoScale,o=2*C.padding;return-1<C.width.toString().indexOf("%")?i.width=parseInt(e[0]*parseFloat(C.width)/100,10):i.width=C.width+o,-1<C.height.toString().indexOf("%")?i.height=parseInt(e[1]*parseFloat(C.height)/100,10):i.height=C.height+o,n&&(i.width>e[0]||i.height>e[1])&&("image"==x.type||"swf"==x.type?(t=C.width/C.height,i.width>e[0]&&(i.width=e[0],i.height=parseInt((i.width-o)/t+o,10)),i.height>e[1]&&(i.height=e[1],i.width=parseInt((i.height-o)*t+o,10))):(i.width=Math.min(i.width,e[0]),i.height=Math.min(i.height,e[1]))),i.top=parseInt(Math.max(e[3]-20,e[3]+.5*(e[1]-i.height-40)),10),i.left=parseInt(Math.max(e[2]-20,e[2]+.5*(e[0]-i.width-40)),10),i},Q=function(){var e,i,n,o=!!x.orig&&t(x.orig);return o&&o.length?((n=(i=o).offset()).top+=parseInt(i.css("paddingTop"),10)||0,n.left+=parseInt(i.css("paddingLeft"),10)||0,n.top+=parseInt(i.css("border-top-width"),10)||0,n.left+=parseInt(i.css("border-left-width"),10)||0,n.width=i.width(),n.height=i.height(),{width:n.width+2*C.padding,height:n.height+2*C.padding,top:n.top-C.padding-20,left:n.left-C.padding-20}):(e=a(),{width:2*C.padding,height:2*C.padding,top:parseInt(e[3]+.5*e[1],10),left:parseInt(e[2]+.5*e[0],10)})};t.fn.fancybox=function(e){return t(this).length&&t(this).data("fancybox",t.extend({},e,t.metadata?t(this).metadata():{})).off("click.fb").on("click.fb",function(e){var i;e.preventDefault(),F||(F=!0,t(this).trigger("blur"),v=[],m=0,(i=t(this).attr("rel")||"")&&""!=i&&"nofollow"!==i?(v=t("a[rel="+i+"], area[rel="+i+"]"),m=v.index(this)):v.push(this),n())}),this},t.fancybox=function(e){var i;if(!F){if(F=!0,i=void 0!==arguments[1]?arguments[1]:{},v=[],m=parseInt(i.index,10)||0,Array.isArray(e)){for(var a=0,o=e.length;a<o;a++)"object"==_typeof(e[a])?t(e[a]).data("fancybox",t.extend({},i,e[a])):e[a]=t({}).data("fancybox",t.extend({content:e[a]},i));v=jQuery.merge(v,e)}else"object"==_typeof(e)?t(e).data("fancybox",t.extend({},i,e)):e=t({}).data("fancybox",t.extend({content:e},i)),v.push(e);(m>v.length||m<0)&&(m=0),n()}},t.fancybox.showActivity=function(){clearInterval(b),c.show(),b=setInterval(o,66)},t.fancybox.hideActivity=function(){c.hide()},t.fancybox.next=function(){return t.fancybox.pos(I+1)},t.fancybox.prev=function(){return t.fancybox.pos(I-1)},t.fancybox.pos=function(t){F||(t=parseInt(t),v=k,-1<t&&t<k.length?(m=t,n()):C.cyclic&&1<k.length&&(m=t>=k.length?0:k.length-1,n()))},t.fancybox.cancel=function(){F||(F=!0,t.event.trigger("fancybox-cancel"),e(),x.onCancel(v,m,x),F=!1)},t.fancybox.close=function(){function i(){r.fadeOut("fast"),p.empty().hide(),s.hide(),t.event.trigger("fancybox-cleanup"),l.empty(),C.onClosed(k,I,C),k=x=[],I=m=0,C=x={},F=!1}var n;F||s.is(":hidden")||(F=!0,C&&!1===C.onCleanup(k,I,C)?F=!1:(e(),t(f.add(g).add(y)).hide(),t(l.add(r)).off(),t(window).off("resize.fb scroll.fb"),t(document).off("keydown.fb"),l.find("iframe").attr("src","about:blank"),"inside"!==C.titlePosition&&p.empty(),s.stop(),"elastic"==C.transitionOut?(u=Q(),n=s.position(),w={top:n.top,left:n.left,width:s.width(),height:s.height()},C.opacity&&(w.opacity=1),p.empty().hide(),N.prop=1,t(N).animate({prop:0},{duration:C.speedOut,easing:C.easingOut,step:H,complete:i})):s.fadeOut("none"==C.transitionOut?0:C.speedOut,i)))},t.fancybox.resize=function(){r.is(":visible")&&r.css("height",t(document).height()),t.fancybox.center(!0)},t.fancybox.center=function(){var t,e;F||(e=!0===arguments[0]?1:0,t=a(),!e&&(s.width()>t[0]||s.height()>t[1])||s.stop().animate({top:parseInt(Math.max(t[3]-20,t[3]+.5*(t[1]-l.height()-40)-C.padding)),left:parseInt(Math.max(t[2]-20,t[2]+.5*(t[0]-l.width()-40)-C.padding))},"number"==typeof arguments[0]?arguments[0]:200))},t.fancybox.init=function(){t("#fancybox-wrap").length||(t("body").append(d=t('<div id="fancybox-tmp"></div>'),c=t('<div id="fancybox-loading"><div></div></div>'),r=t('<div id="fancybox-overlay"></div>'),s=t('<div id="fancybox-wrap"></div>')),(h=t('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(s)).append(l=t('<div id="fancybox-content"></div>'),f=t('<a id="fancybox-close"></a>'),p=t('<div id="fancybox-title"></div>'),g=t('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),y=t('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')),f.on("click",t.fancybox.close),c.on("click",t.fancybox.cancel),g.on("click",function(e){e.preventDefault(),t.fancybox.prev()}),y.on("click",function(e){e.preventDefault(),t.fancybox.next()}),t.fn.mousewheel&&s.on("mousewheel.fb",function(e,i){F?e.preventDefault():0!=t(e.target).get(0).clientHeight&&t(e.target).get(0).scrollHeight!==t(e.target).get(0).clientHeight||(e.preventDefault(),t.fancybox[0<i?"prev":"next"]())}),t.support.opacity||s.addClass("fancybox-ie"))},t.fn.fancybox.defaults={padding:10,margin:40,opacity:!1,modal:!1,cyclic:!1,scrolling:"auto",width:560,height:340,autoScale:!0,autoDimensions:!0,centerOnScroll:!1,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:!0,hideOnContentClick:!1,overlayShow:!0,overlayOpacity:.7,overlayColor:"#777",titleShow:!0,titlePosition:"float",titleFormat:null,titleFromAlt:!1,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:!0,showNavArrows:!0,enableEscapeButton:!0,enableKeyboardNav:!0,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}},jQuery(function(t){t.fancybox.init()})}(jQuery);
|
products/photocrati_nextgen/modules/lightbox/static/lightbox_context.js
CHANGED
@@ -13,7 +13,7 @@ function nextgen_lightbox_filter_selector($, selector)
|
|
13 |
var ext = href.substring(href.length - 3);
|
14 |
var ext2 = href.substring(href.length - 4);
|
15 |
|
16 |
-
return (ext == 'jpg' || ext == 'gif' || ext == 'png' || ext2 == 'tiff' || ext2 == 'jpeg');
|
17 |
}));
|
18 |
}
|
19 |
else if (context == 'nextgen_and_wp_images') {
|
13 |
var ext = href.substring(href.length - 3);
|
14 |
var ext2 = href.substring(href.length - 4);
|
15 |
|
16 |
+
return (ext == 'jpg' || ext == 'gif' || ext == 'png' || ext2 == 'tiff' || ext2 == 'jpeg' || ext2 == 'webp');
|
17 |
}));
|
18 |
}
|
19 |
else if (context == 'nextgen_and_wp_images') {
|
products/photocrati_nextgen/modules/lightbox/static/lightbox_context.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
"use strict";function nextgen_lightbox_filter_selector(t
|
1 |
+
"use strict";function nextgen_lightbox_filter_selector(e,t){if(nextgen_lightbox_settings&&nextgen_lightbox_settings.context){var n=nextgen_lightbox_settings.context;"all_images"==n?t=t.add(e("a > img").parent()):"all_images_direct"==n?t=t.add(e("a[href] > img").parent().filter(function(){var t=e(this).attr("href").toLowerCase(),n=t.substring(t.length-3),g=t.substring(t.length-4);return"jpg"==n||"gif"==n||"png"==n||"tiff"==g||"jpeg"==g||"webp"==g})):"nextgen_and_wp_images"==n&&(t=t.add(e('a > img[class*="wp-image-"]').parent())),t=t.not(".gallery_link"),t=t.not(".use_imagebrowser_effect")}return t}
|
products/photocrati_nextgen/modules/lightbox/static/shutter/shutter.js
CHANGED
@@ -34,7 +34,7 @@ shutterReloaded = {
|
|
34 |
for ( i = 0; i < document.links.length; i++ ) {
|
35 |
L = document.links[i];
|
36 |
ext = ( L.href.indexOf('?') == -1 ) ? L.href.slice(-4).toLowerCase() : L.href.substring( 0, L.href.indexOf('?') ).slice(-4).toLowerCase();
|
37 |
-
if ( ext != '.jpg' && ext != '.png' && ext != '.gif' && ext != 'jpeg' ) continue;
|
38 |
if ( a == 'sh' && L.className.toLowerCase().indexOf('shutter') == -1 ) continue;
|
39 |
if ( a == 'lb' && L.rel.toLowerCase().indexOf('lightbox') == -1 ) continue;
|
40 |
|
34 |
for ( i = 0; i < document.links.length; i++ ) {
|
35 |
L = document.links[i];
|
36 |
ext = ( L.href.indexOf('?') == -1 ) ? L.href.slice(-4).toLowerCase() : L.href.substring( 0, L.href.indexOf('?') ).slice(-4).toLowerCase();
|
37 |
+
if ( ext != '.jpg' && ext != '.png' && ext != '.gif' && ext != 'jpeg' && ext != 'webp') continue;
|
38 |
if ( a == 'sh' && L.className.toLowerCase().indexOf('shutter') == -1 ) continue;
|
39 |
if ( a == 'lb' && L.rel.toLowerCase().indexOf('lightbox') == -1 ) continue;
|
40 |
|
products/photocrati_nextgen/modules/lightbox/static/shutter/shutter.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
"use strict";function _typeof(e){"@babel/helpers - typeof";return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}shutterReloaded={I:function(e){return document.getElementById(e)},settings:function(){var e=this,t=shutterSettings;e.imageCount=t.imageCount||0,e.msgLoading=t.msgLoading||"L O A D I N G",e.msgClose=t.msgClose||"Click to Close"},init:function(e){var t,i,n,o,s,d,l,r=this;for(shutterLinks={},shutterSets={},"object"!=("undefined"==typeof shutterSettings?"undefined":_typeof(shutterSettings))&&(shutterSettings={}),r.mobileOS="undefined"!=typeof orientation,o=0;o<document.links.length;o++)t=document.links[o],".jpg"!=(n=-1==t.href.indexOf("?")?t.href.slice(-4).toLowerCase():t.href.substring(0,t.href.indexOf("?")).slice(-4).toLowerCase())&&".png"!=n&&".gif"!=n&&"jpeg"!=n||"sh"==e&&-1==t.className.toLowerCase().indexOf("shutter")||"lb"==e&&-1==t.rel.toLowerCase().indexOf("lightbox")||(-1!=t.className.toLowerCase().indexOf("shutterset")?s=t.className.replace(/\s/g,"_"):-1!=t.rel.toLowerCase().indexOf("lightbox[")?s=t.rel.replace(/\s/g,"_"):(s=0,d=-1),s&&(shutterSets[s]||(shutterSets[s]=[]),d=shutterSets[s].push(o)),l=t.href.slice(t.href.lastIndexOf("/")+1),i=t.title&&t.title!=l?t.title:"",shutterLinks[o]={link:t.href,num:d,set:s,title:i},t.onclick=new Function('shutterReloaded.make("'+o+'");return false;'));r.settings()},make:function(e,t){var i,n,o,s,d,l,r,h,u=this,a="",m="";if(u.Top||(void 0!==window.pageYOffset?u.Top=window.pageYOffset:u.Top=document.documentElement.scrollTop>0?document.documentElement.scrollTop:document.body.scrollTop),window.parent){var c=window.parent;if(void 0!==c.ngg_get_measures_for_frame){var g=c.ngg_get_measures_for_frame(window.frameElement);u.Top=u.Top+g.scrollTop}}void 0===u.pgHeight&&(u.pgHeight=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)),u.FS=t?t>0?1:0:shutterSettings.FS||0,u.resizing&&(u.resizing=null),1==u.mobileOS?window.onorientationchange=new Function('shutterReloaded.resize("'+e+'");'):window.onresize=new Function('shutterReloaded.resize("'+e+'");'),document.documentElement.style.overflowX="hidden",u.VP||(u._viewPort(),u.VP=!0),(l=u.I("shShutter"))||(l=document.createElement("div"),l.setAttribute("id","shShutter"),document.getElementsByTagName("body")[0].appendChild(l),u.hideTags()),(d=u.I("shDisplay"))||(d=document.createElement("div"),d.setAttribute("id","shDisplay"),d.style.top=u.Top+"px",document.getElementsByTagName("body")[0].appendChild(d)),l.style.height=u.pgHeight+"px";var w=u.textBtns?" | ":"";shutterLinks[e].num>1?(i=shutterSets[shutterLinks[e].set][shutterLinks[e].num-2],a='<a href="#" id="prevpic" onclick="shutterReloaded.make('+i+');return false"><<</a>'+w,o=new Image,o.src=shutterLinks[i].link):a="",-1!=shutterLinks[e].num&&shutterLinks[e].num<shutterSets[shutterLinks[e].set].length?(n=shutterSets[shutterLinks[e].set][shutterLinks[e].num],m='<a href="#" id="nextpic" onclick="shutterReloaded.make('+n+');return false">>></a>'+w,s=new Image,s.src=shutterLinks[n].link):m="",r=shutterLinks[e].num>0&&u.imageCount?'<div id="shCount"> ( '+shutterLinks[e].num+" / "+shutterSets[shutterLinks[e].set].length+" ) </div>":"",h='<div id="shTitle"><div id="shPrev">'+a+'</div><div id="shNext">'+m+'</div><div id="shName">'+shutterLinks[e].title+"</div>"+r+"</div>",d.innerHTML='<div id="shWrap"><img src="'+shutterLinks[e].link+'" id="shTopImg" title="'+u.msgClose+'" onload="shutterReloaded.showImg();" onclick="shutterReloaded.hideShutter();" />'+h+"</div>",document.onkeydown=function(e){shutterReloaded.handleArrowKeys(e)},document.getElementById("shTopImg").src=shutterLinks[e].link,window.setTimeout(function(){shutterReloaded.loading()},1e3)},loading:function(){var e,t,i,n=this;(i=n.I("shWrap"))&&"visible"==i.style.visibility||(e=n.I("shShutter"))&&(n.I("shWaitBar")||(t=document.createElement("div"),t.setAttribute("id","shWaitBar"),t.style.top=n.Top+"px",t.style.marginTop=n.pgHeight/2+"px",t.innerHTML=n.msgLoading,e.appendChild(t)))},hideShutter:function(){var e,t,i=this;(e=i.I("shDisplay"))&&e.parentNode.removeChild(e),(t=i.I("shShutter"))&&t.parentNode.removeChild(t),i.hideTags(!0),window.scrollTo(0,i.Top),window.onresize=i.FS=i.Top=i.VP=null,document.documentElement.style.overflowX="",document.onkeydown=null},resize:function(e){var t=this;if(!t.resizing&&t.I("shShutter")){var i=t.I("shWrap");i&&(i.style.visibility="hidden"),window.setTimeout(function(){shutterReloaded.resizing=null},500),window.setTimeout(new Function('shutterReloaded.VP = null;shutterReloaded.make("'+e+'");'),100),t.resizing=!0}},_viewPort:function(){var e=this,t=window.innerHeight?window.innerHeight:0,i=document.body.clientHeight?document.body.clientHeight:0,n=document.documentElement?document.documentElement.clientHeight:0;t>0?(e.wHeight=t-i>1&&t-i<30?i:t,e.wHeight=e.wHeight-n>1&&e.wHeight-n<30?n:e.wHeight):e.wHeight=n>0?n:i,document.getElementsByTagName("body")[0].className.match(/admin-bar/)&&null!==document.getElementById("wpadminbar")&&(e.wHeight=e.wHeight-document.getElementById("wpadminbar").offsetHeight);var o=document.documentElement?document.documentElement.clientWidth:0,s=window.innerWidth?window.innerWidth:document.body.clientWidth;e.wWidth=o>1?o:s},showImg:function(){var e,t,i,n,o,s,d=this,l=d.I("shShutter"),r=d.I("shDisplay"),h=d.I("shTopImg"),u=d.I("shTitle");d.I("shNavBar");if(l&&(!(e=d.I("shWrap"))||"visible"!=e.style.visibility)){if((t=d.I("shWaitBar"))&&t.parentNode.removeChild(t),l.style.width=r.style.width="",u.style.width=h.width-4+"px",i=d.wHeight-50,window.parent){var a=window.parent;if(void 0!==a.ngg_get_measures_for_frame){i=a.ngg_get_measures_for_frame(window.frameElement).scrollHeight-50}}d.FS?(h.width>d.wWidth-10&&(l.style.width=r.style.width=h.width+10+"px"),document.documentElement.style.overflowX=""):(window.scrollTo(0,d.Top),h.height>i&&(h.width=h.width*(i/h.height),h.height=i,1),h.width>d.wWidth-16&&(h.height=h.height*((d.wWidth-16)/h.width),h.width=d.wWidth-16,1),u.style.width=h.width-4+"px"),n=d.Top+h.height+10,n>d.pgHeight&&(l.style.height=n+"px"),window.scrollTo(0,d.Top),o=.45*(i-h.height),s=o>3?Math.floor(o):3,document.getElementsByTagName("body")[0].className.match(/admin-bar/)&&null!==document.getElementById("wpadminbar")&&(s+=document.getElementById("wpadminbar").offsetHeight),r.style.top=d.Top+s+"px",e.style.visibility="visible"}},hideTags:function(e){var t=document.getElementsByTagName("select"),n=document.getElementsByTagName("object"),o=document.getElementsByTagName("embed"),s=document.getElementsByTagName("iframe"),d=e?"visible":"hidden";for(i=0;i<t.length;i++)t[i].style.visibility=d;for(i=0;i<n.length;i++)n[i].style.visibility=d;for(i=0;i<o.length;i++)o[i].style.visibility=d;for(i=0;i<s.length;i++)s[i].style.visibility=d},handleArrowKeys:function(e){var t=0;if(!e)var e=window.event;e.keyCode?t=e.keyCode:e.which&&(t=e.which);var i=document.getElementById("prevpic"),n=document.getElementById("nextpic"),o=document.getElementById("shTopImg");switch(t){case 39:n&&n.onclick();break;case 37:i&&i.onclick();break;case 27:o&&o.onclick()}}},shutterOnload=function(){shutterReloaded.init("sh")},"function"==typeof shutterOnload&&("undefined"!=typeof jQuery?function(e){e(function(){shutterOnload()})}(jQuery):"function"!=typeof window.onload?window.onload=shutterOnload:(oldonld=window.onload,window.onload=function(){oldonld&&oldonld(),shutterOnload()}));
|
1 |
+
"use strict";function _typeof(e){"@babel/helpers - typeof";return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}shutterReloaded={I:function(e){return document.getElementById(e)},settings:function(){var e=this,t=shutterSettings;e.imageCount=t.imageCount||0,e.msgLoading=t.msgLoading||"L O A D I N G",e.msgClose=t.msgClose||"Click to Close"},init:function(e){var t,i,n,o,s,d,l,r=this;for(shutterLinks={},shutterSets={},"object"!=("undefined"==typeof shutterSettings?"undefined":_typeof(shutterSettings))&&(shutterSettings={}),r.mobileOS="undefined"!=typeof orientation,o=0;o<document.links.length;o++)t=document.links[o],".jpg"!=(n=-1==t.href.indexOf("?")?t.href.slice(-4).toLowerCase():t.href.substring(0,t.href.indexOf("?")).slice(-4).toLowerCase())&&".png"!=n&&".gif"!=n&&"jpeg"!=n&&"webp"!=n||"sh"==e&&-1==t.className.toLowerCase().indexOf("shutter")||"lb"==e&&-1==t.rel.toLowerCase().indexOf("lightbox")||(-1!=t.className.toLowerCase().indexOf("shutterset")?s=t.className.replace(/\s/g,"_"):-1!=t.rel.toLowerCase().indexOf("lightbox[")?s=t.rel.replace(/\s/g,"_"):(s=0,d=-1),s&&(shutterSets[s]||(shutterSets[s]=[]),d=shutterSets[s].push(o)),l=t.href.slice(t.href.lastIndexOf("/")+1),i=t.title&&t.title!=l?t.title:"",shutterLinks[o]={link:t.href,num:d,set:s,title:i},t.onclick=new Function('shutterReloaded.make("'+o+'");return false;'));r.settings()},make:function(e,t){var i,n,o,s,d,l,r,h,u=this,a="",m="";if(u.Top||(void 0!==window.pageYOffset?u.Top=window.pageYOffset:u.Top=document.documentElement.scrollTop>0?document.documentElement.scrollTop:document.body.scrollTop),window.parent){var c=window.parent;if(void 0!==c.ngg_get_measures_for_frame){var g=c.ngg_get_measures_for_frame(window.frameElement);u.Top=u.Top+g.scrollTop}}void 0===u.pgHeight&&(u.pgHeight=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)),u.FS=t?t>0?1:0:shutterSettings.FS||0,u.resizing&&(u.resizing=null),1==u.mobileOS?window.onorientationchange=new Function('shutterReloaded.resize("'+e+'");'):window.onresize=new Function('shutterReloaded.resize("'+e+'");'),document.documentElement.style.overflowX="hidden",u.VP||(u._viewPort(),u.VP=!0),(l=u.I("shShutter"))||(l=document.createElement("div"),l.setAttribute("id","shShutter"),document.getElementsByTagName("body")[0].appendChild(l),u.hideTags()),(d=u.I("shDisplay"))||(d=document.createElement("div"),d.setAttribute("id","shDisplay"),d.style.top=u.Top+"px",document.getElementsByTagName("body")[0].appendChild(d)),l.style.height=u.pgHeight+"px";var w=u.textBtns?" | ":"";shutterLinks[e].num>1?(i=shutterSets[shutterLinks[e].set][shutterLinks[e].num-2],a='<a href="#" id="prevpic" onclick="shutterReloaded.make('+i+');return false"><<</a>'+w,o=new Image,o.src=shutterLinks[i].link):a="",-1!=shutterLinks[e].num&&shutterLinks[e].num<shutterSets[shutterLinks[e].set].length?(n=shutterSets[shutterLinks[e].set][shutterLinks[e].num],m='<a href="#" id="nextpic" onclick="shutterReloaded.make('+n+');return false">>></a>'+w,s=new Image,s.src=shutterLinks[n].link):m="",r=shutterLinks[e].num>0&&u.imageCount?'<div id="shCount"> ( '+shutterLinks[e].num+" / "+shutterSets[shutterLinks[e].set].length+" ) </div>":"",h='<div id="shTitle"><div id="shPrev">'+a+'</div><div id="shNext">'+m+'</div><div id="shName">'+shutterLinks[e].title+"</div>"+r+"</div>",d.innerHTML='<div id="shWrap"><img src="'+shutterLinks[e].link+'" id="shTopImg" title="'+u.msgClose+'" onload="shutterReloaded.showImg();" onclick="shutterReloaded.hideShutter();" />'+h+"</div>",document.onkeydown=function(e){shutterReloaded.handleArrowKeys(e)},document.getElementById("shTopImg").src=shutterLinks[e].link,window.setTimeout(function(){shutterReloaded.loading()},1e3)},loading:function(){var e,t,i,n=this;(i=n.I("shWrap"))&&"visible"==i.style.visibility||(e=n.I("shShutter"))&&(n.I("shWaitBar")||(t=document.createElement("div"),t.setAttribute("id","shWaitBar"),t.style.top=n.Top+"px",t.style.marginTop=n.pgHeight/2+"px",t.innerHTML=n.msgLoading,e.appendChild(t)))},hideShutter:function(){var e,t,i=this;(e=i.I("shDisplay"))&&e.parentNode.removeChild(e),(t=i.I("shShutter"))&&t.parentNode.removeChild(t),i.hideTags(!0),window.scrollTo(0,i.Top),window.onresize=i.FS=i.Top=i.VP=null,document.documentElement.style.overflowX="",document.onkeydown=null},resize:function(e){var t=this;if(!t.resizing&&t.I("shShutter")){var i=t.I("shWrap");i&&(i.style.visibility="hidden"),window.setTimeout(function(){shutterReloaded.resizing=null},500),window.setTimeout(new Function('shutterReloaded.VP = null;shutterReloaded.make("'+e+'");'),100),t.resizing=!0}},_viewPort:function(){var e=this,t=window.innerHeight?window.innerHeight:0,i=document.body.clientHeight?document.body.clientHeight:0,n=document.documentElement?document.documentElement.clientHeight:0;t>0?(e.wHeight=t-i>1&&t-i<30?i:t,e.wHeight=e.wHeight-n>1&&e.wHeight-n<30?n:e.wHeight):e.wHeight=n>0?n:i,document.getElementsByTagName("body")[0].className.match(/admin-bar/)&&null!==document.getElementById("wpadminbar")&&(e.wHeight=e.wHeight-document.getElementById("wpadminbar").offsetHeight);var o=document.documentElement?document.documentElement.clientWidth:0,s=window.innerWidth?window.innerWidth:document.body.clientWidth;e.wWidth=o>1?o:s},showImg:function(){var e,t,i,n,o,s,d=this,l=d.I("shShutter"),r=d.I("shDisplay"),h=d.I("shTopImg"),u=d.I("shTitle");d.I("shNavBar");if(l&&(!(e=d.I("shWrap"))||"visible"!=e.style.visibility)){if((t=d.I("shWaitBar"))&&t.parentNode.removeChild(t),l.style.width=r.style.width="",u.style.width=h.width-4+"px",i=d.wHeight-50,window.parent){var a=window.parent;if(void 0!==a.ngg_get_measures_for_frame){i=a.ngg_get_measures_for_frame(window.frameElement).scrollHeight-50}}d.FS?(h.width>d.wWidth-10&&(l.style.width=r.style.width=h.width+10+"px"),document.documentElement.style.overflowX=""):(window.scrollTo(0,d.Top),h.height>i&&(h.width=h.width*(i/h.height),h.height=i,1),h.width>d.wWidth-16&&(h.height=h.height*((d.wWidth-16)/h.width),h.width=d.wWidth-16,1),u.style.width=h.width-4+"px"),n=d.Top+h.height+10,n>d.pgHeight&&(l.style.height=n+"px"),window.scrollTo(0,d.Top),o=.45*(i-h.height),s=o>3?Math.floor(o):3,document.getElementsByTagName("body")[0].className.match(/admin-bar/)&&null!==document.getElementById("wpadminbar")&&(s+=document.getElementById("wpadminbar").offsetHeight),r.style.top=d.Top+s+"px",e.style.visibility="visible"}},hideTags:function(e){var t=document.getElementsByTagName("select"),n=document.getElementsByTagName("object"),o=document.getElementsByTagName("embed"),s=document.getElementsByTagName("iframe"),d=e?"visible":"hidden";for(i=0;i<t.length;i++)t[i].style.visibility=d;for(i=0;i<n.length;i++)n[i].style.visibility=d;for(i=0;i<o.length;i++)o[i].style.visibility=d;for(i=0;i<s.length;i++)s[i].style.visibility=d},handleArrowKeys:function(e){var t=0;if(!e)var e=window.event;e.keyCode?t=e.keyCode:e.which&&(t=e.which);var i=document.getElementById("prevpic"),n=document.getElementById("nextpic"),o=document.getElementById("shTopImg");switch(t){case 39:n&&n.onclick();break;case 37:i&&i.onclick();break;case 27:o&&o.onclick()}}},shutterOnload=function(){shutterReloaded.init("sh")},"function"==typeof shutterOnload&&("undefined"!=typeof jQuery?function(e){e(function(){shutterOnload()})}(jQuery):"function"!=typeof window.onload?window.onload=shutterOnload:(oldonld=window.onload,window.onload=function(){oldonld&&oldonld(),shutterOnload()}));
|
products/photocrati_nextgen/modules/lightbox/static/shutter_reloaded/shutter.js
CHANGED
@@ -47,7 +47,7 @@ shutterReloaded = {
|
|
47 |
for ( i = 0; i < document.links.length; i++ ) {
|
48 |
L = document.links[i];
|
49 |
ext = ( L.href.indexOf('?') == -1 ) ? L.href.slice(-4).toLowerCase() : L.href.substring( 0, L.href.indexOf('?') ).slice(-4).toLowerCase();
|
50 |
-
if ( ext != '.jpg' && ext != '.png' && ext != '.gif' && ext != 'jpeg' ) continue;
|
51 |
if ( a == 'sh' && L.className.toLowerCase().indexOf('shutter') == -1 ) continue;
|
52 |
if ( a == 'lb' && L.rel.toLowerCase().indexOf('lightbox') == -1 ) continue;
|
53 |
|
47 |
for ( i = 0; i < document.links.length; i++ ) {
|
48 |
L = document.links[i];
|
49 |
ext = ( L.href.indexOf('?') == -1 ) ? L.href.slice(-4).toLowerCase() : L.href.substring( 0, L.href.indexOf('?') ).slice(-4).toLowerCase();
|
50 |
+
if ( ext != '.jpg' && ext != '.png' && ext != '.gif' && ext != 'jpeg' && ext != 'webp' ) continue;
|
51 |
if ( a == 'sh' && L.className.toLowerCase().indexOf('shutter') == -1 ) continue;
|
52 |
if ( a == 'lb' && L.rel.toLowerCase().indexOf('lightbox') == -1 ) continue;
|
53 |
|
products/photocrati_nextgen/modules/lightbox/static/shutter_reloaded/shutter.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
"use strict";shutterReloaded={L10n:["Previous","Next","Close","Full Size","Fit to Screen","Image","of","Loading..."],imageCount:!0,textBtns:!1,shImgDir:nextgen_lightbox_settings.static_path.replace("/{placeholder}","")+"/shutter_reloaded/images/",I:function(t){return document.getElementById(t)},Init:function(t){var e,i,s,h,n,o,l,d,r,a;for(h=0;h<document.links.length;h++)e=document.links[h],".jpg"!=(s=-1==e.href.indexOf("?")?e.href.slice(-4).toLowerCase():e.href.substring(0,e.href.indexOf("?")).slice(-4).toLowerCase())&&".png"!=s&&".gif"!=s&&"jpeg"!=s||"sh"==t&&-1==e.className.toLowerCase().indexOf("shutter")||"lb"==t&&-1==e.rel.toLowerCase().indexOf("lightbox")||(-1!=e.className.toLowerCase().indexOf("shutterset")?n=-1!=e.className.indexOf(" ")?e.className.slice(0,e.className.indexOf(" ")):e.className:-1!=e.rel.toLowerCase().indexOf("lightbox[")?n=e.rel:(n=0,o=-1),n&&(shutterSets[n]||(shutterSets[n]=[]),o=shutterSets[n].push(h)),l=e.href.slice(e.href.lastIndexOf("/")+1),i=e.title&&e.title!=l?e.title:"",shutterLinks[h]={link:e.href,num:o,set:n,title:i},e.onclick=new Function('shutterReloaded.Make("'+h+'");return false;'));if(!this.textBtns)for(d=["close.gif","prev.gif","next.gif","resize1.gif","resize2.gif","loading.gif"],r=0;r<d.length;r++)a=new Image,a.src=this.shImgDir+d[r]},Make:function(t,e){var i,s,h,n,o,l,d,r,a,u,g,m,c,w="",f="",p="";this.Top||(void 0!==window.pageYOffset?this.Top=window.pageYOffset:this.Top=document.documentElement.scrollTop>0?document.documentElement.scrollTop:document.body.scrollTop),void 0===this.pgHeight&&(this.pgHeight=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)),this.FS=!!e||null,this.resizing&&(this.resizing=null),window.onresize=new Function('shutterReloaded.Resize("'+t+'");'),document.documentElement.style.overflowX="hidden",this.VP||(this._viewPort(),this.VP=!0),(r=this.I("shShutter"))||(r=document.createElement("div"),r.setAttribute("id","shShutter"),document.getElementsByTagName("body")[0].appendChild(r),this.fixTags()),(d=this.I("shDisplay"))||(d=document.createElement("div"),d.setAttribute("id","shDisplay"),d.style.top=this.Top+"px",document.getElementsByTagName("body")[0].appendChild(d)),r.style.height=this.pgHeight+"px";var y=this.textBtns?" | ":"";shutterLinks[t].num>1&&(i=shutterSets[shutterLinks[t].set][shutterLinks[t].num-2],o=this.textBtns?this.L10n[0]:'<img src="'+this.shImgDir+'prev.gif" title="'+this.L10n[0]+'" />',w='<a href="#" onclick="shutterReloaded.Make('+i+');return false">'+o+"</a>"+y,h=new Image,h.src=shutterLinks[i].link),-1!=shutterLinks[t].num&&shutterLinks[t].num<shutterSets[shutterLinks[t].set].length&&(s=shutterSets[shutterLinks[t].set][shutterLinks[t].num],l=this.textBtns?this.L10n[1]:'<img src="'+this.shImgDir+'next.gif" title="'+this.L10n[1]+'" />',f='<a href="#" onclick="shutterReloaded.Make('+s+');return false">'+l+"</a>"+y,n=new Image,n.src=shutterLinks[s].link),g=this.textBtns?this.L10n[2]:'<img src="'+this.shImgDir+'close.gif" title="'+this.L10n[2]+'" />',u=shutterLinks[t].num>0&&this.imageCount?" "+this.L10n[5]+" "+shutterLinks[t].num+" "+this.L10n[6]+" "+shutterSets[shutterLinks[t].set].length:"",u&&this.textBtns&&(u+=" |"),this.FS?m=this.textBtns?this.L10n[4]:'<img src="'+this.shImgDir+'resize2.gif" title="'+this.L10n[4]+'" />':(m=this.textBtns?this.L10n[3]:'<img src="'+this.shImgDir+'resize1.gif" title="'+this.L10n[3]+'" />',p=",1"),c='<span id="fullSize"><a href="#" onclick="shutterReloaded.Make('+t+p+');return false">'+m+"</a>"+y+"</span>",(a=this.I("shNavBar"))||(a=document.createElement("div"),a.setAttribute("id","shNavBar"),document.getElementsByTagName("body")[0].appendChild(a)),a.innerHTML=y+w+'<a href="#" onclick="shutterReloaded.hideShutter();return false">'+g+"</a>"+y+c+f+u,d.innerHTML='<div id="shWrap"><img src="'+shutterLinks[t].link+'" id="shTopImg" onload="shutterReloaded.ShowImg();" onclick="shutterReloaded.hideShutter();" /><div id="shTitle">'+shutterLinks[t].title+"</div></div>",window.setTimeout(function(){shutterReloaded.loading()},2e3)},loading:function(){var t,e,i;(i=this.I("shWrap"))&&"visible"==i.style.visibility||(t=this.I("shShutter"))&&(this.I("shWaitBar")||(e=document.createElement("div"),e.setAttribute("id","shWaitBar"),e.style.top=this.Top+"px",e.innerHTML='<img src="'+this.shImgDir+'loading.gif" title="'+this.L10n[7]+'" />',t.appendChild(e)))},hideShutter:function(){var t,e,i;(t=this.I("shDisplay"))&&t.parentNode.removeChild(t),(e=this.I("shShutter"))&&e.parentNode.removeChild(e),(i=this.I("shNavBar"))&&i.parentNode.removeChild(i),this.fixTags(!0),window.scrollTo(0,this.Top),window.onresize=this.FS=this.Top=this.VP=null,document.documentElement.style.overflowX=""},Resize:function(t){if(!this.resizing&&this.I("shShutter")){var e=this.I("shWrap");e&&(e.style.visibility="hidden"),window.setTimeout(function(){shutterReloaded.resizing=null},500),window.setTimeout(new Function('shutterReloaded.VP = null;shutterReloaded.Make("'+t+'");'),100),this.resizing=!0}},_viewPort:function(){var t=window.innerHeight?window.innerHeight:0,e=document.body.clientHeight?document.body.clientHeight:0,i=document.documentElement?document.documentElement.clientHeight:0;t>0?(this.wHeight=t-e>1&&t-e<30?e:t,this.wHeight=this.wHeight-i>1&&this.wHeight-i<30?i:this.wHeight):this.wHeight=i>0?i:e;var s=document.documentElement?document.documentElement.clientWidth:0,h=window.innerWidth?window.innerWidth:document.body.clientWidth;this.wWidth=s>1?s:h},ShowImg:function(){var t,e,i,s,h,n,o,l,d,r,a,u,g=0;(t=this.I("shShutter"))&&((e=this.I("shWrap"))&&"visible"==e.style.visibility||((i=this.I("shWaitBar"))&&i.parentNode.removeChild(i),s=this.I("shDisplay"),n=this.I("shTopImg"),h=this.I("shTitle"),o=this.I("shNavBar"),t.style.width=s.style.width="",h.style.width=n.width-4+"px",l=o.offsetHeight?h.offsetHeight+o.offsetHeight:30,d=this.wHeight-7-l,this.FS?(n.width>this.wWidth-10&&(t.style.width=s.style.width=n.width+10+"px"),document.documentElement.style.overflowX=""):(window.scrollTo(0,this.Top),n.height>d&&(n.width=n.width*(d/n.height),n.height=d,g=1),n.width>this.wWidth-16&&(n.height=n.height*((this.wWidth-16)/n.width),n.width=this.wWidth-16,g=1),h.style.width=n.width-4+"px",o.style.bottom="0px"),r=this.Top+n.height+l+10,r>this.pgHeight&&(t.style.height=r+"px"),window.scrollTo(0,this.Top),(this.FS&&(n.height>d||n.width>this.wWidth)||g)&&(this.I("fullSize").style.display="inline"),a=.45*(d-n.height),u=a>3?Math.floor(a):3,s.style.top=this.Top+u+"px",o.style.bottom="0",e.style.visibility="visible"))},fixTags:function(t){var e=document.getElementsByTagName("select"),s=document.getElementsByTagName("object"),h=document.getElementsByTagName("embed");if(t)var n="visible";else var n="hidden";for(i=0;i<e.length;i++)e[i].style.visibility=n;for(i=0;i<s.length;i++)s[i].style.visibility=n;for(i=0;i<h.length;i++)h[i].style.visibility=n}};var shutterLinks={},shutterSets={};"function"==typeof shutterOnload&&(oldonload=window.onload,"function"!=typeof window.onload?window.onload=shutterOnload:window.onload=function(){shutterOnload(),oldonload&&oldonload()});
|
1 |
+
"use strict";shutterReloaded={L10n:["Previous","Next","Close","Full Size","Fit to Screen","Image","of","Loading..."],imageCount:!0,textBtns:!1,shImgDir:nextgen_lightbox_settings.static_path.replace("/{placeholder}","")+"/shutter_reloaded/images/",I:function(t){return document.getElementById(t)},Init:function(t){var e,i,s,h,n,o,l,d,r,a;for(h=0;h<document.links.length;h++)e=document.links[h],".jpg"!=(s=-1==e.href.indexOf("?")?e.href.slice(-4).toLowerCase():e.href.substring(0,e.href.indexOf("?")).slice(-4).toLowerCase())&&".png"!=s&&".gif"!=s&&"jpeg"!=s&&"webp"!=s||"sh"==t&&-1==e.className.toLowerCase().indexOf("shutter")||"lb"==t&&-1==e.rel.toLowerCase().indexOf("lightbox")||(-1!=e.className.toLowerCase().indexOf("shutterset")?n=-1!=e.className.indexOf(" ")?e.className.slice(0,e.className.indexOf(" ")):e.className:-1!=e.rel.toLowerCase().indexOf("lightbox[")?n=e.rel:(n=0,o=-1),n&&(shutterSets[n]||(shutterSets[n]=[]),o=shutterSets[n].push(h)),l=e.href.slice(e.href.lastIndexOf("/")+1),i=e.title&&e.title!=l?e.title:"",shutterLinks[h]={link:e.href,num:o,set:n,title:i},e.onclick=new Function('shutterReloaded.Make("'+h+'");return false;'));if(!this.textBtns)for(d=["close.gif","prev.gif","next.gif","resize1.gif","resize2.gif","loading.gif"],r=0;r<d.length;r++)a=new Image,a.src=this.shImgDir+d[r]},Make:function(t,e){var i,s,h,n,o,l,d,r,a,u,g,m,c,w="",f="",p="";this.Top||(void 0!==window.pageYOffset?this.Top=window.pageYOffset:this.Top=document.documentElement.scrollTop>0?document.documentElement.scrollTop:document.body.scrollTop),void 0===this.pgHeight&&(this.pgHeight=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)),this.FS=!!e||null,this.resizing&&(this.resizing=null),window.onresize=new Function('shutterReloaded.Resize("'+t+'");'),document.documentElement.style.overflowX="hidden",this.VP||(this._viewPort(),this.VP=!0),(r=this.I("shShutter"))||(r=document.createElement("div"),r.setAttribute("id","shShutter"),document.getElementsByTagName("body")[0].appendChild(r),this.fixTags()),(d=this.I("shDisplay"))||(d=document.createElement("div"),d.setAttribute("id","shDisplay"),d.style.top=this.Top+"px",document.getElementsByTagName("body")[0].appendChild(d)),r.style.height=this.pgHeight+"px";var y=this.textBtns?" | ":"";shutterLinks[t].num>1&&(i=shutterSets[shutterLinks[t].set][shutterLinks[t].num-2],o=this.textBtns?this.L10n[0]:'<img src="'+this.shImgDir+'prev.gif" title="'+this.L10n[0]+'" />',w='<a href="#" onclick="shutterReloaded.Make('+i+');return false">'+o+"</a>"+y,h=new Image,h.src=shutterLinks[i].link),-1!=shutterLinks[t].num&&shutterLinks[t].num<shutterSets[shutterLinks[t].set].length&&(s=shutterSets[shutterLinks[t].set][shutterLinks[t].num],l=this.textBtns?this.L10n[1]:'<img src="'+this.shImgDir+'next.gif" title="'+this.L10n[1]+'" />',f='<a href="#" onclick="shutterReloaded.Make('+s+');return false">'+l+"</a>"+y,n=new Image,n.src=shutterLinks[s].link),g=this.textBtns?this.L10n[2]:'<img src="'+this.shImgDir+'close.gif" title="'+this.L10n[2]+'" />',u=shutterLinks[t].num>0&&this.imageCount?" "+this.L10n[5]+" "+shutterLinks[t].num+" "+this.L10n[6]+" "+shutterSets[shutterLinks[t].set].length:"",u&&this.textBtns&&(u+=" |"),this.FS?m=this.textBtns?this.L10n[4]:'<img src="'+this.shImgDir+'resize2.gif" title="'+this.L10n[4]+'" />':(m=this.textBtns?this.L10n[3]:'<img src="'+this.shImgDir+'resize1.gif" title="'+this.L10n[3]+'" />',p=",1"),c='<span id="fullSize"><a href="#" onclick="shutterReloaded.Make('+t+p+');return false">'+m+"</a>"+y+"</span>",(a=this.I("shNavBar"))||(a=document.createElement("div"),a.setAttribute("id","shNavBar"),document.getElementsByTagName("body")[0].appendChild(a)),a.innerHTML=y+w+'<a href="#" onclick="shutterReloaded.hideShutter();return false">'+g+"</a>"+y+c+f+u,d.innerHTML='<div id="shWrap"><img src="'+shutterLinks[t].link+'" id="shTopImg" onload="shutterReloaded.ShowImg();" onclick="shutterReloaded.hideShutter();" /><div id="shTitle">'+shutterLinks[t].title+"</div></div>",window.setTimeout(function(){shutterReloaded.loading()},2e3)},loading:function(){var t,e,i;(i=this.I("shWrap"))&&"visible"==i.style.visibility||(t=this.I("shShutter"))&&(this.I("shWaitBar")||(e=document.createElement("div"),e.setAttribute("id","shWaitBar"),e.style.top=this.Top+"px",e.innerHTML='<img src="'+this.shImgDir+'loading.gif" title="'+this.L10n[7]+'" />',t.appendChild(e)))},hideShutter:function(){var t,e,i;(t=this.I("shDisplay"))&&t.parentNode.removeChild(t),(e=this.I("shShutter"))&&e.parentNode.removeChild(e),(i=this.I("shNavBar"))&&i.parentNode.removeChild(i),this.fixTags(!0),window.scrollTo(0,this.Top),window.onresize=this.FS=this.Top=this.VP=null,document.documentElement.style.overflowX=""},Resize:function(t){if(!this.resizing&&this.I("shShutter")){var e=this.I("shWrap");e&&(e.style.visibility="hidden"),window.setTimeout(function(){shutterReloaded.resizing=null},500),window.setTimeout(new Function('shutterReloaded.VP = null;shutterReloaded.Make("'+t+'");'),100),this.resizing=!0}},_viewPort:function(){var t=window.innerHeight?window.innerHeight:0,e=document.body.clientHeight?document.body.clientHeight:0,i=document.documentElement?document.documentElement.clientHeight:0;t>0?(this.wHeight=t-e>1&&t-e<30?e:t,this.wHeight=this.wHeight-i>1&&this.wHeight-i<30?i:this.wHeight):this.wHeight=i>0?i:e;var s=document.documentElement?document.documentElement.clientWidth:0,h=window.innerWidth?window.innerWidth:document.body.clientWidth;this.wWidth=s>1?s:h},ShowImg:function(){var t,e,i,s,h,n,o,l,d,r,a,u,g=0;(t=this.I("shShutter"))&&((e=this.I("shWrap"))&&"visible"==e.style.visibility||((i=this.I("shWaitBar"))&&i.parentNode.removeChild(i),s=this.I("shDisplay"),n=this.I("shTopImg"),h=this.I("shTitle"),o=this.I("shNavBar"),t.style.width=s.style.width="",h.style.width=n.width-4+"px",l=o.offsetHeight?h.offsetHeight+o.offsetHeight:30,d=this.wHeight-7-l,this.FS?(n.width>this.wWidth-10&&(t.style.width=s.style.width=n.width+10+"px"),document.documentElement.style.overflowX=""):(window.scrollTo(0,this.Top),n.height>d&&(n.width=n.width*(d/n.height),n.height=d,g=1),n.width>this.wWidth-16&&(n.height=n.height*((this.wWidth-16)/n.width),n.width=this.wWidth-16,g=1),h.style.width=n.width-4+"px",o.style.bottom="0px"),r=this.Top+n.height+l+10,r>this.pgHeight&&(t.style.height=r+"px"),window.scrollTo(0,this.Top),(this.FS&&(n.height>d||n.width>this.wWidth)||g)&&(this.I("fullSize").style.display="inline"),a=.45*(d-n.height),u=a>3?Math.floor(a):3,s.style.top=this.Top+u+"px",o.style.bottom="0",e.style.visibility="visible"))},fixTags:function(t){var e=document.getElementsByTagName("select"),s=document.getElementsByTagName("object"),h=document.getElementsByTagName("embed");if(t)var n="visible";else var n="hidden";for(i=0;i<e.length;i++)e[i].style.visibility=n;for(i=0;i<s.length;i++)s[i].style.visibility=n;for(i=0;i<h.length;i++)h[i].style.visibility=n}};var shutterLinks={},shutterSets={};"function"==typeof shutterOnload&&(oldonload=window.onload,"function"!=typeof window.onload?window.onload=shutterOnload:window.onload=function(){shutterOnload(),oldonload&&oldonload()});
|
products/photocrati_nextgen/modules/lightbox/static/thickbox/thickbox.js
ADDED
@@ -0,0 +1,340 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Thickbox 3.1 - One Box To Rule Them All.
|
3 |
+
* By Cody Lindley (http://www.codylindley.com)
|
4 |
+
* Copyright (c) 2007 cody lindley
|
5 |
+
* Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
|
6 |
+
*
|
7 |
+
* Modified 2021-07-14 by Benjamin Owens @ Imagely/LionSher to add WebP to the list of image formats.
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( typeof tb_pathToImage != 'string' ) {
|
11 |
+
var tb_pathToImage = thickboxL10n.loadingAnimation;
|
12 |
+
}
|
13 |
+
|
14 |
+
/*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
|
15 |
+
|
16 |
+
//on page load call tb_init
|
17 |
+
jQuery(document).ready(function(){
|
18 |
+
tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox
|
19 |
+
imgLoader = new Image();// preload image
|
20 |
+
imgLoader.src = tb_pathToImage;
|
21 |
+
});
|
22 |
+
|
23 |
+
/*
|
24 |
+
* Add thickbox to href & area elements that have a class of .thickbox.
|
25 |
+
* Remove the loading indicator when content in an iframe has loaded.
|
26 |
+
*/
|
27 |
+
function tb_init(domChunk){
|
28 |
+
jQuery( 'body' )
|
29 |
+
.on( 'click', domChunk, tb_click )
|
30 |
+
.on( 'thickbox:iframe:loaded', function() {
|
31 |
+
jQuery( '#TB_window' ).removeClass( 'thickbox-loading' );
|
32 |
+
});
|
33 |
+
}
|
34 |
+
|
35 |
+
function tb_click(){
|
36 |
+
var t = this.title || this.name || null;
|
37 |
+
var a = this.href || this.alt;
|
38 |
+
var g = this.rel || false;
|
39 |
+
tb_show(t,a,g);
|
40 |
+
this.blur();
|
41 |
+
return false;
|
42 |
+
}
|
43 |
+
|
44 |
+
function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
|
45 |
+
|
46 |
+
var $closeBtn;
|
47 |
+
|
48 |
+
try {
|
49 |
+
if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
|
50 |
+
jQuery("body","html").css({height: "100%", width: "100%"});
|
51 |
+
jQuery("html").css("overflow","hidden");
|
52 |
+
if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
|
53 |
+
jQuery("body").append("<iframe id='TB_HideSelect'>"+thickboxL10n.noiframes+"</iframe><div id='TB_overlay'></div><div id='TB_window' class='thickbox-loading'></div>");
|
54 |
+
jQuery("#TB_overlay").on( 'click', tb_remove );
|
55 |
+
}
|
56 |
+
}else{//all others
|
57 |
+
if(document.getElementById("TB_overlay") === null){
|
58 |
+
jQuery("body").append("<div id='TB_overlay'></div><div id='TB_window' class='thickbox-loading'></div>");
|
59 |
+
jQuery("#TB_overlay").on( 'click', tb_remove );
|
60 |
+
jQuery( 'body' ).addClass( 'modal-open' );
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
if(tb_detectMacXFF()){
|
65 |
+
jQuery("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash
|
66 |
+
}else{
|
67 |
+
jQuery("#TB_overlay").addClass("TB_overlayBG");//use background and opacity
|
68 |
+
}
|
69 |
+
|
70 |
+
if(caption===null){caption="";}
|
71 |
+
jQuery("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' width='208' /></div>");//add loader to the page
|
72 |
+
jQuery('#TB_load').show();//show loader
|
73 |
+
|
74 |
+
var baseURL;
|
75 |
+
if(url.indexOf("?")!==-1){ //ff there is a query string involved
|
76 |
+
baseURL = url.substr(0, url.indexOf("?"));
|
77 |
+
}else{
|
78 |
+
baseURL = url;
|
79 |
+
}
|
80 |
+
|
81 |
+
var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$|\.webp$/;
|
82 |
+
var urlType = baseURL.toLowerCase().match(urlString);
|
83 |
+
|
84 |
+
if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp' || urlType == '.webp'){//code to show images
|
85 |
+
|
86 |
+
TB_PrevCaption = "";
|
87 |
+
TB_PrevURL = "";
|
88 |
+
TB_PrevHTML = "";
|
89 |
+
TB_NextCaption = "";
|
90 |
+
TB_NextURL = "";
|
91 |
+
TB_NextHTML = "";
|
92 |
+
TB_imageCount = "";
|
93 |
+
TB_FoundURL = false;
|
94 |
+
if(imageGroup){
|
95 |
+
TB_TempArray = jQuery("a[rel="+imageGroup+"]").get();
|
96 |
+
for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) {
|
97 |
+
var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);
|
98 |
+
if (!(TB_TempArray[TB_Counter].href == url)) {
|
99 |
+
if (TB_FoundURL) {
|
100 |
+
TB_NextCaption = TB_TempArray[TB_Counter].title;
|
101 |
+
TB_NextURL = TB_TempArray[TB_Counter].href;
|
102 |
+
TB_NextHTML = "<span id='TB_next'> <a href='#'>"+thickboxL10n.next+"</a></span>";
|
103 |
+
} else {
|
104 |
+
TB_PrevCaption = TB_TempArray[TB_Counter].title;
|
105 |
+
TB_PrevURL = TB_TempArray[TB_Counter].href;
|
106 |
+
TB_PrevHTML = "<span id='TB_prev'> <a href='#'>"+thickboxL10n.prev+"</a></span>";
|
107 |
+
}
|
108 |
+
} else {
|
109 |
+
TB_FoundURL = true;
|
110 |
+
TB_imageCount = thickboxL10n.image + ' ' + (TB_Counter + 1) + ' ' + thickboxL10n.of + ' ' + (TB_TempArray.length);
|
111 |
+
}
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
imgPreloader = new Image();
|
116 |
+
imgPreloader.onload = function(){
|
117 |
+
imgPreloader.onload = null;
|
118 |
+
|
119 |
+
// Resizing large images - original by Christian Montoya edited by me.
|
120 |
+
var pagesize = tb_getPageSize();
|
121 |
+
var x = pagesize[0] - 150;
|
122 |
+
var y = pagesize[1] - 150;
|
123 |
+
var imageWidth = imgPreloader.width;
|
124 |
+
var imageHeight = imgPreloader.height;
|
125 |
+
if (imageWidth > x) {
|
126 |
+
imageHeight = imageHeight * (x / imageWidth);
|
127 |
+
imageWidth = x;
|
128 |
+
if (imageHeight > y) {
|
129 |
+
imageWidth = imageWidth * (y / imageHeight);
|
130 |
+
imageHeight = y;
|
131 |
+
}
|
132 |
+
} else if (imageHeight > y) {
|
133 |
+
imageWidth = imageWidth * (y / imageHeight);
|
134 |
+
imageHeight = y;
|
135 |
+
if (imageWidth > x) {
|
136 |
+
imageHeight = imageHeight * (x / imageWidth);
|
137 |
+
imageWidth = x;
|
138 |
+
}
|
139 |
+
}
|
140 |
+
// End Resizing
|
141 |
+
|
142 |
+
TB_WIDTH = imageWidth + 30;
|
143 |
+
TB_HEIGHT = imageHeight + 60;
|
144 |
+
jQuery("#TB_window").append("<a href='' id='TB_ImageOff'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon'></span></button></div>");
|
145 |
+
|
146 |
+
jQuery("#TB_closeWindowButton").on( 'click', tb_remove );
|
147 |
+
|
148 |
+
if (!(TB_PrevHTML === "")) {
|
149 |
+
function goPrev(){
|
150 |
+
if(jQuery(document).off("click",goPrev)){jQuery(document).off("click",goPrev);}
|
151 |
+
jQuery("#TB_window").remove();
|
152 |
+
jQuery("body").append("<div id='TB_window'></div>");
|
153 |
+
tb_show(TB_PrevCaption, TB_PrevURL, imageGroup);
|
154 |
+
return false;
|
155 |
+
}
|
156 |
+
jQuery("#TB_prev").on( 'click', goPrev );
|
157 |
+
}
|
158 |
+
|
159 |
+
if (!(TB_NextHTML === "")) {
|
160 |
+
function goNext(){
|
161 |
+
jQuery("#TB_window").remove();
|
162 |
+
jQuery("body").append("<div id='TB_window'></div>");
|
163 |
+
tb_show(TB_NextCaption, TB_NextURL, imageGroup);
|
164 |
+
return false;
|
165 |
+
}
|
166 |
+
jQuery("#TB_next").on( 'click', goNext );
|
167 |
+
|
168 |
+
}
|
169 |
+
|
170 |
+
jQuery(document).on('keydown.thickbox', function(e){
|
171 |
+
if ( e.which == 27 ){ // close
|
172 |
+
tb_remove();
|
173 |
+
|
174 |
+
} else if ( e.which == 190 ){ // display previous image
|
175 |
+
if(!(TB_NextHTML == "")){
|
176 |
+
jQuery(document).off('thickbox');
|
177 |
+
goNext();
|
178 |
+
}
|
179 |
+
} else if ( e.which == 188 ){ // display next image
|
180 |
+
if(!(TB_PrevHTML == "")){
|
181 |
+
jQuery(document).off('thickbox');
|
182 |
+
goPrev();
|
183 |
+
}
|
184 |
+
}
|
185 |
+
return false;
|
186 |
+
});
|
187 |
+
|
188 |
+
tb_position();
|
189 |
+
jQuery("#TB_load").remove();
|
190 |
+
jQuery("#TB_ImageOff").on( 'click', tb_remove );
|
191 |
+
jQuery("#TB_window").css({'visibility':'visible'}); //for safari using css instead of show
|
192 |
+
};
|
193 |
+
|
194 |
+
imgPreloader.src = url;
|
195 |
+
}else{//code to show html
|
196 |
+
|
197 |
+
var queryString = url.replace(/^[^\?]+\??/,'');
|
198 |
+
var params = tb_parseQuery( queryString );
|
199 |
+
|
200 |
+
TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no parameters were added to URL
|
201 |
+
TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no parameters were added to URL
|
202 |
+
ajaxContentW = TB_WIDTH - 30;
|
203 |
+
ajaxContentH = TB_HEIGHT - 45;
|
204 |
+
|
205 |
+
if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window
|
206 |
+
urlNoQuery = url.split('TB_');
|
207 |
+
jQuery("#TB_iframeContent").remove();
|
208 |
+
if(params['modal'] != "true"){//iframe no modal
|
209 |
+
jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon'></span></button></div></div><iframe frameborder='0' hspace='0' allowtransparency='true' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' >"+thickboxL10n.noiframes+"</iframe>");
|
210 |
+
}else{//iframe modal
|
211 |
+
jQuery("#TB_overlay").off();
|
212 |
+
jQuery("#TB_window").append("<iframe frameborder='0' hspace='0' allowtransparency='true' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'>"+thickboxL10n.noiframes+"</iframe>");
|
213 |
+
}
|
214 |
+
}else{// not an iframe, ajax
|
215 |
+
if(jQuery("#TB_window").css("visibility") != "visible"){
|
216 |
+
if(params['modal'] != "true"){//ajax no modal
|
217 |
+
jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon'></span></button></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");
|
218 |
+
}else{//ajax modal
|
219 |
+
jQuery("#TB_overlay").off();
|
220 |
+
jQuery("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");
|
221 |
+
}
|
222 |
+
}else{//this means the window is already up, we are just loading new content via ajax
|
223 |
+
jQuery("#TB_ajaxContent")[0].style.width = ajaxContentW +"px";
|
224 |
+
jQuery("#TB_ajaxContent")[0].style.height = ajaxContentH +"px";
|
225 |
+
jQuery("#TB_ajaxContent")[0].scrollTop = 0;
|
226 |
+
jQuery("#TB_ajaxWindowTitle").html(caption);
|
227 |
+
}
|
228 |
+
}
|
229 |
+
|
230 |
+
jQuery("#TB_closeWindowButton").on( 'click', tb_remove );
|
231 |
+
|
232 |
+
if(url.indexOf('TB_inline') != -1){
|
233 |
+
jQuery("#TB_ajaxContent").append(jQuery('#' + params['inlineId']).children());
|
234 |
+
jQuery("#TB_window").on('tb_unload', function () {
|
235 |
+
jQuery('#' + params['inlineId']).append( jQuery("#TB_ajaxContent").children() ); // move elements back when you're finished
|
236 |
+
});
|
237 |
+
tb_position();
|
238 |
+
jQuery("#TB_load").remove();
|
239 |
+
jQuery("#TB_window").css({'visibility':'visible'});
|
240 |
+
}else if(url.indexOf('TB_iframe') != -1){
|
241 |
+
tb_position();
|
242 |
+
jQuery("#TB_load").remove();
|
243 |
+
jQuery("#TB_window").css({'visibility':'visible'});
|
244 |
+
}else{
|
245 |
+
var load_url = url;
|
246 |
+
load_url += -1 === url.indexOf('?') ? '?' : '&';
|
247 |
+
jQuery("#TB_ajaxContent").load(load_url += "random=" + (new Date().getTime()),function(){//to do a post change this load method
|
248 |
+
tb_position();
|
249 |
+
jQuery("#TB_load").remove();
|
250 |
+
tb_init("#TB_ajaxContent a.thickbox");
|
251 |
+
jQuery("#TB_window").css({'visibility':'visible'});
|
252 |
+
});
|
253 |
+
}
|
254 |
+
|
255 |
+
}
|
256 |
+
|
257 |
+
if(!params['modal']){
|
258 |
+
jQuery(document).on('keydown.thickbox', function(e){
|
259 |
+
if ( e.which == 27 ){ // close
|
260 |
+
tb_remove();
|
261 |
+
return false;
|
262 |
+
}
|
263 |
+
});
|
264 |
+
}
|
265 |
+
|
266 |
+
$closeBtn = jQuery( '#TB_closeWindowButton' );
|
267 |
+
/*
|
268 |
+
* If the native Close button icon is visible, move focus on the button
|
269 |
+
* (e.g. in the Network Admin Themes screen).
|
270 |
+
* In other admin screens is hidden and replaced by a different icon.
|
271 |
+
*/
|
272 |
+
if ( $closeBtn.find( '.tb-close-icon' ).is( ':visible' ) ) {
|
273 |
+
$closeBtn.trigger( 'focus' );
|
274 |
+
}
|
275 |
+
|
276 |
+
} catch(e) {
|
277 |
+
//nothing here
|
278 |
+
}
|
279 |
+
}
|
280 |
+
|
281 |
+
//helper functions below
|
282 |
+
function tb_showIframe(){
|
283 |
+
jQuery("#TB_load").remove();
|
284 |
+
jQuery("#TB_window").css({'visibility':'visible'}).trigger( 'thickbox:iframe:loaded' );
|
285 |
+
}
|
286 |
+
|
287 |
+
function tb_remove() {
|
288 |
+
jQuery("#TB_imageOff").off("click");
|
289 |
+
jQuery("#TB_closeWindowButton").off("click");
|
290 |
+
jQuery( '#TB_window' ).fadeOut( 'fast', function() {
|
291 |
+
jQuery( '#TB_window, #TB_overlay, #TB_HideSelect' ).trigger( 'tb_unload' ).off().remove();
|
292 |
+
jQuery( 'body' ).trigger( 'thickbox:removed' );
|
293 |
+
});
|
294 |
+
jQuery( 'body' ).removeClass( 'modal-open' );
|
295 |
+
jQuery("#TB_load").remove();
|
296 |
+
if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
|
297 |
+
jQuery("body","html").css({height: "auto", width: "auto"});
|
298 |
+
jQuery("html").css("overflow","");
|
299 |
+
}
|
300 |
+
jQuery(document).off('.thickbox');
|
301 |
+
return false;
|
302 |
+
}
|
303 |
+
|
304 |
+
function tb_position() {
|
305 |
+
var isIE6 = typeof document.body.style.maxHeight === "undefined";
|
306 |
+
jQuery("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'});
|
307 |
+
if ( ! isIE6 ) { // take away IE6
|
308 |
+
jQuery("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
|
309 |
+
}
|
310 |
+
}
|
311 |
+
|
312 |
+
function tb_parseQuery ( query ) {
|
313 |
+
var Params = {};
|
314 |
+
if ( ! query ) {return Params;}// return empty object
|
315 |
+
var Pairs = query.split(/[;&]/);
|
316 |
+
for ( var i = 0; i < Pairs.length; i++ ) {
|
317 |
+
var KeyVal = Pairs[i].split('=');
|
318 |
+
if ( ! KeyVal || KeyVal.length != 2 ) {continue;}
|
319 |
+
var key = unescape( KeyVal[0] );
|
320 |
+
var val = unescape( KeyVal[1] );
|
321 |
+
val = val.replace(/\+/g, ' ');
|
322 |
+
Params[key] = val;
|
323 |
+
}
|
324 |
+
return Params;
|
325 |
+
}
|
326 |
+
|
327 |
+
function tb_getPageSize(){
|
328 |
+
var de = document.documentElement;
|
329 |
+
var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
|
330 |
+
var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
|
331 |
+
arrayPageSize = [w,h];
|
332 |
+
return arrayPageSize;
|
333 |
+
}
|
334 |
+
|
335 |
+
function tb_detectMacXFF() {
|
336 |
+
var userAgent = navigator.userAgent.toLowerCase();
|
337 |
+
if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) {
|
338 |
+
return true;
|
339 |
+
}
|
340 |
+
}
|
products/photocrati_nextgen/modules/lightbox/static/thickbox/thickbox.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
"use strict";function tb_init(e){jQuery("body").on("click",e,tb_click).on("thickbox:iframe:loaded",function(){jQuery("#TB_window").removeClass("thickbox-loading")})}function tb_click(){return tb_show(this.title||this.name||null,this.href||this.alt,this.rel||!1),this.blur(),!1}function tb_show(e,t,i){var o;try{void 0===document.body.style.maxHeight?(jQuery("body","html").css({height:"100%",width:"100%"}),jQuery("html").css("overflow","hidden"),null===document.getElementById("TB_HideSelect")&&(jQuery("body").append("<iframe id='TB_HideSelect'>"+thickboxL10n.noiframes+"</iframe><div id='TB_overlay'></div><div id='TB_window' class='thickbox-loading'></div>"),jQuery("#TB_overlay").on("click",tb_remove))):null===document.getElementById("TB_overlay")&&(jQuery("body").append("<div id='TB_overlay'></div><div id='TB_window' class='thickbox-loading'></div>"),jQuery("#TB_overlay").on("click",tb_remove),jQuery("body").addClass("modal-open")),tb_detectMacXFF()?jQuery("#TB_overlay").addClass("TB_overlayMacFFBGHack"):jQuery("#TB_overlay").addClass("TB_overlayBG"),null===e&&(e=""),jQuery("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' width='208' /></div>"),jQuery("#TB_load").show();var n;n=-1!==t.indexOf("?")?t.substr(0,t.indexOf("?")):t;var r=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$|\.webp$/,a=n.toLowerCase().match(r);if(".jpg"==a||".jpeg"==a||".png"==a||".gif"==a||".bmp"==a||".webp"==a){if(TB_PrevCaption="",TB_PrevURL="",TB_PrevHTML="",TB_NextCaption="",TB_NextURL="",TB_NextHTML="",TB_imageCount="",TB_FoundURL=!1,i)for(TB_TempArray=jQuery("a[rel="+i+"]").get(),TB_Counter=0;TB_Counter<TB_TempArray.length&&""===TB_NextHTML;TB_Counter++){TB_TempArray[TB_Counter].href.toLowerCase().match(r);TB_TempArray[TB_Counter].href!=t?TB_FoundURL?(TB_NextCaption=TB_TempArray[TB_Counter].title,TB_NextURL=TB_TempArray[TB_Counter].href,TB_NextHTML="<span id='TB_next'> <a href='#'>"+thickboxL10n.next+"</a></span>"):(TB_PrevCaption=TB_TempArray[TB_Counter].title,TB_PrevURL=TB_TempArray[TB_Counter].href,TB_PrevHTML="<span id='TB_prev'> <a href='#'>"+thickboxL10n.prev+"</a></span>"):(TB_FoundURL=!0,TB_imageCount=thickboxL10n.image+" "+(TB_Counter+1)+" "+thickboxL10n.of+" "+TB_TempArray.length)}imgPreloader=new Image,imgPreloader.onload=function(){imgPreloader.onload=null;var o=tb_getPageSize(),n=o[0]-150,r=o[1]-150,a=imgPreloader.width,d=imgPreloader.height;if(a>n?(d*=n/a,a=n,d>r&&(a*=r/d,d=r)):d>r&&(a*=r/d,d=r,a>n&&(d*=n/a,a=n)),TB_WIDTH=a+30,TB_HEIGHT=d+60,jQuery("#TB_window").append("<a href='' id='TB_ImageOff'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><img id='TB_Image' src='"+t+"' width='"+a+"' height='"+d+"' alt='"+e+"'/></a><div id='TB_caption'>"+e+"<div id='TB_secondLine'>"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon'></span></button></div>"),jQuery("#TB_closeWindowButton").on("click",tb_remove),""!==TB_PrevHTML){var T=function e(){return jQuery(document).off("click",e)&&jQuery(document).off("click",e),jQuery("#TB_window").remove(),jQuery("body").append("<div id='TB_window'></div>"),tb_show(TB_PrevCaption,TB_PrevURL,i),!1};jQuery("#TB_prev").on("click",T)}if(""!==TB_NextHTML){var c=function(){return jQuery("#TB_window").remove(),jQuery("body").append("<div id='TB_window'></div>"),tb_show(TB_NextCaption,TB_NextURL,i),!1};jQuery("#TB_next").on("click",c)}jQuery(document).on("keydown.thickbox",function(e){return 27==e.which?tb_remove():190==e.which?""!=TB_NextHTML&&(jQuery(document).off("thickbox"),goNext()):188==e.which&&""!=TB_PrevHTML&&(jQuery(document).off("thickbox"),goPrev()),!1}),tb_position(),jQuery("#TB_load").remove(),jQuery("#TB_ImageOff").on("click",tb_remove),jQuery("#TB_window").css({visibility:"visible"})},imgPreloader.src=t}else{var d=t.replace(/^[^\?]+\??/,""),T=tb_parseQuery(d);if(TB_WIDTH=1*T.width+30||630,TB_HEIGHT=1*T.height+40||440,ajaxContentW=TB_WIDTH-30,ajaxContentH=TB_HEIGHT-45,-1!=t.indexOf("TB_iframe")?(urlNoQuery=t.split("TB_"),jQuery("#TB_iframeContent").remove(),"true"!=T.modal?jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+e+"</div><div id='TB_closeAjaxWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon'></span></button></div></div><iframe frameborder='0' hspace='0' allowtransparency='true' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(1e3*Math.random())+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' >"+thickboxL10n.noiframes+"</iframe>"):(jQuery("#TB_overlay").off(),jQuery("#TB_window").append("<iframe frameborder='0' hspace='0' allowtransparency='true' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(1e3*Math.random())+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;'>"+thickboxL10n.noiframes+"</iframe>"))):"visible"!=jQuery("#TB_window").css("visibility")?"true"!=T.modal?jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+e+"</div><div id='TB_closeAjaxWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon'></span></button></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>"):(jQuery("#TB_overlay").off(),jQuery("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>")):(jQuery("#TB_ajaxContent")[0].style.width=ajaxContentW+"px",jQuery("#TB_ajaxContent")[0].style.height=ajaxContentH+"px",jQuery("#TB_ajaxContent")[0].scrollTop=0,jQuery("#TB_ajaxWindowTitle").html(e)),jQuery("#TB_closeWindowButton").on("click",tb_remove),-1!=t.indexOf("TB_inline"))jQuery("#TB_ajaxContent").append(jQuery("#"+T.inlineId).children()),jQuery("#TB_window").on("tb_unload",function(){jQuery("#"+T.inlineId).append(jQuery("#TB_ajaxContent").children())}),tb_position(),jQuery("#TB_load").remove(),jQuery("#TB_window").css({visibility:"visible"});else if(-1!=t.indexOf("TB_iframe"))tb_position(),jQuery("#TB_load").remove(),jQuery("#TB_window").css({visibility:"visible"});else{var c=t;c+=-1===t.indexOf("?")?"?":"&",jQuery("#TB_ajaxContent").load(c+="random="+(new Date).getTime(),function(){tb_position(),jQuery("#TB_load").remove(),tb_init("#TB_ajaxContent a.thickbox"),jQuery("#TB_window").css({visibility:"visible"})})}}T.modal||jQuery(document).on("keydown.thickbox",function(e){if(27==e.which)return tb_remove(),!1}),o=jQuery("#TB_closeWindowButton"),o.find(".tb-close-icon").is(":visible")&&o.trigger("focus")}catch(e){}}function tb_showIframe(){jQuery("#TB_load").remove(),jQuery("#TB_window").css({visibility:"visible"}).trigger("thickbox:iframe:loaded")}function tb_remove(){return jQuery("#TB_imageOff").off("click"),jQuery("#TB_closeWindowButton").off("click"),jQuery("#TB_window").fadeOut("fast",function(){jQuery("#TB_window, #TB_overlay, #TB_HideSelect").trigger("tb_unload").off().remove(),jQuery("body").trigger("thickbox:removed")}),jQuery("body").removeClass("modal-open"),jQuery("#TB_load").remove(),void 0===document.body.style.maxHeight&&(jQuery("body","html").css({height:"auto",width:"auto"}),jQuery("html").css("overflow","")),jQuery(document).off(".thickbox"),!1}function tb_position(){var e=void 0===document.body.style.maxHeight;jQuery("#TB_window").css({marginLeft:"-"+parseInt(TB_WIDTH/2,10)+"px",width:TB_WIDTH+"px"}),e||jQuery("#TB_window").css({marginTop:"-"+parseInt(TB_HEIGHT/2,10)+"px"})}function tb_parseQuery(e){var t={};if(!e)return t;for(var i=e.split(/[;&]/),o=0;o<i.length;o++){var n=i[o].split("=");if(n&&2==n.length){var r=unescape(n[0]),a=unescape(n[1]);a=a.replace(/\+/g," "),t[r]=a}}return t}function tb_getPageSize(){var e=document.documentElement,t=window.innerWidth||self.innerWidth||e&&e.clientWidth||document.body.clientWidth,i=window.innerHeight||self.innerHeight||e&&e.clientHeight||document.body.clientHeight;return arrayPageSize=[t,i],arrayPageSize}function tb_detectMacXFF(){var e=navigator.userAgent.toLowerCase();if(-1!=e.indexOf("mac")&&-1!=e.indexOf("firefox"))return!0}if("string"!=typeof tb_pathToImage)var tb_pathToImage=thickboxL10n.loadingAnimation;jQuery(document).ready(function(){tb_init("a.thickbox, area.thickbox, input.thickbox"),imgLoader=new Image,imgLoader.src=tb_pathToImage});
|
products/photocrati_nextgen/modules/mvc/package.module.mvc.php
CHANGED
@@ -170,6 +170,9 @@ abstract class C_MVC_Controller extends C_Component
|
|
170 |
case 'pdf':
|
171 |
$type = 'application/pdf';
|
172 |
break;
|
|
|
|
|
|
|
173 |
}
|
174 |
$this->object->_content_type = $type;
|
175 |
return $type;
|
170 |
case 'pdf':
|
171 |
$type = 'application/pdf';
|
172 |
break;
|
173 |
+
case 'webp':
|
174 |
+
$type = 'image/webp';
|
175 |
+
break;
|
176 |
}
|
177 |
$this->object->_content_type = $type;
|
178 |
return $type;
|
products/photocrati_nextgen/modules/nextgen_addgallery_page/package.module.nextgen_addgallery_page.php
CHANGED
@@ -412,10 +412,6 @@ class A_Upload_Images_Form extends Mixin
|
|
412 |
M_Ajax::pass_data_to_js('uppy', 'NggUppyDashboardSettings', $this->object->get_uppy_dashboard_settings());
|
413 |
M_Ajax::pass_data_to_js('uppy', 'NggXHRSettings', $this->object->get_uppy_xhr_settings());
|
414 |
}
|
415 |
-
function get_allowed_image_mime_types()
|
416 |
-
{
|
417 |
-
return ['image/gif', 'image/jpg', 'image/jpeg', 'image/pjpeg', 'image/png'];
|
418 |
-
}
|
419 |
function get_uppy_note()
|
420 |
{
|
421 |
$core_settings = $this->object->get_uppy_core_settings();
|
@@ -429,7 +425,7 @@ class A_Upload_Images_Form extends Mixin
|
|
429 |
}
|
430 |
function get_uppy_core_settings()
|
431 |
{
|
432 |
-
return apply_filters('ngg_uppy_core_settings', ['locale' => $this->object->get_uppy_locale(), 'restrictions' => ['maxfileSize' => wp_max_upload_size(), 'allowedFileTypes' => $this->can_upload_zips() ? array_merge(
|
433 |
}
|
434 |
function get_uppy_dashboard_settings()
|
435 |
{
|
412 |
M_Ajax::pass_data_to_js('uppy', 'NggUppyDashboardSettings', $this->object->get_uppy_dashboard_settings());
|
413 |
M_Ajax::pass_data_to_js('uppy', 'NggXHRSettings', $this->object->get_uppy_xhr_settings());
|
414 |
}
|
|
|
|
|
|
|
|
|
415 |
function get_uppy_note()
|
416 |
{
|
417 |
$core_settings = $this->object->get_uppy_core_settings();
|
425 |
}
|
426 |
function get_uppy_core_settings()
|
427 |
{
|
428 |
+
return apply_filters('ngg_uppy_core_settings', ['locale' => $this->object->get_uppy_locale(), 'restrictions' => ['maxfileSize' => wp_max_upload_size(), 'allowedFileTypes' => $this->can_upload_zips() ? array_merge(NGG_DEFAULT_ALLOWED_MIME_TYPES, ['.zip']) : get_allowed_mime_types()]]);
|
429 |
}
|
430 |
function get_uppy_dashboard_settings()
|
431 |
{
|
products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php
CHANGED
@@ -369,7 +369,7 @@ class Mixin_Dynamic_Thumbnails_Manager extends Mixin
|
|
369 |
if ($uri_arg == 'crop') {
|
370 |
$params['crop'] = true;
|
371 |
} else {
|
372 |
-
if (in_array(strtolower($uri_arg),
|
373 |
$params['type'] = $uri_arg;
|
374 |
} else {
|
375 |
if (preg_match('/(\\d+)x(\\d+)(?:x(\\d+))?/i', $uri_arg, $size_match) > 0) {
|
@@ -2184,7 +2184,7 @@ class C_Gallery_Storage extends C_Component
|
|
2184 |
}
|
2185 |
function get_image_format_list()
|
2186 |
{
|
2187 |
-
$format_list =
|
2188 |
return $format_list;
|
2189 |
}
|
2190 |
/**
|
@@ -2485,7 +2485,7 @@ class C_Gallery_Storage extends C_Component
|
|
2485 |
// Remove all image files and purge all empty directories left over
|
2486 |
$iterator = new DirectoryIterator($abspath);
|
2487 |
// Only delete image files! Other files may be stored incorrectly but it's not our place to delete them
|
2488 |
-
$removable_extensions = apply_filters('ngg_allowed_file_types',
|
2489 |
foreach ($removable_extensions as $extension) {
|
2490 |
$removable_extensions[] = $extension . '_backup';
|
2491 |
}
|
@@ -2783,7 +2783,7 @@ class C_Gallery_Storage extends C_Component
|
|
2783 |
{
|
2784 |
$extension = pathinfo($filename, PATHINFO_EXTENSION);
|
2785 |
$extension = strtolower($extension);
|
2786 |
-
$allowed_extensions = apply_filters('ngg_allowed_file_types',
|
2787 |
foreach ($allowed_extensions as $extension) {
|
2788 |
$allowed_extensions[] = $extension . '_backup';
|
2789 |
}
|
@@ -2809,16 +2809,15 @@ class C_Gallery_Storage extends C_Component
|
|
2809 |
if (!$filename && isset($_FILES['file']) && $_FILES['file']['error'] == 0) {
|
2810 |
$filename = $_FILES['file']['tmp_name'];
|
2811 |
}
|
2812 |
-
$valid_types = array('image/gif', 'image/jpg', 'image/jpeg', 'image/pjpeg', 'image/png');
|
2813 |
// If we can, we'll verify the mime type
|
2814 |
if (function_exists('exif_imagetype')) {
|
2815 |
if (($image_type = @exif_imagetype($filename)) !== FALSE) {
|
2816 |
-
$retval = in_array(image_type_to_mime_type($image_type),
|
2817 |
}
|
2818 |
} else {
|
2819 |
$file_info = @getimagesize($filename);
|
2820 |
if (isset($file_info[2])) {
|
2821 |
-
$retval = in_array(image_type_to_mime_type($file_info[2]),
|
2822 |
}
|
2823 |
}
|
2824 |
return $retval;
|
@@ -2881,6 +2880,26 @@ class C_Gallery_Storage extends C_Component
|
|
2881 |
}
|
2882 |
return $filename;
|
2883 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2884 |
function import_image_file($dst_gallery, $image_abspath, $filename = NULL, $image = FALSE, $override = FALSE, $move = FALSE)
|
2885 |
{
|
2886 |
$image_abspath = wp_normalize_path($image_abspath);
|
@@ -2902,9 +2921,16 @@ class C_Gallery_Storage extends C_Component
|
|
2902 |
// Sanitize the filename for storing in the DB
|
2903 |
$filename = $this->sanitize_filename_for_db($filename);
|
2904 |
// Ensure that the filename is valid
|
2905 |
-
|
|
|
|
|
|
|
2906 |
throw new E_UploadException(__('Invalid image file. Acceptable formats: JPG, GIF, and PNG.', 'nggallery'));
|
2907 |
}
|
|
|
|
|
|
|
|
|
2908 |
// Compute the destination folder
|
2909 |
$new_image_abspath = path_join($gallery_abspath, $filename);
|
2910 |
// Are the src and dst the same? If so, we don't have to copy or move files
|
@@ -4595,7 +4621,7 @@ class C_NggLegacy_Thumbnail
|
|
4595 |
@ini_set('memory_limit', -1);
|
4596 |
$image_size = @getimagesize($this->fileName);
|
4597 |
if (isset($image_size) && is_array($image_size)) {
|
4598 |
-
$extensions =
|
4599 |
$extension = array_key_exists($image_size[2], $extensions) ? $extensions[$image_size[2]] : '';
|
4600 |
if ($extension) {
|
4601 |
$this->format = $extension;
|
@@ -4641,6 +4667,13 @@ class C_NggLegacy_Thumbnail
|
|
4641 |
$img_err = __('Support for PNG format is missing.', 'nggallery');
|
4642 |
}
|
4643 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4644 |
}
|
4645 |
if (!$this->oldImage) {
|
4646 |
if ($img_err == null) {
|
@@ -4680,6 +4713,9 @@ class C_NggLegacy_Thumbnail
|
|
4680 |
// didn't get the channel for png
|
4681 |
$CHANNEL = 3;
|
4682 |
break;
|
|
|
|
|
|
|
4683 |
}
|
4684 |
$bits = !empty($imageInfo['bits']) ? $imageInfo['bits'] : 32;
|
4685 |
// imgInfo[bits] is not always available
|
@@ -4701,6 +4737,9 @@ class C_NggLegacy_Thumbnail
|
|
4701 |
// didn't get the channel for png
|
4702 |
$channels = 3;
|
4703 |
break;
|
|
|
|
|
|
|
4704 |
}
|
4705 |
}
|
4706 |
if ($bits == null) {
|
@@ -4743,18 +4782,17 @@ class C_NggLegacy_Thumbnail
|
|
4743 |
}
|
4744 |
/**
|
4745 |
* Must be called to free up allocated memory after all manipulations are done
|
4746 |
-
*
|
4747 |
*/
|
4748 |
function destruct()
|
4749 |
{
|
4750 |
-
if (is_resource($this->newImage)) {
|
4751 |
-
@
|
4752 |
}
|
4753 |
-
if (is_resource($this->oldImage)) {
|
4754 |
-
@
|
4755 |
}
|
4756 |
-
if (is_resource($this->workingImage)) {
|
4757 |
-
@
|
4758 |
}
|
4759 |
}
|
4760 |
/**
|
@@ -5065,6 +5103,14 @@ class C_NggLegacy_Thumbnail
|
|
5065 |
ImagePng($this->newImage);
|
5066 |
}
|
5067 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5068 |
}
|
5069 |
}
|
5070 |
/**
|
@@ -5365,7 +5411,7 @@ class C_NggLegacy_Thumbnail
|
|
5365 |
function watermarkImage($relPOS = 'botRight', $xPOS = 0, $yPOS = 0)
|
5366 |
{
|
5367 |
// if it's a resource ID take it as watermark text image
|
5368 |
-
if (is_resource($this->watermarkImgPath)) {
|
5369 |
$this->workingImage = $this->watermarkImgPath;
|
5370 |
} else {
|
5371 |
// (possibly) search for the file from the document root
|
@@ -5685,7 +5731,7 @@ class Mixin_GalleryStorage_Base_Management extends Mixin
|
|
5685 |
$image = $mapper->find($image);
|
5686 |
}
|
5687 |
if ($image) {
|
5688 |
-
if (!
|
5689 |
$image->meta_data = array();
|
5690 |
}
|
5691 |
$dimensions = getimagesize($image_path);
|
369 |
if ($uri_arg == 'crop') {
|
370 |
$params['crop'] = true;
|
371 |
} else {
|
372 |
+
if (in_array(strtolower($uri_arg), apply_filters('ngg_allowed_file_types', NGG_DEFAULT_ALLOWED_FILE_TYPES))) {
|
373 |
$params['type'] = $uri_arg;
|
374 |
} else {
|
375 |
if (preg_match('/(\\d+)x(\\d+)(?:x(\\d+))?/i', $uri_arg, $size_match) > 0) {
|
2184 |
}
|
2185 |
function get_image_format_list()
|
2186 |
{
|
2187 |
+
$format_list = [IMAGETYPE_GIF => 'gif', IMAGETYPE_JPEG => 'jpg', IMAGETYPE_PNG => 'png', IMAGETYPE_WEBP => 'webp'];
|
2188 |
return $format_list;
|
2189 |
}
|
2190 |
/**
|
2485 |
// Remove all image files and purge all empty directories left over
|
2486 |
$iterator = new DirectoryIterator($abspath);
|
2487 |
// Only delete image files! Other files may be stored incorrectly but it's not our place to delete them
|
2488 |
+
$removable_extensions = apply_filters('ngg_allowed_file_types', NGG_DEFAULT_ALLOWED_FILE_TYPES);
|
2489 |
foreach ($removable_extensions as $extension) {
|
2490 |
$removable_extensions[] = $extension . '_backup';
|
2491 |
}
|
2783 |
{
|
2784 |
$extension = pathinfo($filename, PATHINFO_EXTENSION);
|
2785 |
$extension = strtolower($extension);
|
2786 |
+
$allowed_extensions = apply_filters('ngg_allowed_file_types', NGG_DEFAULT_ALLOWED_FILE_TYPES);
|
2787 |
foreach ($allowed_extensions as $extension) {
|
2788 |
$allowed_extensions[] = $extension . '_backup';
|
2789 |
}
|
2809 |
if (!$filename && isset($_FILES['file']) && $_FILES['file']['error'] == 0) {
|
2810 |
$filename = $_FILES['file']['tmp_name'];
|
2811 |
}
|
|
|
2812 |
// If we can, we'll verify the mime type
|
2813 |
if (function_exists('exif_imagetype')) {
|
2814 |
if (($image_type = @exif_imagetype($filename)) !== FALSE) {
|
2815 |
+
$retval = in_array(image_type_to_mime_type($image_type), NGG_DEFAULT_ALLOWED_MIME_TYPES);
|
2816 |
}
|
2817 |
} else {
|
2818 |
$file_info = @getimagesize($filename);
|
2819 |
if (isset($file_info[2])) {
|
2820 |
+
$retval = in_array(image_type_to_mime_type($file_info[2]), NGG_DEFAULT_ALLOWED_MIME_TYPES);
|
2821 |
}
|
2822 |
}
|
2823 |
return $retval;
|
2880 |
}
|
2881 |
return $filename;
|
2882 |
}
|
2883 |
+
/**
|
2884 |
+
* Determines whether a WebP image is animated which GD does not support.
|
2885 |
+
*
|
2886 |
+
* @see https://developers.google.com/speed/webp/docs/riff_container
|
2887 |
+
* @param string $filename
|
2888 |
+
* @return bool
|
2889 |
+
*/
|
2890 |
+
public function is_animated_webp($filename)
|
2891 |
+
{
|
2892 |
+
$retval = FALSE;
|
2893 |
+
$handle = fopen($filename, 'rb');
|
2894 |
+
fseek($handle, 12);
|
2895 |
+
if (fread($handle, 4) === 'VP8X') {
|
2896 |
+
fseek($handle, 20);
|
2897 |
+
$flag = fread($handle, 1);
|
2898 |
+
$retval = (bool) (ord($flag) >> 1 & 1);
|
2899 |
+
}
|
2900 |
+
fclose($handle);
|
2901 |
+
return $retval;
|
2902 |
+
}
|
2903 |
function import_image_file($dst_gallery, $image_abspath, $filename = NULL, $image = FALSE, $override = FALSE, $move = FALSE)
|
2904 |
{
|
2905 |
$image_abspath = wp_normalize_path($image_abspath);
|
2921 |
// Sanitize the filename for storing in the DB
|
2922 |
$filename = $this->sanitize_filename_for_db($filename);
|
2923 |
// Ensure that the filename is valid
|
2924 |
+
$extensions = apply_filters('ngg_allowed_file_types', NGG_DEFAULT_ALLOWED_FILE_TYPES);
|
2925 |
+
$extensions[] = '_backup';
|
2926 |
+
$ext_list = implode('|', $extensions);
|
2927 |
+
if (!preg_match("/({$ext_list})\$/i", $filename)) {
|
2928 |
throw new E_UploadException(__('Invalid image file. Acceptable formats: JPG, GIF, and PNG.', 'nggallery'));
|
2929 |
}
|
2930 |
+
// GD does not support animated WebP and will generate a fatal error when we try to create thumbnails or resize
|
2931 |
+
if ($this->is_animated_webp($image_abspath)) {
|
2932 |
+
throw new E_UploadException(__('Animated WebP images are not supported.', 'nggallery'));
|
2933 |
+
}
|
2934 |
// Compute the destination folder
|
2935 |
$new_image_abspath = path_join($gallery_abspath, $filename);
|
2936 |
// Are the src and dst the same? If so, we don't have to copy or move files
|
4621 |
@ini_set('memory_limit', -1);
|
4622 |
$image_size = @getimagesize($this->fileName);
|
4623 |
if (isset($image_size) && is_array($image_size)) {
|
4624 |
+
$extensions = [IMAGETYPE_GIF => 'GIF', IMAGETYPE_JPEG => 'JPG', IMAGETYPE_PNG => 'PNG', IMAGETYPE_WEBP => 'WEBP'];
|
4625 |
$extension = array_key_exists($image_size[2], $extensions) ? $extensions[$image_size[2]] : '';
|
4626 |
if ($extension) {
|
4627 |
$this->format = $extension;
|
4667 |
$img_err = __('Support for PNG format is missing.', 'nggallery');
|
4668 |
}
|
4669 |
break;
|
4670 |
+
case 'WEBP':
|
4671 |
+
if (function_exists('imagecreatefromwebp')) {
|
4672 |
+
$this->oldImage = @imagecreatefromwebp($this->fileName);
|
4673 |
+
} else {
|
4674 |
+
$img_err = __('Support for WEBP format is missing.', 'nggallery');
|
4675 |
+
}
|
4676 |
+
break;
|
4677 |
}
|
4678 |
if (!$this->oldImage) {
|
4679 |
if ($img_err == null) {
|
4713 |
// didn't get the channel for png
|
4714 |
$CHANNEL = 3;
|
4715 |
break;
|
4716 |
+
case 'WEBP':
|
4717 |
+
$CHANNEL = $imageInfo['bits'];
|
4718 |
+
break;
|
4719 |
}
|
4720 |
$bits = !empty($imageInfo['bits']) ? $imageInfo['bits'] : 32;
|
4721 |
// imgInfo[bits] is not always available
|
4737 |
// didn't get the channel for png
|
4738 |
$channels = 3;
|
4739 |
break;
|
4740 |
+
case 'WEBP':
|
4741 |
+
$CHANNEL = $imageInfo['bits'];
|
4742 |
+
break;
|
4743 |
}
|
4744 |
}
|
4745 |
if ($bits == null) {
|
4782 |
}
|
4783 |
/**
|
4784 |
* Must be called to free up allocated memory after all manipulations are done
|
|
|
4785 |
*/
|
4786 |
function destruct()
|
4787 |
{
|
4788 |
+
if (is_resource($this->newImage) || $this->newImage instanceof GdImage) {
|
4789 |
+
@imagedestroy($this->newImage);
|
4790 |
}
|
4791 |
+
if (is_resource($this->oldImage) || $this->newImage instanceof GdImage) {
|
4792 |
+
@imagedestroy($this->oldImage);
|
4793 |
}
|
4794 |
+
if (is_resource($this->workingImage) || $this->newImage instanceof GdImage) {
|
4795 |
+
@imagedestroy($this->workingImage);
|
4796 |
}
|
4797 |
}
|
4798 |
/**
|
5103 |
ImagePng($this->newImage);
|
5104 |
}
|
5105 |
break;
|
5106 |
+
case 'WEBP':
|
5107 |
+
if ($name != '') {
|
5108 |
+
$this->error = !@imagewebp($this->newImage, $name);
|
5109 |
+
} else {
|
5110 |
+
header('Content-type: image/webp');
|
5111 |
+
imagewebp($this->newImage);
|
5112 |
+
}
|
5113 |
+
break;
|
5114 |
}
|
5115 |
}
|
5116 |
/**
|
5411 |
function watermarkImage($relPOS = 'botRight', $xPOS = 0, $yPOS = 0)
|
5412 |
{
|
5413 |
// if it's a resource ID take it as watermark text image
|
5414 |
+
if (is_resource($this->watermarkImgPath) || $this->watermarkImgPath instanceof GdImage) {
|
5415 |
$this->workingImage = $this->watermarkImgPath;
|
5416 |
} else {
|
5417 |
// (possibly) search for the file from the document root
|
5731 |
$image = $mapper->find($image);
|
5732 |
}
|
5733 |
if ($image) {
|
5734 |
+
if (empty($image->meta_data) || !is_array($image->meta_data)) {
|
5735 |
$image->meta_data = array();
|
5736 |
}
|
5737 |
$dimensions = getimagesize($image_path);
|
products/photocrati_nextgen/modules/nextgen_gallery_display/module.nextgen_gallery_display.php
CHANGED
@@ -104,6 +104,11 @@ class M_Gallery_Display extends C_Base_Module
|
|
104 |
|
105 |
// Find our content and process it
|
106 |
global $wp_query;
|
|
|
|
|
|
|
|
|
|
|
107 |
$posts = $wp_query->posts;
|
108 |
foreach ($posts as $post) {
|
109 |
if (empty($post->post_content))
|
104 |
|
105 |
// Find our content and process it
|
106 |
global $wp_query;
|
107 |
+
|
108 |
+
// It's possible for the posts attribute to be empty or unset
|
109 |
+
if (!isset($wp_query->posts) || !is_array($wp_query->posts))
|
110 |
+
return;
|
111 |
+
|
112 |
$posts = $wp_query->posts;
|
113 |
foreach ($posts as $post) {
|
114 |
if (empty($post->post_content))
|
products/photocrati_nextgen/modules/ngglegacy/admin/admin.php
CHANGED
@@ -223,7 +223,10 @@ class nggAdminPanel{
|
|
223 |
'imageCount' => '1'
|
224 |
) );
|
225 |
wp_enqueue_script( 'shutter' );
|
226 |
-
|
|
|
|
|
|
|
227 |
break;
|
228 |
case "nggallery-manage-album" :
|
229 |
wp_enqueue_script( 'jquery-ui-dialog' );
|
223 |
'imageCount' => '1'
|
224 |
) );
|
225 |
wp_enqueue_script( 'shutter' );
|
226 |
+
|
227 |
+
// Thickbox is used to display images being managed
|
228 |
+
C_Lightbox_Library_Manager::get_instance()->enqueue('thickbox');
|
229 |
+
|
230 |
break;
|
231 |
case "nggallery-manage-album" :
|
232 |
wp_enqueue_script( 'jquery-ui-dialog' );
|
products/photocrati_nextgen/modules/ngglegacy/admin/functions.php
CHANGED
@@ -133,7 +133,7 @@ class nggAdmin{
|
|
133 |
* @return array $files list of image filenames
|
134 |
*/
|
135 |
static function scandir( $dirname = '.' ) {
|
136 |
-
$ext = apply_filters('ngg_allowed_file_types',
|
137 |
|
138 |
$files = array();
|
139 |
if( $handle = opendir( $dirname ) ) {
|
133 |
* @return array $files list of image filenames
|
134 |
*/
|
135 |
static function scandir( $dirname = '.' ) {
|
136 |
+
$ext = apply_filters('ngg_allowed_file_types', NGG_DEFAULT_ALLOWED_FILE_TYPES);
|
137 |
|
138 |
$files = array();
|
139 |
if( $handle = opendir( $dirname ) ) {
|
products/photocrati_nextgen/modules/ngglegacy/lib/gd.thumbnail.inc.php
CHANGED
@@ -149,8 +149,13 @@ class ngg_Thumbnail {
|
|
149 |
|
150 |
$data = @getimagesize($this->fileName);
|
151 |
if (isset($data) && is_array($data)) {
|
152 |
-
|
153 |
-
|
|
|
|
|
|
|
|
|
|
|
154 |
if($extension) {
|
155 |
$this->format = $extension;
|
156 |
} else {
|
@@ -184,6 +189,8 @@ class ngg_Thumbnail {
|
|
184 |
case 'PNG':
|
185 |
$this->oldImage = ImageCreateFromPng($this->fileName);
|
186 |
break;
|
|
|
|
|
187 |
}
|
188 |
if (!$this->oldImage) {
|
189 |
$this->errmsg = 'Create Image failed. Check memory limit';
|
@@ -223,6 +230,9 @@ class ngg_Thumbnail {
|
|
223 |
// didn't get the channel for png
|
224 |
$CHANNEL = 3;
|
225 |
break;
|
|
|
|
|
|
|
226 |
}
|
227 |
$MB = 1048576; // number of bytes in 1M
|
228 |
$K64 = 65536; // number of bytes in 64K
|
@@ -259,12 +269,17 @@ class ngg_Thumbnail {
|
|
259 |
|
260 |
/**
|
261 |
* Must be called to free up allocated memory after all manipulations are done
|
262 |
-
*
|
263 |
*/
|
264 |
-
function destruct()
|
265 |
-
|
266 |
-
if(is_resource($this->
|
267 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
}
|
269 |
|
270 |
/**
|
@@ -615,6 +630,15 @@ class ngg_Thumbnail {
|
|
615 |
ImagePng($this->newImage);
|
616 |
}
|
617 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
618 |
}
|
619 |
}
|
620 |
|
@@ -871,7 +895,7 @@ class ngg_Thumbnail {
|
|
871 |
function watermarkImage( $relPOS = 'botRight', $xPOS = 0, $yPOS = 0) {
|
872 |
|
873 |
// if it's a resource ID take it as watermark text image
|
874 |
-
if(is_resource($this->watermarkImgPath)) {
|
875 |
$this->workingImage = $this->watermarkImgPath;
|
876 |
} else {
|
877 |
// Would you really want to use anything other than a png?
|
149 |
|
150 |
$data = @getimagesize($this->fileName);
|
151 |
if (isset($data) && is_array($data)) {
|
152 |
+
$extensions = [
|
153 |
+
IMAGETYPE_GIF => 'GIF',
|
154 |
+
IMAGETYPE_JPEG => 'JPG',
|
155 |
+
IMAGETYPE_PNG => 'PNG',
|
156 |
+
IMAGETYPE_WEBP => 'WEBP'
|
157 |
+
];
|
158 |
+
$extension = array_key_exists($data[2], $extensions) ? $extensions[$data[2]] : '';
|
159 |
if($extension) {
|
160 |
$this->format = $extension;
|
161 |
} else {
|
189 |
case 'PNG':
|
190 |
$this->oldImage = ImageCreateFromPng($this->fileName);
|
191 |
break;
|
192 |
+
case 'WEBP':
|
193 |
+
$this->oldImage = imagecreatefromwebp($this->fileName);
|
194 |
}
|
195 |
if (!$this->oldImage) {
|
196 |
$this->errmsg = 'Create Image failed. Check memory limit';
|
230 |
// didn't get the channel for png
|
231 |
$CHANNEL = 3;
|
232 |
break;
|
233 |
+
case 'WEBP':
|
234 |
+
$channel = $imageInfo['bits'];
|
235 |
+
break;
|
236 |
}
|
237 |
$MB = 1048576; // number of bytes in 1M
|
238 |
$K64 = 65536; // number of bytes in 64K
|
269 |
|
270 |
/**
|
271 |
* Must be called to free up allocated memory after all manipulations are done
|
|
|
272 |
*/
|
273 |
+
function destruct()
|
274 |
+
{
|
275 |
+
if (is_resource($this->newImage) || $this->newImage instanceof GdImage)
|
276 |
+
@imagedestroy($this->newImage);
|
277 |
+
|
278 |
+
if (is_resource($this->oldImage) || $this->newImage instanceof GdImage)
|
279 |
+
@imagedestroy($this->oldImage);
|
280 |
+
|
281 |
+
if (is_resource($this->workingImage) || $this->newImage instanceof GdImage)
|
282 |
+
@imagedestroy($this->workingImage);
|
283 |
}
|
284 |
|
285 |
/**
|
630 |
ImagePng($this->newImage);
|
631 |
}
|
632 |
break;
|
633 |
+
case 'WEBP':
|
634 |
+
if ($name != '') {
|
635 |
+
$this->error = !@imagewebp($this->newImage, $name);
|
636 |
+
}
|
637 |
+
else {
|
638 |
+
header('Content-type: image/webp');
|
639 |
+
imagewebp($this->newImage);
|
640 |
+
}
|
641 |
+
break;
|
642 |
}
|
643 |
}
|
644 |
|
895 |
function watermarkImage( $relPOS = 'botRight', $xPOS = 0, $yPOS = 0) {
|
896 |
|
897 |
// if it's a resource ID take it as watermark text image
|
898 |
+
if(is_resource($this->watermarkImgPath) || $this->watermarkImgPath instanceof GdImage) {
|
899 |
$this->workingImage = $this->watermarkImgPath;
|
900 |
} else {
|
901 |
// Would you really want to use anything other than a png?
|
products/photocrati_nextgen/modules/ngglegacy/lib/ngg-db.php
CHANGED
@@ -537,7 +537,7 @@ class nggdb
|
|
537 |
* @param int $sortorder (optional)
|
538 |
* @return int Result of the ID of the inserted image
|
539 |
*/
|
540 |
-
function add_image($id = false, $filename = false, $description = '', $alttext = '', $meta_data = false, $post_id = 0, $imagedate = '0000-00-00 00:00:00', $exclude = 0, $sortorder = 0)
|
541 |
{
|
542 |
global $wpdb;
|
543 |
|
537 |
* @param int $sortorder (optional)
|
538 |
* @return int Result of the ID of the inserted image
|
539 |
*/
|
540 |
+
public static function add_image($id = false, $filename = false, $description = '', $alttext = '', $meta_data = false, $post_id = 0, $imagedate = '0000-00-00 00:00:00', $exclude = 0, $sortorder = 0)
|
541 |
{
|
542 |
global $wpdb;
|
543 |
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: photocrati, imagely
|
3 |
Tags: wordpress gallery plugin, gallery, nextgen, nextgen gallery, photo gallery, image gallery, photography, slideshow, images, photo, photo album, watermark
|
4 |
Requires at least: 5.5.4
|
5 |
-
Stable tag: 3.
|
6 |
-
Tested up to: 5.
|
7 |
License: GPLv3
|
8 |
Requires PHP: 5.6
|
9 |
|
@@ -179,6 +179,11 @@ For more information, feel free to visit the official website for the NextGEN Ga
|
|
179 |
|
180 |
== Changelog ==
|
181 |
|
|
|
|
|
|
|
|
|
|
|
182 |
= V3.13 - 08.04.2021
|
183 |
* Fixed: All WP-Admin links had "/wp-admin/" removed for some users
|
184 |
|
2 |
Contributors: photocrati, imagely
|
3 |
Tags: wordpress gallery plugin, gallery, nextgen, nextgen gallery, photo gallery, image gallery, photography, slideshow, images, photo, photo album, watermark
|
4 |
Requires at least: 5.5.4
|
5 |
+
Stable tag: 3.14
|
6 |
+
Tested up to: 5.8
|
7 |
License: GPLv3
|
8 |
Requires PHP: 5.6
|
9 |
|
179 |
|
180 |
== Changelog ==
|
181 |
|
182 |
+
= V3.14 - 08.18.2021
|
183 |
+
* NEW: Added support for unanimated WebP images
|
184 |
+
* Fixed: PHP warning was generated when enqueueing frontend resources
|
185 |
+
* Fixed: "Scan folder for new images" was failing with PHP 8+
|
186 |
+
|
187 |
= V3.13 - 08.04.2021
|
188 |
* Fixed: All WP-Admin links had "/wp-admin/" removed for some users
|
189 |
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitdf834cf03fd70a9650c3e4bc171ad29a::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -24,15 +24,15 @@ class ComposerAutoloaderInitb306934e72249cb9ae140e81b71d2647
|
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
-
spl_autoload_register(array('
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
29 |
-
spl_autoload_unregister(array('
|
30 |
|
31 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
32 |
if ($useStaticLoader) {
|
33 |
require __DIR__ . '/autoload_static.php';
|
34 |
|
35 |
-
call_user_func(\Composer\Autoload\
|
36 |
} else {
|
37 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
38 |
foreach ($map as $namespace => $path) {
|
@@ -53,19 +53,19 @@ class ComposerAutoloaderInitb306934e72249cb9ae140e81b71d2647
|
|
53 |
$loader->register(true);
|
54 |
|
55 |
if ($useStaticLoader) {
|
56 |
-
$includeFiles = Composer\Autoload\
|
57 |
} else {
|
58 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
59 |
}
|
60 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
61 |
-
|
62 |
}
|
63 |
|
64 |
return $loader;
|
65 |
}
|
66 |
}
|
67 |
|
68 |
-
function
|
69 |
{
|
70 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
71 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitdf834cf03fd70a9650c3e4bc171ad29a
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
+
spl_autoload_register(array('ComposerAutoloaderInitdf834cf03fd70a9650c3e4bc171ad29a', 'loadClassLoader'), true, true);
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
29 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitdf834cf03fd70a9650c3e4bc171ad29a', 'loadClassLoader'));
|
30 |
|
31 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
32 |
if ($useStaticLoader) {
|
33 |
require __DIR__ . '/autoload_static.php';
|
34 |
|
35 |
+
call_user_func(\Composer\Autoload\ComposerStaticInitdf834cf03fd70a9650c3e4bc171ad29a::getInitializer($loader));
|
36 |
} else {
|
37 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
38 |
foreach ($map as $namespace => $path) {
|
53 |
$loader->register(true);
|
54 |
|
55 |
if ($useStaticLoader) {
|
56 |
+
$includeFiles = Composer\Autoload\ComposerStaticInitdf834cf03fd70a9650c3e4bc171ad29a::$files;
|
57 |
} else {
|
58 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
59 |
}
|
60 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
61 |
+
composerRequiredf834cf03fd70a9650c3e4bc171ad29a($fileIdentifier, $file);
|
62 |
}
|
63 |
|
64 |
return $loader;
|
65 |
}
|
66 |
}
|
67 |
|
68 |
+
function composerRequiredf834cf03fd70a9650c3e4bc171ad29a($fileIdentifier, $file)
|
69 |
{
|
70 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
71 |
require $file;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'2cffec82183ee1cea088009cef9a6fc3' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
|
@@ -28,8 +28,8 @@ class ComposerStaticInitb306934e72249cb9ae140e81b71d2647
|
|
28 |
public static function getInitializer(ClassLoader $loader)
|
29 |
{
|
30 |
return \Closure::bind(function () use ($loader) {
|
31 |
-
$loader->prefixesPsr0 =
|
32 |
-
$loader->classMap =
|
33 |
|
34 |
}, null, ClassLoader::class);
|
35 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitdf834cf03fd70a9650c3e4bc171ad29a
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'2cffec82183ee1cea088009cef9a6fc3' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
|
28 |
public static function getInitializer(ClassLoader $loader)
|
29 |
{
|
30 |
return \Closure::bind(function () use ($loader) {
|
31 |
+
$loader->prefixesPsr0 = ComposerStaticInitdf834cf03fd70a9650c3e4bc171ad29a::$prefixesPsr0;
|
32 |
+
$loader->classMap = ComposerStaticInitdf834cf03fd70a9650c3e4bc171ad29a::$classMap;
|
33 |
|
34 |
}, null, ClassLoader::class);
|
35 |
}
|
vendor/imagely/pope-framework/lib/class.base_module.php
CHANGED
@@ -90,20 +90,20 @@ abstract class C_Base_Module
|
|
90 |
*/
|
91 |
function get_type_list()
|
92 |
{
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
|
108 |
if (isset($except_modules[$this->module_id]))
|
109 |
{
|
90 |
*/
|
91 |
function get_type_list()
|
92 |
{
|
93 |
+
// XXX small hack to skip photocrati theme modules scans
|
94 |
+
$except_modules = array(
|
95 |
+
'photocrati-gallery_legacy' => array(),
|
96 |
+
'photocrati-theme_bulk' => array(),
|
97 |
+
'photocrati-theme_admin' => array(),
|
98 |
+
'photocrati-auto_update' => array(
|
99 |
+
'A_Autoupdate_Settings' => 'adapter.autoupdate_settings.php'
|
100 |
+
),
|
101 |
+
'photocrati-auto_update-admin' => array(
|
102 |
+
'A_Autoupdate_Admin_Ajax' => 'adapter.autoupdate_admin_ajax.php',
|
103 |
+
'A_Autoupdate_Admin_Factory' => 'adapter.autoupdate_admin_factory.php',
|
104 |
+
'C_Autoupdate_Admin_Ajax' => 'class.autoupdate_admin_ajax.php',
|
105 |
+
'C_Autoupdate_Admin_Controller' => 'class.autoupdate_admin_controller.php'
|
106 |
+
));
|
107 |
|
108 |
if (isset($except_modules[$this->module_id]))
|
109 |
{
|
vendor/imagely/pope-framework/lib/class.component_registry.php
CHANGED
@@ -793,41 +793,38 @@ class C_Component_Registry
|
|
793 |
$recursive_level++;
|
794 |
|
795 |
$abspath = str_replace(array('\\', '/'), DIRECTORY_SEPARATOR, $abspath);
|
796 |
-
if (!in_array($abspath, $exclusions))
|
797 |
-
{
|
798 |
$contents = @scandir($abspath);
|
799 |
-
if ($contents)
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
// The
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
// to guess if there's a module or product file under the directory with the same name as
|
815 |
-
// the directory
|
816 |
-
if ($recursive === TRUE || (is_int($recursive) && $recursive_level <= $recursive)) {
|
817 |
-
$retval = array_merge($retval, $this->find_product_and_module_files($filename_abspath, $recursive));
|
818 |
-
} elseif (file_exists(($module_abspath = $filename_abspath . DIRECTORY_SEPARATOR . 'module.' . $filename . '.php'))) {
|
819 |
-
$filename = 'module.' . $filename . '.php';
|
820 |
-
$filename_abspath = $module_abspath;
|
821 |
-
} elseif (@file_exists(($product_abspath = $filename_abspath . DIRECTORY_SEPARATOR . 'product.' . $filename . '.php'))) {
|
822 |
-
$filename = 'product.' . $filename . '.php';
|
823 |
-
$filename_abspath = $module_abspath;
|
824 |
-
}
|
825 |
-
|
826 |
}
|
827 |
|
828 |
-
|
829 |
-
$
|
|
|
830 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
831 |
}
|
832 |
}
|
833 |
}
|
793 |
$recursive_level++;
|
794 |
|
795 |
$abspath = str_replace(array('\\', '/'), DIRECTORY_SEPARATOR, $abspath);
|
796 |
+
if (!in_array($abspath, $exclusions)) {
|
|
|
797 |
$contents = @scandir($abspath);
|
798 |
+
if ($contents) foreach ($contents as $filename) {
|
799 |
+
if (in_array($filename, $exclusions)) continue;
|
800 |
+
$filename_abspath = $abspath.DIRECTORY_SEPARATOR.$filename;
|
801 |
+
|
802 |
+
// Is this a subdirectory?
|
803 |
+
// We don't use is_dir(), as it's less efficient than just checking for a 'dot' in the filename.
|
804 |
+
// The problem is that we're assuming that our directories won't contain a 'dot'.
|
805 |
+
if ($recursive && strpos($filename, '.') === FALSE) {
|
806 |
+
|
807 |
+
// The recursive parameter can either be set to TRUE or the number of levels to navigate
|
808 |
+
// If we reach the max number of recursive levels we're supported to navigate, then we try
|
809 |
+
// to guess if there's a module or product file under the directory with the same name as
|
810 |
+
// the directory
|
811 |
+
if ($recursive === TRUE || (is_int($recursive) && $recursive_level <= $recursive)) {
|
812 |
+
$retval = array_merge($retval, $this->find_product_and_module_files($filename_abspath, $recursive));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
813 |
}
|
814 |
|
815 |
+
elseif (@file_exists(($module_abspath = $filename_abspath.DIRECTORY_SEPARATOR.'module.'.$filename.'.php'))) {
|
816 |
+
$filename = 'module.'.$filename.'.php';
|
817 |
+
$filename_abspath = $module_abspath;
|
818 |
}
|
819 |
+
elseif (@file_exists(($product_abspath = $filename_abspath.DIRECTORY_SEPARATOR.'product.'.$filename.'.php'))) {
|
820 |
+
$filename = 'product.'.$filename.'.php';
|
821 |
+
$filename_abspath = $module_abspath;
|
822 |
+
}
|
823 |
+
|
824 |
+
}
|
825 |
+
|
826 |
+
if ((strpos($filename, 'module.') === 0 OR strpos($filename, 'product.') === 0) AND !$this->is_blacklisted($filename)) {
|
827 |
+
$retval[] = $filename_abspath;
|
828 |
}
|
829 |
}
|
830 |
}
|