Version 16.146.2

This commit is contained in:
Antonio Cañas Vargas 2017-03-04 00:28:04 +01:00
parent cd646c25e7
commit 21c1307e4e
12 changed files with 46 additions and 42 deletions

View File

@ -2279,8 +2279,8 @@ a:hover img.CENTRE_PHOTO_SHOW
font-size:12pt; font-size:12pt;
} }
/**************** Author of assignments, messages, surveys... ****************/ /********** Author of assignments, attendance, messages, surveys... **********/
.AUTHOR .AUTHOR_1_LINE
{ {
display:inline-block; display:inline-block;
box-sizing:border-box; box-sizing:border-box;
@ -2292,6 +2292,18 @@ a:hover img.CENTRE_PHOTO_SHOW
overflow:hidden; overflow:hidden;
text-overflow:ellipsis; text-overflow:ellipsis;
} }
.AUTHOR_2_LINES
{
display:inline-block;
box-sizing:border-box;
max-width:60px;
height:40px;
text-align:left;
vertical-align:middle;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
.AUTHOR_TXT {color:#4D88A1; font-size:11pt;} .AUTHOR_TXT {color:#4D88A1; font-size:11pt;}
.AUTHOR_TXT_LIGHT {color:#AFC4CC; font-size:11pt;} .AUTHOR_TXT_LIGHT {color:#AFC4CC; font-size:11pt;}
.AUTHOR_TXT_NEW {color:#4D88A1; font-size:11pt; font-weight:bold;} .AUTHOR_TXT_NEW {color:#4D88A1; font-size:11pt; font-weight:bold;}

View File

@ -450,7 +450,7 @@ static void Asg_WriteAsgAuthor (struct Assignment *Asg)
"PHOTO15x20",Pho_ZOOM,false); "PHOTO15x20",Pho_ZOOM,false);
/***** Write name *****/ /***** Write name *****/
fprintf (Gbl.F.Out,"<div class=\"AUTHOR %s\">%s</div>", fprintf (Gbl.F.Out,"<div class=\"AUTHOR_1_LINE %s\">%s</div>",
Asg->Hidden ? "AUTHOR_TXT_LIGHT" : Asg->Hidden ? "AUTHOR_TXT_LIGHT" :
"AUTHOR_TXT", "AUTHOR_TXT",
UsrDat.FullName); UsrDat.FullName);

View File

@ -474,8 +474,6 @@ static void Att_WriteAttEventAuthor (struct AttendanceEvent *Att)
{ {
bool ShowPhoto = false; bool ShowPhoto = false;
char PhotoURL[PATH_MAX + 1]; char PhotoURL[PATH_MAX + 1];
char FirstName[Usr_MAX_BYTES_NAME + 1];
char Surnames[Usr_MAX_BYTES_SURNAMES + 1];
struct UsrData UsrDat; struct UsrData UsrDat;
/***** Initialize structure with user's data *****/ /***** Initialize structure with user's data *****/
@ -492,23 +490,10 @@ static void Att_WriteAttEventAuthor (struct AttendanceEvent *Att)
"PHOTO15x20",Pho_ZOOM,false); "PHOTO15x20",Pho_ZOOM,false);
/***** Write name *****/ /***** Write name *****/
Str_Copy (FirstName,UsrDat.FirstName, fprintf (Gbl.F.Out,"<div class=\"AUTHOR_1_LINE %s\">%s</div>",
Usr_MAX_BYTES_NAME);
Str_Copy (Surnames,UsrDat.Surname1,
Usr_MAX_BYTES_SURNAMES);
if (UsrDat.Surname2[0])
{
Str_Concat (Surnames," ",
Usr_MAX_BYTES_SURNAMES);
Str_Concat (Surnames,UsrDat.Surname2,
Usr_MAX_BYTES_SURNAMES);
}
Str_LimitLengthHTMLStr (FirstName,8);
Str_LimitLengthHTMLStr (Surnames,8);
fprintf (Gbl.F.Out,"<span class=\"%s\">%s %s</span>",
Att->Hidden ? "AUTHOR_TXT_LIGHT" : Att->Hidden ? "AUTHOR_TXT_LIGHT" :
"AUTHOR_TXT", "AUTHOR_TXT",
FirstName,Surnames); UsrDat.FullName);
/***** Free memory used for user's data *****/ /***** Free memory used for user's data *****/
Usr_UsrDataDestructor (&UsrDat); Usr_UsrDataDestructor (&UsrDat);

View File

@ -1572,7 +1572,7 @@ static void Ctr_ListCentresForEdition (void)
fprintf (Gbl.F.Out,"<td class=\"INPUT_REQUESTER LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"INPUT_REQUESTER LEFT_TOP\">"
"<table class=\"INPUT_REQUESTER CELLS_PAD_2\">" "<table class=\"INPUT_REQUESTER CELLS_PAD_2\">"
"<tr>"); "<tr>");
Msg_WriteMsgAuthor (&UsrDat,100,6,"DAT",true,NULL); Msg_WriteMsgAuthor (&UsrDat,"DAT",true,NULL);
fprintf (Gbl.F.Out,"</tr>" fprintf (Gbl.F.Out,"</tr>"
"</table>" "</table>"
"</td>" "</td>"
@ -2489,7 +2489,7 @@ static void Ctr_PutFormToCreateCentre (void)
fprintf (Gbl.F.Out,"<td class=\"INPUT_REQUESTER LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"INPUT_REQUESTER LEFT_TOP\">"
"<table class=\"INPUT_REQUESTER CELLS_PAD_2\">" "<table class=\"INPUT_REQUESTER CELLS_PAD_2\">"
"<tr>"); "<tr>");
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,100,6,"DAT",true,NULL); Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,"DAT",true,NULL);
fprintf (Gbl.F.Out,"</tr>" fprintf (Gbl.F.Out,"</tr>"
"</table>" "</table>"
"</td>" "</td>"

View File

@ -197,15 +197,16 @@
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.146.1 (2017-03-03)" #define Log_PLATFORM_VERSION "SWAD 16.146.2 (2017-03-04)"
#define CSS_FILE "swad16.146.css" #define CSS_FILE "swad16.146.css"
#define JS_FILE "swad16.144.js" #define JS_FILE "swad16.144.js"
// Number of lines (includes comments but not blank lines) has been got with the following command: // Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1 // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
/* /*
Version 16.146.1: Mar 02, 2017 Changes in layout of assigments. (216350 lines) Version 16.146.2: Mar 04, 2017 Changes in layout of authors. (216354 lines)
Version 16.146: Mar 02, 2017 Changes in layout of class photos. (216351 lines) Version 16.146.1: Mar 03, 2017 Changes in layout of assigments. (216350 lines)
Version 16.146: Mar 03, 2017 Changes in layout of class photos. (216351 lines)
Version 16.145.2: Mar 02, 2017 Some help URLs translated to spanish. (216338 lines) Version 16.145.2: Mar 02, 2017 Some help URLs translated to spanish. (216338 lines)
Version 16.145.1: Mar 02, 2017 Changes in several help URLs. (216337 lines) Version 16.145.1: Mar 02, 2017 Changes in several help URLs. (216337 lines)
Version 16.145: Mar 02, 2017 Support for languages in help. Version 16.145: Mar 02, 2017 Support for languages in help.

View File

@ -1579,7 +1579,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
fprintf (Gbl.F.Out,"<td class=\"INPUT_REQUESTER LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"INPUT_REQUESTER LEFT_TOP\">"
"<table class=\"INPUT_REQUESTER CELLS_PAD_2\">" "<table class=\"INPUT_REQUESTER CELLS_PAD_2\">"
"<tr>"); "<tr>");
Msg_WriteMsgAuthor (&UsrDat,100,6,"DAT",true,NULL); Msg_WriteMsgAuthor (&UsrDat,"DAT",true,NULL);
fprintf (Gbl.F.Out,"</tr>" fprintf (Gbl.F.Out,"</tr>"
"</table>" "</table>"
"</td>" "</td>"
@ -1745,7 +1745,7 @@ static void Crs_PutFormToCreateCourse (void)
fprintf (Gbl.F.Out,"<td class=\"INPUT_REQUESTER LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"INPUT_REQUESTER LEFT_TOP\">"
"<table class=\"INPUT_REQUESTER CELLS_PAD_2\">" "<table class=\"INPUT_REQUESTER CELLS_PAD_2\">"
"<tr>"); "<tr>");
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,100,6,"DAT",true,NULL); Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,"DAT",true,NULL);
fprintf (Gbl.F.Out,"</tr>" fprintf (Gbl.F.Out,"</tr>"
"</table>" "</table>"
"</td>" "</td>"

View File

@ -868,7 +868,7 @@ static void Deg_ListDegreesForEdition (void)
fprintf (Gbl.F.Out,"<td class=\"INPUT_REQUESTER LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"INPUT_REQUESTER LEFT_TOP\">"
"<table class=\"INPUT_REQUESTER CELLS_PAD_2\">" "<table class=\"INPUT_REQUESTER CELLS_PAD_2\">"
"<tr>"); "<tr>");
Msg_WriteMsgAuthor (&UsrDat,100,6,"DAT",true,NULL); Msg_WriteMsgAuthor (&UsrDat,"DAT",true,NULL);
fprintf (Gbl.F.Out,"</tr>" fprintf (Gbl.F.Out,"</tr>"
"</table>" "</table>"
"</td>" "</td>"
@ -1041,7 +1041,7 @@ static void Deg_PutFormToCreateDegree (void)
fprintf (Gbl.F.Out,"<td class=\"INPUT_REQUESTER LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"INPUT_REQUESTER LEFT_TOP\">"
"<table class=\"INPUT_REQUESTER CELLS_PAD_2\">" "<table class=\"INPUT_REQUESTER CELLS_PAD_2\">"
"<tr>"); "<tr>");
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,100,6,"DAT",true,NULL); Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,"DAT",true,NULL);
fprintf (Gbl.F.Out,"</tr>" fprintf (Gbl.F.Out,"</tr>"
"</table>" "</table>"
"</td>" "</td>"

View File

@ -1313,7 +1313,7 @@ static void For_ShowAForumPost (struct ForumThread *Thr,unsigned PstNum,long Pst
/* Write author */ /* Write author */
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<tr>");
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat); Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat);
Msg_WriteMsgAuthor (&UsrDat,125,16,"AUTHOR_TXT",Enabled,NULL); Msg_WriteMsgAuthor (&UsrDat,"AUTHOR_TXT",Enabled,NULL);
fprintf (Gbl.F.Out,"</tr>"); fprintf (Gbl.F.Out,"</tr>");
if (Enabled) if (Enabled)
{ {
@ -3514,7 +3514,7 @@ void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],struct Pagination *Pagi
/* Write the author of first or last message */ /* Write the author of first or last message */
UsrDat.UsrCod = Thr.UsrCod[Order]; UsrDat.UsrCod = Thr.UsrCod[Order];
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat); Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat);
Msg_WriteMsgAuthor (&UsrDat,68,9,Style,Thr.Enabled[Order],BgColor); Msg_WriteMsgAuthor (&UsrDat,Style,Thr.Enabled[Order],BgColor);
/* Write the date of first or last message (it's in YYYYMMDDHHMMSS format) */ /* Write the date of first or last message (it's in YYYYMMDDHHMMSS format) */
TimeUTC = Thr.WriteTime[Order]; TimeUTC = Thr.WriteTime[Order];

