From eaaa01a1713b14f48b9889bfbe7f91a9ddd60fd5 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 18 Oct 2009 15:10:49 +0000 Subject: [PATCH 1/2] Added an update counter in the document title. When window is in blur, it will update the document title when new notices are received. The counter will reset when window is blurred (after a focus) again. --- plugins/Realtime/realtimeupdate.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index a75f17d8c5..9371326fe6 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -7,6 +7,7 @@ RealtimeUpdate = { _replyurl: '', _favorurl: '', _deleteurl: '', + _updatecounter: 0, init: function(userid, replyurl, favorurl, deleteurl) { @@ -15,6 +16,8 @@ RealtimeUpdate = { RealtimeUpdate._favorurl = favorurl; RealtimeUpdate._deleteurl = deleteurl; + DT = document.title; + $(window).blur(function() { $('#notices_primary .notice').css({ 'border-top-color':$('#notices_primary .notice:last').css('border-top-color'), @@ -25,7 +28,10 @@ RealtimeUpdate = { 'border-top-color':'#AAAAAA', 'border-top-style':'solid' }); - + + RealtimeUpdate._updatecounter = 0; + document.title = DT; + return false; }); }, @@ -39,12 +45,15 @@ RealtimeUpdate = { if ($("#notice-"+id).length > 0) { return; } - + var noticeItem = RealtimeUpdate.makeNoticeItem(data); $("#notices_primary .notices").prepend(noticeItem); $("#notices_primary .notice:first").css({display:"none"}); $("#notices_primary .notice:first").fadeIn(1000); NoticeReply(); + + RealtimeUpdate._updatecounter += 1; + document.title = '('+RealtimeUpdate._updatecounter+') ' + DT; }, 500); }, From d18f4a35edd055edb3e21153a0a94bb2c1cbc2f1 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 19 Oct 2009 14:47:08 +0000 Subject: [PATCH 2/2] Better alignment --- theme/default/css/display.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theme/default/css/display.css b/theme/default/css/display.css index 3993da7177..6833373b45 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -18,7 +18,7 @@ font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif; font-size:1em; } address { -margin-right:7.2%; +margin-right:5.8%; } input, textarea, select, option {