Version 16.252.3

This commit is contained in:
Antonio Cañas Vargas 2017-09-11 09:05:26 +02:00
parent d6a7ba9cd0
commit bfacb95c98
8 changed files with 38 additions and 33 deletions

View File

@ -238,13 +238,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.252.2 (2017-09-10)"
#define Log_PLATFORM_VERSION "SWAD 16.252.3 (2017-09-11)"
#define CSS_FILE "swad16.252.2.css"
#define JS_FILE "swad16.206.3.js"
// 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 16.252.3: Sep 11, 2017 HTML optimization in icons. (226822 lines)
Version 16.252.2: Sep 10, 2017 Code refactoring in edition of syllabus. (226819 lines)
Version 16.252.1: Sep 09, 2017 Icons to move up and down questions in a game. (226864 lines)
Version 16.252: Sep 08, 2017 Icons to move up and down questions in a game. (226852 lines)

View File

@ -5509,11 +5509,9 @@ static void Brw_PutIconRemoveFile (const char PathInTree[PATH_MAX + 1],
PathInTree,FileName,
Gbl.FileBrowser.FileType,-1L);
sprintf (Gbl.Title,Txt_Remove_FILE_OR_LINK_X,FileNameToShow);
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_OPT ICO_HIGHLIGHT\">"
"<input type=\"image\" src=\"%s/remove-on64x64.png\""
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/remove-on64x64.png\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" />"
"</div>",
" class=\"CONTEXT_OPT ICO_HIGHLIGHT ICO20x20\" />",
Gbl.Prefs.IconsURL,
Gbl.Title,
Gbl.Title);
@ -5544,11 +5542,9 @@ static void Brw_PutIconRemoveDir (const char PathInTree[PATH_MAX + 1],
PathInTree,FileName,
Brw_IS_FOLDER,-1L);
sprintf (Gbl.Title,Txt_Remove_folder_X,FileNameToShow);
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_OPT ICO_HIGHLIGHT\">"
"<input type=\"image\" src=\"%s/remove-on64x64.png\""
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/remove-on64x64.png\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" />"
"</div>",
" class=\"CONTEXT_OPT ICO_HIGHLIGHT ICO20x20\" />",
Gbl.Prefs.IconsURL,
Gbl.Title,
Gbl.Title);

View File

@ -2805,7 +2805,7 @@ static void Gam_ListOneOrMoreQuestionsForEdition (struct Game *Game,
NULL);
}
else
Ico_PutIconWithText ("up_off16x16.gif",Txt_Movement_not_allowed,NULL);
Ico_PutIcon ("up_off16x16.gif",Txt_Movement_not_allowed);
/* Write icon to move down the question */
if (NumQst + 1 < NumQsts)
@ -2817,7 +2817,7 @@ static void Gam_ListOneOrMoreQuestionsForEdition (struct Game *Game,
NULL);
}
else
Ico_PutIconWithText ("down_off16x16.gif",Txt_Movement_not_allowed,NULL);
Ico_PutIcon ("down_off16x16.gif",Txt_Movement_not_allowed);
/* Write icon to edit the question */
Gbl.Test.QstCod = QstCod;

View File

@ -250,10 +250,24 @@ void Ico_PutIconLink (const char *Icon,const char *Title,const char *Text,
const char *LinkStyle,const char *OnSubmit)
{
Act_LinkFormSubmit (Title,LinkStyle,OnSubmit);
Ico_PutIconWithText (Icon,Title,Text);
if (Text)
Ico_PutIconWithText (Icon,Title,Text);
else
Ico_PutIcon (Icon,Title);
fprintf (Gbl.F.Out,"</a>");
}
/*****************************************************************************/
/********************** Put a icon to submit a form **************************/
/*****************************************************************************/
void Ico_PutIcon (const char *Icon,const char *Alt)
{
fprintf (Gbl.F.Out,"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_OPT ICO_HIGHLIGHT ICO20x20\" />",
Gbl.Prefs.IconsURL,Icon,Alt,Alt);
}
/*****************************************************************************/
/**************** Put a icon with a text to submit a form ********************/
/*****************************************************************************/
@ -264,8 +278,8 @@ void Ico_PutIconWithText (const char *Icon,const char *Alt,const char *Text)
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_OPT ICO_HIGHLIGHT\">"
"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" />",
Gbl.Prefs.IconsURL,Icon,
Alt,Text ? Text : Alt);
Gbl.Prefs.IconsURL,Icon,Alt,Text ? Text :
Alt);
if (Text)
if (Text[0])
fprintf (Gbl.F.Out,"&nbsp;%s",Text);
@ -323,7 +337,7 @@ void Ico_PutIconRemovalNotAllowed (void)
{
extern const char *Txt_Removal_not_allowed;
Ico_PutIconWithText ("remove-off64x64.png",Txt_Removal_not_allowed,NULL);
Ico_PutIcon ("remove-off64x64.png",Txt_Removal_not_allowed);
}
/*****************************************************************************/

