diff --git a/css/swad19.90.css b/css/swad19.90.1.css similarity index 98% rename from css/swad19.90.css rename to css/swad19.90.1.css index 34459fd9..d100a6a4 100644 --- a/css/swad19.90.css +++ b/css/swad19.90.1.css @@ -901,7 +901,7 @@ a:hover /* Default ==> underlined */ box-sizing:border-box; width:100%; } -#main_horizontal .MENU_LIST_CONTAINER +#main_horizontal .MENU_LIST_CONT { width:100%; } @@ -961,7 +961,7 @@ a:hover /* Default ==> underlined */ box-sizing:border-box; width:100%; } - #main_vertical .MENU_LIST_CONTAINER + #main_vertical .MENU_LIST_CONT { width:100%; } @@ -1023,7 +1023,7 @@ a:hover /* Default ==> underlined */ box-sizing:border-box; width:100%; } - #main_vertical .MENU_LIST_CONTAINER + #main_vertical .MENU_LIST_CONT { display:table-cell; box-sizing:border-box; @@ -1321,7 +1321,7 @@ a:hover /* Default ==> underlined */ margin:0 auto; border-spacing:12px 0; } -.MONTH_CONTAINER +.MONTH_CONT { box-sizing:border-box; width:148px; @@ -1509,7 +1509,7 @@ a:hover /* Default ==> underlined */ { to {background-color:white;} } -.NOTICE_CONTAINER_ACTIVE +.NOTICE_CONT_ACTIVE { box-sizing:border-box; margin:0 auto 10px auto; @@ -1520,7 +1520,7 @@ a:hover /* Default ==> underlined */ text-align:left; overflow:hidden; } -.NOTICE_CONTAINER_OBSOLETE +.NOTICE_CONT_OBSOLETE { box-sizing:border-box; margin:0 auto 10px auto; @@ -1531,8 +1531,8 @@ a:hover /* Default ==> underlined */ text-align:left; overflow:hidden; } -.NOTICE_CONTAINER_NARROW {width:148px;} -.NOTICE_CONTAINER_WIDE {width:500px;} +.NOTICE_CONT_NARROW {width:148px;} +.NOTICE_CONT_WIDE {width:500px;} .NOTICE_DATE_ACTIVE { float:right; @@ -1719,7 +1719,7 @@ a:hover /* Default ==> underlined */ .BANNER_SMALL {width:75px; height:25px;} .ICO_BLACK {color:#404040;} -.ICO_RED {color:#660000;} +.ICO_DARKRED {color:#660000;} /****** Contextual links with small icons and text to go to some action ******/ .CONTEXT_MENU @@ -1761,7 +1761,7 @@ a:hover /* Default ==> underlined */ margin:0 8px; vertical-align:top; } -.FRAME_CONTAINER +.FRAME_CONT { box-sizing:border-box; width:100%; @@ -2166,10 +2166,10 @@ a:hover img.CENTRE_PHOTO_SHOW .RB {text-align:right; vertical-align:bottom;} /* Right Bottom */ /***************** Colors used in headers,backgrounds,etc. *****************/ -.COLOR0 {background-color:#F4F2EA;} -.COLOR1 {background-color:#FBFAF7;} +.COLOR0 {background-color:#F4F2EA;} +.COLOR1 {background-color:#FBFAF7;} .LIGHT_GREEN {background-color:#C0FF40;} -.LIGHT_BLUE {background-color:#DDECF1;} +.LIGHT_BLUE {background-color:#DDECF1;} .VERY_LIGHT_BLUE {background-color:#EAF3F6;} /********************************* Course info *******************************/ @@ -2574,7 +2574,7 @@ a:hover img.CENTRE_PHOTO_SHOW margin:0 0 0 1em; } -.TEST_MED_SHOW_CONTAINER +.TEST_MED_SHOW_CONT { box-sizing:border-box; width:100%; @@ -2586,7 +2586,7 @@ a:hover img.CENTRE_PHOTO_SHOW width:100%; border-radius:4px; } -.TEST_MED_EDIT_LIST_CONTAINER +.TEST_MED_EDIT_LIST_CONT { box-sizing:border-box; width:100%; @@ -2613,7 +2613,7 @@ a:hover img.CENTRE_PHOTO_SHOW width:400px; } -.TEST_MED_EDIT_ONE_CONTAINER +.TEST_MED_EDIT_ONE_CONT { box-sizing:border-box; width:100%; @@ -2731,14 +2731,14 @@ a:hover img.CENTRE_PHOTO_SHOW font-size:16pt; } -.MCH_BUTTONS_CONTAINER +.MCH_BUTTONS_CONT { display:table; box-sizing:border-box; width:100%; padding:20px 0; } -.MCH_BUTTON_LEFT_CONTAINER +.MCH_BUTTON_LEFT_CONT { display:table; box-sizing:border-box; @@ -2746,7 +2746,7 @@ a:hover img.CENTRE_PHOTO_SHOW width:35%; text-align:center; } -.MCH_BUTTON_CENTER_CONTAINER +.MCH_BUTTON_CENTER_CONT { display:table; box-sizing:border-box; @@ -2754,7 +2754,7 @@ a:hover img.CENTRE_PHOTO_SHOW width:30%; text-align:center; } -.MCH_BUTTON_RIGHT_CONTAINER +.MCH_BUTTON_RIGHT_CONT { display:table; box-sizing:border-box; @@ -2763,29 +2763,27 @@ a:hover img.CENTRE_PHOTO_SHOW text-align:center; } -.MCH_BUTTON_CONTAINER +.MCH_BIGBUTTON_CONT { box-sizing:border-box; - display:table-cell; - width:100%; - height:64px; + display:inline-block; font-size:28pt; font-weight:bold; padding:2px; text-align:center; vertical-align:middle; } -.MCH_SMALLBUTTON_CONTAINER +.MCH_SMALLBUTTON_CONT { box-sizing:border-box; - display:table-cell; - width:100%; - font-size:18pt; + display:inline-block; + font-size:16pt; + font-weight:bold; padding:2px; text-align:center; vertical-align:middle; } -.MCH_BUTTON_ON +.MCH_BUTTON_ON, .MCH_BUTTON_OFF { display:table-cell; width:100%; @@ -2797,7 +2795,8 @@ a:hover img.CENTRE_PHOTO_SHOW { opacity:1; } -.MCH_BUTTON_OFF + +.MCH_BUTTON_HIDDEN { display:table-cell; width:100%; @@ -2806,6 +2805,11 @@ a:hover img.CENTRE_PHOTO_SHOW opacity:0.1; } +.MCH_RED {color:#913b00;} +.MCH_YELLOW {color:#a27600;} +.MCH_LIMEGREEN {color:#636e00;} +.MCH_GREEN {color:#246600;} + .MCH_TCH_STEM { color:#202020; @@ -2818,7 +2822,7 @@ a:hover img.CENTRE_PHOTO_SHOW font-size:24pt; } -.MCH_WAIT_CONTAINER +.MCH_WAIT_CONT { box-sizing:border-box; text-align:center; @@ -3046,12 +3050,12 @@ a:hover img.CENTRE_PHOTO_SHOW } /********************************* Preference ********************************/ -.PREF_CONTAINERS +.PREF_CONTS { margin:0 auto; text-align:center; } -.PREF_CONTAINER +.PREF_CONT { display:inline-block; margin:0 10px; @@ -3573,7 +3577,7 @@ a:hover img.CENTRE_PHOTO_SHOW } /************************************ Forum **********************************/ -.FOR_IMG_CONTAINER +.FOR_IMG_CONT { box-sizing:border-box; width:100%; @@ -3600,7 +3604,7 @@ a:hover img.CENTRE_PHOTO_SHOW text-align:left; vertical-align:middle; } -.MSG_IMG_CONTAINER +.MSG_IMG_CONT { box-sizing:border-box; width:100%; @@ -3786,7 +3790,7 @@ a.PAG:hover, .PAG_CUR } /***************************** Public user's profile *************************/ -.PRF_FIG_LEFT_CONTAINER +.PRF_FIG_LEFT_CONT { display:inline-block; box-sizing:border-box; @@ -3795,7 +3799,7 @@ a.PAG:hover, .PAG_CUR text-align:right; vertical-align:top; } -.PRF_FIG_RIGHT_CONTAINER +.PRF_FIG_RIGHT_CONT { display:inline-block; box-sizing:border-box; @@ -4015,7 +4019,7 @@ a.PAG:hover, .PAG_CUR text-align:center; } } -.FOOT_LIST_CONTAINER +.FOOT_LIST_CONT { position:relative; float:left; diff --git a/html/foot.html b/html/foot.html index 73728fdf..c1e6f387 100644 --- a/html/foot.html +++ b/html/foot.html @@ -1,5 +1,5 @@
-
+ -
+ -
+ -
+ -
+

