From a9cf185e692fdc9dea2a9b127826ea8e0f9f1021 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 15 Sep 2009 13:53:16 +0000 Subject: Updated XHR return markup for Realtime plugin --- plugins/Realtime/realtimeupdate.js | 42 +++++++++----------------------------- 1 file changed, 10 insertions(+), 32 deletions(-) (limited to 'plugins/Realtime/realtimeupdate.js') diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index d55db5859..eba8ac1d9 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -1,8 +1,8 @@ // add a notice encoded as JSON into the current timeline // +// TODO: i18n RealtimeUpdate = { - _userid: 0, _replyurl: '', _favorurl: '', @@ -50,26 +50,15 @@ RealtimeUpdate = { "

"+html+"

"+ ""+ "
"+ - "
"+ - "
Published
"+ - "
"+ - ""+ + ""+ "a few seconds ago"+ " "+ - "
"+ - "
"+ - "
"+ - "
From
"+ - "
"+source+"
"+ // may have a link, I think - "
"; - + ""+ + "from "+ + "+source+"++ // may have a link + ""; if (data['in_reply_to_status_id']) { - ni = ni+"
"+ - "
To
"+ - "
"+ - "in reply to"+ - "
"+ - "
"; + ni = ni+" in context"; } ni = ni+"
"+ @@ -96,7 +85,7 @@ RealtimeUpdate = { ff = "
"+ "
"+ - "Favor this notice"+ // XXX: i18n + "Favor this notice"+ ""+ ""+ ""+ @@ -108,13 +97,7 @@ RealtimeUpdate = { makeReplyLink: function(id, nickname) { var rl; - rl = "
"+ - "
Reply to this notice
"+ - "
"+ - "Reply "+id+""+ - ""+ - "
"+ - "
"; + rl = "Reply "+id+""; return rl; }, @@ -123,12 +106,7 @@ RealtimeUpdate = { var dl, delurl; delurl = RealtimeUpdate._deleteurl.replace("0000000000", id); - dl = "
"+ - "
Delete this notice
"+ - "
"+ - "Delete"+ - "
"+ - "
"; + dl = "Delete"; return dl; }, -- cgit v1.2.3-54-g00ecf From 6568a3202d3acfde694b359e2524d52d93dc83dd Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 16 Sep 2009 13:29:46 +0000 Subject: Fixed typo --- plugins/Realtime/realtimeupdate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/Realtime/realtimeupdate.js') diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index eba8ac1d9..b2c8bb56d 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -55,7 +55,7 @@ RealtimeUpdate = { " "+ ""+ "from "+ - "+source+"++ // may have a link + "+source+"+ // may have a link ""; if (data['in_reply_to_status_id']) { ni = ni+" in context"; -- cgit v1.2.3-54-g00ecf From d9953e015b593965150bb528536f1f90674620ae Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 16 Sep 2009 16:04:19 +0000 Subject: Fixed missing quotes --- plugins/Realtime/realtimeupdate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/Realtime/realtimeupdate.js') diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index b2c8bb56d..faec8d89c 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -55,7 +55,7 @@ RealtimeUpdate = { " "+ ""+ "from "+ - "+source+"+ // may have a link + ""+source+""+ // may have a link ""; if (data['in_reply_to_status_id']) { ni = ni+" in context"; -- cgit v1.2.3-54-g00ecf From acd5a53257f6d0677d1630e4f6cae80706cdbdba Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 21 Sep 2009 19:17:37 +0000 Subject: Initial UI to allow certain timelines to be viewed in a new window in realtime --- plugins/Realtime/RealtimePlugin.php | 2 + plugins/Realtime/icon_external.gif | Bin 0 -> 90 bytes plugins/Realtime/jquery.getUrlParam.js | 72 +++++++++ plugins/Realtime/realtimeupdate.js | 263 +++++++++++++++++++-------------- 4 files changed, 225 insertions(+), 112 deletions(-) create mode 100644 plugins/Realtime/icon_external.gif create mode 100644 plugins/Realtime/jquery.getUrlParam.js (limited to 'plugins/Realtime/realtimeupdate.js') diff --git a/plugins/Realtime/RealtimePlugin.php b/plugins/Realtime/RealtimePlugin.php index 7a612a406..611b1d86c 100644 --- a/plugins/Realtime/RealtimePlugin.php +++ b/plugins/Realtime/RealtimePlugin.php @@ -97,6 +97,8 @@ class RealtimePlugin extends Plugin $user_id = 0; } + $action->script('plugins/Realtime/jquery.getUrlParam.js'); + $action->elementStart('script', array('type' => 'text/javascript')); $action->raw('