]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Draw a line to indicate new (unread) notice in a timeline since window
authorSarven Capadisli <csarven@status.net>
Sun, 27 Sep 2009 14:06:39 +0000 (14:06 +0000)
committerSarven Capadisli <csarven@status.net>
Sun, 27 Sep 2009 14:06:39 +0000 (14:06 +0000)
blur. Inspired by Pidgin's Markerline plugin.

plugins/Realtime/realtimeupdate.js

index 015c004397788d342a0aac4652a85f5f4020dbd7..b5f78e4163c5eca85f38aa00bf00c9ee5e50dcac 100644 (file)
@@ -14,6 +14,18 @@ RealtimeUpdate = {
         RealtimeUpdate._replyurl = replyurl;
         RealtimeUpdate._favorurl = favorurl;
         RealtimeUpdate._deleteurl = deleteurl;
+
+        $(window).blur(function() {
+          $('#notices_primary .notice').css({
+            'border-top-color':$('#notices_primary .notice:last').css('border-top-color'),
+            'border-top-style':'dotted'
+          });
+
+          $('#notices_primary .notice:first').css({
+            'border-top-color':'#AAAAAA',
+            'border-top-style':'solid'
+          });
+        });
      },
 
      receive: function(data)
@@ -151,7 +163,7 @@ RealtimeUpdate = {
 
          $('#form_notice label[for=notice_data-text], h1').css({'display': 'none'});
 
-         $('.notices li:first-child').css({'border-top':'none'});
+         $('.notices li:first-child').css({'border-top-color':'transparent'});
 
          $('#form_notice label[for="notice_data-attach"], #form_notice #notice_data-attach').css({'top':'0'});