]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Realtime/realtimeupdate.js
Calling NoticeReplyTo instead of NoticeReply in Realtime
[quix0rs-gnu-social.git] / plugins / Realtime / realtimeupdate.js
index 4dbc80231d9e0d98d06b19a7b23c0d0071c02c78..267c99f7895d8d71d9b4c215e488e2c4cc57394e 100644 (file)
@@ -87,19 +87,18 @@ RealtimeUpdate = {
         }
 
         var noticeItem = RealtimeUpdate.makeNoticeItem(data);
+        var noticeItemID = $(noticeItem).attr('id');
+
         $("#notices_primary .notices").prepend(noticeItem);
         $("#notices_primary .notice:first").css({display:"none"});
         $("#notices_primary .notice:first").fadeIn(1000);
 
-        SN.U.NoticeReply();
-        SN.U.NoticeFavor();
+        SN.U.FormXHR($('#'+noticeItemID+' .form_favor'));
+        SN.U.NoticeReplyTo($('#'+noticeItemID));
      },
 
      purgeLastNoticeItem: function() {
         if ($('#notices_primary .notice').length > RealtimeUpdate._maxnotices) {
-            $("#notices_primary .notice:last .form_disfavor").unbind('submit');
-            $("#notices_primary .notice:last .form_favor").unbind('submit');
-            $("#notices_primary .notice:last .notice_reply").unbind('click');
             $("#notices_primary .notice:last").remove();
         }
      },
@@ -268,7 +267,7 @@ RealtimeUpdate = {
          PP.bind('click', function() {
              window.open(url,
                          '',
-                         'toolbar=no,resizable=yes,scrollbars=yes,status=yes,width=500,height=550');
+                         'toolbar=no,resizable=yes,scrollbars=yes,status=no,menubar=no,personalbar=no,location=no,width=500,height=550');
 
              return false;
          });
@@ -276,24 +275,6 @@ RealtimeUpdate = {
 
      initPopupWindow: function()
      {
-         $('address').hide();
-         $('#content').css({'width':'93.5%'});
-
-         $('#form_notice').css({
-            'margin':'18px 0 18px 1.795%',
-            'width':'93%',
-            'max-width':'451px'
-         });
-
-         $('#form_notice label[for=notice_data-text], h1').css({'display': 'none'});
-
-         $('#form_notice label[for="notice_data-attach"], #form_notice #notice_data-attach').css({'top':'0'});
-
-         $('#form_notice #notice_data-attach').css({
-            'left':'auto',
-            'right':'0'
-         });
-
          $('.notices .entry-title a, .notices .entry-content a').bind('click', function() {
             window.open(this.href, '');