Hide information in notification until a link is clicked.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 1 Jan 2011 01:27:46 +0000 (02:27 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 1 Jan 2011 01:27:46 +0000 (02:27 +0100)
This should reduce visual clutter when lots of new posts and replies have
been found, e.g. after Sone has not been running for a while.

src/main/resources/i18n/sone.en.properties
src/main/resources/templates/notify/newPostNotification.html
src/main/resources/templates/notify/newReplyNotification.html

index e080e4d..f8ce026 100644 (file)
@@ -176,12 +176,15 @@ WebInterface.SelectBox.Yes=Yes
 WebInterface.SelectBox.No=No
 WebInterface.ClickToShow.Replies=Click here to show hidden replies.
 
+Notification.ClickHereToRead=Click here to read the full text of the notification.
 Notification.FirstStart.Text=This seems to be the first time you start Sone. To start, create a new Sone from a web of trust identity and start following other Sones.
 Notification.Startup.Text=Sone is currently starting up. It may take a while to retrieve all identities and Sones from the web of trust. If you are missing some elements, please be patient, they will probably reappear very soon.
 Notification.ConfigNotRead.Text=The configuration file “sone.properties” could not be read, probably because it was not saved correctly. This can happen on versions prior to Sone 0.3.3 and there is nothing you can do about it.
 Notification.Button.Dismiss=Dismiss
 Notification.NewSone.Text=New Sones have been discovered:
+Notification.NewPost.ShortText=New posts have been discovered.
 Notification.NewPost.Text=New posts have been discovered by the following Sones:
+Notification.NewReply.ShortText=New replies have been discovered.
 Notification.NewReply.Text=New replies have been discovered by the following Sones:
 Notification.SoneIsBeingRescued.Text=The following Sones are currently being rescued:
 Notification.SoneRescued.Text=The following Sones have been rescued:
index 5889ef5..f17a1ba 100644 (file)
@@ -1,4 +1,8 @@
-<div class="text">
+<div class="short-text">
+       <%= Notification.NewPost.ShortText|l10n|html>
+       <a href="javascript:showNotificationDetails('<%notification.id|html>'); return false;"><%= Notification.ClickHereToRead|l10n|html></a>
+</div>
+<div class="text hidden">
        <%= Notification.NewPost.Text|l10n|html>
        <%foreach posts post>
                <a href="viewPost.html?post=<% post.id|html>"><% post.sone.niceName|html></a><%notlast>,<%/notlast><%last>.<%/last>
index 457e410..0cf203b 100644 (file)
@@ -1,4 +1,8 @@
-<div class="text">
+<div class="short-text">
+       <%= Notification.NewReply.ShortText|l10n|html>
+       <a href="javascript:showNotificationDetails('<%notification.id|html>'); return false;"><%= Notification.ClickHereToRead|l10n|html></a>
+</div>
+<div class="text hidden">
        <%= Notification.NewReply.Text|l10n|html>
        <%foreach replies reply>
                <a href="viewPost.html?post=<% reply.post.id|html>"><% reply.sone.niceName|html></a><%notlast>,<%/notlast><%last>.<%/last>