View File

@ -62,6 +62,7 @@ void Ico_PutContextualIconToPrint (Act_Action_t NextAction,void (*FuncParams) ()
void Ico_PutIconLink (const char *Icon,const char *Title,const char *Text,
const char *LinkStyle,const char *OnSubmit);
void Ico_PutIcon (const char *Icon,const char *Alt);
void Ico_PutIconWithText (const char *Icon,const char *Alt,const char *Text);
void Ico_PutCalculateIcon (const char *Alt);

View File

@ -3264,17 +3264,12 @@ static void Msg_WriteFormToReply (long MsgCod,long CrsCod,
Par_PutHiddenParamChar ("ShowOnlyOneRecipient",'Y');
/****** Link and form end *****/
Act_LinkFormSubmit (FromThisCrs ? (Replied ? Txt_Reply_again :
Txt_Reply) :
(Replied ? Txt_Go_to_course_and_reply_again :
Txt_Go_to_course_and_reply),
The_ClassFormBold[Gbl.Prefs.Theme],NULL);
Ico_PutIconWithText ("reply16x16.gif",
Replied ? Txt_Reply_again :
Txt_Reply,
NULL);
fprintf (Gbl.F.Out,"</a>");
Act_FormEnd ();
Ico_PutIconLink ("reply16x16.gif",
FromThisCrs ? (Replied ? Txt_Reply_again :
Txt_Reply) :
(Replied ? Txt_Go_to_course_and_reply_again :
Txt_Go_to_course_and_reply),
NULL,NULL,NULL);
}
/*****************************************************************************/

View File

@ -634,7 +634,7 @@ static void Syl_ShowRowSyllabus (unsigned NumItem,
NULL);
}
else
Ico_PutIconWithText ("up_off16x16.gif",Txt_Movement_not_allowed,NULL);
Ico_PutIcon ("up_off16x16.gif",Txt_Movement_not_allowed);
fprintf (Gbl.F.Out,"</td>");
/***** Icon to get down item *****/
@ -654,7 +654,7 @@ static void Syl_ShowRowSyllabus (unsigned NumItem,
NULL);
}
else
Ico_PutIconWithText ("down_off16x16.gif",Txt_Movement_not_allowed,NULL);
Ico_PutIcon ("down_off16x16.gif",Txt_Movement_not_allowed);
fprintf (Gbl.F.Out,"</td>");
/***** Icon to increase the level of an item *****/
@ -670,7 +670,7 @@ static void Syl_ShowRowSyllabus (unsigned NumItem,
NULL);
}
else
Ico_PutIconWithText ("left_off16x16.gif",Txt_Movement_not_allowed,NULL);
Ico_PutIcon ("left_off16x16.gif",Txt_Movement_not_allowed);
fprintf (Gbl.F.Out,"</td>");
/***** Icon to decrease level item *****/
@ -687,7 +687,7 @@ static void Syl_ShowRowSyllabus (unsigned NumItem,
NULL);
}
else
Ico_PutIconWithText ("right_off16x16.gif",Txt_Movement_not_allowed,NULL);
Ico_PutIcon ("right_off16x16.gif",Txt_Movement_not_allowed);
fprintf (Gbl.F.Out,"</td>");
LastLevel = Level;

View File

@ -265,9 +265,7 @@ void TsI_CreateXML (unsigned long NumRows,MYSQL_RES *mysql_res)
Cfg_URL_SWAD_PUBLIC,Cfg_FOLDER_FILE_BROWSER_TMP,
Gbl.FileBrowser.TmpPubDir,
The_ClassFormBold[Gbl.Prefs.Theme]);
Ico_PutIconWithText ("file64x64.gif",
Txt_XML_file,
Txt_XML_file);
Ico_PutIconWithText ("file64x64.gif",Txt_XML_file,Txt_XML_file);
fprintf (Gbl.F.Out,"</a>");
}