From c9eb7c1f0b60cbcf4672bcfca0814dd1bfc1dcf0 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 11 Nov 2009 10:04:27 -0800 Subject: Bug 1969: rebuild corrupted l10n files which caused all UI strings to be shown as nulls (already done on 0.9.x in course of other major l10n changes) http://status.net/trac/ticket/1969 --- locale/it_IT/LC_MESSAGES/statusnet.mo | Bin 80186 -> 83401 bytes locale/mk_MK/LC_MESSAGES/statusnet.mo | Bin 37731 -> 50541 bytes locale/mk_MK/LC_MESSAGES/statusnet.po | 10 ---------- locale/pt_BR/LC_MESSAGES/statusnet.mo | Bin 76797 -> 83652 bytes locale/vi_VN/LC_MESSAGES/statusnet.mo | Bin 50650 -> 78725 bytes 5 files changed, 10 deletions(-) diff --git a/locale/it_IT/LC_MESSAGES/statusnet.mo b/locale/it_IT/LC_MESSAGES/statusnet.mo index 95764f1e2..00ab59804 100644 Binary files a/locale/it_IT/LC_MESSAGES/statusnet.mo and b/locale/it_IT/LC_MESSAGES/statusnet.mo differ diff --git a/locale/mk_MK/LC_MESSAGES/statusnet.mo b/locale/mk_MK/LC_MESSAGES/statusnet.mo index 0ac378c79..5dec309dd 100644 Binary files a/locale/mk_MK/LC_MESSAGES/statusnet.mo and b/locale/mk_MK/LC_MESSAGES/statusnet.mo differ diff --git a/locale/mk_MK/LC_MESSAGES/statusnet.po b/locale/mk_MK/LC_MESSAGES/statusnet.po index d4c4eb235..4dfadc61e 100644 --- a/locale/mk_MK/LC_MESSAGES/statusnet.po +++ b/locale/mk_MK/LC_MESSAGES/statusnet.po @@ -4667,16 +4667,6 @@ msgstr "" msgid "%1$s is now listening to " msgstr "%1$s сега ги следи вашите забелешки за %2$s." -#: lib/mail.php:254 -#, fuzzy, php-format -msgid "Location: %s\n" -msgstr "Локација" - -#: lib/mail.php:256 -#, fuzzy, php-format -msgid "Homepage: %s\n" -msgstr "Домашна страница" - #: lib/mail.php:258 #, php-format msgid "" diff --git a/locale/pt_BR/LC_MESSAGES/statusnet.mo b/locale/pt_BR/LC_MESSAGES/statusnet.mo index 9db1638b0..a5a6f2725 100644 Binary files a/locale/pt_BR/LC_MESSAGES/statusnet.mo and b/locale/pt_BR/LC_MESSAGES/statusnet.mo differ diff --git a/locale/vi_VN/LC_MESSAGES/statusnet.mo b/locale/vi_VN/LC_MESSAGES/statusnet.mo index 65add28b4..b2f4dd370 100644 Binary files a/locale/vi_VN/LC_MESSAGES/statusnet.mo and b/locale/vi_VN/LC_MESSAGES/statusnet.mo differ -- cgit v1.2.3 From 83b92d9ef01cdf640eb7f88e218569e6a5aebbdd Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Wed, 11 Nov 2009 15:37:17 -0500 Subject: Refactored the favorite button ajaxification to a separate function --- js/util.js | 83 ++++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 45 insertions(+), 38 deletions(-) diff --git a/js/util.js b/js/util.js index 2165957c3..879bb38ae 100644 --- a/js/util.js +++ b/js/util.js @@ -81,32 +81,6 @@ $(document).ready(function(){ // XXX: refactor this code - var favoptions = { dataType: 'xml', - beforeSubmit: function(data, target, options) { - $(target).addClass('processing'); - return true; - }, - success: function(xml) { var new_form = document._importNode($('form', xml).get(0), true); - var dis = new_form.id; - var fav = dis.replace('disfavor', 'favor'); - $('form#'+fav).replaceWith(new_form); - $('form#'+dis).ajaxForm(disoptions).each(addAjaxHidden); - } - }; - - var disoptions = { dataType: 'xml', - beforeSubmit: function(data, target, options) { - $(target).addClass('processing'); - return true; - }, - success: function(xml) { var new_form = document._importNode($('form', xml).get(0), true); - var fav = new_form.id; - var dis = fav.replace('favor', 'disfavor'); - $('form#'+dis).replaceWith(new_form); - $('form#'+fav).ajaxForm(favoptions).each(addAjaxHidden); - } - }; - var joinoptions = { dataType: 'xml', success: function(xml) { var new_form = document._importNode($('form', xml).get(0), true); var leave = new_form.id; @@ -125,20 +99,8 @@ $(document).ready(function(){ } }; - function addAjaxHidden() { - var ajax = document.createElement('input'); - ajax.setAttribute('type', 'hidden'); - ajax.setAttribute('name', 'ajax'); - ajax.setAttribute('value', 1); - this.appendChild(ajax); - } - - $("form.form_favor").ajaxForm(favoptions); - $("form.form_disfavor").ajaxForm(disoptions); $("form.form_group_join").ajaxForm(joinoptions); $("form.form_group_leave").ajaxForm(leaveoptions); - $("form.form_favor").each(addAjaxHidden); - $("form.form_disfavor").each(addAjaxHidden); $("form.form_group_join").each(addAjaxHidden); $("form.form_group_leave").each(addAjaxHidden); @@ -252,6 +214,7 @@ $(document).ready(function(){ $('#'+li.id).fadeIn(2500); NoticeReply(); NoticeAttachments(); + NoticeFavors(); } } $("#notice_data-text").val(""); @@ -270,8 +233,52 @@ $(document).ready(function(){ NoticeReply(); NoticeAttachments(); NoticeDataAttach(); + NoticeFavors(); }); +function addAjaxHidden() { + var ajax = document.createElement('input'); + ajax.setAttribute('type', 'hidden'); + ajax.setAttribute('name', 'ajax'); + ajax.setAttribute('value', 1); + this.appendChild(ajax); +} + +function NoticeFavors() { + + // XXX: refactor this code + var favoptions = { dataType: 'xml', + beforeSubmit: function(data, target, options) { + $(target).addClass('processing'); + return true; + }, + success: function(xml) { var new_form = document._importNode($('form', xml).get(0), true); + var dis = new_form.id; + var fav = dis.replace('disfavor', 'favor'); + $('form#'+fav).replaceWith(new_form); + $('form#'+dis).ajaxForm(disoptions).each(addAjaxHidden); + } + }; + + var disoptions = { dataType: 'xml', + beforeSubmit: function(data, target, options) { + $(target).addClass('processing'); + return true; + }, + success: function(xml) { var new_form = document._importNode($('form', xml).get(0), true); + var fav = new_form.id; + var dis = fav.replace('favor', 'disfavor'); + $('form#'+dis).replaceWith(new_form); + $('form#'+fav).ajaxForm(favoptions).each(addAjaxHidden); + } + }; + + $("form.form_favor").ajaxForm(favoptions); + $("form.form_disfavor").ajaxForm(disoptions); + $("form.form_favor").each(addAjaxHidden); + $("form.form_disfavor").each(addAjaxHidden); +} + function NoticeReply() { if ($('#notice_data-text').length > 0 && $('#content .notice_reply').length > 0) { $('#content .notice').each(function() { -- cgit v1.2.3 From 03022c6e601f223c92216af9748c764786cf46c2 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Wed, 11 Nov 2009 15:38:28 -0500 Subject: Resetup the ajaxification for replies and favors after inf. scrolling Made the selector much more specific, so it only works on pages that have notices --- plugins/InfiniteScroll/infinitescroll.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/InfiniteScroll/infinitescroll.js b/plugins/InfiniteScroll/infinitescroll.js index ae4d53d09..5084af91f 100644 --- a/plugins/InfiniteScroll/infinitescroll.js +++ b/plugins/InfiniteScroll/infinitescroll.js @@ -2,7 +2,13 @@ jQuery(document).ready(function($){ $('notices_primary').infinitescroll({ debug: true, infiniteScroll : false, - nextSelector : "li.nav_next a", + nextSelector : 'body#public li.nav_next a,'+ + 'body#all li.nav_next a,'+ + 'body#showstream li.nav_next a,'+ + 'body#replies li.nav_next a,'+ + 'body#showfavorites li.nav_next a,'+ + 'body#showgroup li.nav_next a,'+ + 'body#favorited li.nav_next a', loadingImg : $('address .url')[0].href+'plugins/InfiniteScroll/ajax-loader.gif', text : "Loading the next set of posts...", donetext : "Congratulations, you\'ve reached the end of the Internet.", @@ -11,5 +17,7 @@ jQuery(document).ready(function($){ itemSelector : "#notices_primary ol.notices li" },function(){ NoticeAttachments(); + NoticeReply(); + NoticeFavors(); }); }); -- cgit v1.2.3 From 4f1b7fe575bec23ae9b6a595c0524ddd30434310 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Wed, 11 Nov 2009 15:39:23 -0500 Subject: Disable debug mode (so there are no messages written to the javascript console) --- plugins/InfiniteScroll/infinitescroll.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/InfiniteScroll/infinitescroll.js b/plugins/InfiniteScroll/infinitescroll.js index 5084af91f..9e5593d25 100644 --- a/plugins/InfiniteScroll/infinitescroll.js +++ b/plugins/InfiniteScroll/infinitescroll.js @@ -1,6 +1,6 @@ jQuery(document).ready(function($){ $('notices_primary').infinitescroll({ - debug: true, + debug: false, infiniteScroll : false, nextSelector : 'body#public li.nav_next a,'+ 'body#all li.nav_next a,'+ -- cgit v1.2.3 From c28b9ce31a0d20d3ee1907f6ab3aa197175b7411 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 12 Nov 2009 10:24:18 +0000 Subject: Removed old comments --- plugins/Meteor/meteorupdater.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/Meteor/meteorupdater.js b/plugins/Meteor/meteorupdater.js index 9ce68775b..cdd1d63fa 100644 --- a/plugins/Meteor/meteorupdater.js +++ b/plugins/Meteor/meteorupdater.js @@ -1,6 +1,4 @@ // Update the local timeline from a Meteor server -// XXX: If @a is subscribed to @b, @a should get @b's notices in @a's Personal timeline. -// Do Replies timeline. var MeteorUpdater = function() { -- cgit v1.2.3 From 3752c1fdcee53c7e609d77600591b7de78b7ce3b Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 12 Nov 2009 10:37:43 +0000 Subject: Removed extra showScript() call at the bottom of the document. 0.8.x is using for scripts whereas 0.9.x puts it before . This also fixes the duplicate posts --- plugins/Realtime/RealtimePlugin.php | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/Realtime/RealtimePlugin.php b/plugins/Realtime/RealtimePlugin.php index 181927968..0f0d0f9f4 100644 --- a/plugins/Realtime/RealtimePlugin.php +++ b/plugins/Realtime/RealtimePlugin.php @@ -230,7 +230,6 @@ class RealtimePlugin extends Plugin } $action->showContentBlock(); - $action->showScripts(); $action->elementEnd('body'); return false; // No default processing } -- cgit v1.2.3 From 3bf1024771537b4499ffbf8e2e7c25be30cc204d Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 14 Nov 2009 13:14:20 -0800 Subject: Fix regression from ba199ad4ec47e6b0c067a3b2a15882d3836ea009: typo in refactoring caused fatal error on unrecognized message source Example report from live site: http://identi.ca/notice/14629110 --- lib/mailbox.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mailbox.php b/lib/mailbox.php index e1d384a06..90a58b4c4 100644 --- a/lib/mailbox.php +++ b/lib/mailbox.php @@ -282,7 +282,7 @@ class MailboxAction extends CurrentUserDesignAction $ns->name); $this->elementEnd('span'); } else { - $this->out->element('span', 'device', $source_name); + $this->element('span', 'device', $source_name); } break; } -- cgit v1.2.3 From e4d191334f5b2e40a4cd97e1c23677d4712b7700 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Mon, 16 Nov 2009 16:19:27 -0500 Subject: Only show local notices or (remote notices if they're supposed to be shown) --- plugins/Realtime/RealtimePlugin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/Realtime/RealtimePlugin.php b/plugins/Realtime/RealtimePlugin.php index 0f0d0f9f4..a21c33b10 100644 --- a/plugins/Realtime/RealtimePlugin.php +++ b/plugins/Realtime/RealtimePlugin.php @@ -132,8 +132,8 @@ class RealtimePlugin extends Plugin // Add to the public timeline - if ($notice->is_local || - ($notice->is_local == 0 && !common_config('public', 'localonly'))) { + if ($notice->is_local == Notice::LOCAL_PUBLIC || + ($notice->is_local == Notice::REMOTE_OMB && !common_config('public', 'localonly'))) { $paths[] = array('public'); } -- cgit v1.2.3 From 629532e2da239b791b245ce702170d0b8de9c0ef Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 16 Nov 2009 22:00:15 +0000 Subject: Added update delay and max notice count --- plugins/Realtime/realtimeupdate.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index e82b4dbfb..59045c094 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -34,6 +34,8 @@ RealtimeUpdate = { _favorurl: '', _deleteurl: '', _updatecounter: 0, + _updatedelay: 500, + _maxnotices: 50, init: function(userid, replyurl, favorurl, deleteurl) { @@ -76,11 +78,16 @@ RealtimeUpdate = { $("#notices_primary .notices").prepend(noticeItem); $("#notices_primary .notice:first").css({display:"none"}); $("#notices_primary .notice:first").fadeIn(1000); + + if ($('#notices_primary .notice').length > RealtimeUpdate._maxnotices) { + $("#notices_primary .notice:last").remove(); + } + NoticeReply(); RealtimeUpdate._updatecounter += 1; document.title = '('+RealtimeUpdate._updatecounter+') ' + DT; - }, 500); + }, RealtimeUpdate._updatedelay); }, makeNoticeItem: function(data) -- cgit v1.2.3 From be73757131127c687090f925ff873ff385a88604 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 16 Nov 2009 22:16:08 +0000 Subject: Unbinding the events from Notice reply and favor for possible memory leaks --- plugins/Realtime/realtimeupdate.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 59045c094..16c96615e 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -80,6 +80,9 @@ RealtimeUpdate = { $("#notices_primary .notice:first").fadeIn(1000); 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_in-reply-to").unbind('click'); $("#notices_primary .notice:last").remove(); } -- cgit v1.2.3 From 8b4fd414218d162970cf997d260e070d0a5177fe Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 16 Nov 2009 22:16:55 +0000 Subject: Added NoticeFavors() for received notices --- plugins/Realtime/realtimeupdate.js | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 16c96615e..2ded33e93 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -86,6 +86,7 @@ RealtimeUpdate = { $("#notices_primary .notice:last").remove(); } + NoticeFavors(); NoticeReply(); RealtimeUpdate._updatecounter += 1; -- cgit v1.2.3 From ca31504dd91560496c55bf9a781e2d72e3fb367a Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 17 Nov 2009 00:07:21 +0000 Subject: Using the right selector for notice_reply --- plugins/Realtime/realtimeupdate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 2ded33e93..132f79abb 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -82,7 +82,7 @@ RealtimeUpdate = { 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_in-reply-to").unbind('click'); + $("#notices_primary .notice:last .notice_reply").unbind('click'); $("#notices_primary .notice:last").remove(); } -- cgit v1.2.3 From a6399ce73a7459a8ee7bc18f6b8c449e0b45b5fb Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 17 Nov 2009 00:28:56 +0000 Subject: Showing counter for new notices only if the window is on blur --- plugins/Realtime/realtimeupdate.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 132f79abb..fa0fefed4 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -36,6 +36,7 @@ RealtimeUpdate = { _updatecounter: 0, _updatedelay: 500, _maxnotices: 50, + _windowhasfocus: false, init: function(userid, replyurl, favorurl, deleteurl) { @@ -46,7 +47,9 @@ RealtimeUpdate = { DT = document.title; - $(window).blur(function() { + $(window).bind('focus', function(){ RealtimeUpdate._windowhasfocus = true; }); + + $(window).bind('blur', function() { $('#notices_primary .notice').css({ 'border-top-color':$('#notices_primary .notice:last').css('border-top-color'), 'border-top-style':'dotted' @@ -59,6 +62,7 @@ RealtimeUpdate = { RealtimeUpdate._updatecounter = 0; document.title = DT; + RealtimeUpdate._windowhasfocus = false; return false; }); @@ -89,8 +93,10 @@ RealtimeUpdate = { NoticeFavors(); NoticeReply(); - RealtimeUpdate._updatecounter += 1; - document.title = '('+RealtimeUpdate._updatecounter+') ' + DT; + if (RealtimeUpdate._windowhasfocus === false) { + RealtimeUpdate._updatecounter += 1; + document.title = '('+RealtimeUpdate._updatecounter+') ' + DT; + } }, RealtimeUpdate._updatedelay); }, -- cgit v1.2.3 From 4afc50f8a3dc153d0818437de41a0e8d83cdb518 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 16 Nov 2009 17:25:38 -0800 Subject: Bug 1655/bug 1905: fix for Internet Explorer receiving FOAF output when clicking user links. User links using the ID number (such as created for @-replies) have been failing on Internet Explorer, since IE doesn't bother to actually say it supports text/html... We usually get something like this from IE, up through at least IE 8: Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */* The */* ended up matching application/rdf+xml instead of text/html, so only other browsers which are more explicit would actually get sent on to the user profile/notice stream; IE visitors were directed on to the FOAF download. :( Swapping the order of items in the server-side of the negotiation list fixes this; clients actually asking for FOAF at a higher priority than HTML will still get it, but the wildcard */* now matches text/html which is usually what we want. Content negotiation for the user links was added August 2008 in commit 48fcfb8b0daeb272cb9d116af617daf15930d909. --- actions/userbyid.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/actions/userbyid.php b/actions/userbyid.php index 802bcb081..86a61f20b 100644 --- a/actions/userbyid.php +++ b/actions/userbyid.php @@ -74,8 +74,11 @@ class UserbyidAction extends Action $this->clientError(_('No such user.')); } - // support redirecting to FOAF rdf/xml if the agent prefers it - $page_prefs = 'application/rdf+xml,text/html,application/xhtml+xml,application/xml;q=0.3,text/xml;q=0.2'; + // Support redirecting to FOAF rdf/xml if the agent prefers it... + // Internet Explorer doesn't specify "text/html" and does list "*/*" + // at least through version 8. We need to list text/html up front to + // ensure that only user-agents who specifically ask for RDF get it. + $page_prefs = 'text/html,application/xhtml+xml,application/rdf+xml,application/xml;q=0.3,text/xml;q=0.2'; $httpaccept = isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : null; $type = common_negotiate_type(common_accept_to_prefs($httpaccept), -- cgit v1.2.3 From b67cc3e67b4ca06fddf2664ecbc1fc2766b0517a Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 17 Nov 2009 12:50:47 +0000 Subject: Set window resize before openning it up --- plugins/Realtime/realtimeupdate.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index fa0fefed4..b9518b45d 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -201,7 +201,7 @@ RealtimeUpdate = { $('#realtime_timeline').click(function() { window.open(url, timeline, - 'toolbar=no,resizable=yes,scrollbars=yes,status=yes'); + 'toolbar=no,resizable=yes,scrollbars=yes,status=yes,width=500,height=550'); return false; }); @@ -209,7 +209,6 @@ RealtimeUpdate = { initPopupWindow: function() { - window.resizeTo(500, 550); $('address').hide(); $('#content').css({'width':'93.5%'}); -- cgit v1.2.3 From 74f33abf516009ad1ec785fca2208181f27d693d Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 17 Nov 2009 12:54:15 +0000 Subject: Added margin-top for showstream page (space between entity_actions and notice_primary) --- plugins/Realtime/realtimeupdate.js | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index b9518b45d..78d3440a9 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -197,6 +197,7 @@ RealtimeUpdate = { 'font-weight':'bold', 'font-size':'1em' }); + $('#showstream #notices_primary').css({'margin-top':'18px'}); $('#realtime_timeline').click(function() { window.open(url, -- cgit v1.2.3 From 79f34728afa652531cdd6b04a0acf1cce1072a15 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 17 Nov 2009 13:02:07 +0000 Subject: Calling selector once --- plugins/Realtime/realtimeupdate.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 78d3440a9..4f0b01119 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -180,12 +180,14 @@ RealtimeUpdate = { addPopup: function(url, timeline, iconurl) { - $('#notices_primary').css({'position':'relative'}); - $('#notices_primary').prepend(''); + var NP = $('#notices_primary'); + NP.css({'position':'relative'}); + NP.prepend(''); - $('#realtime_timeline').css({ + var RT = $('#realtime_timeline'); + RT.css({ 'margin':'0 0 11px 0', - 'background':'transparent url('+ iconurl + ') no-repeat 0% 30%', + 'background':'transparent url('+ iconurl + ') no-repeat 0 30%', 'padding':'0 0 0 20px', 'display':'block', 'position':'absolute', @@ -193,13 +195,13 @@ RealtimeUpdate = { 'right':'0', 'border':'none', 'cursor':'pointer', - 'color':$("a").css("color"), + 'color':$('a').css('color'), 'font-weight':'bold', 'font-size':'1em' }); $('#showstream #notices_primary').css({'margin-top':'18px'}); - $('#realtime_timeline').click(function() { + RT.click(function() { window.open(url, timeline, 'toolbar=no,resizable=yes,scrollbars=yes,status=yes,width=500,height=550'); -- cgit v1.2.3 From 9efb65e0e21d8148b0eae9f6227a01141d96bd70 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 17 Nov 2009 13:21:10 +0000 Subject: Fix layout for entity_actions --- theme/base/css/display.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 7706fba48..e19938e4f 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -537,7 +537,7 @@ font-size:0.8em; /* entity_profile */ .entity_profile { position:relative; -width:74.702%; +width:73%; min-height:123px; float:left; margin-bottom:18px; @@ -604,7 +604,8 @@ font-style:italic; /*entity_actions*/ .entity_actions { float:right; -margin-left:2.35%; +margin-left:2%; +margin-bottom:18px; max-width:25%; } .entity_actions h2 { -- cgit v1.2.3 From 57b7dac8768cc6a182e917ed46cb9ecfbdac2fc5 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 17 Nov 2009 14:04:13 +0000 Subject: Open anchors in entry-title and entry-content on a new window --- plugins/Realtime/realtimeupdate.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 4f0b01119..706ec8cb5 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -231,6 +231,12 @@ RealtimeUpdate = { 'left':'auto', 'right':'0' }); + + $('.notices .entry-title a, .notices .entry-content a').bind('click', function() { + window.open(this.href, ''); + + return false; + }); } } -- cgit v1.2.3 From 0133e569865526be636852538daf8b781b5d2c4f Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 17 Nov 2009 14:10:54 +0000 Subject: Changed to bind and removed window name because IE doesn't like names with '-' in them. --- plugins/Realtime/realtimeupdate.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 706ec8cb5..5582d6d00 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -200,10 +200,11 @@ RealtimeUpdate = { 'font-size':'1em' }); $('#showstream #notices_primary').css({'margin-top':'18px'}); - - RT.click(function() { +alert(url); +alert(timeline); + RT.bind('click', function() { window.open(url, - timeline, + '', 'toolbar=no,resizable=yes,scrollbars=yes,status=yes,width=500,height=550'); return false; -- cgit v1.2.3 From 55025986db72a1dce02e8e8c4d1a5d22185d2361 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 17 Nov 2009 14:21:41 +0000 Subject: Remove alerts --- plugins/Realtime/realtimeupdate.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 5582d6d00..3141e742a 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -200,8 +200,6 @@ RealtimeUpdate = { 'font-size':'1em' }); $('#showstream #notices_primary').css({'margin-top':'18px'}); -alert(url); -alert(timeline); RT.bind('click', function() { window.open(url, '', -- cgit v1.2.3