From f763f45bd22144f8d0bacd6f30c4ca953976e8ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Tue, 17 Jan 2017 14:24:54 +0100 Subject: [PATCH] Version 16.119 --- css/{swad16.111.5.css => swad16.119.css} | 48 ++++++++++++++++++------ js/{swad16.114.js => swad16.119.js} | 10 +++-- swad_attendance.c | 6 ++- swad_changelog.h | 10 +++-- swad_connected.c | 2 +- swad_date.c | 10 ++--- swad_parameter.c | 1 + swad_theme.c | 8 ---- 8 files changed, 57 insertions(+), 38 deletions(-) rename css/{swad16.111.5.css => swad16.119.css} (98%) rename js/{swad16.114.js => swad16.119.js} (99%) diff --git a/css/swad16.111.5.css b/css/swad16.119.css similarity index 98% rename from css/swad16.111.5.css rename to css/swad16.119.css index a87919b5..835d3410 100644 --- a/css/swad16.111.5.css +++ b/css/swad16.119.css @@ -269,12 +269,43 @@ a:hover /* Default ==> underlined */ box-sizing:border-box; width:160px; text-align:center; - vertical-align:top; + vertical-align:middle; } -.WHITE_CUR_TIME {color:#808080; font-size:14pt; font-weight:bold;} -.GREY_CUR_TIME {color:#E0E0E0; font-size:14pt; font-weight:bold;} -.BLUE_CUR_TIME {color:#BAD2DA; font-size:14pt; font-weight:bold;} -.YELLOW_CUR_TIME {color:#B3B0B3; font-size:14pt; font-weight:bold;} +#current_date + { + box-sizing:border-box; + width:80px; + /* margin-left:6px; */ + margin:0 auto; + border-radius:4px; + box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 2px 1px -2px rgba(0,0,0,0.2), 0 1px 5px 0 rgba(0,0,0,0.12); + } +#current_month + { + border-radius:4px 4px 0 0; + background-color:rgba(172, 64, 64, 0.8);; + color:white; + font-size:12pt; + font-weight:bold; + white-space:nowrap; + overflow:hidden; + } +#current_day + { + background-color:rgba(255, 255, 255, 0.8);; + color:#606060; + font-size:20pt; + font-weight:bold; + line-height:100%; + } +#current_time + { + background-color:rgba(255, 255, 255, 0.8);; + color:#606060; + font-size:12pt; + font-weight:bold; + } + @media only screen and (max-width: 1024px) { /* For mobile phones */ #head_row_2_time @@ -282,13 +313,6 @@ a:hover /* Default ==> underlined */ display:none; } } -@media only screen and (min-width: 1024px) and (max-width: 1280px) - { /* For tablets */ - #current_date - { - display:none; - } - } /****** Breadcrumb (platform/country/institution/centre/degree/course) *******/ #head_row_2_hierarchy diff --git a/js/swad16.114.js b/js/swad16.119.js similarity index 99% rename from js/swad16.114.js rename to js/swad16.119.js index 65c05f62..358d3ffd 100644 --- a/js/swad16.114.js +++ b/js/swad16.119.js @@ -350,11 +350,13 @@ function writeLocalClock () { Hou = d.getHours(); Min = d.getMinutes(); StrMin = ((Min < 10) ? '0' : '') + Min; - document.getElementById('hm').innerHTML = '' + - Months[Mon] + ' ' + Day + ', ' + - '' + + document.getElementById('hm').innerHTML = '
' + + Months[Mon] + + '
' + + Day + + '
' + Hou + ':' + StrMin + - ''; + '
'; } function writeClockConnected () { diff --git a/swad_attendance.c b/swad_attendance.c index b6ad02db..41abf9b6 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -808,8 +808,11 @@ bool Att_GetDataOfAttEventByCod (struct AttendanceEvent *Att) static void Att_ResetAttendanceEvent (struct AttendanceEvent *Att) { - if (Att->AttCod <= 0) // If > 0 ==> keep value + if (Att->AttCod <= 0) // If > 0 ==> keep values of AttCod and Selected + { Att->AttCod = -1L; + Att->Selected = false; + } Att->CrsCod = -1L; Att->Hidden = false; Att->UsrCod = -1L; @@ -820,7 +823,6 @@ static void Att_ResetAttendanceEvent (struct AttendanceEvent *Att) Att->CommentTchVisible = false; Att->NumStdsTotal = 0; Att->NumStdsFromList = 0; - Att->Selected = false; } /*****************************************************************************/ diff --git a/swad_changelog.h b/swad_changelog.h index 63b9f2b7..6fedb5f5 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -191,14 +191,16 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.118.2 (2017-01-17)" -#define CSS_FILE "swad16.111.5.css" -#define JS_FILE "swad16.114.js" +#define Log_PLATFORM_VERSION "SWAD 16.119 (2017-01-17)" +#define CSS_FILE "swad16.119.css" +#define JS_FILE "swad16.119.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.118.2: Jan 17, 2017 Fix bug in string concatenation. (? lines) + Version 16.119: Jan 17, 2017 Changes in layout of current data and time. + Fixed bug in attendance, reported by Javier Fernández Baldomero. (211874 lines) + Version 16.118.2: Jan 17, 2017 Fix bug in string concatenation. (211854 lines) Version 16.118.1: Jan 17, 2017 Code refactoring related to string concatenation. (211850 lines) Version 16.118: Jan 17, 2017 Code refactoring related to string copy. (211676 lines) Version 16.117.1: Jan 16, 2017 Code refactoring related to string concatenation. (211229 lines) diff --git a/swad_connected.c b/swad_connected.c index 8f512ebe..8294ea7d 100644 --- a/swad_connected.c +++ b/swad_connected.c @@ -97,7 +97,7 @@ void Con_ShowConnectedUsrs (void) /* Current time */ sprintf (Gbl.Title,"%s
%s %u, %u:%02u", Txt_Connected_users, - Txt_MONTHS_SMALL_SHORT[Gbl.Now.Date.Month-1], + Txt_MONTHS_SMALL_SHORT[Gbl.Now.Date.Month - 1], Gbl.Now.Date.Day, Gbl.Now.Time.Hour, Gbl.Now.Time.Minute); diff --git a/swad_date.c b/swad_date.c index 77a7843f..60c95bfe 100644 --- a/swad_date.c +++ b/swad_date.c @@ -160,16 +160,12 @@ bool Dat_GetDateFromYYYYMMDD (struct Date *Date,const char *YYYYMMDD) void Dat_ShowClientLocalTime (void) { - extern const char *The_ClassCurrentTime[The_NUM_THEMES]; - - fprintf (Gbl.F.Out,"
" + fprintf (Gbl.F.Out,"
" "
" "", - The_ClassCurrentTime[Gbl.Prefs.Theme], (long) Gbl.StartExecutionTimeUTC); } @@ -1274,7 +1270,7 @@ void Dat_AssignDate (struct Date *DateDst,struct Date *DateSrc) void Dat_WriteScriptMonths (void) { - extern const char *Txt_MONTHS_SMALL_SHORT[12]; + extern const char *Txt_MONTHS_SMALL[12]; unsigned NumMonth; fprintf (Gbl.F.Out,"var Months = ["); @@ -1284,7 +1280,7 @@ void Dat_WriteScriptMonths (void) { if (NumMonth) fprintf (Gbl.F.Out,","); - fprintf (Gbl.F.Out,"'%s'",Txt_MONTHS_SMALL_SHORT[NumMonth]); + fprintf (Gbl.F.Out,"'%s'",Txt_MONTHS_SMALL[NumMonth]); } fprintf (Gbl.F.Out,"];\n"); } diff --git a/swad_parameter.c b/swad_parameter.c index 96af983d..b7a702a0 100644 --- a/swad_parameter.c +++ b/swad_parameter.c @@ -892,6 +892,7 @@ unsigned Par_GetParMultiToText (const char *ParamName,char *ParamValue,size_t Ma { unsigned NumTimes = Par_GetParameter (Par_PARAM_MULTIPLE,ParamName, ParamValue,MaxBytes,NULL); + Str_ChangeFormat (Str_FROM_FORM,Str_TO_TEXT, ParamValue,MaxBytes,true); return NumTimes; diff --git a/swad_theme.c b/swad_theme.c index b3d2078c..10e47bc4 100644 --- a/swad_theme.c +++ b/swad_theme.c @@ -103,14 +103,6 @@ const char *The_ClassTagline[The_NUM_THEMES] = "YELLOW_TAGLINE", }; -const char *The_ClassCurrentTime[The_NUM_THEMES] = - { - "WHITE_CUR_TIME", - "GREY_CUR_TIME", - "BLUE_CUR_TIME", - "YELLOW_CUR_TIME", - }; - const char *The_ClassNotif[The_NUM_THEMES] = { "WHITE_NOTIF",