Version 21.91.1: Apr 05, 2022 Working on design of dark theme.

This commit is contained in:
acanas 2022-04-05 12:58:30 +02:00
parent 9ef6345c40
commit 59beb921fb
9 changed files with 177 additions and 177 deletions

View File

@ -2304,25 +2304,6 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;}
.NO_BR {white-space:nowrap;}
/********************************* Messages **********************************/
.MSG_RECIPIENTS, .MSG_SUBJECT, .MSG_CONTENT
{
box-sizing:border-box;
width:640px;
}
.BG_MSG_BLUE
{
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;
}
.BG_MSG_GREEN
{
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;
}
/************************** Listing of users *********************************/
.USR_LIST_NUM_WHITE,
.USR_LIST_NUM_GREY,
@ -3811,9 +3792,6 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;}
overflow:hidden;
text-overflow:ellipsis;
}
.AUTHOR_TXT {color:#4d88a1; font-size:11pt;}
.AUTHOR_TXT_LIGHT {color:#afc4cc; font-size:11pt;}
.AUTHOR_TXT_NEW {color:#4d88a1; font-size:11pt; font-weight:bold;}
/************************** Owner of assignments and works *******************/
.OWNER_WORKS_PHOTO
@ -4221,6 +4199,12 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;}
}
/*********************************** Messages ********************************/
.MSG_RECIPIENTS, .MSG_SUBJECT, .MSG_CONTENT
{
box-sizing:border-box;
width:640px;
}
.MSG_TO_ONE_RCP
{
display:inline-block;
@ -4246,12 +4230,14 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;}
margin:0 auto;
width:400px;
}
.MSG_TXT
{
color:#202020;
font-size:13pt;
line-height:1.4;
}
.MSG_TXT_WHITE,
.MSG_TXT_GREY,
.MSG_TXT_PURPLE,
.MSG_TXT_BLUE,
.MSG_TXT_YELLOW,
.MSG_TXT_PINK {color:#202020; font-size:13pt; line-height:1.4;}
.MSG_TXT_DARK {color:#f0f0f0; font-size:13pt; line-height:1.4;}
.MSG_TIT_WHITE,
.MSG_TIT_GREY,
@ -4277,99 +4263,84 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;}
.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
.MSG_BG_WHITE,
.MSG_BG_GREY,
.MSG_BG_PURPLE,
.MSG_BG_BLUE,
.MSG_BG_YELLOW,
.MSG_BG_PINK
{
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:#4d88a1;
font-size:13pt;
}
.MSG_TIT_BG_DARK
.MSG_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-image:-webkit-linear-gradient(#414e52 0,#414e52 80%,#444444 100%); /* Safari */
background-image:linear-gradient(#414e52 0,#414e52 80%,#444444 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
.MSG_BG_NEW_WHITE,
.MSG_BG_NEW_GREY,
.MSG_BG_NEW_PURPLE,
.MSG_BG_NEW_BLUE,
.MSG_BG_NEW_YELLOW,
.MSG_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%);
background-repeat:no-repeat;
color:#4d88a1;
font-size:13pt;
font-weight:bold;
}
.MSG_TIT_BG_NEW_DARK
.MSG_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-image:-webkit-linear-gradient(#5f6b3a 0,#5f6b3a 80%,#444444 100%); /* Safari */
background-image:linear-gradient(#5f6b3a 0,#5f6b3a 80%,#444444 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
.MSG_BG_REM_WHITE,
.MSG_BG_REM_GREY,
.MSG_BG_REM_PURPLE,
.MSG_BG_REM_BLUE,
.MSG_BG_REM_YELLOW,
.MSG_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%);
background-repeat:no-repeat;
color:#afc4cc;
font-size:13pt;
}
.MSG_TIT_BG_REM_DARK
.MSG_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 */
background-image:linear-gradient(#eaf3f6 0,#eaf3f6 80%,white 100%);
background-repeat:no-repeat;
color:#4d88a1;
font-size:11pt;
}
.MSG_AUT_BG_NEW
{
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:#4d88a1;
font-size:11pt;
font-weight:bold;
}
.MSG_AUT_BG_REM
{
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:#afc4cc;
font-size:11pt;
}
.MSG_AUT_WHITE,
.MSG_AUT_GREY,
.MSG_AUT_PURPLE,
.MSG_AUT_BLUE,
.MSG_AUT_YELLOW,
.MSG_AUT_PINK {color:#4d88a1; font-size:11pt;}
.MSG_AUT_DARK {color:#afc4cc; font-size:11pt;}
.MSG_AUT_NEW_WHITE,
.MSG_AUT_NEW_GREY,
.MSG_AUT_NEW_PURPLE,
.MSG_AUT_NEW_BLUE,
.MSG_AUT_NEW_YELLOW,
.MSG_AUT_NEW_PINK {color:#4d88a1; font-size:11pt; font-weight:bold;}
.MSG_AUT_NEW_DARK {color:#afc4cc; font-size:11pt; font-weight:bold;}
.MSG_AUT_REM_WHITE,
.MSG_AUT_REM_GREY,
.MSG_AUT_REM_PURPLE,
.MSG_AUT_REM_BLUE,
.MSG_AUT_REM_YELLOW,
.MSG_AUT_REM_PINK {color:#afc4cc; font-size:11pt;}
.MSG_AUT_REM_DARK {color:#4d88a1; font-size:11pt;}
.MSG_DATE {color:#4d88a1; font-size:11pt;}
.MSG_DATE_NEW {color:#4d88a1; font-size:11pt; font-weight:bold;}

View File

@ -3265,7 +3265,7 @@ static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat)
/***** Begin form to send a message to this user *****/
HTM_TD_Begin ("class=\"LT\"");
HTM_DIV_Begin ("class=\"OWNER_WORKS_DATA AUTHOR_TXT\"");
HTM_DIV_Begin ("class=\"OWNER_WORKS_DATA MSG_AUT_%s\"",The_GetSuffix ());
if (!NextAction[UsrDat->Roles.InCurrentCrs])
Err_WrongRoleExit ();
@ -3292,8 +3292,8 @@ static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat)
{
HTM_BR ();
HTM_A_Begin ("href=\"mailto:%s\" target=\"_blank\""
" class=\"AUTHOR_TXT\"",
UsrDat->Email);
" class=\"MSG_AUT_%s\"",
UsrDat->Email,The_GetSuffix ());
HTM_Txt (UsrDat->Email);
HTM_A_End ();
}

View File

@ -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.91 (2022-04-05)"
#define CSS_FILE "swad21.86.7.css"
#define Log_PLATFORM_VERSION "SWAD 21.91.1 (2022-04-05)"
#define CSS_FILE "swad21.91.1.css"
#define JS_FILE "swad21.78.2.js"
/*
Version 21.91.1: Apr 05, 2022 Working on design of dark theme. (323232 lines)
Version 21.91: Apr 05, 2022 Working on design of dark theme. (323235 lines)
Version 21.90: Apr 01, 2022 Working on design of dark theme. (323707 lines)
Version 21.89: Mar 31, 2022 Working on design of dark theme. (323736 lines)

View File

@ -2264,7 +2264,8 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
HTM_TD_End ();
/***** Request time (row[4]) *****/
Msg_WriteMsgDate (Dat_GetUNIXTimeFromStr (row[4]),"DAT");
Msg_WriteMsgDate (Dat_GetUNIXTimeFromStr (row[4]),
"DAT",The_GetColorRows ());
/***** Button to confirm the request *****/
HTM_TD_Begin ("class=\"LT DAT_%s\"",

View File

@ -902,8 +902,8 @@ static void For_ShowAForumPost (struct For_Forums *Forums,
/***** Put an icon with post status *****/
HTM_TD_Begin ("class=\"CONTEXT_COL %s_%s\"",
NewPst ? "MSG_TIT_BG_NEW" :
"MSG_TIT_BG",
NewPst ? "MSG_BG_NEW" :
"MSG_BG",
The_GetSuffix ());
Ico_PutIcon (NewPst ? "envelope.svg" :
"envelope-open-text.svg",
@ -917,12 +917,16 @@ static void For_ShowAForumPost (struct For_Forums *Forums,
Msg_WriteMsgNumber ((unsigned long) PstNum,NewPst);
/***** Write date *****/
Msg_WriteMsgDate (CreatTimeUTC,NewPst ? "MSG_TIT_BG_NEW" :
"MSG_TIT_BG");
Msg_WriteMsgDate (CreatTimeUTC,
NewPst ? "MSG_TIT_NEW" :
"MSG_TIT",
NewPst ? "MSG_BG_NEW" :
"MSG_BG");
/***** Write subject *****/
HTM_TD_Begin ("class=\"LT DAT_%s\"",NewPst ? "MSG_TIT_BG_NEW" :
"MSG_TIT_BG");
HTM_TD_Begin ("class=\"LT %s_%s\"",
NewPst ? "MSG_BG_NEW" :
"MSG_BG",
The_GetSuffix ());
if (Enabled)
{
if (Subject[0])
@ -985,7 +989,8 @@ static void For_ShowAForumPost (struct For_Forums *Forums,
HTM_TD_End ();
/***** Write author *****/
HTM_TD_Begin ("colspan=\"2\" class=\"AUTHOR_TXT LT\" style=\"width:150px;\"");
HTM_TD_Begin ("colspan=\"2\" class=\"LT MSG_AUT_%s\" style=\"width:150px;\"",
The_GetSuffix ());
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,
Usr_DONT_GET_PREFS,
Usr_DONT_GET_ROLE_IN_CURRENT_CRS);
@ -996,7 +1001,7 @@ static void For_ShowAForumPost (struct For_Forums *Forums,
HTM_TD_End ();
/***** Write post content *****/
HTM_TD_Begin ("class=\"MSG_TXT LT\"");
HTM_TD_Begin ("class=\"LT MSG_TXT_%s\"",The_GetSuffix ());
if (Enabled)
{
Str_Copy (Content,OriginalContent,sizeof (Content) - 1);
@ -1110,7 +1115,7 @@ static void For_WriteNumberOfPosts (const struct For_Forums *Forums,long UsrCod)
NumPsts = For_DB_GetNumPstsOfUsrInForum (&Forums->Forum,UsrCod);
/***** Write number of posts *****/
HTM_DIV_Begin ("class=\"AUTHOR_TXT LT\"");
HTM_DIV_Begin ("class=\"LT MSG_AUT_%s\"",The_GetSuffix ());
HTM_TxtF ("[%u %s]",NumPsts,NumPsts == 1 ? Txt_FORUM_post :
Txt_FORUM_posts);
HTM_DIV_End ();
@ -2175,7 +2180,7 @@ static void For_ListForumThrs (struct For_Forums *Forums,
Dat_StartEndTime_t Order;
time_t TimeUTC;
struct Pagination PaginationPsts;
const char *Style;
const char *Class;
long ThreadInMyClipboard = -1L;
unsigned Column;
const char *BgColor;
@ -2197,8 +2202,8 @@ static void For_ListForumThrs (struct For_Forums *Forums,
Thr.ThrCod = ThrCods[NumThrInScreen];
For_GetThreadData (&Thr);
Forums->Thread.Current = Thr.ThrCod;
Style = (Thr.NumUnreadPosts ? "AUTHOR_TXT_NEW" :
"AUTHOR_TXT");
Class = (Thr.NumUnreadPosts ? "MSG_AUT_NEW" :
"MSG_AUT");
BgColor = (Thr.ThrCod == ThreadInMyClipboard) ? "LIGHT_GREEN" :
((Thr.ThrCod == ThrCodHighlighted) ? "BG_HIGHLIGHT" :
The_GetColorRows ());
@ -2281,7 +2286,8 @@ static void For_ListForumThrs (struct For_Forums *Forums,
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,
Usr_DONT_GET_PREFS,
Usr_DONT_GET_ROLE_IN_CURRENT_CRS);
HTM_TD_Begin ("class=\"%s LT %s\"",Style,BgColor);
HTM_TD_Begin ("class=\"LT %s_%s %s\"",
Class,The_GetSuffix (),BgColor);
Msg_WriteMsgAuthor (&UsrDat,Thr.Enabled[Order],BgColor);
HTM_TD_End ();
@ -2290,7 +2296,8 @@ static void For_ListForumThrs (struct For_Forums *Forums,
UniqueId++;
if (asprintf (&Id,"thr_date_%u",UniqueId) < 0)
Err_NotEnoughMemoryExit ();
HTM_TD_Begin ("id=\"%s\" class=\"%s LT %s\"",Id,Style,BgColor);
HTM_TD_Begin ("id=\"%s\" class=\"LT %s_%s %s\"",
Id,Class,The_GetSuffix (),BgColor);
Dat_WriteLocalDateHMSFromUTC (Id,TimeUTC,
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
true,true,false,0x6);
@ -2302,28 +2309,29 @@ static void For_ListForumThrs (struct For_Forums *Forums,
Column <= 2;
Column++)
{
HTM_TD_Begin ("class=\"%s LT %s\"",Style,BgColor);
HTM_TD_Begin ("class=\"LT %s_%s %s\"",
Class,The_GetSuffix (),BgColor);
HTM_TD_End ();
}
}
/***** Write number of posts in this thread *****/
HTM_TD_Begin ("class=\"%s RT %s\"",Style,BgColor);
HTM_TD_Begin ("class=\"RT %s_%s %s\"",Class,The_GetSuffix (),BgColor);
HTM_TxtF ("%u&nbsp;",Thr.NumPosts);
HTM_TD_End ();
/***** Write number of new posts in this thread *****/
HTM_TD_Begin ("class=\"%s RT %s\"",Style,BgColor);
HTM_TD_Begin ("class=\"RT %s_%s %s\"",Class,The_GetSuffix (),BgColor);
HTM_TxtF ("%u&nbsp;",Thr.NumUnreadPosts);
HTM_TD_End ();
/***** Write number of users who have write posts in this thread *****/
HTM_TD_Begin ("class=\"%s RT %s\"",Style,BgColor);
HTM_TD_Begin ("class=\"RT %s_%s %s\"",Class,The_GetSuffix (),BgColor);
HTM_TxtF ("%u&nbsp;",Thr.NumWriters);
HTM_TD_End ();
/***** Write number of users who have read this thread *****/
HTM_TD_Begin ("class=\"%s RT %s\"",Style,BgColor);
HTM_TD_Begin ("class=\"RT %s_%s %s\"",Class,The_GetSuffix (),BgColor);
HTM_TxtF ("%u&nbsp;",Thr.NumReaders);
HTM_TD_End ();

View File

@ -2071,10 +2071,11 @@ static void Msg_ShowASentOrReceivedMessage (struct Msg_Messages *Messages,
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"CONTEXT_COL %s\"",
Messages->TypeOfMessages == Msg_RECEIVED ? (Open ? "BG_MSG_BLUE" :
"BG_MSG_GREEN") :
"BG_MSG_BLUE");
HTM_TD_Begin ("class=\"CONTEXT_COL %s_%s\"",
Messages->TypeOfMessages == Msg_RECEIVED ? (Open ? "MSG_BG" :
"MSG_BG_NEW") :
"MSG_BG",
The_GetSuffix ());
Ico_PutIcon (Messages->TypeOfMessages == Msg_RECEIVED ? (Open ? (Replied ? "reply.svg" :
"envelope-open-text.svg") :
"envelope.svg") :
@ -2092,8 +2093,11 @@ static void Msg_ShowASentOrReceivedMessage (struct Msg_Messages *Messages,
Msg_WriteMsgNumber (MsgNum,!Open);
/***** Write message author *****/
HTM_TD_Begin ("class=\"%s LT\"",Open ? "MSG_AUT_BG" :
"MSG_AUT_BG_NEW");
HTM_TD_Begin ("class=\"LT %s_%s %s_%s\"",
Open ? "MSG_AUT" :
"MSG_AUT_NEW",The_GetSuffix (),
Open ? "MSG_BG" :
"MSG_BG_NEW",The_GetSuffix ());
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,
Usr_DONT_GET_PREFS,
Usr_DONT_GET_ROLE_IN_CURRENT_CRS);
@ -2104,8 +2108,11 @@ static void Msg_ShowASentOrReceivedMessage (struct Msg_Messages *Messages,
Msg_WriteSentOrReceivedMsgSubject (Messages,MsgCod,Subject,Open,Expanded);
/***** Write date-time *****/
Msg_WriteMsgDate (CreatTimeUTC,Open ? "MSG_TIT_BG" :
"MSG_TIT_BG_NEW");
Msg_WriteMsgDate (CreatTimeUTC,
Open ? "MSG_TIT" :
"MSG_TIT_NEW",
Open ? "MSG_BG" :
"MSG_BG_NEW");
HTM_TR_End ();
@ -2174,16 +2181,17 @@ static void Msg_ShowASentOrReceivedMessage (struct Msg_Messages *Messages,
HTM_TD_End ();
/***** Show content and media *****/
HTM_TD_Begin ("colspan=\"2\" class=\"MSG_TXT LT\"");
HTM_TD_Begin ("colspan=\"2\" class=\"LT MSG_TXT_%s\"",
The_GetSuffix ());
if (Content[0])
Msg_WriteMsgContent (Content,true,false);
Med_ShowMedia (&Media,"MSG_IMG_CONT","MSG_IMG");
HTM_TD_End ();
HTM_TR_End ();
/***** Free media *****/
Med_MediaDestructor (&Media);
/***** Free media *****/
Med_MediaDestructor (&Media);
HTM_TR_End ();
}
/***** Free memory used for user's data *****/
@ -2240,10 +2248,11 @@ void Msg_GetNotifMessage (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
void Msg_WriteMsgNumber (unsigned long MsgNum,bool NewMsg)
{
HTM_TD_Begin ("class=\"CT %s_%s\" style=\"width:45px;\"",
NewMsg ? "MSG_TIT_BG_NEW" :
"MSG_TIT_BG",
The_GetSuffix ());
HTM_TD_Begin ("class=\"CT %s_%s %s_%s\" style=\"width:45px;\"",
NewMsg ? "MSG_TIT_NEW" :
"MSG_TIT",The_GetSuffix (),
NewMsg ? "MSG_BG_NEW" :
"MSG_BG" ,The_GetSuffix ());
HTM_TxtF ("%lu:",MsgNum);
HTM_TD_End ();
}
@ -2261,10 +2270,11 @@ static void Msg_WriteSentOrReceivedMsgSubject (struct Msg_Messages *Messages,
extern const char *Txt_no_subject;
/***** Begin cell *****/
HTM_TD_Begin ("class=\"LT %s_%s\"",
Open ? "MSG_TIT_BG" :
"MSG_TIT_BG_NEW",
The_GetSuffix ());
HTM_TD_Begin ("class=\"LT %s_%s %s_%s\"",
Open ? "MSG_TIT" :
"MSG_TIT_NEW",The_GetSuffix (),
Open ? "MSG_BG" :
"MSG_BG_NEW" ,The_GetSuffix ());
/***** Begin form to expand/contract the message *****/
Frm_BeginForm (Messages->TypeOfMessages == Msg_RECEIVED ? (Expanded ? ActConRcvMsg :
@ -2389,7 +2399,7 @@ static bool Msg_WriteCrsOrgMsg (long CrsCod)
ThereIsOrgCrs = true;
if ((FromThisCrs = (CrsCod == Gbl.Hierarchy.Crs.CrsCod))) // Message sent from current course
{
HTM_DIV_Begin ("class=\"AUTHOR_TXT\"");
HTM_DIV_Begin ("class=\"MSG_AUT_%s\"",The_GetSuffix ());
HTM_TxtF ("(%s)",Txt_from_this_course);
HTM_DIV_End ();
}
@ -2398,7 +2408,7 @@ static bool Msg_WriteCrsOrgMsg (long CrsCod)
/* Write course, including link */
Frm_BeginFormGoTo (ActSeeCrsInf);
Crs_PutParamCrsCod (Crs.CrsCod);
HTM_DIV_Begin ("class=\"AUTHOR_TXT\"");
HTM_DIV_Begin ("class=\"MSG_AUT_%s\"",The_GetSuffix ());
HTM_Txt ("(");
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Crs.FullName),
"class=\"BT_LINK\"");
@ -2413,7 +2423,7 @@ static bool Msg_WriteCrsOrgMsg (long CrsCod)
}
if (!ThereIsOrgCrs) // It's an old message without origin source specified, or is a message sent from none course
{
HTM_DIV_Begin ("class=\"AUTHOR_TXT\"");
HTM_DIV_Begin ("class=\"MSG_AUT_%s\"",The_GetSuffix ());
HTM_TxtF ("(%s)",Txt_no_course_of_origin);
HTM_DIV_End ();
}
@ -2496,7 +2506,7 @@ static void Msg_WriteMsgFrom (struct Msg_Messages *Messages,
HTM_TD_End ();
/***** Write user's name *****/
HTM_TD_Begin ("class=\"AUTHOR_TXT LM\"");
HTM_TD_Begin ("class=\"LM MSG_AUT_%s\"",The_GetSuffix ());
if (UsrDat->UsrCod > 0)
{
HTM_Txt (UsrDat->FullName);
@ -2640,8 +2650,10 @@ static void Msg_WriteMsgTo (struct Msg_Messages *Messages,long MsgCod)
HTM_TD_End ();
/* Write user's name */
HTM_TD_Begin ("class=\"%s LM\"",OpenByDst ? "AUTHOR_TXT" :
"AUTHOR_TXT_NEW");
HTM_TD_Begin ("class=\"LM %s_%s\"",
OpenByDst ? "MSG_AUT" :
"MSG_AUT_NEW",
The_GetSuffix ());
if (UsrValid)
HTM_Txt (UsrDat.FullName);
else
@ -2657,7 +2669,8 @@ static void Msg_WriteMsgTo (struct Msg_Messages *Messages,long MsgCod)
/***** Begin form to show all users *****/
HTM_TR_Begin (NULL);
HTM_TD_Begin ("colspan=\"3\" class=\"AUTHOR_TXT LM\"");
HTM_TD_Begin ("colspan=\"3\" class=\"LM MSG_AUT_%s\"",
The_GetSuffix ());
HTM_TxtF ("[%u %s]",
NumRecipients.Unknown,
(NumRecipients.Unknown == 1) ? Txt_unknown_recipient :
@ -2673,7 +2686,8 @@ static void Msg_WriteMsgTo (struct Msg_Messages *Messages,long MsgCod)
/***** Begin form to show all users *****/
HTM_TR_Begin (NULL);
HTM_TD_Begin ("colspan=\"3\" class=\"AUTHOR_TXT LM\"");
HTM_TD_Begin ("colspan=\"3\" class=\"LM MSG_AUT_%s\"",
The_GetSuffix ());
Frm_BeginForm (ActionSee[Messages->TypeOfMessages]);
Messages->MsgCod = MsgCod; // Message to be expanded with all recipients visible
Msg_PutHiddenParamsOneMsg (Messages);
@ -2705,7 +2719,7 @@ 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 *Class)
void Msg_WriteMsgDate (time_t TimeUTC,const char *ClassTxt,const char *ClassBg)
{
static unsigned UniqueId = 0;
char *Id;
@ -2715,8 +2729,10 @@ void Msg_WriteMsgDate (time_t TimeUTC,const char *Class)
Err_NotEnoughMemoryExit ();
/***** Begin cell *****/
HTM_TD_Begin ("id=\"%s\" class=\"RT %s_%s\" style=\"width:106px;\"",
Id,Class,The_GetSuffix ());
HTM_TD_Begin ("id=\"%s\" class=\"RT %s_%s %s_%s\" style=\"width:106px;\"",
Id,
ClassTxt,The_GetSuffix (),
ClassBg,The_GetSuffix ());
/***** Write date and time *****/
Dat_WriteLocalDateHMSFromUTC (Id,TimeUTC,

View File

@ -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 *Class);
void Msg_WriteMsgDate (time_t TimeUTC,const char *ClassTxt,const char *ClassBg);
void Msg_WriteMsgContent (char Content[Cns_MAX_BYTES_LONG_TEXT + 1],
bool InsertLinks,bool ChangeBRToRet);

View File

@ -346,10 +346,10 @@ void Ntf_ShowMyNotifications (void)
Ntf_StatusTxt_t StatusTxt;
char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1];
char *ContentStr;
const char *Class;
const char *ClassText;
const char *ClassTxt;
const char *ClassLink;
const char *ClassAuthorBg;
const char *ClassAuthor;
const char *ClassBg;
bool PutLink;
/***** Get my notifications from database *****/
@ -453,26 +453,26 @@ void Ntf_ShowMyNotifications (void)
if (Status & Ntf_STATUS_BIT_REMOVED) // The source of the notification was removed
{
Class = "MSG_TIT_BG_REM";
ClassText = "MSG_TIT_REM";
ClassTxt = "MSG_TIT_REM";
ClassLink = "BT_LINK MSG_TIT_REM";
ClassAuthorBg = "MSG_AUT_BG_REM";
ClassAuthor = "MSG_AUT_REM";
ClassBg = "MSG_BG_REM";
PutLink = false;
}
else if (Status & Ntf_STATUS_BIT_READ) // I have already seen the source of the notification
{
Class = "MSG_TIT_BG";
ClassText = "MSG_TIT";
ClassTxt = "MSG_TIT";
ClassLink = "BT_LINK LT MSG_TIT";
ClassAuthorBg = "MSG_AUT_BG";
ClassAuthor = "MSG_AUT";
ClassBg = "MSG_BG";
PutLink = true;
}
else // I have not seen the source of the notification
{
Class = "MSG_TIT_BG_NEW";
ClassText = "MSG_TIT_NEW";
ClassTxt = "MSG_TIT_NEW";
ClassLink = "BT_LINK LT MSG_TIT_NEW";
ClassAuthorBg = "MSG_AUT_BG_NEW";
ClassAuthor = "MSG_AUT_NEW";
ClassBg = "MSG_BG_NEW";
PutLink = true;
}
@ -481,7 +481,7 @@ void Ntf_ShowMyNotifications (void)
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LT %s_%s\" style=\"width:25px;\"",
Class,The_GetSuffix ());
ClassBg,The_GetSuffix ());
if (PutLink)
PutLink = Ntf_StartFormGoToAction (NotifyEvent,Hie.Crs.CrsCod,&UsrDat,Cod,&Forums);
@ -497,8 +497,7 @@ void Ntf_ShowMyNotifications (void)
HTM_TD_End ();
/* Write event type */
HTM_TD_Begin ("class=\"LT %s_%s\"",
Class,The_GetSuffix ());
HTM_TD_Begin ("class=\"LT %s_%s\"",ClassBg,The_GetSuffix ());
if (PutLink)
{
PutLink = Ntf_StartFormGoToAction (NotifyEvent,Hie.Crs.CrsCod,&UsrDat,Cod,&Forums);
@ -510,20 +509,22 @@ void Ntf_ShowMyNotifications (void)
}
else
{
HTM_SPAN_Begin ("class=\"%s\"",ClassText);
HTM_SPAN_Begin ("class=\"%s\"",ClassTxt);
HTM_Txt (Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent]);
HTM_SPAN_End ();
}
HTM_TD_End ();
/* Write user (from) */
HTM_TD_Begin ("class=\"%s LT\"",ClassAuthorBg);
HTM_TD_Begin ("class=\"LT %s_%s %s_%s\"",
ClassAuthor,The_GetSuffix (),
ClassBg,The_GetSuffix ());
Msg_WriteMsgAuthor (&UsrDat,true,NULL);
HTM_TD_End ();
/* Write location */
HTM_TD_Begin ("class=\"LT %s_%s\"",
Class,The_GetSuffix ());
ClassBg,The_GetSuffix ());
if (NotifyEvent == Ntf_EVENT_FORUM_POST_COURSE ||
NotifyEvent == Ntf_EVENT_FORUM_REPLY)
{
@ -534,7 +535,7 @@ void Ntf_ShowMyNotifications (void)
HTM_BUTTON_Submit_Begin (Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent],
"class=\"%s\"",ClassLink);
else
HTM_SPAN_Begin ("class=\"%s\"",ClassText);
HTM_SPAN_Begin ("class=\"%s\"",ClassTxt);
HTM_TxtF ("%s:&nbsp;%s",Txt_Forum,ForumName);
if (PutLink)
{
@ -553,7 +554,7 @@ void Ntf_ShowMyNotifications (void)
HTM_BUTTON_Submit_Begin (Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent],
"class=\"%s\"",ClassLink);
else
HTM_SPAN_Begin ("class=\"%s\"",ClassText);
HTM_SPAN_Begin ("class=\"%s\"",ClassTxt);
if (Hie.Crs.CrsCod > 0)
HTM_TxtF ("%s:&nbsp;%s",Txt_Course,Hie.Crs.ShrtName);
@ -577,11 +578,10 @@ void Ntf_ShowMyNotifications (void)
HTM_TD_End ();
/* Write date and time */
Msg_WriteMsgDate (DateTimeUTC,Class);
Msg_WriteMsgDate (DateTimeUTC,ClassTxt,ClassBg);
/* Write status (sent by email / pending to be sent by email) */
HTM_TD_Begin ("class=\"LT %s_%s\"",
Class,The_GetSuffix ());
HTM_TD_Begin ("class=\"LT %s_%s\"",ClassBg,The_GetSuffix ());
HTM_Txt (Txt_NOTIFICATION_STATUS[StatusTxt]);
HTM_TD_End ();

View File

@ -6384,8 +6384,10 @@ void Usr_WriteAuthor1Line (long UsrCod,bool Hidden)
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,false);
/***** Write name *****/
HTM_DIV_Begin ("class=\"AUTHOR_1_LINE %s\"",Hidden ? "AUTHOR_TXT_LIGHT" :
"AUTHOR_TXT");
HTM_DIV_Begin ("class=\"AUTHOR_1_LINE %s_%s\"",
Hidden ? "MSG_AUT_REM" :
"MSG_AUT",
The_GetSuffix ());
HTM_Txt (UsrDat.FullName);
HTM_DIV_End ();
@ -6435,14 +6437,15 @@ void Usr_ShowTableCellWithUsrData (struct UsrData *UsrDat,unsigned NumRows)
/* Action to go to user's record depending on role in course */
if (!NextAction[UsrDat->Roles.InCurrentCrs])
/* Begin div */
HTM_DIV_Begin ("class=\"AUTHOR_TXT\"");
HTM_DIV_Begin ("class=\"MSG_AUT_%s\"",The_GetSuffix ());
else
{
/* Begin form to go to user's record card */
Frm_BeginForm (NextAction[UsrDat->Roles.InCurrentCrs]);
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
HTM_BUTTON_Submit_Begin (UsrDat->FullName,
"class=\"BT_LINK AUTHOR_TXT\"");
"class=\"BT_LINK MSG_AUT_%s\"",
The_GetSuffix ());
}
/* User's ID */