Version19.46.4

This commit is contained in:
Antonio Cañas Vargas 2019-10-29 21:41:54 +01:00
parent 15ba1b0616
commit 7c6df6a1d4
20 changed files with 115 additions and 260 deletions

View File

@ -487,14 +487,14 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
#define Log_PLATFORM_VERSION "SWAD 19.46.3 (2019-10-28)"
#define Log_PLATFORM_VERSION "SWAD 19.46.4 (2019-10-28)"
#define CSS_FILE "swad19.45.css"
#define JS_FILE "swad19.39.js"
/*
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
// TODO: Impedir la creación y edición de proyectos si no son editables.
// TODO: Terminar de sustituir <img.../> por Ico_PutIcon ()
Version 19.46.4: Oct 28, 2019 Code refactoring in HTML images. (246247 lines)
Version 19.46.3: Oct 28, 2019 Code refactoring in HTML images. (246390 lines)
Version 19.46.2: Oct 28, 2019 Code refactoring in HTML images. (246519 lines)
Version 19.46.1: Oct 28, 2019 Code refactoring in HTML anchors. (246523 lines)

View File

@ -1180,16 +1180,11 @@ static void For_ShowAForumPost (unsigned PstNum,long PstCod,
HTM_TD_Begin ("class=\"CONTEXT_COL %s\"",
NewPst ? "MSG_TIT_BG_NEW" :
"MSG_TIT_BG");
fprintf (Gbl.F.Out,"<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />",
Cfg_URL_ICON_PUBLIC,
NewPst ? "envelope.svg" :
"envelope-open-text.svg",
NewPst ? Txt_MSG_New :
Txt_MSG_Open,
NewPst ? Txt_MSG_New :
Txt_MSG_Open);
Ico_PutIcon (NewPst ? "envelope.svg" :
"envelope-open-text.svg",
NewPst ? Txt_MSG_New :
Txt_MSG_Open,
"ICO16x16");
HTM_TD_End ();
/***** Write post number *****/
@ -1246,14 +1241,9 @@ static void For_ShowAForumPost (unsigned PstNum,long PstCod,
Txt_FORUM_Post_X_banned,
PstNum);
fprintf (Gbl.F.Out,"<span title=\"%s\">",Gbl.Title); // TODO: Remove?
fprintf (Gbl.F.Out,"<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO_HIDDEN ICO16x16\" />",
Cfg_URL_ICON_PUBLIC,
Enabled ? "eye.svg" :
"eye-slash.svg",
Gbl.Title,
Gbl.Title);
Ico_PutIcon (Enabled ? "eye.svg" :
"eye-slash.svg",
Gbl.Title,"ICO_HIDDEN ICO16x16");
fprintf (Gbl.F.Out,"</span>"); // TODO: Remove?
}
@ -2056,11 +2046,7 @@ static void For_WriteLinkToForum (struct Forum *Forum,
{
/* Check if thread to move is yet in current forum */
if (For_CheckIfThrBelongsToForum (Gbl.Forum.ThreadToMove,Forum))
fprintf (Gbl.F.Out,"<img src=\"%s/paste.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_OPT ICO_HIDDEN ICO16x16\" />",
Cfg_URL_ICON_PUBLIC,
Txt_Copy_not_allowed,Txt_Copy_not_allowed);
Ico_PutIcon ("paste.svg",Txt_Copy_not_allowed,"CONTEXT_OPT ICO_HIDDEN ICO16x16");
else
{
Frm_StartFormAnchor (For_ActionsPasThrFor[Forum->Type],
@ -2094,17 +2080,11 @@ static void For_WriteLinkToForum (struct Forum *Forum,
{
case For_FORUM_GLOBAL_USRS:
case For_FORUM_GLOBAL_TCHS:
fprintf (Gbl.F.Out,"<img src=\"%s/comments.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />",
Cfg_URL_ICON_PUBLIC,ForumName,ForumName);
Ico_PutIcon ("comments.svg",ForumName,"ICO16x16");
break;
case For_FORUM__SWAD__USRS:
case For_FORUM__SWAD__TCHS:
fprintf (Gbl.F.Out,"<img src=\"%s/swad64x64.png\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />",
Cfg_URL_ICON_PUBLIC,ForumName,ForumName);
Ico_PutIcon ("swad64x64.png",ForumName,"ICO16x16");
break;
case For_FORUM_INSTIT_USRS:
case For_FORUM_INSTIT_TCHS:
@ -2120,10 +2100,7 @@ static void For_WriteLinkToForum (struct Forum *Forum,
break;
case For_FORUM_COURSE_USRS:
case For_FORUM_COURSE_TCHS:
fprintf (Gbl.F.Out,"<img src=\"%s/list-ol.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />",
Cfg_URL_ICON_PUBLIC,ForumName,ForumName);
Ico_PutIcon ("list-ol.svg",ForumName,"ICO16x16");
break;
default:
break;
@ -3417,16 +3394,11 @@ static void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],
/***** Put an icon with thread status *****/
HTM_TD_Begin ("class=\"CONTEXT_COL %s\"",BgColor);
fprintf (Gbl.F.Out,"<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />",
Cfg_URL_ICON_PUBLIC,
Thr.NumUnreadPosts ? "envelope.svg" :
"envelope-open-text.svg",
Thr.NumUnreadPosts ? Txt_There_are_new_posts :
Txt_No_new_posts,
Thr.NumUnreadPosts ? Txt_There_are_new_posts :
Txt_No_new_posts);
Ico_PutIcon (Thr.NumUnreadPosts ? "envelope.svg" :
"envelope-open-text.svg",
Thr.NumUnreadPosts ? Txt_There_are_new_posts :
Txt_No_new_posts,
"ICO16x16");
/***** Put button to remove the thread *****/
if (PermissionThreadDeletion[Gbl.Forum.ForumSelected.Type] &

View File

@ -1368,16 +1368,11 @@ static void Grp_ListGroupTypesForEdition (void)
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LM\" style=\"width:16px;\"");
fprintf (Gbl.F.Out,"<img src=\"%s/clock.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"%sCONTEXT_ICO_16x16\" />",
Cfg_URL_ICON_PUBLIC,
Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MustBeOpened ? Txt_The_groups_will_automatically_open :
Txt_The_groups_will_not_automatically_open,
Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MustBeOpened ? Txt_The_groups_will_automatically_open :
Txt_The_groups_will_not_automatically_open,
Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MustBeOpened ? "" :
"ICO_HIDDEN ");
Ico_PutIcon ("clock.svg",
Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MustBeOpened ? Txt_The_groups_will_automatically_open :
Txt_The_groups_will_not_automatically_open,
Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MustBeOpened ? "CONTEXT_ICO_16x16" :
"ICO_HIDDEN CONTEXT_ICO_16x16");
HTM_TD_End ();
HTM_TD_Begin ("class=\"LM\"");
@ -2534,16 +2529,11 @@ static void Grp_PutFormToCreateGroupType (void)
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LM\" style=\"width:20px;\"");
fprintf (Gbl.F.Out,"<img src=\"%s/clock.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"%sCONTEXT_ICO_16x16\" />",
Cfg_URL_ICON_PUBLIC,
Gbl.Crs.Grps.GrpTyp.MustBeOpened ? Txt_The_groups_will_automatically_open :
Txt_The_groups_will_not_automatically_open,
Gbl.Crs.Grps.GrpTyp.MustBeOpened ? Txt_The_groups_will_automatically_open :
Txt_The_groups_will_not_automatically_open,
Gbl.Crs.Grps.GrpTyp.MustBeOpened ? "" :
"ICO_HIDDEN ");
Ico_PutIcon ("clock.svg",
Gbl.Crs.Grps.GrpTyp.MustBeOpened ? Txt_The_groups_will_automatically_open :
Txt_The_groups_will_not_automatically_open,
Gbl.Crs.Grps.GrpTyp.MustBeOpened ? "CONTEXT_ICO_16x16" :
"ICO_HIDDEN CONTEXT_ICO_16x16");
HTM_TD_End ();
HTM_TD_Begin ("class=\"LM\"");

View File

@ -416,11 +416,7 @@ void Hie_WriteBigNameCtyInsCtrDegCrs (void)
switch (Gbl.Hierarchy.Level)
{
case Hie_SYS: // System
fprintf (Gbl.F.Out,"<img src=\"%s/swad64x64.png\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO40x40 TOP_LOGO\" />",
Cfg_URL_ICON_PUBLIC,
Cfg_PLATFORM_SHORT_NAME,Cfg_PLATFORM_FULL_NAME);
Ico_PutIcon ("swad64x64.png",Cfg_PLATFORM_FULL_NAME,"ICO40x40 TOP_LOGO");
break;
case Hie_CTY: // Country
Cty_DrawCountryMap (&Gbl.Hierarchy.Cty,"COUNTRY_MAP_TITLE");

View File

@ -1714,21 +1714,15 @@ void Lay_IndentDependingOnLevel (unsigned Level,bool IsLastItemInLevel[])
for (i = 1;
i < Level;
i++)
fprintf (Gbl.F.Out,"<img src=\"%s/%s20x20.gif\""
" alt=\"\" title=\"\""
" class=\"ICO25x25\" />",
Cfg_URL_ICON_PUBLIC,
IsLastItemInLevel[i] ? "tr" :
"subleft");
Ico_PutIcon (IsLastItemInLevel[i] ? "tr20x20.gif" :
"subleft20x20.gif",
"","ICO25x25");
/***** Level *****/
if (Level)
fprintf (Gbl.F.Out,"<img src=\"%s/%s20x20.gif\""
" alt=\"\" title=\"\""
" class=\"ICO25x25\" />",
Cfg_URL_ICON_PUBLIC,
IsLastItemInLevel[Level] ? "subend" :
"submid");
Ico_PutIcon (IsLastItemInLevel[Level] ? "subend20x20.gif" :
"submid20x20.gif",
"","ICO25x25");
}
/*****************************************************************************/

View File

@ -1334,11 +1334,7 @@ static void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe,
snprintf (Gbl.Title,sizeof (Gbl.Title),
Txt_Email_X_confirmed,
row[0]);
fprintf (Gbl.F.Out,"<img src=\"%s/check-circle.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />",
Cfg_URL_ICON_PUBLIC,
Gbl.Title,Gbl.Title);
Ico_PutIcon ("check-circle.svg",Gbl.Title,"ICO16x16");
}
/* Form to change user's email */

View File

@ -1221,10 +1221,7 @@ static void Mch_PutFormNewMatch (struct Game *Game)
/***** Put icon with link *****/
Frm_LinkFormSubmit (Txt_Play,NULL,NULL);
fprintf (Gbl.F.Out,"<img src=\"%s/play.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_OPT ICO_HIGHLIGHT ICO64x64\" />",
Cfg_URL_ICON_PUBLIC,Txt_Play,Txt_Play);
Ico_PutIcon ("play.svg",Txt_Play,"CONTEXT_OPT ICO_HIGHLIGHT ICO64x64");
Frm_LinkFormEnd ();
/***** End box *****/
@ -2909,11 +2906,7 @@ static void Mch_PutBigButtonClose (void)
static void Mch_ShowWaitImage (const char *Txt)
{
HTM_DIV_Begin ("class=\"MCH_WAIT_CONTAINER\"");
fprintf (Gbl.F.Out,"<img src=\"%s/wait.gif\""
" alt=\"%s\" title=\"%s\" class=\"MCH_WAIT_IMG\" />",
Cfg_URL_ICON_PUBLIC,
Txt,
Txt);
Ico_PutIcon ("wait.gif",Txt,"MCH_WAIT_IMG");
HTM_DIV_End ();
}

View File

@ -392,12 +392,8 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassInput)
/***** Icon 'clip' *****/
HTM_DIV_Begin ("id=\"%s_med_ico\"",Id); // <id>_med_ico
HTM_A_Begin ("href=\"\" onclick=\"mediaActivateMediaUploader('%s');return false;\"",
Id);
fprintf (Gbl.F.Out,"<img src=\"%s/paperclip.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO_HIGHLIGHT ICOx16\" />",
Cfg_URL_ICON_PUBLIC,
Txt_Multimedia,Txt_Multimedia);
Id);
Ico_PutIcon ("paperclip.svg",Txt_Multimedia,"ICO_HIGHLIGHT ICOx16");
HTM_A_End ();
HTM_DIV_End (); // <id>_med_ico
@ -491,10 +487,7 @@ static void Med_PutIconMediaUploader (const char UniqueId[Frm_MAX_BYTES_ID + 1],
UniqueId,MediaUploader->IconSuffix);
HTM_A_Begin ("href=\"\" onclick=\"%s('%s');return false;\"",
MediaUploader->FunctionName,UniqueId);
fprintf (Gbl.F.Out,"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\""
" class=\"ICO_HIGHLIGHT ICOx16\" />",
Cfg_URL_ICON_PUBLIC,MediaUploader->Icon,
MediaUploader->Title,MediaUploader->Title);
Ico_PutIcon (MediaUploader->Icon,MediaUploader->Title,"ICO_HIGHLIGHT ICOx16");
HTM_A_End ();
HTM_DIV_End (); // <id>_IconSuffix
}
@ -1642,7 +1635,6 @@ static void Med_ShowGIF (struct Media *Media,
/* Image */
fprintf (Gbl.F.Out,"<img src=\"%s\" class=\"%s\" alt=\"\"",
URL_PNG,
ClassMedia);
if (Media->Title)

View File

@ -2968,15 +2968,11 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod)
Gbl.Msg.TypeOfMessages == Msg_MESSAGES_RECEIVED ? (Open ? "BG_MSG_BLUE" :
"BG_MSG_GREEN") :
"BG_MSG_BLUE");
fprintf (Gbl.F.Out,"<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />",
Cfg_URL_ICON_PUBLIC,
Gbl.Msg.TypeOfMessages == Msg_MESSAGES_RECEIVED ? (Open ? (Replied ? "reply.svg" :
"envelope-open-text.svg") :
"envelope.svg") :
"share.svg",
Title,Title);
Ico_PutIcon (Gbl.Msg.TypeOfMessages == Msg_MESSAGES_RECEIVED ? (Open ? (Replied ? "reply.svg" :
"envelope-open-text.svg") :
"envelope.svg") :
"share.svg",
Title,"ICO16x16");
/***** Form to delete message *****/
fprintf (Gbl.F.Out,"<br />");
@ -3200,52 +3196,50 @@ void Msg_WriteMsgAuthor (struct UsrData *UsrDat,bool Enabled,const char *BgColor
extern const char *Txt_Unknown_or_without_photo;
bool ShowPhoto = false;
char PhotoURL[PATH_MAX + 1];
bool WriteAuthor = false;
bool WriteAuthor;
/***** Begin table *****/
/***** Write author name or don't write it? *****/
WriteAuthor = false;
if (Enabled)
if (UsrDat->UsrCod > 0)
WriteAuthor = true;
/***** Begin table and row *****/
HTM_TABLE_BeginPadding (2);
HTM_TR_Begin (NULL);
/***** Start first column *****/
/***** Start first column with author's photo
(if author has a web page, put a link to it) *****/
if (BgColor)
HTM_TD_Begin ("class=\"CT %s\" style=\"width:30px;\"",BgColor);
else
HTM_TD_Begin ("class=\"CT\" style=\"width:30px;\"");
/***** Write author name or don't write it? *****/
if (Enabled)
if (UsrDat->UsrCod > 0)
WriteAuthor = true;
if (WriteAuthor)
{
/***** First column with author's photo (if author has a web page, put a link to it) *****/
ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL,
"PHOTO30x40",Pho_ZOOM,false);
HTM_TD_End ();
}
else
Ico_PutIcon ("usr_bl.jpg",Txt_Unknown_or_without_photo,"PHOTO30x40");
HTM_TD_End ();
/***** Second column with user name (if author has a web page, put a link to it) *****/
/***** Second column with user name (if author has a web page, put a link to it) *****/
if (WriteAuthor)
{
if (BgColor)
HTM_TD_Begin ("class=\"LT %s\"",BgColor);
else
HTM_TD_Begin ("class=\"LT\"");
HTM_DIV_Begin ("class=\"AUTHOR_2_LINES\""); // Limited width
Usr_WriteFirstNameBRSurnames (UsrDat);
HTM_DIV_End ();
}
else
{
fprintf (Gbl.F.Out,"<img src=\"%s/usr_bl.jpg\""
" alt=\"%s\" title=\"%s\""
" class=\"PHOTO30x40\" />",
Cfg_URL_ICON_PUBLIC,
Txt_Unknown_or_without_photo,
Txt_Unknown_or_without_photo);
HTM_TD_End ();
if (BgColor)
HTM_TD_Begin ("class=\"LM %s\"",BgColor);
else
@ -3254,9 +3248,9 @@ void Msg_WriteMsgAuthor (struct UsrData *UsrDat,bool Enabled,const char *BgColor
/***** End second column *****/
HTM_TD_End ();
HTM_TR_End ();
/***** End table *****/
/***** End row and table *****/
HTM_TR_End ();
HTM_TABLE_End ();
}
@ -3371,16 +3365,11 @@ static void Msg_WriteMsgFrom (struct UsrData *UsrDat,bool Deleted)
/***** Put an icon to show if user has read the message *****/
HTM_TD_Begin ("class=\"LM\" style=\"width:20px;\"");
fprintf (Gbl.F.Out,"<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />",
Cfg_URL_ICON_PUBLIC,
Deleted ? "share-red.svg" :
"share.svg",
Deleted ? Txt_MSG_Sent_and_deleted :
Txt_MSG_Sent,
Deleted ? Txt_MSG_Sent_and_deleted :
Txt_MSG_Sent);
Ico_PutIcon (Deleted ? "share-red.svg" :
"share.svg",
Deleted ? Txt_MSG_Sent_and_deleted :
Txt_MSG_Sent,
"ICO16x16");
HTM_TD_End ();
/***** Put user's photo *****/
@ -3534,14 +3523,11 @@ static void Msg_WriteMsgTo (long MsgCod)
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LM\" style=\"width:20px;\"");
fprintf (Gbl.F.Out,"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />",
Cfg_URL_ICON_PUBLIC,
OpenByDst ? (Deleted ? "envelope-open-text-red.svg" :
"envelope-open-text.svg") :
(Deleted ? "envelope-red.svg" :
"envelope.svg"),
Title,Title);
Ico_PutIcon (OpenByDst ? (Deleted ? "envelope-open-text-red.svg" :
"envelope-open-text.svg") :
(Deleted ? "envelope-red.svg" :
"envelope.svg"),
Title,"ICO16x16");
HTM_TD_End ();
/* Put user's photo */

