Fixed sharing information in album infobox
This commit is contained in:
parent
4d16696c52
commit
e7cb1b1c77
BIN
dist/main.js
vendored
BIN
dist/main.js
vendored
Binary file not shown.
@ -454,6 +454,7 @@ album.setPublic = function(albumID, e) {
|
||||
|
||||
if (basicModal.visible()) {
|
||||
|
||||
// Set password
|
||||
if ($('.basicModal .choice input[name="password"]:checked').length===1) {
|
||||
password = $('.basicModal .choice input[data-name="password"]').val();
|
||||
album.json.password = '1';
|
||||
@ -462,18 +463,28 @@ album.setPublic = function(albumID, e) {
|
||||
album.json.password = '0';
|
||||
}
|
||||
|
||||
if ($('.basicModal .choice input[name="listed"]:checked').length===1) listed = true;
|
||||
if ($('.basicModal .choice input[name="downloadable"]:checked').length===1) downloadable = true;
|
||||
// Set downloadable
|
||||
if ($('.basicModal .choice input[name="downloadable"]:checked').length===1) {
|
||||
downloadable = true;
|
||||
album.json.downloadable = '1';
|
||||
} else {
|
||||
downloadable = false;
|
||||
album.json.downloadable = '0';
|
||||
}
|
||||
|
||||
if ($('.basicModal .choice input[name="listed"]:checked').length===1) listed = true;
|
||||
|
||||
}
|
||||
|
||||
if (visible.album()) {
|
||||
|
||||
album.json.public = (album.json.public==='0') ? '1' : '0';
|
||||
album.json.password = (album.json.public==='0') ? '0' : album.json.password;
|
||||
album.json.public = (album.json.public==='0') ? '1' : '0';
|
||||
album.json.password = (album.json.public==='0') ? '0' : album.json.password;
|
||||
album.json.downloadable = (album.json.public==='0') ? '0' : album.json.downloadable;
|
||||
|
||||
view.album.public();
|
||||
view.album.password();
|
||||
view.album.downloadable();
|
||||
|
||||
if (album.json.public==='1') contextMenu.shareAlbum(albumID, e);
|
||||
|
||||
|
@ -261,7 +261,7 @@ view.album = {
|
||||
|
||||
$('.photo .iconic-share').remove();
|
||||
|
||||
if (album.json.init) $('#infobox .attr_visibility').html('Public');
|
||||
if (album.json.init) $('#infobox .attr_public').html('Yes');
|
||||
|
||||
} else {
|
||||
|
||||
@ -269,7 +269,7 @@ view.album = {
|
||||
.removeClass('active')
|
||||
.attr('title', 'Make Public');
|
||||
|
||||
if (album.json.init) $('#infobox .attr_visibility').html('Private');
|
||||
if (album.json.init) $('#infobox .attr_public').html('No');
|
||||
}
|
||||
|
||||
},
|
||||
@ -281,6 +281,13 @@ view.album = {
|
||||
|
||||
},
|
||||
|
||||
downloadable: function() {
|
||||
|
||||
if (album.json.downloadable==='1') $('#infobox .attr_downloadable').html('Yes');
|
||||
else $('#infobox .attr_downloadable').html('No');
|
||||
|
||||
},
|
||||
|
||||
infobox: function() {
|
||||
|
||||
if ((visible.album()||!album.json.init)&&!visible.photo()) lychee.infobox.find('.wrapper').html(build.infoboxAlbum(album.json));
|
||||
|
Loading…
Reference in New Issue
Block a user