From e9e522545ec809e5b5fe17973256fe84bcfd0bfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Mon, 4 Jul 2016 14:33:31 +0200 Subject: [PATCH] Version 15.241.1 --- swad_action.c | 26 ++++++++++++++------------ swad_action.h | 6 +++--- swad_changelog.h | 3 ++- swad_group.c | 3 +-- swad_layout.c | 8 ++++---- swad_layout.h | 4 ++-- swad_user.c | 6 +++--- 7 files changed, 29 insertions(+), 27 deletions(-) diff --git a/swad_action.c b/swad_action.c index 644581e97..f7e97c4fe 100644 --- a/swad_action.c +++ b/swad_action.c @@ -4596,7 +4596,7 @@ static void Act_FormStartInternal (Act_Action_t NextAction,bool PutParameterLoca fprintf (Gbl.F.Out,"\" id=\"%s\"",Id); if (OnSubmit) if (OnSubmit[0]) - fprintf (Gbl.F.Out," onsubmit=\"%s\"",OnSubmit); + fprintf (Gbl.F.Out," onsubmit=\"%s;\"",OnSubmit); switch (Act_Actions[NextAction].BrowserWindow) { case Act_NEW_WINDOW: @@ -4675,9 +4675,9 @@ void Act_FormEnd (void) // Requires an extern void Act_LinkFormSubmit (const char *Title,const char *LinkStyle, - const char *JSFunction) + const char *OnSubmit) { - Act_LinkFormSubmitId (Title,LinkStyle,Gbl.Form.Id,JSFunction); + Act_LinkFormSubmitId (Title,LinkStyle,Gbl.Form.Id,OnSubmit); } void Act_LinkFormSubmitUnique (const char *Title,const char *LinkStyle) @@ -4688,10 +4688,10 @@ void Act_LinkFormSubmitUnique (const char *Title,const char *LinkStyle) // Title can be NULL // LinkStyle can be NULL // Id can not be NULL -// JSFunction can be NULL +// OnSubmit can be NULL void Act_LinkFormSubmitId (const char *Title,const char *LinkStyle, - const char *Id,const char *JSFunction) + const char *Id,const char *OnSubmit) { fprintf (Gbl.F.Out,"", Id); } void Act_LinkFormSubmitAnimated (const char *Title,const char *LinkStyle, - const char *JSFunction) + const char *OnSubmit) { fprintf (Gbl.F.Out,"", diff --git a/swad_action.h b/swad_action.h index 971b24049..96dda7aec 100644 --- a/swad_action.h +++ b/swad_action.h @@ -1506,12 +1506,12 @@ void Act_FormStartId (Act_Action_t NextAction,const char *Id); void Act_SetParamsForm (char *ParamsStr,Act_Action_t NextAction,bool PutParameterLocationIfNoSesion); void Act_FormEnd (void); void Act_LinkFormSubmit (const char *Title,const char *LinkStyle, - const char *JSFunction); + const char *OnSubmit); void Act_LinkFormSubmitUnique (const char *Title,const char *LinkStyle); void Act_LinkFormSubmitId (const char *Title,const char *LinkStyle, - const char *Id,const char *JSFunction); + const char *Id,const char *OnSubmit); void Act_LinkFormSubmitAnimated (const char *Title,const char *LinkStyle, - const char *JSFunction); + const char *OnSubmit); void Act_SetUniqueId (char UniqueId[Act_MAX_LENGTH_ID]); diff --git a/swad_changelog.h b/swad_changelog.h index 70145e2c6..b73af28fa 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -136,13 +136,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.241 (2016-07-04)" +#define Log_PLATFORM_VERSION "SWAD 15.241.1 (2016-07-04)" #define CSS_FILE "swad15.229.css" #define JS_FILE "swad15.238.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 15.241.1: Jul 04, 2015 Code refactoring related with form submit. (203620 lines) Version 15.241: Jul 04, 2015 When composing a new message, subject and content are shown even if list of users is too big, in order to keep messages that had begun to be written. (203618 lines) Version 15.240.5: Jul 04, 2015 Code refactoring related to big lists of users. (203595 lines) Version 15.240.4: Jul 04, 2015 Fixed bugs in web service, reported by Rubén Martín Hidalgo. (203592 lines) diff --git a/swad_group.c b/swad_group.c index 0f622f6d6..a64ffd91b 100644 --- a/swad_group.c +++ b/swad_group.c @@ -286,8 +286,7 @@ static void Grp_ShowFormSeveralGrps (Act_Action_t NextAction) " style=\"padding-top:12px;\">"); Act_LinkFormSubmitAnimated (Txt_Update_students_according_to_selected_groups, The_ClassFormBold[Gbl.Prefs.Theme], - NextAction == ActReqMsgUsr ? "CopyMessageToHiddenFields()" : - NULL); + "CopyMessageToHiddenFields()"); Lay_PutCalculateIconWithText (Txt_Update_students_according_to_selected_groups, Txt_Update_students); fprintf (Gbl.F.Out,""); diff --git a/swad_layout.c b/swad_layout.c index 636a93d06..f1a169c7d 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -1008,7 +1008,7 @@ void Lay_PutContextualLink (Act_Action_t NextAction, void (*FuncParams) (), const char *Icon, const char *Title,const char *Text, - const char *JSFunction) + const char *OnSubmit) { extern const char *The_ClassFormBold[The_NUM_THEMES]; @@ -1022,7 +1022,7 @@ void Lay_PutContextualLink (Act_Action_t NextAction, Lay_PutIconLink (Icon,Title,Text, Text ? The_ClassFormBold[Gbl.Prefs.Theme] : NULL, - JSFunction); + OnSubmit); Act_FormEnd (); if (Text) @@ -1035,9 +1035,9 @@ void Lay_PutContextualLink (Act_Action_t NextAction, /*****************************************************************************/ void Lay_PutIconLink (const char *Icon,const char *Title,const char *Text, - const char *LinkStyle,const char *JSFunction) + const char *LinkStyle,const char *OnSubmit) { - Act_LinkFormSubmit (Title,LinkStyle,JSFunction); + Act_LinkFormSubmit (Title,LinkStyle,OnSubmit); Lay_PutIconWithText (Icon,Title,Text); fprintf (Gbl.F.Out,""); } diff --git a/swad_layout.h b/swad_layout.h index 858093c23..0187dc17b 100644 --- a/swad_layout.h +++ b/swad_layout.h @@ -75,9 +75,9 @@ void Lay_PutContextualLink (Act_Action_t NextAction, void (*FuncParams) (), const char *Icon, const char *Title,const char *Text, - const char *JSFunction); + const char *OnSubmit); void Lay_PutIconLink (const char *Icon,const char *Title,const char *Text, - const char *LinkStyle,const char *JSFunction); + const char *LinkStyle,const char *OnSubmit); void Lay_PutIconWithText (const char *Icon,const char *Alt,const char *Text); void Lay_PutCalculateIcon (const char *Alt); void Lay_PutCalculateIconWithText (const char *Alt,const char *Text); diff --git a/swad_user.c b/swad_user.c index f3fcd538d..7fdbfc4e6 100644 --- a/swad_user.c +++ b/swad_user.c @@ -4910,9 +4910,9 @@ static void Usr_FormToSelectUsrListType (Act_Action_t NextAction,Usr_ShowUsrsTyp Usr_PutParamUsrListType (ListType); Usr_PutExtraParamsUsrList (NextAction); Act_LinkFormSubmit (Txt_USR_LIST_TYPES[ListType], - The_ClassFormNoWrap[Gbl.Prefs.Theme], - NextAction == ActReqMsgUsr ? "CopyMessageToHiddenFields()" : - NULL); + The_ClassFormNoWrap[Gbl.Prefs.Theme], + NextAction == ActReqMsgUsr ? "CopyMessageToHiddenFields()" : + NULL); fprintf (Gbl.F.Out,"\"%s\""