From a13f3ffc8a106d7676c847276599018544f6f394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Mon, 11 Nov 2019 13:11:38 +0100 Subject: [PATCH] Version19.63.2 --- swad_changelog.h | 3 ++- swad_layout.c | 30 +++++++++++++++++------------- swad_project.c | 4 ++-- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index ccf3f8037..869a46fa3 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -487,7 +487,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - * En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 19.63.1 (2019-11-11)" +#define Log_PLATFORM_VERSION "SWAD 19.63.2 (2019-11-11)" #define CSS_FILE "swad19.47.css" #define JS_FILE "swad19.39.js" /* @@ -496,6 +496,7 @@ ps2pdf source.ps destination.pdf // TODO: Importante: filtrar proyectos por usuarios (igual que en trabajos o en asistencia) // TODO: Code refactoring in HTML h1, title, meta, video, p, iframe, input hidden, area + Version 19.63.2: Nov 11, 2019 Fixed bug showing dates. (246386 lines) Version 19.63.1: Nov 11, 2019 Fixed bug in lists, reported by Javier Fernández Baldomero. (246381 lines) Version 19.63: Nov 11, 2019 Code refactoring in HTML. (246384 lines) Version 19.62: Nov 11, 2019 Code refactoring in HTML. diff --git a/swad_layout.c b/swad_layout.c index 3a60523d1..dfd022f7d 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -487,9 +487,23 @@ static void Lay_WriteScripts (void) /***** Write script to set parameters needed by AJAX *****/ Lay_WriteScriptParamsAJAX (); + /***** Write script to initialize variables used to draw dates *****/ + HTM_SCRIPT_Begin (NULL,NULL); + HTM_Txt ("\tvar DAYS = ["); + for (DayOfWeek = 0; + DayOfWeek < 7; + DayOfWeek++) + { + if (DayOfWeek) + HTM_Comma (); + HTM_TxtF ("'%s'",Txt_DAYS_SMALL[DayOfWeek]); + } + HTM_Txt ("];\n"); + HTM_SCRIPT_End (); + /***** Prepare script to draw months *****/ if ((Gbl.Prefs.SideCols & Lay_SHOW_LEFT_COLUMN) || // Left column visible - (Gbl.Hierarchy.Ins.InsCod > 0 && // Institution selected + (Gbl.Hierarchy.Ins.InsCod > 0 && // Institution selected (Gbl.Action.Act == ActSeeCal || // Viewing calendar Gbl.Action.Act == ActPrnCal || // Printing calendar Gbl.Action.Act == ActChgCal1stDay))) // Changing first day @@ -518,17 +532,6 @@ static void Lay_WriteScripts (void) } HTM_Txt ("];\n"); - HTM_Txt ("\tvar DAYS = ["); - for (DayOfWeek = 0; - DayOfWeek < 7; - DayOfWeek++) - { - if (DayOfWeek) - HTM_Comma (); - HTM_TxtF ("'%s'",Txt_DAYS_SMALL[DayOfWeek]); - } - HTM_Txt ("];\n"); - HTM_Txt ("\tvar STR_EXAM = '"); HTM_TxtF (Txt_Exam_of_X,Gbl.Hierarchy.Crs.FullName); HTM_Txt ("';\n"); @@ -1395,6 +1398,7 @@ static void Lay_WriteAboutZone (void) { extern const char *Txt_About_X; extern const char *Txt_Questions_and_problems; + unsigned i; /***** Start about zone *****/ HTM_Txt ("
"); @@ -1425,7 +1429,7 @@ static void Lay_WriteAboutZone (void) HTM_A_Begin ("href=\"%s\" class=\"ABOUT\" target=\"_blank\"",Cfg_ABOUT_SWAD_URL); HTM_TxtF (Txt_About_X,Log_PLATFORM_VERSION); HTM_A_End (); - for (size_t i = 0; + for (i = 0; i < 5; i++) HTM_Space (); diff --git a/swad_project.c b/swad_project.c index bcfcfb317..f467e7493 100644 --- a/swad_project.c +++ b/swad_project.c @@ -1499,7 +1499,7 @@ static void Prj_ShowTableAllProjectsOneRow (struct Project *Prj) Id,ClassDate,Gbl.RowEvenOdd); Dat_WriteLocalDateHMSFromUTC (Id,Prj->CreatTime, Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK, - true,true,true,0x7); + true,true,false,0x7); HTM_TD_End (); free (Id); @@ -1511,7 +1511,7 @@ static void Prj_ShowTableAllProjectsOneRow (struct Project *Prj) Id,ClassDate,Gbl.RowEvenOdd); Dat_WriteLocalDateHMSFromUTC (Id,Prj->ModifTime, Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK, - true,true,true,0x7); + true,true,false,0x7); HTM_TD_End (); free (Id);