Hello community,
here is the log from the commit of package rubygem-lightbox2 for
openSUSE:Factory checked in at 2019-06-19 21:00:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-lightbox2 (Old)
and /work/SRC/openSUSE:Factory/.rubygem-lightbox2.new.4811 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-lightbox2"
Wed Jun 19 21:00:20 2019 rev:3 rq:706002 version:2.11.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-lightbox2/rubygem-lightbox2.changes
2019-03-13 09:13:49.119395476 +0100
+++
/work/SRC/openSUSE:Factory/.rubygem-lightbox2.new.4811/rubygem-lightbox2.changes
2019-06-19 21:00:21.738086180 +0200
@@ -1,0 +2,6 @@
+Sun May 5 09:33:14 UTC 2019 - Stephan Kulow <[email protected]>
+
+- updated to version 2.11.0
+ no changelog found
+
+-------------------------------------------------------------------
Old:
----
lightbox2-2.10.0.2.gem
New:
----
gem2rpm.yml
lightbox2-2.11.0.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-lightbox2.spec ++++++
--- /var/tmp/diff_new_pack.CbQ14Y/_old 2019-06-19 21:00:22.302086654 +0200
+++ /var/tmp/diff_new_pack.CbQ14Y/_new 2019-06-19 21:00:22.306086658 +0200
@@ -12,20 +12,29 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
+#
+
+
+#
+# This file was generated with a gem2rpm.yml and not just plain gem2rpm.
+# All sections marked as MANUAL, license headers, summaries and descriptions
+# can be maintained in that file. Please consult this file before editing any
+# of those fields
#
Name: rubygem-lightbox2
-Version: 2.10.0.2
+Version: 2.11.0
Release: 0
%define mod_name lightbox2
%define mod_full_name %{mod_name}-%{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildRequires: ruby-macros >= 5
-BuildRequires: %{ruby}
BuildRequires: %{rubygem gem2rpm}
+BuildRequires: %{ruby}
+BuildRequires: ruby-macros >= 5
Url: https://github.com/mschnitzer/lightbox2-rubygem
Source: https://rubygems.org/gems/%{mod_full_name}.gem
+Source1: gem2rpm.yml
Summary: lightbox2 for Ruby on Rails
License: MIT
Group: Development/Languages/Ruby
++++++ gem2rpm.yml ++++++
# ---
# ## used by gem2rpm
# :summary: this is a custom summary
# ## used by gem2rpm
# :description: |-
# this is a custom description
#
# it can be multiline
# ## used by gem2rpm
# :license: MIT or Ruby
# ## used by gem2rpm and gem_packages
# :version_suffix: -x_y
# ## used by gem2rpm and gem_packages
# :disable_docs: true
# ## used by gem2rpm
# :disable_automatic_rdoc_dep: true
# ## used by gem2rpm
# :preamble: |-
# BuildRequires: foobar
# Requires: foobar
# ## used by gem2rpm
# :patches:
# foo.patch: -p1
# bar.patch:
# :post_patch:
# if you need to fiddle with the source dir before rebuilding the gem
# ## used by gem2rpm
:sources:
# - foo.desktop
# - bar.desktop
# :gem_install_args: '....'
# ## used by gem2rpm
# :pre_install: |-
# %if 0%{?use_system_libev}
# export USE_VENDORED_LIBEV="no"
# %endif
# ## used by gem2rpm
# :post_install: |-
# # delete custom files here or do other fancy stuff
# install -D -m 0644 %{S:1} %{buildroot}%{_bindir}/gem2rpm-opensuse
# ## used by gem2rpm
# :testsuite_command: |-
# (pushd %{buildroot}%{gem_base}/gems/%{mod_full_name} && rake test)
# ## used by gem2rpm
# :filelist: |-
# /usr/bin/gem2rpm-opensuse
# ## used by gem2rpm
# :scripts:
# :post: |-
# /bin/echo foo
# ## used by gem_packages
# :main:
# :preamble: |-
# Requires: util-linux
# Recommends: pwgen
# :filelist: |-
# /usr/bin/gem2rpm-opensuse
# ## used by gem_packages
# :custom_pkgs:
# apache:
# :preamble: |-
# Requires: .....
# :filelist: |-
# /etc/apache2/conf.d/passenger.conf
# :summary: Custom summary is optional
# :description: |-
# Custom description is optional
#
# bar
# :post: |-
# /bin/echo foo
# :preamble: |-
# %if 0%{?suse_version} && 0%{?suse_version} < 1330
# %define rb_build_versions ruby24 ruby25
# %define rb_default_ruby_abi ruby:2.4.0 ruby:2.5.0
# %endif
++++++ lightbox2-2.10.0.2.gem -> lightbox2-2.11.0.gem ++++++
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/lightbox2/rails/version.rb
new/lib/lightbox2/rails/version.rb
--- old/lib/lightbox2/rails/version.rb 2019-03-12 07:53:25.000000000 +0100
+++ new/lib/lightbox2/rails/version.rb 2019-04-23 08:52:28.000000000 +0200
@@ -1,6 +1,6 @@
module Lightbox2
module Rails
- VERSION = '2.10.0.2'
- LIGHTBOX2_VERSION = '2.10.0'
+ VERSION = '2.11.0'
+ LIGHTBOX2_VERSION = '2.11.0'
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2019-03-12 07:57:37.000000000 +0100
+++ new/metadata 2019-04-23 09:33:54.000000000 +0200
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: lightbox2
version: !ruby/object:Gem::Version
- version: 2.10.0.2
+ version: 2.11.0
platform: ruby
authors:
- Manuel Schnitzer
autorequire:
bindir: bin
cert_chain: []
-date: 2019-03-12 00:00:00.000000000 Z
+date: 2019-04-23 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: jquery-rails
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/vendor/assets/javascripts/lightbox2.js
new/vendor/assets/javascripts/lightbox2.js
--- old/vendor/assets/javascripts/lightbox2.js 2019-03-12 07:53:25.000000000
+0100
+++ new/vendor/assets/javascripts/lightbox2.js 2019-04-23 08:52:28.000000000
+0200
@@ -1,11 +1,11 @@
/*!
- * Lightbox v2.10.0
+ * Lightbox v2.11.0
* by Lokesh Dhakar
*
* More info:
* http://lokeshdhakar.com/projects/lightbox2/
*
- * Copyright 2007, 2018 Lokesh Dhakar
+ * Copyright Lokesh Dhakar
* Released under the MIT license
* https://github.com/lokesh/lightbox2/blob/master/LICENSE
*
@@ -99,7 +99,7 @@
}
var self = this;
- $('<div id="lightboxOverlay" class="lightboxOverlay"></div><div
id="lightbox" class="lightbox"><div class="lb-outerContainer"><div
class="lb-container"><img class="lb-image"
src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="
/><div class="lb-nav"><a class="lb-prev" href="" ></a><a class="lb-next"
href="" ></a></div><div class="lb-loader"><a
class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div
class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span
class="lb-number"></span></div><div class="lb-closeContainer"><a
class="lb-close"></a></div></div></div></div>').appendTo($('body'));
+ $('<div id="lightboxOverlay" class="lightboxOverlay"></div><div
id="lightbox" class="lightbox"><div class="lb-outerContainer"><div
class="lb-container"><img class="lb-image"
src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="
alt=""/><div class="lb-nav"><a class="lb-prev" aria-label="Previous image"
href="" ></a><a class="lb-next" aria-label="Next image" href="" ></a></div><div
class="lb-loader"><a class="lb-cancel"></a></div></div></div><div
class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span
class="lb-caption"></span><span class="lb-number"></span></div><div
class="lb-closeContainer"><a
class="lb-close"></a></div></div></div></div>').appendTo($('body'));
// Cache jQuery objects
this.$lightbox = $('#lightbox');
@@ -134,7 +134,6 @@
if ($(event.target).attr('id') === 'lightbox') {
self.end();
}
- return false;
});
this.$outerContainer.on('click', function(event) {
@@ -201,10 +200,6 @@
$window.on('resize', $.proxy(this.sizeOverlay, this));
- $('select, object, embed').css({
- visibility: 'hidden'
- });
-
this.sizeOverlay();
this.album = [];
@@ -256,7 +251,7 @@
// Disable scrolling of the page while open
if (this.options.disableScrolling) {
- $('html').addClass('lb-disable-scrolling');
+ $('body').addClass('lb-disable-scrolling');
}
this.changeImage(imageNumber);
@@ -265,15 +260,17 @@
// Hide most UI elements in preparation for the animated resizing of the
lightbox.
Lightbox.prototype.changeImage = function(imageNumber) {
var self = this;
+ var filename = this.album[imageNumber].link;
+ var filetype = filename.split('.').slice(-1)[0];
+ var $image = this.$lightbox.find('.lb-image');
+ // Disable keyboard nav during transitions
this.disableKeyboardNav();
- var $image = this.$lightbox.find('.lb-image');
+ // Show loading state
this.$overlay.fadeIn(this.options.fadeDuration);
-
$('.lb-loader').fadeIn('slow');
this.$lightbox.find('.lb-image, .lb-nav, .lb-prev, .lb-next,
.lb-dataContainer, .lb-numbers, .lb-caption').hide();
-
this.$outerContainer.addClass('animating');
// When image to show is preloaded, we send the width and height to
sizeContainer()
@@ -289,22 +286,38 @@
$image.attr({
'alt': self.album[imageNumber].alt,
- 'src': self.album[imageNumber].link
+ 'src': filename
});
$preloader = $(preloader);
$image.width(preloader.width);
$image.height(preloader.height);
+ windowWidth = $(window).width();
+ windowHeight = $(window).height();
- if (self.options.fitImagesInViewport) {
- // Fit image inside the viewport.
- // Take into account the border around the image and an additional
10px gutter on each side.
+ // Calculate the max image dimensions for the current viewport.
+ // Take into account the border around the image and an additional 10px
gutter on each side.
+ maxImageWidth = windowWidth - self.containerPadding.left -
self.containerPadding.right - self.imageBorderWidth.left -
self.imageBorderWidth.right - 20;
+ maxImageHeight = windowHeight - self.containerPadding.top -
self.containerPadding.bottom - self.imageBorderWidth.top -
self.imageBorderWidth.bottom - self.options.positionFromTop - 70;
+
+ /*
+ SVGs that don't have width and height attributes specified are reporting
width and height
+ values of 0 in Firefox 47 and IE11 on Windows. To fix, we set the width
and height to the max
+ dimensions for the viewport rather than 0 x 0.
+
+ https://github.com/lokesh/lightbox2/issues/552
+ */
+
+ if (filetype === 'svg') {
+ if ((preloader.width === 0) || preloader.height === 0) {
+ $image.width(maxImageWidth);
+ $image.height(maxImageHeight);
+ }
+ }
- windowWidth = $(window).width();
- windowHeight = $(window).height();
- maxImageWidth = windowWidth - self.containerPadding.left -
self.containerPadding.right - self.imageBorderWidth.left -
self.imageBorderWidth.right - 20;
- maxImageHeight = windowHeight - self.containerPadding.top -
self.containerPadding.bottom - self.imageBorderWidth.top -
self.imageBorderWidth.bottom - 120;
+ // Fit image inside the viewport.
+ if (self.options.fitImagesInViewport) {
// Check if image size is larger then maxWidth|maxHeight in settings
if (self.options.maxWidth && self.options.maxWidth < maxImageWidth) {
@@ -333,18 +346,31 @@
self.sizeContainer($image.width(), $image.height());
};
- preloader.src = this.album[imageNumber].link;
+ // Preload image before showing
+ preloader.src = this.album[imageNumber].link;
this.currentImageIndex = imageNumber;
};
// Stretch overlay to fit the viewport
Lightbox.prototype.sizeOverlay = function() {
- this.$overlay
- .width($(document).width())
- .height($(document).height());
+ var self = this;
+ /*
+ We use a setTimeout 0 to pause JS execution and let the rendering catch-up.
+ Why do this? If the `disableScrolling` option is set to true, a class is
added to the body
+ tag that disables scrolling and hides the scrollbar. We want to make sure
the scrollbar is
+ hidden before we measure the document width, as the presence of the
scrollbar will affect the
+ number.
+ */
+ setTimeout(function() {
+ self.$overlay
+ .width($(document).width())
+ .height($(document).height());
+
+ }, 0);
};
// Animate the size of the lightbox to fit the image we are showing
+ // This method also shows the the image.
Lightbox.prototype.sizeContainer = function(imageWidth, imageHeight) {
var self = this;
@@ -433,14 +459,7 @@
} else {
$caption.html(this.album[this.currentImageIndex].title);
}
- $caption.fadeIn('fast')
- .find('a').on('click', function(event) {
- if ($(this).attr('target') !== undefined) {
- window.open($(this).attr('href'), $(this).attr('target'));
- } else {
- location.href = $(this).attr('href');
- }
- });
+ $caption.fadeIn('fast');
}
if (this.album.length > 1 && this.options.showImageNumberLabel) {
@@ -483,16 +502,15 @@
var KEYCODE_RIGHTARROW = 39;
var keycode = event.keyCode;
- var key = String.fromCharCode(keycode).toLowerCase();
- if (keycode === KEYCODE_ESC || key.match(/x|o|c/)) {
+ if (keycode === KEYCODE_ESC) {
this.end();
- } else if (key === 'p' || keycode === KEYCODE_LEFTARROW) {
+ } else if (keycode === KEYCODE_LEFTARROW) {
if (this.currentImageIndex !== 0) {
this.changeImage(this.currentImageIndex - 1);
} else if (this.options.wrapAround && this.album.length > 1) {
this.changeImage(this.album.length - 1);
}
- } else if (key === 'n' || keycode === KEYCODE_RIGHTARROW) {
+ } else if (keycode === KEYCODE_RIGHTARROW) {
if (this.currentImageIndex !== this.album.length - 1) {
this.changeImage(this.currentImageIndex + 1);
} else if (this.options.wrapAround && this.album.length > 1) {
@@ -507,17 +525,17 @@
$(window).off('resize', this.sizeOverlay);
this.$lightbox.fadeOut(this.options.fadeDuration);
this.$overlay.fadeOut(this.options.fadeDuration);
- $('select, object, embed').css({
- visibility: 'visible'
- });
+
if (this.options.disableScrolling) {
- $('html').removeClass('lb-disable-scrolling');
+ $('body').removeClass('lb-disable-scrolling');
}
};
return new Lightbox();
}));
+// The lightbox has to be (re-)initiated, when the 'load' event of Rails
Turobolinks gets fired, otherwise
+// it won't work when navigating to another page
$(document).on('turbolinks:load', function(event) {
lightbox.init();
});
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/vendor/assets/stylesheets/lightbox2.scss
new/vendor/assets/stylesheets/lightbox2.scss
--- old/vendor/assets/stylesheets/lightbox2.scss 2019-03-12
07:53:25.000000000 +0100
+++ new/vendor/assets/stylesheets/lightbox2.scss 2019-04-23
08:52:28.000000000 +0200
@@ -1,9 +1,5 @@
-html.lb-disable-scrolling {
+body.lb-disable-scrolling {
overflow: hidden;
- /* Position fixed required for iOS. Just putting overflow: hidden; on the
body is not enough. */
- position: fixed;
- height: 100vh;
- width: 100vw;
}
.lightboxOverlay {