From 102a30e20f899a88e6935528b1485944626ef9cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Wed, 20 Nov 2019 15:23:52 +0100 Subject: [PATCH] Version19.74.3 --- css/{swad19.74.1.css => swad19.74.3.css} | 17 +++++------ swad_changelog.h | 5 ++-- swad_connected.c | 5 ++-- swad_database.c | 2 +- swad_profile.c | 37 +++++++++++++++--------- swad_survey.c | 3 +- 6 files changed, 40 insertions(+), 29 deletions(-) rename css/{swad19.74.1.css => swad19.74.3.css} (99%) diff --git a/css/swad19.74.1.css b/css/swad19.74.3.css similarity index 99% rename from css/swad19.74.1.css rename to css/swad19.74.3.css index 927e8e8f7..85329451f 100644 --- a/css/swad19.74.1.css +++ b/css/swad19.74.3.css @@ -2299,7 +2299,7 @@ a:hover img.CENTRE_PHOTO_SHOW border-width:1px; } -.DAT_SMALL {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:#606060; font-size:12pt;} +.DAT_SMALL {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:#606060; font-size:12pt;} .DAT_SMALL_LIGHT {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:#A0A0A0; font-size:12pt;} .DAT_SMALL_NOBR {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:#606060; font-size:12pt; white-space:nowrap;} .DAT_SMALL_N {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:black; font-size:12pt;} @@ -3754,13 +3754,6 @@ a.PAG:hover, .PAG_CUR { margin-bottom:10px; } - -/******************************* Users' ranking ******************************/ -.RANK_PHOTO - { - width:34px; - height:48px; - } /***************************** Public user's profile *************************/ .PRF_FIG_LEFT_CONTAINER @@ -3891,13 +3884,19 @@ a.PAG:hover, .PAG_CUR .RANK_USR { box-sizing:border-box; - max-width:40px; + max-width:48px; text-align:left; vertical-align:middle; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } + +.RANK_PHOTO + { + width:34px; + height:48px; + } /************************* Indicators about courses **************************/ .INDICATORS td,.INDICATORS th diff --git a/swad_changelog.h b/swad_changelog.h index 1ecde0777..60cf363fb 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -488,13 +488,14 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - * En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 19.74.2 (2019-11-20)" -#define CSS_FILE "swad19.74.1.css" +#define Log_PLATFORM_VERSION "SWAD 19.74.3 (2019-11-20)" +#define CSS_FILE "swad19.74.3.css" #define JS_FILE "swad19.70.js" /* // TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.) // TODO: Impedir la creación y edición de proyectos si no son editables. + Version 19.74.3: Nov 20, 2019 Minor bug fixes and changes in layout and users' ranking. (247020 lines) Version 19.74.2: Nov 20, 2019 Changes in layout of timeline. (247006 lines) Version 19.74.1: Nov 20, 2019 Fixed bug in CSS related to buttons. (247020 lines) Version 19.74: Nov 20, 2019 Changes in CSS. diff --git a/swad_connected.c b/swad_connected.c index eb5621280..805ef8290 100644 --- a/swad_connected.c +++ b/swad_connected.c @@ -406,9 +406,8 @@ static void Con_ShowConnectedUsrsWithARoleBelongingToCurrentCrsOnRightColumn (Ro // the list of connected users // is dynamically updated via AJAX Sco_PutParamScope ("ScopeCon",Hie_CRS); - HTM_BUTTON_SUBMIT_Begin (Txt_Connected_users,"CONNECTED_TXT",NULL); - Ico_PutIcon ("ellipsis-h.svg",Txt_Connected_users,"ICO16x16"); - HTM_BUTTON_End (); + HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,"ellipsis-h.svg", + Txt_Connected_users,"ICO16x16"); Frm_EndForm (); HTM_TD_End (); diff --git a/swad_database.c b/swad_database.c index b4134d52f..24b483103 100644 --- a/swad_database.c +++ b/swad_database.c @@ -1404,7 +1404,7 @@ mysql> DESCRIBE mch_matches; "ShowQstResults ENUM('N','Y') NOT NULL DEFAULT 'N'," "ShowUsrResults ENUM('N','Y') NOT NULL DEFAULT 'N'," "UNIQUE INDEX(MchCod)," - "INDEX(GamCod)"); + "INDEX(GamCod))"); /***** Table mch_playing *****/ /* diff --git a/swad_profile.c b/swad_profile.c index 18cebfec4..d03b193be 100644 --- a/swad_profile.c +++ b/swad_profile.c @@ -113,7 +113,7 @@ static void Prf_CreateUsrFigures (long UsrCod,const struct UsrFigures *UsrFigure static bool Prf_CheckIfUsrFiguresExists (long UsrCod); static void Prf_GetAndShowRankingFigure (const char *FieldName); -static void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank); +static void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank,bool ItsMe); /*****************************************************************************/ /************* Suggest who to follow or request user's profile ***************/ @@ -1521,6 +1521,7 @@ void Prf_ShowRankingFigure (MYSQL_RES **mysql_res,unsigned NumUsrs) unsigned NumUsr; unsigned Rank; struct UsrData UsrDat; + bool ItsMe; long FigureHigh = LONG_MAX; long Figure; @@ -1541,6 +1542,7 @@ void Prf_ShowRankingFigure (MYSQL_RES **mysql_res,unsigned NumUsrs) /* Get user's code (row[0]) */ UsrDat.UsrCod = Str_ConvertStrCodToLongCod (row[0]); Usr_GetAllUsrDataFromUsrCod (&UsrDat,Usr_DONT_GET_PREFS); + ItsMe = (UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod); /* Get figure (row[1]) */ if (sscanf (row[1],"%ld",&Figure) != 1) @@ -1554,13 +1556,13 @@ void Prf_ShowRankingFigure (MYSQL_RES **mysql_res,unsigned NumUsrs) /***** Show row *****/ HTM_TR_Begin (NULL); - - Prf_ShowUsrInRanking (&UsrDat,Rank); - - HTM_TD_Begin ("class=\"RM COLOR%u\"",Gbl.RowEvenOdd); + Prf_ShowUsrInRanking (&UsrDat,Rank,ItsMe); + HTM_TD_Begin ("class=\"RM %s COLOR%u\"", + ItsMe ? "DAT_SMALL_N" : + "DAT_SMALL", + Gbl.RowEvenOdd); HTM_Long (Figure); HTM_TD_End (); - HTM_TR_End (); } @@ -1586,6 +1588,7 @@ void Prf_GetAndShowRankingClicksPerDay (void) unsigned NumUsr; unsigned Rank; struct UsrData UsrDat; + bool ItsMe; double NumClicksPerDayHigh = (double) LONG_MAX; double NumClicksPerDay; @@ -1710,6 +1713,7 @@ void Prf_GetAndShowRankingClicksPerDay (void) /* Get user's code (row[0]) */ UsrDat.UsrCod = Str_ConvertStrCodToLongCod (row[0]); Usr_GetAllUsrDataFromUsrCod (&UsrDat,Usr_DONT_GET_PREFS); + ItsMe = (UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod); /* Get number of clicks per day (row[1]) */ NumClicksPerDay = Str_GetDoubleNumFromStr (row[1]); @@ -1721,8 +1725,11 @@ void Prf_GetAndShowRankingClicksPerDay (void) /***** Show row *****/ HTM_TR_Begin (NULL); - Prf_ShowUsrInRanking (&UsrDat,Rank); - HTM_TD_Begin ("class=\"RM COLOR%u\"",Gbl.RowEvenOdd); + Prf_ShowUsrInRanking (&UsrDat,Rank,ItsMe); + HTM_TD_Begin ("class=\"RM %s COLOR%u\"", + ItsMe ? "DAT_SMALL_N" : + "DAT_SMALL", + Gbl.RowEvenOdd); Str_WriteDoubleNumToFile (Gbl.F.Out,NumClicksPerDay); HTM_TD_End (); HTM_TR_End (); @@ -1742,14 +1749,17 @@ void Prf_GetAndShowRankingClicksPerDay (void) /************** Show user's photo and nickname in ranking list ***************/ /*****************************************************************************/ -static void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank) +static void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank,bool ItsMe) { extern const char *Txt_Another_user_s_profile; bool ShowPhoto; char PhotoURL[PATH_MAX + 1]; bool Visible = Pri_ShowingIsAllowed (UsrDat->BaPrfVisibility,UsrDat); - HTM_TD_Begin ("class=\"RANK RM COLOR%u\"",Gbl.RowEvenOdd); + HTM_TD_Begin ("class=\"RM %s COLOR%u\"", + ItsMe ? "DAT_SMALL_N" : + "DAT_SMALL", + Gbl.RowEvenOdd); HTM_TxtF ("#%u",Rank); HTM_TD_End (); @@ -1771,11 +1781,12 @@ static void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank) { Frm_StartForm (ActSeeOthPubPrf); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); - HTM_DIV_Begin ("class=\"RANK_USR\""); // Limited width - HTM_BUTTON_SUBMIT_Begin (Txt_Another_user_s_profile,"BT_LINK DAT_SMALL",NULL); + HTM_BUTTON_SUBMIT_Begin (Txt_Another_user_s_profile, + ItsMe ? "BT_LINK RANK_USR DAT_SMALL_N" : + "BT_LINK RANK_USR DAT_SMALL", + NULL); // Limited width Usr_WriteFirstNameBRSurnames (UsrDat); HTM_BUTTON_End (); - HTM_DIV_End (); Frm_EndForm (); } HTM_TD_End (); diff --git a/swad_survey.c b/swad_survey.c index 27f58c71e..325d263cd 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -260,7 +260,8 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst) Grp_PutParamWhichGrps (); Pag_PutHiddenParamPagNum (Pag_SURVEYS,Gbl.Svys.CurrentPage); Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order); - HTM_BUTTON_SUBMIT_Begin (Txt_START_END_TIME_HELP[Order],"BT_LINK TIT_TBL",NULL); + HTM_BUTTON_SUBMIT_Begin (Txt_START_END_TIME_HELP[Order], + "BT_LINK TIT_TBL",NULL); if (Order == Gbl.Svys.SelectedOrder) HTM_U_Begin (); HTM_Txt (Txt_START_END_TIME[Order]);