Version 15.113.7

This commit is contained in:
Antonio Cañas Vargas 2016-01-15 02:41:55 +01:00
parent 376de0324d
commit 82beb299e9
5 changed files with 51 additions and 16 deletions

View File

@ -1669,6 +1669,14 @@ a:hover img.CENTRE_PHOTO_SHOW
.LOG_R {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:red; font-size:11pt;} .LOG_R {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:red; font-size:11pt;}
/******************************** Social activity ****************************/ /******************************** Social activity ****************************/
.SOCIAL_FORM_POST {
resize:none;
}
/*
.SOCIAL_FORM_POST:focus {
height:200px;
}
*/
#view_new_posts_container,#view_old_posts_container #view_new_posts_container,#view_old_posts_container
{ {
display:table-cell; display:table-cell;
@ -1688,6 +1696,16 @@ a:hover img.CENTRE_PHOTO_SHOW
padding:0; padding:0;
} }
.SOCIAL_NEW_PUB
{
background-color:#DDECF1;
animation: fadein 2s linear forwards;
}
@keyframes fadein
{
to {background-color:white;}
}
.SOCIAL_PUB .SOCIAL_PUB
{ {
width:536px; width:536px;

View File

@ -588,8 +588,10 @@ function moveNewTimelineToTimeline() {
var countNewTimeline = newTimeline.childNodes.length; var countNewTimeline = newTimeline.childNodes.length;
if (countNewTimeline) { if (countNewTimeline) {
var timeline = document.getElementById("timeline_list"); var timeline = document.getElementById("timeline_list");
for (var i=0; i<countNewTimeline; i++) for (var i=0; i<countNewTimeline; i++) {
timeline.insertBefore(newTimeline.lastChild, timeline.childNodes[0]); timeline.insertBefore(newTimeline.lastChild, timeline.childNodes[0]);
timeline.childNodes[0].className += " SOCIAL_NEW_PUB";
}
} }
// Reset number of new posts after moving // Reset number of new posts after moving

View File

@ -119,21 +119,21 @@
// TODO: Increment one second after each refresh in social timeline? // TODO: Increment one second after each refresh in social timeline?
// TODO: Add a new type of visibility of profile "unknown". Keep the same for photos? // 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: Do checks about new positiion in JavaScript where MathJax is evaluated
/*****************************************************************************/ /*****************************************************************************/
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.113.5 (2016-01-14)" #define Log_PLATFORM_VERSION "SWAD 15.113.7 (2016-01-15)"
#define CSS_FILE "swad15.113.4.css" #define CSS_FILE "swad15.113.4.css"
#define JS_FILE "swad15.113.5.js" #define JS_FILE "swad15.113.5.js"
// Number of lines (includes comments but not blank lines) has been got with the following command: // 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 // 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.7: Jan 15, 2016 New social publishings fade in when user click to view them.
New style for textarea where enter a new social post. (192715 lines)
Version 15.113.6: Jan 14, 2016 Sinchronize timeline in other actions. (192684 lines)
Version 15.113.5: Jan 14, 2016 Change in message. Version 15.113.5: Jan 14, 2016 Change in message.
Removed unused code in JavaScript. (192684 lines) Removed unused code in JavaScript. (192684 lines)
Version 15.113.4: Jan 14, 2016 Optimize JavaScript not concatenating big strings in new timeline. (192687 lines) Version 15.113.4: Jan 14, 2016 Optimize JavaScript not concatenating big strings in new timeline. (192687 lines)

View File

@ -609,12 +609,16 @@ static void Lay_WriteScriptInit (void)
" setTimeout(\"refreshConnected()\",%lu);\n", " setTimeout(\"refreshConnected()\",%lu);\n",
Txt_STR_LANG_ID[Gbl.Prefs.Language], Txt_STR_LANG_ID[Gbl.Prefs.Language],
Gbl.Usrs.Connected.TimeToRefreshInMs); Gbl.Usrs.Connected.TimeToRefreshInMs);
if (Gbl.CurrentAct == ActLstClk) if (Gbl.CurrentAct == ActLstClk)
// Refresh timeline via AJAX
fprintf (Gbl.F.Out," setTimeout(\"refreshLastClicks()\",%lu);\n", fprintf (Gbl.F.Out," setTimeout(\"refreshLastClicks()\",%lu);\n",
Cfg_TIME_TO_REFRESH_LAST_CLICKS); Cfg_TIME_TO_REFRESH_LAST_CLICKS);
else if (Gbl.CurrentAct == ActSeeSocTmlGbl) else if (Act_Actions[Gbl.CurrentAct].SuperAction == ActSeeSocTmlGbl)
// In all the actions children of ActSeeSocTmlGbl ==> refresh timeline via AJAX
fprintf (Gbl.F.Out," setTimeout(\"refreshNewTimeline()\",%lu);\n", fprintf (Gbl.F.Out," setTimeout(\"refreshNewTimeline()\",%lu);\n",
Cfg_TIME_TO_REFRESH_SOCIAL_TIMELINE); Cfg_TIME_TO_REFRESH_SOCIAL_TIMELINE);
fprintf (Gbl.F.Out,"}\n" fprintf (Gbl.F.Out,"}\n"
"</script>\n"); "</script>\n");
} }
@ -637,8 +641,9 @@ static void Lay_WriteScriptParamsAJAX (void)
Act_Actions[ActRefLstClk].ActCod); Act_Actions[ActRefLstClk].ActCod);
/***** Parameters related with refreshing of social timeline *****/ /***** Parameters related with refreshing of social timeline *****/
if (Gbl.CurrentAct == ActSeePubPrf) // TODO: Add other actions where social timeline is shown if (Act_Actions[Gbl.CurrentAct].SuperAction == ActSeePubPrf)
{ {
// In all the actions children of ActSeePubPrf ==> put parameters used by AJAX
if (Gbl.Usrs.Other.UsrDat.UsrCod <= 0) if (Gbl.Usrs.Other.UsrDat.UsrCod <= 0)
Usr_GetParamOtherUsrCodEncrypted (); Usr_GetParamOtherUsrCodEncrypted ();
if (!Gbl.Usrs.Other.UsrDat.Nickname[0]) if (!Gbl.Usrs.Other.UsrDat.Nickname[0])
@ -649,12 +654,13 @@ static void Lay_WriteScriptParamsAJAX (void)
Act_Actions[ActRefOldSocPubUsr].ActCod, Act_Actions[ActRefOldSocPubUsr].ActCod,
Gbl.Usrs.Other.UsrDat.Nickname); Gbl.Usrs.Other.UsrDat.Nickname);
} }
else if (Gbl.CurrentAct == ActSeeSocTmlGbl) // TODO: Add other actions where social timeline is shown else if (Act_Actions[Gbl.CurrentAct].SuperAction == ActSeeSocTmlGbl)
fprintf (Gbl.F.Out,"var RefreshParamNxtActNewPub = \"act=%ld\";\n" // In all the actions children of ActSeeSocTmlGbl ==> put parameters used by AJAX
"var RefreshParamNxtActOldPub = \"act=%ld\";\n" fprintf (Gbl.F.Out,"var RefreshParamNxtActNewPub = \"act=%ld\";\n"
"var RefreshParamUsr = \"\";\n", // No user specified "var RefreshParamNxtActOldPub = \"act=%ld\";\n"
Act_Actions[ActRefNewSocPubGbl].ActCod, "var RefreshParamUsr = \"\";\n", // No user specified
Act_Actions[ActRefOldSocPubGbl].ActCod); Act_Actions[ActRefNewSocPubGbl].ActCod,
Act_Actions[ActRefOldSocPubGbl].ActCod);
/***** Parameters with code of session and current course code *****/ /***** Parameters with code of session and current course code *****/
fprintf (Gbl.F.Out,"var RefreshParamIdSes = \"ses=%s\";\n" fprintf (Gbl.F.Out,"var RefreshParamIdSes = \"ses=%s\";\n"

View File

@ -53,6 +53,8 @@
#define Soc_MAX_NUM_SHARERS_SHOWN 10 // Maximum number of users shown who have share a social note #define Soc_MAX_NUM_SHARERS_SHOWN 10 // Maximum number of users shown who have share a social note
#define Soc_MAX_BYTES_SUMMARY 100 #define Soc_MAX_BYTES_SUMMARY 100
#define Soc_MAX_CHARS_IN_POST 1000
// Number of recent publishings got and shown the first time, before refreshing // Number of recent publishings got and shown the first time, before refreshing
#define Soc_MAX_RECENT_PUBS_TO_SHOW 10 // Publishings to show #define Soc_MAX_RECENT_PUBS_TO_SHOW 10 // Publishings to show
/* Try to get one more publishing that the number of publishings to show /* Try to get one more publishing that the number of publishings to show
@ -894,6 +896,8 @@ static void Soc_WriteSocialNote (const struct SocialNote *SocNot,
fprintf (Gbl.F.Out,"<li"); fprintf (Gbl.F.Out,"<li");
if (!ShowNoteAlone && ViewTopLine) if (!ShowNoteAlone && ViewTopLine)
fprintf (Gbl.F.Out," class=\"SOCIAL_PUB\""); fprintf (Gbl.F.Out," class=\"SOCIAL_PUB\"");
// else
// fprintf (Gbl.F.Out," class=\"SOCIAL_NEW_PUB\"");
fprintf (Gbl.F.Out,">"); fprintf (Gbl.F.Out,">");
if (SocNot->NotCod <= 0 || if (SocNot->NotCod <= 0 ||
@ -1653,11 +1657,16 @@ static void Soc_PutHiddenFormToWriteNewPost (void)
Act_FormStart (ActRcvSocPstGbl); Act_FormStart (ActRcvSocPstGbl);
/* Content of new post */ /* Content of new post */
fprintf (Gbl.F.Out,"<textarea name=\"Content\" cols=\"45\" rows=\"3\">" fprintf (Gbl.F.Out,"<textarea class=\"SOCIAL_FORM_POST\" name=\"Content\""
"</textarea>"); " rows=\"1\" cols=\"45\" maxlength=\"%u\""
" placeholder=\"Nuevo comentario\"" // TODO: Need translation
" onfocus=\"getElementById('post_submit').style.display = ''; this.rows = '10';\""
" onblur=\"if(this.value == '') { this.rows = '1'; getElementById('post_submit').style.display = 'none'; }\">"
"</textarea>",
Soc_MAX_CHARS_IN_POST);
/***** Send button *****/ /***** Send button *****/
fprintf (Gbl.F.Out,"<button type=\"submit\" class=\"BT_SUBMIT_INLINE BT_CREATE\">" fprintf (Gbl.F.Out,"<button id=\"post_submit\" type=\"submit\" class=\"BT_SUBMIT_INLINE BT_CREATE\" style=\"display:none;\">"
"%s" "%s"
"</button>", "</button>",
Txt_Post); Txt_Post);