View File

@ -253,11 +253,7 @@ static void Net_ShowAWebOrSocialNet (const char *URL,
/***** Write link and icon *****/
HTM_DIV_Begin ("class=\"ICO_HIGHLIGHT\" style=\"display:inline;\"");
HTM_A_Begin ("href=\"%s\" target=\"_blank\" title=\"%s\"",URL,Title);
fprintf (Gbl.F.Out,"<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />",
Cfg_URL_ICON_PUBLIC,Icon,
Title,Title);
Ico_PutIcon (Icon,Title,"ICO16x16");
HTM_A_End ();
HTM_DIV_End ();
}

View File

@ -473,10 +473,7 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing,long HighlightNotCod)
HTM_DIV_Begin ("class=\"CM\"");
RSS_BuildRSSLink (RSSLink,Gbl.Hierarchy.Crs.CrsCod);
HTM_A_Begin ("href=\"%s\" target=\"_blank\"",RSSLink);
fprintf (Gbl.F.Out,"<img src=\"%s/rss-square.svg\""
" alt=\"RSS\" title=\"RSS\""
" class=\"ICO16x16\" />",
Cfg_URL_ICON_PUBLIC);
Ico_PutIcon ("rss-square.svg","RSS","ICO16x16");
HTM_A_End ();
HTM_DIV_End ();
break;

