X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=inline;f=src%2Fmain%2Fresources%2Ftemplates%2FimageBrowser.html;h=bb21d46bec19b78b0830a87aaff694bc7754a464;hb=7a14e6aab2b0458ee97452447845995bbf407ae7;hp=fd4c2240830766f0c5044fecdc446f80a294466e;hpb=bbed3c23f95b429664e38711dcd33caf06e23a55;p=Sone.git diff --git a/src/main/resources/templates/imageBrowser.html b/src/main/resources/templates/imageBrowser.html index fd4c224..bb21d46 100644 --- a/src/main/resources/templates/imageBrowser.html +++ b/src/main/resources/templates/imageBrowser.html @@ -2,6 +2,28 @@
+ + <%if albumRequested> <%ifnull album> @@ -50,11 +72,33 @@ }); }); $("#edit-album label").hide(); + + hideAndShowBlock(".edit-album", ".show-edit-album", ".hide-edit-album"); + hideAndShowBlock(".create-album", ".show-create-album", ".hide-create-album"); + hideAndShowBlock(".upload-image", ".show-upload-image", ".hide-upload-image"); + hideAndShowBlock(".delete-album", ".show-delete-album", ".hide-delete-album"); + + hideAndShowData = function(activationElements, activeElements, hideElement, showElement) { + $(activationElements).click(function() { + imageId = $(this).closest(".image").find(".image-id").text(); + $(hideElement, $("#image-" + imageId)).hide(); + $(showElement, $("#image-" + imageId)).show(); + $(document).click(function(event) { + if ($(event.target).closest("#image-" + imageId).size() == 0) { + $(showElement).hide(); + $(hideElement).show(); + } + return $(event.target).is("button"); + }); + }); + }; + + hideAndShowData(".image-title, .image-description", ".image", ".show-data", ".edit-data"); }); <%/if> -<% album.description|html>
+ + <%if album.sone.local> + + +