From fe81a5919831fbd0867e19aa084d7d525ef2fcd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sun, 4 Dec 2016 23:09:28 +0100 Subject: [PATCH] Version 16.86.5 --- css/{swad16.82.2.css => swad16.86.5.css} | 2 ++ swad_assignment.c | 11 ++++++--- swad_attendance.c | 11 ++++++--- swad_calendar.c | 16 +++++++----- swad_changelog.h | 5 ++-- swad_group.c | 31 ++++++++++++++++++++++++ swad_group.h | 1 + swad_survey.c | 11 ++++++--- swad_timetable.c | 8 +++--- 9 files changed, 76 insertions(+), 20 deletions(-) rename css/{swad16.82.2.css => swad16.86.5.css} (99%) diff --git a/css/swad16.82.2.css b/css/swad16.86.5.css similarity index 99% rename from css/swad16.82.2.css rename to css/swad16.86.5.css index 4dbf56881..9b6895f3a 100644 --- a/css/swad16.82.2.css +++ b/css/swad16.86.5.css @@ -1996,6 +1996,7 @@ a:hover img.CENTRE_PHOTO_SHOW { box-sizing:border-box; height:44px; + padding:0 10px; text-align:center; vertical-align:middle; } @@ -2003,6 +2004,7 @@ a:hover img.CENTRE_PHOTO_SHOW { box-sizing:border-box; height:44px; + padding:0 10px; text-align:center; vertical-align:middle; border:solid 1px; diff --git a/swad_assignment.c b/swad_assignment.c index 556ab89b4..df7352c5b 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -69,6 +69,7 @@ static void Asg_PutIconToCreateNewAsg (void); static void Asg_PutButtonToCreateNewAsg (void); static void Asg_PutParamsToCreateNewAsg (void); static void Asg_PutFormToSelectWhichGroupsToShow (void); +static void Asg_ParamsWhichGroupsToShow (void); static void Asg_ShowOneAssignment (long AsgCod); static void Asg_WriteAsgAuthor (struct Assignment *Asg); static void Asg_WriteAssignmentFolder (struct Assignment *Asg); @@ -280,11 +281,15 @@ static void Asg_PutParamsToCreateNewAsg (void) static void Asg_PutFormToSelectWhichGroupsToShow (void) { - Act_FormStart (ActSeeAsg); + fprintf (Gbl.F.Out,"
"); + Grp_ShowFormToSelWhichGrps (ActSeeAsg,Asg_ParamsWhichGroupsToShow); + fprintf (Gbl.F.Out,"
"); + } + +static void Asg_ParamsWhichGroupsToShow (void) + { Asg_PutHiddenParamAsgOrderType (); Pag_PutHiddenParamPagNum (Gbl.Pag.CurrentPage); - Grp_ShowSelectorWhichGrps (); - Act_FormEnd (); } /*****************************************************************************/ diff --git a/swad_attendance.c b/swad_attendance.c index a602bd5e6..41534c83f 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -72,6 +72,7 @@ typedef enum static void Att_ShowAllAttEvents (void); static void Att_PutFormToSelectWhichGroupsToShow (void); +static void Att_ParamsWhichGroupsToShow (void); static void Att_PutIconToCreateNewAttEvent (void); static void Att_PutButtonToCreateNewAttEvent (void); static void Att_PutParamsToCreateNewAttEvent (void); @@ -285,11 +286,15 @@ static void Att_ShowAllAttEvents (void) static void Att_PutFormToSelectWhichGroupsToShow (void) { - Act_FormStart (ActSeeAtt); + fprintf (Gbl.F.Out,"
"); + Grp_ShowFormToSelWhichGrps (ActSeeAtt,Att_ParamsWhichGroupsToShow); + fprintf (Gbl.F.Out,"
"); + } + +static void Att_ParamsWhichGroupsToShow (void) + { Att_PutHiddenParamAttOrderType (); Pag_PutHiddenParamPagNum (Gbl.Pag.CurrentPage); - Grp_ShowSelectorWhichGrps (); - Act_FormEnd (); } /*****************************************************************************/ diff --git a/swad_calendar.c b/swad_calendar.c index 615ea91c7..53a0d8212 100644 --- a/swad_calendar.c +++ b/swad_calendar.c @@ -77,7 +77,9 @@ void Cal_PutIconsToSelectFirstDayOfWeek (void) Lay_StartRoundFrame (NULL,Txt_Calendar, Cal_PutIconsFirstDayOfWeek, Hlp_PROFILE_Preferences_calendar); + fprintf (Gbl.F.Out,"
"); Cal_ShowFormToSelFirstDayOfWeek (ActChg1stDay,NULL,"ICO40x40B"); + fprintf (Gbl.F.Out,"
"); Lay_EndRoundFrame (); } @@ -103,14 +105,13 @@ void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,void (*FuncParams) (), extern const char *Txt_DAYS_SMALL[7]; unsigned FirstDayOfWeek; - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,"
"); for (FirstDayOfWeek = 0; // Monday FirstDayOfWeek <= 6; // Sunday FirstDayOfWeek++) if (Cal_DayIsValidAsFirstDayOfWeek[FirstDayOfWeek]) { - fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,""); } - fprintf (Gbl.F.Out,"" - "
", + fprintf (Gbl.F.Out,"
", FirstDayOfWeek == Gbl.Prefs.FirstDayOfWeek ? "PREF_ON" : "PREF_OFF"); Act_FormStart (Action); @@ -126,10 +127,9 @@ void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,void (*FuncParams) (), Txt_First_day_of_the_week,Txt_DAYS_SMALL[FirstDayOfWeek], ClassIcon); Act_FormEnd (); - fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,""); } /*****************************************************************************/ @@ -258,7 +258,11 @@ void Cal_DrawCalendar (void) /***** Draw several months *****/ /* Show form to change first day of week */ if (!PrintView) + { + fprintf (Gbl.F.Out,"
"); Cal_ShowFormToSelFirstDayOfWeek (ActChgCal1stDay,NULL,"ICO25x25"); + fprintf (Gbl.F.Out,"
"); + } /* JavaScript will write HTML here */ fprintf (Gbl.F.Out,"
" diff --git a/swad_changelog.h b/swad_changelog.h index 2b001b10b..73a0d20fe 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -183,13 +183,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.86.4 (2016-12-04)" -#define CSS_FILE "swad16.82.2.css" +#define Log_PLATFORM_VERSION "SWAD 16.86.5 (2016-12-04)" +#define CSS_FILE "swad16.86.5.css" #define JS_FILE "swad16.84.2.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.86.5: Dec 04, 2016 Changes in layout of forms to change which groups to show / first day of week. (209913 lines) Version 16.86.4: Dec 04, 2016 Contextual icons to change which groups to show. (209864 lines) Version 16.86.3: Dec 04, 2016 Changed icons related to hierarchy. (209815 lines) Version 16.86.2: Dec 04, 2016 Fixed bugs in my timetable. (209814 lines) diff --git a/swad_group.c b/swad_group.c index dc9aed18c..d1b179505 100644 --- a/swad_group.c +++ b/swad_group.c @@ -4231,6 +4231,37 @@ void Grp_ShowSelectorWhichGrps (void) "
"); } +void Grp_ShowFormToSelWhichGrps (Act_Action_t Action,void (*FuncParams) ()) + { + extern const char *Txt_Show_WHICH_groups[2]; + Grp_WhichGroups_t WhichGrps; + + fprintf (Gbl.F.Out,"
"); + for (WhichGrps = Grp_ONLY_MY_GROUPS; + WhichGrps <= Grp_ALL_GROUPS; + WhichGrps++) + { + fprintf (Gbl.F.Out,"
", + WhichGrps == Gbl.CurrentCrs.Grps.WhichGrps ? "PREF_ON" : + "PREF_OFF"); + Act_FormStart (Action); + Par_PutHiddenParamUnsigned ("WhichGrps",(unsigned) WhichGrps); + if (FuncParams) // Extra parameters depending on the action + FuncParams (); + fprintf (Gbl.F.Out,"", + Gbl.Prefs.IconsURL, + WhichGrps == Grp_ONLY_MY_GROUPS ? "myhierarchy64x64.png" : + "hierarchy64x64.png", + Txt_Show_WHICH_groups[WhichGrps], + Txt_Show_WHICH_groups[WhichGrps]); + Act_FormEnd (); + fprintf (Gbl.F.Out,"
"); + } + fprintf (Gbl.F.Out,"
"); + } + /*****************************************************************************/ /************* Get whether to show only my groups or all groups **************/ /*****************************************************************************/ diff --git a/swad_group.h b/swad_group.h index 70e5dc068..a355a218a 100644 --- a/swad_group.h +++ b/swad_group.h @@ -183,6 +183,7 @@ void Grp_PutParamWhichGrps (void); void Grp_PutParamWhichGrpsOnlyMyGrps (void); void Grp_PutParamWhichGrpsAllGrps (void); void Grp_ShowSelectorWhichGrps (void); +void Grp_ShowFormToSelWhichGrps (Act_Action_t Action,void (*FuncParams) ()); void Grp_GetParamWhichGrps (void); #endif diff --git a/swad_survey.c b/swad_survey.c index 2c75c32f1..76ed064f7 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -97,6 +97,7 @@ static void Svy_PutIconToCreateNewSvy (void); static void Svy_PutButtonToCreateNewSvy (void); static void Svy_PutParamsToCreateNewSvy (void); static void Svy_PutFormToSelectWhichGroupsToShow (void); +static void Svy_ParamsWhichGroupsToShow (void); static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, bool ShowOnlyThisSvyComplete); static void Svy_WriteAuthor (struct Survey *Svy); @@ -367,11 +368,15 @@ static void Svy_PutParamsToCreateNewSvy (void) static void Svy_PutFormToSelectWhichGroupsToShow (void) { - Act_FormStart (ActSeeAllSvy); + fprintf (Gbl.F.Out,"
"); + Grp_ShowFormToSelWhichGrps (ActSeeAllSvy,Svy_ParamsWhichGroupsToShow); + fprintf (Gbl.F.Out,"
"); + } + +static void Svy_ParamsWhichGroupsToShow (void) + { Svy_PutHiddenParamSvyOrderType (); Pag_PutHiddenParamPagNum (Gbl.Pag.CurrentPage); - Grp_ShowSelectorWhichGrps (); - Act_FormEnd (); } /*****************************************************************************/ diff --git a/swad_timetable.c b/swad_timetable.c index 5f6e95121..8ee4956be 100644 --- a/swad_timetable.c +++ b/swad_timetable.c @@ -290,6 +290,8 @@ void TT_ShowClassTimeTable (void) TT_ShowTimeTableGrpsSelected (); else { + fprintf (Gbl.F.Out,"
"); + /***** Select whether show only my groups or all groups *****/ if ( Gbl.TimeTable.Type == TT_MY_TIMETABLE || (Gbl.TimeTable.Type == TT_COURSE_TIMETABLE && @@ -300,6 +302,8 @@ void TT_ShowClassTimeTable (void) Cal_ShowFormToSelFirstDayOfWeek (ActChgTT1stDay[Gbl.TimeTable.Type], Grp_PutParamWhichGrps, "ICO25x25"); + + fprintf (Gbl.F.Out,"
"); } /***** Show the time table *****/ @@ -387,9 +391,7 @@ static void TT_PutFormToSelectWhichGroupsToShow (void) ActUnk, // TT_TUTOR_TIMETABLE }; - Act_FormStart (ActSeeTT[Gbl.TimeTable.Type]); - Grp_ShowSelectorWhichGrps (); - Act_FormEnd (); + Grp_ShowFormToSelWhichGrps (ActSeeTT[Gbl.TimeTable.Type],NULL); } /*****************************************************************************/