Version 16.86.5

This commit is contained in:
Antonio Cañas Vargas 2016-12-04 23:09:28 +01:00
parent b21f9a936a
commit fe81a59198
9 changed files with 76 additions and 20 deletions

View File

@ -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;

View File

@ -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,"<div style=\"display:table; margin:0 auto;\">");
Grp_ShowFormToSelWhichGrps (ActSeeAsg,Asg_ParamsWhichGroupsToShow);
fprintf (Gbl.F.Out,"</div>");
}
static void Asg_ParamsWhichGroupsToShow (void)
{
Asg_PutHiddenParamAsgOrderType ();
Pag_PutHiddenParamPagNum (Gbl.Pag.CurrentPage);
Grp_ShowSelectorWhichGrps ();
Act_FormEnd ();
}
/*****************************************************************************/

View File

@ -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,"<div style=\"display:table; margin:0 auto;\">");
Grp_ShowFormToSelWhichGrps (ActSeeAtt,Att_ParamsWhichGroupsToShow);
fprintf (Gbl.F.Out,"</div>");
}
static void Att_ParamsWhichGroupsToShow (void)
{
Att_PutHiddenParamAttOrderType ();
Pag_PutHiddenParamPagNum (Gbl.Pag.CurrentPage);
Grp_ShowSelectorWhichGrps ();
Act_FormEnd ();
}
/*****************************************************************************/

View File

@ -77,7 +77,9 @@ void Cal_PutIconsToSelectFirstDayOfWeek (void)
Lay_StartRoundFrame (NULL,Txt_Calendar,
Cal_PutIconsFirstDayOfWeek,
Hlp_PROFILE_Preferences_calendar);
fprintf (Gbl.F.Out,"<div style=\"display:table; margin:0 auto;\">");
Cal_ShowFormToSelFirstDayOfWeek (ActChg1stDay,NULL,"ICO40x40B");
fprintf (Gbl.F.Out,"</div>");
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,"<table class=\"CELLS_PAD_2\" style=\"margin:0 auto;\">"
"<tr>");
fprintf (Gbl.F.Out,"<div style=\"display:table-cell; padding:0 20px;\">");
for (FirstDayOfWeek = 0; // Monday
FirstDayOfWeek <= 6; // Sunday
FirstDayOfWeek++)
if (Cal_DayIsValidAsFirstDayOfWeek[FirstDayOfWeek])
{
fprintf (Gbl.F.Out,"<td class=\"%s\">",
fprintf (Gbl.F.Out,"<div class=\"%s\" style=\"display:table-cell;\">",
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,"</td>");
fprintf (Gbl.F.Out,"</div>");
}
fprintf (Gbl.F.Out,"</tr>"
"</table>");
fprintf (Gbl.F.Out,"</div>");
}
/*****************************************************************************/
@ -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,"<div style=\"display:table; margin:0 auto;\">");
Cal_ShowFormToSelFirstDayOfWeek (ActChgCal1stDay,NULL,"ICO25x25");
fprintf (Gbl.F.Out,"</div>");
}
/* JavaScript will write HTML here */
fprintf (Gbl.F.Out,"<div id=\"calendar\">"

View File

@ -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)

View File

@ -4231,6 +4231,37 @@ void Grp_ShowSelectorWhichGrps (void)
"</div>");
}
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,"<div style=\"display:table-cell; padding:0 20px;\">");
for (WhichGrps = Grp_ONLY_MY_GROUPS;
WhichGrps <= Grp_ALL_GROUPS;
WhichGrps++)
{
fprintf (Gbl.F.Out,"<div class=\"%s\" style=\"display:table-cell;\">",
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,"<input type=\"image\" src=\"%s/%s\""
" alt=\"%s\" title=\"%s\" class=\"ICO25x25\""
" style=\"margin:0 auto;\" />",
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,"</div>");
}
fprintf (Gbl.F.Out,"</div>");
}
/*****************************************************************************/
/************* Get whether to show only my groups or all groups **************/
/*****************************************************************************/

View File

@ -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

View File

@ -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,"<div style=\"display:table; margin:0 auto;\">");
Grp_ShowFormToSelWhichGrps (ActSeeAllSvy,Svy_ParamsWhichGroupsToShow);
fprintf (Gbl.F.Out,"</div>");
}
static void Svy_ParamsWhichGroupsToShow (void)
{
Svy_PutHiddenParamSvyOrderType ();
Pag_PutHiddenParamPagNum (Gbl.Pag.CurrentPage);
Grp_ShowSelectorWhichGrps ();
Act_FormEnd ();
}
/*****************************************************************************/

View File

@ -290,6 +290,8 @@ void TT_ShowClassTimeTable (void)
TT_ShowTimeTableGrpsSelected ();
else
{
fprintf (Gbl.F.Out,"<div style=\"display:table; margin:0 auto;\">");
/***** 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,"</div>");
}
/***** 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);
}
/*****************************************************************************/