]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Separated NoticeFavor and calling it from FormNoticeXHR success
authorSarven Capadisli <csarven@status.net>
Fri, 13 Nov 2009 20:56:55 +0000 (20:56 +0000)
committerSarven Capadisli <csarven@status.net>
Fri, 13 Nov 2009 20:56:55 +0000 (20:56 +0000)
js/util.js

index 9bdc48507911388e2337857cf7fd278842709d66..c59c6391038f0db874009fa98270466ec12d9542 100644 (file)
@@ -228,6 +228,7 @@ var SN = { // StatusNet
                                 $('#'+notice.id).fadeIn(2500);
                                 SN.U.NoticeAttachments();
                                 SN.U.NoticeReply();
+                                SN.U.NoticeFavor();
                              }
                         }
                         $('#'+form_id+' #'+SN.C.S.NoticeDataText).val('');
@@ -276,6 +277,11 @@ var SN = { // StatusNet
             return true;
         },
 
+        NoticeFavor: function() {
+            $('.form_favor').each(function() { SN.U.FormXHR($(this)); });
+            $('.form_disfavor').each(function() { SN.U.FormXHR($(this)); });
+        },
+
         NoticeAttachments: function() {
             $.fn.jOverlay.options = {
                 method : 'GET',
@@ -386,8 +392,7 @@ var SN = { // StatusNet
 
         Notices: function() {
             if ($('body.user_in').length > 0) {
-                $('.form_favor').each(function() { SN.U.FormXHR($(this)); });
-                $('.form_disfavor').each(function() { SN.U.FormXHR($(this)); });
+                SN.U.NoticeFavor();
 
                 SN.U.NoticeReply();
             }