From 759e45214b1ae751c1353b454d8f57a774f8e6a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sat, 9 Jan 2016 18:00:47 +0100 Subject: [PATCH] Version 15.104.1 --- js/swad15.104.js | 14 +++++++++++--- swad_changelog.h | 3 ++- swad_social.c | 5 ++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/js/swad15.104.js b/js/swad15.104.js index df797f8f6..645905bf9 100644 --- a/js/swad15.104.js +++ b/js/swad15.104.js @@ -447,9 +447,17 @@ function readSocialTimelineData() { var delay = parseInt(objXMLHttpReqSoc.responseText.substring(0,endOfDelay)); // Get refresh delay var htmlSocialTimeline = objXMLHttpReqSoc.responseText.substring(endOfDelay+1); // Get HTML code for social timeline - var divSocialTimeline = document.getElementById('recent_timeline'); // Access to social timeline DIV - if (divSocialTimeline) - divSocialTimeline.innerHTML = htmlSocialTimeline; // Update global connected DIV + var recentTimeline = document.getElementById('recent_timeline'); // Access to social timeline DIV + if (recentTimeline) { + recentTimeline.innerHTML = htmlSocialTimeline; // Update list of publishings in recent timeline + var lengthRecentTimeline = recentTimeline.childNodes.length; + if (lengthRecentTimeline) { + var timeline = document.getElementById("timeline"); + for(var i=0; i < lengthRecentTimeline; i++) + timeline.insertBefore(recentTimeline.lastChild, timeline.childNodes[0]); + } + } + if (delay >= 5000) // If refresh slower than 1 time each 5 seconds, do refresh; else abort setTimeout('refreshSocialTimeline()',delay); } diff --git a/swad_changelog.h b/swad_changelog.h index 5ac3ef24a..315c2b2b7 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -118,13 +118,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.104 (2016-01-09)" +#define Log_PLATFORM_VERSION "SWAD 15.104.1 (2016-01-09)" #define CSS_FILE "swad15.102.css" #define JS_FILE "swad15.104.js" // Number of lines (includes comments but not blank lines) has been got with the following command: // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1 /* + Version 15.104.1: Jan 09, 2016 Refresh recent social timeline via AJAX. (191727 lines) Version 15.104: Jan 09, 2016 Refresh recent social timeline via AJAX. Not finished. (191720 lines) Version 15.103.2: Jan 09, 2016 Check that social post or comments are not empty. (191652 lines) Version 15.103.1: Jan 08, 2016 Changes in timeline. (191646 lines) diff --git a/swad_social.c b/swad_social.c index d3cf609a7..4a48ece64 100644 --- a/swad_social.c +++ b/swad_social.c @@ -371,13 +371,12 @@ static void Soc_ShowTimeline (const char *Query,Act_Action_t UpdateAction, Soc_PutHiddenFormToWriteNewPost (); /***** Place to insert new publishings *****/ - fprintf (Gbl.F.Out,"