Skip to content

Commit

Permalink
Item14648: updated to photoswipe 4.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Mar 5, 2018
1 parent c23d000 commit 0788c87
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 24 deletions.
1 change: 1 addition & 0 deletions data/System/JQPhotoSwipeContrib.txt
Expand Up @@ -89,6 +89,7 @@ See the [[http://photoswipe.com/documentation/options.html][full documentation]]
---++ Change History

%TABLE{columnwidths="7em" tablewidth="100%"}%
| 05 Mar 2018 | updated to latest photoswipe version |
| 24 Oct 2017 | cleaned up photoswipe template from unnecessary html comments |
| 02 Sep 2016 | fixed Config.spec typo; fixed javascript initializer; better usability navigating images in gallery |
| 30 May 2016 | initial release |
Expand Down
6 changes: 3 additions & 3 deletions lib/Foswiki/Contrib/JQPhotoSwipeContrib.pm
@@ -1,6 +1,6 @@
# Extension for Foswiki - The Free and Open Source Wiki, http://foswiki.org/
#
# JQPhotoSwipeContrib is Copyright (C) 2016-2017 Michael Daum http://michaeldaumconsulting.com
# JQPhotoSwipeContrib is Copyright (C) 2016-2018 Michael Daum http://michaeldaumconsulting.com
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -20,8 +20,8 @@ use warnings;

use Foswiki::Func ();

our $VERSION = '1.02';
our $RELEASE = '24 Oct 2017';
our $VERSION = '1.03';
our $RELEASE = '05 Mar 2018';
our $SHORTDESCRIPTION = 'Modern javascript image gallery';
our $NO_PREFS_IN_TOPIC = 1;

Expand Down
4 changes: 2 additions & 2 deletions lib/Foswiki/Contrib/JQPhotoSwipeContrib/Core.pm
@@ -1,6 +1,6 @@
# Extension for Foswiki - The Free and Open Source Wiki, http://foswiki.org/
#
# JQPhotoSwipeContrib is Copyright (C) 2016-2017 Michael Daum http://michaeldaumconsulting.com
# JQPhotoSwipeContrib is Copyright (C) 2016-2018 Michael Daum http://michaeldaumconsulting.com
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -36,7 +36,7 @@ sub new {
my $this = bless(
$class->SUPER::new(
name => 'PhotoSwipe',
version => '4.1.1',
version => '4.1.2',
author => 'Dmitry Semenov',
homepage => 'http://photoswipe.com',
css => ['pkg.css'],
Expand Down
2 changes: 1 addition & 1 deletion pub/System/JQPhotoSwipeContrib/Makefile
@@ -1,6 +1,6 @@
FOSWIKI_ROOT?=~/foswiki/core
TARGET=pkg.css pkg.js default-skin.png default-skin.svg preloader.gif
PKG_JS_SOURCE=photoswipe.uncompressed.js photoswipe-ui-default.js photoswipe.init.uncompressed.js
PKG_JS_SOURCE=photoswipe.uncompressed.js photoswipe-ui-default.uncompressed.js photoswipe.init.uncompressed.js
PKG_CSS_SOURCE=photoswipe.uncompressed.css default-skin.css

-include $(FOSWIKI_ROOT)/pub/System/JQueryPlugin/Makefile.include
Expand Down
17 changes: 7 additions & 10 deletions pub/System/JQPhotoSwipeContrib/default-skin.css
Expand Up @@ -35,14 +35,11 @@
transition: opacity 0.2s;
-webkit-box-shadow: none;
box-shadow: none; }
.pswp__button:focus,
.pswp__button:hover {
.pswp__button:focus, .pswp__button:hover {
opacity: 1; }
.pswp__button:active {
background:inherit;
outline: none;
opacity: 0.9;
}
opacity: 0.9; }
.pswp__button::-moz-focus-inner {
padding: 0;
border: 0; }
Expand Down Expand Up @@ -106,9 +103,10 @@
.pswp__button--arrow--left,
.pswp__button--arrow--right {
background: none;
top: 50px;
width: 20%;
height: 100%;
top: 50%;
margin-top: -50px;
width: 70px;
height: 100px;
position: absolute; }

.pswp__button--arrow--left {
Expand All @@ -120,9 +118,8 @@
.pswp__button--arrow--left:before,
.pswp__button--arrow--right:before {
content: '';
top: 50%;
top: 35px;
background-color: rgba(0, 0, 0, 0.3);
margin-top:-15px;
height: 30px;
width: 32px;
position: absolute; }
Expand Down
@@ -1,6 +1,6 @@
/*! PhotoSwipe Default UI - 4.1.1 - 2015-12-24
/*! PhotoSwipe Default UI - 4.1.2 - 2017-04-05
* http://photoswipe.com
* Copyright (c) 2015 Dmitry Semenov; */
* Copyright (c) 2017 Dmitry Semenov; */
/**
*
* UI on top of main sliding area (caption, arrows, close button, etc.).
Expand Down
3 changes: 2 additions & 1 deletion pub/System/JQPhotoSwipeContrib/photoswipe.uncompressed.css
Expand Up @@ -66,7 +66,8 @@
height: 100%;
background: #000;
opacity: 0;
transform: translateZ(0);
-webkit-transform: translateZ(0);
transform: translateZ(0);
-webkit-backface-visibility: hidden;
will-change: opacity; }

Expand Down
26 changes: 21 additions & 5 deletions pub/System/JQPhotoSwipeContrib/photoswipe.uncompressed.js
@@ -1,6 +1,6 @@
/*! PhotoSwipe - v4.1.1 - 2015-12-24
/*! PhotoSwipe - v4.1.2 - 2017-04-05
* http://photoswipe.com
* Copyright (c) 2015 Dmitry Semenov; */
* Copyright (c) 2017 Dmitry Semenov; */
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(factory);
Expand Down Expand Up @@ -397,6 +397,8 @@ var _isOpen,
_features,
_windowVisibleSize = {},
_renderMaxResolution = false,
_orientationChangeTimeout,


// Registers PhotoSWipe module (History, Controller ...)
_registerModule = function(name, module) {
Expand Down Expand Up @@ -544,13 +546,13 @@ var _isOpen,
framework.bind(document, 'mousemove', _onFirstMouseMove);
}

framework.bind(window, 'resize scroll', self);
framework.bind(window, 'resize scroll orientationchange', self);

_shout('bindEvents');
},

_unbindEvents = function() {
framework.unbind(window, 'resize', self);
framework.unbind(window, 'resize scroll orientationchange', self);
framework.unbind(window, 'scroll', _globalEventHandlers.scroll);
framework.unbind(document, 'keydown', self);
framework.unbind(document, 'mousemove', _onFirstMouseMove);
Expand All @@ -563,6 +565,8 @@ var _isOpen,
framework.unbind(window, _upMoveEvents, self);
}

clearTimeout(_orientationChangeTimeout);

_shout('unbindEvents');
},

Expand Down Expand Up @@ -841,6 +845,18 @@ var publicMethods = {
// Setup global events
_globalEventHandlers = {
resize: self.updateSize,

// Fixes: iOS 10.3 resize event
// does not update scrollWrap.clientWidth instantly after resize
// https://github.com/dimsemenov/PhotoSwipe/issues/1315
orientationchange: function() {
clearTimeout(_orientationChangeTimeout);
_orientationChangeTimeout = setTimeout(function() {
if(_viewportSize.x !== self.scrollWrap.clientWidth) {
self.updateSize();
}
}, 500);
},
scroll: _updatePageScrollOffset,
keydown: _onKeyDown,
click: _onGlobalClick
Expand Down Expand Up @@ -3715,4 +3731,4 @@ _registerModule('History', {
/*>>history*/
framework.extend(self, publicMethods); };
return PhotoSwipe;
});
});

0 comments on commit 0788c87

Please sign in to comment.