Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lightbox fixes, carousel fix, themes cleanup. #420

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions src/galleria.js
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,10 @@ Galleria = function() {
// one extra calculation
carousel.width = self.$( 'thumbnails-list' ).width();

// todo: fix so the carousel moves to the left
// when carousel goes inactive, set default position (if it is not set already)
if ( w <= carousel.width && carousel.current ){
carousel.set(0);
}
},

bindControls: function() {
Expand Down Expand Up @@ -2248,7 +2251,7 @@ Galleria = function() {
if ( IE > 7 ) {
exs = IE < 9 ? 'background:#000;filter:alpha(opacity=0);' : 'background:rgba(0,0,0,0);';
} else {
exs = 'z-index:99999';
exs = 'z-index:99998';
}

cssMap.nextholder += exs;
Expand Down Expand Up @@ -2408,9 +2411,6 @@ Galleria = function() {
lightbox.init();
}

// trigger the event
self.trigger( Galleria.LIGHTBOX_OPEN );

// temporarily attach some keys
// save the old ones first in a cloned object
if ( !lightbox.keymap ) {
Expand All @@ -2422,6 +2422,10 @@ Galleria = function() {
right: lightbox.showNext,
left: lightbox.showPrev
});

// trigger the event (can be here, as keymap is set each time lightbox opens)
self.trigger( Galleria.LIGHTBOX_OPEN );

}

$win.off('resize', lightbox.rescale );
Expand All @@ -2444,7 +2448,7 @@ Galleria = function() {

lightbox.image.isIframe = ( data.iframe && !data.image );

$( lightbox.elems.box ).toggleClass( 'iframe', lightbox.image.isIframe );
$( lightbox.elems.box ).toggleClass( 'iframe', !!lightbox.image.isIframe );

$( lightbox.image.container ).find( '.galleria-videoicon' ).remove();

Expand Down
4 changes: 2 additions & 2 deletions src/themes/classic/galleria.classic.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@
cursor: pointer;
display: none;
}
.galleria-theme-classic .notouch .galleria-info-close:hover{
.galleria-theme-classic.notouch .galleria-info-close:hover{
opacity:1;
filter: alpha(opacity=100);
}
.galleria-theme-classic .touch .galleria-info-close:active{
.galleria-theme-classic.touch .galleria-info-close:active{
opacity:1;
filter: alpha(opacity=100);
}
Expand Down
2 changes: 1 addition & 1 deletion src/themes/twelve/galleria.twelve.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
background: #222 url(bar.png) repeat-x;
z-index: 3;
}
.galleria-theme-twelve.light .galleria-bar{background:#fff;height:30px;;}
.galleria-theme-twelve.light .galleria-bar{background:#fff;height:30px;}
.galleria-theme-twelve .galleria-s1,
.galleria-theme-twelve .galleria-s2,
.galleria-theme-twelve .galleria-s3,
Expand Down