summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-04-06 00:27:24 +0000
committerBharat Mediratta <bharat@menalto.com>2009-04-06 00:27:24 +0000
commit8ae2305289d0f4aa5168921efcab07030b934ee5 (patch)
treee0203eebd8c4527195751ef16de303606f667d30
parenta4323c79ee48cac3cea8ff87ac74ab1b036e41c5 (diff)
Hide the "no comments yet" text after the first comment is posted.
Fixes ticket #196.
-rw-r--r--modules/comment/js/comment.js1
-rw-r--r--modules/comment/views/comments.html.php2
2 files changed, 2 insertions, 1 deletions
diff --git a/modules/comment/js/comment.js b/modules/comment/js/comment.js
index bb486bbd..00fc6027 100644
--- a/modules/comment/js/comment.js
+++ b/modules/comment/js/comment.js
@@ -15,6 +15,7 @@ function ajaxify_comment_form() {
$("#gComments .gBlockContent ul:first").append("<li>"+data+"</li>");
$("#gComments .gBlockContent ul:first li:last").effect("highlight", {color: "#cfc"}, 8000);
$("#gAddCommentForm").hide(2000);
+ $("#gNoCommentsYet").hide(2000);
});
}
}
diff --git a/modules/comment/views/comments.html.php b/modules/comment/views/comments.html.php
index 23e1f101..25928ab5 100644
--- a/modules/comment/views/comments.html.php
+++ b/modules/comment/views/comments.html.php
@@ -1,6 +1,6 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<? if (!$comments->count()): ?>
-<p>
+<p id="gNoCommentsYet">
<?= t("No comments yet. Be the first to <a %attrs>comment</a>!",
array("attrs" => "href=\"#add_comment_form\" class=\"showCommentForm\"")) ?>
</p>