View File

@ -1559,7 +1559,7 @@ static void Ins_ListInstitutionsForEdition (void)
fprintf (Gbl.F.Out,"<td class=\"INPUT_REQUESTER LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"INPUT_REQUESTER LEFT_TOP\">"
"<table class=\"INPUT_REQUESTER CELLS_PAD_2\">" "<table class=\"INPUT_REQUESTER CELLS_PAD_2\">"
"<tr>"); "<tr>");
Msg_WriteMsgAuthor (&UsrDat,100,6,"DAT",true,NULL); Msg_WriteMsgAuthor (&UsrDat,"DAT",true,NULL);
fprintf (Gbl.F.Out,"</tr>" fprintf (Gbl.F.Out,"</tr>"
"</table>" "</table>"
"</td>" "</td>"
@ -2242,7 +2242,7 @@ static void Ins_PutFormToCreateInstitution (void)
fprintf (Gbl.F.Out,"<td class=\"INPUT_REQUESTER LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"INPUT_REQUESTER LEFT_TOP\">"
"<table class=\"INPUT_REQUESTER CELLS_PAD_2\">" "<table class=\"INPUT_REQUESTER CELLS_PAD_2\">"
"<tr>"); "<tr>");
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,100,6,"DAT",true,NULL); Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,"DAT",true,NULL);
fprintf (Gbl.F.Out,"</tr>" fprintf (Gbl.F.Out,"</tr>"
"</table>" "</table>"
"</td>" "</td>"

View File

@ -2910,7 +2910,7 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod)
/***** Write message author *****/ /***** Write message author *****/
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat); Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat);
Msg_WriteMsgAuthor (&UsrDat,100,11, Msg_WriteMsgAuthor (&UsrDat,
Open ? "MSG_AUT_BG" : Open ? "MSG_AUT_BG" :
"MSG_AUT_BG_NEW", // Style "MSG_AUT_BG_NEW", // Style
true,NULL); true,NULL);
@ -3110,7 +3110,6 @@ static void Msg_WriteSentOrReceivedMsgSubject (long MsgCod,const char *Subject,b
// Input: UsrDat must hold user's data // Input: UsrDat must hold user's data
void Msg_WriteMsgAuthor (struct UsrData *UsrDat, void Msg_WriteMsgAuthor (struct UsrData *UsrDat,
unsigned WidthOfNameColumn,unsigned MaxCharsInName,
const char *Style,bool Enabled,const char *BgColor) const char *Style,bool Enabled,const char *BgColor)
{ {
extern const char *Txt_Unknown_or_without_photo; extern const char *Txt_Unknown_or_without_photo;
@ -3142,10 +3141,19 @@ void Msg_WriteMsgAuthor (struct UsrData *UsrDat,
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP",Style); fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP",Style);
if (BgColor) if (BgColor)
fprintf (Gbl.F.Out," %s",BgColor); fprintf (Gbl.F.Out," %s",BgColor);
fprintf (Gbl.F.Out,"\" style=\"width:%upx;\">",WidthOfNameColumn); fprintf (Gbl.F.Out,"\">");
/* Restrict length of firstname and surnames */ /* Restrict length of firstname and surnames */
Usr_RestrictLengthAndWriteName (UsrDat,MaxCharsInName); fprintf (Gbl.F.Out,"<div class=\"AUTHOR_2_LINES %s\">"
"%s<br />"
"%s",
Style,
UsrDat->FirstName,
UsrDat->Surname1);
if (UsrDat->Surname2[0])
fprintf (Gbl.F.Out,"%s",
UsrDat->Surname2);
fprintf (Gbl.F.Out,"</div>");
} }
else else
{ {
@ -3159,11 +3167,10 @@ void Msg_WriteMsgAuthor (struct UsrData *UsrDat,
Style); Style);
if (BgColor) if (BgColor)
fprintf (Gbl.F.Out," %s",BgColor); fprintf (Gbl.F.Out," %s",BgColor);
fprintf (Gbl.F.Out,"\" style=\"width:%upx;\">", fprintf (Gbl.F.Out,"\">");
WidthOfNameColumn);
} }
/***** End seconf column *****/ /***** End second column *****/
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
} }

