diff --git a/swad_calendar.c b/swad_calendar.c
index b2e16a1fa..34e985e90 100644
--- a/swad_calendar.c
+++ b/swad_calendar.c
@@ -59,7 +59,7 @@ const bool Cal_DayIsValidAsFirstDayOfWeek[7] =
/***************************** Private prototypes ****************************/
/*****************************************************************************/
-static void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,const char *ClassIcon);
+static void Cal_PutIconsFirstDayOfWeek (void);
static unsigned Cal_GetParamFirstDayOfWeek (void);
@@ -73,33 +73,34 @@ void Cal_PutIconsToSelectFirstDayOfWeek (void)
{
extern const char *Txt_Calendar;
- Lay_StartRoundFrameTable (NULL,0,Txt_Calendar);
- Cal_ShowFormToSelFirstDayOfWeek (ActChg1stDay,"ICON40x40");
- Lay_EndRoundFrameTable ();
+ Lay_StartRoundFrame (NULL,Txt_Calendar,Cal_PutIconsFirstDayOfWeek);
+ Cal_ShowFormToSelFirstDayOfWeek (ActChg1stDay,"ICON40x40B");
+ Lay_EndRoundFrame ();
+ }
+
+/*****************************************************************************/
+/*********** Put contextual icons in first-day-of-week preference ************/
+/*****************************************************************************/
+
+static void Cal_PutIconsFirstDayOfWeek (void)
+ {
+ /***** Put icon to show a figure *****/
+ Gbl.Stat.FigureType = Sta_FIRST_DAY_OF_WEEK;
+ Sta_PutIconToShowFigure ();
}
/*****************************************************************************/
/************** Show form to select the first day of the week ****************/
/*****************************************************************************/
-void Cal_ShowIntegratedFormToSelFirstDayOfWeek (Act_Action_t Action)
- {
- fprintf (Gbl.F.Out,"
");
- Cal_ShowFormToSelFirstDayOfWeek (Action,"ICON25x25");
- fprintf (Gbl.F.Out,"
");
- }
-
-/*****************************************************************************/
-/******** Show form in calendar to select the first day of the week **********/
-/*****************************************************************************/
-
-static void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,const char *ClassIcon)
+void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,const char *ClassIcon)
{
extern const char *Txt_First_day_of_the_week;
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++)
@@ -121,7 +122,8 @@ static void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,const char *Cla
Act_FormEnd ();
fprintf (Gbl.F.Out,"");
}
- fprintf (Gbl.F.Out,"
");
+ fprintf (Gbl.F.Out,""
+ "
");
}
/*****************************************************************************/
@@ -249,7 +251,7 @@ void Cal_DrawCalendar (void)
/***** Draw several months *****/
/* Show form to change first day of week */
if (!PrintView)
- Cal_ShowIntegratedFormToSelFirstDayOfWeek (ActChgCal1stDay);
+ Cal_ShowFormToSelFirstDayOfWeek (ActChgCal1stDay,"ICON25x25");
/* JavaScript will write HTML here */
fprintf (Gbl.F.Out,""
diff --git a/swad_calendar.h b/swad_calendar.h
index 9aa456d2d..a8b8e385e 100644
--- a/swad_calendar.h
+++ b/swad_calendar.h
@@ -44,7 +44,7 @@
/*****************************************************************************/
void Cal_PutIconsToSelectFirstDayOfWeek (void);
-void Cal_ShowIntegratedFormToSelFirstDayOfWeek (Act_Action_t Action);
+void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,const char *ClassIcon);
void Cal_ChangeFirstDayOfWeek (void);
void Cal_DrawCurrentMonth (void);
diff --git a/swad_changelog.h b/swad_changelog.h
index 254009690..a04b3ed72 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -156,13 +156,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 16.48.1 (2016-11-07)"
+#define Log_PLATFORM_VERSION "SWAD 16.48.2 (2016-11-07)"
#define CSS_FILE "swad16.32.1.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.48.2: Nov 07, 2016 Icon in preferences-first-day-of-week to show figure (statistics). (206433 lines)
Version 16.48.1: Nov 07, 2016 Icon in preferences-language to show figure (statistics). (206429 lines)
Version 16.48: Nov 07, 2016 Icon in messages to show figure (statistics).
Code refactoring in messages. (206418 lines)
diff --git a/swad_timetable.c b/swad_timetable.c
index 006039277..7817a19b8 100644
--- a/swad_timetable.c
+++ b/swad_timetable.c
@@ -275,8 +275,9 @@ void TT_ShowClassTimeTable (void)
ActSeeMyTT);
/***** Show form to change first day of week *****/
- Cal_ShowIntegratedFormToSelFirstDayOfWeek (Gbl.TimeTable.Type == TT_COURSE_TIMETABLE ? ActChgCrsTT1stDay :
- ActChgMyTT1stDay);
+ Cal_ShowFormToSelFirstDayOfWeek (Gbl.TimeTable.Type == TT_COURSE_TIMETABLE ? ActChgCrsTT1stDay :
+ ActChgMyTT1stDay,
+ "ICON25x25");
}
/***** Show the time table *****/