diff --git a/swad_QR.h b/swad_QR.h index 299917207..70100ffcf 100644 --- a/swad_QR.h +++ b/swad_QR.h @@ -37,13 +37,6 @@ /******************************* Public types ********************************/ /*****************************************************************************/ -typedef enum - { - QR_ID = 0, - QR_NICKNAME = 1, - QR_EMAIL = 2, - } QR_QRType_t; - /*****************************************************************************/ /***************************** Public prototypes *****************************/ /*****************************************************************************/ diff --git a/swad_action.c b/swad_action.c index d1171012a..4dcb2b775 100644 --- a/swad_action.c +++ b/swad_action.c @@ -4332,6 +4332,17 @@ void Act_PutContextualLink (Act_Action_t NextAction,void (*FuncParams) (), Act_FormEnd (); } +/*****************************************************************************/ +/****************** Show an icon with a link (without text) ******************/ +/*****************************************************************************/ + +void Act_PutIconLink (const char *Icon,const char *Title) + { + Act_LinkFormSubmit (Title,NULL); + Lay_PutSendIcon (Icon,Title,NULL); + Act_FormEnd (); + } + /*****************************************************************************/ /***************** Adjust current action when no user's logged ***************/ /*****************************************************************************/ diff --git a/swad_action.h b/swad_action.h index 972c86f46..e9d5548df 100644 --- a/swad_action.h +++ b/swad_action.h @@ -1345,6 +1345,7 @@ void Act_LinkFormSubmitAnimated (const char *Title,const char *LinkStyle); void Act_PutContextualLink (Act_Action_t NextAction,void (*FuncParams) (), const char *Icon,const char *Title); +void Act_PutIconLink (const char *Icon,const char *Title); void Act_AdjustActionWhenNoUsrLogged (void); void Act_AdjustCurrentAction (void); diff --git a/swad_assignment.c b/swad_assignment.c index 21bd26f11..732b6997f 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -501,26 +501,17 @@ static void Asg_PutFormsToRemEditOneAsg (long AsgCod,bool Hidden) extern const char *Txt_Hide; extern const char *Txt_Edit; - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,"
"); /***** Put form to remove assignment *****/ - fprintf (Gbl.F.Out,"
"); + Act_PutIconLink ("delon",Txt_Remove); /***** Put form to hide/show assignment *****/ - fprintf (Gbl.F.Out,""); + Act_PutIconLink ("visible_on",Txt_Hide); /***** Put form to edit assignment *****/ - fprintf (Gbl.F.Out,""); + Act_PutIconLink ("edit",Txt_Edit); - fprintf (Gbl.F.Out,"" - "
"); Act_FormStart (ActReqRemAsg); Asg_PutParamAsgCod (AsgCod); Asg_PutHiddenParamAsgOrderType (); Grp_PutParamWhichGrps (); Pag_PutHiddenParamPagNum (Gbl.Pag.CurrentPage); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove, - Txt_Remove); - Act_FormEnd (); - fprintf (Gbl.F.Out,""); Act_FormStart (Hidden ? ActShoAsg : ActHidAsg); Asg_PutParamAsgCod (AsgCod); @@ -528,37 +519,19 @@ static void Asg_PutFormsToRemEditOneAsg (long AsgCod,bool Hidden) Grp_PutParamWhichGrps (); Pag_PutHiddenParamPagNum (Gbl.Pag.CurrentPage); if (Hidden) - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Show, - Txt_Show); + Act_PutIconLink ("hidden_on",Txt_Show); else - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Hide, - Txt_Hide); - Act_FormEnd (); - fprintf (Gbl.F.Out,""); Act_FormStart (ActEdiOneAsg); Asg_PutParamAsgCod (AsgCod); Asg_PutHiddenParamAsgOrderType (); Grp_PutParamWhichGrps (); Pag_PutHiddenParamPagNum (Gbl.Pag.CurrentPage); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Edit, - Txt_Edit); - Act_FormEnd (); - fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,""); } /*****************************************************************************/ diff --git a/swad_changelog.h b/swad_changelog.h index 4b6038eb3..c20009ddd 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -103,11 +103,12 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.107 (2015/04/02)" +#define Log_PLATFORM_VERSION "SWAD 14.107.1 (2015/04/02)" // 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.107.1: Apr 02, 2015 Changes in icons in assignments. (183748 lines) Version 14.107: Apr 02, 2015 Refactoring contextual menus. (183776 lines) Version 14.106.2: Apr 02, 2015 Refactoring some contextual menus. (183747 lines) Version 14.106.1: Apr 02, 2015 Changes in layout of icon with links. (183925 lines) diff --git a/swad_exam.c b/swad_exam.c index fdfa771ad..e24b3c036 100644 --- a/swad_exam.c +++ b/swad_exam.c @@ -775,24 +775,18 @@ static void Exa_ShowExamAnnouncement (long ExaCod,Exa_tTypeViewExamAnnouncement_ /***** Link to remove this exam announcement *****/ Act_FormStart (ActRemExaAnn); Par_PutHiddenParamLong ("ExaCod",ExaCod); - Act_LinkFormSubmit (Txt_Remove,NULL); - Lay_PutSendIcon ("delon",Txt_Remove,NULL); - Act_FormEnd (); + Act_PutIconLink ("delon",Txt_Remove); /***** Link to edit this exam announcement *****/ Act_FormStart (ActEdiExaAnn); Par_PutHiddenParamLong ("ExaCod",ExaCod); - Act_LinkFormSubmit (Txt_Edit,NULL); - Lay_PutSendIcon ("edit",Txt_Edit,NULL); - Act_FormEnd (); + Act_PutIconLink ("edit",Txt_Edit); } /***** Link to print view *****/ Act_FormStart (ActPrnExaAnn); Par_PutHiddenParamLong ("ExaCod",ExaCod); - Act_LinkFormSubmit (Txt_Print,NULL); - Lay_PutSendIcon ("print",Txt_Print,NULL); - Act_FormEnd (); + Act_PutIconLink ("print",Txt_Print); fprintf (Gbl.F.Out,"" "");