View File

@ -2498,21 +2498,26 @@ static void Pho_ShowDegreeAvgPhotoAndStat (struct Degree *Deg,
}
/***** Show photo *****/
fprintf (Gbl.F.Out,"<img src=\"");
if (PhotoURL[0])
{
fprintf (Gbl.F.Out,"%s\"",PhotoURL);
fprintf (Gbl.F.Out,"<img src=\"%s\"",PhotoURL);
if (PhotoCaption[0])
fprintf (Gbl.F.Out," onmouseover=\"zoom(this,'%s','%s');\""
" onmouseout=\"noZoom();\"",
PhotoURL,IdCaption);
fprintf (Gbl.F.Out," alt=\"%s\""
" style=\"width:%upx; height:%upx;\" />",
Deg->ShrtName,
PhotoWidth,PhotoHeight);
}
else
fprintf (Gbl.F.Out,"%s/usr_bl.jpg\"",Cfg_URL_ICON_PUBLIC);
fprintf (Gbl.F.Out," alt=\"%s\""
" style=\"width:%upx; height:%upx;\" />",
Deg->ShrtName,
PhotoWidth,PhotoHeight);
{
fprintf (Gbl.F.Out,"<img src=\"%s/usr_bl.jpg\" alt=\"%s\""
" style=\"width:%upx; height:%upx;\" />",
Cfg_URL_ICON_PUBLIC,
Deg->ShrtName,
PhotoWidth,PhotoHeight);
}
/***** Caption *****/
HTM_DIV_Begin ("class=\"CLASSPHOTO_CAPTION\"");

