X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fresources%2Ftemplates%2FimageBrowser.html;h=ba8220d56d4f60da93bb12f49ac2363de4b2841a;hb=f7bb19a511caebdf7fb892d4a0c5d350be08472c;hp=8c7c429b7afc1dbafd657e4b890c89390fc66c55;hpb=b3af5698b6b334a22af65d2f6d9af4c41fcc8444;p=Sone.git diff --git a/src/main/resources/templates/imageBrowser.html b/src/main/resources/templates/imageBrowser.html index 8c7c429..ba8220d 100644 --- a/src/main/resources/templates/imageBrowser.html +++ b/src/main/resources/templates/imageBrowser.html @@ -2,6 +2,28 @@
+ + <%if albumRequested> <%ifnull album> @@ -50,6 +72,28 @@ }); }); $("#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> @@ -69,55 +113,115 @@<% album.description|html>
+ <%if album.sone.local> + + +