From e24ac85083fafc821b976c66a932507c76d0aeda Mon Sep 17 00:00:00 2001 From: acanas Date: Mon, 28 Mar 2022 22:50:37 +0200 Subject: [PATCH] Version 21.86.7: Mar 26, 2022 Working on design of dark theme. --- css/{swad21.85.1.css => swad21.86.7.css} | 77 ++++++++++++++++++++++-- swad_changelog.h | 5 +- swad_course.c | 32 +++++----- swad_course_config.c | 20 +++--- swad_database.c | 4 +- swad_degree.c | 49 +++++++-------- swad_degree_config.c | 8 +-- swad_degree_type.c | 10 +-- swad_department.c | 26 ++++---- swad_duplicate.c | 6 +- swad_enrolment.c | 37 ++++++------ swad_forum.c | 10 +-- swad_message.c | 28 ++++++--- swad_message.h | 2 +- swad_notification.c | 28 +++++---- 15 files changed, 211 insertions(+), 131 deletions(-) rename css/{swad21.85.1.css => swad21.86.7.css} (98%) diff --git a/css/swad21.85.1.css b/css/swad21.86.7.css similarity index 98% rename from css/swad21.85.1.css rename to css/swad21.86.7.css index 910e31a3..f8fcb1b4 100644 --- a/css/swad21.85.1.css +++ b/css/swad21.86.7.css @@ -4252,10 +4252,37 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;} font-size:13pt; line-height:1.4; } -.MSG_TIT {color:#4d88a1; font-size:13pt;} -.MSG_TIT_NEW {color:#4d88a1; font-size:13pt; font-weight:bold;} -.MSG_TIT_REM {color:#afc4cc; font-size:13pt;} -.MSG_TIT_BG + +.MSG_TIT_WHITE, +.MSG_TIT_GREY, +.MSG_TIT_PURPLE, +.MSG_TIT_BLUE, +.MSG_TIT_YELLOW, +.MSG_TIT_PINK {font-size:13pt; color:#4d88a1;} +.MSG_TIT_DARK {font-size:13pt; color:#afc4cc;} + +.MSG_TIT_NEW_WHITE, +.MSG_TIT_NEW_GREY, +.MSG_TIT_NEW_PURPLE, +.MSG_TIT_NEW_BLUE, +.MSG_TIT_NEW_YELLOW, +.MSG_TIT_NEW_PINK {font-size:13pt; font-weight:bold; color:#4d88a1;} +.MSG_TIT_NEW_DARK {font-size:13pt; font-weight:bold; color:#afc4cc;} + +.MSG_TIT_REM_WHITE, +.MSG_TIT_REM_GREY, +.MSG_TIT_REM_PURPLE, +.MSG_TIT_REM_BLUE, +.MSG_TIT_REM_YELLOW, +.MSG_TIT_REM_PINK {font-size:13pt; color:#afc4cc;} +.MSG_TIT_REM_DARK {font-size:13pt; color:#4d88a1;} + +.MSG_TIT_BG_WHITE, +.MSG_TIT_BG_GREY, +.MSG_TIT_BG_PURPLE, +.MSG_TIT_BG_BLUE, +.MSG_TIT_BG_YELLOW, +.MSG_TIT_BG_PINK { background-image:-webkit-linear-gradient(#eaf3f6 0,#eaf3f6 80%,white 100%); /* Safari */ background-image:linear-gradient(#eaf3f6 0,#eaf3f6 80%,white 100%); @@ -4263,7 +4290,21 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;} color:#4d88a1; font-size:13pt; } -.MSG_TIT_BG_NEW +.MSG_TIT_BG_DARK + { + background-image:-webkit-linear-gradient(#eaf3f6 0,#eaf3f6 80%,white 100%); /* Safari */ + background-image:linear-gradient(#eaf3f6 0,#eaf3f6 80%,white 100%); + background-repeat:no-repeat; + color:#afc4cc; + font-size:13pt; + } + +.MSG_TIT_BG_NEW_WHITE, +.MSG_TIT_BG_NEW_GREY, +.MSG_TIT_BG_NEW_PURPLE, +.MSG_TIT_BG_NEW_BLUE, +.MSG_TIT_BG_NEW_YELLOW, +.MSG_TIT_BG_NEW_PINK { background-image:-webkit-linear-gradient(#f5ffd7 0,#f5ffd7 80%,white 100%); /* Safari */ background-image:linear-gradient(#f5ffd7 0,#f5ffd7 80%,white 100%); @@ -4272,7 +4313,22 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;} font-size:13pt; font-weight:bold; } -.MSG_TIT_BG_REM +.MSG_TIT_BG_NEW_DARK + { + background-image:-webkit-linear-gradient(#f5ffd7 0,#f5ffd7 80%,white 100%); /* Safari */ + background-image:linear-gradient(#f5ffd7 0,#f5ffd7 80%,white 100%); + background-repeat:no-repeat; + color:#afc4cc; + font-size:13pt; + font-weight:bold; + } + +.MSG_TIT_BG_REM_WHITE, +.MSG_TIT_BG_REM_GREY, +.MSG_TIT_BG_REM_PURPLE, +.MSG_TIT_BG_REM_BLUE, +.MSG_TIT_BG_REM_YELLOW, +.MSG_TIT_BG_REM_PINK { background-image:-webkit-linear-gradient(#f3fcff 0,#f3fcff 80%,white 100%); /* Safari */ background-image:linear-gradient(#f3fcff 0,#f3fcff 80%,white 100%); @@ -4280,6 +4336,15 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;} color:#afc4cc; font-size:13pt; } +.MSG_TIT_BG_REM_DARK + { + background-image:-webkit-linear-gradient(#f3fcff 0,#f3fcff 80%,white 100%); /* Safari */ + background-image:linear-gradient(#f3fcff 0,#f3fcff 80%,white 100%); + background-repeat:no-repeat; + color:#4d88a1; + font-size:13pt; + } + .MSG_AUT_BG { background-image:-webkit-linear-gradient(#eaf3f6 0,#eaf3f6 80%,white 100%); /* Safari */ diff --git a/swad_changelog.h b/swad_changelog.h index 12e10f0d..05e7516e 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.86.6 (2022-03-25)" -#define CSS_FILE "swad21.85.1.css" +#define Log_PLATFORM_VERSION "SWAD 21.86.7 (2022-03-28)" +#define CSS_FILE "swad21.86.7.css" #define JS_FILE "swad21.78.2.js" /* + Version 21.86.7: Mar 26, 2022 Working on design of dark theme. (323823 lines) Version 21.86.6: Mar 26, 2022 Working on design of dark theme. (323751 lines) Version 21.86.5: Mar 26, 2022 Working on design of dark theme. (323750 lines) Version 21.86.4: Mar 26, 2022 Working on design of dark theme. (323737 lines) diff --git a/swad_course.c b/swad_course.c index 605828a1..02278ea8 100644 --- a/swad_course.c +++ b/swad_course.c @@ -1138,7 +1138,7 @@ static void Crs_ListCoursesForEdition (void) static void Crs_ListCoursesOfAYearForEdition (unsigned Year) { - extern const char *The_ClassDat[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE]; extern const char *Txt_COURSE_STATUS[Hie_NUM_STATUS_TXT]; @@ -1183,12 +1183,12 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) HTM_TD_End (); /* Course code */ - HTM_TD_Begin ("class=\"%s CODE\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"DAT_%s CODE\"",The_Colors[Gbl.Prefs.Theme]); HTM_Long (Crs->CrsCod); HTM_TD_End (); /* Institutional code of the course */ - HTM_TD_Begin ("class=\"%s CM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"CM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); if (ICanEdit) { Frm_BeginForm (ActChgInsCrsCod); @@ -1204,7 +1204,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) HTM_TD_End (); /* Course year */ - HTM_TD_Begin ("class=\"%s CM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"CM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); if (ICanEdit) { Frm_BeginForm (ActChgCrsYea); @@ -1229,7 +1229,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) HTM_TD_End (); /* Course short name */ - HTM_TD_Begin ("class=\"%s LM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); if (ICanEdit) { Frm_BeginForm (ActRenCrsSho); @@ -1245,7 +1245,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) HTM_TD_End (); /* Course full name */ - HTM_TD_Begin ("class=\"%s LM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); if (ICanEdit) { Frm_BeginForm (ActRenCrsFul); @@ -1261,13 +1261,13 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) HTM_TD_End (); /* Current number of teachers in this course */ - HTM_TD_Begin ("class=\"%s RM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"RM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_Unsigned (NumUsrs[Rol_TCH] + NumUsrs[Rol_NET]); HTM_TD_End (); /* Current number of students in this course */ - HTM_TD_Begin ("class=\"%s RM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"RM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_Unsigned (NumUsrs[Rol_STD]); HTM_TD_End (); @@ -1276,8 +1276,8 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat, Usr_DONT_GET_PREFS, Usr_DONT_GET_ROLE_IN_CURRENT_CRS); - HTM_TD_Begin ("class=\"%s INPUT_REQUESTER LT\"", - The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"", + The_Colors[Gbl.Prefs.Theme]); Msg_WriteMsgAuthor (&UsrDat,true,NULL); HTM_TD_End (); @@ -1311,7 +1311,7 @@ static bool Crs_CheckIfICanEdit (struct Crs_Course *Crs) static void Crs_PutFormToCreateCourse (void) { - extern const char *The_ClassDat[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_New_course; extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE]; @@ -1386,23 +1386,23 @@ static void Crs_PutFormToCreateCourse (void) HTM_TD_End (); /***** Current number of teachers in this course *****/ - HTM_TD_Begin ("class=\"%s RM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"RM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_Unsigned (0); HTM_TD_End (); /***** Current number of students in this course *****/ - HTM_TD_Begin ("class=\"%s RM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"RM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_Unsigned (0); HTM_TD_End (); /***** Course requester *****/ - HTM_TD_Begin ("class=\"%s INPUT_REQUESTER LT\"", - The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"", + The_Colors[Gbl.Prefs.Theme]); Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true,NULL); HTM_TD_End (); /***** Course status *****/ - HTM_TD_Begin ("class=\"%s LM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); diff --git a/swad_course_config.c b/swad_course_config.c index 5db20f53..d8191604 100644 --- a/swad_course_config.c +++ b/swad_course_config.c @@ -207,7 +207,7 @@ static void CrsCfg_Title (bool PutLink) static void CrsCfg_Degree (bool PrintView,bool PutForm) { - extern const char *The_ClassDat[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Degree; unsigned NumDeg; @@ -221,7 +221,7 @@ static void CrsCfg_Degree (bool PrintView,bool PutForm) Txt_Degree); /* Data */ - HTM_TD_Begin ("class=\"%s LT\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LT DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); if (PutForm) { /* Get list of degrees of the current center */ @@ -297,7 +297,7 @@ static void CrsCfg_ShrtName (bool PutForm) static void CrsCfg_Year (bool PutForm) { - extern const char *The_ClassDat[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Year_OF_A_DEGREE; extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE]; @@ -313,7 +313,7 @@ static void CrsCfg_Year (bool PutForm) Txt_Year_OF_A_DEGREE); /* Data */ - HTM_TD_Begin ("class=\"%s LB\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LB DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); if (PutForm) { Frm_BeginForm (ActChgCrsYeaCfg); @@ -344,7 +344,7 @@ static void CrsCfg_Year (bool PutForm) static void CrsCfg_InstitutionalCode (bool PutForm) { - extern const char *The_ClassDat[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Institutional_code; @@ -357,7 +357,7 @@ static void CrsCfg_InstitutionalCode (bool PutForm) Txt_Institutional_code); /* Data */ - HTM_TD_Begin ("class=\"%s LB\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LB DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); if (PutForm) { Frm_BeginForm (ActChgInsCrsCodCfg); @@ -383,7 +383,7 @@ static void CrsCfg_InstitutionalCode (bool PutForm) static void CrsCfg_InternalCode (void) { - extern const char *The_ClassDat[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Internal_code; /***** Internal course code *****/ @@ -393,7 +393,7 @@ static void CrsCfg_InternalCode (void) Frm_LabelColumn ("RT",NULL,Txt_Internal_code); /* Data */ - HTM_TD_Begin ("class=\"%s LB\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LB DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_Long (Gbl.Hierarchy.Crs.CrsCod); HTM_TD_End (); @@ -424,7 +424,7 @@ static void CrsCfg_QR (void) static void CrsCfg_Indicators (void) { - extern const char *The_ClassDat[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Indicators; extern const char *Txt_of_PART_OF_A_TOTAL; struct Ind_IndicatorsCrs IndicatorsCrs; @@ -442,7 +442,7 @@ static void CrsCfg_Indicators (void) Frm_LabelColumn ("RT",NULL,Txt_Indicators); /* Data */ - HTM_TD_Begin ("class=\"%s LB\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LB DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); Frm_BeginForm (ActReqStaCrs); if (asprintf (&Title,"%u %s %u", IndicatorsCrs.NumIndicators, diff --git a/swad_database.c b/swad_database.c index 5608b306..3c53a18f 100644 --- a/swad_database.c +++ b/swad_database.c @@ -3728,9 +3728,9 @@ mysql> DESCRIBE usr_webs; static void DB_CreateTable (const char *Query) { - extern const char *The_ClassDat[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; - HTM_LI_Begin ("class=\"%s\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_LI_Begin ("class=\"DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_Txt (Query); HTM_LI_End (); diff --git a/swad_degree.c b/swad_degree.c index 7986e7f0..770c6de0 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -111,7 +111,7 @@ static void Deg_EditingDegreeDestructor (void); void Deg_SeeDegWithPendingCrss (void) { extern const char *Hlp_SYSTEM_Pending; - extern const char *The_ClassDat[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Degrees_with_pending_courses; extern const char *Txt_Degree; extern const char *Txt_Courses_ABBREVIATION; @@ -157,14 +157,14 @@ void Deg_SeeDegWithPendingCrss (void) HTM_TR_Begin (NULL); /* Degree logo and full name */ - HTM_TD_Begin ("class=\"%s NOWRAP LM %s\"", - The_ClassDat[Gbl.Prefs.Theme],BgColor); + HTM_TD_Begin ("class=\"LM DAT_%s NOWRAP %s\"", + The_Colors[Gbl.Prefs.Theme],BgColor); Deg_DrawDegreeLogoAndNameWithLink (&Deg,ActSeeCrs,"CM"); HTM_TD_End (); /* Number of pending courses (row[1]) */ - HTM_TD_Begin ("class=\"%s RM %s\"", - The_ClassDat[Gbl.Prefs.Theme],BgColor); + HTM_TD_Begin ("class=\"RM DAT_%s %s\"", + The_Colors[Gbl.Prefs.Theme],BgColor); HTM_Txt (row[1]); HTM_TD_End (); @@ -306,7 +306,7 @@ void Deg_ShowDegsOfCurrentCtr (void) static void Deg_ListDegreesForEdition (void) { - extern const char *The_ClassDat[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_DEGREE_STATUS[Hie_NUM_STATUS_TXT]; unsigned NumDeg; @@ -356,7 +356,7 @@ static void Deg_ListDegreesForEdition (void) HTM_TD_End (); /* Degree code */ - HTM_TD_Begin ("class=\"%s CODE\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"DAT_%s CODE\"",The_Colors[Gbl.Prefs.Theme]); HTM_Long (Deg->DegCod); HTM_TD_End (); @@ -366,7 +366,7 @@ static void Deg_ListDegreesForEdition (void) HTM_TD_End (); /* Degree short name */ - HTM_TD_Begin ("class=\"%s LM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); if (ICanEdit) { Frm_BeginForm (ActRenDegSho); @@ -382,7 +382,7 @@ static void Deg_ListDegreesForEdition (void) HTM_TD_End (); /* Degree full name */ - HTM_TD_Begin ("class=\"%s LM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); if (ICanEdit) { Frm_BeginForm (ActRenDegFul); @@ -398,7 +398,7 @@ static void Deg_ListDegreesForEdition (void) HTM_TD_End (); /* Degree type */ - HTM_TD_Begin ("class=\"%s LM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); if (ICanEdit) { Frm_BeginForm (ActChgDegTyp); @@ -429,7 +429,7 @@ static void Deg_ListDegreesForEdition (void) HTM_TD_End (); /* Degree WWW */ - HTM_TD_Begin ("class=\"%s LM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); if (ICanEdit) { Frm_BeginForm (ActChgDegWWW); @@ -444,10 +444,11 @@ static void Deg_ListDegreesForEdition (void) { Str_Copy (WWW,Deg->WWW,sizeof (WWW) - 1); HTM_DIV_Begin ("class=\"EXTERNAL_WWW_SHORT\""); - HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"%s\" title=\"%s\"", + HTM_A_Begin ("href=\"%s\" target=\"_blank\" title=\"%s\"" + " class=\"DAT_%s\"", Deg->WWW, - The_ClassDat[Gbl.Prefs.Theme], - Deg->WWW); + Deg->WWW, + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (WWW); HTM_A_End (); HTM_DIV_End (); @@ -455,12 +456,12 @@ static void Deg_ListDegreesForEdition (void) HTM_TD_End (); /* Number of courses in this degree */ - HTM_TD_Begin ("class=\"%s RM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"RM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_Unsigned (NumCrss); HTM_TD_End (); /* Number of users in courses of this degree */ - HTM_TD_Begin ("class=\"%s RM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"RM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_Unsigned (NumUsrsInCrssOfDeg); HTM_TD_End (); @@ -469,8 +470,8 @@ static void Deg_ListDegreesForEdition (void) Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat, Usr_DONT_GET_PREFS, Usr_DONT_GET_ROLE_IN_CURRENT_CRS); - HTM_TD_Begin ("class=\"%s INPUT_REQUESTER LT\"", - The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"", + The_Colors[Gbl.Prefs.Theme]); Msg_WriteMsgAuthor (&UsrDat,true,NULL); HTM_TD_End (); @@ -506,7 +507,7 @@ static bool Deg_CheckIfICanEditADegree (struct Deg_Degree *Deg) static void Deg_PutFormToCreateDegree (void) { - extern const char *The_ClassDat[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_New_degree; extern const char *Txt_Create_degree; @@ -589,23 +590,23 @@ static void Deg_PutFormToCreateDegree (void) HTM_TD_End (); /***** Number of courses in this degree *****/ - HTM_TD_Begin ("class=\"%s RM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"RM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_Unsigned (0); HTM_TD_End (); /***** Number of users in courses of this degree *****/ - HTM_TD_Begin ("class=\"%s RM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"RM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_Unsigned (0); HTM_TD_End (); /***** Degree requester *****/ - HTM_TD_Begin ("class=\"%s INPUT_REQUESTER LT\"", - The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"", + The_Colors[Gbl.Prefs.Theme]); Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true,NULL); HTM_TD_End (); /***** Degree status *****/ - HTM_TD_Begin ("class=\"%s LM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); diff --git a/swad_degree_config.c b/swad_degree_config.c index 9003d890..e6e3c8d4 100644 --- a/swad_degree_config.c +++ b/swad_degree_config.c @@ -201,7 +201,7 @@ static void DegCfg_Title (bool PutLink) static void DegCfg_Center (bool PrintView,bool PutForm) { - extern const char *The_ClassDat[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Center; unsigned NumCtr; @@ -215,7 +215,7 @@ static void DegCfg_Center (bool PrintView,bool PutForm) Txt_Center); /* Data */ - HTM_TD_Begin ("class=\"%s LB\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LB DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); if (PutForm) { /* Get list of centers of the current institution */ @@ -318,7 +318,7 @@ static void DegCfg_QR (void) static void DegCfg_NumCrss (void) { - extern const char *The_ClassDat[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Courses; extern const char *Txt_Courses_of_DEGREE_X; char *Title; @@ -331,7 +331,7 @@ static void DegCfg_NumCrss (void) Frm_LabelColumn ("RT",NULL,Txt_Courses); /* Data */ - HTM_TD_Begin ("class=\"%s LB\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LB DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); Frm_BeginFormGoTo (ActSeeCrs); Deg_PutParamDegCod (Gbl.Hierarchy.Deg.DegCod); if (asprintf (&Title,Txt_Courses_of_DEGREE_X,Gbl.Hierarchy.Deg.ShrtName) < 0) diff --git a/swad_degree_type.c b/swad_degree_type.c index fbfda9ec..276d6617 100644 --- a/swad_degree_type.c +++ b/swad_degree_type.c @@ -388,7 +388,7 @@ static void DegTyp_PutIconToEditDegTypes (__attribute__((unused)) void *Args) static void DegTyp_ListDegreeTypesForEdition (void) { - extern const char *The_ClassDat[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *The_ClassInput[The_NUM_THEMES]; unsigned NumDegTyp; @@ -416,7 +416,7 @@ static void DegTyp_ListDegreeTypesForEdition (void) HTM_TD_End (); /* Degree type code */ - HTM_TD_Begin ("class=\"%s CODE\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"DAT_%s CODE\"",The_Colors[Gbl.Prefs.Theme]); HTM_Long (Gbl.DegTypes.Lst[NumDegTyp].DegTypCod); HTM_TD_End (); @@ -433,7 +433,7 @@ static void DegTyp_ListDegreeTypesForEdition (void) HTM_TD_End (); /* Number of degrees of this type */ - HTM_TD_Begin ("class=\"%s RM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"RM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_Unsigned (Gbl.DegTypes.Lst[NumDegTyp].NumDegs); HTM_TD_End (); @@ -460,7 +460,7 @@ bool DegTyp_CheckIfICanCreateDegreeTypes (void) static void DegTyp_PutFormToCreateDegreeType (void) { - extern const char *The_ClassDat[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_New_type_of_degree; extern const char *Txt_Create_type_of_degree; @@ -496,7 +496,7 @@ static void DegTyp_PutFormToCreateDegreeType (void) HTM_TD_End (); /***** Number of degrees of this degree type ****/ - HTM_TD_Begin ("class=\"%s RM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"RM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_Unsigned (0); HTM_TD_End (); diff --git a/swad_department.c b/swad_department.c index 4cf88f02..2f2bb47b 100644 --- a/swad_department.c +++ b/swad_department.c @@ -99,7 +99,7 @@ static void Dpt_ResetDepartments (struct Dpt_Departments *Departments) void Dpt_SeeDepts (void) { extern const char *Hlp_INSTITUTION_Departments; - extern const char *The_ClassDat[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Departments_of_INSTITUTION_X; extern const char *Txt_DEPARTMENTS_HELP_ORDER[2]; extern const char *Txt_DEPARTMENTS_ORDER[2]; @@ -173,14 +173,14 @@ void Dpt_SeeDepts (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"LM\""); - HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"%s\"", + HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"DAT_%s\"", Departments.Lst[NumDpt].WWW, - The_ClassDat[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (Departments.Lst[NumDpt].FullName); HTM_A_End (); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s RM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"RM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_Unsigned (Departments.Lst[NumDpt].NumTchs); HTM_TD_End (); @@ -189,8 +189,8 @@ void Dpt_SeeDepts (void) /***** Separation row *****/ HTM_TR_Begin (NULL); - HTM_TD_Begin ("colspan=\"3\" class=\"%s\"", - The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("colspan=\"3\" class=\"DAT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_NBSP (); HTM_TD_End (); HTM_TR_End (); @@ -200,11 +200,11 @@ void Dpt_SeeDepts (void) HTM_TR_Begin (NULL); - HTM_TD_Begin ("class=\"%s LM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_Txt (Txt_Other_departments); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s RM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"RM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_Unsigned (NumTchsInsInOtherDpts); HTM_TD_End (); @@ -215,11 +215,11 @@ void Dpt_SeeDepts (void) HTM_TR_Begin (NULL); - HTM_TD_Begin ("class=\"%s LM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_Txt (Txt_Department_unspecified); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s RM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"RM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_Unsigned (NumTchsInsWithNoDpt); HTM_TD_End (); @@ -445,7 +445,7 @@ void Dpt_FreeListDepartments (struct Dpt_Departments *Departments) static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departments) { - extern const char *The_ClassDat[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Another_institution; unsigned NumDpt; @@ -482,7 +482,7 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm HTM_TD_End (); /* Department code */ - HTM_TD_Begin ("class=\"%s RM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"RM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_TxtF ("%ld ",Dpt->DptCod); HTM_TD_End (); @@ -540,7 +540,7 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm HTM_TD_End (); /* Number of teachers */ - HTM_TD_Begin ("class=\"%s RM\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"RM DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_Unsigned (Dpt->NumTchs); HTM_TD_End (); diff --git a/swad_duplicate.c b/swad_duplicate.c index 09c5f9bb..fbf4bfb0 100644 --- a/swad_duplicate.c +++ b/swad_duplicate.c @@ -107,7 +107,7 @@ void Dup_PutLinkToListDupUsrs (void) void Dup_ListDuplicateUsrs (void) { extern const char *Hlp_USERS_Duplicates_possibly_duplicate_users; - extern const char *The_ClassDat[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Possibly_duplicate_users; extern const char *Txt_Informants; MYSQL_RES *mysql_res; @@ -167,9 +167,9 @@ void Dup_ListDuplicateUsrs (void) The_GetColorRows ()); HTM_TD_End (); - HTM_TD_Begin ("colspan=\"%u\" class=\"%s LM %s\"", + HTM_TD_Begin ("colspan=\"%u\" class=\"LM DAT_%s %s\"", Usr_NUM_MAIN_FIELDS_DATA_USR - 2, - The_ClassDat[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); /* Write number of informants (row[1]) if greater than 1 */ diff --git a/swad_enrolment.c b/swad_enrolment.c index c15460e0..9f9b95f6 100644 --- a/swad_enrolment.c +++ b/swad_enrolment.c @@ -2072,7 +2072,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected) { extern const char *Hlp_USERS_Requests; extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassDat[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Enrolment_requests; extern const char *Txt_Scope; extern const char *Txt_Users; @@ -2151,7 +2151,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected) Frm_LabelColumn ("RT","Role",Txt_Users); - HTM_TD_Begin ("class=\"%s LT\"",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LT DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); Rol_WriteSelectorRoles (1 << Rol_STD | 1 << Rol_NET | 1 << Rol_TCH, @@ -2223,13 +2223,13 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected) HTM_TR_Begin (NULL); /***** Number *****/ - HTM_TD_Begin ("class=\"%s RT\"", - The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"RT DAT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_Unsigned (NumReqs - NumReq); HTM_TD_End (); /***** Link to course *****/ - HTM_TD_Begin ("%s LT",The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("LT DAT_%s",The_Colors[Gbl.Prefs.Theme]); Crs_GetDataOfCourseByCod (&Crs); Deg.DegCod = Crs.DegCod; @@ -2247,41 +2247,40 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected) HTM_TD_End (); /***** Number of teachers in the course *****/ - HTM_TD_Begin ("class=\"%s RT\"", - The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"RT DAT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_Unsigned (Enr_GetNumUsrsInCrss (HieLvl_CRS,Crs.CrsCod, 1 << Rol_TCH)); HTM_TD_End (); /***** User photo *****/ - HTM_TD_Begin ("class=\"%s CT\" style=\"width:22px;\"", - The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"CT DAT_%s\" style=\"width:22px;\"", + The_Colors[Gbl.Prefs.Theme]); Pho_ShowUsrPhotoIfAllowed (&UsrDat, ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM, false); HTM_TD_End (); /***** User name *****/ - HTM_TD_Begin ("class=\"%s LT\"", - The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LT DAT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_DIV_Begin ("class=\"REQUESTER_NAME\""); // Limited width Usr_WriteFirstNameBRSurnames (&UsrDat); HTM_DIV_End (); HTM_TD_End (); /***** Requested role (row[3]) *****/ - HTM_TD_Begin ("class=\"%s LT\"", - The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LT DAT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (Txt_ROLES_SINGUL_abc[DesiredRole][UsrDat.Sex]); HTM_TD_End (); /***** Request time (row[4]) *****/ - Msg_WriteMsgDate (Dat_GetUNIXTimeFromStr (row[4]), - The_ClassDat[Gbl.Prefs.Theme]); + Msg_WriteMsgDate (Dat_GetUNIXTimeFromStr (row[4]),"DAT"); /***** Button to confirm the request *****/ - HTM_TD_Begin ("class=\"%s LT\"", - The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LT DAT_%s\"", + The_Colors[Gbl.Prefs.Theme]); if (!NextAction[DesiredRole]) Err_WrongRoleExit (); Frm_BeginForm (NextAction[DesiredRole]); @@ -2292,8 +2291,8 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected) HTM_TD_End (); /***** Button to reject the request *****/ - HTM_TD_Begin ("class=\"%s LT\"", - The_ClassDat[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LT DAT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_BeginForm (ActReqRejSignUp); Crs_PutParamCrsCod (Crs.CrsCod); Usr_PutParamUsrCodEncrypted (UsrDat.EnUsrCod); diff --git a/swad_forum.c b/swad_forum.c index 9ab888df..c224e39a 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -863,6 +863,7 @@ static void For_ShowAForumPost (struct For_Forums *Forums, bool LastPst,char LastSubject[Cns_MAX_BYTES_SUBJECT + 1], bool NewPst,bool ICanModerateForum) { + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_MSG_New; extern const char *Txt_MSG_Open; extern const char *Txt_no_subject; @@ -901,9 +902,10 @@ static void For_ShowAForumPost (struct For_Forums *Forums, HTM_TR_Begin (NULL); /***** Put an icon with post status *****/ - HTM_TD_Begin ("class=\"CONTEXT_COL %s\"", + HTM_TD_Begin ("class=\"CONTEXT_COL %s_%s\"", NewPst ? "MSG_TIT_BG_NEW" : - "MSG_TIT_BG"); + "MSG_TIT_BG", + The_Colors[Gbl.Prefs.Theme]); Ico_PutIcon (NewPst ? "envelope.svg" : "envelope-open-text.svg", Ico_BLACK, @@ -920,8 +922,8 @@ static void For_ShowAForumPost (struct For_Forums *Forums, "MSG_TIT_BG"); /***** Write subject *****/ - HTM_TD_Begin ("class=\"%s LT\"",NewPst ? "MSG_TIT_BG_NEW" : - "MSG_TIT_BG"); + HTM_TD_Begin ("class=\"LT DAT_%s\"",NewPst ? "MSG_TIT_BG_NEW" : + "MSG_TIT_BG"); if (Enabled) { if (Subject[0]) diff --git a/swad_message.c b/swad_message.c index a635b536..a70e7872 100644 --- a/swad_message.c +++ b/swad_message.c @@ -2023,6 +2023,7 @@ static void Msg_GetMsgContent (long MsgCod, static void Msg_ShowASentOrReceivedMessage (struct Msg_Messages *Messages, long MsgNum,long MsgCod) { + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_MSG_Replied; extern const char *Txt_MSG_Not_replied; extern const char *Txt_MSG_Unopened; @@ -2149,7 +2150,7 @@ static void Msg_ShowASentOrReceivedMessage (struct Msg_Messages *Messages, HTM_TD_End (); /***** Write "From:" *****/ - HTM_TD_Begin ("class=\"RT MSG_TIT\""); + HTM_TD_Begin ("class=\"RT MSG_TIT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_TxtColonNBSP (Txt_MSG_From); HTM_TD_End (); @@ -2162,7 +2163,7 @@ static void Msg_ShowASentOrReceivedMessage (struct Msg_Messages *Messages, /***** Write "To:" *****/ HTM_TR_Begin (NULL); - HTM_TD_Begin ("class=\"RT MSG_TIT\""); + HTM_TD_Begin ("class=\"RT MSG_TIT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_TxtColonNBSP (Txt_MSG_To); HTM_TD_End (); @@ -2181,7 +2182,7 @@ static void Msg_ShowASentOrReceivedMessage (struct Msg_Messages *Messages, Msg_GetMsgContent (MsgCod,Content,&Media); /***** Write "Content:" *****/ - HTM_TD_Begin ("class=\"RT MSG_TIT\""); + HTM_TD_Begin ("class=\"RT MSG_TIT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_TxtColonNBSP (Txt_MSG_Content); HTM_TD_End (); @@ -2252,9 +2253,12 @@ void Msg_GetNotifMessage (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1], void Msg_WriteMsgNumber (unsigned long MsgNum,bool NewMsg) { - HTM_TD_Begin ("class=\"%s CT\" style=\"width:45px;\"", + extern const char *The_Colors[The_NUM_THEMES]; + + HTM_TD_Begin ("class=\"CT %s_%s\" style=\"width:45px;\"", NewMsg ? "MSG_TIT_BG_NEW" : - "MSG_TIT_BG"); + "MSG_TIT_BG", + The_Colors[Gbl.Prefs.Theme]); HTM_TxtF ("%lu:",MsgNum); HTM_TD_End (); } @@ -2267,13 +2271,16 @@ static void Msg_WriteSentOrReceivedMsgSubject (struct Msg_Messages *Messages, long MsgCod,const char *Subject, bool Open,bool Expanded) { + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Hide_message; extern const char *Txt_See_message; extern const char *Txt_no_subject; /***** Begin cell *****/ - HTM_TD_Begin ("class=\"%s LT\"",Open ? "MSG_TIT MSG_TIT_BG" : - "MSG_TIT_NEW MSG_TIT_BG_NEW"); + HTM_TD_Begin ("class=\"LT %s_%s\"", + Open ? "MSG_TIT_BG" : + "MSG_TIT_BG_NEW", + The_Colors[Gbl.Prefs.Theme]); /***** Begin form to expand/contract the message *****/ Frm_BeginForm (Messages->TypeOfMessages == Msg_RECEIVED ? (Expanded ? ActConRcvMsg : @@ -2714,8 +2721,9 @@ static void Msg_WriteMsgTo (struct Msg_Messages *Messages,long MsgCod) /*****************************************************************************/ // TimeUTC holds UTC date and time in UNIX format (seconds since 1970) -void Msg_WriteMsgDate (time_t TimeUTC,const char *ClassBackground) +void Msg_WriteMsgDate (time_t TimeUTC,const char *Class) { + extern const char *The_Colors[The_NUM_THEMES]; static unsigned UniqueId = 0; char *Id; @@ -2724,8 +2732,8 @@ void Msg_WriteMsgDate (time_t TimeUTC,const char *ClassBackground) Err_NotEnoughMemoryExit (); /***** Begin cell *****/ - HTM_TD_Begin ("id=\"%s\" class=\"%s RT\" style=\"width:106px;\"", - Id,ClassBackground); + HTM_TD_Begin ("id=\"%s\" class=\"RT %s_%s\" style=\"width:106px;\"", + Id,Class,The_Colors[Gbl.Prefs.Theme]); /***** Write date and time *****/ Dat_WriteLocalDateHMSFromUTC (Id,TimeUTC, diff --git a/swad_message.h b/swad_message.h index ffa62692..4b7e80d8 100644 --- a/swad_message.h +++ b/swad_message.h @@ -114,7 +114,7 @@ void Msg_GetNotifMessage (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1], void Msg_WriteMsgNumber (unsigned long MsgNum,bool NewMsg); void Msg_WriteMsgAuthor (struct UsrData *UsrDat,bool Enabled,const char *BgColor); -void Msg_WriteMsgDate (time_t TimeUTC,const char *ClassBackground); +void Msg_WriteMsgDate (time_t TimeUTC,const char *Class); void Msg_WriteMsgContent (char Content[Cns_MAX_BYTES_LONG_TEXT + 1], bool InsertLinks,bool ChangeBRToRet); diff --git a/swad_notification.c b/swad_notification.c index 6690b4dd..3a5ef0bb 100644 --- a/swad_notification.c +++ b/swad_notification.c @@ -312,7 +312,7 @@ static void Ntf_GetParamsNotifyEvents (void); void Ntf_ShowMyNotifications (void) { extern const char *Hlp_START_Notifications; - extern const char *The_ClassDat[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Settings; extern const char *Txt_Domains; extern const char *Txt_Mark_all_NOTIFICATIONS_as_read; @@ -347,7 +347,7 @@ void Ntf_ShowMyNotifications (void) Ntf_StatusTxt_t StatusTxt; char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1]; char *ContentStr; - const char *ClassBackground; + const char *Class; const char *ClassText; const char *ClassLink; const char *ClassAuthorBg; @@ -454,7 +454,7 @@ void Ntf_ShowMyNotifications (void) if (Status & Ntf_STATUS_BIT_REMOVED) // The source of the notification was removed { - ClassBackground = "MSG_TIT_BG_REM"; + Class = "MSG_TIT_BG_REM"; ClassText = "MSG_TIT_REM"; ClassLink = "BT_LINK MSG_TIT_REM"; ClassAuthorBg = "MSG_AUT_BG_REM"; @@ -462,7 +462,7 @@ void Ntf_ShowMyNotifications (void) } else if (Status & Ntf_STATUS_BIT_READ) // I have already seen the source of the notification { - ClassBackground = "MSG_TIT_BG"; + Class = "MSG_TIT_BG"; ClassText = "MSG_TIT"; ClassLink = "BT_LINK LT MSG_TIT"; ClassAuthorBg = "MSG_AUT_BG"; @@ -470,7 +470,7 @@ void Ntf_ShowMyNotifications (void) } else // I have not seen the source of the notification { - ClassBackground = "MSG_TIT_BG_NEW"; + Class = "MSG_TIT_BG_NEW"; ClassText = "MSG_TIT_NEW"; ClassLink = "BT_LINK LT MSG_TIT_NEW"; ClassAuthorBg = "MSG_AUT_BG_NEW"; @@ -481,7 +481,8 @@ void Ntf_ShowMyNotifications (void) /* Write event icon */ HTM_TR_Begin (NULL); - HTM_TD_Begin ("class=\"%s LT\" style=\"width:25px;\"",ClassBackground); + HTM_TD_Begin ("class=\"LT %s_%s\" style=\"width:25px;\"", + Class,The_Colors[Gbl.Prefs.Theme]); if (PutLink) PutLink = Ntf_StartFormGoToAction (NotifyEvent,Hie.Crs.CrsCod,&UsrDat,Cod,&Forums); @@ -497,7 +498,8 @@ void Ntf_ShowMyNotifications (void) HTM_TD_End (); /* Write event type */ - HTM_TD_Begin ("class=\"%s LT\"",ClassBackground); + HTM_TD_Begin ("class=\"LT %s_%s\"", + Class,The_Colors[Gbl.Prefs.Theme]); if (PutLink) { PutLink = Ntf_StartFormGoToAction (NotifyEvent,Hie.Crs.CrsCod,&UsrDat,Cod,&Forums); @@ -521,7 +523,8 @@ void Ntf_ShowMyNotifications (void) HTM_TD_End (); /* Write location */ - HTM_TD_Begin ("class=\"%s LT\"",ClassBackground); + HTM_TD_Begin ("class=\"LT %s_%s\"", + Class,The_Colors[Gbl.Prefs.Theme]); if (NotifyEvent == Ntf_EVENT_FORUM_POST_COURSE || NotifyEvent == Ntf_EVENT_FORUM_REPLY) { @@ -575,10 +578,11 @@ void Ntf_ShowMyNotifications (void) HTM_TD_End (); /* Write date and time */ - Msg_WriteMsgDate (DateTimeUTC,ClassBackground); + Msg_WriteMsgDate (DateTimeUTC,Class); /* Write status (sent by email / pending to be sent by email) */ - HTM_TD_Begin ("class=\"%s LT\"",ClassBackground); + HTM_TD_Begin ("class=\"LT %s_%s\"", + Class,The_Colors[Gbl.Prefs.Theme]); HTM_Txt (Txt_NOTIFICATION_STATUS[StatusTxt]); HTM_TD_End (); @@ -597,9 +601,9 @@ void Ntf_ShowMyNotifications (void) HTM_TD_Begin ("colspan=\"2\""); HTM_TD_End (); - HTM_TD_Begin ("colspan=\"4\" class=\"%s LT\"" + HTM_TD_Begin ("colspan=\"4\" class=\"LT DAT_%s\"" " style=\"padding-bottom:12px;\"", - The_ClassDat[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (SummaryStr); HTM_TD_End ();