View File

@ -1443,8 +1443,7 @@ static bool Prj_CheckIfPrjIsFaulty (long PrjCod,struct Prj_Faults *Faults)
static void Prj_PutWarningIcon (void)
{
fprintf (Gbl.F.Out,"<img src=\"%s/%s\" alt=\"\" class=\"ICO16x16\" />",
Cfg_URL_ICON_PUBLIC,"warning64x64.gif");
Ico_PutIcon ("warning64x64.gif","","ICO16x16");
}
/*****************************************************************************/

View File

@ -278,10 +278,7 @@ static void Rep_PutLinkToMyUsageReport (struct Rep_Report *Report)
HTM_A_Begin ("href=\"%s\" class=\"FILENAME_TXT\" title=\"%s\" target=\"_blank\"",
Report->Permalink,
Txt_Report);
fprintf (Gbl.F.Out,"<img src=\"%s/file-alt.svg\" alt=\"%s\""
" class=\"ICO64x64\" />",
Cfg_URL_ICON_PUBLIC,
Txt_Report);
Ico_PutIcon ("file-alt.svg",Txt_Report,"ICO64x64");
fprintf (Gbl.F.Out,"<br />%s",Report->FilenameReport);
HTM_A_End ();
HTM_DIV_End ();

View File

@ -2352,8 +2352,7 @@ static void Sta_DrawBarColors (Sta_ColorType_t ColorType,float HitsMax)
Sta_SetColor (ColorType,(float) NumColor,(float) GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH,&R,&G,&B);
HTM_TD_Begin ("class=\"LM\" style=\"width:1px; background-color:#%02X%02X%02X;\"",
R,G,B);
fprintf (Gbl.F.Out,"<img src=\"%s/tr1x14.gif\" alt=\"\" title=\"\" />",
Cfg_URL_ICON_PUBLIC);
Ico_PutIcon ("tr1x14.gif","","");
HTM_TD_End ();
}
HTM_TR_End ();

