From e7670e864e9e687f9e536f367b8c7da781f0c754 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 14 Apr 2011 20:39:11 +0200 Subject: [PATCH] Add permalinks for posts and authors. This fixes #136. --- src/main/resources/i18n/sone.en.properties | 2 ++ src/main/resources/static/css/sone.css | 4 ++++ src/main/resources/static/javascript/sone.js | 5 +++++ src/main/resources/templates/include/viewPost.html | 4 ++++ src/main/resources/templates/include/viewReply.html | 2 ++ 5 files changed, 17 insertions(+) diff --git a/src/main/resources/i18n/sone.en.properties b/src/main/resources/i18n/sone.en.properties index e726ccb..06d036a 100644 --- a/src/main/resources/i18n/sone.en.properties +++ b/src/main/resources/i18n/sone.en.properties @@ -224,6 +224,8 @@ View.Sone.Status.Downloading=This Sone is currently being downloaded. View.Sone.Status.Inserting=This Sone is currently being inserted. View.Post.UnknownAuthor=(unknown) +View.Post.Permalink=link post +View.Post.PermalinkAuthor=link author View.Post.Bookmarks.PostIsBookmarked=Post is bookmarked, click to remove from bookmarks View.Post.Bookmarks.PostIsNotBookmarked=Post is not bookmarked, click to bookmark View.Post.DeleteLink=Delete diff --git a/src/main/resources/static/css/sone.css b/src/main/resources/static/css/sone.css index f6bb62d..2621b50 100644 --- a/src/main/resources/static/css/sone.css +++ b/src/main/resources/static/css/sone.css @@ -266,6 +266,10 @@ textarea { display: inline; } +#sone .permalink { + display: inline; +} + #sone .post .bookmarks { display: inline; color: rgb(28, 131, 191); diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 8065b73..eb8fc74 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -1692,6 +1692,11 @@ $(document).ready(function() { ajaxifyNotification($(this)); }); + /* disable all permalinks. */ + $(".permalink").click(function() { + return false; + }); + /* activate status polling. */ setTimeout(getStatus, 5000); diff --git a/src/main/resources/templates/include/viewPost.html b/src/main/resources/templates/include/viewPost.html index 4be1bcc..40fa891 100644 --- a/src/main/resources/templates/include/viewPost.html +++ b/src/main/resources/templates/include/viewPost.html @@ -41,6 +41,10 @@ · + + · + + ·
<% post.time|date format="MMM d, yyyy, HH:mm:ss">
<%if ! originalText|match key=parsedText> · diff --git a/src/main/resources/templates/include/viewReply.html b/src/main/resources/templates/include/viewReply.html index 5dc26fb..c5b087d 100644 --- a/src/main/resources/templates/include/viewReply.html +++ b/src/main/resources/templates/include/viewReply.html @@ -14,6 +14,8 @@
<% parsedText>
+ + ·
<% reply.time|date format="MMM d, yyyy, HH:mm:ss">
<%if ! originalText|match key=parsedText> · -- 2.7.4