From 805f111ce977c4fa811f41fd29318bf0b7c2b674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sun, 11 Jun 2017 19:13:28 +0200 Subject: [PATCH] Version 16.240.1 --- swad_ID.c | 6 +- swad_agenda.c | 10 +-- swad_announcement.c | 2 +- swad_assignment.c | 10 +-- swad_attendance.c | 14 ++-- swad_banner.c | 6 +- swad_calendar.c | 12 +-- swad_centre.c | 10 +-- swad_changelog.h | 3 +- swad_connected.c | 2 +- swad_country.c | 10 +-- swad_course.c | 10 +-- swad_degree.c | 10 +-- swad_degree_type.c | 8 +- swad_department.c | 6 +- swad_exam.c | 10 +-- swad_file_browser.c | 8 +- swad_follow.c | 2 +- swad_forum.c | 4 +- swad_group.c | 10 +-- swad_holiday.c | 4 +- swad_icon.c | 184 +++++++++++++++++++++++++++++++++++++++++++- swad_icon.h | 20 ++++- swad_info.c | 6 +- swad_institution.c | 10 +-- swad_layout.c | 183 +------------------------------------------ swad_layout.h | 15 ---- swad_link.c | 6 +- swad_mail.c | 8 +- swad_message.c | 8 +- swad_nickname.c | 2 +- swad_notice.c | 2 +- swad_photo.c | 4 +- swad_place.c | 8 +- swad_plugin.c | 4 +- swad_profile.c | 2 +- swad_record.c | 6 +- swad_survey.c | 12 +-- swad_syllabus.c | 4 +- swad_test.c | 6 +- swad_test_import.c | 2 +- swad_timetable.c | 10 +-- swad_user.c | 6 +- 43 files changed, 335 insertions(+), 330 deletions(-) diff --git a/swad_ID.c b/swad_ID.c index 078c9a9d..c729a685 100644 --- a/swad_ID.c +++ b/swad_ID.c @@ -489,7 +489,7 @@ static void ID_PutLinkToConfirmID (struct UsrData *UsrDat,unsigned NumID, UsrDat->IDs.List[NumID].ID); /***** Put link *****/ - Lay_PutIconLink ("ok_on16x16.gif",Txt_Confirm_ID,Txt_Confirm_ID, + Ico_PutIconLink ("ok_on16x16.gif",Txt_Confirm_ID,Txt_Confirm_ID, The_ClassFormBold[Gbl.Prefs.Theme],NULL); /***** End form *****/ @@ -609,7 +609,7 @@ void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe) { if (ItsMe && UsrDat->IDs.List[NumID].Confirmed) // I can not remove my confirmed IDs /* Put disabled icon to remove user's ID */ - Lay_PutIconRemovalNotAllowed (); + Ico_PutIconRemovalNotAllowed (); else // I can remove { /* Form to remove user's ID */ @@ -635,7 +635,7 @@ void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe) } fprintf (Gbl.F.Out,"", UsrDat->IDs.List[NumID].ID); - Lay_PutIconRemove (); + Ico_PutIconRemove (); Act_FormEnd (); } } diff --git a/swad_agenda.c b/swad_agenda.c index f82c8aee..c43e804f 100644 --- a/swad_agenda.c +++ b/swad_agenda.c @@ -657,7 +657,7 @@ static void Agd_PutIconToCreateNewEvent (void) static void Agd_PutIconToViewEditMyFullAgenda (void) { - Lay_PutContextualIconToEdit (ActSeeMyAgd,NULL); + Ico_PutContextualIconToEdit (ActSeeMyAgd,NULL); } static void Agd_PutIconToShowQR (void) @@ -848,16 +848,16 @@ static void Agd_PutFormsToRemEditOneEvent (struct AgendaEvent *AgdEvent) Gbl.Agenda.AgdCodToEdit = AgdEvent->AgdCod; // Used as parameter in contextual links /***** Put form to remove event *****/ - Lay_PutContextualIconToRemove (ActReqRemEvtMyAgd,Agd_PutCurrentParamsMyAgenda); + Ico_PutContextualIconToRemove (ActReqRemEvtMyAgd,Agd_PutCurrentParamsMyAgenda); /***** Put form to hide/show event *****/ if (AgdEvent->Hidden) - Lay_PutContextualIconToUnhide (ActShoEvtMyAgd,Agd_PutCurrentParamsMyAgenda); + Ico_PutContextualIconToUnhide (ActShoEvtMyAgd,Agd_PutCurrentParamsMyAgenda); else - Lay_PutContextualIconToHide (ActHidEvtMyAgd,Agd_PutCurrentParamsMyAgenda); + Ico_PutContextualIconToHide (ActHidEvtMyAgd,Agd_PutCurrentParamsMyAgenda); /***** Put form to edit event *****/ - Lay_PutContextualIconToEdit (ActEdiOneEvtMyAgd,Agd_PutCurrentParamsMyAgenda); + Ico_PutContextualIconToEdit (ActEdiOneEvtMyAgd,Agd_PutCurrentParamsMyAgenda); /***** Put form to make event public/private *****/ if (AgdEvent->Public) diff --git a/swad_announcement.c b/swad_announcement.c index 8bfd68a5..eab5a802 100644 --- a/swad_announcement.c +++ b/swad_announcement.c @@ -309,7 +309,7 @@ static void Ann_DrawAnAnnouncement (long AnnCod,Ann_Status_t Status, if (ICanEdit) { /***** Put form to remove announcement *****/ - Lay_PutContextualIconToRemove (ActRemAnn,Ann_PutParams); + Ico_PutContextualIconToRemove (ActRemAnn,Ann_PutParams); /***** Put form to change the status of the announcement *****/ switch (Status) diff --git a/swad_assignment.c b/swad_assignment.c index 707e65ef..5fddfccf 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -582,21 +582,21 @@ static void Asg_PutFormsToRemEditOneAsg (long AsgCod,bool Hidden) case Rol_TCH: case Rol_SYS_ADM: /***** Put form to remove assignment *****/ - Lay_PutContextualIconToRemove (ActReqRemAsg,Asg_PutParams); + Ico_PutContextualIconToRemove (ActReqRemAsg,Asg_PutParams); /***** Put form to hide/show assignment *****/ if (Hidden) - Lay_PutContextualIconToUnhide (ActShoAsg,Asg_PutParams); + Ico_PutContextualIconToUnhide (ActShoAsg,Asg_PutParams); else - Lay_PutContextualIconToHide (ActHidAsg,Asg_PutParams); + Ico_PutContextualIconToHide (ActHidAsg,Asg_PutParams); /***** Put form to edit assignment *****/ - Lay_PutContextualIconToEdit (ActEdiOneAsg,Asg_PutParams); + Ico_PutContextualIconToEdit (ActEdiOneAsg,Asg_PutParams); // no break case Rol_STD: case Rol_NET: /***** Put form to print assignment *****/ - Lay_PutContextualIconToPrint (ActPrnOneAsg,Asg_PutParams); + Ico_PutContextualIconToPrint (ActPrnOneAsg,Asg_PutParams); break; default: break; diff --git a/swad_attendance.c b/swad_attendance.c index 2ecac1ba..22404a69 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -564,16 +564,16 @@ static void Att_PutFormsToRemEditOneAttEvent (long AttCod,bool Hidden) Gbl.AttEvents.AttCodToEdit = AttCod; // Used as parameters in contextual links /***** Put form to remove attendance event *****/ - Lay_PutContextualIconToRemove (ActReqRemAtt,Att_PutParams); + Ico_PutContextualIconToRemove (ActReqRemAtt,Att_PutParams); /***** Put form to hide/show attendance event *****/ if (Hidden) - Lay_PutContextualIconToUnhide (ActShoAtt,Att_PutParams); + Ico_PutContextualIconToUnhide (ActShoAtt,Att_PutParams); else - Lay_PutContextualIconToHide (ActHidAtt,Att_PutParams); + Ico_PutContextualIconToHide (ActHidAtt,Att_PutParams); /***** Put form to edit attendance event *****/ - Lay_PutContextualIconToEdit (ActEdiOneAtt,Att_PutParams); + Ico_PutContextualIconToEdit (ActEdiOneAtt,Att_PutParams); } /*****************************************************************************/ @@ -3030,7 +3030,7 @@ static void Att_GetListSelectedAttCods (char **StrAttCodsSelected) static void Att_PutIconToPrintMyList (void) { - Lay_PutContextualIconToPrint (ActPrnLstMyAtt,Att_PutFormToPrintMyListParams); + Ico_PutContextualIconToPrint (ActPrnLstMyAtt,Att_PutFormToPrintMyListParams); } static void Att_PutFormToPrintMyListParams (void) @@ -3047,7 +3047,7 @@ static void Att_PutFormToPrintMyListParams (void) static void Att_PutIconToPrintStdsList (void) { - Lay_PutContextualIconToPrint (ActPrnLstStdAtt,Att_PutParamsToPrintStdsList); + Ico_PutContextualIconToPrint (ActPrnLstStdAtt,Att_PutParamsToPrintStdsList); } static void Att_PutParamsToPrintStdsList (void) @@ -3181,7 +3181,7 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView) Act_LinkFormSubmitAnimated (Txt_Update_attendance_according_to_selected_events, The_ClassFormBold[Gbl.Prefs.Theme], NULL); - Lay_PutCalculateIconWithText (Txt_Update_attendance_according_to_selected_events, + Ico_PutCalculateIconWithText (Txt_Update_attendance_according_to_selected_events, Txt_Update_attendance); fprintf (Gbl.F.Out,"" ""); diff --git a/swad_banner.c b/swad_banner.c index 21ff6a05..4fcf5201 100644 --- a/swad_banner.c +++ b/swad_banner.c @@ -182,7 +182,7 @@ static void Ban_WriteListOfBanners (void) static void Ban_PutFormToEditBanners (void) { if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) - Lay_PutContextualIconToEdit (ActEdiBan,NULL); + Ico_PutContextualIconToEdit (ActEdiBan,NULL); } /*****************************************************************************/ @@ -367,7 +367,7 @@ void Ban_FreeListBanners (void) static void Ban_PutIconToViewBanners (void) { - Lay_PutContextualIconToView (ActSeeBan,NULL); + Ico_PutContextualIconToView (ActSeeBan,NULL); } /*****************************************************************************/ @@ -399,7 +399,7 @@ static void Ban_ListBannersForEdition (void) ""); Act_FormStart (ActRemBan); Ban_PutParamBanCod (Ban->BanCod); - Lay_PutIconRemove (); + Ico_PutIconRemove (); Act_FormEnd (); fprintf (Gbl.F.Out,""); diff --git a/swad_calendar.c b/swad_calendar.c index 71e88b82..bc04ec2a 100644 --- a/swad_calendar.c +++ b/swad_calendar.c @@ -362,12 +362,12 @@ static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar, static void Cal_PutIconToPrintCalendarSys (void) { - Lay_PutContextualIconToPrint (ActPrnCalSys,NULL); + Ico_PutContextualIconToPrint (ActPrnCalSys,NULL); } static void Cal_PutIconToPrintCalendarCty (void) { - Lay_PutContextualIconToPrint (ActPrnCalCty,NULL); + Ico_PutContextualIconToPrint (ActPrnCalCty,NULL); } static void Cal_PutIconToPrintCalendarIns (void) @@ -375,7 +375,7 @@ static void Cal_PutIconToPrintCalendarIns (void) extern const char *Txt_Holidays; /***** Print calendar *****/ - Lay_PutContextualIconToPrint (ActPrnCalIns,NULL); + Ico_PutContextualIconToPrint (ActPrnCalIns,NULL); /***** View holidays *****/ if (Gbl.Hlds.Num || // There are holidays @@ -388,15 +388,15 @@ static void Cal_PutIconToPrintCalendarIns (void) static void Cal_PutIconToPrintCalendarCtr (void) { - Lay_PutContextualIconToPrint (ActPrnCalCtr,NULL); + Ico_PutContextualIconToPrint (ActPrnCalCtr,NULL); } static void Cal_PutIconToPrintCalendarDeg (void) { - Lay_PutContextualIconToPrint (ActPrnCalDeg,NULL); + Ico_PutContextualIconToPrint (ActPrnCalDeg,NULL); } static void Cal_PutIconToPrintCalendarCrs (void) { - Lay_PutContextualIconToPrint (ActPrnCalCrs,NULL); + Ico_PutContextualIconToPrint (ActPrnCalCrs,NULL); } diff --git a/swad_centre.c b/swad_centre.c index 4280f4ac..b6f15e84 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -644,7 +644,7 @@ static void Ctr_Configuration (bool PrintView) static void Ctr_PutIconsToPrintAndUpload (void) { /***** Link to print info about centre *****/ - Lay_PutContextualIconToPrint (ActPrnCtrInf,NULL); + Ico_PutContextualIconToPrint (ActPrnCtrInf,NULL); if (Gbl.Usrs.Me.Role.Logged >= Rol_CTR_ADM) // Only centre admins, institution admins and system admins @@ -815,7 +815,7 @@ static void Ctr_PutIconsListCentres (void) static void Ctr_PutIconToEditCentres (void) { - Lay_PutContextualIconToEdit (ActEdiCtr,NULL); + Ico_PutContextualIconToEdit (ActEdiCtr,NULL); } /*****************************************************************************/ @@ -976,7 +976,7 @@ static void Ctr_PutIconsEditingCentres (void) static void Ctr_PutIconToViewCentres (void) { - Lay_PutContextualIconToView (ActSeeCtr,NULL); + Ico_PutContextualIconToView (ActSeeCtr,NULL); } /*****************************************************************************/ @@ -1429,12 +1429,12 @@ static void Ctr_ListCentresForEdition (void) Ctr->NumUsrsWhoClaimToBelongToCtr || Ctr->NumUsrs || // Centre has degrees or users ==> deletion forbidden !ICanEdit) - Lay_PutIconRemovalNotAllowed (); + Ico_PutIconRemovalNotAllowed (); else { Act_FormStart (ActRemCtr); Ctr_PutParamOtherCtrCod (Ctr->CtrCod); - Lay_PutIconRemove (); + Ico_PutIconRemove (); Act_FormEnd (); } fprintf (Gbl.F.Out,""); diff --git a/swad_changelog.h b/swad_changelog.h index 7986fdeb..91d232b0 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -243,13 +243,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.240 (2017-06-11)" +#define Log_PLATFORM_VERSION "SWAD 16.240.1 (2017-06-11)" #define CSS_FILE "swad16.235.1.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.240.1: Jun 11, 2017 Some functions moved from swad_layout to swad_icon. (222024 lines) Version 16.240: Jun 11, 2017 New module swad_button to draw buttons. (222023 lines) Version 16.239: Jun 10, 2017 New module swad_box to draw boxes. (221970 lines) Version 16.238: Jun 10, 2017 Icon to close frames. (221803 lines) diff --git a/swad_connected.c b/swad_connected.c index dbffcdf2..390c7a83 100644 --- a/swad_connected.c +++ b/swad_connected.c @@ -133,7 +133,7 @@ static void Con_PutIconToUpdateConnected (void) Sco_PutParamScope ("ScopeCon",Gbl.Scope.Current); Act_LinkFormSubmitAnimated (Txt_Update,The_ClassFormBold[Gbl.Prefs.Theme], NULL); - Lay_PutCalculateIcon (Txt_Update); + Ico_PutCalculateIcon (Txt_Update); Act_FormEnd (); } diff --git a/swad_country.c b/swad_country.c index 30555587..a4db4b61 100644 --- a/swad_country.c +++ b/swad_country.c @@ -453,7 +453,7 @@ static void Cty_Configuration (bool PrintView) static void Cty_PutIconToPrint (void) { - Lay_PutContextualIconToPrint (ActPrnCtyInf,NULL); + Ico_PutContextualIconToPrint (ActPrnCtyInf,NULL); } /*****************************************************************************/ @@ -766,7 +766,7 @@ static void Cty_PutIconsListCountries (void) static void Cty_PutIconToEditCountries (void) { - Lay_PutContextualIconToEdit (ActEdiCty,NULL); + Ico_PutContextualIconToEdit (ActEdiCty,NULL); } /*****************************************************************************/ @@ -971,7 +971,7 @@ void Cty_EditCountries (void) static void Cty_PutIconToViewCountries (void) { - Lay_PutContextualIconToView (ActSeeCty,NULL); + Ico_PutContextualIconToView (ActSeeCty,NULL); } /*****************************************************************************/ @@ -1547,12 +1547,12 @@ static void Cty_ListCountriesForEdition (void) if (Cty->NumInss || Cty->NumUsrsWhoClaimToBelongToCty || Cty->NumUsrs) // Country has institutions or users ==> deletion forbidden - Lay_PutIconRemovalNotAllowed (); + Ico_PutIconRemovalNotAllowed (); else { Act_FormStart (ActRemCty); Cty_PutParamOtherCtyCod (Cty->CtyCod); - Lay_PutIconRemove (); + Ico_PutIconRemove (); Act_FormEnd (); } fprintf (Gbl.F.Out,""); diff --git a/swad_course.c b/swad_course.c index 472a0249..0c20f332 100644 --- a/swad_course.c +++ b/swad_course.c @@ -476,7 +476,7 @@ static void Crs_Configuration (bool PrintView) static void Crs_PutIconToPrint (void) { - Lay_PutContextualIconToPrint (ActPrnCrsInf,NULL); + Ico_PutContextualIconToPrint (ActPrnCrsInf,NULL); } /*****************************************************************************/ @@ -1204,7 +1204,7 @@ static void Crs_PutIconsListCourses (void) static void Crs_PutIconToEditCourses (void) { - Lay_PutContextualIconToEdit (ActEdiCrs,NULL); + Ico_PutContextualIconToEdit (ActEdiCrs,NULL); } /*****************************************************************************/ @@ -1364,7 +1364,7 @@ void Crs_EditCourses (void) static void Crs_PutIconToViewCourses (void) { - Lay_PutContextualIconToView (ActSeeCrs,NULL); + Ico_PutContextualIconToView (ActSeeCrs,NULL); } /*****************************************************************************/ @@ -1423,12 +1423,12 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) ""); if (Crs->NumUsrs[Rol_UNK] || // Course has users ==> deletion forbidden !ICanEdit) - Lay_PutIconRemovalNotAllowed (); + Ico_PutIconRemovalNotAllowed (); else // Crs->NumUsrs == 0 && ICanEdit { Act_FormStart (ActRemCrs); Crs_PutParamOtherCrsCod (Crs->CrsCod); - Lay_PutIconRemove (); + Ico_PutIconRemove (); Act_FormEnd (); } fprintf (Gbl.F.Out,""); diff --git a/swad_degree.c b/swad_degree.c index 6fb9a845..72407d0c 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -540,7 +540,7 @@ static void Deg_Configuration (bool PrintView) static void Deg_PutIconsToPrintAndUpload (void) { /***** Link to print info about degree *****/ - Lay_PutContextualIconToPrint (ActPrnDegInf,NULL); + Ico_PutContextualIconToPrint (ActPrnDegInf,NULL); if (Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM) // Only degree admins, centre admins, institution admins and system admins @@ -703,12 +703,12 @@ static void Deg_ListDegreesForEdition (void) ""); if (NumCrss || // Degree has courses ==> deletion forbidden !ICanEdit) - Lay_PutIconRemovalNotAllowed (); + Ico_PutIconRemovalNotAllowed (); else { Act_FormStart (ActRemDeg); Deg_PutParamOtherDegCod (Deg->DegCod); - Lay_PutIconRemove (); + Ico_PutIconRemove (); Act_FormEnd (); } fprintf (Gbl.F.Out,""); @@ -1244,7 +1244,7 @@ static void Deg_PutIconsListDegrees (void) static void Deg_PutIconToEditDegrees (void) { - Lay_PutContextualIconToEdit (ActEdiDeg,NULL); + Ico_PutContextualIconToEdit (ActEdiDeg,NULL); } /*****************************************************************************/ @@ -1404,7 +1404,7 @@ static void Deg_PutIconsEditingDegrees (void) static void Deg_PutIconToViewDegrees (void) { - Lay_PutContextualIconToView (ActSeeDeg,NULL); + Ico_PutContextualIconToView (ActSeeDeg,NULL); } /*****************************************************************************/ diff --git a/swad_degree_type.c b/swad_degree_type.c index 361cc6e8..77a8d36b 100644 --- a/swad_degree_type.c +++ b/swad_degree_type.c @@ -140,7 +140,7 @@ void DT_PutIconToViewDegreeTypes (void) static void DT_PutIconToViewDegreeTypesWhenEditing (void) { - Lay_PutContextualIconToView (ActSeeDegTyp,NULL); + Ico_PutContextualIconToView (ActSeeDegTyp,NULL); } /*****************************************************************************/ @@ -349,7 +349,7 @@ static void DT_PutIconToEditDegTypes (void) if (CentreTabVisible && // Only editable if centre tab is visible DT_CheckIfICanCreateDegreeTypes ()) - Lay_PutContextualIconToEdit (ActEdiDegTyp,NULL); + Ico_PutContextualIconToEdit (ActEdiDegTyp,NULL); } /*****************************************************************************/ @@ -373,12 +373,12 @@ static void DT_ListDegreeTypesForEdition (void) fprintf (Gbl.F.Out,"" ""); if (Gbl.Degs.DegTypes.Lst[NumDegTyp].NumDegs) // Degree type has degrees => deletion forbidden - Lay_PutIconRemovalNotAllowed (); + Ico_PutIconRemovalNotAllowed (); else { Act_FormStart (ActRemDegTyp); DT_PutParamOtherDegTypCod (Gbl.Degs.DegTypes.Lst[NumDegTyp].DegTypCod); - Lay_PutIconRemove (); + Ico_PutIconRemove (); Act_FormEnd (); } diff --git a/swad_department.c b/swad_department.c index 374098d8..61f865f2 100644 --- a/swad_department.c +++ b/swad_department.c @@ -214,7 +214,7 @@ static void Dpt_GetParamDptOrder (void) static void Dpt_PutIconToEditDpts (void) { - Lay_PutContextualIconToEdit (ActEdiDpt,NULL); + Ico_PutContextualIconToEdit (ActEdiDpt,NULL); } /*****************************************************************************/ @@ -510,12 +510,12 @@ static void Dpt_ListDepartmentsForEdition (void) fprintf (Gbl.F.Out,"" ""); if (Dpt->NumTchs) // Department has teachers ==> deletion forbidden - Lay_PutIconRemovalNotAllowed (); + Ico_PutIconRemovalNotAllowed (); else { Act_FormStart (ActRemDpt); Dpt_PutParamDptCod (Dpt->DptCod); - Lay_PutIconRemove (); + Ico_PutIconRemove (); Act_FormEnd (); } fprintf (Gbl.F.Out,""); diff --git a/swad_exam.c b/swad_exam.c index 77820ba5..f0d014cf 100644 --- a/swad_exam.c +++ b/swad_exam.c @@ -1546,27 +1546,27 @@ static void Exa_PutIconsExamAnnouncement (void) Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) { /***** Link to remove this exam announcement *****/ - Lay_PutContextualIconToRemove (ActReqRemExaAnn,Exa_PutParamExaCodToEdit); + Ico_PutContextualIconToRemove (ActReqRemExaAnn,Exa_PutParamExaCodToEdit); /***** Put form to hide/show exam announement *****/ switch (Gbl.ExamAnns.ExaDat.Status) { case Exa_VISIBLE_EXAM_ANNOUNCEMENT: - Lay_PutContextualIconToHide (ActHidExaAnn,Exa_PutParamExaCodToEdit); + Ico_PutContextualIconToHide (ActHidExaAnn,Exa_PutParamExaCodToEdit); break; case Exa_HIDDEN_EXAM_ANNOUNCEMENT: - Lay_PutContextualIconToUnhide (ActShoExaAnn,Exa_PutParamExaCodToEdit); + Ico_PutContextualIconToUnhide (ActShoExaAnn,Exa_PutParamExaCodToEdit); break; case Exa_DELETED_EXAM_ANNOUNCEMENT: // Not applicable here break; } /***** Link to edit this exam announcement *****/ - Lay_PutContextualIconToEdit (ActEdiExaAnn,Exa_PutParamExaCodToEdit); + Ico_PutContextualIconToEdit (ActEdiExaAnn,Exa_PutParamExaCodToEdit); } /***** Link to print view *****/ - Lay_PutContextualIconToPrint (ActPrnExaAnn,Exa_PutParamExaCodToEdit); + Ico_PutContextualIconToPrint (ActPrnExaAnn,Exa_PutParamExaCodToEdit); } /*****************************************************************************/ diff --git a/swad_file_browser.c b/swad_file_browser.c index 5ae63cd2..54077d91 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -3727,11 +3727,11 @@ static void Brw_PutIconsFileBrowser (void) case Brw_ICON_NONE: break; case Brw_ICON_VIEW: - Lay_PutContextualIconToView (Brw_ActFromAdmToSee[Gbl.FileBrowser.Type], + Ico_PutContextualIconToView (Brw_ActFromAdmToSee[Gbl.FileBrowser.Type], Brw_PutHiddenParamFullTreeIfSelected); break; case Brw_ICON_EDIT: - Lay_PutContextualIconToEdit (Brw_ActFromSeeToAdm[Gbl.FileBrowser.Type], + Ico_PutContextualIconToEdit (Brw_ActFromSeeToAdm[Gbl.FileBrowser.Type], Brw_PutHiddenParamFullTreeIfSelected); break; } @@ -5521,7 +5521,7 @@ static void Brw_PutIconRemoveFile (const char PathInTree[PATH_MAX + 1], Act_FormEnd (); } else - Lay_PutIconBRemovalNotAllowed (); + Ico_PutIconBRemovalNotAllowed (); fprintf (Gbl.F.Out,""); } @@ -5553,7 +5553,7 @@ static void Brw_PutIconRemoveDir (const char PathInTree[PATH_MAX + 1], Act_FormEnd (); } else - Lay_PutIconBRemovalNotAllowed (); + Ico_PutIconBRemovalNotAllowed (); fprintf (Gbl.F.Out,""); } diff --git a/swad_follow.c b/swad_follow.c index d98f1bb1..4a78d555 100644 --- a/swad_follow.c +++ b/swad_follow.c @@ -434,7 +434,7 @@ static void Fol_PutIconToUpdateWhoToFollow (void) Act_FormStart (ActSeeSocPrf); Act_LinkFormSubmitAnimated (Txt_Update,The_ClassFormBold[Gbl.Prefs.Theme], NULL); - Lay_PutCalculateIcon (Txt_Update); + Ico_PutCalculateIcon (Txt_Update); Act_FormEnd (); } diff --git a/swad_forum.c b/swad_forum.c index f83f0212..a5e8278b 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -1314,7 +1314,7 @@ static void For_ShowAForumPost (unsigned PstNum,long PstCod, Gbl.Forum.ForumSelected.Location, Gbl.Forum.ForumSelected.ThrCod, PstCod); - Lay_PutIconRemove (); + Ico_PutIconRemove (); Act_FormEnd (); } fprintf (Gbl.F.Out,""); @@ -3372,7 +3372,7 @@ static void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE], Gbl.Forum.ForumSelected.Location, Thr.ThrCod, -1L); - Lay_PutIconRemove (); + Ico_PutIconRemove (); Act_FormEnd (); } diff --git a/swad_group.c b/swad_group.c index b2374d54..68a0f531 100644 --- a/swad_group.c +++ b/swad_group.c @@ -403,7 +403,7 @@ void Grp_ShowFormToSelectSeveralGroups (Act_Action_t NextAction) Act_LinkFormSubmitAnimated (Txt_Update_users_according_to_selected_groups, The_ClassFormBold[Gbl.Prefs.Theme], "CopyMessageToHiddenFields()"); - Lay_PutCalculateIconWithText (Txt_Update_users_according_to_selected_groups, + Ico_PutCalculateIconWithText (Txt_Update_users_according_to_selected_groups, Txt_Update_users); fprintf (Gbl.F.Out,""); @@ -1256,7 +1256,7 @@ static void Grp_ListGroupTypesForEdition (void) ""); Act_FormStartAnchor (ActReqRemGrpTyp,Grp_GROUP_TYPES_SECTION_ID); Grp_PutParamGrpTypCod (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); - Lay_PutIconRemove (); + Ico_PutIconRemove (); Act_FormEnd (); fprintf (Gbl.F.Out,""); @@ -1378,7 +1378,7 @@ static void Grp_PutIconsEditingGroupTypes (void) static void Grp_PutIconToViewGroups (void) { - Lay_PutContextualIconToView (ActReqSelGrp,NULL); + Ico_PutContextualIconToView (ActReqSelGrp,NULL); } static void Grp_PutIconToCreateNewGroupType (void) @@ -1469,7 +1469,7 @@ static void Grp_ListGroupsForEdition (void) ""); Act_FormStartAnchor (ActReqRemGrp,Grp_GROUPS_SECTION_ID); Grp_PutParamGrpCod (Grp->GrpCod); - Lay_PutIconRemove (); + Ico_PutIconRemove (); Act_FormEnd (); fprintf (Gbl.F.Out,""); @@ -1789,7 +1789,7 @@ void Grp_ShowLstGrpsToChgMyGrps (void) static void Grp_PutIconToEditGroups (void) { - Lay_PutContextualIconToEdit (ActReqEdiGrp,NULL); + Ico_PutContextualIconToEdit (ActReqEdiGrp,NULL); } /*****************************************************************************/ diff --git a/swad_holiday.c b/swad_holiday.c index 5332bf33..5734e85e 100644 --- a/swad_holiday.c +++ b/swad_holiday.c @@ -211,7 +211,7 @@ static void Hld_GetParamHldOrder (void) static void Hld_PutIconToEditHlds (void) { - Lay_PutContextualIconToEdit (ActEdiHld,NULL); + Ico_PutContextualIconToEdit (ActEdiHld,NULL); } /*****************************************************************************/ @@ -521,7 +521,7 @@ static void Hld_ListHolidaysForEdition (void) ""); Act_FormStart (ActRemHld); Hld_PutParamHldCod (Hld->HldCod); - Lay_PutIconRemove (); + Ico_PutIconRemove (); Act_FormEnd (); fprintf (Gbl.F.Out,""); diff --git a/swad_icon.c b/swad_icon.c index d15703d2..add5ba90 100644 --- a/swad_icon.c +++ b/swad_icon.c @@ -1,4 +1,4 @@ -// swad_icon.c: icon selection +// swad_icon.c: icons /* SWAD (Shared Workspace At a Distance), @@ -178,3 +178,185 @@ Ico_IconSet_t Ico_GetIconSetFromStr (const char *Str) return Ico_ICON_SET_DEFAULT; } + +/*****************************************************************************/ +/***** Show contextual icons to remove, edit, view, hide, unhide, print ******/ +/*****************************************************************************/ + +void Ico_PutContextualIconToRemove (Act_Action_t NextAction,void (*FuncParams) ()) + { + extern const char *Txt_Remove; + + Lay_PutContextualLink (NextAction,NULL,FuncParams, + "remove-on64x64.png", + Txt_Remove,NULL, + NULL); + } + +void Ico_PutContextualIconToEdit (Act_Action_t NextAction,void (*FuncParams) ()) + { + extern const char *Txt_Edit; + + Lay_PutContextualLink (NextAction,NULL,FuncParams, + "edit64x64.png", + Txt_Edit,NULL, + NULL); + } + +void Ico_PutContextualIconToView (Act_Action_t NextAction,void (*FuncParams) ()) + { + extern const char *Txt_View; + + Lay_PutContextualLink (NextAction,NULL,FuncParams, + "eye-on64x64.png", + Txt_View,NULL, + NULL); + } + +void Ico_PutContextualIconToHide (Act_Action_t NextAction,void (*FuncParams) ()) + { + extern const char *Txt_Hide; + + Lay_PutContextualLink (NextAction,NULL,FuncParams, + "eye-on64x64.png", + Txt_Hide,NULL, + NULL); + } + +void Ico_PutContextualIconToUnhide (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 Ico_PutContextualIconToPrint (Act_Action_t NextAction,void (*FuncParams) ()) + { + extern const char *Txt_Print; + + Lay_PutContextualLink (NextAction,NULL,FuncParams, + "print64x64.png", + Txt_Print,NULL, + NULL); + } + +/*****************************************************************************/ +/****************** Show an icon with a link (without text) ******************/ +/*****************************************************************************/ + +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); + fprintf (Gbl.F.Out,""); + } + +/*****************************************************************************/ +/**************** Put a icon with a text to submit a form ********************/ +/*****************************************************************************/ + +void Ico_PutIconWithText (const char *Icon,const char *Alt,const char *Text) + { + /***** Print icon and optional text *****/ + fprintf (Gbl.F.Out,"
" + "\"%s\"", + Gbl.Prefs.IconsURL,Icon, + Alt,Text ? Text : Alt); + if (Text) + if (Text[0]) + fprintf (Gbl.F.Out," %s",Text); + fprintf (Gbl.F.Out,"
"); + } + +/*****************************************************************************/ +/********** Put a icon to submit a form. **********/ +/********** When clicked, the icon will be replaced by an animation **********/ +/*****************************************************************************/ + +void Ico_PutCalculateIcon (const char *Alt) + { + fprintf (Gbl.F.Out,"
" + "\"%s\"" + "\"%s\"" // Animated icon hidden + "
" + "", + Gbl.Form.Num,Gbl.Prefs.IconsURL,Alt,Alt, + Gbl.Form.Num,Gbl.Prefs.IconsURL,Alt,Alt); + } + +/*****************************************************************************/ +/********** Put a icon with a text to submit a form. **********/ +/********** When clicked, the icon will be replaced by an animation **********/ +/*****************************************************************************/ + +void Ico_PutCalculateIconWithText (const char *Alt,const char *Text) + { + fprintf (Gbl.F.Out,"
" + "\"%s\"" + "\"%s\"" // Animated icon hidden + " %s" + "
" + "", + Gbl.Form.Num,Gbl.Prefs.IconsURL,Alt,Text, + Gbl.Form.Num,Gbl.Prefs.IconsURL,Alt,Text, + Text); + } + +/*****************************************************************************/ +/******** Put a disabled icon indicating that removal is not allowed *********/ +/*****************************************************************************/ + +void Ico_PutIconRemovalNotAllowed (void) + { + extern const char *Txt_Removal_not_allowed; + + fprintf (Gbl.F.Out,"\"%s\"", + Gbl.Prefs.IconsURL, + Txt_Removal_not_allowed, + Txt_Removal_not_allowed); + } + +void Ico_PutIconBRemovalNotAllowed (void) + { + extern const char *Txt_Removal_not_allowed; + + fprintf (Gbl.F.Out,"\"%s\"", + Gbl.Prefs.IconsURL, + Txt_Removal_not_allowed, + Txt_Removal_not_allowed); + } + +/*****************************************************************************/ +/******** Put an icon indicating that removal is not allowed *********/ +/*****************************************************************************/ + +void Ico_PutIconRemove (void) + { + extern const char *Txt_Remove; + + fprintf (Gbl.F.Out,"", + Gbl.Prefs.IconsURL, + Txt_Remove, + Txt_Remove); + } + diff --git a/swad_icon.h b/swad_icon.h index 86283b9a..6119c695 100644 --- a/swad_icon.h +++ b/swad_icon.h @@ -1,4 +1,4 @@ -// swad_icon.h: icon selection +// swad_icon.h: icons #ifndef _SWAD_ICO #define _SWAD_ICO @@ -53,4 +53,22 @@ void Ico_ChangeIconSet (void); Ico_IconSet_t Ico_GetParamIconSet (void); Ico_IconSet_t Ico_GetIconSetFromStr (const char *Str); +void Ico_PutContextualIconToRemove (Act_Action_t NextAction,void (*FuncParams) ()); +void Ico_PutContextualIconToEdit (Act_Action_t NextAction,void (*FuncParams) ()); +void Ico_PutContextualIconToView (Act_Action_t NextAction,void (*FuncParams) ()); +void Ico_PutContextualIconToUnhide (Act_Action_t NextAction,void (*FuncParams) ()); +void Ico_PutContextualIconToHide (Act_Action_t NextAction,void (*FuncParams) ()); +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_PutIconWithText (const char *Icon,const char *Alt,const char *Text); + +void Ico_PutCalculateIcon (const char *Alt); +void Ico_PutCalculateIconWithText (const char *Alt,const char *Text); + +void Ico_PutIconRemovalNotAllowed (void); +void Ico_PutIconBRemovalNotAllowed (void); +void Ico_PutIconRemove (void); + #endif diff --git a/swad_info.c b/swad_info.c index e17ff89a..fa2e6a75 100644 --- a/swad_info.c +++ b/swad_info.c @@ -473,12 +473,12 @@ static void Inf_PutButtonToEditInfo (void) static void Inf_PutIconToViewInfo (void) { - Lay_PutContextualIconToView (Inf_ActionsSeeInfo[Gbl.CurrentCrs.Info.Type],NULL); + Ico_PutContextualIconToView (Inf_ActionsSeeInfo[Gbl.CurrentCrs.Info.Type],NULL); } void Inf_PutIconToEditInfo (void) { - Lay_PutContextualIconToEdit (Inf_ActionsEditInfo[Gbl.CurrentCrs.Info.Type],NULL); + Ico_PutContextualIconToEdit (Inf_ActionsEditInfo[Gbl.CurrentCrs.Info.Type],NULL); } /*****************************************************************************/ @@ -1041,7 +1041,7 @@ static void Inf_ShowPage (const char *URL) /***** Link to view in a new window *****/ fprintf (Gbl.F.Out,"", URL,The_ClassFormBold[Gbl.Prefs.Theme]); - Lay_PutIconWithText ("fullscreen16x16.gif", + Ico_PutIconWithText ("fullscreen16x16.gif", Txt_View_in_a_new_window, Txt_View_in_a_new_window); fprintf (Gbl.F.Out,""); diff --git a/swad_institution.c b/swad_institution.c index ff62eef7..e611de80 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -599,7 +599,7 @@ static void Ins_Configuration (bool PrintView) static void Ins_PutIconsToPrintAndUpload (void) { /***** Link to print info about institution *****/ - Lay_PutContextualIconToPrint (ActPrnInsInf,NULL); + Ico_PutContextualIconToPrint (ActPrnInsInf,NULL); if (Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM) /***** Link to upload logo of institution *****/ @@ -734,7 +734,7 @@ static void Ins_PutIconsListInstitutions (void) static void Ins_PutIconToEditInstitutions (void) { - Lay_PutContextualIconToEdit (ActEdiIns,NULL); + Ico_PutContextualIconToEdit (ActEdiIns,NULL); } /*****************************************************************************/ @@ -945,7 +945,7 @@ void Ins_EditInstitutions (void) static void Ins_PutIconToViewInstitutions (void) { - Lay_PutContextualIconToView (ActSeeIns,NULL); + Ico_PutContextualIconToView (ActSeeIns,NULL); } /*****************************************************************************/ @@ -1424,12 +1424,12 @@ static void Ins_ListInstitutionsForEdition (void) Ins->NumUsrsWhoClaimToBelongToIns || Ins->NumUsrs || // Institution has centres or users ==> deletion forbidden !ICanEdit) - Lay_PutIconRemovalNotAllowed (); + Ico_PutIconRemovalNotAllowed (); else { Act_FormStart (ActRemIns); Ins_PutParamOtherInsCod (Ins->InsCod); - Lay_PutIconRemove (); + Ico_PutIconRemove (); Act_FormEnd (); } fprintf (Gbl.F.Out,""); diff --git a/swad_layout.c b/swad_layout.c index 4b69da61..88a12d59 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -1058,70 +1058,6 @@ static void Lay_ShowRightColumn (void) Gbl.Prefs.IconsURL); } -/*****************************************************************************/ -/***** Show contextual icons to remove, edit, view, hide, unhide, print ******/ -/*****************************************************************************/ - -void Lay_PutContextualIconToRemove (Act_Action_t NextAction,void (*FuncParams) ()) - { - extern const char *Txt_Remove; - - Lay_PutContextualLink (NextAction,NULL,FuncParams, - "remove-on64x64.png", - Txt_Remove,NULL, - NULL); - } - -void Lay_PutContextualIconToEdit (Act_Action_t NextAction,void (*FuncParams) ()) - { - extern const char *Txt_Edit; - - Lay_PutContextualLink (NextAction,NULL,FuncParams, - "edit64x64.png", - Txt_Edit,NULL, - NULL); - } - -void Lay_PutContextualIconToView (Act_Action_t NextAction,void (*FuncParams) ()) - { - extern const char *Txt_View; - - Lay_PutContextualLink (NextAction,NULL,FuncParams, - "eye-on64x64.png", - Txt_View,NULL, - NULL); - } - -void Lay_PutContextualIconToHide (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_PutContextualIconToUnhide (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_PutContextualIconToPrint (Act_Action_t NextAction,void (*FuncParams) ()) - { - extern const char *Txt_Print; - - Lay_PutContextualLink (NextAction,NULL,FuncParams, - "print64x64.png", - Txt_Print,NULL, - NULL); - } - /*****************************************************************************/ /**************** Show an icon with a link in contextual menu ****************/ /*****************************************************************************/ @@ -1145,7 +1081,7 @@ void Lay_PutContextualLink (Act_Action_t NextAction,const char *Anchor, FuncParams (); /***** Put icon with link *****/ - Lay_PutIconLink (Icon,Title,Text, + Ico_PutIconLink (Icon,Title,Text, Text ? The_ClassFormBold[Gbl.Prefs.Theme] : NULL, OnSubmit); @@ -1218,123 +1154,6 @@ void Lay_PutContextualCheckbox (Act_Action_t NextAction, // jumping to the next line on narrow screens } -/*****************************************************************************/ -/****************** Show an icon with a link (without text) ******************/ -/*****************************************************************************/ - -void Lay_PutIconLink (const char *Icon,const char *Title,const char *Text, - const char *LinkStyle,const char *OnSubmit) - { - Act_LinkFormSubmit (Title,LinkStyle,OnSubmit); - Lay_PutIconWithText (Icon,Title,Text); - fprintf (Gbl.F.Out,""); - } - -/*****************************************************************************/ -/**************** Put a icon with a text to submit a form ********************/ -/*****************************************************************************/ - -void Lay_PutIconWithText (const char *Icon,const char *Alt,const char *Text) - { - /***** Print icon and optional text *****/ - fprintf (Gbl.F.Out,"
" - "\"%s\"", - Gbl.Prefs.IconsURL,Icon, - Alt,Text ? Text : Alt); - if (Text) - if (Text[0]) - fprintf (Gbl.F.Out," %s",Text); - fprintf (Gbl.F.Out,"
"); - } - -/*****************************************************************************/ -/********** Put a icon to submit a form. **********/ -/********** When clicked, the icon will be replaced by an animation **********/ -/*****************************************************************************/ - -void Lay_PutCalculateIcon (const char *Alt) - { - fprintf (Gbl.F.Out,"
" - "\"%s\"" - "\"%s\"" // Animated icon hidden - "
" - "", - Gbl.Form.Num,Gbl.Prefs.IconsURL,Alt,Alt, - Gbl.Form.Num,Gbl.Prefs.IconsURL,Alt,Alt); - } - -/*****************************************************************************/ -/********** Put a icon with a text to submit a form. **********/ -/********** When clicked, the icon will be replaced by an animation **********/ -/*****************************************************************************/ - -void Lay_PutCalculateIconWithText (const char *Alt,const char *Text) - { - fprintf (Gbl.F.Out,"
" - "\"%s\"" - "\"%s\"" // Animated icon hidden - " %s" - "
" - "", - Gbl.Form.Num,Gbl.Prefs.IconsURL,Alt,Text, - Gbl.Form.Num,Gbl.Prefs.IconsURL,Alt,Text, - Text); - } - -/*****************************************************************************/ -/******** Put a disabled icon indicating that removal is not allowed *********/ -/*****************************************************************************/ - -void Lay_PutIconRemovalNotAllowed (void) - { - extern const char *Txt_Removal_not_allowed; - - fprintf (Gbl.F.Out,"\"%s\"", - Gbl.Prefs.IconsURL, - Txt_Removal_not_allowed, - Txt_Removal_not_allowed); - } - -void Lay_PutIconBRemovalNotAllowed (void) - { - extern const char *Txt_Removal_not_allowed; - - fprintf (Gbl.F.Out,"\"%s\"", - Gbl.Prefs.IconsURL, - Txt_Removal_not_allowed, - Txt_Removal_not_allowed); - } - -/*****************************************************************************/ -/******** Put an icon indicating that removal is not allowed *********/ -/*****************************************************************************/ - -void Lay_PutIconRemove (void) - { - extern const char *Txt_Remove; - - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove, - Txt_Remove); - } - /*****************************************************************************/ /******************************* Start/end table *****************************/ /*****************************************************************************/ diff --git a/swad_layout.h b/swad_layout.h index 0076a9f7..50e0018b 100644 --- a/swad_layout.h +++ b/swad_layout.h @@ -50,12 +50,6 @@ void Lay_WriteStartOfPage (void); -void Lay_PutContextualIconToRemove (Act_Action_t NextAction,void (*FuncParams) ()); -void Lay_PutContextualIconToEdit (Act_Action_t NextAction,void (*FuncParams) ()); -void Lay_PutContextualIconToView (Act_Action_t NextAction,void (*FuncParams) ()); -void Lay_PutContextualIconToUnhide (Act_Action_t NextAction,void (*FuncParams) ()); -void Lay_PutContextualIconToHide (Act_Action_t NextAction,void (*FuncParams) ()); -void Lay_PutContextualIconToPrint (Act_Action_t NextAction,void (*FuncParams) ()); void Lay_PutContextualLink (Act_Action_t NextAction,const char *Anchor, void (*FuncParams) (), const char *Icon, @@ -66,15 +60,6 @@ void Lay_PutContextualCheckbox (Act_Action_t NextAction, const char *CheckboxName, bool Checked,bool Disabled, const char *Title,const char *Text); -void Lay_PutIconLink (const char *Icon,const char *Title,const char *Text, - const char *LinkStyle,const char *OnSubmit); -void Lay_PutIconWithText (const char *Icon,const char *Alt,const char *Text); -void Lay_PutCalculateIcon (const char *Alt); -void Lay_PutCalculateIconWithText (const char *Alt,const char *Text); - -void Lay_PutIconRemovalNotAllowed (void); -void Lay_PutIconBRemovalNotAllowed (void); -void Lay_PutIconRemove (void); void Lay_StartTable (unsigned CellPadding); void Lay_StartTableCenter (unsigned CellPadding); diff --git a/swad_link.c b/swad_link.c index eb89b6f5..763347bc 100644 --- a/swad_link.c +++ b/swad_link.c @@ -144,7 +144,7 @@ void Lnk_SeeLinks (void) static void Lnk_PutIconToEditLinks (void) { - Lay_PutContextualIconToEdit (ActEdiLnk,NULL); + Ico_PutContextualIconToEdit (ActEdiLnk,NULL); } /*****************************************************************************/ @@ -377,7 +377,7 @@ void Lnk_FreeListLinks (void) static void Lnk_PutIconToViewLinks (void) { - Lay_PutContextualIconToView (ActSeeLnk,NULL); + Ico_PutContextualIconToView (ActSeeLnk,NULL); } /*****************************************************************************/ @@ -407,7 +407,7 @@ static void Lnk_ListLinksForEdition (void) ""); Act_FormStart (ActRemLnk); Lnk_PutParamLnkCod (Lnk->LnkCod); - Lay_PutIconRemove (); + Ico_PutIconRemove (); Act_FormEnd (); fprintf (Gbl.F.Out,""); diff --git a/swad_mail.c b/swad_mail.c index e118c352..61dd1995 100644 --- a/swad_mail.c +++ b/swad_mail.c @@ -180,7 +180,7 @@ static void Mai_GetParamMaiOrder (void) static void Mai_PutIconToEditMailDomains (void) { - Lay_PutContextualIconToEdit (ActEdiMai,NULL); + Ico_PutContextualIconToEdit (ActEdiMai,NULL); } /*****************************************************************************/ @@ -469,7 +469,7 @@ static void Mai_ListMailDomainsForEdition (void) ""); Act_FormStart (ActRemMai); Mai_PutParamMaiCod (Mai->MaiCod); - Lay_PutIconRemove (); + Ico_PutIconRemove (); Act_FormEnd (); fprintf (Gbl.F.Out,""); @@ -979,7 +979,7 @@ void Mai_ListEmails (void) StrAddresses, Txt_Create_email_message, The_ClassFormBold[Gbl.Prefs.Theme]); - Lay_PutIconWithText ("editnewmsg16x16.gif", + Ico_PutIconWithText ("editnewmsg16x16.gif", Txt_Create_email_message, Txt_Create_email_message); fprintf (Gbl.F.Out,"" @@ -1298,7 +1298,7 @@ void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe) } fprintf (Gbl.F.Out,"", row[0]); - Lay_PutIconRemove (); + Ico_PutIconRemove (); Act_FormEnd (); /* Email */ diff --git a/swad_message.c b/swad_message.c index 0b9c76fe..a62172b1 100644 --- a/swad_message.c +++ b/swad_message.c @@ -1779,7 +1779,7 @@ static void Msg_ShowSentOrReceivedMessages (void) Act_LinkFormSubmitAnimated (Txt_Update_messages, The_ClassFormBold[Gbl.Prefs.Theme], NULL); - Lay_PutCalculateIconWithText (Txt_Update_messages,Txt_Update_messages); + Ico_PutCalculateIconWithText (Txt_Update_messages,Txt_Update_messages); fprintf (Gbl.F.Out,""); Act_FormEnd (); @@ -2425,7 +2425,7 @@ static void Msg_PutIconsListMsgs (void) }; /***** Put icon to remove messages *****/ - Lay_PutContextualIconToRemove (ActionReqDelAllMsg[Gbl.Msg.TypeOfMessages], + Ico_PutContextualIconToRemove (ActionReqDelAllMsg[Gbl.Msg.TypeOfMessages], Msg_PutHiddenParamsMsgsFilters); /***** Put icon to show a figure *****/ @@ -2908,7 +2908,7 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod) /***** Form to delete message *****/ fprintf (Gbl.F.Out,"
"); Gbl.Msg.MsgCod = MsgCod; // Message to be deleted - Lay_PutContextualIconToRemove (ActionDelMsg[Gbl.Msg.TypeOfMessages], + Ico_PutContextualIconToRemove (ActionDelMsg[Gbl.Msg.TypeOfMessages], Msg_PutHiddenParamsOneMsg); fprintf (Gbl.F.Out,""); @@ -3272,7 +3272,7 @@ static void Msg_WriteFormToReply (long MsgCod,long CrsCod, (Replied ? Txt_Go_to_course_and_reply_again : Txt_Go_to_course_and_reply), The_ClassFormBold[Gbl.Prefs.Theme],NULL); - Lay_PutIconWithText ("reply16x16.gif", + Ico_PutIconWithText ("reply16x16.gif", Replied ? Txt_Reply_again : Txt_Reply, NULL); diff --git a/swad_nickname.c b/swad_nickname.c index 7bde462d..490b61fd 100644 --- a/swad_nickname.c +++ b/swad_nickname.c @@ -241,7 +241,7 @@ void Nck_ShowFormChangeUsrNickname (void) fprintf (Gbl.F.Out,"", row[0]); - Lay_PutIconRemove (); + Ico_PutIconRemove (); Act_FormEnd (); } diff --git a/swad_notice.c b/swad_notice.c index a7a89f02..52d0d0cc 100644 --- a/swad_notice.c +++ b/swad_notice.c @@ -642,7 +642,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing, if (Not_CheckIfICanEditNotices ()) { /***** Put form to remove announcement *****/ - Lay_PutContextualIconToRemove (ActReqRemNot,Not_PutParams); + Ico_PutContextualIconToRemove (ActReqRemNot,Not_PutParams); /***** Put form to change the status of the notice *****/ switch (Status) diff --git a/swad_photo.c b/swad_photo.c index f882bdff..67e6fd13 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -1928,7 +1928,7 @@ static Pho_HowOrderDegrees_t Pho_GetHowOrderDegreesFromForm (void) static void Pho_PutIconToPrintDegreeStats (void) { - Lay_PutContextualIconToPrint (ActPrnPhoDeg,Pho_PutLinkToPrintViewOfDegreeStatsParams); + Ico_PutContextualIconToPrint (ActPrnPhoDeg,Pho_PutLinkToPrintViewOfDegreeStatsParams); } static void Pho_PutLinkToPrintViewOfDegreeStatsParams (void) @@ -1978,7 +1978,7 @@ static void Pho_PutLinkToCalculateDegreeStats (void) Act_LinkFormSubmitAnimated (Txt_Calculate_average_photo_of_a_degree, The_ClassFormBold[Gbl.Prefs.Theme], NULL); - Lay_PutCalculateIconWithText (Txt_Calculate_average_photo_of_a_degree, + Ico_PutCalculateIconWithText (Txt_Calculate_average_photo_of_a_degree, Txt_Calculate_average_photo_of_THE_DEGREE_X); /***** Put selector with all the degrees with students *****/ diff --git a/swad_place.c b/swad_place.c index 390a9915..eb4c1c09 100644 --- a/swad_place.c +++ b/swad_place.c @@ -233,7 +233,7 @@ static void Plc_GetParamPlcOrder (void) static void Plc_PutIconToEditPlaces (void) { - Lay_PutContextualIconToEdit (ActEdiPlc,NULL); + Ico_PutContextualIconToEdit (ActEdiPlc,NULL); } /*****************************************************************************/ @@ -273,7 +273,7 @@ void Plc_EditPlaces (void) static void Plc_PutIconToViewPlacesWhenEditing (void) { - Lay_PutContextualIconToView (ActSeePlc,NULL); + Ico_PutContextualIconToView (ActSeePlc,NULL); } /*****************************************************************************/ @@ -479,12 +479,12 @@ static void Plc_ListPlacesForEdition (void) fprintf (Gbl.F.Out,"" ""); if (Plc->NumCtrs) // Place has centres ==> deletion forbidden - Lay_PutIconRemovalNotAllowed (); + Ico_PutIconRemovalNotAllowed (); else { Act_FormStart (ActRemPlc); Plc_PutParamPlcCod (Plc->PlcCod); - Lay_PutIconRemove (); + Ico_PutIconRemove (); Act_FormEnd (); } fprintf (Gbl.F.Out,""); diff --git a/swad_plugin.c b/swad_plugin.c index 8ebec111..e5565b94 100644 --- a/swad_plugin.c +++ b/swad_plugin.c @@ -154,7 +154,7 @@ void Plg_ListPlugins (void) static void Plg_PutIconToEditPlugins (void) { - Lay_PutContextualIconToEdit (ActEdiPlg,NULL); + Ico_PutContextualIconToEdit (ActEdiPlg,NULL); } /*****************************************************************************/ @@ -367,7 +367,7 @@ static void Plg_ListPluginsForEdition (void) ""); Act_FormStart (ActRemPlg); Plg_PutParamPlgCod (Plg->PlgCod); - Lay_PutIconRemove (); + Ico_PutIconRemove (); Act_FormEnd (); fprintf (Gbl.F.Out,""); diff --git a/swad_profile.c b/swad_profile.c index 29782dd7..4ed1e15d 100644 --- a/swad_profile.c +++ b/swad_profile.c @@ -609,7 +609,7 @@ static void Prf_PutLinkToUpdateAction (Act_Action_t Action,const char *Encrypted Usr_PutParamUsrCodEncrypted (EncryptedUsrCod); Act_LinkFormSubmitAnimated (Txt_Calculate,The_ClassForm[Gbl.Prefs.Theme], NULL); - Lay_PutCalculateIconWithText (Txt_Calculate,Txt_Calculate); + Ico_PutCalculateIconWithText (Txt_Calculate,Txt_Calculate); Act_FormEnd (); } diff --git a/swad_record.c b/swad_record.c index d9414cf5..116bedab 100644 --- a/swad_record.c +++ b/swad_record.c @@ -290,7 +290,7 @@ void Rec_ListFieldsRecordsForEdition (void) fprintf (Gbl.F.Out,""); Act_FormStart (ActReqRemFie); Par_PutHiddenParamLong ("FieldCod",Gbl.CurrentCrs.Records.LstFields.Lst[NumField].FieldCod); - Lay_PutIconRemove (); + Ico_PutIconRemove (); Act_FormEnd (); fprintf (Gbl.F.Out,""); @@ -370,7 +370,7 @@ void Rec_ShowFormCreateRecordField (void) /***** Write disabled icon to remove the field *****/ fprintf (Gbl.F.Out,"" ""); - Lay_PutIconRemovalNotAllowed (); + Ico_PutIconRemovalNotAllowed (); fprintf (Gbl.F.Out,""); /***** Field name *****/ @@ -1523,7 +1523,7 @@ static void Rec_ShowLinkToPrintPreviewOfRecords (void) unsigned i; Act_LinkFormSubmit (Txt_Print,The_ClassFormBold[Gbl.Prefs.Theme],NULL); - Lay_PutIconWithText ("print64x64.png",Txt_Print,Txt_Print); + Ico_PutIconWithText ("print64x64.png",Txt_Print,Txt_Print); fprintf (Gbl.F.Out,"" "