Version 14.117.13

This commit is contained in:
Antonio Cañas Vargas 2015-07-22 11:56:26 +02:00
parent 0bb6c695c4
commit 51fcf05c71
5 changed files with 37 additions and 104 deletions

View File

@ -103,11 +103,13 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 14.117.12 (2015/07/22)"
#define Log_PLATFORM_VERSION "SWAD 14.117.13 (2015/07/22)"
// 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
/*
Version 14.117.13:Jul 22, 2015 Checking "alt" and "title" in all images.
Removed unused function about mail domains. (185153 lines)
Version 14.117.12:Jul 22, 2015 Checking "alt" and "title" in all images. (185213 lines)
Version 14.117.11:Jul 22, 2015 Checking "alt" and "title" in all images. (185187 lines)
Version 14.117.10:Jul 21, 2015 Checking "alt" and "title" in all images. (185157 lines)

View File

@ -781,90 +781,6 @@ static void Mai_CreateMailDomain (struct Mail *Mai)
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
}
/*****************************************************************************/
/********************** Write menu with some mail domains ********************/
/*****************************************************************************/
void Mai_WriteMenuWithMailDomains (void)
{
extern const char *Txt_Mail_domains_allowed_for_notifications;
unsigned NumMai;
/***** Get list of mail domains *****/
Mai_GetListMailDomainsAllowedForNotif ();
/***** Header *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"DAT\" style=\"width:120px;"
" text-align:center;\">"
"%s<br />",
Txt_Mail_domains_allowed_for_notifications);
/***** Start table *****/
fprintf (Gbl.F.Out,"<table style=\"width:120px;\">"
"<tr>"
"<td style=\"width:4px; text-align:left;\">"
"<img src=\"%s/ewbw1_4x4.gif\" alt=\"\""
" style=\"width:4px; height:4px;\" />"
"</td>"
"<td style=\"text-align:left;"
" background-image:url('%s/mbw1_1x4.gif');"
" background-repeat:repeat-x;\">"
"</td>"
"<td style=\"width:4px; text-align:left;\">"
"<img src=\"%s/ewbw2_4x4.gif\" alt=\"\""
" style=\"width:4px; height:4px;\" />"
"</td>"
"</tr>",
Gbl.Prefs.IconsURL,Gbl.Prefs.IconsURL,Gbl.Prefs.IconsURL);
/***** Write all the mail domains *****/
for (NumMai = 0;
NumMai < Gbl.Mails.Num;
NumMai++)
/* Write data of this mail domain */
fprintf (Gbl.F.Out,"<tr>"
"<td style=\"width:4px; text-align:left;"
" background-image:url('%s/mbw2_4x1.gif');"
" background-repeat:repeat-y;\">"
"</td>"
"<td class=\"DAT\" title=\"%s\" style=\"width:112px;"
" text-align:left;\">"
"%s"
"</td>"
"<td style=\"width:4px; text-align:left;"
" background-image:url('%s/mbw3_4x1.gif');"
" background-repeat:repeat-y;\">"
"</td>"
"</tr>",
Gbl.Prefs.IconsURL,
Gbl.Mails.Lst[NumMai].Info,
Gbl.Mails.Lst[NumMai].Domain,
Gbl.Prefs.IconsURL);
/***** End table *****/
fprintf (Gbl.F.Out,"<tr>"
"<td style=\"width:4px; text-align:left;\">"
"<img src=\"%s/ewbw3_4x4.gif\" alt=\"\""
" style=\"width:4px; height:4px;\" />"
"</td>"
"<td style=\"background-image:url('%s/mbw4_1x4.gif');"
" background-repeat:repeat-x;\">"
"</td>"
"<td style=\"width:4px; text-align:left;\">"
"<img src=\"%s/ewbw4_4x4.gif\" alt=\"\""
" style=\"width:4px; height:4px;\" />"
"</td>"
"</tr>"
"</table>"
"</td>"
"</tr>",
Gbl.Prefs.IconsURL,Gbl.Prefs.IconsURL,Gbl.Prefs.IconsURL);
/***** Free list of mail domains *****/
Mai_FreeListMailDomains ();
}
/*****************************************************************************/
/**************** Check whether an e-mail address if valid *******************/
/*****************************************************************************/
@ -1091,10 +1007,10 @@ void Mai_ShowFormChangeUsrEmail (void)
{
sprintf (Gbl.Title,Txt_Email_X_confirmed,row[0]);
fprintf (Gbl.F.Out,"<img src=\"%s/ok_green16x16.gif\""
" alt=\"\" title=\"%s\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON16x16\" />",
Gbl.Prefs.IconsURL,
Gbl.Title);
Gbl.Title,Gbl.Title);
}
/* Link to QR code */

