Version 15.53

This commit is contained in:
Antonio Cañas Vargas 2015-11-30 21:23:14 +01:00
parent 83f6fc6800
commit 5a4185c184
3 changed files with 67 additions and 24 deletions

View File

@ -883,7 +883,7 @@ a:hover {text-decoration:underline;}
}
.DAY_NO_WRK_HEAD
{
color:#FF0000;
color:red;
font-size:9pt;
text-align:center;
}
@ -901,7 +901,7 @@ a:hover {text-decoration:underline;}
}
.DAY_HLD
{
color:#FF0000;
color:red;
font-size:9pt;
text-align:center;
}
@ -1514,7 +1514,7 @@ a:hover img.CENTRE_PHOTO_SHOW
.DAT_SMALL_NOBR_N {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:#404040; font-size:12pt; white-space:nowrap;}
.DAT_SMALL_GREY {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:#707070; font-size:12pt;}
.DAT_SMALL_RED {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:#FF0000; font-size:12pt;}
.DAT_SMALL_RED {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:red; font-size:12pt;}
.DAT_SMALL_GREEN {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:#008000; font-size:12pt;}
.DAT_SMALL_BLUE {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:#0080FF; font-size:12pt;}
.DAT_SMALL_YELLOW {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:#C0C000; font-size:12pt;}
@ -1539,21 +1539,21 @@ a:hover img.CENTRE_PHOTO_SHOW
.ASG_GRP_LIGHT {color:#AFC4CC; font-size:12pt;}
.DATE_GREEN {color:#008000; font-size:13pt;}
.DATE_GREEN_LIGHT {color:#89BE87; font-size:13pt;}
.DATE_RED {color:#FF0000; font-size:13pt;}
.DATE_RED {color:red; font-size:13pt;}
.DATE_RED_LIGHT {color:#F98A8A; font-size:13pt;}
.ASG_LST_DATE_GREEN {color:#008000; font-size:11pt; white-space:nowrap;}
.ASG_LST_DATE_RED {color:#FF0000; font-size:11pt; white-space:nowrap;}
.ASG_LST_DATE_RED {color:red; font-size:11pt; white-space:nowrap;}
.STATUS_GREEN {color:#008000; font-size:12pt;}
.STATUS_GREEN_LIGHT {color:#89BE87; font-size:12pt;}
.STATUS_RED {color:#FF0000; font-size:12pt;}
.STATUS_RED {color:red; font-size:12pt;}
.STATUS_RED_LIGHT {color:#F98A8A; font-size:12pt;}
/********************************** Tests ************************************/
.ANS {color:#404040; font-size:13pt; font-weight:bold;}
.ANS_OK {color:#008000; font-size:13pt; font-weight:bold;}
.ANS_BAD {color:#FF0000; font-size:13pt; font-weight:bold;}
.ANS_BAD {color:red; font-size:13pt; font-weight:bold;}
.TEST {color:#404040; font-size:12pt;}
.TEST_EXA {color:#404040; font-size:12pt;}
.TEST_EXA_LIGHT {color:#A0A0A0; font-size:12pt;}
@ -1574,6 +1574,20 @@ a:hover img.CENTRE_PHOTO_SHOW
line-height:110%;
letter-spacing:0;
}
.TT_DAY
{
font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif;
color:#404040;
font-size:10pt;
letter-spacing:0;
}
.TT_SUNDAY
{
font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif;
color:red;
font-size:10pt;
letter-spacing:0;
}
.FREE0 {height:20px; background-color:#F4F2EA; border:solid 1px; border-color:#F4F2EA #E0D9C2 #EEEADC #F4F2EA;}
.FREE1 {height:20px; background-color:#F4F2EA; border:solid 1px; border-color:#F4F2EA #E0D9C2 #E0D9C2 #F4F2EA;}
.FREE2 {height:20px; background-color:#FBFAF7; border:solid 1px; border-color:#FBFAF7 #E0D9C2 #F5F2E9 #FBFAF7;}
@ -1603,7 +1617,7 @@ a:hover img.CENTRE_PHOTO_SHOW
}
.LOG {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:#606060; font-size:11pt;}
.LOG_R {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:#FF0000; font-size:11pt;}
.LOG_R {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:red; font-size:11pt;}
.MSG_TXT {font-family:"Courier New","DejaVu LGC Sans Mono","Bitstream Vera Sans Mono",monospace; color:#404040; font-size:12pt;}

View File

@ -110,20 +110,28 @@
// TODO: Edition of courses: Rename "Optativas/libre conf." to "Optativas varios cursos"
// TODO: Edition of courses: Rename "Curso" to "Año / semestre / cuatrimestre"
// TODO: Listing of courses: Put "Optativas" year at the end
// TODO: Timetable: Sunday can be the first day of the week
/*****************************************************************************/
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.52 (2015/11/30)"
#define CSS_FILE "swad15.52.css"
#define Log_PLATFORM_VERSION "SWAD 15.53 (2015/11/30)"
#define CSS_FILE "swad15.53.css"
// 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 15.53: Nov 30, 2015 Sunday can be the first day of the week in timetable, depending on user's preferences. (186689 lines)
Version 15.52: Nov 30, 2015 Timetable now starts at 6 a.m. instead of 7 a.m.
Changes in layout of timetable. (186648 lines)
Changes in layout of timetable. (186656 lines)
6 changes necessary in database:
CREATE TABLE timetable_crs_backup LIKE timetable_crs;
INSERT INTO timetable_crs_backup SELECT * FROM timetable_crs;
CREATE TABLE timetable_tut_backup LIKE timetable_tut;
INSERT INTO timetable_tut_backup SELECT * FROM timetable_tut;
UPDATE timetable_crs SET Hour=Hour+2;
UPDATE timetable_tut SET Hour=Hour+2;
Version 15.51.4: Nov 30, 2015 Calendar is now distributed in rows with 3 months instead of 4.
Changes in layout. (186644 lines)
Version 15.51.3: Nov 30, 2015 Responsive design in login-logout. (186641 lines)

View File

@ -730,9 +730,14 @@ static void TT_ModifTimeTable (void)
static void TT_DrawTimeTable (void)
{
bool Editing = false;
unsigned Day;
unsigned Hour,H;
unsigned Column,ColumnsToDraw,ColumnsToDrawIncludingExtraColumn,ContinuousFreeMinicolumns;
unsigned DayColumn; // Column from left (0) to right (6)
unsigned Day; // Day of week
unsigned Hour;
unsigned H;
unsigned Column;
unsigned ColumnsToDraw;
unsigned ColumnsToDrawIncludingExtraColumn;
unsigned ContinuousFreeMinicolumns;
switch (Gbl.CurrentAct)
{
@ -795,10 +800,15 @@ static void TT_DrawTimeTable (void)
TT_DrawCellAlignTimeTable ();
/* Row for this hour */
for (Day = 0;
Day < TT_DAYS;
Day++)
for (DayColumn = 0;
DayColumn < TT_DAYS;
DayColumn++)
{
/* Day == 0 ==> monday,
...
Day == 6 ==> sunday */
Day = (DayColumn + Gbl.Prefs.FirstDayOfWeek) % 7;
/* Check how many colums are needed.
For each item (class) in this hour from left to right, we must check the maximum of columns */
for (H = 0;
@ -909,17 +919,24 @@ static void TT_TimeTableDrawAdjustRow (void)
static void TT_TimeTableDrawDaysCells (void)
{
extern const char *Txt_DAYS_CAPS[7];
unsigned DayColumn;
unsigned Day;
for (Day = 0;
Day < TT_DAYS;
Day++)
fprintf (Gbl.F.Out,"<td colspan=\"%u\" class=\"TT_TXT CENTER_MIDDLE\""
for (DayColumn = 0;
DayColumn < TT_DAYS;
DayColumn++)
{
Day = (DayColumn + Gbl.Prefs.FirstDayOfWeek) % 7;
fprintf (Gbl.F.Out,"<td colspan=\"%u\" class=\"%s CENTER_MIDDLE\""
" style=\"width:%u%%;\">"
"%s"
"</td>",
TT_NUM_MINICOLUMNS_PER_DAY,TT_PERCENT_WIDTH_OF_A_DAY,
TT_NUM_MINICOLUMNS_PER_DAY,
Day == 6 ? "TT_SUNDAY" : // Sunday drawn in red
"TT_DAY", // Monday to Saturday
TT_PERCENT_WIDTH_OF_A_DAY,
Txt_DAYS_CAPS[Day]);
}
}
/*****************************************************************************/
@ -928,7 +945,11 @@ static void TT_TimeTableDrawDaysCells (void)
static unsigned TT_TimeTableCalculateColsToDraw (unsigned Day,unsigned Hour)
{
unsigned ColumnsToDraw,Column,H,FirstHour,Cols;
unsigned ColumnsToDraw;
unsigned Column;
unsigned H;
unsigned FirstHour;
unsigned Cols;
ColumnsToDraw = TimeTable[Day][Hour].NumColumns;