Version 16.198.3

This commit is contained in:
Antonio Cañas Vargas 2017-04-30 21:37:44 +02:00
parent 6c8dd63c01
commit 8848b63126
8 changed files with 35 additions and 52 deletions

View File

@ -838,8 +838,6 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod)
static void Agd_PutFormsToRemEditOneEvent (struct AgendaEvent *AgdEvent)
{
extern const char *Txt_Remove;
extern const char *Txt_Show;
extern const char *Txt_Hide;
extern const char *Txt_Event_private_click_to_make_it_visible_to_the_users_of_your_courses;
extern const char *Txt_Event_visible_to_the_users_of_your_courses_click_to_make_it_private;
@ -853,15 +851,9 @@ static void Agd_PutFormsToRemEditOneEvent (struct AgendaEvent *AgdEvent)
/***** Put form to hide/show event *****/
if (AgdEvent->Hidden)
Lay_PutContextualLink (ActShoEvtMyAgd,NULL,Agd_PutCurrentParamsMyAgenda,
"eye-slash-on64x64.png",
Txt_Show,NULL,
NULL);
Lay_PutIconToUnhide (ActShoEvtMyAgd,Agd_PutCurrentParamsMyAgenda);
else
Lay_PutContextualLink (ActHidEvtMyAgd,NULL,Agd_PutCurrentParamsMyAgenda,
"eye-on64x64.png",
Txt_Hide,NULL,
NULL);
Lay_PutIconToHide (ActHidEvtMyAgd,Agd_PutCurrentParamsMyAgenda);
/***** Put form to edit event *****/
Lay_PutIconToEdit (ActEdiOneEvtMyAgd,Agd_PutCurrentParamsMyAgenda);

View File

@ -503,8 +503,6 @@ void Asg_PutHiddenParamAsgOrder (void)
static void Asg_PutFormsToRemEditOneAsg (long AsgCod,bool Hidden)
{
extern const char *Txt_Remove;
extern const char *Txt_Show;
extern const char *Txt_Hide;
fprintf (Gbl.F.Out,"<div>");
@ -518,15 +516,9 @@ static void Asg_PutFormsToRemEditOneAsg (long AsgCod,bool Hidden)
/***** Put form to hide/show assignment *****/
if (Hidden)
Lay_PutContextualLink (ActShoAsg,NULL,Asg_PutParams,
"eye-slash-on64x64.png",
Txt_Show,NULL,
NULL);
Lay_PutIconToUnhide (ActShoAsg,Asg_PutParams);
else
Lay_PutContextualLink (ActHidAsg,NULL,Asg_PutParams,
"eye-on64x64.png",
Txt_Hide,NULL,
NULL);
Lay_PutIconToHide (ActHidAsg,Asg_PutParams);
/***** Put form to edit assignment *****/
Lay_PutIconToEdit (ActEdiOneAsg,Asg_PutParams);

View File

@ -543,8 +543,6 @@ static void Att_PutFormToListStdsParams (void)
static void Att_PutFormsToRemEditOneAttEvent (long AttCod,bool Hidden)
{
extern const char *Txt_Remove;
extern const char *Txt_Show;
extern const char *Txt_Hide;
fprintf (Gbl.F.Out,"<div>");
@ -558,15 +556,9 @@ static void Att_PutFormsToRemEditOneAttEvent (long AttCod,bool Hidden)
/***** Put form to hide/show attendance event *****/
if (Hidden)
Lay_PutContextualLink (ActShoAtt,NULL,Att_PutParams,
"eye-slash-on64x64.png",
Txt_Show,NULL,
NULL);
Lay_PutIconToUnhide (ActShoAtt,Att_PutParams);
else
Lay_PutContextualLink (ActHidAtt,NULL,Att_PutParams,
"eye-on64x64.png",
Txt_Hide,NULL,
NULL);
Lay_PutIconToHide (ActHidAtt,Att_PutParams);
/***** Put form to edit attendance event *****/
Lay_PutIconToEdit (ActEdiOneAtt,Att_PutParams);

View File

@ -223,13 +223,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.198.2 (2017-04-30)"
#define Log_PLATFORM_VERSION "SWAD 16.198.3 (2017-04-30)"
#define CSS_FILE "swad16.195.8.css"
#define JS_FILE "swad16.181.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.198.3: Apr 30, 2017 Code refactoring related to contextual icons to hide and unhide. (218320 lines)
Version 16.198.2: Apr 30, 2017 Changes in layout of edition of places. (218341 lines)
Version 16.198.1: Apr 30, 2017 Changes in layout of edition of countries. (218332 lines)
Version 16.198: Apr 30, 2017 Code refactoring related to contextual icons to edit, view and print. (218361 lines)

View File

@ -1536,8 +1536,6 @@ static void Exa_ShowExamAnnouncement (Exa_TypeViewExamAnnouncement_t TypeViewExa
static void Exa_PutIconsExamAnnouncement (void)
{
extern const char *Txt_Remove;
extern const char *Txt_Show;
extern const char *Txt_Hide;
if (Gbl.Usrs.Me.LoggedRole == Rol_TEACHER ||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
@ -1552,16 +1550,10 @@ static void Exa_PutIconsExamAnnouncement (void)
switch (Gbl.ExamAnns.ExaDat.Status)
{
case Exa_VISIBLE_EXAM_ANNOUNCEMENT:
Lay_PutContextualLink (ActHidExaAnn,NULL,Exa_PutParamExaCodToEdit,
"eye-on64x64.png",
Txt_Hide,NULL,
NULL);
Lay_PutIconToHide (ActHidExaAnn,Exa_PutParamExaCodToEdit);
break;
case Exa_HIDDEN_EXAM_ANNOUNCEMENT:
Lay_PutContextualLink (ActShoExaAnn,NULL,Exa_PutParamExaCodToEdit,
"eye-slash-on64x64.png",
Txt_Show,NULL,
NULL);
Lay_PutIconToUnhide (ActShoExaAnn,Exa_PutParamExaCodToEdit);
break;
case Exa_DELETED_EXAM_ANNOUNCEMENT: // Not applicable here
break;

View File

@ -1087,7 +1087,7 @@ static void Lay_ShowRightColumn (void)
}
/*****************************************************************************/
/**************** Show contextual icons to edit, view, print *****************/
/******** Show contextual icons to edit, view, hide, unhide, print ***********/
/*****************************************************************************/
void Lay_PutIconToEdit (Act_Action_t NextAction,void (*FuncParams) ())
@ -1110,6 +1110,26 @@ void Lay_PutIconToView (Act_Action_t NextAction,void (*FuncParams) ())
NULL);
}
void Lay_PutIconToHide (Act_Action_t NextAction,void (*FuncParams) ())
{
extern const char *Txt_Hide;
Lay_PutContextualLink (NextAction,NULL,FuncParams,
"eye-on64x64.png",
Txt_Hide,NULL,
NULL);
}
void Lay_PutIconToUnhide (Act_Action_t NextAction,void (*FuncParams) ())
{
extern const char *Txt_Show;
Lay_PutContextualLink (NextAction,NULL,FuncParams,
"eye-slash-on64x64.png",
Txt_Show,NULL,
NULL);
}
void Lay_PutIconToPrint (Act_Action_t NextAction,void (*FuncParams) ())
{
extern const char *Txt_Print;

View File

@ -74,6 +74,8 @@ void Lay_WriteStartOfPage (void);
void Lay_PutIconToEdit (Act_Action_t NextAction,void (*FuncParams) ());
void Lay_PutIconToView (Act_Action_t NextAction,void (*FuncParams) ());
void Lay_PutIconToUnhide (Act_Action_t NextAction,void (*FuncParams) ());
void Lay_PutIconToHide (Act_Action_t NextAction,void (*FuncParams) ());
void Lay_PutIconToPrint (Act_Action_t NextAction,void (*FuncParams) ());
void Lay_PutContextualLink (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (),

View File

@ -783,8 +783,6 @@ static void Svy_PutFormsToRemEditOneSvy (long SvyCod,bool Visible)
{
extern const char *Txt_Remove;
extern const char *Txt_Reset;
extern const char *Txt_Show;
extern const char *Txt_Hide;
fprintf (Gbl.F.Out,"<div>");
@ -804,15 +802,9 @@ static void Svy_PutFormsToRemEditOneSvy (long SvyCod,bool Visible)
/***** Put form to hide/show survey *****/
if (Visible)
Lay_PutContextualLink (ActHidSvy,NULL,Svy_PutParams,
"eye-on64x64.png",
Txt_Hide,NULL,
NULL);
Lay_PutIconToHide (ActHidSvy,Svy_PutParams);
else
Lay_PutContextualLink (ActShoSvy,NULL,Svy_PutParams,
"eye-slash-on64x64.png",
Txt_Show,NULL,
NULL);
Lay_PutIconToUnhide (ActShoSvy,Svy_PutParams);
/***** Put form to edit survey *****/
Lay_PutIconToEdit (ActEdiOneSvy,Svy_PutParams);