View File

@ -3393,12 +3393,7 @@ void Tst_WriteAnswersEdit (long QstCod)
is correct or wrong (row[4]) */
HTM_TD_Begin ("class=\"BT%u\"",Gbl.RowEvenOdd);
if (row[4][0] == 'Y')
fprintf (Gbl.F.Out,"<img src=\"%s/check.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO_16x16\" />",
Cfg_URL_ICON_PUBLIC,
Txt_TST_Answer_given_by_the_teachers,
Txt_TST_Answer_given_by_the_teachers);
Ico_PutIcon ("check.svg",Txt_TST_Answer_given_by_the_teachers,"CONTEXT_ICO_16x16");
HTM_TD_End ();
/* Write the number of option */
@ -5346,10 +5341,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
DisplayRightColumn ? " style=\"display:none;\"" : // Answer does have content ==> Hide icon
"",
NumOpt);
fprintf (Gbl.F.Out,"<img src=\"%s/caret-right.svg\""
" alt=\"%s\" title=\"%s\" class=\"ICO16x16\" />",
Cfg_URL_ICON_PUBLIC,
Gbl.Title,Gbl.Title);
Ico_PutIcon ("caret-right.svg",Gbl.Title,"ICO16x16");
HTM_A_End ();
/* Icon to contract (hide the answer) */
@ -5362,10 +5354,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
DisplayRightColumn ? "" :
" style=\"display:none;\"", // Answer does not have content ==> Hide icon
NumOpt);
fprintf (Gbl.F.Out,"<img src=\"%s/caret-down.svg\""
" alt=\"%s\" title=\"%s\" class=\"ICO16x16\" />",
Cfg_URL_ICON_PUBLIC,
Gbl.Title,Gbl.Title);
Ico_PutIcon ("caret-down.svg",Gbl.Title,"ICO16x16");
HTM_A_End ();
HTM_TD_End ();

