From a353f390210ca8b73f4d0091782e12677f3411ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Wed, 31 Jul 2019 15:31:02 +0200 Subject: [PATCH] Version18.138.1 --- css/swad18.138.css | 11 ++++++++-- swad_changelog.h | 10 +++++---- swad_game.c | 55 ++++++++++++++++++++++++++++++++++++---------- 3 files changed, 59 insertions(+), 17 deletions(-) diff --git a/css/swad18.138.css b/css/swad18.138.css index a8d133c41..4d2fe7d0c 100644 --- a/css/swad18.138.css +++ b/css/swad18.138.css @@ -2602,7 +2602,7 @@ a:hover img.CENTRE_PHOTO_SHOW { box-sizing:border-box; float:left; - width:60%; + width:90%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; @@ -2612,7 +2612,7 @@ a:hover img.CENTRE_PHOTO_SHOW { box-sizing:border-box; float:left; - width:40%; + width:10%; text-align:right; border:1px solid blue; } @@ -2633,6 +2633,13 @@ a:hover img.CENTRE_PHOTO_SHOW font-weight:bold; border:1px solid green; } +.MATCH_NUM_PLAYERS + { + text-align:center; + padding:16pt 0; + color:#808080; + font-size:16pt; + } .MATCH_NUM_ANSWERERS { text-align:center; diff --git a/swad_changelog.h b/swad_changelog.h index 8c3455442..013fe83cb 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -460,13 +460,15 @@ En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 18.138 (2019-07-30)" +#define Log_PLATFORM_VERSION "SWAD 18.138.1 (2019-07-31)" #define CSS_FILE "swad18.138.css" #define JS_FILE "swad18.130.2.js" /* - Version 18.138.3: Jul 30, 2019 Time of current match and current match question are stored in database. (? lines) - Version 18.138.2: Jul 30, 2019 Buttons backward and start on finished games. (? lines) - Version 18.138.1: Jul 30, 2019 Close button in games always present. (? lines) + Version 18.138.4: Jul 31, 2019 Time of current match and current match question are stored in database. (? lines) + Version 18.138.3: Jul 31, 2019 Buttons backward and start on finished games. (? lines) + Version 18.138.2: Jul 31, 2019 Three buttons: backward, answers, forward. (? lines) + Version 18.138.1: Jul 31, 2019 Close button in games always present. + Number of players in left column. (244117 lines) Version 18.138: Jul 30, 2019 Button to go backward when playing a game. (244080 lines) 1 change necessary in database: INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1790','es','N','Mostrar pregunta anterior en partida (como profesor)'); diff --git a/swad_game.c b/swad_game.c index 8ac0eb0a5..84ec65e61 100644 --- a/swad_game.c +++ b/swad_game.c @@ -193,7 +193,8 @@ static void Gam_ShowMatchStatusForTch (struct Match *Match); static void Gam_ShowMatchStatusForStd (struct Match *Match); static void Gam_ShowLeftColumnTch (struct Match *Match); static void Gam_ShowLeftColumnStd (struct Match *Match); -static void Gam_ShowMatchTitleAndPlayers (struct Match *Match); +static void Gam_ShowNumPlayers (struct Match *Match); +static void Gam_ShowMatchTitleAndCloseButton (struct Match *Match); static void Gam_ShowQuestionAndAnswersTch (struct Match *Match); static void Gam_ShowQuestionAndAnswersStd (struct Match *Match); @@ -3553,7 +3554,7 @@ static void Gam_ShowMatchStatusForTch (struct Match *Match) fprintf (Gbl.F.Out,"
"); /***** Top row *****/ - Gam_ShowMatchTitleAndPlayers (Match); + Gam_ShowMatchTitleAndCloseButton (Match); /***** Bottom row *****/ if (!Match->Status.Finished && @@ -3591,7 +3592,7 @@ static void Gam_ShowMatchStatusForStd (struct Match *Match) fprintf (Gbl.F.Out,"
"); /***** Top row *****/ - Gam_ShowMatchTitleAndPlayers (Match); + Gam_ShowMatchTitleAndCloseButton (Match); /***** Bottom row *****/ if (!Match->Status.Finished) @@ -3670,7 +3671,7 @@ static void Gam_ShowLeftColumnTch (struct Match *Match) if (Match->Status.ShowingAnswers) /* Put button to start current question */ Gam_PutBigButton (ActCurMchTch,Match->MchCod, - "step-backward.svg",Txt_Stem); + "angle-up.svg",Txt_Stem); else { /* Get index of the previous question */ @@ -3717,7 +3718,7 @@ static void Gam_ShowLeftColumnTch (struct Match *Match) else /* Put button to show answers */ Gam_PutBigButton (ActNxtMchTch,Match->MchCod, - "step-forward.svg",Txt_Answers); + "angle-down.svg",Txt_Answers); } else /* Put button to start / resume match */ @@ -3731,7 +3732,10 @@ static void Gam_ShowLeftColumnTch (struct Match *Match) /* End buttons container */ fprintf (Gbl.F.Out,"
"); - /***** Write number of users who have answered *****/ + /***** Number of players *****/ + Gam_ShowNumPlayers (Match); + + /***** Number of users who have answered *****/ if (!Match->Status.Finished && Match->Status.BeingPlayed && Match->Status.ShowingAnswers) @@ -3790,18 +3794,36 @@ static void Gam_ShowLeftColumnStd (struct Match *Match) /* End buttons container */ fprintf (Gbl.F.Out,"
"); + /***** Number of players *****/ + Gam_ShowNumPlayers (Match); + /***** End left container *****/ fprintf (Gbl.F.Out,""); } /*****************************************************************************/ -/************** Show match title and current number of players ***************/ +/************************** Show number of players ***************************/ /*****************************************************************************/ -static void Gam_ShowMatchTitleAndPlayers (struct Match *Match) +static void Gam_ShowNumPlayers (struct Match *Match) { extern const char *Txt_Players; + fprintf (Gbl.F.Out,"
" + "%s
" + "%u" + "
", + Txt_Players,Match->Status.NumPlayers); + } + +/*****************************************************************************/ +/******************** Show match title and close button **********************/ +/*****************************************************************************/ + +static void Gam_ShowMatchTitleAndCloseButton (struct Match *Match) + { + extern const char *Txt_Close; + /***** Start container *****/ fprintf (Gbl.F.Out,"
"); @@ -3811,9 +3833,20 @@ static void Gam_ShowMatchTitleAndPlayers (struct Match *Match) "
", Match->Title); - /***** Right: Number of players *****/ - fprintf (Gbl.F.Out,"
%s: %u
", - Txt_Players,Match->Status.NumPlayers); + /***** Right: Icon to close this tab *****/ + /* onmousedown instead of default onclick + is necessary in order to be fast + and not lose clicks due to refresh */ + fprintf (Gbl.F.Out,"
" + "" + "\"%s\"" + "" + "
", + Txt_Close, + Cfg_URL_ICON_PUBLIC, + Txt_Close,Txt_Close); /***** End container *****/ fprintf (Gbl.F.Out,"");