mirror of
https://github.com/acanas/swad-core.git
synced 2024-05-28 20:43:27 +02:00
Version 16.205.3
This commit is contained in:
parent
1679b6c02b
commit
6fb8c4752c
|
@ -233,13 +233,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.205.2 (2017-05-04)"
|
#define Log_PLATFORM_VERSION "SWAD 16.205.3 (2017-05-04)"
|
||||||
#define CSS_FILE "swad16.205.css"
|
#define CSS_FILE "swad16.205.css"
|
||||||
#define JS_FILE "swad16.205.js"
|
#define JS_FILE "swad16.205.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// 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
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 16.205.3: May 04, 2017 Changes in statistics about date format. (218447 lines)
|
||||||
Version 16.205.2: May 04, 2017 Changes in form to select date format. (218439 lines)
|
Version 16.205.2: May 04, 2017 Changes in form to select date format. (218439 lines)
|
||||||
Version 16.205.1: May 04, 2017 Removed unused code. (218440 lines)
|
Version 16.205.1: May 04, 2017 Removed unused code. (218440 lines)
|
||||||
Version 16.205: May 04, 2017 Dates written depending on user's preferences. (218721 lines)
|
Version 16.205: May 04, 2017 Dates written depending on user's preferences. (218721 lines)
|
||||||
|
|
46
swad_date.c
46
swad_date.c
|
@ -46,14 +46,6 @@ extern struct Globals Gbl;
|
||||||
/***************************** Public constants ******************************/
|
/***************************** Public constants ******************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
/***** Date format *****/
|
|
||||||
const char *Dat_Format_Str[Dat_NUM_OPTIONS_FORMAT] =
|
|
||||||
{
|
|
||||||
"yyyy-mm-dd", // Dat_FORMAT_YYYY_MM_DD
|
|
||||||
"dd mmm yyyy", // Dat_FORMAT_DD_MONTH_YYYY
|
|
||||||
"mmm dd, yyyy", // Dat_FORMAT_MONTH_DD_YYYY
|
|
||||||
};
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/**************************** Private constants ******************************/
|
/**************************** Private constants ******************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -130,18 +122,12 @@ void Dat_PutIconsToSelectDateFormat (void)
|
||||||
(unsigned) Format);
|
(unsigned) Format);
|
||||||
if (Format == Gbl.Prefs.DateFormat)
|
if (Format == Gbl.Prefs.DateFormat)
|
||||||
fprintf (Gbl.F.Out," checked=\"checked\"");
|
fprintf (Gbl.F.Out," checked=\"checked\"");
|
||||||
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />"
|
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />",
|
||||||
"<span id=\"date_format_%u\"></span>"
|
Gbl.Form.Id);
|
||||||
"</label>"
|
Dat_PutSpanDateFormat (Format);
|
||||||
"</li>",
|
Dat_PutScriptDateFormat (Format);
|
||||||
Gbl.Form.Id,
|
fprintf (Gbl.F.Out,"</label>"
|
||||||
(unsigned) Format);
|
"</li>");
|
||||||
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
|
||||||
"writeLocalDateHMSFromUTC('date_format_%u',%ld,"
|
|
||||||
"%u,', ',null,true,false,false);"
|
|
||||||
"</script>",
|
|
||||||
(unsigned) Format,(long) Gbl.StartExecutionTimeUTC,
|
|
||||||
(unsigned) Format);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** End of list and form *****/
|
/***** End of list and form *****/
|
||||||
|
@ -165,6 +151,26 @@ static void Dat_PutIconsDateFormat (void)
|
||||||
Sta_PutIconToShowFigure ();
|
Sta_PutIconToShowFigure ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/******* Put script to write current date-time in a given date format ********/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Dat_PutSpanDateFormat (Dat_Format_t Format)
|
||||||
|
{
|
||||||
|
fprintf (Gbl.F.Out,"<span id=\"date_format_%u\"></span>",
|
||||||
|
(unsigned) Format);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Dat_PutScriptDateFormat (Dat_Format_t Format)
|
||||||
|
{
|
||||||
|
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
||||||
|
"writeLocalDateHMSFromUTC('date_format_%u',%ld,"
|
||||||
|
"%u,', ',null,true,false,false);"
|
||||||
|
"</script>",
|
||||||
|
(unsigned) Format,(long) Gbl.StartExecutionTimeUTC,
|
||||||
|
(unsigned) Format);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/***************************** Change date format ****************************/
|
/***************************** Change date format ****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -114,6 +114,10 @@ typedef enum
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Dat_PutIconsToSelectDateFormat (void);
|
void Dat_PutIconsToSelectDateFormat (void);
|
||||||
|
|
||||||
|
void Dat_PutSpanDateFormat (Dat_Format_t Format);
|
||||||
|
void Dat_PutScriptDateFormat (Dat_Format_t Format);
|
||||||
|
|
||||||
void Dat_ChangeDateFormat (void);
|
void Dat_ChangeDateFormat (void);
|
||||||
Dat_Format_t Dat_GetDateFormatFromStr (const char *Str);
|
Dat_Format_t Dat_GetDateFormatFromStr (const char *Str);
|
||||||
|
|
||||||
|
|
|
@ -8840,7 +8840,6 @@ static void Sta_GetAndShowNumUsrsPerFirstDayOfWeek (void)
|
||||||
|
|
||||||
static void Sta_GetAndShowNumUsrsPerDateFormat (void)
|
static void Sta_GetAndShowNumUsrsPerDateFormat (void)
|
||||||
{
|
{
|
||||||
extern const char *Dat_Format_Str[Dat_NUM_OPTIONS_FORMAT];
|
|
||||||
extern const char *Hlp_STATS_Figures_calendar; // TODO: Change!!!!!!!!!!!!!!!!
|
extern const char *Hlp_STATS_Figures_calendar; // TODO: Change!!!!!!!!!!!!!!!!
|
||||||
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
|
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
|
||||||
extern const char *Txt_Format;
|
extern const char *Txt_Format;
|
||||||
|
@ -8948,10 +8947,12 @@ static void Sta_GetAndShowNumUsrsPerDateFormat (void)
|
||||||
for (Format = (Dat_Format_t) 0;
|
for (Format = (Dat_Format_t) 0;
|
||||||
Format <= (Dat_Format_t) (Dat_NUM_OPTIONS_FORMAT - 1);
|
Format <= (Dat_Format_t) (Dat_NUM_OPTIONS_FORMAT - 1);
|
||||||
Format++)
|
Format++)
|
||||||
|
{
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"DAT_N LEFT_MIDDLE\">"
|
"<td class=\"DAT_N LEFT_MIDDLE\">");
|
||||||
"%s"
|
Dat_PutSpanDateFormat (Format);
|
||||||
"</td>"
|
Dat_PutScriptDateFormat (Format);
|
||||||
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||||
"%u"
|
"%u"
|
||||||
"</td>"
|
"</td>"
|
||||||
|
@ -8959,11 +8960,11 @@ static void Sta_GetAndShowNumUsrsPerDateFormat (void)
|
||||||
"%5.2f%%"
|
"%5.2f%%"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
Dat_Format_Str[Format],
|
|
||||||
NumUsrs[Format],
|
NumUsrs[Format],
|
||||||
NumUsrsTotal ? (float) NumUsrs[Format] * 100.0 /
|
NumUsrsTotal ? (float) NumUsrs[Format] * 100.0 /
|
||||||
(float) NumUsrsTotal :
|
(float) NumUsrsTotal :
|
||||||
0);
|
0);
|
||||||
|
}
|
||||||
|
|
||||||
/***** End table *****/
|
/***** End table *****/
|
||||||
Lay_EndRoundFrameTable ();
|
Lay_EndRoundFrameTable ();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user