Skip to content
This repository has been archived by the owner on Dec 25, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ildyria authored Feb 28, 2019
1 parent 28b2ab5 commit daaed93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions scripts/main/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ header.bind = function() {
header.dom('#button_info') .on(eventName, sidebar.toggle);
header.dom('.button_add') .on(eventName, contextMenu.add);
header.dom('#button_more') .on(eventName, function(e) { contextMenu.photoMore(photo.getID(), e) });
header.dom('#button_move') .on(eventName, function(e) { contextMenu.move([ photo.getID() ], e) });
header.dom('#button_move') .on(eventName, function(e) { contextMenu.move([ photo.getID() ], e, photo.setAlbum) });
header.dom('.header__hostedwith') .on(eventName, function() { window.open(lychee.website) });
header.dom('#button_trash_album') .on(eventName, function() { album.delete([ album.getID() ]) });
header.dom('#button_trash') .on(eventName, function() { photo.delete([ photo.getID() ]) });
Expand Down Expand Up @@ -136,7 +136,7 @@ header.setMode = function(mode) {
header.dom('.header__toolbar--album').addClass('header__toolbar--visible');

// Hide download button when album empty
if (album.json.photos===false) $('#button_archive').hide();
if (!album.json || album.json.photos===false) $('#button_archive').hide();
else $('#button_archive').show();

// Hide download button when not logged in and album not downloadable
Expand Down
4 changes: 2 additions & 2 deletions scripts/main/photo.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ photo.setAlbum = function(photoIDs, albumID) {
if (!photoIDs) return false;
if (photoIDs instanceof Array===false) photoIDs = [ photoIDs ];

photoIDs.forEach(function(id, index, array) {
photoIDs.forEach(function(id) {

// Change reference for the next and previous photo
if (album.getByID(id).nextPhoto!==''||album.getByID(id).previousPhoto!=='') {
Expand Down Expand Up @@ -470,7 +470,7 @@ photo.setAlbum = function(photoIDs, albumID) {
}
else
{
album.reload();
if (visible.album()) album.reload();
}

})
Expand Down

0 comments on commit daaed93

Please sign in to comment.