summaryrefslogtreecommitdiff
path: root/plugins/Realtime/realtimeupdate.js
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Realtime/realtimeupdate.js')
-rw-r--r--plugins/Realtime/realtimeupdate.js60
1 files changed, 41 insertions, 19 deletions
diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js
index 9371326fe..9b9991b9e 100644
--- a/plugins/Realtime/realtimeupdate.js
+++ b/plugins/Realtime/realtimeupdate.js
@@ -1,5 +1,31 @@
-// add a notice encoded as JSON into the current timeline
-//
+/*
+ * StatusNet - a distributed open-source microblogging tool
+ * Copyright (C) 2008, StatusNet, Inc.
+ *
+ * Add a notice encoded as JSON into the current timeline
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @category Plugin
+ * @package StatusNet
+ * @author Evan Prodromou <evan@status.net>
+ * @author Sarven Capadisli <csarven@status.net>
+ * @copyright 2009 StatusNet, Inc.
+ * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
+ * @link http://status.net/
+ */
+
// TODO: i18n
RealtimeUpdate = {
@@ -19,15 +45,9 @@ RealtimeUpdate = {
DT = document.title;
$(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').removeClass('mark-top');
- $('#notices_primary .notice:first').css({
- 'border-top-color':'#AAAAAA',
- 'border-top-style':'solid'
- });
+ $('#notices_primary .notice:first').addClass('mark-top');
RealtimeUpdate._updatecounter = 0;
document.title = DT;
@@ -50,7 +70,7 @@ RealtimeUpdate = {
$("#notices_primary .notices").prepend(noticeItem);
$("#notices_primary .notice:first").css({display:"none"});
$("#notices_primary .notice:first").fadeIn(1000);
- NoticeReply();
+ SN.U.NoticeReply();
RealtimeUpdate._updatecounter += 1;
document.title = '('+RealtimeUpdate._updatecounter+') ' + DT;
@@ -137,12 +157,14 @@ RealtimeUpdate = {
addPopup: function(url, timeline, iconurl)
{
- $('#notices_primary').css({'position':'relative'});
- $('#notices_primary').prepend('<button id="realtime_timeline" title="Pop up in a window">Pop up</button>');
+ var NP = $('#notices_primary');
+ NP.css({'position':'relative'});
+ NP.prepend('<button id="realtime_timeline" title="Pop up in a window">Pop up</button>');
- $('#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',
@@ -150,15 +172,16 @@ 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');
+ 'toolbar=no,resizable=yes,scrollbars=yes,status=yes,width=500,height=550');
return false;
});
@@ -166,7 +189,6 @@ RealtimeUpdate = {
initPopupWindow: function()
{
- window.resizeTo(500, 550);
$('address').hide();
$('#content').css({'width':'93.5%'});