From bf40f8d978e4564acece0bf68b645b0e705bd714 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 11 Jan 2011 07:45:20 +0100 Subject: [PATCH] Add form for album creation. --- src/main/resources/i18n/sone.en.properties | 1 + src/main/resources/static/javascript/sone.js | 7 +++++++ src/main/resources/templates/imageBrowser.html | 7 +------ src/main/resources/templates/include/createAlbum.html | 6 ++++++ 4 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 src/main/resources/templates/include/createAlbum.html diff --git a/src/main/resources/i18n/sone.en.properties b/src/main/resources/i18n/sone.en.properties index 6463de6..45631f4 100644 --- a/src/main/resources/i18n/sone.en.properties +++ b/src/main/resources/i18n/sone.en.properties @@ -126,6 +126,7 @@ Page.UnfollowSone.Title=Unfollow Sone - Sone Page.ImageBrowser.Title=Image Browser - Sone Page.ImageBrowser.Page.Title=Image Browser Page.ImageBrowser.Album.Error.NotFound.Text=The requested album could not be found. It is possible that it has not yet been downloaded, or that it has been deleted. +Page.ImageBrowser.CreateAlbum.Button.CreateAlbum=Create Album Page.NoPermission.Title=Unauthorized Access - Sone Page.NoPermission.Page.Title=Unauthorized Access diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 9aa0b82..16eb806 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -882,6 +882,13 @@ $(document).ready(function() { }); }); + /* ajaxify album creation input field. */ + getTranslation("WebInterface.DefaultText.Reply", function(text) { + $("#create-album input[type=text]".each(function() { + registerInputTextareaSwap(this, text, "name", false, true); + }); + }); + /* Ajaxifies all posts. */ /* calling getTranslation here will cache the necessary values. */ getTranslation("WebInterface.Confirmation.DeletePostButton", function(text) { diff --git a/src/main/resources/templates/imageBrowser.html b/src/main/resources/templates/imageBrowser.html index ece0dfc..b3f4003 100644 --- a/src/main/resources/templates/imageBrowser.html +++ b/src/main/resources/templates/imageBrowser.html @@ -33,12 +33,7 @@ <%else> -
- - - - -
+ <%include include/createAlbum.html> <%/if> diff --git a/src/main/resources/templates/include/createAlbum.html b/src/main/resources/templates/include/createAlbum.html new file mode 100644 index 0000000..18c3da1 --- /dev/null +++ b/src/main/resources/templates/include/createAlbum.html @@ -0,0 +1,6 @@ +
+ + + + +
-- 2.7.4