From 2b6dfbdf2b9df0992018f8df1f54b4cf16185599 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sat, 26 Sep 2009 20:25:47 +0000 Subject: A different go at the realtime button location. Button is in a prominent location. --- plugins/Realtime/realtimeupdate.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'plugins/Realtime') diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 57fe0a843..a31565177 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -113,19 +113,19 @@ RealtimeUpdate = { addPopup: function(url, timeline, iconurl) { - $('#site_nav_local_views .current a').append(''); + $('#content').prepend(''); $('#realtime_timeline').css({ - 'margin':'2px 0 0 11px', - 'background':'transparent url('+ iconurl + ') no-repeat 45% 45%', - 'text-indent':'-9999px', - 'width':'16px', - 'height':'16px', - 'padding':'0', + 'margin':'0 0 18px 0', + 'background':'transparent url('+ iconurl + ') no-repeat 0% 30%', + 'padding':'0 0 0 20px', 'display':'block', 'float':'right', 'border':'none', - 'cursor':'pointer' + 'cursor':'pointer', + 'color':$("a").css("color"), + 'font-weight':'bold', + 'font-size':'1em' }); $('#realtime_timeline').click(function() { -- cgit v1.2.3-54-g00ecf From 7d843b11228bb55750177ca7809d5f067d52dc20 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 11:31:34 +0000 Subject: jQuery.prepend takes a single param --- plugins/Realtime/realtimeupdate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/Realtime') diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index a31565177..765710bfe 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -27,7 +27,7 @@ RealtimeUpdate = { } var noticeItem = RealtimeUpdate.makeNoticeItem(data); - $("#notices_primary .notices").prepend(noticeItem, true); + $("#notices_primary .notices").prepend(noticeItem); $("#notices_primary .notice:first").css({display:"none"}); $("#notices_primary .notice:first").fadeIn(1000); NoticeReply(); -- cgit v1.2.3-54-g00ecf From a51339a2195caed5a3833346f508b38953e4618b Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 11:49:18 +0000 Subject: Don't really need the header container. Adjusted some CSS instead --- plugins/Realtime/RealtimePlugin.php | 3 --- plugins/Realtime/realtimeupdate.js | 10 +++++++--- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'plugins/Realtime') diff --git a/plugins/Realtime/RealtimePlugin.php b/plugins/Realtime/RealtimePlugin.php index e30c41156..0f0d0f9f4 100644 --- a/plugins/Realtime/RealtimePlugin.php +++ b/plugins/Realtime/RealtimePlugin.php @@ -216,8 +216,6 @@ class RealtimePlugin extends Plugin 'class' => 'user_in') : array('id' => $action->trimmed('action'))); - $action->elementStart('div', array('id' => 'header')); - // XXX hack to deal with JS that tries to get the // root url from page output @@ -230,7 +228,6 @@ class RealtimePlugin extends Plugin if (common_logged_in()) { $action->showNoticeForm(); } - $action->elementEnd('div'); $action->showContentBlock(); $action->elementEnd('body'); diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 765710bfe..a5f6052ea 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -114,7 +114,7 @@ RealtimeUpdate = { addPopup: function(url, timeline, iconurl) { $('#content').prepend(''); - + $('#realtime_timeline').css({ 'margin':'0 0 18px 0', 'background':'transparent url('+ iconurl + ') no-repeat 0% 30%', @@ -127,12 +127,12 @@ RealtimeUpdate = { 'font-weight':'bold', 'font-size':'1em' }); - + $('#realtime_timeline').click(function() { window.open(url, timeline, 'toolbar=no,resizable=yes,scrollbars=yes,status=yes'); - + return false; }); }, @@ -142,6 +142,10 @@ RealtimeUpdate = { window.resizeTo(575, 640); $('address').hide(); $('#content').css({'width':'92%'}); + + $('#form_notice').css({ + 'margin':'18px 0 29px 1.795%' + }); } } -- cgit v1.2.3-54-g00ecf From 4d92d7d52ff20b22232c32c40fc88a8d03085ec9 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 12:15:37 +0000 Subject: Removed form_notice label and h1 from view --- plugins/Realtime/realtimeupdate.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugins/Realtime') diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index a5f6052ea..bcbf1ba28 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -144,8 +144,12 @@ RealtimeUpdate = { $('#content').css({'width':'92%'}); $('#form_notice').css({ - 'margin':'18px 0 29px 1.795%' + 'margin':'18px 0 29px 1.795%' }); + + $('#form_notice label, h1').css({'display': 'none'}); + + $('.notices li:first-child').css({'border-top':'none'}); } } -- cgit v1.2.3-54-g00ecf From 7c335c28da886f48439ad648bd5ab4957152f140 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 12:21:49 +0000 Subject: Updated window resize --- plugins/Realtime/realtimeupdate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/Realtime') diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index bcbf1ba28..984c1bf55 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -139,12 +139,12 @@ RealtimeUpdate = { initPopupWindow: function() { - window.resizeTo(575, 640); + window.resizeTo(500, 550); $('address').hide(); $('#content').css({'width':'92%'}); $('#form_notice').css({ - 'margin':'18px 0 29px 1.795%' + 'margin':'18px 0 29px 1.795%', }); $('#form_notice label, h1').css({'display': 'none'}); -- cgit v1.2.3-54-g00ecf From 3bc55e7b8bff2fe331371333de9ff4f96c8584d2 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 12:22:56 +0000 Subject: Reduced form_notice margin bottom --- plugins/Realtime/realtimeupdate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/Realtime') diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 984c1bf55..ad519158b 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -144,7 +144,7 @@ RealtimeUpdate = { $('#content').css({'width':'92%'}); $('#form_notice').css({ - 'margin':'18px 0 29px 1.795%', + 'margin':'18px 0 18px 1.795%', }); $('#form_notice label, h1').css({'display': 'none'}); -- cgit v1.2.3-54-g00ecf From c66a884ff5cec1e58a7ba40f310badd3f108d9a5 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 12:26:01 +0000 Subject: Increated content width --- plugins/Realtime/realtimeupdate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/Realtime') diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index ad519158b..965fea992 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -141,7 +141,7 @@ RealtimeUpdate = { { window.resizeTo(500, 550); $('address').hide(); - $('#content').css({'width':'92%'}); + $('#content').css({'width':'93.5%'}); $('#form_notice').css({ 'margin':'18px 0 18px 1.795%', -- cgit v1.2.3-54-g00ecf From 8904f0f67dc8ab79b07d95452171a1d2b0af5efc Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 12:38:40 +0000 Subject: Removing only notie_data-text label from view --- plugins/Realtime/realtimeupdate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/Realtime') diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 965fea992..fa0334881 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -147,7 +147,7 @@ RealtimeUpdate = { 'margin':'18px 0 18px 1.795%', }); - $('#form_notice label, h1').css({'display': 'none'}); + $('#form_notice label[for=notice_data-text], h1').css({'display': 'none'}); $('.notices li:first-child').css({'border-top':'none'}); } -- cgit v1.2.3-54-g00ecf From 3bba45102130e01032163f40e52005744623c686 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 12:40:35 +0000 Subject: Aligning notice_data-attach from top --- plugins/Realtime/realtimeupdate.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins/Realtime') diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index fa0334881..86fb01a5d 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -150,6 +150,8 @@ RealtimeUpdate = { $('#form_notice label[for=notice_data-text], h1').css({'display': 'none'}); $('.notices li:first-child').css({'border-top':'none'}); + + $('#form_notice label[for="notice_data-attach"], #form_notice #notice_data-attach').css({'top':'0'}); } } -- cgit v1.2.3-54-g00ecf From 7466887a2f6e9d8f5f45a8b2e92e2147c572864c Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 12:43:40 +0000 Subject: Adjusted form_notice width --- plugins/Realtime/realtimeupdate.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins/Realtime') diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 86fb01a5d..b791f4a2a 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -145,6 +145,8 @@ RealtimeUpdate = { $('#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'}); -- cgit v1.2.3-54-g00ecf From 22332555cf5eb920d6f95eced76446cf189d6f54 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 12:59:01 +0000 Subject: Aligned notice_data-attach input --- plugins/Realtime/realtimeupdate.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'plugins/Realtime') diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index b791f4a2a..015c00439 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -154,6 +154,11 @@ RealtimeUpdate = { $('.notices li:first-child').css({'border-top':'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' + }); } } -- cgit v1.2.3-54-g00ecf From 60335fcbdf7b2ae4d27e7d413e7f5f46f61feda5 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 14:06:39 +0000 Subject: Draw a line to indicate new (unread) notice in a timeline since window blur. Inspired by Pidgin's Markerline plugin. --- plugins/Realtime/realtimeupdate.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'plugins/Realtime') diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 015c00439..b5f78e416 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -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'}); -- cgit v1.2.3-54-g00ecf From 3694058976fca36edf2d7f43a75ffc74f0a7c672 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 14:24:31 +0000 Subject: Changed terminology for poping a window --- plugins/Realtime/realtimeupdate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/Realtime') diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index b5f78e416..4cd68a816 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -125,7 +125,7 @@ RealtimeUpdate = { addPopup: function(url, timeline, iconurl) { - $('#content').prepend(''); + $('#content').prepend(''); $('#realtime_timeline').css({ 'margin':'0 0 18px 0', -- cgit v1.2.3-54-g00ecf From 267ab67c8325243d176e1124f2024c7b08417f37 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 30 Sep 2009 12:22:55 +0000 Subject: Script no longer needed for Realtime plugin --- plugins/Realtime/jquery.getUrlParam.js | 72 ---------------------------------- 1 file changed, 72 deletions(-) delete mode 100644 plugins/Realtime/jquery.getUrlParam.js (limited to 'plugins/Realtime') diff --git a/plugins/Realtime/jquery.getUrlParam.js b/plugins/Realtime/jquery.getUrlParam.js deleted file mode 100644 index e8f73eb47..000000000 --- a/plugins/Realtime/jquery.getUrlParam.js +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright (c) 2006-2007 Mathias Bank (http://www.mathias-bank.de) - * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) - * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. - * - * Version 2.1 - * - * Thanks to - * Hinnerk Ruemenapf - http://hinnerk.ruemenapf.de/ for bug reporting and fixing. - * Tom Leonard for some improvements - * - */ -jQuery.fn.extend({ -/** -* Returns get parameters. -* -* If the desired param does not exist, null will be returned -* -* To get the document params: -* @example value = $(document).getUrlParam("paramName"); -* -* To get the params of a html-attribut (uses src attribute) -* @example value = $('#imgLink').getUrlParam("paramName"); -*/ - getUrlParam: function(strParamName){ - strParamName = escape(unescape(strParamName)); - - var returnVal = new Array(); - var qString = null; - - if ($(this).attr("nodeName")=="#document") { - //document-handler - - if (window.location.search.search(strParamName) > -1 ){ - - qString = window.location.search.substr(1,window.location.search.length).split("&"); - } - - } else if ($(this).attr("src")!="undefined") { - - var strHref = $(this).attr("src") - if ( strHref.indexOf("?") > -1 ){ - var strQueryString = strHref.substr(strHref.indexOf("?")+1); - qString = strQueryString.split("&"); - } - } else if ($(this).attr("href")!="undefined") { - - var strHref = $(this).attr("href") - if ( strHref.indexOf("?") > -1 ){ - var strQueryString = strHref.substr(strHref.indexOf("?")+1); - qString = strQueryString.split("&"); - } - } else { - return null; - } - - - if (qString==null) return null; - - - for (var i=0;i Date: Wed, 30 Sep 2009 12:48:15 +0000 Subject: Relocated the button for pop up window for notice stream --- plugins/Realtime/realtimeupdate.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'plugins/Realtime') diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 4cd68a816..3303d3a44 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -125,14 +125,17 @@ RealtimeUpdate = { addPopup: function(url, timeline, iconurl) { - $('#content').prepend(''); + $('#notices_primary').css({'position':'relative'}); + $('#notices_primary').prepend(''); $('#realtime_timeline').css({ - 'margin':'0 0 18px 0', + 'margin':'0 0 11px 0', 'background':'transparent url('+ iconurl + ') no-repeat 0% 30%', 'padding':'0 0 0 20px', 'display':'block', - 'float':'right', + 'position':'absolute', + 'top':'-20px', + 'right':'0', 'border':'none', 'cursor':'pointer', 'color':$("a").css("color"), -- cgit v1.2.3-54-g00ecf From a57783de0214f061eca3ab65880f573e8668de03 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 30 Sep 2009 13:29:37 +0000 Subject: Timeout a little incase the notice item from XHR response is not appended to the page. --- plugins/Realtime/realtimeupdate.js | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'plugins/Realtime') diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 3303d3a44..11e466325 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -30,19 +30,20 @@ RealtimeUpdate = { receive: function(data) { - id = data.id; - - // Don't add it if it already exists - // - 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(); + setTimeout(function() { + id = data.id; + + // Don't add it if it already exists + 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(); + }, 500); }, makeNoticeItem: function(data) -- cgit v1.2.3-54-g00ecf From 091e7b908befb7d24404ea653f59b38063e04f69 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sun, 4 Oct 2009 04:10:15 -0400 Subject: need to show scripts at end of body in RealtimePlugin --- plugins/Realtime/RealtimePlugin.php | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins/Realtime') diff --git a/plugins/Realtime/RealtimePlugin.php b/plugins/Realtime/RealtimePlugin.php index 0f0d0f9f4..181927968 100644 --- a/plugins/Realtime/RealtimePlugin.php +++ b/plugins/Realtime/RealtimePlugin.php @@ -230,6 +230,7 @@ class RealtimePlugin extends Plugin } $action->showContentBlock(); + $action->showScripts(); $action->elementEnd('body'); return false; // No default processing } -- cgit v1.2.3-54-g00ecf