View File

@ -1006,16 +1006,11 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
/***** Put icon to indicate that a question does not exist in database *****/
HTM_TD_Begin ("class=\"BT%u CT\"",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO_16x16\" />",
Cfg_URL_ICON_PUBLIC,
QuestionExists ? "tr16x16.gif" :
"check-circle.svg",
QuestionExists ? Txt_Existing_question :
Txt_New_question,
QuestionExists ? Txt_Existing_question :
Txt_New_question);
Ico_PutIcon (QuestionExists ? "tr16x16.gif" :
"check-circle.svg",
QuestionExists ? Txt_Existing_question :
Txt_New_question,
"CONTEXT_ICO_16x16");
HTM_TD_End ();
/***** Write number of question *****/
@ -1065,14 +1060,9 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
Gbl.Test.AnswerType == Tst_ANS_MULTIPLE_CHOICE)
/* Put an icon that indicates whether shuffle is enabled or not */
if (Gbl.Test.Shuffle)
fprintf (Gbl.F.Out,"<img src=\"%s/check.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"%sICO16x16\" />",
Cfg_URL_ICON_PUBLIC,
Txt_TST_Answer_given_by_the_teachers,
Txt_TST_Answer_given_by_the_teachers,
QuestionExists ? "ICO_HIDDEN " :
"");
Ico_PutIcon ("check.svg",Txt_TST_Answer_given_by_the_teachers,
QuestionExists ? "ICO_HIDDEN ICO16x16" :
"ICO16x16");
HTM_TD_End ();
/***** Write the stem and the answers *****/
@ -1134,14 +1124,9 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
/* Put an icon that indicates whether the answer is correct or wrong */
HTM_TD_Begin ("class=\"BT%u\"",Gbl.RowEvenOdd);
if (Gbl.Test.Answer.Options[NumOpt].Correct)
fprintf (Gbl.F.Out,"<img src=\"%s/check.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"%sCONTEXT_ICO_16x16\" />",
Cfg_URL_ICON_PUBLIC,
Txt_TST_Answer_given_by_the_teachers,
Txt_TST_Answer_given_by_the_teachers,
QuestionExists ? "ICO_HIDDEN " :
"");
Ico_PutIcon ("check.svg",Txt_TST_Answer_given_by_the_teachers,
QuestionExists ? "ICO_HIDDEN CONTEXT_ICO_16x16" :
"CONTEXT_ICO_16x16");
HTM_TD_End ();
/* Write the number of option */

