From fb5204c443579a70e0b4734aad61d59e9b447c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Mon, 24 Apr 2017 10:13:53 +0200 Subject: [PATCH] Version 16.186.1 --- css/swad16.185.3.css | 35 +++++++++++++++------ swad_changelog.h | 3 +- swad_timetable.c | 74 +++++++++++++++++++++----------------------- 3 files changed, 64 insertions(+), 48 deletions(-) diff --git a/css/swad16.185.3.css b/css/swad16.185.3.css index 799aad00..14279da0 100644 --- a/css/swad16.185.3.css +++ b/css/swad16.185.3.css @@ -2381,15 +2381,32 @@ a:hover img.CENTRE_PHOTO_SHOW font-size:10pt; letter-spacing:0; } -.TT_HOUR {height:20px;} -.TT_ALIGN {height:10px;} -.TT_FREE0 {height:10px; background-color:#F4F2EA; border:solid 1px; border-color:#F4F2EA #E0D9C2 #EEEADC #F4F2EA;} -.TT_FREE1 {height:10px; background-color:#F4F2EA; border:solid 1px; border-color:#F4F2EA #E0D9C2 #E0D9C2 #F4F2EA;} -.TT_FREE2 {height:10px; background-color:#FBFAF7; border:solid 1px; border-color:#FBFAF7 #E0D9C2 #F5F2E9 #FBFAF7;} -.TT_FREE3 {height:10px; background-color:#FBFAF7; border:solid 1px; border-color:#FBFAF7 #E0D9C2 #E0D9C2 #FBFAF7;} -.TT_THEO {height:10px; background-color:#C0DAE4; border:solid 2px; border-color:#C9E3ED #B5CFD9 #B5CFD9 #C9E3ED;} -.TT_PRAC {height:10px; background-color:#DBE5E9; border:solid 2px; border-color:#E4EEF2 #D0DADE #D0DADE #E4EEF2;} -.TT_TUTO {height:10px; background-color:#D6E9C3; border:solid 2px; border-color:#DFEEE0 #CAE3B1 #CAE3B1 #DFEEE0;} +.TT_HOUR_BIG + { + font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; + color:#404040; + font-size:14pt; + font-weight:bold; + line-height:110%; + letter-spacing:0; + } +.TT_HOUR_SMALL + { + font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; + color:#A0A0A0; + font-size:10pt; + line-height:110%; + letter-spacing:0; + } +.TT_HOUR {height:16px;} +.TT_ALIGN {height:8px;} +.TT_FREE0 {height:8px; background-color:#F4F2EA; border:solid 1px; border-color:#F4F2EA #E0D9C2 #EEEADC #E0D9C2;} +.TT_FREE1 {height:8px; background-color:#F4F2EA; border:solid 1px; border-color:#F4F2EA #E0D9C2 #E0D9C2 #E0D9C2;} +.TT_FREE2 {height:8px; background-color:#FBFAF7; border:solid 1px; border-color:#FBFAF7 #E0D9C2 #F5F2E9 #E0D9C2;} +.TT_FREE3 {height:8px; background-color:#FBFAF7; border:solid 1px; border-color:#FBFAF7 #E0D9C2 #E0D9C2 #E0D9C2;} +.TT_THEO {height:8px; background-color:#C0DAE4; border:solid 2px; border-color:#C9E3ED #B5CFD9 #B5CFD9 #C9E3ED;} +.TT_PRAC {height:8px; background-color:#DBE5E9; border:solid 2px; border-color:#E4EEF2 #D0DADE #D0DADE #E4EEF2;} +.TT_TUTO {height:8px; background-color:#D6E9C3; border:solid 2px; border-color:#DFEEE0 #CAE3B1 #CAE3B1 #DFEEE0;} /********************************* Preference ********************************/ .PREF_CONTAINER diff --git a/swad_changelog.h b/swad_changelog.h index 340eed6b..2841d4b2 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -219,13 +219,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.186 (2017-04-24)" +#define Log_PLATFORM_VERSION "SWAD 16.186.1 (2017-04-24)" #define CSS_FILE "swad16.185.3.css" #define JS_FILE "swad16.181.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.186.1: Apr 24, 2017 Changes in timetable. Not finished. (217881 lines) Version 16.186: Apr 24, 2017 Changes in timetable. Not finished. (217867 lines) Version 16.185.4: Apr 21, 2017 Warning about Java no longer working. (217849 lines) Version 16.185.3: Apr 20, 2017 Timetables end at 24h, suggested by Sandra Daniela Tazzioli Barroso. (217797 lines) diff --git a/swad_timetable.c b/swad_timetable.c index ed03f1b5..b60e0c0f 100644 --- a/swad_timetable.c +++ b/swad_timetable.c @@ -129,6 +129,7 @@ static void TT_ModifTimeTable (void); static void TT_DrawTimeTable (void); static void TT_TimeTableDrawAdjustRow (void); static void TT_TimeTableDrawDaysCells (void); +static void TT_TimeTableDrawHourCell (unsigned Hour,unsigned Min,const char *Align); static unsigned TT_TimeTableCalculateColsToDraw (unsigned Day,unsigned Hour); static void TT_DrawCellAlignTimeTable (void); static void TT_TimeTableDrawCell (unsigned Day,unsigned Hour,unsigned Column,unsigned ColSpan, @@ -865,17 +866,17 @@ static void TT_DrawTimeTable (void) /***** Row with day names *****/ fprintf (Gbl.F.Out,"" - "" - "%u:00" + "" + "%02u" "", TT_PERCENT_WIDTH_OF_AN_HOUR_COLUMN,TT_START_HOUR); TT_DrawCellAlignTimeTable (); TT_TimeTableDrawDaysCells (); TT_DrawCellAlignTimeTable (); - fprintf (Gbl.F.Out,"" - "%u:00" + fprintf (Gbl.F.Out,"" + "%02u" "" "", TT_PERCENT_WIDTH_OF_AN_HOUR_COLUMN, @@ -894,14 +895,8 @@ static void TT_DrawTimeTable (void) fprintf (Gbl.F.Out,""); /* Hour */ - if (Hour % 2 == 1) - fprintf (Gbl.F.Out,"" - "%2u:%02u" - "", - TT_PERCENT_WIDTH_OF_AN_HOUR_COLUMN, - TT_START_HOUR + (Hour + 2) / 12,Min); + if (Hour % 2) + TT_TimeTableDrawHourCell (TT_START_HOUR + (Hour + 2) / 12,Min,"RIGHT_MIDDLE"); /* Empty column used to adjust height */ TT_DrawCellAlignTimeTable (); @@ -961,13 +956,8 @@ static void TT_DrawTimeTable (void) TT_DrawCellAlignTimeTable (); /* Hour */ - if (Hour % 2 == 1) - fprintf (Gbl.F.Out,"" - "%2u:%02u" - "", - TT_PERCENT_WIDTH_OF_AN_HOUR_COLUMN, - TT_START_HOUR + (Hour + 6) / 12,Min); + if (Hour % 2) + TT_TimeTableDrawHourCell (TT_START_HOUR + (Hour + 2) / 12,Min,"LEFT_MIDDLE"); fprintf (Gbl.F.Out,""); } @@ -1001,16 +991,11 @@ static void TT_TimeTableDrawAdjustRow (void) unsigned Minicolumn; fprintf (Gbl.F.Out,"" - "" + "" " " "", TT_PERCENT_WIDTH_OF_AN_HOUR_COLUMN); - // TT_DrawCellAlignTimeTable (); - fprintf (Gbl.F.Out,"" - " " - "", - TT_PERCENT_WIDTH_OF_A_SEPARATION_COLUMN); + TT_DrawCellAlignTimeTable (); for (Day = 0; Day < TT_DAYS; Day++) @@ -1018,18 +1003,12 @@ static void TT_TimeTableDrawAdjustRow (void) Minicolumn < TT_NUM_MINICOLUMNS_PER_DAY; Minicolumn++) fprintf (Gbl.F.Out,"" + " style=\"width:%u%%;\">" " " "", TT_PERCENT_WIDTH_OF_A_MINICOLUMN); - // TT_DrawCellAlignTimeTable (); - fprintf (Gbl.F.Out,"" - " " - "", - TT_PERCENT_WIDTH_OF_A_SEPARATION_COLUMN); - fprintf (Gbl.F.Out,"" + TT_DrawCellAlignTimeTable (); + fprintf (Gbl.F.Out,"" " " "" "", @@ -1064,6 +1043,25 @@ static void TT_TimeTableDrawDaysCells (void) } } +/*****************************************************************************/ +/****************** Draw cells with day names in a time table ****************/ +/*****************************************************************************/ + +static void TT_TimeTableDrawHourCell (unsigned Hour,unsigned Min,const char *Align) + { + fprintf (Gbl.F.Out,"", + Min ? "TT_HOUR_SMALL" : + "TT_HOUR_BIG", + Align, + TT_PERCENT_WIDTH_OF_AN_HOUR_COLUMN); + fprintf (Gbl.F.Out,"%02u",Hour); + if (Min) + fprintf (Gbl.F.Out,":%02u",Min); + fprintf (Gbl.F.Out,""); + } + /*****************************************************************************/ /**** Calculate recursively number of columns to draw for a day and hour *****/ /*****************************************************************************/ @@ -1130,7 +1128,7 @@ static unsigned TT_TimeTableCalculateColsToDraw (unsigned Day,unsigned Hour) static void TT_DrawCellAlignTimeTable (void) { fprintf (Gbl.F.Out,"" + " style=\"width:%u%%;\">" "", TT_PERCENT_WIDTH_OF_A_SEPARATION_COLUMN); }