Mobile

  • diff --git a/js/swad19.90.js b/js/swad19.90.js index b740aeec..c276e21a 100644 --- a/js/swad19.90.js +++ b/js/swad19.90.js @@ -467,12 +467,12 @@ function writeClockConnected () { if (H != 0) { StrM = ((M < 10) ? '0' : '') + M; StrS = ((S < 10) ? '0' : '') + S; - PrintableClock = H + ':' + StrM + ''' + StrS + '"'; + PrintableClock = H + ':' + StrM + '′' + StrS + '″'; } else if (M != 0) { StrS = ((S < 10) ? '0' : '') + S; - PrintableClock = M + ''' + StrS + '"'; + PrintableClock = M + '′' + StrS + '″'; } else - PrintableClock = S + '"'; + PrintableClock = S + '″'; BoxClock.innerHTML = PrintableClock; } } @@ -1191,7 +1191,7 @@ function toggleDisplay (elementID) { /*****************************************************************************/ // idCaption must be the id of a hidden div with the caption in innerHTML -// (this allows showing ' and ") +// (this allows showing ′ and ″) function zoom (img,urlPhoto,idCaption) { var zoomImgWidth = 186; // big photo var zoomImgHeight = 248; // big photo @@ -1580,7 +1580,7 @@ function DrawMonth (id,FirstDayOfWeek,YearToDraw,MonthToDraw,CurrentMonth,Curren } /***** Start of month *****/ - Gbl_HTMLContent += '
    '; + Gbl_HTMLContent += '
    '; /***** Month name *****/ if (DrawingCalendar) diff --git a/swad_announcement.c b/swad_announcement.c index 4fb31050..0b3ece2f 100644 --- a/swad_announcement.c +++ b/swad_announcement.c @@ -279,8 +279,8 @@ static void Ann_DrawAnAnnouncement (long AnnCod,Ann_Status_t Status, extern const char *Txt_Do_not_show_again; static const char *ContainerClass[Ann_NUM_STATUS] = { - [Ann_ACTIVE_ANNOUNCEMENT ] = "NOTICE_CONTAINER_ACTIVE NOTICE_CONTAINER_WIDE", - [Ann_OBSOLETE_ANNOUNCEMENT] = "NOTICE_CONTAINER_OBSOLETE NOTICE_CONTAINER_WIDE", + [Ann_ACTIVE_ANNOUNCEMENT ] = "NOTICE_CONT_ACTIVE NOTICE_CONT_WIDE", + [Ann_OBSOLETE_ANNOUNCEMENT] = "NOTICE_CONT_OBSOLETE NOTICE_CONT_WIDE", }; static const char *SubjectClass[Ann_NUM_STATUS] = { diff --git a/swad_box.c b/swad_box.c index 4352bd2e..9fcad786 100644 --- a/swad_box.c +++ b/swad_box.c @@ -144,10 +144,10 @@ static void Box_BoxInternalBegin (const char *Width,const char *Title, /* Create unique id for alert */ Frm_SetUniqueId (Gbl.Box.Ids[Gbl.Box.Nested]); - HTM_DIV_Begin ("class=\"FRAME_CONTAINER\" id=\"%s\"",Gbl.Box.Ids[Gbl.Box.Nested]); + HTM_DIV_Begin ("class=\"FRAME_CONT\" id=\"%s\"",Gbl.Box.Ids[Gbl.Box.Nested]); } else - HTM_DIV_Begin ("class=\"FRAME_CONTAINER\""); + HTM_DIV_Begin ("class=\"FRAME_CONT\""); /***** Begin box *****/ if (Width) diff --git a/swad_changelog.h b/swad_changelog.h index c03a8684..4500a322 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -490,13 +490,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.90 (2019-12-12)" -#define CSS_FILE "swad19.90.css" -#define JS_FILE "swad19.70.js" +#define Log_PLATFORM_VERSION "SWAD 19.90.1 (2019-12-12)" +#define CSS_FILE "swad19.90.1.css" +#define JS_FILE "swad19.90.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.90.1: Dec 12, 2019 Changes in CSS. (248391 lines) Version 19.90: Dec 12, 2019 Hourglass to start countdown. (248373 lines) 2 changes necessary in database: ALTER TABLE mch_matches ADD COLUMN Countdown INT NOT NULL DEFAULT -1 AFTER Showing; diff --git a/swad_config.h b/swad_config.h index 9d548aa1..dc93c833 100644 --- a/swad_config.h +++ b/swad_config.h @@ -495,8 +495,8 @@ #define Cfg_TIME_TO_REFRESH_TIMELINE ((time_t)( 2UL * 1000UL)) // Initial refresh period of social timeline in miliseconds // This delay is increased 1 second on each refresh -#define Cfg_SECONDS_TO_REFRESH_MATCH_TCH 1 // Refresh period of match being played in seconds (for teachers) -#define Cfg_SECONDS_TO_REFRESH_MATCH_STD 3 // Refresh period of match being played in seconds (for students) +#define Cfg_SECONDS_TO_REFRESH_MATCH_TCH 1 // Refresh period of match being played in seconds (for teachers) +#define Cfg_SECONDS_TO_REFRESH_MATCH_STD 3 // Refresh period of match being played in seconds (for students) #define Cfg_TIME_TO_REFRESH_MATCH_TCH ((time_t)(Cfg_SECONDS_TO_REFRESH_MATCH_TCH * 1000UL)) // Refresh period of match being played in miliseconds (for teachers) #define Cfg_TIME_TO_REFRESH_MATCH_STD ((time_t)(Cfg_SECONDS_TO_REFRESH_MATCH_STD * 1000UL)) // Refresh period of match being played in miliseconds (for students) diff --git a/swad_date.c b/swad_date.c index e844f2bc..0be01951 100644 --- a/swad_date.c +++ b/swad_date.c @@ -677,7 +677,7 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id, Minute < 60; Minute += MinutesIInterval[FormSeconds]) HTM_OPTION (HTM_Type_UNSIGNED,&Minute,false,false, - "%02u '",Minute); + "%02u ′",Minute); HTM_SELECT_End (); HTM_TD_End (); @@ -701,7 +701,7 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id, Second <= 59; Second++) HTM_OPTION (HTM_Type_UNSIGNED,&Second,false,false, - "%02u "",Second); + "%02u ″",Second); HTM_SELECT_End (); HTM_TD_End (); } @@ -1614,11 +1614,11 @@ void Dat_WriteHoursMinutesSecondsFromSeconds (time_t Seconds) Seconds %= 60; if (Hours) - HTM_TxtF ("%ld:%02ld'%02ld"",(long) Hours,(long) Minutes,(long) Seconds); + HTM_TxtF ("%ld:%02ld′%02ld″",(long) Hours,(long) Minutes,(long) Seconds); else if (Minutes) - HTM_TxtF ("%ld'%02ld"",(long) Minutes,(long) Seconds); + HTM_TxtF ("%ld′%02ld″",(long) Minutes,(long) Seconds); else - HTM_TxtF ("%ld"",(long) Seconds); + HTM_TxtF ("%ld″",(long) Seconds); } /*****************************************************************************/ @@ -1628,11 +1628,11 @@ void Dat_WriteHoursMinutesSecondsFromSeconds (time_t Seconds) void Dat_WriteHoursMinutesSeconds (struct Time *Time) { if (Time->Hour) - HTM_TxtF ("%u:%02u'%02u"",Time->Hour,Time->Minute,Time->Second); + HTM_TxtF ("%u:%02u′%02u″",Time->Hour,Time->Minute,Time->Second); else if (Time->Minute) - HTM_TxtF ("%u'%02u"",Time->Minute,Time->Second); + HTM_TxtF ("%u′%02u″",Time->Minute,Time->Second); else - HTM_TxtF ("%u"",Time->Second); + HTM_TxtF ("%u″",Time->Second); } /*****************************************************************************/ diff --git a/swad_exam.c b/swad_exam.c index 21a6260f..a873d5e0 100644 --- a/swad_exam.c +++ b/swad_exam.c @@ -1213,7 +1213,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, Minute++) HTM_OPTION (HTM_Type_UNSIGNED,&Minute, Gbl.ExamAnns.ExaDat.StartTime.Minute == Minute,false, - "%02u '",Minute); + "%02u ′",Minute); HTM_SELECT_End (); } else if (Gbl.ExamAnns.ExaDat.StartTime.Hour) @@ -1250,7 +1250,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, Minute++) HTM_OPTION (HTM_Type_UNSIGNED,&Minute, Gbl.ExamAnns.ExaDat.Duration.Minute == Minute,false, - "%02u '",Minute); + "%02u ′",Minute); HTM_SELECT_End (); } else if (Gbl.ExamAnns.ExaDat.Duration.Hour || @@ -1259,7 +1259,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, if (Gbl.ExamAnns.ExaDat.Duration.Hour) { if (Gbl.ExamAnns.ExaDat.Duration.Minute) - HTM_TxtF ("%u %s %u '",Gbl.ExamAnns.ExaDat.Duration.Hour, + HTM_TxtF ("%u %s %u ′",Gbl.ExamAnns.ExaDat.Duration.Hour, Txt_hours_ABBREVIATION, Gbl.ExamAnns.ExaDat.Duration.Minute); else diff --git a/swad_forum.c b/swad_forum.c index 59ea561e..5edc6dda 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -1301,7 +1301,7 @@ static void For_ShowAForumPost (unsigned PstNum,long PstCod, Msg_WriteMsgContent (Content,Cns_MAX_BYTES_LONG_TEXT,true,false); /***** Show image *****/ - Med_ShowMedia (&Media,"FOR_IMG_CONTAINER","FOR_IMG"); + Med_ShowMedia (&Media,"FOR_IMG_CONT","FOR_IMG"); } else HTM_Txt (Txt_This_post_has_been_banned_probably_for_not_satisfy_the_rules_of_the_forums); diff --git a/swad_match.c b/swad_match.c index 32520b84..ad09a67b 100644 --- a/swad_match.c +++ b/swad_match.c @@ -164,6 +164,8 @@ static void Mch_ShowRefreshablePartTch (struct Match *Match); static void Mch_WriteElapsedTimeInMch (struct Match *Match); static void Mch_WriteElapsedTimeInQst (struct Match *Match); static void Mch_WriteHourglass (struct Match *Match); +static void Mch_PutFormCountdown (struct Match *Match,long Countdown, + const char *Class,const char *Txt); static void Mch_WriteNumRespondersQst (struct Match *Match); static void Mch_ShowRightColumnTch (const struct Match *Match); @@ -200,7 +202,7 @@ static unsigned Mch_GetParamNumOpt (void); static void Mch_PutBigButton (Act_Action_t NextAction,const char *Id, long MchCod,const char *Icon,const char *Txt); -static void Mch_PutBigButtonOff (const char *Icon); +static void Mch_PutBigButtonHidden (const char *Icon); static void Mch_PutBigButtonClose (void); static void Mch_ShowWaitImage (const char *Txt); @@ -1908,8 +1910,7 @@ void Mch_StartCountdown (void) Mch_GetDataOfMatchByCod (&Match); /***** Start countdown *****/ - if (NewCountdown >= 0) - Match.Status.Countdown = NewCountdown; + Match.Status.Countdown = NewCountdown; /***** Update match status in database *****/ Mch_UpdateMatchStatusInDB (&Match); @@ -2282,85 +2283,104 @@ static void Mch_WriteElapsedTimeInQst (struct Match *Match) static void Mch_WriteHourglass (struct Match *Match) { + const char *Class; + const char *Icon; + /***** Start container *****/ HTM_DIV_Begin ("class=\"MCH_SHOW_HOURGLASS\""); - /***** Start form *****/ - Frm_StartForm (ActMchCntDwn); - Mch_PutParamMchCod (Match->MchCod); // Current match being played + /***** Put forms to start countdown *****/ + Mch_PutFormCountdown (Match,-1L,"MCH_GREEN" ," ∞ "); + Mch_PutFormCountdown (Match,60L,"MCH_LIMEGREEN"," 60″" ); + Mch_PutFormCountdown (Match,30L,"MCH_YELLOW" ," 30″" ); + Mch_PutFormCountdown (Match,10L,"MCH_RED" ," 10″" ); + + /***** Set hourglass icon depending on countdown *****/ + if (Match->Status.Showing == Mch_END) // Match over + { + Class = "BT_LINK_OFF MCH_BUTTON_HIDDEN MCH_GREEN"; + Icon = "fa-hourglass-start"; + } + else if (Match->Status.Countdown < 0) // No countdown + { + Class = "BT_LINK_OFF MCH_BUTTON_OFF MCH_GREEN"; + Icon = "fa-hourglass-start"; + } + else if (Match->Status.Countdown > 30) // Countdown in progress + { + Class = "BT_LINK_OFF MCH_BUTTON_OFF MCH_LIMEGREEN"; + Icon = "fa-hourglass-start"; + } + else if (Match->Status.Countdown > 10) // Countdown in progress + { + Class = "BT_LINK_OFF MCH_BUTTON_OFF MCH_YELLOW"; + Icon = "fa-hourglass-half"; + } + else // Countdown about to end + { + Class = "BT_LINK_OFF MCH_BUTTON_OFF MCH_RED"; + Icon = "fa-hourglass-end"; + } /***** Put icon with link *****/ - HTM_DIV_Begin ("class=\"MCH_BUTTON_CONTAINER\""); - HTM_BUTTON_OnMouseDown_Begin ("Cuenta atrás","BT_LINK MCH_BUTTON_ON ICO_BLACK"); // TODO: Need translation!!!! - HTM_TxtF ("", - Match->Status.Countdown < 0 ? "fa-hourglass-start" : // No countdown - (Match->Status.Countdown > Cfg_SECONDS_TO_REFRESH_MATCH_TCH) ? "fa-hourglass-half" : // Countdown in progress - "fa-hourglass-end"); // Countdown about to end + HTM_BR (); + HTM_DIV_Begin ("class=\"MCH_BIGBUTTON_CONT\""); + HTM_BUTTON_BUTTON_Begin ("Cuenta atrás",Class,NULL); // TODO: Need translation!!!! + HTM_TxtF ("",Icon); HTM_BR (); if (Match->Status.Countdown > 0) - HTM_TxtF ("%ld"",Match->Status.Countdown); + HTM_TxtF (" %02ld″",Match->Status.Countdown); else HTM_NBSP (); HTM_BUTTON_End (); HTM_DIV_End (); - /***** End form *****/ - Frm_EndForm (); - - HTM_BR (); - - /***** Start form *****/ - Frm_StartForm (ActMchCntDwn); - Mch_PutParamMchCod (Match->MchCod); // Current match being played - Par_PutHiddenParamLong (NULL,"Countdown",60L); - - /***** Put icon with link *****/ - HTM_DIV_Begin ("class=\"MCH_SMALLBUTTON_CONTAINER\""); - HTM_BUTTON_OnMouseDown_Begin ("Cuenta atrás","BT_LINK MCH_BUTTON_ON ICO_BLACK"); // TODO: Need translation!!!! - HTM_Txt ("60""); - HTM_BUTTON_End (); - HTM_DIV_End (); - - /***** End form *****/ - Frm_EndForm (); - - HTM_NBSP (); - - /***** Start form *****/ - Frm_StartForm (ActMchCntDwn); - Mch_PutParamMchCod (Match->MchCod); // Current match being played - Par_PutHiddenParamLong (NULL,"Countdown",30L); - - /***** Put icon with link *****/ - HTM_DIV_Begin ("class=\"MCH_SMALLBUTTON_CONTAINER\""); - HTM_BUTTON_OnMouseDown_Begin ("Cuenta atrás","BT_LINK MCH_BUTTON_ON ICO_BLACK"); // TODO: Need translation!!!! - HTM_Txt ("30""); - HTM_BUTTON_End (); - HTM_DIV_End (); - /***** End form *****/ - Frm_EndForm (); - - HTM_NBSP (); - - /***** Start form *****/ - Frm_StartForm (ActMchCntDwn); - Mch_PutParamMchCod (Match->MchCod); // Current match being played - Par_PutHiddenParamLong (NULL,"Countdown",10L); - - /***** Put icon with link *****/ - HTM_DIV_Begin ("class=\"MCH_SMALLBUTTON_CONTAINER\""); - HTM_BUTTON_OnMouseDown_Begin ("Cuenta atrás","BT_LINK MCH_BUTTON_ON ICO_BLACK"); // TODO: Need translation!!!! - HTM_Txt ("10""); - HTM_BUTTON_End (); - HTM_DIV_End (); - - /***** End form *****/ - Frm_EndForm (); - /***** End container *****/ HTM_DIV_End (); } +static void Mch_PutFormCountdown (struct Match *Match,long Countdown, + const char *Color,const char *Txt) + { + char *Class; + bool PutForm = Match->Status.Showing != Mch_END; + + if (PutForm) + { + /***** Start form *****/ + Frm_StartForm (ActMchCntDwn); + Mch_PutParamMchCod (Match->MchCod); // Current match being played + Par_PutHiddenParamLong (NULL,"Countdown",Countdown); + + /***** Set class *****/ + if (asprintf (&Class,"BT_LINK MCH_BUTTON_ON %s",Color) < 0) + Lay_NotEnoughMemoryExit (); + } + else + { + /***** Set class *****/ + if (asprintf (&Class,"BT_LINK_OFF MCH_BUTTON_HIDDEN %s",Color) < 0) + Lay_NotEnoughMemoryExit (); + } + + /***** Put icon *****/ + HTM_DIV_Begin ("class=\"MCH_SMALLBUTTON_CONT\""); + if (PutForm) + HTM_BUTTON_OnMouseDown_Begin ("Cuenta atrás",Class); // TODO: Need translation!!!! + else + HTM_BUTTON_BUTTON_Begin (NULL,Class,NULL); + HTM_Txt (Txt); + HTM_BUTTON_End (); + HTM_DIV_End (); + + /***** Free class *****/ + free (Class); + + /***** End form *****/ + if (PutForm) + Frm_EndForm (); + } + static void Mch_WriteNumRespondersQst (struct Match *Match) { extern const char *Txt_MATCH_respond; @@ -2546,10 +2566,10 @@ static void Mch_PutMatchControlButtons (const struct Match *Match) extern const char *Txt_Resume; /***** Start buttons container *****/ - HTM_DIV_Begin ("class=\"MCH_BUTTONS_CONTAINER\""); + HTM_DIV_Begin ("class=\"MCH_BUTTONS_CONT\""); /***** Left button *****/ - HTM_DIV_Begin ("class=\"MCH_BUTTON_LEFT_CONTAINER\""); + HTM_DIV_Begin ("class=\"MCH_BUTTON_LEFT_CONT\""); switch (Match->Status.Showing) { case Mch_START: @@ -2565,7 +2585,7 @@ static void Mch_PutMatchControlButtons (const struct Match *Match) HTM_DIV_End (); /***** Center button *****/ - HTM_DIV_Begin ("class=\"MCH_BUTTON_CENTER_CONTAINER\""); + HTM_DIV_Begin ("class=\"MCH_BUTTON_CENTER_CONT\""); if (Match->Status.Playing) // Match is being played /* Put button to pause match */ Mch_PutBigButton (ActPlyPauMch,"play_pause",Match->MchCod, @@ -2581,7 +2601,7 @@ static void Mch_PutMatchControlButtons (const struct Match *Match) break; case Mch_END: // Match over /* Put disabled button to play match */ - Mch_PutBigButtonOff (Mch_ICON_PLAY); + Mch_PutBigButtonHidden (Mch_ICON_PLAY); break; default: /* Put button to resume match */ @@ -2592,7 +2612,7 @@ static void Mch_PutMatchControlButtons (const struct Match *Match) HTM_DIV_End (); /***** Right button *****/ - HTM_DIV_Begin ("class=\"MCH_BUTTON_RIGHT_CONTAINER\""); + HTM_DIV_Begin ("class=\"MCH_BUTTON_RIGHT_CONT\""); if (Match->Status.Showing == Mch_END) // Match over /* Put button to close browser tab */ Mch_PutBigButtonClose (); @@ -2760,8 +2780,8 @@ static void Mch_PutIconToRemoveMyAnswer (const struct Match *Match) Gam_PutParamQstInd (Match->Status.QstInd); // Current question index shown /***** Put icon with link *****/ - HTM_DIV_Begin ("class=\"MCH_BUTTON_CONTAINER\""); - HTM_BUTTON_OnMouseDown_Begin (Txt_Delete_my_answer,"BT_LINK MCH_BUTTON_ON ICO_RED"); + HTM_DIV_Begin ("class=\"MCH_BIGBUTTON_CONT\""); + HTM_BUTTON_OnMouseDown_Begin (Txt_Delete_my_answer,"BT_LINK MCH_BUTTON_ON ICO_DARKRED"); HTM_Txt (""); HTM_BUTTON_End (); HTM_DIV_End (); @@ -3209,7 +3229,7 @@ static void Mch_PutBigButton (Act_Action_t NextAction,const char *Id, Mch_PutParamMchCod (MchCod); /***** Put icon with link *****/ - HTM_DIV_Begin ("class=\"MCH_BUTTON_CONTAINER\""); + HTM_DIV_Begin ("class=\"MCH_BIGBUTTON_CONT\""); HTM_BUTTON_SUBMIT_Begin (Txt,"BT_LINK MCH_BUTTON_ON ICO_BLACK",NULL); HTM_TxtF ("",Icon); HTM_BUTTON_End (); @@ -3219,11 +3239,11 @@ static void Mch_PutBigButton (Act_Action_t NextAction,const char *Id, Frm_EndForm (); } -static void Mch_PutBigButtonOff (const char *Icon) +static void Mch_PutBigButtonHidden (const char *Icon) { /***** Put inactive icon *****/ - HTM_DIV_Begin ("class=\"MCH_BUTTON_CONTAINER\""); - HTM_BUTTON_BUTTON_Begin (NULL,"BT_LINK_OFF MCH_BUTTON_OFF ICO_BLACK",NULL); + HTM_DIV_Begin ("class=\"MCH_BIGBUTTON_CONT\""); + HTM_BUTTON_BUTTON_Begin (NULL,"BT_LINK_OFF MCH_BUTTON_HIDDEN ICO_BLACK",NULL); HTM_TxtF ("",Icon); HTM_BUTTON_End (); HTM_DIV_End (); @@ -3234,8 +3254,8 @@ static void Mch_PutBigButtonClose (void) extern const char *Txt_Close; /***** Put icon with link *****/ - HTM_DIV_Begin ("class=\"MCH_BUTTON_CONTAINER\""); - HTM_BUTTON_BUTTON_Begin (Txt_Close,"BT_LINK MCH_BUTTON_ON ICO_BLACK","window.close();"); + HTM_DIV_Begin ("class=\"MCH_BIGBUTTON_CONT\""); + HTM_BUTTON_BUTTON_Begin (Txt_Close,"BT_LINK MCH_BUTTON_ON ICO_DARKRED","window.close();"); HTM_TxtF ("",Mch_ICON_CLOSE); HTM_BUTTON_End (); HTM_DIV_End (); @@ -3247,7 +3267,7 @@ static void Mch_PutBigButtonClose (void) static void Mch_ShowWaitImage (const char *Txt) { - HTM_DIV_Begin ("class=\"MCH_WAIT_CONTAINER\""); + HTM_DIV_Begin ("class=\"MCH_WAIT_CONT\""); Ico_PutIcon ("wait.gif",Txt,"MCH_WAIT_IMG"); HTM_DIV_End (); } diff --git a/swad_media.c b/swad_media.c index 924f8118..62a55b43 100644 --- a/swad_media.c +++ b/swad_media.c @@ -410,8 +410,8 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassInput) /***** Icons *****/ /* Start icons */ - HTM_DIV_Begin ("class=\"PREF_CONTAINERS\""); // icons containers - HTM_DIV_Begin ("class=\"PREF_CONTAINER\""); // icons container + HTM_DIV_Begin ("class=\"PREF_CONTS\""); // icons containers + HTM_DIV_Begin ("class=\"PREF_CONT\""); // icons container /* Draw icons */ for (NumUploader = 0; diff --git a/swad_menu.c b/swad_menu.c index b52293b6..0095eba8 100644 --- a/swad_menu.c +++ b/swad_menu.c @@ -214,7 +214,7 @@ void Mnu_WriteMenuThisTab (void) bool IsTheSelectedAction; /***** Menu start *****/ - HTM_Txt ("