View File

@ -2031,12 +2031,7 @@ static void TL_PutFormGoToAction (const struct TL_Note *SocNot)
"%s ICO_HIGHLIGHT",
The_ClassFormInBoxBold[Gbl.Prefs.Theme]);
Frm_LinkFormSubmitUnique (Txt_TIMELINE_NOTE[SocNot->NoteType],Class);
fprintf (Gbl.F.Out,"<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO_x16\" />",
Cfg_URL_ICON_PUBLIC,TL_Icons[SocNot->NoteType],
Txt_TIMELINE_NOTE[SocNot->NoteType],
Txt_TIMELINE_NOTE[SocNot->NoteType]);
Ico_PutIcon (TL_Icons[SocNot->NoteType],Txt_TIMELINE_NOTE[SocNot->NoteType],"CONTEXT_ICO_x16");
fprintf (Gbl.F.Out,"&nbsp;%s",Txt_TIMELINE_NOTE[SocNot->NoteType]);
Frm_LinkFormEnd ();
Frm_EndForm ();
@ -2502,10 +2497,7 @@ static void TL_PutIconToToggleCommentNote (const char UniqueId[Frm_MAX_BYTES_ID
HTM_DIV_Begin ("id=\"%s_ico\" class=\"TL_ICO_COM_OFF\"",UniqueId);
HTM_A_Begin ("href=\"\" onclick=\"toggleNewComment ('%s');return false;\"",
UniqueId);
fprintf (Gbl.F.Out,"<img src=\"%s/edit.svg\" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO_16x16\" />",
Cfg_URL_ICON_PUBLIC,
Txt_Comment,Txt_Comment);
Ico_PutIcon ("edit.svg",Txt_Comment,"CONTEXT_ICO_16x16");
HTM_A_End ();
HTM_DIV_End ();
}
@ -2520,11 +2512,7 @@ static void TL_PutIconCommentDisabled (void)
/***** Disabled icon to comment a note *****/
HTM_DIV_Begin ("class=\"TL_ICO_COM_OFF TL_ICO_DISABLED\"");
fprintf (Gbl.F.Out,"<img src=\"%s/edit.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />",
Cfg_URL_ICON_PUBLIC,
Txt_Comment,Txt_Comment);
Ico_PutIcon ("edit.svg",Txt_Comment,"ICO16x16");
HTM_DIV_End ();
}

