]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fixes replyto JS after the upgrade from jQuery 1.4.2
authorSarven Capadisli <csarven@status.net>
Thu, 25 Feb 2010 13:51:23 +0000 (14:51 +0100)
committerSarven Capadisli <csarven@status.net>
Thu, 25 Feb 2010 13:51:23 +0000 (14:51 +0100)
js/util.js

index 4b6c39a1dc42d613b65e83eb0bdaaa1719406035..949aec957d0b1d06b968cad9585e7185e3b919be 100644 (file)
@@ -320,18 +320,12 @@ var SN = { // StatusNet
             }
         },
 
-        NoticeReplyTo: function(notice_item) {
-            var notice = notice_item[0];
-            var notice_reply = $('.notice_reply', notice)[0];
-
-            if (jQuery.data(notice_reply, "ElementData") === undefined) {
-                jQuery.data(notice_reply, "ElementData", {Bind:'submit'});
-                $(notice_reply).bind('click', function() {
-                    var nickname = ($('.author .nickname', notice).length > 0) ? $($('.author .nickname', notice)[0]) : $('.author .nickname.uid');
-                    SN.U.NoticeReplySet(nickname.text(), $($('.notice_id', notice)[0]).text());
-                    return false;
-                });
-            }
+        NoticeReplyTo: function(notice) {
+            notice.find('.notice_reply').live('click', function() {
+                var nickname = ($('.author .nickname', notice).length > 0) ? $($('.author .nickname', notice)[0]) : $('.author .nickname.uid');
+                SN.U.NoticeReplySet(nickname.text(), $($('.notice_id', notice)[0]).text());
+                return false;
+            });
         },
 
         NoticeReplySet: function(nick,id) {