From 4a6a86e7c709f61cdfa16b0e567c5ce8ea43d86e Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Thu, 4 Dec 2014 22:11:03 +0100 Subject: [PATCH] Fixed fadeIn fadeOut animations --- src/scripts/album.js | 4 ++-- src/scripts/albums.js | 6 +++--- src/scripts/search.js | 10 ++++++---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/scripts/album.js b/src/scripts/album.js index 5a427a1..bd9b2e9 100644 --- a/src/scripts/album.js +++ b/src/scripts/album.js @@ -36,7 +36,7 @@ album.load = function(albumID, refresh) { password.get(albumID, function() { if (!refresh) { - lychee.animate('.album:nth-child(-n+50), .photo:nth-child(-n+50)', 'contentZoomOut'); + lychee.animate('.album, .photo', 'contentZoomOut'); lychee.animate('.divider', 'fadeOut'); } @@ -79,7 +79,7 @@ album.load = function(albumID, refresh) { view.album.init(); if (!refresh) { - lychee.animate('.album:nth-child(-n+50), .photo:nth-child(-n+50)', 'contentZoomIn'); + lychee.animate('.album, .photo', 'contentZoomIn'); view.header.mode('album'); } diff --git a/src/scripts/albums.js b/src/scripts/albums.js index 03a1620..e9dd3ef 100644 --- a/src/scripts/albums.js +++ b/src/scripts/albums.js @@ -15,7 +15,7 @@ albums.load = function() { durationTime, waitTime; - lychee.animate('.album:nth-child(-n+50), .photo:nth-child(-n+50)', 'contentZoomOut'); + lychee.animate('.album, .photo', 'contentZoomOut'); lychee.animate('.divider', 'fadeOut'); startTime = new Date().getTime(); @@ -79,7 +79,7 @@ albums.load = function() { setTimeout(function() { view.header.mode('albums'); view.albums.init(); - lychee.animate('.album:nth-child(-n+50), .photo:nth-child(-n+50)', 'contentZoomIn'); + lychee.animate('.album, .photo', 'contentZoomIn'); }, waitTime); }); @@ -88,7 +88,7 @@ albums.load = function() { setTimeout(function() { view.header.mode('albums'); view.albums.init(); - lychee.animate('.album:nth-child(-n+50), .photo:nth-child(-n+50)', 'contentZoomIn'); + lychee.animate('.album, .photo', 'contentZoomIn'); }, 300); } diff --git a/src/scripts/search.js b/src/scripts/search.js index 756e008..ce4a7ca 100755 --- a/src/scripts/search.js +++ b/src/scripts/search.js @@ -55,17 +55,19 @@ search.find = function(term) { $('.no_content').remove(); - lychee.animate('.album:nth-child(-n+50), .photo:nth-child(-n+50)', 'contentZoomOut'); + lychee.animate('.album, .photo', 'contentZoomOut'); lychee.animate('.divider', 'fadeOut'); search.code = md5(code); setTimeout(function() { - if (code==='error') $('body').append(build.no_content('search')); - else { + if (code==='error') { + lychee.content.html(''); + $('body').append(build.no_content('search')); + } else { lychee.content.html(code); - lychee.animate('.album:nth-child(-n+50), .photo:nth-child(-n+50)', 'contentZoomIn'); + lychee.animate('.album, .photo', 'contentZoomIn'); $('img[data-type!="svg"]').retina(); }