Version 16.147.3

This commit is contained in:
Antonio Cañas Vargas 2017-03-05 14:46:56 +01:00
parent e31e599f09
commit 5ac928b7b7
4 changed files with 76 additions and 28 deletions

View File

@ -1044,7 +1044,7 @@ a:hover /* Default ==> underlined */
.BLUE_SUBTITLE_ACTION {color:#4D88A1; font-size:12pt;} .BLUE_SUBTITLE_ACTION {color:#4D88A1; font-size:12pt;}
.YELLOW_SUBTITLE_ACTION {color:#BD4815; font-size:12pt;} .YELLOW_SUBTITLE_ACTION {color:#BD4815; font-size:12pt;}
/************************* Users connected globally **************************/ /***************************** Users connected *******************************/
.CONNECTED .CONNECTED
{ {
box-sizing:border-box; box-sizing:border-box;
@ -1078,6 +1078,34 @@ a:hover /* Default ==> underlined */
color:#398000; color:#398000;
font-size:12pt; font-size:12pt;
} }
.CON_USR_NARROW
{
width:68px;
text-align:left;
vertical-align:middle;
}
.CON_USR_WIDE
{
width:320px;
text-align:left;
vertical-align:middle;
}
.CON_NAME_NARROW
{
max-width:68px;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
.CON_NAME_WIDE
{
max-width:320px;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
.CON_NO_CRS {color:#B8D070; font-size:11pt; line-height:110%; white-space:nowrap;}
.CON_CRS {color:#398000; font-size:11pt; line-height:110%; white-space:nowrap;}
/*************************** Most frequent actions ***************************/ /*************************** Most frequent actions ***************************/
#MFU_actions #MFU_actions
@ -2890,7 +2918,7 @@ a:hover img.CENTRE_PHOTO_SHOW
font-size:30pt; font-size:30pt;
font-weight:bold; font-weight:bold;
} }
.FOLLOW_USR_PHOTO .FOLLOW_PHOTO
{ {
box-sizing:border-box; box-sizing:border-box;
width:72px; width:72px;
@ -2898,22 +2926,27 @@ a:hover img.CENTRE_PHOTO_SHOW
text-align:left; text-align:left;
vertical-align:bottom; vertical-align:bottom;
} }
.FOLLOW_USR
{
box-sizing:border-box;
width:100px;
height:90px;
}
.FOLLOW_USR_NAME .FOLLOW_USR_NAME
{ {
box-sizing:border-box; box-sizing:border-box;
min-width:106px; max-width:100px;
height:90px;
text-align:left; text-align:left;
vertical-align:bottom; vertical-align:bottom;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
} }
.FOLLOW_USR_ICO .FOLLOW_USR_ICO
{ {
padding:4px; padding:4px;
} }
.CON {color:#B8D070; font-size:11pt; line-height:110%; white-space:nowrap;}
.CON_CRS {color:#398000; font-size:11pt; line-height:110%; white-space:nowrap;}
/****************************** Users ranking ********************************/ /****************************** Users ranking ********************************/
.RANK_USR .RANK_USR
{ {

View File

@ -197,13 +197,14 @@
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.147.2 (2017-03-04)" #define Log_PLATFORM_VERSION "SWAD 16.147.3 (2017-03-04)"
#define CSS_FILE "swad16.147.css" #define CSS_FILE "swad16.147.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.147.3: Mar 05, 2017 Changes in layout of followed users, users to follow and connected users. (216365 lines)
Version 16.147.2: Mar 05, 2017 Changes in layout of notice author. (216316 lines) Version 16.147.2: Mar 05, 2017 Changes in layout of notice author. (216316 lines)
Version 16.147.1: Mar 05, 2017 Changes in layout of notice author. (216300 lines) Version 16.147.1: Mar 05, 2017 Changes in layout of notice author. (216300 lines)
Version 16.147: Mar 04, 2017 Changes in layout of file browser. (216292 lines) Version 16.147: Mar 04, 2017 Changes in layout of file browser. (216292 lines)

View File

@ -946,7 +946,7 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
bool ShowPhoto; bool ShowPhoto;
char PhotoURL[PATH_MAX + 1]; char PhotoURL[PATH_MAX + 1];
const char *Font = (Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].ThisCrs ? "CON_CRS" : const char *Font = (Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].ThisCrs ? "CON_CRS" :
"CON"); "CON_NO_CRS");
long UsrCod; long UsrCod;
struct UsrData OtherUsrDat; struct UsrData OtherUsrDat;
struct UsrData *UsrDat; struct UsrData *UsrDat;
@ -983,17 +983,20 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** Write full name and link *****/ /***** Write full name and link *****/
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE COLOR%u\"" fprintf (Gbl.F.Out,"<td class=\"CON_USR_NARROW %s COLOR%u\">",
" style=\"width:68px;\">",
Font,Gbl.RowEvenOdd); Font,Gbl.RowEvenOdd);
Act_FormStartUnique ((Role == Rol_STUDENT) ? ActSeeRecOneStd : Act_FormStartUnique ((Role == Rol_STUDENT) ? ActSeeRecOneStd :
ActSeeRecOneTch); // Must be unique because ActSeeRecOneTch); // Must be unique because
// the list of connected users // the list of connected users
// is dynamically updated via AJAX // is dynamically updated via AJAX
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
fprintf (Gbl.F.Out,"<div class=\"CON_NAME_NARROW\">"); // To limit width
Act_LinkFormSubmitUnique (Txt_View_record_for_this_course,Font); Act_LinkFormSubmitUnique (Txt_View_record_for_this_course,Font);
Usr_RestrictLengthAndWriteName (UsrDat,8); fprintf (Gbl.F.Out,"%s<br />%s",UsrDat->FirstName,UsrDat->Surname1);
fprintf (Gbl.F.Out,"</a>"); if (UsrDat->Surname2[0])
fprintf (Gbl.F.Out," %s",UsrDat->Surname2);
fprintf (Gbl.F.Out,"</a>"
"</div>");
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -1156,7 +1159,7 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R
/* Get course code (row[1]) */ /* Get course code (row[1]) */
ThisCrs = (Str_ConvertStrCodToLongCod (row[1]) == Gbl.CurrentCrs.Crs.CrsCod); ThisCrs = (Str_ConvertStrCodToLongCod (row[1]) == Gbl.CurrentCrs.Crs.CrsCod);
Font = (ThisCrs ? "CON_CRS" : Font = (ThisCrs ? "CON_CRS" :
"CON"); "CON_NO_CRS");
/* Compute time from last access */ /* Compute time from last access */
if (sscanf (row[2],"%ld",&TimeDiff) != 1) if (sscanf (row[2],"%ld",&TimeDiff) != 1)
@ -1174,22 +1177,25 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** Write full name and link *****/ /***** Write full name and link *****/
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE COLOR%u\"" fprintf (Gbl.F.Out,"<td class=\"CON_USR_WIDE %s COLOR%u\">",
" style=\"width:320px;\">",
Font,Gbl.RowEvenOdd); Font,Gbl.RowEvenOdd);
if (PutLinkToRecord) if (PutLinkToRecord)
{ {
Act_FormStart ((Role == Rol_STUDENT) ? ActSeeRecOneStd : Act_FormStart ((Role == Rol_STUDENT) ? ActSeeRecOneStd :
ActSeeRecOneTch); ActSeeRecOneTch);
Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod); Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod);
Act_LinkFormSubmit (UsrDat.FullName,Font,NULL);
} }
Usr_RestrictLengthAndWriteName (&UsrDat,40); fprintf (Gbl.F.Out,"<div class=\"CON_NAME_WIDE\">"); // To limit width
if (PutLinkToRecord)
Act_LinkFormSubmit (UsrDat.FullName,Font,NULL);
fprintf (Gbl.F.Out,"%s<br />%s",UsrDat.FirstName,UsrDat.Surname1);
if (UsrDat.Surname2[0])
fprintf (Gbl.F.Out," %s",UsrDat.Surname2);
if (PutLinkToRecord) if (PutLinkToRecord)
{
fprintf (Gbl.F.Out,"</a>"); fprintf (Gbl.F.Out,"</a>");
fprintf (Gbl.F.Out,"</div>");
if (PutLinkToRecord)
Act_FormEnd (); Act_FormEnd ();
}
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** Write time from last access *****/ /***** Write time from last access *****/

View File

@ -821,7 +821,7 @@ static void Fol_ShowFollowedOrFollower (struct UsrData *UsrDat)
bool Visible = Pri_ShowingIsAllowed (UsrDat->ProfileVisibility,UsrDat); bool Visible = Pri_ShowingIsAllowed (UsrDat->ProfileVisibility,UsrDat);
/***** Show user's photo *****/ /***** Show user's photo *****/
fprintf (Gbl.F.Out,"<td class=\"FOLLOW_USR_PHOTO\">"); fprintf (Gbl.F.Out,"<td class=\"FOLLOW_PHOTO\">");
if (Visible) if (Visible)
{ {
ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (UsrDat,PhotoURL); ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (UsrDat,PhotoURL);
@ -832,15 +832,19 @@ static void Fol_ShowFollowedOrFollower (struct UsrData *UsrDat)
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** Show user's name and icon to follow/unfollow *****/ /***** Show user's name and icon to follow/unfollow *****/
fprintf (Gbl.F.Out,"<td class=\"FOLLOW_USR_NAME\">"); fprintf (Gbl.F.Out,"<td class=\"FOLLOW_USR\">");
if (Visible) if (Visible)
{ {
/* Put form to go to public profile */ /* Put form to go to public profile */
Act_FormStart (ActSeeOthPubPrf); Act_FormStart (ActSeeOthPubPrf);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
fprintf (Gbl.F.Out,"<div class=\"FOLLOW_USR_NAME\">"); // To limit width
Act_LinkFormSubmit (Txt_Another_user_s_profile,"DAT",NULL); Act_LinkFormSubmit (Txt_Another_user_s_profile,"DAT",NULL);
Usr_RestrictLengthAndWriteName (UsrDat,10); fprintf (Gbl.F.Out,"%s<br />%s",UsrDat->FirstName,UsrDat->Surname1);
fprintf (Gbl.F.Out,"</a>"); if (UsrDat->Surname2[0])
fprintf (Gbl.F.Out," %s",UsrDat->Surname2);
fprintf (Gbl.F.Out,"</a>"
"</div>");
Act_FormEnd (); Act_FormEnd ();
} }
@ -887,7 +891,7 @@ static void Fol_WriteRowUsrToFollowOnRightColumn (struct UsrData *UsrDat)
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** User's name *****/ /***** User's name *****/
fprintf (Gbl.F.Out,"<td class=\"CON_CRS LEFT_MIDDLE COLOR%u\"" fprintf (Gbl.F.Out,"<td class=\"CON_USR CON_CRS COLOR%u\""
" style=\"width:68px;\">", " style=\"width:68px;\">",
Gbl.RowEvenOdd); Gbl.RowEvenOdd);
if (Visible) if (Visible)
@ -895,9 +899,13 @@ static void Fol_WriteRowUsrToFollowOnRightColumn (struct UsrData *UsrDat)
/* Put form to go to public profile */ /* Put form to go to public profile */
Act_FormStart (ActSeeOthPubPrf); Act_FormStart (ActSeeOthPubPrf);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
fprintf (Gbl.F.Out,"<div class=\"CON_NAME\">"); // To limit width
Act_LinkFormSubmit (Txt_Another_user_s_profile,"CON_CRS",NULL); Act_LinkFormSubmit (Txt_Another_user_s_profile,"CON_CRS",NULL);
Usr_RestrictLengthAndWriteName (UsrDat,10); fprintf (Gbl.F.Out,"%s<br />%s",UsrDat->FirstName,UsrDat->Surname1);
fprintf (Gbl.F.Out,"</a>"); if (UsrDat->Surname2[0])
fprintf (Gbl.F.Out," %s",UsrDat->Surname2);
fprintf (Gbl.F.Out,"</a>"
"</div>");
Act_FormEnd (); Act_FormEnd ();
} }
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");