diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-01-23 03:49:56 +0100 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-01-23 03:49:56 +0100 |
commit | eb156741f83cb2beab1d02007ad4a3b440a5189a (patch) | |
tree | f4e200b8b2286d6fa0554fbbabd1994cfa7a55fe /js/util.js | |
parent | 4bd3eae79dec8fb99602a7a1aef0e96c17972778 (diff) | |
parent | 0905586355a4e3a8c924ab8dfb5e89818b6e6270 (diff) |
Merge branch 'master' of evan@dev.controlyourself.ca:/var/www/trunk
Diffstat (limited to 'js/util.js')
-rw-r--r-- | js/util.js | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/js/util.js b/js/util.js index de486cf74..6ca5f8cbc 100644 --- a/js/util.js +++ b/js/util.js @@ -176,6 +176,7 @@ $(document).ready(function(){ counter(); $("#notices_primary .notice:first").css({display:"none"}); $("#notices_primary .notice:first").fadeIn(2500); + NoticeHover(); } $("#notice_action-submit").removeAttr("disabled"); $("#notice_action-submit").removeClass("disabled"); @@ -184,6 +185,19 @@ $(document).ready(function(){ $("#form_notice").ajaxForm(PostNotice); $("#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; + }); + }); +}); + +function NoticeHover() { $("#content .notice").hover( function () { $(this).addClass('hover'); @@ -192,9 +206,9 @@ $(document).ready(function(){ $(this).removeClass('hover'); } ); -}); +} -function doreply(nick,id) { +function NoticeReply(nick,id) { rgx_username = /^[0-9a-zA-Z\-_.]*$/; if (nick.match(rgx_username)) { replyto = "@" + nick + " "; |