From 803860237f7a406f67cc1cff1989a3286f3a63f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sat, 20 Apr 2019 22:18:38 +0200 Subject: [PATCH] Version18.116.7 --- swad_banner.c | 31 +++++++++++++++---------------- swad_changelog.h | 3 ++- swad_text.c | 42 ------------------------------------------ 3 files changed, 17 insertions(+), 59 deletions(-) diff --git a/swad_banner.c b/swad_banner.c index 12262a92d..d04b20350 100644 --- a/swad_banner.c +++ b/swad_banner.c @@ -401,6 +401,7 @@ static void Ban_ListBannersForEdition (void) { unsigned NumBan; struct Banner *Ban; + char *Anchor = NULL; /***** Start table *****/ Tbl_StartTableWide (2); @@ -416,6 +417,9 @@ static void Ban_ListBannersForEdition (void) Ban = &Gbl.Banners.Lst[NumBan]; Gbl.Banners.BanCodToEdit = Ban->BanCod; + /* Set anchor string */ + Frm_SetAnchorStr (Ban->BanCod,&Anchor); + /* Put icon to remove banner */ fprintf (Gbl.F.Out,"" ""); @@ -425,18 +429,19 @@ static void Ban_ListBannersForEdition (void) /* Put icon to hide/show banner */ fprintf (Gbl.F.Out,""); if (Ban->Hidden) - Ico_PutContextualIconToUnhide (ActShoBan,NULL,Ban_PutParamBanCodToEdit); + Ico_PutContextualIconToUnhide (ActShoBan,Anchor,Ban_PutParamBanCodToEdit); else - Ico_PutContextualIconToHide (ActHidBan,NULL,Ban_PutParamBanCodToEdit); + Ico_PutContextualIconToHide (ActHidBan,Anchor,Ban_PutParamBanCodToEdit); fprintf (Gbl.F.Out,""); /* Banner code */ - fprintf (Gbl.F.Out,"" - "%ld " - "", + fprintf (Gbl.F.Out,"", Ban->Hidden ? "DAT_LIGHT" : - "DAT", - Ban->BanCod); + "DAT"); + Lay_StartArticle (Anchor); + fprintf (Gbl.F.Out,"%ld",Ban->BanCod); + Lay_EndArticle (); + fprintf (Gbl.F.Out,""); /* Banner short name */ fprintf (Gbl.F.Out,""); @@ -485,6 +490,9 @@ static void Ban_ListBannersForEdition (void) Frm_EndForm (); fprintf (Gbl.F.Out,"" ""); + + /* Free anchor string */ + Frm_FreeAnchorStr (Anchor); } /***** End table *****/ @@ -576,9 +584,6 @@ void Ban_HideBanner (void) static void Ban_ShowOrHideBanner (bool Hide) { - extern const char *Txt_The_banner_X_is_now_hidden; - extern const char *Txt_The_banner_X_is_now_visible; - /***** Get banner code *****/ if ((Ban_EditingBan->BanCod = Ban_GetParamBanCod ()) == -1L) Lay_ShowErrorAndExit ("Code of banner is missing."); @@ -594,12 +599,6 @@ static void Ban_ShowOrHideBanner (bool Hide) Hide ? 'Y' : 'N', Ban_EditingBan->BanCod); - - /***** Write message to show the change made *****/ - Ale_CreateAlert (Ale_SUCCESS,NULL, - Hide ? Txt_The_banner_X_is_now_hidden : - Txt_The_banner_X_is_now_visible, - Ban_EditingBan->ShrtName); } /*****************************************************************************/ diff --git a/swad_changelog.h b/swad_changelog.h index 0d98e48d0..ac2c54914 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -448,10 +448,11 @@ En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 18.116.6 (2019-04-20)" +#define Log_PLATFORM_VERSION "SWAD 18.116.7 (2019-04-20)" #define CSS_FILE "swad18.112.1.css" #define JS_FILE "swad18.116.5.js" /* + Version 18.116.7: Apr 20, 2019 Changed the behaviour of hiding/showing a banner. (242934 lines) Version 18.116.6: Apr 20, 2019 Changed the behaviour of hiding/showing an assignment. (242974 lines) Version 18.116.5: Apr 20, 2019 Changed the behaviour of hiding/showing an attendance event. Code refactoring related to anchors. (243014 lines) diff --git a/swad_text.c b/swad_text.c index c905b9a18..baad45205 100644 --- a/swad_text.c +++ b/swad_text.c @@ -43034,48 +43034,6 @@ const char *Txt_The_banner_X_has_been_renamed_as_Y = // Warning: it is very impo "O banner %s foi renomeado como %s."; #endif -const char *Txt_The_banner_X_is_now_hidden = // Warning: it is very important to include %s in the following sentences -#if L==1 // ca - "El banner %s ara està ocult."; -#elif L==2 // de - "Der Werbebanner %s ist jetzt ausgeblendet."; // Need Übersetzung -#elif L==3 // en - "The banner %s is now hidden."; -#elif L==4 // es - "El banner %s ahora está oculto."; -#elif L==5 // fr - "Le banner %s est maintenant caché."; -#elif L==6 // gn - "El banner %s ahora está oculto."; // Okoteve traducción -#elif L==7 // it - "Il banner %s è ora nascosto."; -#elif L==8 // pl - "The banner %s jest ukryte."; -#elif L==9 // pt - "O banner %s é agora oculto."; -#endif - -const char *Txt_The_banner_X_is_now_visible = // Warning: it is very important to include %s in the following sentences -#if L==1 // ca - "El banner %s ara està visible."; -#elif L==2 // de - "Der Werbebanner %s ist jetzt sichtbar."; // Need Übersetzung -#elif L==3 // en - "The banner %s is now visible."; -#elif L==4 // es - "El banner %s ahora está visible."; -#elif L==5 // fr - "Le banner %s est maintenant visible."; -#elif L==6 // gn - "El banner %s ahora está visible."; // Okoteve traducción -#elif L==7 // it - "Il banner %s è ora visible."; -#elif L==8 // pl - "The banner %s jest teraz widoczny."; -#elif L==9 // pt - "O banner %s é agora visible."; -#endif - const char *Txt_The_capacity_of_classroom_X_has_not_changed = // Warning: it is very important to include %s in the following sentences #if L==1 // ca "L'aforament de l'aula %s no ha canviat.";