From 52b67d237a6863cb56d9370115faa505176caf6d Mon Sep 17 00:00:00 2001 From: acanas Date: Wed, 8 Dec 2021 11:25:40 +0100 Subject: [PATCH] =?UTF-8?q?Version=2021.67.4:=20=20Dec=2007,=202021=20=20F?= =?UTF-8?q?ixed=20bug=20in=20CSS=20for=20photos.=20Reported=20by=20Cristin?= =?UTF-8?q?a=20S=C3=A1nchez=20Justicia.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/{swad21.67.css => swad21.67.4.css} | 0 js/{swad21.67.js => swad21.67.4.js} | 49 +++++++++++++------------- swad_changelog.h | 7 ++-- swad_profile.c | 2 +- 4 files changed, 30 insertions(+), 28 deletions(-) rename css/{swad21.67.css => swad21.67.4.css} (100%) rename js/{swad21.67.js => swad21.67.4.js} (98%) diff --git a/css/swad21.67.css b/css/swad21.67.4.css similarity index 100% rename from css/swad21.67.css rename to css/swad21.67.4.css diff --git a/js/swad21.67.js b/js/swad21.67.4.js similarity index 98% rename from js/swad21.67.js rename to js/swad21.67.4.js index 66a84b8b8..e005aa948 100644 --- a/js/swad21.67.js +++ b/js/swad21.67.4.js @@ -94,18 +94,14 @@ function writeLocalDateHMSFromUTC (id,TimeUTC,DateFormat,Separator,Language, WriteToday,WriteDateOnSameDay,WriteWeekDay,WriteHMS) { // HMS: Hour, Minutes, Seconds var today = new Date(); - var todayYea = today.getFullYear(); - var todayMon = today.getMonth() + 1; - var todayDay = today.getDate(); + var todayYea = today.getFullYear (); + var todayMon = today.getMonth () + 1; + var todayDay = today.getDate (); var d = new Date(); var WriteDate; - var Yea; - var Mon; - var Day; + var Yea,Mon,Day; var DayOfWeek; - var Hou; - var Min; - var Sec; + var Hou,Min,Sec; var StrDat; var StrMon; var StrDay; @@ -113,21 +109,22 @@ function writeLocalDateHMSFromUTC (id,TimeUTC,DateFormat,Separator,Language, var StrMin; var StrSec; - d.setTime(TimeUTC * 1000); - Yea = d.getFullYear(); - Mon = d.getMonth() + 1; - Day = d.getDate(); + d.setTime (TimeUTC * 1000); + Yea = d.getFullYear (); + Mon = d.getMonth () + 1; + Day = d.getDate (); if (WriteDateOnSameDay) WriteDate = true; // Check to see if the last date has been initialized - else if (typeof writeLocalDateHMSFromUTC.lastd == 'undefined') // Static variable to remember current date for the next call + else if (typeof writeLocalDateHMSFromUTC.lastd == 'undefined') + // lastd: static variable to remember current date for the next call // Not initialized WriteDate = true; else - WriteDate = (Yea != writeLocalDateHMSFromUTC.lastd.getFullYear() || - Mon != writeLocalDateHMSFromUTC.lastd.getMonth() + 1 || - Day != writeLocalDateHMSFromUTC.lastd.getDate()) + WriteDate = (Yea != writeLocalDateHMSFromUTC.lastd.getFullYear () || + Mon != writeLocalDateHMSFromUTC.lastd.getMonth () + 1 || + Day != writeLocalDateHMSFromUTC.lastd.getDate ()); writeLocalDateHMSFromUTC.lastd = d; // Update last date for the next call @@ -144,13 +141,17 @@ function writeLocalDateHMSFromUTC (id,TimeUTC,DateFormat,Separator,Language, case 0: // Dat_FORMAT_YYYY_MM_DD StrMon = ((Mon < 10) ? '0' : '') + Mon; StrDay = ((Day < 10) ? '0' : '') + Day; - StrDat = Yea.toString() + '-' + StrMon + '-' + StrDay; + StrDat = Yea.toString () + '-' + StrMon + '-' + StrDay; break; case 1: // Dat_FORMAT_DD_MONTH_YYYY - StrDat = Day.toString() + ' ' + MonthsShort[Mon - 1] + ' ' + Yea.toString(); + StrDat = Day.toString () + ' ' + + MonthsShort[Mon - 1] + ' ' + + Yea.toString (); break; case 2: // Dat_FORMAT_MONTH_DD_YYYY - StrDat = MonthsShort[Mon - 1] + ' ' + Day.toString() + ', ' + Yea.toString(); + StrDat = MonthsShort[Mon - 1] + ' ' + + Day.toString() + ', ' + + Yea.toString (); break; default: break; @@ -174,18 +175,18 @@ function writeLocalDateHMSFromUTC (id,TimeUTC,DateFormat,Separator,Language, StrHou = ((Hou < 10) ? '0' : '') + Hou; if (WriteHMS & (1<<1)) { // Bits 2,1 on => Write minutes - Min = d.getMinutes(); + Min = d.getMinutes (); StrMin = ((Min < 10) ? ':0' : ':') + Min; if (WriteHMS & 1) { // Bits 2,1,0 on => Write seconds - Sec = d.getSeconds(); + Sec = d.getSeconds (); StrSec = ((Sec < 10) ? ':0' : ':') + Sec; } } } /* Write date and time */ - document.getElementById(id).innerHTML = StrDat + StrHou + StrMin + StrSec; + document.getElementById (id).innerHTML = StrDat + StrHou + StrMin + StrSec; } /*****************************************************************************/ @@ -1243,7 +1244,7 @@ function mediaClickOnActivateUpload (id) { var url = document.getElementById (id + '_url'); var tit = document.getElementById (id + '_tit'); - // Enable embed, disable others + // Enable upload, disable others par_upl.disabled = false; // Enable upload par_you.disabled = true; // Disable youtube par_emb.disabled = true; // Disable embed diff --git a/swad_changelog.h b/swad_changelog.h index 10bfa353d..2afdbbda5 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -602,10 +602,11 @@ TODO: FIX BUG, URGENT! En las fechas como par TODO: En las encuestas, que los estudiantes no puedan ver los resultados hasta que no finalice el plazo. */ -#define Log_PLATFORM_VERSION "SWAD 21.67.3 (2021-12-04)" -#define CSS_FILE "swad21.67.css" -#define JS_FILE "swad21.67.js" +#define Log_PLATFORM_VERSION "SWAD 21.67.4 (2021-12-07)" +#define CSS_FILE "swad21.67.4.css" +#define JS_FILE "swad21.67.4.js" /* + Version 21.67.4: Dec 07, 2021 Fixed bug in CSS for photos. Reported by Cristina Sánchez Justicia. (320339 lines) Version 21.67.3: Dec 04, 2021 Help about user photo shapes. (320337 lines) Version 21.67.2: Dec 04, 2021 Renamed exam announcements to calls for exams in help wiki. (320316 lines) Version 21.67.1: Dec 04, 2021 Renamed CENTRE to CENTER in help wiki. (320316 lines) diff --git a/swad_profile.c b/swad_profile.c index 17d98c848..71d3ac4d3 100644 --- a/swad_profile.c +++ b/swad_profile.c @@ -1303,7 +1303,7 @@ static void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank,bool ItsM { [Pho_SHAPE_CIRCLE ] = "PHOTOC30x40", [Pho_SHAPE_ELLIPSE ] = "PHOTOE30x40", - [Pho_SHAPE_OVAL ] = "PHOTOO30x48", + [Pho_SHAPE_OVAL ] = "PHOTOO30x40", [Pho_SHAPE_RECTANGLE] = "PHOTOR30x40", }; bool Visible = Pri_ShowingIsAllowed (UsrDat->BaPrfVisibility,UsrDat);