View File

@ -65,7 +65,6 @@ void Mai_RemoveMailDomain (void);
void Mai_RenameMailDomainShort (void);
void Mai_RenameMailDomainFull (void);
void Mai_RecFormNewMailDomain (void);
void Mai_WriteMenuWithMailDomains (void);
bool Mai_CheckIfEmailIsValid (const char *Email);
bool Mai_GetEmailFromUsrCod (long UsrCod,char *Email,bool *Confirmed);

View File

@ -208,13 +208,14 @@ void Mnu_WriteHorizontalMenuThisTabDesktop (void)
Act_LinkFormSubmit (Title,IsTheSelectedAction ? The_ClassMenuOn[Gbl.Prefs.Theme] :
The_ClassMenuOff[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"<img src=\"%s/%s/%s64x64.gif\""
" alt=\"%s\" class=\"ICON28x28\""
" style=\"margin:0;\" />"
" alt=\"%s\" title=\"%s\""
" class=\"ICON28x28\" />"
"<div>%s</div>"
"</a>",
Gbl.Prefs.PathIconSet,Cfg_ICON_ACTION,
Act_Actions[NumAct].Icon,
Txt_MENU_TITLE[Gbl.CurrentTab][NumOptInMenu],
Txt_MENU_TITLE[Gbl.CurrentTab][NumOptInMenu],
Txt_MENU_TITLE[Gbl.CurrentTab][NumOptInMenu]);
Act_FormEnd ();

View File

@ -2573,6 +2573,7 @@ static void Msg_ShowASentOrReceivedMessage (Msg_TypeOfMessages_t TypeOfMessages,
extern const char *Txt_MSG_To;
extern const char *Txt_MSG_Message;
struct UsrData UsrDat;
const char *Title;
bool FromThisCrs = false; // Initialized to avoid warning
char CreatTime[4+2+2+2+2+2+1]; // Creation time of a message in YYYYMMDDHHMMSS format
long CrsCod;
@ -2601,6 +2602,10 @@ static void Msg_ShowASentOrReceivedMessage (Msg_TypeOfMessages_t TypeOfMessages,
}
/***** Put an icon with message status *****/
Title = TypeOfMessages == Msg_MESSAGES_RECEIVED ? (Open ? (Replied ? Txt_MSG_Replied :
Txt_MSG_Not_replied) :
Txt_MSG_Unopened) :
Txt_MSG_Sent;
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s\" style=\"width:16px;"
" text-align:center; vertical-align:top;\">"
@ -2609,7 +2614,8 @@ static void Msg_ShowASentOrReceivedMessage (Msg_TypeOfMessages_t TypeOfMessages,
"<td style=\"width:16px; padding:0;"
" text-align:center; vertical-align:top;\">"
"<img src=\"%s/msg-%s16x16.gif\""
" alt=\"\" title=\"%s\" class=\"ICON16x16B\" />"
" alt=\"%s\" title=\"%s\""
" class=\"ICON16x16B\" />"
"</td>"
"</tr>",
TypeOfMessages == Msg_MESSAGES_RECEIVED ? (Open ? "BG_MSG_BLUE" :
@ -2621,10 +2627,8 @@ static void Msg_ShowASentOrReceivedMessage (Msg_TypeOfMessages_t TypeOfMessages,
"open") :
"unread") :
"fwd",
TypeOfMessages == Msg_MESSAGES_RECEIVED ? (Open ? (Replied ? Txt_MSG_Replied :
Txt_MSG_Not_replied) :
Txt_MSG_Unopened) :
Txt_MSG_Sent);
Title,Title);
/***** Form to delete message *****/
fprintf (Gbl.F.Out,"<tr>");
Msg_PutFormToDeleteMessage (MsgCod,TypeOfMessages);
@ -2836,6 +2840,7 @@ static void Msg_WriteSentOrReceivedMsgSubject (Msg_TypeOfMessages_t TypeOfMessag
void Msg_WriteMsgAuthor (struct UsrData *UsrDat,unsigned WidthOfNameColumn,unsigned MaxCharsInName,
const char *Style,bool Enabled,const char *BgColor)
{
extern const char *Txt_Unknown_or_without_photo;
bool ShowPhoto = false;
char PhotoURL[PATH_MAX+1];
bool WriteAuthor = false;
@ -2875,10 +2880,15 @@ void Msg_WriteMsgAuthor (struct UsrData *UsrDat,unsigned WidthOfNameColumn,unsig
}
else
{
fprintf (Gbl.F.Out,"<img src=\"%s/usr_bl.jpg\" class=\"PHOTO24x32\" />"
fprintf (Gbl.F.Out,"<img src=\"%s/usr_bl.jpg\""
" alt=\"%s\" title=\"%s\""
" class=\"PHOTO24x32\" />"
"</td>"
"<td class=\"%s\" style=\"width:%upx; text-align:left;",
Gbl.Prefs.IconsURL,Style,WidthOfNameColumn);
"<td class=\"%s\""
" style=\"width:%upx; text-align:left;",
Gbl.Prefs.IconsURL,
Txt_Unknown_or_without_photo,Txt_Unknown_or_without_photo,
Style,WidthOfNameColumn);
if (BgColor)
fprintf (Gbl.F.Out," background-color:%s;",BgColor);
fprintf (Gbl.F.Out,"\">&nbsp;");
@ -3003,11 +3013,13 @@ static void Msg_WriteMsgFrom (struct UsrData *UsrDat,bool Deleted)
"<td style=\"width:16px; text-align:left;"
" vertical-align:middle;\">"
"<img src=\"%s/%s16x16.gif\""
" alt=\"\" title=\"%s\" class=\"ICON16x16\" />"
" alt=\"%s\" title=\"%s\" class=\"ICON16x16\" />"
"</td>",
Gbl.Prefs.IconsURL,
Deleted ? "msg-fwd-del" :
"msg-fwd",
Deleted ? Txt_MSG_Sent_and_deleted :
Txt_MSG_Sent,
Deleted ? Txt_MSG_Sent_and_deleted :
Txt_MSG_Sent);
@ -3076,6 +3088,7 @@ static void Msg_WriteMsgTo (Msg_TypeOfMessages_t TypeOfMessages,long MsgCod)
bool OpenByDst;
bool UsrValid;
bool ShowPhoto;
const char *Title;
char PhotoURL[PATH_MAX+1];
/***** Get number of recipients of a message from database *****/
@ -3139,21 +3152,23 @@ static void Msg_WriteMsgTo (Msg_TypeOfMessages_t TypeOfMessages,long MsgCod)
UsrValid = Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat);
/* Put an icon to show if user has read the message */
Title = OpenByDst ? (Deleted ? Txt_MSG_Open_and_deleted :
Txt_MSG_Open) :
(Deleted ? Txt_MSG_Deleted_without_opening :
Txt_MSG_Unopened);
fprintf (Gbl.F.Out,"<tr>"
"<td style=\"width:16px; text-align:left;"
" vertical-align:middle;\">"
"<img src=\"%s/%s16x16.gif\""
" alt=\"\" title=\"%s\" class=\"ICON16x16\" />"
" alt=\"%s\" title=\"%s\""
" class=\"ICON16x16\" />"
"</td>",
Gbl.Prefs.IconsURL,
OpenByDst ? (Deleted ? "msg-open-del" :
"msg-open") :
(Deleted ? "msg-unread-del" :
"msg-unread"),
OpenByDst ? (Deleted ? Txt_MSG_Open_and_deleted :
Txt_MSG_Open) :
(Deleted ? Txt_MSG_Deleted_without_opening :
Txt_MSG_Unopened));
Title,Title);
/* Put user's photo */
fprintf (Gbl.F.Out,"<td style=\"width:24px; text-align:center;"