From 6d523c847b6c77476480c5d3b3ffdc56650bdba6 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sun, 9 Jun 2019 09:01:32 -0700 Subject: [PATCH 01/14] Updated Arabic lang files --- language/ar/common.php | 4 ++-- language/ar/lightbox.php | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/language/ar/common.php b/language/ar/common.php index 700fd7c..9a9377b 100644 --- a/language/ar/common.php +++ b/language/ar/common.php @@ -2,7 +2,7 @@ /** * * Lightbox extension for the phpBB Forum Software package. - * [Arabic] Translated By : Bassel Taha Alhitary - www.alhitary.net + * [Arabic] Translated By : Bassel Taha Alhitary * * @copyright (c) 2015 Matt Friedman * @license GNU General Public License, version 2 (GPL-2.0) @@ -23,5 +23,5 @@ } $lang = array_merge($lang, array( - 'LIGHTBOX_GALLERY_LABEL' => 'Image %1 of %2', + 'LIGHTBOX_GALLERY_LABEL' => 'الصورة %1 من %2', )); diff --git a/language/ar/lightbox.php b/language/ar/lightbox.php index 26afe53..e808712 100644 --- a/language/ar/lightbox.php +++ b/language/ar/lightbox.php @@ -2,7 +2,7 @@ /** * * Lightbox extension for the phpBB Forum Software package. - * [Arabic] Translated By : Bassel Taha Alhitary - www.alhitary.net + * [Arabic] Translated By : Bassel Taha Alhitary * * @copyright (c) 2015 Matt Friedman * @license GNU General Public License, version 2 (GPL-2.0) @@ -23,20 +23,20 @@ } $lang = array_merge($lang, array( - 'LIGHTBOX_SETTINGS' => 'إعدادات تصغير الصور', - 'LIGHTBOX_MAX_WIDTH' => 'الحد الأقصى لعرض الصورة بالبكسل ', + 'LIGHTBOX_SETTINGS' => 'إعدادات تصغير الصور Lightbox', + 'LIGHTBOX_MAX_WIDTH' => 'الحد الأقصى لعرض الصورة', 'LIGHTBOX_MAX_WIDTH_EXPLAIN' => 'سيتم تصغير الصور التي تتجاوز هذه القيمة ويمكن تكبيرها بإستخدام تقنية النافذة المضيئة Lightbox. القيمة صفر يعني تعطيل هذا الخيار.', 'LIGHTBOX_MAX_WIDTH_APPEND' => 'التوصية تعتمد على إعدادات الصورة المُرفقة : %spx', - 'LIGHTBOX_MAX_HEIGHT' => 'Maximum image height', - 'LIGHTBOX_MAX_HEIGHT_EXPLAIN' => 'Images that exceed this height will be resized and can be enlarged using the Lightbox effect. Set this value to 0 to disable Lightbox image resizing by height.', - 'LIGHTBOX_ALL_IMAGES' => 'Include all images in Lightbox effect', - 'LIGHTBOX_ALL_IMAGES_EXPLAIN' => 'With this setting enabled, all posted images can be opened in the Lightbox effect even if they are not being resized.', - 'LIGHTBOX_GALLERY' => 'السماح بالتنقل بين الصور ', + 'LIGHTBOX_MAX_HEIGHT' => 'الحد الأقصى لارتفاع الصورة', + 'LIGHTBOX_MAX_HEIGHT_EXPLAIN' => 'سيتم تصغير الصور التي تتجاوز هذه القيمة ويمكن تكبيرها بإستخدام تقنية النافذة المضيئة Lightbox. القيمة صفر تعني تعطيل هذا الخيار.', + 'LIGHTBOX_ALL_IMAGES' => 'التطبيق على جميع الصور ', + 'LIGHTBOX_ALL_IMAGES_EXPLAIN' => 'عند اختيارك “نعم”, سيكون بالامكان فتح جميع صور المشاركات بواسطة تقنية النافذة المضيئة Lightbox حتى إذا لم يتم تصغير حجمها.', + 'LIGHTBOX_GALLERY' => 'السماح بالتنقل بين الصور', 'LIGHTBOX_GALLERY_EXPLAIN' => 'السماح بسهولة التنقل بين جميع الصور المُصغرة في الصفحة بإستخدام تقنية النافذة المضيئة.', - 'LIGHTBOX_GALLERY_ALL' => 'All resized images on page', - 'LIGHTBOX_GALLERY_POSTS' => 'All resized images per post', - 'LIGHTBOX_SIGNATURES' => 'تصغير صور التواقيع ', + 'LIGHTBOX_GALLERY_ALL' => 'جميع الصور المُصغرة في الصفحة', + 'LIGHTBOX_GALLERY_POSTS' => 'جميع الصور المُصغرة بكل مشاركة', + 'LIGHTBOX_SIGNATURES' => 'تصغير صور التواقيع', 'LIGHTBOX_SIGNATURES_EXPLAIN' => 'السماح بتصغير الصور الموجودة في تواقيع الأعضاء.', - 'LIGHTBOX_IMG_TITLES' => 'إظهار أسماء الصور ', + 'LIGHTBOX_IMG_TITLES' => 'إظهار أسماء الصور', 'LIGHTBOX_IMG_TITLES_EXPLAIN' => 'سيتم عرض أسماء الصور كعنوان في خانة التفاصيل للصورة.', )); From 690494a0e25fb16cb19fd72bb2031d8ea8230def Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sat, 13 Jul 2019 17:52:24 -0700 Subject: [PATCH 02/14] Update composer --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ce60551..81e55e8 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "type": "phpbb-extension", "description": "Lightbox for phpBB can resize posted images to a maximum set height/width and display them full-screen in an elegant Lightbox overlay effect.", "homepage": "https://github.com/VSEphpbb/lightbox", - "version": "2.0.1", + "version": "2.0.2-dev", "keywords": ["phpbb", "extension", "lightbox", "image", "resizer"], "license": "GPL-2.0-only", "authors": [ From f8731f2bb6550b8ed56106002cc3a06c2db8637f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20M?= Date: Thu, 17 Oct 2019 22:30:13 +0200 Subject: [PATCH 03/14] Minor update of the FRENCH translation for the Lightbox extension --- language/fr/common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language/fr/common.php b/language/fr/common.php index 495ee57..3682db1 100644 --- a/language/fr/common.php +++ b/language/fr/common.php @@ -23,5 +23,5 @@ } $lang = array_merge($lang, array( - 'LIGHTBOX_GALLERY_LABEL' => 'Image %1 de %2', + 'LIGHTBOX_GALLERY_LABEL' => 'Image %1 sur %2', )); From e3543f8ff8ee57bfc88bcd83600d1df764273e53 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Fri, 25 Oct 2019 00:16:39 -0700 Subject: [PATCH 04/14] Use build_select ACP function --- event/listener.php | 27 +-------------------------- tests/event/listener_test.php | 12 ------------ 2 files changed, 1 insertion(+), 38 deletions(-) diff --git a/event/listener.php b/event/listener.php index cf3821e..3b91ab6 100644 --- a/event/listener.php +++ b/event/listener.php @@ -103,7 +103,7 @@ public function add_lightbox_acp_config($event) 'lightbox_max_width' => array('lang' => 'LIGHTBOX_MAX_WIDTH', 'validate' => 'int:0:99999', 'type' => 'number:0:99999', 'explain' => true, 'append' => ' ' . $this->language->lang('PIXEL') . '
' . $l_append), 'lightbox_max_height' => array('lang' => 'LIGHTBOX_MAX_HEIGHT', 'validate' => 'int:0:99999', 'type' => 'number:0:99999', 'explain' => true, 'append' => ' ' . $this->language->lang('PIXEL') . '
' . $l_append), 'lightbox_all_images' => array('lang' => 'LIGHTBOX_ALL_IMAGES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), - 'lightbox_gallery' => array('lang' => 'LIGHTBOX_GALLERY', 'validate' => 'int', 'type' => 'select', 'function' => array($this, 'select_gallery_mode'), 'explain' => true), + 'lightbox_gallery' => array('lang' => 'LIGHTBOX_GALLERY', 'validate' => 'int', 'type' => 'select', 'function' => 'build_select', 'params' => array(array(0 => 'DISABLED', 1 => 'LIGHTBOX_GALLERY_ALL', 2 => 'LIGHTBOX_GALLERY_POSTS'), '{CONFIG_VALUE}'), 'explain' => true), 'lightbox_signatures' => array('lang' => 'LIGHTBOX_SIGNATURES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'lightbox_img_titles' => array('lang' => 'LIGHTBOX_IMG_TITLES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), ); @@ -114,31 +114,6 @@ public function add_lightbox_acp_config($event) } } - /** - * Create options for the gallery mode select setting - * - * @param int $selected The current value of the config setting - * @param string $cfg_key The name of the config key - * @return string The HTML option tags - * @access public - */ - public function select_gallery_mode($selected, $cfg_key = '') - { - $options = ''; - $opt_ary = array( - 0 => 'DISABLED', - 1 => 'LIGHTBOX_GALLERY_ALL', - 2 => 'LIGHTBOX_GALLERY_POSTS', - ); - - foreach ($opt_ary as $opt_key => $opt_value) - { - $options .= ''; - } - - return $options; - } - /** * Find lowest value that is not 0 * Accepts variable number of comparable parameters diff --git a/tests/event/listener_test.php b/tests/event/listener_test.php index 0fd08b8..b860a09 100644 --- a/tests/event/listener_test.php +++ b/tests/event/listener_test.php @@ -193,16 +193,4 @@ public function test_add_lightbox_acp_config($mode, $display_vars, $expected_key $this->assertEquals($expected_keys, $keys); } - - /** - * Test the select_gallery_mode method - */ - public function test_select_gallery_mode() - { - $this->set_listener(); - - $expected = ''; - - $this->assertEquals($expected, $this->listener->select_gallery_mode(0)); - } } From 2b5816e96521463bc7889db72111c79ab9e97f63 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Wed, 30 Oct 2019 12:09:21 -0700 Subject: [PATCH 05/14] Javascript updates --- styles/all/template/js/resizer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/styles/all/template/js/resizer.js b/styles/all/template/js/resizer.js index 9d212bb..6c86b36 100644 --- a/styles/all/template/js/resizer.js +++ b/styles/all/template/js/resizer.js @@ -11,9 +11,9 @@ borderRadius: '6px', transition: 'border-color 0.1s ease-out', cursor: 'pointer' - }).hover(function() { + }).on('mouseenter', function() { $(this).css('border-color', '#4ae'); - }, function() { + }).on('mouseleave', function() { $(this).css('border-color', 'transparent'); }); }); From 5ab736a167c05472969a91e1b7f16081d32397af Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Wed, 30 Oct 2019 12:09:51 -0700 Subject: [PATCH 06/14] Update to Lightbox 2.11.1 --- styles/all/template/lightbox/css/lightbox.css | 1 + .../template/lightbox/css/lightbox.min.css | 2 +- styles/all/template/lightbox/js/lightbox.js | 62 +++++++++++++------ .../all/template/lightbox/js/lightbox.min.js | 4 +- .../all/template/lightbox/js/lightbox.min.map | 2 +- 5 files changed, 48 insertions(+), 23 deletions(-) diff --git a/styles/all/template/lightbox/css/lightbox.css b/styles/all/template/lightbox/css/lightbox.css index 99a025f..b3b0beb 100755 --- a/styles/all/template/lightbox/css/lightbox.css +++ b/styles/all/template/lightbox/css/lightbox.css @@ -21,6 +21,7 @@ body.lb-disable-scrolling { text-align: center; line-height: 0; font-weight: normal; + outline: none; } .lightbox .lb-image { diff --git a/styles/all/template/lightbox/css/lightbox.min.css b/styles/all/template/lightbox/css/lightbox.min.css index 2ca46cd..adbaa83 100755 --- a/styles/all/template/lightbox/css/lightbox.min.css +++ b/styles/all/template/lightbox/css/lightbox.min.css @@ -1 +1 @@ -.lb-loader,.lightbox{text-align:center;line-height:0}.lb-dataContainer:after,.lb-outerContainer:after{content:"";clear:both}body.lb-disable-scrolling{overflow:hidden}.lightboxOverlay{position:absolute;top:0;left:0;z-index:9999;background-color:#000;filter:alpha(Opacity=80);opacity:.8;display:none}.lightbox{position:absolute;left:0;width:100%;z-index:10000;font-weight:400}.lightbox .lb-image{display:block;height:auto;max-width:inherit;max-height:none;border-radius:3px;border:4px solid #fff}.lightbox a img{border:none}.lb-outerContainer{position:relative;width:250px;height:250px;margin:0 auto;border-radius:4px;background-color:#fff}.lb-loader,.lb-nav{position:absolute;left:0}.lb-outerContainer:after{display:table}.lb-loader{top:43%;height:25%;width:100%}.lb-cancel{display:block;width:32px;height:32px;margin:0 auto;background:url(../images/loading.gif) no-repeat}.lb-nav{top:0;height:100%;width:100%;z-index:10}.lb-container>.nav{left:0}.lb-nav a{outline:0;background-image:url(data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==)}.lb-next,.lb-prev{height:100%;cursor:pointer;display:block}.lb-nav a.lb-prev{width:34%;left:0;float:left;background:url(../images/prev.png) left 48% no-repeat;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-prev:hover{filter:alpha(Opacity=100);opacity:1}.lb-nav a.lb-next{width:64%;right:0;float:right;background:url(../images/next.png) right 48% no-repeat;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-next:hover{filter:alpha(Opacity=100);opacity:1}.lb-dataContainer{margin:0 auto;padding-top:5px;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.lb-dataContainer:after{display:table}.lb-data{padding:0 4px;color:#ccc}.lb-data .lb-details{width:85%;float:left;text-align:left;line-height:1.1em}.lb-data .lb-caption{font-size:13px;font-weight:700;line-height:1em}.lb-data .lb-caption a{color:#4ae}.lb-data .lb-number{display:block;clear:left;padding-bottom:1em;font-size:12px;color:#999}.lb-data .lb-close{display:block;float:right;width:30px;height:30px;background:url(../images/close.png) top right no-repeat;text-align:right;outline:0;filter:alpha(Opacity=70);opacity:.7;-webkit-transition:opacity .2s;-moz-transition:opacity .2s;-o-transition:opacity .2s;transition:opacity .2s}.lb-data .lb-close:hover{cursor:pointer;filter:alpha(Opacity=100);opacity:1} \ No newline at end of file +.lb-loader,.lightbox{text-align:center;line-height:0;position:absolute;left:0}body.lb-disable-scrolling{overflow:hidden}.lightboxOverlay{position:absolute;top:0;left:0;z-index:9999;background-color:#000;filter:alpha(Opacity=80);opacity:.8;display:none}.lightbox{width:100%;z-index:10000;font-weight:400;outline:0}.lightbox .lb-image{display:block;height:auto;max-width:inherit;max-height:none;border-radius:3px;border:4px solid #fff}.lightbox a img{border:none}.lb-outerContainer{position:relative;width:250px;height:250px;margin:0 auto;border-radius:4px;background-color:#fff}.lb-outerContainer:after{content:"";display:table;clear:both}.lb-loader{top:43%;height:25%;width:100%}.lb-cancel{display:block;width:32px;height:32px;margin:0 auto;background:url(../images/loading.gif) no-repeat}.lb-nav{position:absolute;top:0;left:0;height:100%;width:100%;z-index:10}.lb-container>.nav{left:0}.lb-nav a{outline:0;background-image:url(data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==)}.lb-next,.lb-prev{height:100%;cursor:pointer;display:block}.lb-nav a.lb-prev{width:34%;left:0;float:left;background:url(../images/prev.png) left 48% no-repeat;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-prev:hover{filter:alpha(Opacity=100);opacity:1}.lb-nav a.lb-next{width:64%;right:0;float:right;background:url(../images/next.png) right 48% no-repeat;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-next:hover{filter:alpha(Opacity=100);opacity:1}.lb-dataContainer{margin:0 auto;padding-top:5px;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.lb-dataContainer:after{content:"";display:table;clear:both}.lb-data{padding:0 4px;color:#ccc}.lb-data .lb-details{width:85%;float:left;text-align:left;line-height:1.1em}.lb-data .lb-caption{font-size:13px;font-weight:700;line-height:1em}.lb-data .lb-caption a{color:#4ae}.lb-data .lb-number{display:block;clear:left;padding-bottom:1em;font-size:12px;color:#999}.lb-data .lb-close{display:block;float:right;width:30px;height:30px;background:url(../images/close.png) top right no-repeat;text-align:right;outline:0;filter:alpha(Opacity=70);opacity:.7;-webkit-transition:opacity .2s;-moz-transition:opacity .2s;-o-transition:opacity .2s;transition:opacity .2s}.lb-data .lb-close:hover{cursor:pointer;filter:alpha(Opacity=100);opacity:1} \ No newline at end of file diff --git a/styles/all/template/lightbox/js/lightbox.js b/styles/all/template/lightbox/js/lightbox.js index a1bb308..8d8ea06 100755 --- a/styles/all/template/lightbox/js/lightbox.js +++ b/styles/all/template/lightbox/js/lightbox.js @@ -1,5 +1,5 @@ /*! - * Lightbox v2.11.0 + * Lightbox v2.11.1 * by Lokesh Dhakar * * More info: @@ -99,7 +99,19 @@ } var self = this; - $('
').appendTo($('body')); + + // The two root notes generated, #lightboxOverlay and #lightbox are given + // tabindex attrs so they are focusable. We attach our keyboard event + // listeners to these two elements, and not the document. Clicking anywhere + // while Lightbox is opened will keep the focus on or inside one of these + // two elements. + // + // We do this so we can prevent propogation of the Esc keypress when + // Lightbox is open. This prevents it from intefering with other components + // on the page below. + // + // Github issue: https://github.com/lokesh/lightbox2/issues/663 + $('
').appendTo($('body')); // Cache jQuery objects this.$lightbox = $('#lightbox'); @@ -323,24 +335,28 @@ if (self.options.maxWidth && self.options.maxWidth < maxImageWidth) { maxImageWidth = self.options.maxWidth; } - if (self.options.maxHeight && self.options.maxHeight < maxImageWidth) { + if (self.options.maxHeight && self.options.maxHeight < maxImageHeight) { maxImageHeight = self.options.maxHeight; } - // Is the current image's width or height is greater than the maxImageWidth or maxImageHeight - // option than we need to size down while maintaining the aspect ratio. - if ((preloader.width > maxImageWidth) || (preloader.height > maxImageHeight)) { - if ((preloader.width / maxImageWidth) > (preloader.height / maxImageHeight)) { - imageWidth = maxImageWidth; - imageHeight = parseInt(preloader.height / (preloader.width / imageWidth), 10); - $image.width(imageWidth); - $image.height(imageHeight); - } else { - imageHeight = maxImageHeight; - imageWidth = parseInt(preloader.width / (preloader.height / imageHeight), 10); - $image.width(imageWidth); - $image.height(imageHeight); - } + } else { + maxImageWidth = self.options.maxWidth || preloader.width || maxImageWidth; + maxImageHeight = self.options.maxHeight || preloader.height || maxImageHeight; + } + + // Is the current image's width or height is greater than the maxImageWidth or maxImageHeight + // option than we need to size down while maintaining the aspect ratio. + if ((preloader.width > maxImageWidth) || (preloader.height > maxImageHeight)) { + if ((preloader.width / maxImageWidth) > (preloader.height / maxImageHeight)) { + imageWidth = maxImageWidth; + imageHeight = parseInt(preloader.height / (preloader.width / imageWidth), 10); + $image.width(imageWidth); + $image.height(imageHeight); + } else { + imageHeight = maxImageHeight; + imageWidth = parseInt(preloader.width / (preloader.height / imageHeight), 10); + $image.width(imageWidth); + $image.height(imageHeight); } } self.sizeContainer($image.width(), $image.height()); @@ -383,6 +399,10 @@ self.$lightbox.find('.lb-dataContainer').width(newWidth); self.$lightbox.find('.lb-prevLink').height(newHeight); self.$lightbox.find('.lb-nextLink').height(newHeight); + + // Set focus on one of the two root nodes so keyboard events are captured. + self.$overlay.focus(); + self.showImage(); } @@ -489,11 +509,13 @@ }; Lightbox.prototype.enableKeyboardNav = function() { - $(document).on('keyup.keyboard', $.proxy(this.keyboardAction, this)); + this.$lightbox.on('keyup.keyboard', $.proxy(this.keyboardAction, this)); + this.$overlay.on('keyup.keyboard', $.proxy(this.keyboardAction, this)); }; Lightbox.prototype.disableKeyboardNav = function() { - $(document).off('.keyboard'); + this.$lightbox.off('.keyboard'); + this.$overlay.off('.keyboard'); }; Lightbox.prototype.keyboardAction = function(event) { @@ -503,6 +525,8 @@ var keycode = event.keyCode; if (keycode === KEYCODE_ESC) { + // Prevent bubbling so as to not affect other components on the page. + event.stopPropagation(); this.end(); } else if (keycode === KEYCODE_LEFTARROW) { if (this.currentImageIndex !== 0) { diff --git a/styles/all/template/lightbox/js/lightbox.min.js b/styles/all/template/lightbox/js/lightbox.min.js index bfde902..9218739 100755 --- a/styles/all/template/lightbox/js/lightbox.min.js +++ b/styles/all/template/lightbox/js/lightbox.min.js @@ -1,5 +1,5 @@ /*! - * Lightbox v2.11.0 + * Lightbox v2.11.1 * by Lokesh Dhakar * * More info: @@ -11,5 +11,5 @@ * * @preserve */ -!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.lightbox=b(a.jQuery)}(this,function(a){function b(b){this.album=[],this.currentImageIndex=void 0,this.init(),this.options=a.extend({},this.constructor.defaults),this.option(b)}return b.defaults={albumLabel:"Image %1 of %2",alwaysShowNavOnTouchDevices:!1,fadeDuration:600,fitImagesInViewport:!0,imageFadeDuration:600,positionFromTop:50,resizeDuration:700,showImageNumberLabel:!0,wrapAround:!1,disableScrolling:!1,sanitizeTitle:!1},b.prototype.option=function(b){a.extend(this.options,b)},b.prototype.imageCountLabel=function(a,b){return this.options.albumLabel.replace(/%1/g,a).replace(/%2/g,b)},b.prototype.init=function(){var b=this;a(document).ready(function(){b.enable(),b.build()})},b.prototype.enable=function(){var b=this;a("body").on("click","a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]",function(c){return b.start(a(c.currentTarget)),!1})},b.prototype.build=function(){if(!(a("#lightbox").length>0)){var b=this;a('
').appendTo(a("body")),this.$lightbox=a("#lightbox"),this.$overlay=a("#lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".lb-outerContainer"),this.$container=this.$lightbox.find(".lb-container"),this.$image=this.$lightbox.find(".lb-image"),this.$nav=this.$lightbox.find(".lb-nav"),this.containerPadding={top:parseInt(this.$container.css("padding-top"),10),right:parseInt(this.$container.css("padding-right"),10),bottom:parseInt(this.$container.css("padding-bottom"),10),left:parseInt(this.$container.css("padding-left"),10)},this.imageBorderWidth={top:parseInt(this.$image.css("border-top-width"),10),right:parseInt(this.$image.css("border-right-width"),10),bottom:parseInt(this.$image.css("border-bottom-width"),10),left:parseInt(this.$image.css("border-left-width"),10)},this.$overlay.hide().on("click",function(){return b.end(),!1}),this.$lightbox.hide().on("click",function(c){"lightbox"===a(c.target).attr("id")&&b.end()}),this.$outerContainer.on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$lightbox.find(".lb-prev").on("click",function(){return 0===b.currentImageIndex?b.changeImage(b.album.length-1):b.changeImage(b.currentImageIndex-1),!1}),this.$lightbox.find(".lb-next").on("click",function(){return b.currentImageIndex===b.album.length-1?b.changeImage(0):b.changeImage(b.currentImageIndex+1),!1}),this.$nav.on("mousedown",function(a){3===a.which&&(b.$nav.css("pointer-events","none"),b.$lightbox.one("contextmenu",function(){setTimeout(function(){this.$nav.css("pointer-events","auto")}.bind(b),0)}))}),this.$lightbox.find(".lb-loader, .lb-close").on("click",function(){return b.end(),!1})}},b.prototype.start=function(b){function c(a){d.album.push({alt:a.attr("data-alt"),link:a.attr("href"),title:a.attr("data-title")||a.attr("title")})}var d=this,e=a(window);e.on("resize",a.proxy(this.sizeOverlay,this)),this.sizeOverlay(),this.album=[];var f,g=0,h=b.attr("data-lightbox");if(h){f=a(b.prop("tagName")+'[data-lightbox="'+h+'"]');for(var i=0;ik||g.height>j)&&(g.width/k>g.height/j?(i=k,h=parseInt(g.height/(g.width/i),10),f.width(i),f.height(h)):(h=j,i=parseInt(g.width/(g.height/h),10),f.width(i),f.height(h)))),c.sizeContainer(f.width(),f.height())},g.src=this.album[b].link,this.currentImageIndex=b},b.prototype.sizeOverlay=function(){var b=this;setTimeout(function(){b.$overlay.width(a(document).width()).height(a(document).height())},0)},b.prototype.sizeContainer=function(a,b){function c(){d.$lightbox.find(".lb-dataContainer").width(g),d.$lightbox.find(".lb-prevLink").height(h),d.$lightbox.find(".lb-nextLink").height(h),d.showImage()}var d=this,e=this.$outerContainer.outerWidth(),f=this.$outerContainer.outerHeight(),g=a+this.containerPadding.left+this.containerPadding.right+this.imageBorderWidth.left+this.imageBorderWidth.right,h=b+this.containerPadding.top+this.containerPadding.bottom+this.imageBorderWidth.top+this.imageBorderWidth.bottom;e!==g||f!==h?this.$outerContainer.animate({width:g,height:h},this.options.resizeDuration,"swing",function(){c()}):c()},b.prototype.showImage=function(){this.$lightbox.find(".lb-loader").stop(!0).hide(),this.$lightbox.find(".lb-image").fadeIn(this.options.imageFadeDuration),this.updateNav(),this.updateDetails(),this.preloadNeighboringImages(),this.enableKeyboardNav()},b.prototype.updateNav=function(){var a=!1;try{document.createEvent("TouchEvent"),a=!!this.options.alwaysShowNavOnTouchDevices}catch(a){}this.$lightbox.find(".lb-nav").show(),this.album.length>1&&(this.options.wrapAround?(a&&this.$lightbox.find(".lb-prev, .lb-next").css("opacity","1"),this.$lightbox.find(".lb-prev, .lb-next").show()):(this.currentImageIndex>0&&(this.$lightbox.find(".lb-prev").show(),a&&this.$lightbox.find(".lb-prev").css("opacity","1")),this.currentImageIndex1&&this.options.showImageNumberLabel){var c=this.imageCountLabel(this.currentImageIndex+1,this.album.length);this.$lightbox.find(".lb-number").text(c).fadeIn("fast")}else this.$lightbox.find(".lb-number").hide();this.$outerContainer.removeClass("animating"),this.$lightbox.find(".lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return a.sizeOverlay()})},b.prototype.preloadNeighboringImages=function(){if(this.album.length>this.currentImageIndex+1){(new Image).src=this.album[this.currentImageIndex+1].link}if(this.currentImageIndex>0){(new Image).src=this.album[this.currentImageIndex-1].link}},b.prototype.enableKeyboardNav=function(){a(document).on("keyup.keyboard",a.proxy(this.keyboardAction,this))},b.prototype.disableKeyboardNav=function(){a(document).off(".keyboard")},b.prototype.keyboardAction=function(a){var b=a.keyCode;27===b?this.end():37===b?0!==this.currentImageIndex?this.changeImage(this.currentImageIndex-1):this.options.wrapAround&&this.album.length>1&&this.changeImage(this.album.length-1):39===b&&(this.currentImageIndex!==this.album.length-1?this.changeImage(this.currentImageIndex+1):this.options.wrapAround&&this.album.length>1&&this.changeImage(0))},b.prototype.end=function(){this.disableKeyboardNav(),a(window).off("resize",this.sizeOverlay),this.$lightbox.fadeOut(this.options.fadeDuration),this.$overlay.fadeOut(this.options.fadeDuration),this.options.disableScrolling&&a("body").removeClass("lb-disable-scrolling")},new b}); +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.lightbox=b(a.jQuery)}(this,function(a){function b(b){this.album=[],this.currentImageIndex=void 0,this.init(),this.options=a.extend({},this.constructor.defaults),this.option(b)}return b.defaults={albumLabel:"Image %1 of %2",alwaysShowNavOnTouchDevices:!1,fadeDuration:600,fitImagesInViewport:!0,imageFadeDuration:600,positionFromTop:50,resizeDuration:700,showImageNumberLabel:!0,wrapAround:!1,disableScrolling:!1,sanitizeTitle:!1},b.prototype.option=function(b){a.extend(this.options,b)},b.prototype.imageCountLabel=function(a,b){return this.options.albumLabel.replace(/%1/g,a).replace(/%2/g,b)},b.prototype.init=function(){var b=this;a(document).ready(function(){b.enable(),b.build()})},b.prototype.enable=function(){var b=this;a("body").on("click","a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]",function(c){return b.start(a(c.currentTarget)),!1})},b.prototype.build=function(){if(!(a("#lightbox").length>0)){var b=this;a('
').appendTo(a("body")),this.$lightbox=a("#lightbox"),this.$overlay=a("#lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".lb-outerContainer"),this.$container=this.$lightbox.find(".lb-container"),this.$image=this.$lightbox.find(".lb-image"),this.$nav=this.$lightbox.find(".lb-nav"),this.containerPadding={top:parseInt(this.$container.css("padding-top"),10),right:parseInt(this.$container.css("padding-right"),10),bottom:parseInt(this.$container.css("padding-bottom"),10),left:parseInt(this.$container.css("padding-left"),10)},this.imageBorderWidth={top:parseInt(this.$image.css("border-top-width"),10),right:parseInt(this.$image.css("border-right-width"),10),bottom:parseInt(this.$image.css("border-bottom-width"),10),left:parseInt(this.$image.css("border-left-width"),10)},this.$overlay.hide().on("click",function(){return b.end(),!1}),this.$lightbox.hide().on("click",function(c){"lightbox"===a(c.target).attr("id")&&b.end()}),this.$outerContainer.on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$lightbox.find(".lb-prev").on("click",function(){return 0===b.currentImageIndex?b.changeImage(b.album.length-1):b.changeImage(b.currentImageIndex-1),!1}),this.$lightbox.find(".lb-next").on("click",function(){return b.currentImageIndex===b.album.length-1?b.changeImage(0):b.changeImage(b.currentImageIndex+1),!1}),this.$nav.on("mousedown",function(a){3===a.which&&(b.$nav.css("pointer-events","none"),b.$lightbox.one("contextmenu",function(){setTimeout(function(){this.$nav.css("pointer-events","auto")}.bind(b),0)}))}),this.$lightbox.find(".lb-loader, .lb-close").on("click",function(){return b.end(),!1})}},b.prototype.start=function(b){function c(a){d.album.push({alt:a.attr("data-alt"),link:a.attr("href"),title:a.attr("data-title")||a.attr("title")})}var d=this,e=a(window);e.on("resize",a.proxy(this.sizeOverlay,this)),this.sizeOverlay(),this.album=[];var f,g=0,h=b.attr("data-lightbox");if(h){f=a(b.prop("tagName")+'[data-lightbox="'+h+'"]');for(var i=0;ik||g.height>j)&&(g.width/k>g.height/j?(i=k,h=parseInt(g.height/(g.width/i),10),f.width(i),f.height(h)):(h=j,i=parseInt(g.width/(g.height/h),10),f.width(i),f.height(h))),c.sizeContainer(f.width(),f.height())},g.src=this.album[b].link,this.currentImageIndex=b},b.prototype.sizeOverlay=function(){var b=this;setTimeout(function(){b.$overlay.width(a(document).width()).height(a(document).height())},0)},b.prototype.sizeContainer=function(a,b){function c(){d.$lightbox.find(".lb-dataContainer").width(g),d.$lightbox.find(".lb-prevLink").height(h),d.$lightbox.find(".lb-nextLink").height(h),d.$overlay.focus(),d.showImage()}var d=this,e=this.$outerContainer.outerWidth(),f=this.$outerContainer.outerHeight(),g=a+this.containerPadding.left+this.containerPadding.right+this.imageBorderWidth.left+this.imageBorderWidth.right,h=b+this.containerPadding.top+this.containerPadding.bottom+this.imageBorderWidth.top+this.imageBorderWidth.bottom;e!==g||f!==h?this.$outerContainer.animate({width:g,height:h},this.options.resizeDuration,"swing",function(){c()}):c()},b.prototype.showImage=function(){this.$lightbox.find(".lb-loader").stop(!0).hide(),this.$lightbox.find(".lb-image").fadeIn(this.options.imageFadeDuration),this.updateNav(),this.updateDetails(),this.preloadNeighboringImages(),this.enableKeyboardNav()},b.prototype.updateNav=function(){var a=!1;try{document.createEvent("TouchEvent"),a=!!this.options.alwaysShowNavOnTouchDevices}catch(a){}this.$lightbox.find(".lb-nav").show(),this.album.length>1&&(this.options.wrapAround?(a&&this.$lightbox.find(".lb-prev, .lb-next").css("opacity","1"),this.$lightbox.find(".lb-prev, .lb-next").show()):(this.currentImageIndex>0&&(this.$lightbox.find(".lb-prev").show(),a&&this.$lightbox.find(".lb-prev").css("opacity","1")),this.currentImageIndex1&&this.options.showImageNumberLabel){var c=this.imageCountLabel(this.currentImageIndex+1,this.album.length);this.$lightbox.find(".lb-number").text(c).fadeIn("fast")}else this.$lightbox.find(".lb-number").hide();this.$outerContainer.removeClass("animating"),this.$lightbox.find(".lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return a.sizeOverlay()})},b.prototype.preloadNeighboringImages=function(){if(this.album.length>this.currentImageIndex+1){(new Image).src=this.album[this.currentImageIndex+1].link}if(this.currentImageIndex>0){(new Image).src=this.album[this.currentImageIndex-1].link}},b.prototype.enableKeyboardNav=function(){this.$lightbox.on("keyup.keyboard",a.proxy(this.keyboardAction,this)),this.$overlay.on("keyup.keyboard",a.proxy(this.keyboardAction,this))},b.prototype.disableKeyboardNav=function(){this.$lightbox.off(".keyboard"),this.$overlay.off(".keyboard")},b.prototype.keyboardAction=function(a){var b=a.keyCode;27===b?(a.stopPropagation(),this.end()):37===b?0!==this.currentImageIndex?this.changeImage(this.currentImageIndex-1):this.options.wrapAround&&this.album.length>1&&this.changeImage(this.album.length-1):39===b&&(this.currentImageIndex!==this.album.length-1?this.changeImage(this.currentImageIndex+1):this.options.wrapAround&&this.album.length>1&&this.changeImage(0))},b.prototype.end=function(){this.disableKeyboardNav(),a(window).off("resize",this.sizeOverlay),this.$lightbox.fadeOut(this.options.fadeDuration),this.$overlay.fadeOut(this.options.fadeDuration),this.options.disableScrolling&&a("body").removeClass("lb-disable-scrolling")},new b}); //# sourceMappingURL=lightbox.min.map \ No newline at end of file diff --git a/styles/all/template/lightbox/js/lightbox.min.map b/styles/all/template/lightbox/js/lightbox.min.map index af1949f..0ee864a 100755 --- a/styles/all/template/lightbox/js/lightbox.min.map +++ b/styles/all/template/lightbox/js/lightbox.min.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/js/lightbox.js"],"names":["root","factory","define","amd","exports","module","require","lightbox","jQuery","this","$","Lightbox","options","album","currentImageIndex","init","extend","constructor","defaults","option","albumLabel","alwaysShowNavOnTouchDevices","fadeDuration","fitImagesInViewport","imageFadeDuration","positionFromTop","resizeDuration","showImageNumberLabel","wrapAround","disableScrolling","sanitizeTitle","prototype","imageCountLabel","currentImageNum","totalImages","replace","self","document","ready","enable","build","on","event","start","currentTarget","length","appendTo","$lightbox","$overlay","$outerContainer","find","$container","$image","$nav","containerPadding","top","parseInt","css","right","bottom","left","imageBorderWidth","hide","end","target","attr","changeImage","which","one","setTimeout","bind","$link","addToAlbum","push","alt","link","title","$window","window","proxy","sizeOverlay","$links","imageNumber","dataLightboxValue","prop","i","j","scrollTop","scrollLeft","fadeIn","addClass","filename","filetype","split","slice","disableKeyboardNav","preloader","Image","onload","imageHeight","imageWidth","maxImageHeight","maxImageWidth","windowHeight","windowWidth","src","width","height","maxWidth","maxHeight","sizeContainer","postResize","newWidth","newHeight","showImage","oldWidth","outerWidth","oldHeight","outerHeight","animate","stop","updateNav","updateDetails","preloadNeighboringImages","enableKeyboardNav","alwaysShowNav","createEvent","e","show","$caption","text","html","labelText","removeClass","keyboardAction","off","keycode","keyCode","fadeOut"],"mappings":";;;;;;;;;;;;;CAeC,SAAUA,EAAMC,GACS,kBAAXC,SAAyBA,OAAOC,IAEvCD,QAAQ,UAAWD,GACO,gBAAZG,SAIdC,OAAOD,QAAUH,EAAQK,QAAQ,WAGjCN,EAAKO,SAAWN,EAAQD,EAAKQ,SAEnCC,KAAM,SAAUC,GAEhB,QAASC,GAASC,GAChBH,KAAKI,SACLJ,KAAKK,sBAAoB,GACzBL,KAAKM,OAGLN,KAAKG,QAAUF,EAAEM,UAAWP,KAAKQ,YAAYC,UAC7CT,KAAKU,OAAOP,GAgfd,MA3eAD,GAASO,UACPE,WAAY,iBACZC,6BAA6B,EAC7BC,aAAc,IACdC,qBAAqB,EACrBC,kBAAmB,IAGnBC,gBAAiB,GACjBC,eAAgB,IAChBC,sBAAsB,EACtBC,YAAY,EACZC,kBAAkB,EASlBC,eAAe,GAGjBnB,EAASoB,UAAUZ,OAAS,SAASP,GACnCF,EAAEM,OAAOP,KAAKG,QAASA,IAGzBD,EAASoB,UAAUC,gBAAkB,SAASC,EAAiBC,GAC7D,MAAOzB,MAAKG,QAAQQ,WAAWe,QAAQ,MAAOF,GAAiBE,QAAQ,MAAOD,IAGhFvB,EAASoB,UAAUhB,KAAO,WACxB,GAAIqB,GAAO3B,IAEXC,GAAE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lE,KAAKK,kBAAoB,EAAG,EACZ,GAAImF,QACVQ,IAAMhG,KAAKI,MAAMJ,KAAKK,kBAAoB,GAAG6D,OAI7DhE,EAASoB,UAAU6F,kBAAoB,WACrClH,EAAE2B,UAAUI,GAAG,iBAAkB/B,EAAEqE,MAAMtE,KAAK6H,eAAgB7H,QAGhEE,EAASoB,UAAUgE,mBAAqB,WACtCrF,EAAE2B,UAAUkG,IAAI,cAGlB5H,EAASoB,UAAUuG,eAAiB,SAAS5F,GAC3C,GAII8F,GAAU9F,EAAM+F,OAJK,MAKrBD,EACF/H,KAAKsD,MALkB,KAMdyE,EACsB,IAA3B/H,KAAKK,kBACPL,KAAKyD,YAAYzD,KAAKK,kBAAoB,GACjCL,KAAKG,QAAQgB,YAAcnB,KAAKI,MAAMgC,OAAS,GACxDpC,KAAKyD,YAAYzD,KAAKI,MAAMgC,OAAS,GAThB,KAWd2F,IACL/H,KAAKK,oBAAsBL,KAAKI,MAAMgC,OAAS,EACjDpC,KAAKyD,YAAYzD,KAAKK,kBAAoB,GACjCL,KAAKG,QAAQgB,YAAcnB,KAAKI,MAAMgC,OAAS,GACxDpC,KAAKyD,YAAY,KAMvBvD,EAASoB,UAAUgC,IAAM,WACvBtD,KAAKsF,qBACLrF,EAAEoE,QAAQyD,IAAI,SAAU9H,KAAKuE,aAC7BvE,KAAKsC,UAAU2F,QAAQjI,KAAKG,QAAQU,cACpCb,KAAKuC,SAAS0F,QAAQjI,KAAKG,QAAQU,cAE/Bb,KAAKG,QAAQiB,kBACfnB,EAAE,QAAQ2H,YAAY,yBAInB,GAAI1H","file":"lightbox.min.js"} \ No newline at end of file +{"version":3,"sources":["../../src/js/lightbox.js"],"names":["root","factory","define","amd","exports","module","require","lightbox","jQuery","this","$","Lightbox","options","album","currentImageIndex","init","extend","constructor","defaults","option","albumLabel","alwaysShowNavOnTouchDevices","fadeDuration","fitImagesInViewport","imageFadeDuration","positionFromTop","resizeDuration","showImageNumberLabel","wrapAround","disableScrolling","sanitizeTitle","prototype","imageCountLabel","currentImageNum","totalImages","replace","self","document","ready","enable","build","on","event","start","currentTarget","length","appendTo","$lightbox","$overlay","$outerContainer","find","$container","$image","$nav","containerPadding","top","parseInt","css","right","bottom","left","imageBorderWidth","hide","end","target","attr","changeImage","which","one","setTimeout","bind","$link","addToAlbum","push","alt","link","title","$window","window","proxy","sizeOverlay","$links","imageNumber","dataLightboxValue","prop","i","j","scrollTop","scrollLeft","fadeIn","addClass","filename","filetype","split","slice","disableKeyboardNav","preloader","Image","onload","imageHeight","imageWidth","maxImageHeight","maxImageWidth","windowHeight","windowWidth","src","width","height","maxWidth","maxHeight","sizeContainer","postResize","newWidth","newHeight","focus","showImage","oldWidth","outerWidth","oldHeight","outerHeight","animate","stop","updateNav","updateDetails","preloadNeighboringImages","enableKeyboardNav","alwaysShowNav","createEvent","e","show","$caption","text","html","labelText","removeClass","keyboardAction","off","keycode","keyCode","stopPropagation","fadeOut"],"mappings":";;;;;;;;;;;;;CAeC,SAAUA,EAAMC,GACS,kBAAXC,SAAyBA,OAAOC,IAEvCD,QAAQ,UAAWD,GACO,gBAAZG,SAIdC,OAAOD,QAAUH,EAAQK,QAAQ,WAGjCN,EAAKO,SAAWN,EAAQD,EAAKQ,SAEnCC,KAAM,SAAUC,GAEhB,QAASC,GAASC,GAChBH,KAAKI,SACLJ,KAAKK,sBAAoB,GACzBL,KAAKM,OAGLN,KAAKG,QAAUF,EAAEM,UAAWP,KAAKQ,YAAYC,UAC7CT,KAAKU,OAAOP,GAwgBd,MAngBAD,GAASO,UACPE,WAAY,iBACZC,6BAA6B,EAC7BC,aAAc,IACdC,qBAAqB,EACrBC,kBAAmB,IAGnBC,gBAAiB,GACjBC,eAAgB,IAChBC,sBAAsB,EACtBC,YAAY,EACZC,kBAAkB,EASlBC,eAAe,GAGjBnB,EAASoB,UAAUZ,OAAS,SAASP,GACnCF,EAAEM,OAAOP,KAAKG,QAASA,IAGzBD,EAASoB,UAAUC,gBAAkB,SAASC,EAAiBC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,KAAKsC,UAAU6F,QAAQnI,KAAKG,QAAQU,cACpCb,KAAKuC,SAAS4F,QAAQnI,KAAKG,QAAQU,cAE/Bb,KAAKG,QAAQiB,kBACfnB,EAAE,QAAQ4H,YAAY,yBAInB,GAAI3H","file":"lightbox.min.js"} \ No newline at end of file From f6918c32694153aea6b2a0673c5f25d9b80af527 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 31 Oct 2019 22:36:01 -0700 Subject: [PATCH 07/14] Travis cleanup --- .travis.yml | 2 +- travis/prepare-phpbb.sh | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 46b9736..ef2c601 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,7 +48,7 @@ branches: - /^\d+(\.\d+)?\.x$/ install: - - travis/prepare-phpbb.sh $EXTNAME $PHPBB_BRANCH + - travis/prepare-phpbb.sh $PHPBB_BRANCH - cd ../../phpBB3 - travis/prepare-extension.sh $EXTNAME $PHPBB_BRANCH - travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION $NOTESTS diff --git a/travis/prepare-phpbb.sh b/travis/prepare-phpbb.sh index 01770ad..a2cc81c 100755 --- a/travis/prepare-phpbb.sh +++ b/travis/prepare-phpbb.sh @@ -11,9 +11,7 @@ set -e set -x -EXTNAME=$1 -BRANCH=$2 -EXTPATH_TEMP=$3 +BRANCH=$1 # Copy extension to a temp folder mkdir ../../tmp @@ -21,4 +19,4 @@ cp -R . ../../tmp cd ../../ # Clone phpBB -git clone --depth=1 "git://github.com/phpbb/phpbb.git" "phpBB3" --branch=$BRANCH +git clone --depth=1 "git://github.com/phpbb/phpbb.git" "phpBB3" --branch="$BRANCH" From 9e832587ab10f3bbcdf218d3c549b0330adfaad8 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 31 Oct 2019 22:36:08 -0700 Subject: [PATCH 08/14] phpBB 3.3 environment update --- .travis.yml | 32 +++++++++++++++----------------- phpunit.xml.dist | 6 +----- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index ef2c601..8ee916e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,30 +1,24 @@ language: php -dist: trusty +dist: xenial matrix: include: - - php: 5.5 + - php: 7.1 env: DB=none;NOTESTS=1 - - php: 5.4 - env: DB=mysqli #myisam - - php: 5.4 - env: DB=mysql - - php: 5.4 + - php: 7.1 env: DB=mariadb - - php: 5.4 + - php: 7.1 env: DB=postgres - - php: 5.4 + - php: 7.1 env: DB=sqlite3 - - php: 5.5 - env: DB=mysqli - - php: 5.6 - env: DB=mysqli - - php: 7.0 - env: DB=mysqli - php: 7.1 - env: DB=mysqli + env: DB=mysqli # MyISAM - php: 7.2 env: DB=mysqli + - php: 7.3 + env: DB=mysqli + - php: 7.4snapshot + env: DB=mysqli - php: nightly env: DB=mysqli allow_failures: @@ -38,7 +32,7 @@ env: - SNIFF="1" # Should we run code sniffer on your code? - IMAGE_ICC="1" # Should we run icc profile sniffer on your images? - EPV="1" # Should we run EPV (Extension Pre Validator) on your code? - - PHPBB_BRANCH="3.2.x" + - PHPBB_BRANCH="3.3.x" branches: only: @@ -47,6 +41,10 @@ branches: - /^develop-.*$/ - /^\d+(\.\d+)?\.x$/ +services: + - postgresql + - mysql + install: - travis/prepare-phpbb.sh $PHPBB_BRANCH - cd ../../phpBB3 diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 289449d..574c6b9 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -8,7 +8,6 @@ convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" - syntaxCheck="false" verbose="true" bootstrap="../../../../tests/bootstrap.php" > @@ -18,14 +17,11 @@ ./tests/functional - ./tests/functional/ + ./tests/functional/ - - ./tests/ - ./ From 10e9cf8df0495aa48aa7bca717eb400be958116d Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sun, 8 Dec 2019 09:51:38 -0800 Subject: [PATCH 09/14] Add slovenian language [ci skip] --- language/sl/common.php | 27 ++++++++++++++++++++++++++ language/sl/lightbox.php | 42 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 language/sl/common.php create mode 100644 language/sl/lightbox.php diff --git a/language/sl/common.php b/language/sl/common.php new file mode 100644 index 0000000..0d7ccc6 --- /dev/null +++ b/language/sl/common.php @@ -0,0 +1,27 @@ + 'Slika %1 od %2', +)); diff --git a/language/sl/lightbox.php b/language/sl/lightbox.php new file mode 100644 index 0000000..007cfe2 --- /dev/null +++ b/language/sl/lightbox.php @@ -0,0 +1,42 @@ + 'Lightbox spreminjanje velikosti slike', + 'LIGHTBOX_MAX_WIDTH' => 'Največja širina slike', + 'LIGHTBOX_MAX_WIDTH_EXPLAIN' => 'Slike, ki presegajo to širino, bodo spremenjene velikosti in jih je mogoče povečati z učinkom Lightbox. To vrednost nastavite na 0, če želite onemogočiti spreminjanje velikosti slike Lightbox po širini.', + 'LIGHTBOX_MAX_WIDTH_APPEND' => 'Priporočilo, ki temelji na nastavitvah priloge slike: %spx', + 'LIGHTBOX_MAX_HEIGHT' => 'Največja višina slike', + 'LIGHTBOX_MAX_HEIGHT_EXPLAIN' => 'Slike, ki presegajo to višino, bodo spremenjene velikosti in jih lahko povečate z učinkom Lightbox. To vrednost nastavite na 0, če želite onemogočiti spreminjanje velikosti slike Lightbox po višini.', + 'LIGHTBOX_ALL_IMAGES' => 'V učinek Lightbox vključi vse slike', + 'LIGHTBOX_ALL_IMAGES_EXPLAIN' => 'Če je omogočena ta nastavitev, se lahko vse objavljene slike odprejo v učinku Lightbox, tudi če jih ne spremenite v velikost.', + 'LIGHTBOX_GALLERY' => 'Način galerije', + 'LIGHTBOX_GALLERY_EXPLAIN' => 'Omogoča enostavno navigacijo med spremenjenimi slikami z učinkom Lightbox.', + 'LIGHTBOX_GALLERY_ALL' => 'Vse spremenjene slike na strani', + 'LIGHTBOX_GALLERY_POSTS' => 'se spremenjene slike na objavo', + 'LIGHTBOX_SIGNATURES' => 'Spremeni velikost slik v podpisu', + 'LIGHTBOX_SIGNATURES_EXPLAIN' => 'Slikam v podpisu dovoli spremembo velikosti.', + 'LIGHTBOX_IMG_TITLES' => 'Prikaži imena slikovnih datotek', + 'LIGHTBOX_IMG_TITLES_EXPLAIN' => 'Imena slik bodo prikazana kot napis v učinku Lightbox.', +)); From 42860a30bd79cc740e3400c388a5018a15e5e14d Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 9 Jan 2020 09:42:09 -0800 Subject: [PATCH 10/14] Fix issue where page reloads would stop working --- styles/all/template/js/resizer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/styles/all/template/js/resizer.js b/styles/all/template/js/resizer.js index 6c86b36..dfd39e3 100644 --- a/styles/all/template/js/resizer.js +++ b/styles/all/template/js/resizer.js @@ -96,7 +96,7 @@ } }).each(function() { if (this.complete) { - $(this).load(); + $(this).trigger('load'); } }); }, 0); From bcb88509574d95ec65d9d6dfe368389d66656bcf Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 9 Jan 2020 23:26:18 -0800 Subject: [PATCH 11/14] Bump to 2.0.2 for release --- CHANGELOG.md | 6 ++++++ composer.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b7f408..24a502b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ ## Changelog +### 2.0.2 - 2020-01-10 + +- Updated Lightbox2 library to 2.11.1 +- jQuery v3 / phpBB v3.3 compatibility fixes +- Added Slovenian translation + ### 2.0.1 - 2019-05-24 - Updated Lightbox2 library to 2.11.0 diff --git a/composer.json b/composer.json index 81e55e8..36f3ef1 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "type": "phpbb-extension", "description": "Lightbox for phpBB can resize posted images to a maximum set height/width and display them full-screen in an elegant Lightbox overlay effect.", "homepage": "https://github.com/VSEphpbb/lightbox", - "version": "2.0.2-dev", + "version": "2.0.2", "keywords": ["phpbb", "extension", "lightbox", "image", "resizer"], "license": "GPL-2.0-only", "authors": [ From b03d85d26e659092be263bc2665e99e75697fece Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 16 Jan 2020 16:40:57 -0800 Subject: [PATCH 12/14] Remove resized signature pics from gallery mode --- styles/all/template/js/resizer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/styles/all/template/js/resizer.js b/styles/all/template/js/resizer.js index dfd39e3..cbe0d56 100644 --- a/styles/all/template/js/resizer.js +++ b/styles/all/template/js/resizer.js @@ -89,7 +89,7 @@ var url = $(this).attr('src'); return $('').attr({ href: url, - 'data-lightbox': galleryName + img.index, + 'data-lightbox': (vseLightbox.lightboxSig && $(this).closest('.signature').length > 0) ? $targetImage.index(this) : galleryName + img.index, 'data-title': (vseLightbox.imageTitles) ? ((url.indexOf(vseLightbox.downloadFile) !== -1) ? $(this).attr('alt') : url.split('/').pop()) : '' }); }).borderHover(); From 8a835af4939027df0517671d1db1e14ea132ad81 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 16 Jan 2020 16:42:27 -0800 Subject: [PATCH 13/14] Reduce image size jumping using CSS --- .../event/overall_header_stylesheets_after.html | 11 +++++++++++ styles/all/template/js/resizer.js | 11 +++-------- 2 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 styles/all/template/event/overall_header_stylesheets_after.html diff --git a/styles/all/template/event/overall_header_stylesheets_after.html b/styles/all/template/event/overall_header_stylesheets_after.html new file mode 100644 index 0000000..3392239 --- /dev/null +++ b/styles/all/template/event/overall_header_stylesheets_after.html @@ -0,0 +1,11 @@ +{% if LIGHTBOX_RESIZE_HEIGHT || LIGHTBOX_RESIZE_WIDTH %} + +{% endif %} diff --git a/styles/all/template/js/resizer.js b/styles/all/template/js/resizer.js index cbe0d56..4efbd0b 100644 --- a/styles/all/template/js/resizer.js +++ b/styles/all/template/js/resizer.js @@ -38,6 +38,9 @@ } function lightboxResizer(elements) { + if (isMobile() || (!resizeWideImages() && !resizeTallImages() && !vseLightbox.lightboxAll)) { + return; + } var $targetImage = elements.find('.postimage'), galleryName = 'post-gallery'; if (!vseLightbox.lightboxSig) { @@ -45,14 +48,6 @@ return $(this).closest('.signature').length > 0; }); } - if (!isMobile() && (resizeWideImages() || resizeTallImages())) { - $targetImage.css({ - 'max-width': (resizeWideImages() ? vseLightbox.resizeWidth + 'px' : 'none'), - 'max-height': (resizeTallImages() ? vseLightbox.resizeHeight + 'px' : 'none') - }); - } else if (!vseLightbox.lightboxAll || isMobile()) { - return; - } // enclosing the following in a setTimeout seems to solve issues with // images not being ready and causing $(this).width() to return 0. setTimeout(function() { From a09560cdd23be6e1b0f76e707b97b3f555306f05 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 16 Jan 2020 16:49:09 -0800 Subject: [PATCH 14/14] Update changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24a502b..63923a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,11 @@ ## Changelog -### 2.0.2 - 2020-01-10 +### 2.0.2 - 2020-01-16 - Updated Lightbox2 library to 2.11.1 - jQuery v3 / phpBB v3.3 compatibility fixes +- Eliminated visible image resizing by setting max-width/height in CSS now instead of JavaScript +- Resized user signature images will no longer be included in Lightbox gallery mode - Added Slovenian translation ### 2.0.1 - 2019-05-24