+ <%if album.sone.local>
+ <script language="javascript">
+ $(function() {
+ getTranslation("WebInterface.DefaultText.UploadImage.Title", function(text) {
+ $("#upload-image :input[name='title']").each(function() {
+ registerInputTextareaSwap(this, text, "title", false, true);
+ });
+ });
+ getTranslation("WebInterface.DefaultText.UploadImage.Description", function(text) {
+ $("#upload-image :input[name='description']").each(function() {
+ registerInputTextareaSwap(this, text, "description", true, false);
+ });
+ });
+ $("#upload-image label").hide();
+ getTranslation("WebInterface.DefaultText.CreateAlbum.Name", function(text) {
+ $("#create-album input[name='name']").each(function() {
+ registerInputTextareaSwap(this, text, "name", false, true);
+ });
+ });
+ getTranslation("WebInterface.DefaultText.CreateAlbum.Description", function(text) {
+ $("#create-album input[name='description']").each(function() {
+ registerInputTextareaSwap(this, text, "description", true, true);
+ });
+ });
+ $("#create-album label").hide();
+ getTranslation("WebInterface.DefaultText.EditAlbum.Title", function(text) {
+ $("#edit-album input[name='title']").each(function() {
+ registerInputTextareaSwap(this, text, "title", false, true);
+ });
+ });
+ getTranslation("WebInterface.DefaultText.EditAlbum.Description", function(text) {
+ $("#edit-album :input[name='description']").each(function() {
+ registerInputTextareaSwap(this, text, "description", true, false);
+ });
+ });
+ $("#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 false;
+ });
+ });
+ };
+
+ hideAndShowData(".image-title, .image-description", ".image", ".show-data", ".edit-data");
+ });
+ </script>
+ <%/if>
+
+ <h1 class="backlink"><%= Page.ImageBrowser.Album.Title|l10n|replace needle='{album}' replacementKey=album.title|html></h1>