View File

@ -2608,11 +2608,7 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) (void))
/***** User's ID/nickname *****/
HTM_DIV_Begin ("class=\"LM\"");
fprintf (Gbl.F.Out,"<label for=\"UsrId\">");
fprintf (Gbl.F.Out,"<img src=\"%s/user.svg\" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO_16x16\" />",
Cfg_URL_ICON_PUBLIC,
Txt_User[Usr_SEX_UNKNOWN],
Txt_User[Usr_SEX_UNKNOWN]);
Ico_PutIcon ("user.svg",Txt_User[Usr_SEX_UNKNOWN],"CONTEXT_ICO_16x16");
fprintf (Gbl.F.Out,"</label>");
fprintf (Gbl.F.Out,"<input type=\"text\" id=\"UsrId\" name=\"UsrId\""
" size=\"18\" maxlength=\"%u\" placeholder=\"%s\""
@ -2626,11 +2622,7 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) (void))
/***** User's password *****/
HTM_DIV_Begin ("class=\"LM\"");
fprintf (Gbl.F.Out,"<label for=\"UsrPwd\">");
fprintf (Gbl.F.Out,"<img src=\"%s/key.svg\" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO_16x16\" />",
Cfg_URL_ICON_PUBLIC,
Txt_Password,
Txt_Password);
Ico_PutIcon ("key.svg",Txt_Password,"CONTEXT_ICO_16x16");
fprintf (Gbl.F.Out,"</label>");
fprintf (Gbl.F.Out,"<input type=\"password\" id=\"UsrPwd\" name=\"UsrPwd\""
" size=\"18\" maxlength=\"%u\" placeholder=\"%s\" />",
@ -6140,13 +6132,7 @@ static void Usr_FormToSelectUsrListType (void (*FuncParams) (void),
The_ClassFormInBoxNoWrap[Gbl.Prefs.Theme],
Gbl.Action.Act == ActReqMsgUsr ? "CopyMessageToHiddenFields();" :
NULL);
fprintf (Gbl.F.Out,"<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" />",
Cfg_URL_ICON_PUBLIC,
Usr_IconsClassPhotoOrList[ListType],
Txt_USR_LIST_TYPES[ListType],
Txt_USR_LIST_TYPES[ListType]);
Ico_PutIcon (Usr_IconsClassPhotoOrList[ListType],Txt_USR_LIST_TYPES[ListType],"ICO20x20");
fprintf (Gbl.F.Out," %s",Txt_USR_LIST_TYPES[ListType]);
Frm_LinkFormEnd ();

View File

@ -578,12 +578,7 @@ static void ZIP_ShowLinkToDownloadZIP (const char *FileName,const char *URL,
Txt_ZIP_file,
Txt_ZIP_file);
fprintf (Gbl.F.Out,"&nbsp;%s&nbsp;",FileName);
fprintf (Gbl.F.Out,"<img src=\"%s/download.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO40x40\" />",
Cfg_URL_ICON_PUBLIC,
Txt_Download,
Txt_Download);
Ico_PutIcon ("download.svg",Txt_Download,"ICO40x40");
HTM_A_End ();
HTM_TD_End ();
HTM_TR_End ();