Added more button to photoview

This commit is contained in:
Tobias Reich 2014-03-26 22:22:25 +01:00
parent 8a7722239d
commit faba762f98
4 changed files with 27 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@ -210,6 +210,26 @@ contextMenu = {
},
photoMore: function(photoID, e) {
var mouse_x = e.pageX,
mouse_y = e.pageY - $(document).scrollTop(),
items;
contextMenu.fns = [
function() { window.open(photo.getDirectLink(),"_newtab") },
function() { photo.getArchive(photoID) }
];
items = [
["<a class='icon-resize-full'></a> Full Photo", 0],
["<a class='icon-circle-arrow-down'></a> Download", 1]
];
contextMenu.show(items, mouse_x, mouse_y, "right");
},
move: function(photoIDs, e, orientation) {
var mouse_x = e.pageX,

View File

@ -31,7 +31,7 @@ $(document).ready(function(){
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() {}]]);
});
$("#button_download").on(event_name, function() { photo.getArchive(photo.getID()) });
$("#button_more").on(event_name, function(e) { contextMenu.photoMore(photo.getID(), e) });
$("#button_trash_album").on(event_name, function() { album.delete([album.getID()]) });
$("#button_move").on(event_name, function(e) { contextMenu.move([photo.getID()], e) });
$("#button_trash").on(event_name, function() { photo.delete([photo.getID()]) });

View File

@ -61,16 +61,16 @@
<a class="button right icon icon-plus button_add"></a>
<a class="button_divider"></a>
<div class="tools" id="button_trash_album" title="Delete Album"><a class="icon-trash"></a></div>
<div class="tools" id="button_archive" title="Download Album"><a class="icon-circle-arrow-down"></a></div>
<div class="tools" id="button_info_album" title="Show Info"><a class="icon-info-sign"></a></div>
<div class="tools" id="button_archive" title="Download Album"><a class="icon-circle-arrow-down"></a></div>
<div class="tools" id="button_share_album" title="Share Album"><a class="icon-share"></a></div>
</div>
<div id="tools_photo">
<a class="button left icon-arrow-left" id="button_back"></a>
<div class="tools" id="button_more" title="More"><a class="icon-caret-down"></a></div>
<a class="button_divider"></a>
<div class="tools" id="button_trash" title="Delete"><a class="icon-trash"></a></div>
<div class="tools" id="button_move" title="Move"><a class="icon-folder-open"></a></div>
<a class="button_divider"></a>
<div class="tools" id="button_download" title="Download"><a class="icon-circle-arrow-down"></a></div>
<div class="tools" id="button_info" title="Show Info"><a class="icon-info-sign"></a></div>
<a class="button_divider"></a>
<div class="tools" id="button_share" title="Share Photo"><a class="icon-share"></a></div>