summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsarven <csarven@plantard.controlezvous.ca>2009-01-23 02:49:48 +0000
committersarven <csarven@plantard.controlezvous.ca>2009-01-23 02:49:48 +0000
commit658eebd977fa84b7817144c706ab25d1479b05ba (patch)
treefaee03792720a517956c37817e80c756f5f9b2e0
parent0905586355a4e3a8c924ab8dfb5e89818b6e6270 (diff)
Calling NoticeReply() after a new notice is posted.
-rw-r--r--js/util.js24
1 files changed, 14 insertions, 10 deletions
diff --git a/js/util.js b/js/util.js
index 6ca5f8cbc..391e4653d 100644
--- a/js/util.js
+++ b/js/util.js
@@ -177,6 +177,7 @@ $(document).ready(function(){
$("#notices_primary .notice:first").css({display:"none"});
$("#notices_primary .notice:first").fadeIn(2500);
NoticeHover();
+ NoticeReply();
}
$("#notice_action-submit").removeAttr("disabled");
$("#notice_action-submit").removeClass("disabled");
@@ -186,15 +187,7 @@ $(document).ready(function(){
$("#form_notice").each(addAjaxHidden);
NoticeHover();
-
- $('#content .notice').each(function() {
- var notice = $(this);
- $('.notice_reply', $(this)).click(function() {
- var nickname = ($('.author .nickname', notice).length > 0) ? $('.author .nickname', notice) : $('.author .nickname');
- NoticeReply(nickname.text(), $('.notice_id', notice).text());
- return false;
- });
- });
+ NoticeReply();
});
function NoticeHover() {
@@ -208,7 +201,18 @@ function NoticeHover() {
);
}
-function NoticeReply(nick,id) {
+function NoticeReply() {
+ $('#content .notice').each(function() {
+ var notice = $(this);
+ $('.notice_reply', $(this)).click(function() {
+ var nickname = ($('.author .nickname', notice).length > 0) ? $('.author .nickname', notice) : $('.author .nickname');
+ NoticeReplySet(nickname.text(), $('.notice_id', notice).text());
+ return false;
+ });
+ });
+}
+
+function NoticeReplySet(nick,id) {
rgx_username = /^[0-9a-zA-Z\-_.]*$/;
if (nick.match(rgx_username)) {
replyto = "@" + nick + " ";