Improved share album dialog (#105)

This commit is contained in:
Tobias Reich 2014-04-14 17:19:56 +02:00
parent a2d466f827
commit 76d04922f2
5 changed files with 45 additions and 7 deletions

View File

@ -195,4 +195,35 @@
}
.message .copylink {
margin-bottom: 20px;
}
}
/* Radio Buttons ------------------------------------------------*/
.message .choice {
float: left;
padding: 12px 5% 15px;
color: #fff;
}
.message .choice input {
float: left;
}
.message .choice h2 {
float: left;
margin: 1px 0px 0px 8px;
color: #fff;
font-size: 14px;
font-weight: 700;
text-shadow: 0 -1px 0 #222;
}
.message .choice p {
margin-top: 2px;
padding: 0px 5% 0px 25px;
color: #aaa;
font-size: 13px;
}
.message .choice p input {
width: 100%;
padding: 10px 1px 9px;
margin-top: 10px;
}

View File

@ -275,7 +275,14 @@ album = {
var params;
if ($(".message input.text").length>0&&$(".message input.text").val().length>0) {
if (!visible.message()&&album.json.public==0) {
modal.show("Share Album", "This album will be shared with one of the following properties:</p><form><div class='choice'><input type='radio' value='public' name='choice' checked><h2>Public</h2><p>The album can be shared and will be visible for everyone.</p></div><div class='choice'><input type='radio' value='password' name='choice'><h2>Password protected</h2><p>The album can be shared with everyone, but is only accessible with a valid password and won't be listed to visitors of your Lychee.<input class='text' type='password' placeholder='password' value=''></p></div></form><p style='display: none;'>", [["Share Album", function() { album.setPublic(album.getID(), e) }], ["Cancel", function() {}]], -170);
return true;
}
if (visible.message()&&$(".message .choice input:checked").val()==="password") {
params = "setAlbumPublic&albumID=" + albumID + "&password=" + md5($(".message input.text").val());
album.json.password = true;

View File

@ -29,7 +29,7 @@ $(document).ready(function(){
});
$("#button_share_album").on(event_name, function(e) {
if (album.json.public==1) contextMenu.shareAlbum(album.getID(), e);
else modal.show("Share Album", "All photos inside this album will be public and visible for everyone. Existing public photos will have the same sharing permission as this album. Are your sure you want to share this album? <input class='text' type='password' placeholder='password (optional)' value=''>", [["Share Album", function() { album.setPublic(album.getID(), e) }], ["Cancel", function() {}]]);
else album.setPublic(album.getID(), e);
});
$("#button_more").on(event_name, function(e) { contextMenu.photoMore(photo.getID(), e) });
$("#button_trash_album").on(event_name, function() { album.delete([album.getID()]) });

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long