diff --git a/swad_agenda.c b/swad_agenda.c index c9a833b6..faf866ac 100644 --- a/swad_agenda.c +++ b/swad_agenda.c @@ -842,24 +842,25 @@ static void Agd_ShowOneEvent (struct Agd_Agenda *Agenda, } /* Event */ - HTM_TD_Begin ("class=\"LT %s_%s %s\"", - AgdEvent.Hidden ? "ASG_TITLE_LIGHT" : - "ASG_TITLE", - The_GetSuffix (), - The_GetColorRows ()); + HTM_TD_Begin ("class=\"LT %s\"",The_GetColorRows ()); HTM_ARTICLE_Begin (Anchor); - HTM_Txt (AgdEvent.Event); + HTM_SPAN_Begin ("class=\"%s_%s\"", + AgdEvent.Hidden ? "ASG_TITLE_LIGHT" : + "ASG_TITLE", + The_GetSuffix ()); + HTM_Txt (AgdEvent.Event); + HTM_SPAN_End (); HTM_ARTICLE_End (); HTM_TD_End (); /* Location */ HTM_TD_Begin ("class=\"LT %s\"",The_GetColorRows ()); - HTM_DIV_Begin ("class=\"%s_%s\"", - AgdEvent.Hidden ? "ASG_TITLE_LIGHT" : - "ASG_TITLE", - The_GetSuffix ()); + HTM_SPAN_Begin ("class=\"%s_%s\"", + AgdEvent.Hidden ? "ASG_TITLE_LIGHT" : + "ASG_TITLE", + The_GetSuffix ()); HTM_Txt (AgdEvent.Location); - HTM_DIV_End (); + HTM_SPAN_End (); HTM_TD_End (); HTM_TR_End (); diff --git a/swad_assignment.c b/swad_assignment.c index 28999fe9..775fc95d 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -457,18 +457,16 @@ static void Asg_ShowOneAssignment (struct Asg_Assignments *Assignments, /* Assignment title */ if (PrintView) - HTM_TD_Begin ("class=\"LT %s_%s\"", - Asg.Hidden ? "ASG_TITLE_LIGHT" : - "ASG_TITLE", - The_GetSuffix ()); + HTM_TD_Begin ("class=\"LT\""); else - HTM_TD_Begin ("class=\"LT %s_%s %s\"", - Asg.Hidden ? "ASG_TITLE_LIGHT" : - "ASG_TITLE", - The_GetSuffix (), - The_GetColorRows ()); + HTM_TD_Begin ("class=\"LT %s\"",The_GetColorRows ()); HTM_ARTICLE_Begin (Anchor); - HTM_Txt (Asg.Title); + HTM_SPAN_Begin ("class=\"%s_%s\"", + Asg.Hidden ? "ASG_TITLE_LIGHT" : + "ASG_TITLE", + The_GetSuffix ()); + HTM_Txt (Asg.Title); + HTM_SPAN_End (); HTM_ARTICLE_End (); HTM_TD_End (); diff --git a/swad_attendance.c b/swad_attendance.c index 09b2b2a9..04088444 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -123,7 +123,7 @@ static void Att_ListAttStudents (struct Att_Events *Events, static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr, struct UsrData *UsrDat, struct Att_Event *Event); -static void Att_PutLinkAttEvent (struct Att_Event *AttEvent, +static void Att_PutLinkAttEvent (struct Att_Event *Event, const char *Title,const char *Txt); static void Att_PutParamsCodGrps (long AttCod); static unsigned Att_GetNumUsrsFromAListWhoAreInAttEvent (long AttCod, @@ -515,16 +515,9 @@ static void Att_ShowOneAttEvent (struct Att_Events *Events, /* Attendance event title */ if (ShowOnlyThisAttEventComplete) - HTM_TD_Begin ("class=\"LT %s_%s\"", - Event->Hidden ? "ASG_TITLE_LIGHT" : - "ASG_TITLE", - The_GetSuffix ()); + HTM_TD_Begin ("class=\"LT\""); else - HTM_TD_Begin ("class=\"LT %s_%s %s\"", - Event->Hidden ? "ASG_TITLE_LIGHT" : - "ASG_TITLE", - The_GetSuffix (), - The_GetColorRows ()); + HTM_TD_Begin ("class=\"LT %s\"",The_GetColorRows ()); HTM_ARTICLE_Begin (Anchor); Att_PutLinkAttEvent (Event,Txt_View_event,Event->Title); HTM_ARTICLE_End (); @@ -532,17 +525,15 @@ static void Att_ShowOneAttEvent (struct Att_Events *Events, /* Number of students in this event */ if (ShowOnlyThisAttEventComplete) - HTM_TD_Begin ("class=\"RT %s_%s\"", + HTM_TD_Begin ("class=\"RT\""); + else + HTM_TD_Begin ("class=\"RT %s\"",The_GetColorRows ()); + HTM_SPAN_Begin ("class=\"%s_%s\"", Event->Hidden ? "ASG_TITLE_LIGHT" : "ASG_TITLE", The_GetSuffix ()); - else - HTM_TD_Begin ("class=\"RT %s_%s %s\"", - Event->Hidden ? "ASG_TITLE_LIGHT" : - "ASG_TITLE", - The_GetSuffix (), - The_GetColorRows ()); - HTM_Unsigned (Event->NumStdsTotal); + HTM_Unsigned (Event->NumStdsTotal); + HTM_SPAN_End (); HTM_TD_End (); HTM_TR_End (); @@ -1857,16 +1848,19 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr, /**************** Put link to view one attendance event **********************/ /*****************************************************************************/ -static void Att_PutLinkAttEvent (struct Att_Event *AttEvent, +static void Att_PutLinkAttEvent (struct Att_Event *Event, const char *Title,const char *Txt) { /***** Begin form *****/ Frm_BeginForm (ActSeeOneAtt); - Att_PutParamAttCod (AttEvent->AttCod); - Att_PutParamsCodGrps (AttEvent->AttCod); + Att_PutParamAttCod (Event->AttCod); + Att_PutParamsCodGrps (Event->AttCod); /***** Link to view attendance event *****/ - HTM_BUTTON_Submit_Begin (Title,"class=\"BT_LINK\""); + HTM_BUTTON_Submit_Begin (Title,"class=\"BT_LINK %s_%s\"", + Event->Hidden ? "ASG_TITLE_LIGHT" : + "ASG_TITLE", + The_GetSuffix ()); HTM_Txt (Txt); HTM_BUTTON_End (); diff --git a/swad_changelog.h b/swad_changelog.h index 7577cf5c..a5ba9fe1 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -606,10 +606,11 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate TODO: Attach pdf files in multimedia. */ -#define Log_PLATFORM_VERSION "SWAD 21.93.2 (2022-04-22)" +#define Log_PLATFORM_VERSION "SWAD 21.93.3 (2022-04-22)" #define CSS_FILE "swad21.93.1.css" #define JS_FILE "swad21.92.js" /* + Version 21.93.3: Apr 22, 2022 Working on design of dark theme. (323259 lines) Version 21.93.2: Apr 22, 2022 Working on design of dark theme. (323277 lines) Version 21.93.1: Apr 21, 2022 Working on design of dark theme. (323269 lines) Version 21.93: Apr 21, 2022 Homogenization of lists in forums, chat and my courses. (323245 lines) diff --git a/swad_exam.c b/swad_exam.c index f62786c0..b7ff4cbe 100644 --- a/swad_exam.c +++ b/swad_exam.c @@ -539,23 +539,19 @@ static void Exa_ShowOneExam (struct Exa_Exams *Exams, /***** Exam title and main data *****/ if (ShowOnlyThisExam) - HTM_TD_Begin ("class=\"LT %s_%s\"", - Exam->Hidden ? "ASG_TITLE_LIGHT": - "ASG_TITLE", - The_GetSuffix ()); + HTM_TD_Begin ("class=\"LT\""); else - HTM_TD_Begin ("class=\"LT %s_%s %s\"", - Exam->Hidden ? "ASG_TITLE_LIGHT": - "ASG_TITLE", - The_GetSuffix (), - The_GetColorRows ()); + HTM_TD_Begin ("class=\"LT %s\"",The_GetColorRows ()); /* Exam title */ Exams->ExaCod = Exam->ExaCod; HTM_ARTICLE_Begin (Anchor); Frm_BeginForm (ActSeeExa); Exa_PutParams (Exams); - HTM_BUTTON_Submit_Begin (Txt_View_exam,"class=\"BT_LINK\""); + HTM_BUTTON_Submit_Begin (Txt_View_exam,"class=\"BT_LINK %s_%s\"", + Exam->Hidden ? "ASG_TITLE_LIGHT": + "ASG_TITLE", + The_GetSuffix ()); HTM_Txt (Exam->Title); HTM_BUTTON_End (); Frm_EndForm (); @@ -576,21 +572,17 @@ static void Exa_ShowOneExam (struct Exa_Exams *Exams, /***** Number of sessions in exam *****/ if (ShowOnlyThisExam) - HTM_TD_Begin ("class=\"RT %s_%s\"", - Exam->Hidden ? "ASG_TITLE_LIGHT": - "ASG_TITLE", - The_GetSuffix ()); + HTM_TD_Begin ("class=\"RT\""); else - HTM_TD_Begin ("class=\"RT %s_%s %s\"", - Exam->Hidden ? "ASG_TITLE_LIGHT": - "ASG_TITLE", - The_GetSuffix (), - The_GetColorRows ()); + HTM_TD_Begin ("class=\"RT %s\"",The_GetColorRows ()); Exams->ExaCod = Exam->ExaCod; Frm_BeginForm (ActSeeExa); Exa_PutParams (Exams); - HTM_BUTTON_Submit_Begin (Txt_Sessions,"class=\"BT_LINK\""); + HTM_BUTTON_Submit_Begin (Txt_Sessions,"class=\"BT_LINK %s_%s\"", + Exam->Hidden ? "ASG_TITLE_LIGHT": + "ASG_TITLE", + The_GetSuffix ()); if (ShowOnlyThisExam) HTM_TxtColonNBSP (Txt_Sessions); HTM_Unsigned (Exam->NumSess); diff --git a/swad_exam_session.c b/swad_exam_session.c index d61aad73..f04dcddf 100644 --- a/swad_exam_session.c +++ b/swad_exam_session.c @@ -514,11 +514,7 @@ static void ExaSes_ListOneOrMoreSessionsTitleGrps (struct Exa_Exams *Exams, extern const char *Txt_Play; extern const char *Txt_Resume; - HTM_TD_Begin ("class=\"LT %s_%s %s\"", - Session->Hidden ? "ASG_TITLE_LIGHT": - "ASG_TITLE", - The_GetSuffix (), - The_GetColorRows ()); + HTM_TD_Begin ("class=\"LT %s\"",The_GetColorRows ()); /***** Session title *****/ HTM_ARTICLE_Begin (Anchor); @@ -529,13 +525,23 @@ static void ExaSes_ListOneOrMoreSessionsTitleGrps (struct Exa_Exams *Exams, ExaSes_PutParamSesCod (Session->SesCod); HTM_BUTTON_Submit_Begin (Gbl.Usrs.Me.Role.Logged == Rol_STD ? Txt_Play : Txt_Resume, - "class=\"BT_LINK\""); + "class=\"BT_LINK %s_%s\"", + Session->Hidden ? "ASG_TITLE_LIGHT" : + "ASG_TITLE", + The_GetSuffix ()); HTM_Txt (Session->Title); HTM_BUTTON_End (); Frm_EndForm (); } else - HTM_Txt (Session->Title); + { + HTM_SPAN_Begin ("class=\"%s_%s\"", + Session->Hidden ? "ASG_TITLE_LIGHT" : + "ASG_TITLE", + The_GetSuffix ()); + HTM_Txt (Session->Title); + HTM_SPAN_End (); + } HTM_ARTICLE_End (); /***** Groups whose students can answer this exam session *****/ diff --git a/swad_game.c b/swad_game.c index 6665b1da..74a2c731 100644 --- a/swad_game.c +++ b/swad_game.c @@ -590,23 +590,19 @@ static void Gam_ShowOneGame (struct Gam_Games *Games, /***** Game title and main data *****/ if (ShowOnlyThisGame) - HTM_TD_Begin ("class=\"LT %s_%s\"", - Game->Hidden ? "ASG_TITLE_LIGHT": - "ASG_TITLE", - The_GetSuffix ()); + HTM_TD_Begin ("class=\"LT\""); else - HTM_TD_Begin ("class=\"LT %s_%s %s\"", - Game->Hidden ? "ASG_TITLE_LIGHT": - "ASG_TITLE", - The_GetSuffix (), - The_GetColorRows ()); + HTM_TD_Begin ("class=\"LT %s\"",The_GetColorRows ()); /* Game title */ Games->GamCod = Game->GamCod; HTM_ARTICLE_Begin (Anchor); Frm_BeginForm (ActSeeGam); Gam_PutParams (Games); - HTM_BUTTON_Submit_Begin (Txt_View_game,"class=\"BT_LINK\""); + HTM_BUTTON_Submit_Begin (Txt_View_game,"class=\"BT_LINK %s_%s\"", + Game->Hidden ? "ASG_TITLE_LIGHT": + "ASG_TITLE", + The_GetSuffix ()); HTM_Txt (Game->Title); HTM_BUTTON_End (); Frm_EndForm (); @@ -627,21 +623,17 @@ static void Gam_ShowOneGame (struct Gam_Games *Games, /***** Number of matches in game *****/ if (ShowOnlyThisGame) - HTM_TD_Begin ("class=\"RT %s_%s\"", - Game->Hidden ? "ASG_TITLE_LIGHT": - "ASG_TITLE", - The_GetSuffix ()); + HTM_TD_Begin ("class=\"RT\""); else - HTM_TD_Begin ("class=\"RT %s_%s %s\"", - Game->Hidden ? "ASG_TITLE_LIGHT": - "ASG_TITLE", - The_GetSuffix (), - The_GetColorRows ()); + HTM_TD_Begin ("class=\"RT %s\"",The_GetColorRows ()); Games->GamCod = Game->GamCod; Frm_BeginForm (ActSeeGam); Gam_PutParams (Games); - HTM_BUTTON_Submit_Begin (Txt_Matches,"class=\"BT_LINK\""); + HTM_BUTTON_Submit_Begin (Txt_Matches,"class=\"BT_LINK %s_%s\"", + Game->Hidden ? "ASG_TITLE_LIGHT": + "ASG_TITLE", + The_GetSuffix ()); if (ShowOnlyThisGame) HTM_TxtColonNBSP (Txt_Matches); HTM_Unsigned (Game->NumMchs); diff --git a/swad_project.c b/swad_project.c index e2fdda2a..72be2a88 100644 --- a/swad_project.c +++ b/swad_project.c @@ -1252,7 +1252,6 @@ static void Prj_ShowOneProject (struct Prj_Projects *Projects, bool ICanViewProjectFiles = Brw_CheckIfICanViewProjectFiles (Prj->PrjCod); const char *ClassLabel; const char *ClassDate; - const char *ClassTitle; const char *ClassData; struct Prj_Faults Faults; bool PrjIsFaulty; @@ -1264,8 +1263,6 @@ static void Prj_ShowOneProject (struct Prj_Projects *Projects, "ASG_LABEL"; ClassDate = (Prj->Hidden == Prj_HIDDEN) ? "DATE_BLUE_LIGHT" : "DATE_BLUE"; - ClassTitle = (Prj->Hidden == Prj_HIDDEN) ? "ASG_TITLE_LIGHT" : - "ASG_TITLE"; ClassData = (Prj->Hidden == Prj_HIDDEN) ? "DAT_LIGHT" : "DAT"; @@ -1322,11 +1319,11 @@ static void Prj_ShowOneProject (struct Prj_Projects *Projects, switch (ProjectView) { case Prj_LIST_PROJECTS: - HTM_TD_Begin ("id=\"%s\" class=\"%s LT %s\"", + HTM_TD_Begin ("id=\"%s\" class=\"LT %s %s\"", Id,ClassDate,The_GetColorRows ()); break; default: - HTM_TD_Begin ("id=\"%s\" class=\"%s LT\"", + HTM_TD_Begin ("id=\"%s\" class=\"LT %s\"", Id,ClassDate); break; } @@ -1361,12 +1358,10 @@ static void Prj_ShowOneProject (struct Prj_Projects *Projects, switch (ProjectView) { case Prj_LIST_PROJECTS: - HTM_TD_Begin ("class=\"LT %s_%s %s\"", - ClassTitle,The_GetSuffix (),The_GetColorRows ()); + HTM_TD_Begin ("class=\"LT %s\"",The_GetColorRows ()); break; default: - HTM_TD_Begin ("class=\"LT %s_%s\"", - ClassTitle,The_GetSuffix ()); + HTM_TD_Begin ("class=\"LT\""); break; } HTM_ARTICLE_Begin (Anchor); @@ -1377,7 +1372,10 @@ static void Prj_ShowOneProject (struct Prj_Projects *Projects, Frm_BeginForm (ActAdmDocPrj); Prj_PutCurrentParams (Projects); HTM_BUTTON_Submit_Begin (Txt_Project_files, - "class=\"BT_LINK\""); + "class=\"BT_LINK %s_%s\"", + Prj->Hidden == Prj_HIDDEN ? "ASG_TITLE_LIGHT" : + "ASG_TITLE", + The_GetSuffix ()); HTM_Txt (Prj->Title); HTM_BUTTON_End (); Frm_EndForm (); diff --git a/swad_survey.c b/swad_survey.c index 090c8120..cba1e3f2 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -529,12 +529,10 @@ static void Svy_ShowOneSurvey (struct Svy_Surveys *Surveys, /* Survey title */ if (ShowOnlyThisSvyComplete) - HTM_TD_Begin ("class=\"LT %s_%s\"", - Svy.Status.Visible ? "ASG_TITLE" : - "ASG_TITLE_LIGHT", - The_GetSuffix ()); + HTM_TD_Begin ("class=\"LT\""); else HTM_TD_Begin ("class=\"LT %s\"",The_GetColorRows ()); + HTM_ARTICLE_Begin (Anchor); Frm_BeginForm (ActSeeSvy); Svy_PutParamSvyCod (SvyCod); @@ -542,7 +540,10 @@ static void Svy_ShowOneSurvey (struct Svy_Surveys *Surveys, WhichGroups = Grp_GetParamWhichGroups (); Grp_PutParamWhichGroups (&WhichGroups); Pag_PutHiddenParamPagNum (Pag_SURVEYS,Surveys->CurrentPage); - HTM_BUTTON_Submit_Begin (Txt_View_survey,"class=\"BT_LINK\""); + HTM_BUTTON_Submit_Begin (Txt_View_survey,"class=\"BT_LINK %s_%s\"", + Svy.Status.Visible ? "ASG_TITLE" : + "ASG_TITLE_LIGHT", + The_GetSuffix ()); HTM_Txt (Svy.Title); HTM_BUTTON_End (); Frm_EndForm ();