diff --git a/swad_attendance.c b/swad_attendance.c index 7d276755..29a97191 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -1694,10 +1694,8 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr, struct Att_Event *Event) { extern const char *The_ClassDat[The_NUM_THEMES]; - extern const char *The_ClassDatStrong[The_NUM_THEMES]; - extern const char *The_ClassDatSmall[The_NUM_THEMES]; - extern const char *The_ClassDatSmallStrong[The_NUM_THEMES]; extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; static const char *ClassPhoto[PhoSha_NUM_SHAPES] = { [PhoSha_SHAPE_CIRCLE ] = "PHOTOC45x60", @@ -1764,9 +1762,10 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr, HTM_TD_End (); /***** Write number of student in the list *****/ - HTM_TD_Begin ("class=\"%s RT %s\"", - UsrDat->Accepted ? The_ClassDatStrong[Gbl.Prefs.Theme] : - The_ClassDat[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"RT %s_%s %s\"", + UsrDat->Accepted ? "DAT_STRONG" : + "DAT", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Unsigned (NumUsr); HTM_TD_End (); @@ -1782,17 +1781,19 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr, } /***** Write user's ID ******/ - HTM_TD_Begin ("class=\"%s %s LT\"", - UsrDat->Accepted ? The_ClassDatSmallStrong[Gbl.Prefs.Theme] : - The_ClassDatSmall[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"LT %s_%s %s\"", + UsrDat->Accepted ? "DAT_SMALL_STRONG" : + "DAT_SMALL", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); ID_WriteUsrIDs (UsrDat,NULL); HTM_TD_End (); /***** Write student's name *****/ - HTM_TD_Begin ("class=\"%s LT %s\"", - UsrDat->Accepted ? The_ClassDatSmallStrong[Gbl.Prefs.Theme] : - The_ClassDatSmall[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"LT %s_%s %s\"", + UsrDat->Accepted ? "DAT_SMALL_STRONG" : + "DAT_SMALL", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Txt (UsrDat->Surname1); if (UsrDat->Surname2[0]) @@ -1801,9 +1802,10 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr, HTM_TD_End (); /***** Student's comment: write form or text */ - HTM_TD_Begin ("class=\"%s LT %s\"", - UsrDat->Accepted ? The_ClassDatSmallStrong[Gbl.Prefs.Theme] : - The_ClassDatSmall[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"LT %s_%s %s\"", + UsrDat->Accepted ? "DAT_SMALL_STRONG" : + "DAT_SMALL", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); if (ICanEditStdComment) // Show with form { @@ -1823,9 +1825,10 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr, HTM_TD_End (); /***** Teacher's comment: write form, text or nothing */ - HTM_TD_Begin ("class=\"%s LT %s\"", - UsrDat->Accepted ? The_ClassDatSmallStrong[Gbl.Prefs.Theme] : - The_ClassDatSmall[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"LT %s_%s %s\"", + UsrDat->Accepted ? "DAT_SMALL_STRONG" : + "DAT_SMALL", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); if (ICanEditTchComment) // Show with form { @@ -2959,8 +2962,7 @@ static void Att_WriteRowUsrSeveralAttEvents (const struct Att_Events *Events, { extern const char *The_ClassDat[The_NUM_THEMES]; extern const char *The_ClassDatStrong[The_NUM_THEMES]; - extern const char *The_ClassDatSmall[The_NUM_THEMES]; - extern const char *The_ClassDatSmallStrong[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; static const char *ClassPhoto[PhoSha_NUM_SHAPES] = { [PhoSha_SHAPE_CIRCLE ] = "PHOTOC21x28", @@ -2993,17 +2995,19 @@ static void Att_WriteRowUsrSeveralAttEvents (const struct Att_Events *Events, } /***** Write user's ID ******/ - HTM_TD_Begin ("class=\"%s LM %s\"", - UsrDat->Accepted ? The_ClassDatSmallStrong[Gbl.Prefs.Theme] : - The_ClassDatSmall[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"LM %s_%s %s\"", + UsrDat->Accepted ? "DAT_SMALL_STRONG" : + "DAT_SMALL", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); ID_WriteUsrIDs (UsrDat,NULL); HTM_TD_End (); /***** Write user's name *****/ - HTM_TD_Begin ("class=\"%s LM %s\"", - UsrDat->Accepted ? The_ClassDatSmallStrong[Gbl.Prefs.Theme] : - The_ClassDatSmall[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"LM %s_%s %s\"", + UsrDat->Accepted ? "DAT_SMALL_STRONG" : + "DAT_SMALL", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Txt (UsrDat->Surname1); if (UsrDat->Surname2[0]) @@ -3127,8 +3131,6 @@ static void Att_ListAttEventsForAStd (const struct Att_Events *Events, { extern const char *The_ClassDat[The_NUM_THEMES]; extern const char *The_ClassDatStrong[The_NUM_THEMES]; - extern const char *The_ClassDatSmall[The_NUM_THEMES]; - extern const char *The_ClassDatSmallStrong[The_NUM_THEMES]; extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Student_comment; extern const char *Txt_Teachers_comment; @@ -3173,16 +3175,18 @@ static void Att_ListAttEventsForAStd (const struct Att_Events *Events, HTM_TR_Begin (NULL); /***** Write user's ID ******/ - HTM_TD_Begin ("class=\"%s LM\"", - UsrDat->Accepted ? The_ClassDatSmallStrong[Gbl.Prefs.Theme] : - The_ClassDatSmall[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LM %s_%s\"", + UsrDat->Accepted ? "DAT_SMALL_STRONG" : + "DAT_SMALL", + The_Colors[Gbl.Prefs.Theme]); ID_WriteUsrIDs (UsrDat,NULL); HTM_TD_End (); /***** Write student's name *****/ - HTM_TD_Begin ("class=\"%s LM\"", - UsrDat->Accepted ? The_ClassDatSmallStrong[Gbl.Prefs.Theme] : - The_ClassDatSmall[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"LM %s_%s\"", + UsrDat->Accepted ? "DAT_SMALL_STRONG" : + "DAT_SMALL", + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (UsrDat->Surname1); if (UsrDat->Surname2[0]) HTM_TxtF (" %s",UsrDat->Surname2); diff --git a/swad_changelog.h b/swad_changelog.h index 939a6866..f5b7241f 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.85.1 (2022-03-23)" +#define Log_PLATFORM_VERSION "SWAD 21.86 (2022-03-25)" #define CSS_FILE "swad21.85.1.css" #define JS_FILE "swad21.78.2.js" /* + Version 21.86: Mar 25, 2022 Working on design of dark theme. (323663 lines) Version 21.85.1: Mar 24, 2022 Working on design of dark theme. (323724 lines) Version 21.85: Mar 24, 2022 Working on design of dark theme. (323634 lines) Version 21.84: Mar 19, 2022 Code refactoring on row colors. (323626 lines) diff --git a/swad_exam_log.c b/swad_exam_log.c index 8180785f..b61ed2b0 100644 --- a/swad_exam_log.c +++ b/swad_exam_log.c @@ -214,11 +214,7 @@ static void ExaLog_LogUsrAgent (long LogCod,long PrnCod) void ExaLog_ShowExamLog (const struct ExaPrn_Print *Print) { - extern const char *The_ClassDatSmall[The_NUM_THEMES]; - extern const char *The_ClassDatSmallLight[The_NUM_THEMES]; - extern const char *The_ClassDatSmallStrong[The_NUM_THEMES]; - extern const char *The_ClassDatSmallGreen[The_NUM_THEMES]; - extern const char *The_ClassDatSmallRed[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Hits; extern const char *Txt_Click; extern const char *Txt_Date_and_time; @@ -247,11 +243,11 @@ void ExaLog_ShowExamLog (const struct ExaPrn_Print *Print) char *UserAgent; const char *Class[ExaLog_NUM_ACTIONS] = { - [ExaLog_UNKNOWN_ACTION ] = The_ClassDatSmallLight[Gbl.Prefs.Theme], - [ExaLog_START_EXAM ] = The_ClassDatSmallStrong[Gbl.Prefs.Theme], - [ExaLog_RESUME_EXAM ] = The_ClassDatSmallStrong[Gbl.Prefs.Theme], - [ExaLog_ANSWER_QUESTION] = The_ClassDatSmall[Gbl.Prefs.Theme], - [ExaLog_FINISH_EXAM ] = The_ClassDatSmallStrong[Gbl.Prefs.Theme], + [ExaLog_UNKNOWN_ACTION ] = "DAT_SMALL_LIGHT", + [ExaLog_START_EXAM ] = "DAT_SMALL_STRONG", + [ExaLog_RESUME_EXAM ] = "DAT_SMALL_STRONG", + [ExaLog_ANSWER_QUESTION] = "DAT_SMALL", + [ExaLog_FINISH_EXAM ] = "DAT_SMALL_STRONG", }; /***** Get print log from database *****/ @@ -322,9 +318,10 @@ void ExaLog_ShowExamLog (const struct ExaPrn_Print *Print) HTM_TR_Begin (NULL); /* Write number of click */ - HTM_TD_Begin ("class=\"%s %s RT\"", - UsrCouldAnswer ? The_ClassDatSmall[Gbl.Prefs.Theme] : - The_ClassDatSmallLight[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"RT %s_%s %s\"", + UsrCouldAnswer ? "DAT_SMALL" : + "DAT_SMALL_LIGHT", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Unsigned (NumClick + 1); HTM_TD_End (); @@ -332,9 +329,9 @@ void ExaLog_ShowExamLog (const struct ExaPrn_Print *Print) /* Write click time */ if (asprintf (&Id,"click_date_%u",NumClick) < 0) Err_NotEnoughMemoryExit (); - HTM_TD_Begin ("id=\"%s\" class=\"%s %s LT\"", + HTM_TD_Begin ("id=\"%s\" class=\"LT %s_%s %s\"", Id, - Class[Action], + Class[Action],The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); Dat_WriteLocalDateHMSFromUTC (Id,ClickTimeUTC, Gbl.Prefs.DateFormat,Dat_SEPARATOR_COMMA, @@ -343,30 +340,34 @@ void ExaLog_ShowExamLog (const struct ExaPrn_Print *Print) HTM_TD_End (); /* Write action */ - HTM_TD_Begin ("class=\"%s %s LT\"", - Class[Action],The_GetColorRows ()); + HTM_TD_Begin ("class=\"LT %s_%s %s\"", + Class[Action],The_Colors[Gbl.Prefs.Theme], + The_GetColorRows ()); HTM_Txt (Txt_EXAM_LOG_ACTIONS[Action]); HTM_TD_End (); /* Write number of question */ - HTM_TD_Begin ("class=\"%s %s RT\"", - Class[Action],The_GetColorRows ()); + HTM_TD_Begin ("class=\"RT %s_%s %s\"", + Class[Action],The_Colors[Gbl.Prefs.Theme], + The_GetColorRows ()); if (QstInd >= 0) HTM_Unsigned ((unsigned) QstInd + 1); HTM_TD_End (); /* Write if exam print was open and accesible to answer */ - HTM_TD_Begin ("class=\"%s %s CT\"", - UsrCouldAnswer ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CT %s_%s %s\"", + UsrCouldAnswer ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Txt (UsrCouldAnswer ? "✓" : "✗"); HTM_TD_End (); /* Write IP */ - HTM_TD_Begin ("class=\"%s %s LT\"", - Class[Action],The_GetColorRows ()); + HTM_TD_Begin ("class=\"LT %s_%s %s\"", + Class[Action],The_Colors[Gbl.Prefs.Theme], + The_GetColorRows ()); Length = strlen (IP); if (Length > 6) { @@ -384,8 +385,9 @@ void ExaLog_ShowExamLog (const struct ExaPrn_Print *Print) HTM_TD_End (); /* Write session id */ - HTM_TD_Begin ("class=\"%s %s LT\"", - Class[Action],The_GetColorRows ()); + HTM_TD_Begin ("class=\"LT %s_%s %s\"", + Class[Action],The_Colors[Gbl.Prefs.Theme], + The_GetColorRows ()); if (SessionId[0]) { Length = strlen (SessionId); @@ -406,8 +408,9 @@ void ExaLog_ShowExamLog (const struct ExaPrn_Print *Print) HTM_TD_End (); /* Write user agent (row[6]) */ - HTM_TD_Begin ("class=\"%s %s LT\"", - Class[Action],The_GetColorRows ()); + HTM_TD_Begin ("class=\"LT %s_%s %s\"", + Class[Action],The_Colors[Gbl.Prefs.Theme], + The_GetColorRows ()); if (UserAgent[0]) HTM_Txt (UserAgent); HTM_TD_End (); diff --git a/swad_exam_print.c b/swad_exam_print.c index 6323d589..37a0ff62 100644 --- a/swad_exam_print.c +++ b/swad_exam_print.c @@ -629,7 +629,7 @@ static void ExaPrn_ShowExamPrintToFillIt (struct Exa_Exams *Exams, static void ExaPrn_GetAndWriteDescription (long ExaCod) { - extern const char *The_ClassDatSmall[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; char Txt[Cns_MAX_BYTES_TEXT + 1]; /***** Get description from database *****/ @@ -639,8 +639,8 @@ static void ExaPrn_GetAndWriteDescription (long ExaCod) ALn_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links /***** Write description *****/ - HTM_DIV_Begin ("class=\"EXA_PRN_DESC %s\"", - The_ClassDatSmall[Gbl.Prefs.Theme]); + HTM_DIV_Begin ("class=\"EXA_PRN_DESC DAT_SMALL_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (Txt); HTM_DIV_End (); } diff --git a/swad_hierarchy.c b/swad_hierarchy.c index a2d738e7..d93c50ad 100644 --- a/swad_hierarchy.c +++ b/swad_hierarchy.c @@ -661,7 +661,7 @@ void Hie_ResetHierarchy (void) void Hie_GetAndWriteInsCtrDegAdminBy (long UsrCod,unsigned ColSpan) { - extern const char *The_ClassDatSmallNoBR[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_all_degrees; MYSQL_RES *mysql_res; MYSQL_ROW row; @@ -687,9 +687,9 @@ void Hie_GetAndWriteInsCtrDegAdminBy (long UsrCod,unsigned ColSpan) HTM_TD_End (); /***** Write institution, center, degree *****/ - HTM_TD_Begin ("colspan=\"%u\" class=\"%s %s LT\"", + HTM_TD_Begin ("colspan=\"%u\" class=\"LT DAT_SMALL_NOBR_%s %s\"", ColSpan - 1, - The_ClassDatSmallNoBR[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); /* Get next institution, center, degree */ diff --git a/swad_indicator.c b/swad_indicator.c index 60a2d014..edb9d924 100644 --- a/swad_indicator.c +++ b/swad_indicator.c @@ -537,9 +537,7 @@ static void Ind_ShowTableOfCoursesWithIndicators (const struct Ind_Indicators *I Ind_IndicatorsLayout_t IndicatorsLayout, unsigned NumCrss,MYSQL_RES *mysql_res) { - extern const char *The_ClassDatSmall[The_NUM_THEMES]; - extern const char *The_ClassDatSmallGreen[The_NUM_THEMES]; - extern const char *The_ClassDatSmallRed[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Degree; extern const char *Txt_Course; extern const char *Txt_Institutional_BR_code; @@ -710,32 +708,35 @@ static void Ind_ShowTableOfCoursesWithIndicators (const struct Ind_Indicators *I case Ind_INDICATORS_BRIEF: HTM_TR_Begin (NULL); - HTM_TD_Begin ("class=\"%s %s LM\"", - IndicatorsCrs.CourseAllOK ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - (IndicatorsCrs.CoursePartiallyOK ? The_ClassDatSmall[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme]), + HTM_TD_Begin ("class=\"LM %s_%s %s\"", + IndicatorsCrs.CourseAllOK ? "DAT_SMALL_GREEN" : + (IndicatorsCrs.CoursePartiallyOK ? "DAT_SMALL" : + "DAT_SMALL_RED"), + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Txt (row[0]); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s LM\"", - IndicatorsCrs.CourseAllOK ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - (IndicatorsCrs.CoursePartiallyOK ? The_ClassDatSmall[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme]), + HTM_TD_Begin ("class=\"LM %s_%s %s\"", + IndicatorsCrs.CourseAllOK ? "DAT_SMALL_GREEN" : + (IndicatorsCrs.CoursePartiallyOK ? "DAT_SMALL" : + "DAT_SMALL_RED"), + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Txt (row[1]); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s LM\"", - IndicatorsCrs.CourseAllOK ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - (IndicatorsCrs.CoursePartiallyOK ? The_ClassDatSmall[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme]), + HTM_TD_Begin ("class=\"LM %s_%s %s\"", + IndicatorsCrs.CourseAllOK ? "DAT_SMALL_GREEN" : + (IndicatorsCrs.CoursePartiallyOK ? "DAT_SMALL" : + "DAT_SMALL_RED"), + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Txt (row[3]); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s LM\"", - The_ClassDatSmall[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"LM DAT_SMALL_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_A_Begin ("href=\"%s/?crs=%ld&act=%ld\" target=\"_blank\"", Cfg_URL_SWAD_CGI,CrsCod,ActCod); @@ -744,79 +745,80 @@ static void Ind_ShowTableOfCoursesWithIndicators (const struct Ind_Indicators *I HTM_A_End (); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s RM\"", - IndicatorsCrs.CourseAllOK ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - (IndicatorsCrs.CoursePartiallyOK ? The_ClassDatSmall[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme]), + HTM_TD_Begin ("class=\"RM %s_%s %s\"", + IndicatorsCrs.CourseAllOK ? "DAT_SMALL_GREEN" : + (IndicatorsCrs.CoursePartiallyOK ? "DAT_SMALL" : + "DAT_SMALL_RED"), + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Unsigned (IndicatorsCrs.NumIndicators); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s CM\"", - The_ClassDatSmallGreen[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CM DAT_SMALL_GREEN_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); if (IndicatorsCrs.ThereIsSyllabus) HTM_Txt (Txt_YES); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s CM\"", - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CM DAT_SMALL_RED_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); if (!IndicatorsCrs.ThereIsSyllabus) HTM_Txt (Txt_NO); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s CM\"", - The_ClassDatSmallGreen[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CM DAT_SMALL_GREEN_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); if (IndicatorsCrs.ThereAreAssignments) HTM_Txt (Txt_YES); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s CM\"", - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CM DAT_SMALL_RED_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); if (!IndicatorsCrs.ThereAreAssignments) HTM_Txt (Txt_NO); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s CM\"", - The_ClassDatSmallGreen[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CM DAT_SMALL_GREEN_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); if (IndicatorsCrs.ThereIsOnlineTutoring) HTM_Txt (Txt_YES); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s CM\"", - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CM DAT_SMALL_RED_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); if (!IndicatorsCrs.ThereIsOnlineTutoring) HTM_Txt (Txt_NO); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s CM\"", - The_ClassDatSmallGreen[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CM DAT_SMALL_GREEN_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); if (IndicatorsCrs.ThereAreMaterials) HTM_Txt (Txt_YES); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s CM\"", - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CM DAT_SMALL_RED_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); if (!IndicatorsCrs.ThereAreMaterials) HTM_Txt (Txt_NO); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s CM\"", - The_ClassDatSmallGreen[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CM DAT_SMALL_GREEN_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); if (IndicatorsCrs.ThereIsAssessment) HTM_Txt (Txt_YES); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s CM\"", - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CM DAT_SMALL_RED_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); if (!IndicatorsCrs.ThereIsAssessment) HTM_Txt (Txt_NO); @@ -834,32 +836,35 @@ static void Ind_ShowTableOfCoursesWithIndicators (const struct Ind_Indicators *I HTM_TR_Begin (NULL); - HTM_TD_Begin ("class=\"%s %s LM\"", - IndicatorsCrs.CourseAllOK ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - (IndicatorsCrs.CoursePartiallyOK ? The_ClassDatSmall[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme]), + HTM_TD_Begin ("class=\"LM %s_%s %s\"", + IndicatorsCrs.CourseAllOK ? "DAT_SMALL_GREEN" : + (IndicatorsCrs.CoursePartiallyOK ? "DAT_SMALL" : + "DAT_SMALL_RED"), + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Txt (row[0]); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s LM\"", - IndicatorsCrs.CourseAllOK ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - (IndicatorsCrs.CoursePartiallyOK ? The_ClassDatSmall[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme]), + HTM_TD_Begin ("class=\"LM %s_%s %s\"", + IndicatorsCrs.CourseAllOK ? "DAT_SMALL_GREEN" : + (IndicatorsCrs.CoursePartiallyOK ? "DAT_SMALL" : + "DAT_SMALL_RED"), + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Txt (row[1]); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s LM\"", - IndicatorsCrs.CourseAllOK ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - (IndicatorsCrs.CoursePartiallyOK ? The_ClassDatSmall[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme]), + HTM_TD_Begin ("class=\"LM %s_%s %s\"", + IndicatorsCrs.CourseAllOK ? "DAT_SMALL_GREEN" : + (IndicatorsCrs.CoursePartiallyOK ? "DAT_SMALL" : + "DAT_SMALL_RED"), + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Txt (row[3]); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s LM\"", - The_ClassDatSmall[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"LM DAT_SMALL_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_A_Begin ("href=\"%s/?crs=%ld&act=%ld\" target=\"_blank\"", Cfg_URL_SWAD_CGI,CrsCod,ActCod); @@ -868,185 +873,201 @@ static void Ind_ShowTableOfCoursesWithIndicators (const struct Ind_Indicators *I HTM_A_End (); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s RM\"", - NumTchs != 0 ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"RM %s_%s %s\"", + NumTchs != 0 ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Unsigned (NumTchs); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s RM\"", - NumStds != 0 ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"RM %s_%s %s\"", + NumStds != 0 ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Unsigned (NumStds); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s RM\"", - IndicatorsCrs.CourseAllOK ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - (IndicatorsCrs.CoursePartiallyOK ? The_ClassDatSmall[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme]), + HTM_TD_Begin ("class=\"RM %s_%s %s\"", + IndicatorsCrs.CourseAllOK ? "DAT_SMALL_GREEN" : + (IndicatorsCrs.CoursePartiallyOK ? "DAT_SMALL" : + "DAT_SMALL_RED"), + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Unsigned (IndicatorsCrs.NumIndicators); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s CM\"", - The_ClassDatSmallGreen[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CM DAT_SMALL_GREEN_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); if (IndicatorsCrs.ThereIsSyllabus) HTM_Txt (Txt_YES); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s CM\"", - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CM DAT_SMALL_RED_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); if (!IndicatorsCrs.ThereIsSyllabus) HTM_Txt (Txt_NO); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s LM\"", - (IndicatorsCrs.SyllabusLecSrc != Inf_NONE) ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"LM %s_%s %s\"", + (IndicatorsCrs.SyllabusLecSrc != Inf_NONE) ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Txt (Txt_INFO_SRC_SHORT_TEXT[IndicatorsCrs.SyllabusLecSrc]); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s LM\"", - (IndicatorsCrs.SyllabusPraSrc != Inf_NONE) ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"LM %s_%s %s\"", + (IndicatorsCrs.SyllabusPraSrc != Inf_NONE) ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Txt (Txt_INFO_SRC_SHORT_TEXT[IndicatorsCrs.SyllabusPraSrc]); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s LM\"", - (IndicatorsCrs.TeachingGuideSrc != Inf_NONE) ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"LM %s_%s %s\"", + (IndicatorsCrs.TeachingGuideSrc != Inf_NONE) ? "DAT_SMALL_GREEN" : + "DAT_SMAL_RED", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Txt (Txt_INFO_SRC_SHORT_TEXT[IndicatorsCrs.TeachingGuideSrc]); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s CM\"", - The_ClassDatSmallGreen[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CM DAT_SMALL_GREEN_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); if (IndicatorsCrs.ThereAreAssignments) HTM_Txt (Txt_YES); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s CM\"", - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CM DAT_SMALL_RED_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); if (!IndicatorsCrs.ThereAreAssignments) HTM_Txt (Txt_NO); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s RM\"", - (IndicatorsCrs.NumAssignments != 0) ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"RM %s_%s %s\"", + (IndicatorsCrs.NumAssignments != 0) ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Unsigned (IndicatorsCrs.NumAssignments); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s RM\"", - (IndicatorsCrs.NumFilesAssignments != 0) ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"RM %s_%s %s\"", + (IndicatorsCrs.NumFilesAssignments != 0) ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Unsigned (IndicatorsCrs.NumFilesAssignments); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s RM\"", - (IndicatorsCrs.NumFilesWorks != 0) ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"RM %s_%s %s\"", + (IndicatorsCrs.NumFilesWorks != 0) ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Unsigned (IndicatorsCrs.NumFilesWorks); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s CM\"", - The_ClassDatSmallGreen[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CM DAT_SMALL_GREEN_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); if (IndicatorsCrs.ThereIsOnlineTutoring) HTM_Txt (Txt_YES); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s CM\"", - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CM DAT_SMALL_RED_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); if (!IndicatorsCrs.ThereIsOnlineTutoring) HTM_Txt (Txt_NO); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s RM\"", - (IndicatorsCrs.NumThreads != 0) ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"RM %s_%s %s RM\"", + (IndicatorsCrs.NumThreads != 0) ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Unsigned (IndicatorsCrs.NumThreads); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s RM\"", - (IndicatorsCrs.NumPosts != 0) ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"RM %s_%s %s\"", + (IndicatorsCrs.NumPosts != 0) ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Unsigned (IndicatorsCrs.NumPosts); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s RM\"", - (IndicatorsCrs.NumMsgsSentByTchs != 0) ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"RM %s_%s %s\"", + (IndicatorsCrs.NumMsgsSentByTchs != 0) ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Unsigned (IndicatorsCrs.NumMsgsSentByTchs); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s CM\"", - The_ClassDatSmallGreen[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CM DAT_SMALL_GREEN_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); if (IndicatorsCrs.ThereAreMaterials) HTM_Txt (Txt_YES); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s CM\"", - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CM DAT_SMALL_RED_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); if (!IndicatorsCrs.ThereAreMaterials) HTM_Txt (Txt_NO); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s RM\"", - (IndicatorsCrs.NumFilesInDocumentZones != 0) ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"RM %s_%s %s\"", + (IndicatorsCrs.NumFilesInDocumentZones != 0) ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Unsigned (IndicatorsCrs.NumFilesInDocumentZones); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s RM\"", - (IndicatorsCrs.NumFilesInSharedZones != 0) ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"RM %s_%s %s\"", + (IndicatorsCrs.NumFilesInSharedZones != 0) ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Unsigned (IndicatorsCrs.NumFilesInSharedZones); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s CM\"", - The_ClassDatSmallGreen[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CM DAT_SMALL_GREEN_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); if (IndicatorsCrs.ThereIsAssessment) HTM_Txt (Txt_YES); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s CM\"", - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CM DAT_SMALL_RED_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); if (!IndicatorsCrs.ThereIsAssessment) HTM_Txt (Txt_NO); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s LM\"", - (IndicatorsCrs.AssessmentSrc != Inf_NONE) ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"LM %s_%s %s\"", + (IndicatorsCrs.AssessmentSrc != Inf_NONE) ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Txt (Txt_INFO_SRC_SHORT_TEXT[IndicatorsCrs.AssessmentSrc]); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s %s LM\"", - (IndicatorsCrs.TeachingGuideSrc != Inf_NONE) ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"LM %s_%s %s\"", + (IndicatorsCrs.TeachingGuideSrc != Inf_NONE) ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Txt (Txt_INFO_SRC_SHORT_TEXT[IndicatorsCrs.TeachingGuideSrc]); HTM_TD_End (); diff --git a/swad_log.c b/swad_log.c index 5d9a6581..e3df430b 100644 --- a/swad_log.c +++ b/swad_log.c @@ -159,11 +159,7 @@ void Log_ShowLastClicks (void) void Log_GetAndShowLastClicks (void) { - extern const char *The_ClassDatSmall[The_NUM_THEMES]; - extern const char *The_ClassDatSmallBlue[The_NUM_THEMES]; - extern const char *The_ClassDatSmallGreen[The_NUM_THEMES]; - extern const char *The_ClassDatSmallRed[The_NUM_THEMES]; - extern const char *The_ClassDatSmallYellow[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Click; extern const char *Txt_ELAPSED_TIME; extern const char *Txt_Role; @@ -212,12 +208,12 @@ void Log_GetAndShowLastClicks (void) Action = Act_GetActionFromActCod (ActCod); /* Use a special color for this row depending on the action */ - ClassRow = (Act_GetBrowserTab (Action) == Act_DOWNLD_FILE) ? The_ClassDatSmallYellow[Gbl.Prefs.Theme] : + ClassRow = (Act_GetBrowserTab (Action) == Act_DOWNLD_FILE) ? "DAT_SMALL_YELLOW" : (ActCod == Act_GetActCod (ActLogIn ) || - ActCod == Act_GetActCod (ActLogInNew)) ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - (ActCod == Act_GetActCod (ActLogOut )) ? The_ClassDatSmallRed[Gbl.Prefs.Theme] : - (ActCod == Act_GetActCod (ActWebSvc )) ? The_ClassDatSmallBlue[Gbl.Prefs.Theme] : - The_ClassDatSmall[Gbl.Prefs.Theme]; + ActCod == Act_GetActCod (ActLogInNew)) ? "DAT_SMALL_GREEN" : + (ActCod == Act_GetActCod (ActLogOut )) ? "DAT_SMALL_RED" : + (ActCod == Act_GetActCod (ActWebSvc )) ? "DAT_SMALL_BLUE" : + "DAT_SMALL"; /* Compute elapsed time from last access */ if (sscanf (row[2],"%ld",&TimeDiff) != 1) @@ -241,36 +237,44 @@ void Log_GetAndShowLastClicks (void) /* Print table row */ HTM_TR_Begin (NULL); - HTM_TD_Begin ("class=\"LC_CLK %s\"",ClassRow); - HTM_Txt (row[0]); // Click + HTM_TD_Begin ("class=\"LC_CLK %s_%s\"", + ClassRow,The_Colors[Gbl.Prefs.Theme]); + HTM_Txt (row[0]); // Click HTM_TD_End (); - HTM_TD_Begin ("class=\"LC_TIM %s\"",ClassRow); // Elapsed time - Dat_WriteHoursMinutesSecondsFromSeconds (TimeDiff); + HTM_TD_Begin ("class=\"LC_TIM %s_%s\"", + ClassRow,The_Colors[Gbl.Prefs.Theme]); + Dat_WriteHoursMinutesSecondsFromSeconds (TimeDiff); // Elapsed time HTM_TD_End (); - HTM_TD_Begin ("class=\"LC_ROL %s\"",ClassRow); + HTM_TD_Begin ("class=\"LC_ROL %s_%s\"", + ClassRow,The_Colors[Gbl.Prefs.Theme]); HTM_Txt (Txt_ROLES_SINGUL_Abc[Rol_ConvertUnsignedStrToRole (row[3])][Usr_SEX_UNKNOWN]); // Role HTM_TD_End (); - HTM_TD_Begin ("class=\"LC_CTY %s\"",ClassRow); - HTM_Txt (Hie.Cty.Name[Gbl.Prefs.Language]); // Country + HTM_TD_Begin ("class=\"LC_CTY %s_%s\"", + ClassRow,The_Colors[Gbl.Prefs.Theme]); + HTM_Txt (Hie.Cty.Name[Gbl.Prefs.Language]); // Country HTM_TD_End (); - HTM_TD_Begin ("class=\"LC_INS %s\"",ClassRow); - HTM_Txt (Hie.Ins.ShrtName); // Institution + HTM_TD_Begin ("class=\"LC_INS %s_%s\"", + ClassRow,The_Colors[Gbl.Prefs.Theme]); + HTM_Txt (Hie.Ins.ShrtName); // Institution HTM_TD_End (); - HTM_TD_Begin ("class=\"LC_CTR %s\"",ClassRow); - HTM_Txt (Hie.Ctr.ShrtName); // Center + HTM_TD_Begin ("class=\"LC_CTR %s_%s\"", + ClassRow,The_Colors[Gbl.Prefs.Theme]); + HTM_Txt (Hie.Ctr.ShrtName); // Center HTM_TD_End (); - HTM_TD_Begin ("class=\"LC_DEG %s\"",ClassRow); - HTM_Txt (Hie.Deg.ShrtName); // Degree + HTM_TD_Begin ("class=\"LC_DEG %s_%s\"", + ClassRow,The_Colors[Gbl.Prefs.Theme]); + HTM_Txt (Hie.Deg.ShrtName); // Degree HTM_TD_End (); - HTM_TD_Begin ("class=\"LC_ACT %s\"",ClassRow); - HTM_Txt (Act_GetActionText (Action)); // Action + HTM_TD_Begin ("class=\"LC_ACT %s_%s\"", + ClassRow,The_Colors[Gbl.Prefs.Theme]); + HTM_Txt (Act_GetActionText (Action)); // Action HTM_TD_End (); HTM_TR_End (); diff --git a/swad_mail.c b/swad_mail.c index 2cf295a6..b980ed1b 100644 --- a/swad_mail.c +++ b/swad_mail.c @@ -802,9 +802,9 @@ void Mai_GetSelUsrsAndListEmails (void) static void Mai_ListEmails (__attribute__((unused)) void *Args) { extern const char *Hlp_COMMUNICATION_Email; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *The_ClassFormOutBoxBold[The_NUM_THEMES]; extern const char *The_ClassDat[The_NUM_THEMES]; - extern const char *The_ClassDatSmall[The_NUM_THEMES]; extern const char *Txt_Email_addresses; extern const char *Txt_X_users_who_have_email; extern const char *Txt_X_users_who_have_accepted_and_who_have_email; @@ -822,7 +822,7 @@ static void Mai_ListEmails (__attribute__((unused)) void *Args) Hlp_COMMUNICATION_Email,Box_NOT_CLOSABLE); /***** Begin list with users' email addresses *****/ - HTM_DIV_Begin ("class=\"%s CM\"",The_ClassDatSmall[Gbl.Prefs.Theme]); + HTM_DIV_Begin ("class=\"CM DAT_SMALL_%s\"",The_Colors[Gbl.Prefs.Theme]); /***** Initialize structure with user's data *****/ Usr_UsrDataConstructor (&UsrDat); diff --git a/swad_match.c b/swad_match.c index 4420f5db..e883a7c6 100644 --- a/swad_match.c +++ b/swad_match.c @@ -2720,8 +2720,7 @@ static void Mch_PutCheckboxResult (const struct Mch_Match *Match) static void Mch_PutIfAnswered (const struct Mch_Match *Match,bool Answered) { - extern const char *The_ClassDatSmallGreen[The_NUM_THEMES]; - extern const char *The_ClassDatSmallRed[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_View_my_answer; extern const char *Txt_MATCH_QUESTION_Answered; extern const char *Txt_MATCH_QUESTION_Unanswered; @@ -2739,7 +2738,8 @@ static void Mch_PutIfAnswered (const struct Mch_Match *Match,bool Answered) Frm_BeginForm (ActSeeMchAnsQstStd); Mch_PutParamMchCod (Match->MchCod); // Current match being played - if (asprintf (&Class,"BT_LINK %s",The_ClassDatSmallGreen[Gbl.Prefs.Theme]) < 0) // Background + if (asprintf (&Class,"BT_LINK DAT_SMALL_GREEN_%s", + The_Colors[Gbl.Prefs.Theme]) < 0) // Background Err_NotEnoughMemoryExit (); HTM_BUTTON_OnMouseDown_Begin (Txt_View_my_answer,Class); free (Class); @@ -2752,8 +2752,9 @@ static void Mch_PutIfAnswered (const struct Mch_Match *Match,bool Answered) } else { - HTM_DIV_Begin ("class=\"%s\"",Answered ? The_ClassDatSmallGreen[Gbl.Prefs.Theme] : - The_ClassDatSmallRed[Gbl.Prefs.Theme]); + HTM_DIV_Begin ("class=\"%s_%s\"",Answered ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + The_Colors[Gbl.Prefs.Theme]); HTM_TxtF ("", Answered ? "fas fa-check-circle" : "fas fa-exclamation-circle", diff --git a/swad_message.c b/swad_message.c index c63a0a3e..10e63f18 100644 --- a/swad_message.c +++ b/swad_message.c @@ -485,8 +485,7 @@ static void Msg_PutHiddenParamsSubjectAndContent (void) static void Msg_ShowOneUniqueRecipient (void) { - extern const char *The_ClassDatSmallNoBR[The_NUM_THEMES]; - extern const char *The_ClassDatSmallNoBRStrong[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; static const char *ClassPhoto[PhoSha_NUM_SHAPES] = { [PhoSha_SHAPE_CIRCLE ] = "PHOTOC21x28", @@ -501,16 +500,18 @@ static void Msg_ShowOneUniqueRecipient (void) false); /****** Write user's IDs ******/ - HTM_DIV_Begin ("class=\"MSG_TO_ONE_RCP %s\"", - Gbl.Usrs.Other.UsrDat.Accepted ? The_ClassDatSmallNoBRStrong[Gbl.Prefs.Theme] : - The_ClassDatSmallNoBR[Gbl.Prefs.Theme]); + HTM_DIV_Begin ("class=\"MSG_TO_ONE_RCP %s_%s\"", + Gbl.Usrs.Other.UsrDat.Accepted ? "DAT_SMALL_NOBR_STRONG" : + "DAT_SMALL_NOBR", + The_Colors[Gbl.Prefs.Theme]); ID_WriteUsrIDs (&Gbl.Usrs.Other.UsrDat,NULL); HTM_DIV_End (); /***** Write user's name *****/ - HTM_DIV_Begin ("class=\"MSG_TO_ONE_RCP %s\"", - Gbl.Usrs.Other.UsrDat.Accepted ? The_ClassDatSmallNoBRStrong[Gbl.Prefs.Theme] : - The_ClassDatSmallNoBR[Gbl.Prefs.Theme]); + HTM_DIV_Begin ("class=\"MSG_TO_ONE_RCP %s_%s\"", + Gbl.Usrs.Other.UsrDat.Accepted ? "DAT_SMALL_NOBR_STRONG" : + "DAT_SMALL_NOBR", + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (Gbl.Usrs.Other.UsrDat.FullName); HTM_DIV_End (); diff --git a/swad_photo.c b/swad_photo.c index a6bc09da..7ca94f3f 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -1062,8 +1062,7 @@ void Pho_BuildHTMLUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL, { extern const char *Rol_Icons[Rol_NUM_ROLES]; extern const char *The_ClassDatStrong[The_NUM_THEMES]; - extern const char *The_ClassDatSmall[The_NUM_THEMES]; - extern const char *The_ClassDatSmallStrong[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Following; extern const char *Txt_Followers; unsigned NumFollowing; @@ -1109,10 +1108,10 @@ void Pho_BuildHTMLUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL, /* Nickname */ if (UsrDat->Nickname[0]) { - if (asprintf (&Caption.Nick,"
%s: %s
", - The_ClassDatSmall[Gbl.Prefs.Theme], + HTM_TxtF ("%s: %s
", + The_Colors[Gbl.Prefs.Theme], Txt_Time_zone_used_in_the_calculation_of_these_statistics, BrowserTimeZone); break; @@ -2370,11 +2370,11 @@ static void Sta_ShowNumHitsPerHour (unsigned NumHits, static void Sta_WriteAccessHour (unsigned Hour,struct Sta_Hits *Hits,unsigned ColumnWidth) { - extern const char *The_ClassDatSmall[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; unsigned BarHeight; - HTM_TD_Begin ("class=\"%s CB\" style=\"width:%upx;\"", - The_ClassDatSmall[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CB DAT_SMALL_%s\" style=\"width:%upx;\"", + The_Colors[Gbl.Prefs.Theme], ColumnWidth); /* Draw bar with a height porportional to the number of clicks */ diff --git a/swad_survey.c b/swad_survey.c index 13b13337..819e9d1c 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -2747,7 +2747,7 @@ static void Svy_ListSvyQuestions (struct Svy_Surveys *Surveys, { extern const char *Hlp_ASSESSMENT_Surveys_questions; extern const char *The_ClassDat[The_NUM_THEMES]; - extern const char *The_ClassDatSmall[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Questions; extern const char *Txt_No_INDEX; extern const char *Txt_Type; @@ -2832,21 +2832,21 @@ static void Svy_ListSvyQuestions (struct Svy_Surveys *Surveys, } /* Write index of question inside survey */ - HTM_TD_Begin ("class=\"%s CT %s\"", - The_ClassDatSmall[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CT DAT_SMALL_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Unsigned (SvyQst.QstInd + 1); HTM_TD_End (); /* Write the question type (row[2]) */ - HTM_TD_Begin ("class=\"%s CT %s\"", - The_ClassDatSmall[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"CT DAT_SMALL_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); HTM_Txt (Txt_SURVEY_STR_ANSWER_TYPES[SvyQst.AnswerType]); HTM_TD_End (); /* Write the stem and the answers of this question */ - HTM_TD_Begin ("class=\"%s LT %s\"", + HTM_TD_Begin ("class=\"LT %s %s\"", The_ClassDat[Gbl.Prefs.Theme], The_GetColorRows ()); Svy_WriteQstStem (Stem); diff --git a/swad_tag.c b/swad_tag.c index dc6becb2..3092125a 100644 --- a/swad_tag.c +++ b/swad_tag.c @@ -509,7 +509,7 @@ static void Tag_PutIconDisable (long TagCod,const char *TagTxt) void Tag_GetAndWriteTagsQst (long QstCod) { - extern const char *The_ClassDatSmall[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_no_tags; unsigned NumTags; unsigned NumTag; @@ -519,8 +519,8 @@ void Tag_GetAndWriteTagsQst (long QstCod) if ((NumTags = Tag_DB_GetTagsQst (&mysql_res,QstCod))) { /***** Write the tags *****/ - HTM_UL_Begin ("class=\"Tst_TAG_LIST %s\"", - The_ClassDatSmall[Gbl.Prefs.Theme]); + HTM_UL_Begin ("class=\"Tst_TAG_LIST DAT_SMALL_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (NumTag = 0; NumTag < NumTags; NumTag++) @@ -534,8 +534,8 @@ void Tag_GetAndWriteTagsQst (long QstCod) } else { - HTM_SPAN_Begin ("class=\"%s\"", - The_ClassDatSmall[Gbl.Prefs.Theme]); + HTM_SPAN_Begin ("class=\"DAT_SMALL_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TxtF ("(%s)",Txt_no_tags); HTM_SPAN_End (); } diff --git a/swad_test_print.c b/swad_test_print.c index a1cc4c06..20fb2bd9 100644 --- a/swad_test_print.c +++ b/swad_test_print.c @@ -1650,15 +1650,15 @@ static void TstPrn_WriteTxtAnsPrint (struct UsrData *UsrDat, static void TstPrn_WriteHeadUserCorrect (struct UsrData *UsrDat) { - extern const char *The_ClassDatSmall[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_User[Usr_NUM_SEXS]; extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; - HTM_TD_Begin ("class=\"%s CM\"",The_ClassDatSmall[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"CM DAT_SMALL_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_Txt (Txt_User[UsrDat->Sex]); HTM_TD_End (); - HTM_TD_Begin ("class=\"%s CM\"",The_ClassDatSmall[Gbl.Prefs.Theme]); + HTM_TD_Begin ("class=\"CM DAT_SMALL_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_Txt (Txt_ROLES_PLURAL_Abc[Rol_TCH][Usr_SEX_UNKNOWN]); HTM_TD_End (); } diff --git a/swad_theme.c b/swad_theme.c index f06ed55f..21a14cc5 100644 --- a/swad_theme.c +++ b/swad_theme.c @@ -221,105 +221,6 @@ const char *The_ClassDatLight[The_NUM_THEMES] = [The_THEME_DARK ] = "DAT_LIGHT_DARK", }; -const char *The_ClassDatSmall[The_NUM_THEMES] = - { - [The_THEME_WHITE ] = "DAT_SMALL_WHITE", - [The_THEME_GREY ] = "DAT_SMALL_GREY", - [The_THEME_PURPLE] = "DAT_SMALL_PURPLE", - [The_THEME_BLUE ] = "DAT_SMALL_BLUE", - [The_THEME_YELLOW] = "DAT_SMALL_YELLOW", - [The_THEME_PINK ] = "DAT_SMALL_PINK", - [The_THEME_DARK ] = "DAT_SMALL_DARK", - }; - -const char *The_ClassDatSmallLight[The_NUM_THEMES] = - { - [The_THEME_WHITE ] = "DAT_SMALL_LIGHT_WHITE", - [The_THEME_GREY ] = "DAT_SMALL_LIGHT_GREY", - [The_THEME_PURPLE] = "DAT_SMALL_LIGHT_PURPLE", - [The_THEME_BLUE ] = "DAT_SMALL_LIGHT_BLUE", - [The_THEME_YELLOW] = "DAT_SMALL_LIGHT_YELLOW", - [The_THEME_PINK ] = "DAT_SMALL_LIGHT_PINK", - [The_THEME_DARK ] = "DAT_SMALL_LIGHT_DARK", - }; - -const char *The_ClassDatSmallStrong[The_NUM_THEMES] = - { - [The_THEME_WHITE ] = "DAT_SMALL_STRONG_WHITE", - [The_THEME_GREY ] = "DAT_SMALL_STRONG_GREY", - [The_THEME_PURPLE] = "DAT_SMALL_STRONG_PURPLE", - [The_THEME_BLUE ] = "DAT_SMALL_STRONG_BLUE", - [The_THEME_YELLOW] = "DAT_SMALL_STRONG_YELLOW", - [The_THEME_PINK ] = "DAT_SMALL_STRONG_PINK", - [The_THEME_DARK ] = "DAT_SMALL_STRONG_DARK", - }; - -const char *The_ClassDatSmallRed[The_NUM_THEMES] = - { - [The_THEME_WHITE ] = "DAT_SMALL_RED_WHITE", - [The_THEME_GREY ] = "DAT_SMALL_RED_GREY", - [The_THEME_PURPLE] = "DAT_SMALL_RED_PURPLE", - [The_THEME_BLUE ] = "DAT_SMALL_RED_BLUE", - [The_THEME_YELLOW] = "DAT_SMALL_RED_YELLOW", - [The_THEME_PINK ] = "DAT_SMALL_RED_PINK", - [The_THEME_DARK ] = "DAT_SMALL_RED_DARK", - }; - -const char *The_ClassDatSmallGreen[The_NUM_THEMES] = - { - [The_THEME_WHITE ] = "DAT_SMALL_GREEN_WHITE", - [The_THEME_GREY ] = "DAT_SMALL_GREEN_GREY", - [The_THEME_PURPLE] = "DAT_SMALL_GREEN_PURPLE", - [The_THEME_BLUE ] = "DAT_SMALL_GREEN_BLUE", - [The_THEME_YELLOW] = "DAT_SMALL_GREEN_YELLOW", - [The_THEME_PINK ] = "DAT_SMALL_GREEN_PINK", - [The_THEME_DARK ] = "DAT_SMALL_GREEN_DARK", - }; - -const char *The_ClassDatSmallBlue[The_NUM_THEMES] = - { - [The_THEME_WHITE ] = "DAT_SMALL_BLUE_WHITE", - [The_THEME_GREY ] = "DAT_SMALL_BLUE_GREY", - [The_THEME_PURPLE] = "DAT_SMALL_BLUE_PURPLE", - [The_THEME_BLUE ] = "DAT_SMALL_BLUE_BLUE", - [The_THEME_YELLOW] = "DAT_SMALL_BLUE_YELLOW", - [The_THEME_PINK ] = "DAT_SMALL_BLUE_PINK", - [The_THEME_DARK ] = "DAT_SMALL_BLUE_DARK", - }; - -const char *The_ClassDatSmallYellow[The_NUM_THEMES] = - { - [The_THEME_WHITE ] = "DAT_SMALL_YELLOW_WHITE", - [The_THEME_GREY ] = "DAT_SMALL_YELLOW_GREY", - [The_THEME_PURPLE] = "DAT_SMALL_YELLOW_PURPLE", - [The_THEME_BLUE ] = "DAT_SMALL_YELLOW_BLUE", - [The_THEME_YELLOW] = "DAT_SMALL_YELLOW_YELLOW", - [The_THEME_PINK ] = "DAT_SMALL_YELLOW_PINK", - [The_THEME_DARK ] = "DAT_SMALL_YELLOW_DARK", - }; - -const char *The_ClassDatSmallNoBR[The_NUM_THEMES] = - { - [The_THEME_WHITE ] = "DAT_SMALL_NOBR_WHITE", - [The_THEME_GREY ] = "DAT_SMALL_NOBR_GREY", - [The_THEME_PURPLE] = "DAT_SMALL_NOBR_PURPLE", - [The_THEME_BLUE ] = "DAT_SMALL_NOBR_BLUE", - [The_THEME_YELLOW] = "DAT_SMALL_NOBR_YELLOW", - [The_THEME_PINK ] = "DAT_SMALL_NOBR_PINK", - [The_THEME_DARK ] = "DAT_SMALL_NOBR_DARK", - }; - -const char *The_ClassDatSmallNoBRStrong[The_NUM_THEMES] = - { - [The_THEME_WHITE ] = "DAT_SMALL_NOBR_STRONG_WHITE", - [The_THEME_GREY ] = "DAT_SMALL_NOBR_STRONG_GREY", - [The_THEME_PURPLE] = "DAT_SMALL_NOBR_STRONG_PURPLE", - [The_THEME_BLUE ] = "DAT_SMALL_NOBR_STRONG_BLUE", - [The_THEME_YELLOW] = "DAT_SMALL_NOBR_STRONG_YELLOW", - [The_THEME_PINK ] = "DAT_SMALL_NOBR_STRONG_PINK", - [The_THEME_DARK ] = "DAT_SMALL_NOBR_STRONG_DARK", - }; - const char *The_ClassInput[The_NUM_THEMES] = { [The_THEME_WHITE ] = "INPUT_WHITE", diff --git a/swad_timetable.c b/swad_timetable.c index af914fb0..4e1081c8 100644 --- a/swad_timetable.c +++ b/swad_timetable.c @@ -1495,7 +1495,7 @@ static void Tmt_TimeTableDrawCellEdit (const struct Tmt_Timetable *Timetable, Tmt_IntervalType_t IntervalType,Tmt_ClassType_t ClassType, unsigned DurationNumIntervals,const char *Info) { - extern const char *The_ClassDatSmall[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Tmt_DB_ClassType[Tmt_NUM_CLASS_TYPES]; extern const char *Txt_TIMETABLE_CLASS_TYPES[Tmt_NUM_CLASS_TYPES]; @@ -1660,9 +1660,9 @@ static void Tmt_TimeTableDrawCellEdit (const struct Tmt_Timetable *Timetable, { /***** Info *****/ HTM_BR (); - HTM_LABEL_Begin ("for=\"TTInf%s\" class=\"%s\"", + HTM_LABEL_Begin ("for=\"TTInf%s\" class=\"DAT_SMALL_%s\"", CellStr, - The_ClassDatSmall[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (Txt_Info); HTM_LABEL_End (); HTM_INPUT_TEXT ("TTInf",Tmt_MAX_CHARS_INFO,Info, diff --git a/swad_user.c b/swad_user.c index 8a3947de..b56364bd 100644 --- a/swad_user.c +++ b/swad_user.c @@ -2153,8 +2153,6 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat, bool PutCheckBoxToSelectUsr,Rol_Role_t Role, struct SelectedUsrs *SelectedUsrs) { - extern const char *The_ClassDatSmall[The_NUM_THEMES]; - extern const char *The_ClassDatSmallStrong[The_NUM_THEMES]; extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Enrolment_confirmed; extern const char *Txt_Enrolment_not_confirmed; @@ -2228,9 +2226,10 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat, } /****** Write user's IDs ******/ - HTM_TD_Begin ("class=\"%s %s LM\"", - UsrDat->Accepted ? The_ClassDatSmallStrong[Gbl.Prefs.Theme] : - The_ClassDatSmall[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"LM %s_%s %s\"", + UsrDat->Accepted ? "DAT_SMALL_STRONG" : + "DAT_SMALL", + The_Colors[Gbl.Prefs.Theme], BgColor); ID_WriteUsrIDs (UsrDat,NULL); HTM_TD_End (); @@ -2254,7 +2253,7 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat, static void Usr_WriteRowGstAllData (struct UsrData *UsrDat) { - extern const char *The_ClassDatSmall[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; static const char *ClassPhoto[PhoSha_NUM_SHAPES] = { [PhoSha_SHAPE_CIRCLE ] = "PHOTOC21x28", @@ -2280,8 +2279,8 @@ static void Usr_WriteRowGstAllData (struct UsrData *UsrDat) } /****** Write user's ID ******/ - HTM_TD_Begin ("class=\"%s %s LM\"", - The_ClassDatSmall[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"LM DAT_SMALL_%s %s\"", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); ID_WriteUsrIDs (UsrDat,NULL); HTM_NBSP (); @@ -2346,8 +2345,6 @@ static void Usr_WriteRowGstAllData (struct UsrData *UsrDat) static void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames) { - extern const char *The_ClassDatSmall[The_NUM_THEMES]; - extern const char *The_ClassDatSmallStrong[The_NUM_THEMES]; extern const char *The_Colors[The_NUM_THEMES]; static const char *ClassPhoto[PhoSha_NUM_SHAPES] = { @@ -2378,9 +2375,10 @@ static void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames) } /****** Write user's ID ******/ - HTM_TD_Begin ("class=\"%s %s LM\"", - UsrDat->Accepted ? The_ClassDatSmallStrong[Gbl.Prefs.Theme] : - The_ClassDatSmall[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"LM %s_%s %s\"", + UsrDat->Accepted ? "DAT_SMALL_STRONG" : + "DAT_SMALL", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); ID_WriteUsrIDs (UsrDat,NULL); HTM_NBSP (); @@ -2460,8 +2458,6 @@ static void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames) static void Usr_WriteRowTchAllData (struct UsrData *UsrDat) { - extern const char *The_ClassDatSmall[The_NUM_THEMES]; - extern const char *The_ClassDatSmallStrong[The_NUM_THEMES]; extern const char *The_Colors[The_NUM_THEMES]; static const char *ClassPhoto[PhoSha_NUM_SHAPES] = { @@ -2490,9 +2486,10 @@ static void Usr_WriteRowTchAllData (struct UsrData *UsrDat) } /****** Write the user's ID ******/ - HTM_TD_Begin ("class=\"%s %s LM\"", - UsrDat->Accepted ? The_ClassDatSmallStrong[Gbl.Prefs.Theme] : - The_ClassDatSmall[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"LM %s_%s %s\"", + UsrDat->Accepted ? "DAT_SMALL_STRONG" : + "DAT_SMALL", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); ID_WriteUsrIDs (UsrDat,NULL); HTM_NBSP (); @@ -2544,8 +2541,6 @@ static void Usr_WriteRowTchAllData (struct UsrData *UsrDat) static void Usr_WriteRowAdmData (unsigned NumUsr,struct UsrData *UsrDat) { - extern const char *The_ClassDatSmall[The_NUM_THEMES]; - extern const char *The_ClassDatSmallStrong[The_NUM_THEMES]; extern const char *The_Colors[The_NUM_THEMES]; static const char *ClassPhoto[PhoSha_NUM_SHAPES] = { @@ -2577,9 +2572,10 @@ static void Usr_WriteRowAdmData (unsigned NumUsr,struct UsrData *UsrDat) } /****** Write the user's ID ******/ - HTM_TD_Begin ("class=\"%s %s LM\"", - UsrDat->Accepted ? The_ClassDatSmallStrong[Gbl.Prefs.Theme] : - The_ClassDatSmall[Gbl.Prefs.Theme], + HTM_TD_Begin ("class=\"LM %s_%s %s\"", + UsrDat->Accepted ? "DAT_SMALL_STRONG" : + "DAT_SMALL", + The_Colors[Gbl.Prefs.Theme], The_GetColorRows ()); ID_WriteUsrIDs (UsrDat,NULL); HTM_NBSP (); @@ -2657,18 +2653,15 @@ static void Usr_WriteUsrData (const char *BgColor, const char *Data,const char *Link, bool NonBreak,bool Accepted) { - extern const char *The_ClassDatSmall[The_NUM_THEMES]; - extern const char *The_ClassDatSmallStrong[The_NUM_THEMES]; - extern const char *The_ClassDatSmallNoBR[The_NUM_THEMES]; - extern const char *The_ClassDatSmallNoBRStrong[The_NUM_THEMES]; extern const char *The_Colors[The_NUM_THEMES]; /***** Begin table cell *****/ - HTM_TD_Begin ("class=\"%s LM %s\"", - Accepted ? (NonBreak ? The_ClassDatSmallNoBRStrong[Gbl.Prefs.Theme] : - The_ClassDatSmallStrong[Gbl.Prefs.Theme]) : - (NonBreak ? The_ClassDatSmallNoBR[Gbl.Prefs.Theme] : - The_ClassDatSmall[Gbl.Prefs.Theme]), + HTM_TD_Begin ("class=\"LM %s_%s %s\"", + Accepted ? (NonBreak ? "DAT_SMALL_NOBR_STRONG" : + "DAT_SMALL_STRONG") : + (NonBreak ? "DAT_SMALL_NOBR" : + "DAT_SMALL"), + The_Colors[Gbl.Prefs.Theme], BgColor); /***** Container to limit length *****/ @@ -2676,9 +2669,10 @@ static void Usr_WriteUsrData (const char *BgColor, /***** Begin link *****/ if (Link) - HTM_A_Begin ("href=\"%s\" class=\"%s\" target=\"_blank\"", - Link,Accepted ? The_ClassDatSmallNoBRStrong[Gbl.Prefs.Theme] : - The_ClassDatSmallNoBR[Gbl.Prefs.Theme]); + HTM_A_Begin ("href=\"%s\" class=\"%s_%s\" target=\"_blank\"", + Link,Accepted ? "DAT_SMALL_NOBR_STRONG" : + "DAT_SMALL_NOBR", + The_Colors[Gbl.Prefs.Theme]); /***** Write data *****/ HTM_Txt (Data);