From 4aa4482315381dc01c7c574e808447e49b9ca4cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Wed, 23 Nov 2016 14:14:14 +0100 Subject: [PATCH] Version 16.68.8 --- swad_changelog.h | 3 ++- swad_message.c | 55 ++++++++++++++++++++++++------------------------ 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 7322c5b87..6eae55db9 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -172,13 +172,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.68.7 (2016-11-23)" +#define Log_PLATFORM_VERSION "SWAD 16.68.8 (2016-11-23)" #define CSS_FILE "swad16.68.css" #define JS_FILE "swad16.46.1.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 16.68.8: Nov 23, 2016 Changes in layout of messages received / sent. (207462 lines) Version 16.68.7: Nov 23, 2016 Changes in layout of messages received / sent. (207463 lines) Version 16.68.6: Nov 23, 2016 Contextual help on messages. (207455 lines) Version 16.68.5: Nov 22, 2016 Code refactoring and change in layout of file browser and contextual links. (207443 lines) diff --git a/swad_message.c b/swad_message.c index 82b540545..c56bbb652 100644 --- a/swad_message.c +++ b/swad_message.c @@ -1687,37 +1687,11 @@ static void Msg_ShowSentOrReceivedMessages (void) Msg_MakeFilterFromToSubquery (FilterFromToSubquery); Msg_GetDistinctCoursesInMyMessages (); - /***** Filter messages *****/ - /* Start frame with messages */ - Lay_StartRoundFrame (NULL,"Filter", // TODO: Need translation!!!! - NULL,Help[Gbl.Msg.TypeOfMessages]); - - /* Form to see messages again */ - Act_FormStart (ActionSee[Gbl.Msg.TypeOfMessages]); - Msg_ShowFormSelectCourseSentOrRecMsgs (); - Msg_ShowFormToFilterMsgs (); - if (Gbl.Msg.TypeOfMessages == Msg_MESSAGES_RECEIVED) - { - Msg_GetParamOnlyUnreadMsgs (); - Msg_ShowFormToShowOnlyUnreadMessages (); - } - - fprintf (Gbl.F.Out,"
"); - Act_LinkFormSubmitAnimated (Txt_Update_messages, - The_ClassFormBold[Gbl.Prefs.Theme], - NULL); - Lay_PutCalculateIconWithText (Txt_Update_messages,Txt_Update_messages); - fprintf (Gbl.F.Out,"
"); - - Act_FormEnd (); - - /* End frame */ - Lay_EndRoundFrame (); - - /***** Get nnumber of unread messages *****/ + /***** Get number of unread messages *****/ switch (Gbl.Msg.TypeOfMessages) { case Msg_MESSAGES_RECEIVED: + Msg_GetParamOnlyUnreadMsgs (); NumUnreadMsgs = Msg_GetNumUnreadMsgs (Gbl.Msg.FilterCrsCod,FilterFromToSubquery); break; case Msg_MESSAGES_SENT: @@ -1736,6 +1710,31 @@ static void Msg_ShowSentOrReceivedMessages (void) Msg_WriteNumMsgs (NumUnreadMsgs), Msg_PutIconsListMsgs,Help[Gbl.Msg.TypeOfMessages]); + /***** Filter messages *****/ + /* Start frame with filter */ + Lay_StartRoundFrame (NULL,"Filter", // TODO: Need translation!!!! + NULL,NULL); + + /* Form to see messages again */ + Act_FormStart (ActionSee[Gbl.Msg.TypeOfMessages]); + Msg_ShowFormSelectCourseSentOrRecMsgs (); + if (Gbl.Msg.TypeOfMessages == Msg_MESSAGES_RECEIVED) + Msg_ShowFormToShowOnlyUnreadMessages (); + Msg_ShowFormToFilterMsgs (); + + fprintf (Gbl.F.Out,"
"); + Act_LinkFormSubmitAnimated (Txt_Update_messages, + The_ClassFormBold[Gbl.Prefs.Theme], + NULL); + Lay_PutCalculateIconWithText (Txt_Update_messages,Txt_Update_messages); + fprintf (Gbl.F.Out,"
"); + + Act_FormEnd (); + + /* End frame */ + Lay_EndRoundFrame (); + + if (Gbl.Msg.NumMsgs) // If there are messages... { if (Gbl.Action.Act == ActExpRcvMsg) // Expanding a message, perhaps it is the result of following a link