From 6cca4ca3d03e32defb280b9de890cb40a5e0fd74 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 22 Mar 2011 20:45:11 +0100 Subject: [PATCH] Ajaxify the album creation form. --- src/main/resources/i18n/sone.en.properties | 2 ++ src/main/resources/static/javascript/sone.js | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/resources/i18n/sone.en.properties b/src/main/resources/i18n/sone.en.properties index f8e775b..e58389f 100644 --- a/src/main/resources/i18n/sone.en.properties +++ b/src/main/resources/i18n/sone.en.properties @@ -247,6 +247,8 @@ WebInterface.DefaultText.BirthMonth=Month WebInterface.DefaultText.BirthYear=Year WebInterface.DefaultText.FieldName=Field name WebInterface.DefaultText.Option.InsertionDelay=Time to wait after a Sone is modified before insert (in seconds) +WebInterface.DefaultText.CreateAlbum.Name=Album name +WebInterface.DefaultText.CreateAlbum.Description=Album description WebInterface.Confirmation.DeletePostButton=Yes, delete! WebInterface.Confirmation.DeleteReplyButton=Yes, delete! WebInterface.SelectBox.Choose=Choose… diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index b6b1257..0b28fb7 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -1343,11 +1343,16 @@ $(document).ready(function() { }); /* ajaxify album creation input field. */ - getTranslation("WebInterface.DefaultText.Reply", function(text) { - $("#create-album input[type=text]").each(function() { + 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); + }); + }); /* Ajaxifies all posts. */ /* calling getTranslation here will cache the necessary values. */ -- 2.7.4