View File

@ -100,7 +100,6 @@ void Msg_GetNotifMessage (char SummaryStr[Cns_MAX_BYTES_TEXT + 1],
void Msg_WriteMsgNumber (unsigned long MsgNum,bool NewMsg); void Msg_WriteMsgNumber (unsigned long MsgNum,bool NewMsg);
void Msg_WriteMsgAuthor (struct UsrData *UsrDat, void Msg_WriteMsgAuthor (struct UsrData *UsrDat,
unsigned WidthOfNameColumn,unsigned MaxCharsInName,
const char *Style,bool Enabled,const char *BgColor); const char *Style,bool Enabled,const char *BgColor);
bool Msg_WriteCrsOrgMsg (long CrsCod); bool Msg_WriteCrsOrgMsg (long CrsCod);
void Msg_WriteListUsrsDstMsg (long MsgCod); void Msg_WriteListUsrsDstMsg (long MsgCod);

View File

@ -533,7 +533,7 @@ void Ntf_ShowMyNotifications (void)
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/* Write user (from) */ /* Write user (from) */
Msg_WriteMsgAuthor (&UsrDat,120,11,ClassAuthorBg,true,NULL); Msg_WriteMsgAuthor (&UsrDat,ClassAuthorBg,true,NULL);
/* Write location */ /* Write location */
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">", fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",