From c86c161825115605e870e3b9fa8380080a8e0293 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 11 Nov 2010 21:43:19 +0100 Subject: [PATCH] =?utf8?q?Mark=20the=20=E2=80=9Cclick=20to=20show=E2=80=9D?= =?utf8?q?=20area=20if=20a=20hidden=20post=20is=20new.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/resources/static/css/sone.css | 4 ++++ src/main/resources/templates/include/head.html | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/main/resources/static/css/sone.css b/src/main/resources/static/css/sone.css index 9e33575..3358399 100644 --- a/src/main/resources/static/css/sone.css +++ b/src/main/resources/static/css/sone.css @@ -216,6 +216,10 @@ textarea { cursor: pointer; } +#sone .post .replies .click-to-show.new { + background-color: #ffffa0; +} + #sone .post .reply > .avatar { position: absolute; } diff --git a/src/main/resources/templates/include/head.html b/src/main/resources/templates/include/head.html index 8f7aa48..723f333 100644 --- a/src/main/resources/templates/include/head.html +++ b/src/main/resources/templates/include/head.html @@ -55,10 +55,15 @@ $("#sone .post .replies").each(function() { allReplies = $(this).find(".reply"); if (allReplies.length > 2) { + newHidden = false; for (replyIndex = 0; replyIndex < (allReplies.length - 2); ++replyIndex) { $(allReplies[replyIndex]).addClass("hidden"); + newHidden |= $(allReplies[replyIndex]).hasClass("new"); } clickToShowElement = $("
").addClass("click-to-show"); + if (newHidden) { + clickToShowElement.addClass("new"); + } (function(clickToShowElement, allReplies) { getTranslation("WebInterface.ClickToShow.Replies", function(text) { clickToShowElement.text(text); -- 2.7.4