diff --git a/css/swad15.113.4.css b/css/swad15.113.4.css index a231d5d28..31a686530 100644 --- a/css/swad15.113.4.css +++ b/css/swad15.113.4.css @@ -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;} /******************************** Social activity ****************************/ +.SOCIAL_FORM_POST { + resize:none; +} +/* +.SOCIAL_FORM_POST:focus { + height:200px; +} +*/ #view_new_posts_container,#view_old_posts_container { display:table-cell; @@ -1688,6 +1696,16 @@ a:hover img.CENTRE_PHOTO_SHOW padding:0; } +.SOCIAL_NEW_PUB + { + background-color:#DDECF1; + animation: fadein 2s linear forwards; + } +@keyframes fadein + { + to {background-color:white;} + } + .SOCIAL_PUB { width:536px; diff --git a/js/swad15.113.5.js b/js/swad15.113.5.js index 9d2f018e5..40fdde77b 100644 --- a/js/swad15.113.5.js +++ b/js/swad15.113.5.js @@ -588,8 +588,10 @@ function moveNewTimelineToTimeline() { var countNewTimeline = newTimeline.childNodes.length; if (countNewTimeline) { var timeline = document.getElementById("timeline_list"); - for (var i=0; i refresh timeline via AJAX fprintf (Gbl.F.Out," setTimeout(\"refreshNewTimeline()\",%lu);\n", Cfg_TIME_TO_REFRESH_SOCIAL_TIMELINE); + fprintf (Gbl.F.Out,"}\n" "\n"); } @@ -637,8 +641,9 @@ static void Lay_WriteScriptParamsAJAX (void) Act_Actions[ActRefLstClk].ActCod); /***** 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) Usr_GetParamOtherUsrCodEncrypted (); if (!Gbl.Usrs.Other.UsrDat.Nickname[0]) @@ -649,12 +654,13 @@ static void Lay_WriteScriptParamsAJAX (void) Act_Actions[ActRefOldSocPubUsr].ActCod, Gbl.Usrs.Other.UsrDat.Nickname); } - else if (Gbl.CurrentAct == ActSeeSocTmlGbl) // TODO: Add other actions where social timeline is shown - fprintf (Gbl.F.Out,"var RefreshParamNxtActNewPub = \"act=%ld\";\n" - "var RefreshParamNxtActOldPub = \"act=%ld\";\n" - "var RefreshParamUsr = \"\";\n", // No user specified - Act_Actions[ActRefNewSocPubGbl].ActCod, - Act_Actions[ActRefOldSocPubGbl].ActCod); + else if (Act_Actions[Gbl.CurrentAct].SuperAction == ActSeeSocTmlGbl) + // In all the actions children of ActSeeSocTmlGbl ==> put parameters used by AJAX + fprintf (Gbl.F.Out,"var RefreshParamNxtActNewPub = \"act=%ld\";\n" + "var RefreshParamNxtActOldPub = \"act=%ld\";\n" + "var RefreshParamUsr = \"\";\n", // No user specified + Act_Actions[ActRefNewSocPubGbl].ActCod, + Act_Actions[ActRefOldSocPubGbl].ActCod); /***** Parameters with code of session and current course code *****/ fprintf (Gbl.F.Out,"var RefreshParamIdSes = \"ses=%s\";\n" diff --git a/swad_social.c b/swad_social.c index d360ae140..832d89328 100644 --- a/swad_social.c +++ b/swad_social.c @@ -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_BYTES_SUMMARY 100 +#define Soc_MAX_CHARS_IN_POST 1000 + // Number of recent publishings got and shown the first time, before refreshing #define Soc_MAX_RECENT_PUBS_TO_SHOW 10 // 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,""); if (SocNot->NotCod <= 0 || @@ -1653,11 +1657,16 @@ static void Soc_PutHiddenFormToWriteNewPost (void) Act_FormStart (ActRcvSocPstGbl); /* Content of new post */ - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,"", + Soc_MAX_CHARS_IN_POST); /***** Send button *****/ - fprintf (Gbl.F.Out,"", Txt_Post);