mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-06 08:45:28 +02:00
Version 15.113.4
This commit is contained in:
parent
cccd9aeff6
commit
978f07220c
|
@ -1676,7 +1676,7 @@ a:hover img.CENTRE_PHOTO_SHOW
|
|||
text-align:center;
|
||||
vertical-align:middle;
|
||||
}
|
||||
#new_timeline_list
|
||||
#just_now_timeline_list,#new_timeline_list
|
||||
{
|
||||
display:none;
|
||||
margin:0;
|
|
@ -510,20 +510,33 @@ function readNewTimelineData() {
|
|||
if (objXMLHttpReqSoc.status == 200) {
|
||||
var endOfDelay = objXMLHttpReqSoc.responseText.indexOf('|',0); // Get separator position
|
||||
var delay = parseInt(objXMLHttpReqSoc.responseText.substring(0,endOfDelay)); // Get refresh delay
|
||||
var htmlNewTimeline = objXMLHttpReqSoc.responseText.substring(endOfDelay+1); // Get HTML code for social timeline
|
||||
var htmlJustNowTimeline = objXMLHttpReqSoc.responseText.substring(endOfDelay+1);// Get HTML code for social timeline
|
||||
|
||||
var newTimeline = document.getElementById('new_timeline_list'); // Access to UL with the new timeline
|
||||
if (newTimeline) {
|
||||
newTimeline.innerHTML = htmlNewTimeline + newTimeline.innerHTML; // Update list of publishings in new timeline
|
||||
var countNewTimeline = newTimeline.childNodes.length;
|
||||
var justNowTimeline = document.getElementById('just_now_timeline_list');// Access to UL for the just received timeline
|
||||
if (justNowTimeline) {
|
||||
justNowTimeline.innerHTML = htmlJustNowTimeline; // Update list of publishings in just now timeline
|
||||
var countJustNowTimeline = justNowTimeline.childNodes.length;
|
||||
|
||||
if (countNewTimeline) {
|
||||
if (countJustNowTimeline) { // New pubs just retrieved
|
||||
// Scripts in timeline got via AJAX are not executed ==> execute them
|
||||
evalScriptsInElem (newTimeline);
|
||||
evalScriptsInElem (justNowTimeline);
|
||||
|
||||
// Process mathematics; see http://docs.mathjax.org/en/latest/advanced/typeset.html
|
||||
MathJax.Hub.Queue(["Typeset",MathJax.Hub,justNowTimeline]);
|
||||
|
||||
// Move just received timeline to top of new timeline
|
||||
var newTimeline = document.getElementById('new_timeline_list'); // Access to UL with the new timeline
|
||||
|
||||
// Move all the LI elements in UL 'just_now_timeline_list' to the top of UL 'new_timeline_list'
|
||||
for (var i=0; i<countJustNowTimeline; i++)
|
||||
newTimeline.insertBefore(justNowTimeline.lastChild, newTimeline.childNodes[0]);
|
||||
|
||||
// Process mathematics; see http://docs.mathjax.org/en/latest/advanced/typeset.html
|
||||
// MathJax.Hub.Queue(["Typeset",MathJax.Hub,newTimeline]);
|
||||
|
||||
// Update number of new posts
|
||||
var viewNewPostsCount = document.getElementById('view_new_posts_count');
|
||||
viewNewPostsCount.innerHTML = countNewTimeline;
|
||||
var viewNewPostsCount = document.getElementById('view_new_posts_count');
|
||||
viewNewPostsCount.innerHTML = newTimeline.childNodes.length;
|
||||
|
||||
// Display message with new posts if hidden
|
||||
var viewNewPostsContainer = document.getElementById('view_new_posts_container');
|
||||
|
@ -554,13 +567,16 @@ function readOldTimelineData() {
|
|||
// Scripts in timeline got via AJAX are not executed ==> execute them
|
||||
evalScriptsInElem (oldTimeline);
|
||||
|
||||
// Process mathematics; see http://docs.mathjax.org/en/latest/advanced/typeset.html
|
||||
MathJax.Hub.Queue(["Typeset",MathJax.Hub,oldTimeline]);
|
||||
|
||||
// Move all the LI elements in UL 'old_timeline_list' to the bottom of UL 'timeline_list'
|
||||
var timeline = document.getElementById("timeline_list");
|
||||
for (var i=0; i<countOldTimeline; i++)
|
||||
timeline.appendChild(oldTimeline.firstChild);
|
||||
|
||||
// Process mathematics; see http://docs.mathjax.org/en/latest/advanced/typeset.html
|
||||
MathJax.Hub.Queue(["Typeset",MathJax.Hub,timeline]);
|
||||
// MathJax.Hub.Queue(["Typeset",MathJax.Hub,timeline]);
|
||||
}
|
||||
|
||||
if (countOldTimeline < 10) // Set to Soc_MAX_OLD_PUBS_TO_GET_AND_SHOW
|
||||
|
@ -586,7 +602,7 @@ function moveNewTimelineToTimeline() {
|
|||
timeline.insertBefore(newTimeline.lastChild, timeline.childNodes[0]);
|
||||
|
||||
// Process mathematics; see http://docs.mathjax.org/en/latest/advanced/typeset.html
|
||||
MathJax.Hub.Queue(["Typeset",MathJax.Hub,timeline]);
|
||||
// MathJax.Hub.Queue(["Typeset",MathJax.Hub,timeline]);
|
||||
}
|
||||
|
||||
// Reset and hide number of new posts after moving
|
|
@ -121,19 +121,20 @@
|
|||
// TODO: Add a new type of visibility of profile "unknown". Keep the same for photos?
|
||||
// TODO: Limit text of post/comment in social timeline to 1000 characters? Limit textarea to 20 lines not resizeable.
|
||||
// TODO: Sinchronize timeline in other actions
|
||||
// TODO: Optimize Javascript not concatenating big strings in new timeline
|
||||
// TODO: Do checks about new positiion in JavaScript where MathJax is evaluated
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.113.3 (2016-01-14)"
|
||||
#define CSS_FILE "swad15.111.css"
|
||||
#define JS_FILE "swad15.111.js"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.113.4 (2016-01-14)"
|
||||
#define CSS_FILE "swad15.113.4.css"
|
||||
#define JS_FILE "swad15.113.4.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.113.4: Jan 14, 2016 Optimize JavaScript not concatenating big strings in new timeline. (192687 lines)
|
||||
Version 15.113.3: Jan 14, 2016 Divs to get new publishings only in global timeline. (192673 lines)
|
||||
Version 15.113.2: Jan 14, 2016 Removed unused code. (192668 lines)
|
||||
Version 15.113.1: Jan 14, 2016 Remove unused function. (192675 lines)
|
||||
|
|
|
@ -664,7 +664,10 @@ static void Soc_ShowTimeline (const char *Query,const char *Title)
|
|||
/* Link to view new publishings via AJAX */
|
||||
Soc_PutLinkToViewNewPublishings ();
|
||||
|
||||
/* Hidden list where insert new publishings via AJAX */
|
||||
/* Hidden list where insert just received (not visible) publishings via AJAX */
|
||||
fprintf (Gbl.F.Out,"<ul id=\"just_now_timeline_list\"></ul>");
|
||||
|
||||
/* Hidden list where insert new (not visible) publishings via AJAX */
|
||||
fprintf (Gbl.F.Out,"<ul id=\"new_timeline_list\"></ul>");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user