Version 16.194.13

This commit is contained in:
Antonio Cañas Vargas 2017-04-28 12:52:58 +02:00
parent c4944c3cb9
commit 379bba6aec
4 changed files with 40 additions and 20 deletions

View File

@ -221,13 +221,14 @@
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.194.12 (2017-04-28)" #define Log_PLATFORM_VERSION "SWAD 16.194.13 (2017-04-28)"
#define CSS_FILE "swad16.193.4.css" #define CSS_FILE "swad16.193.4.css"
#define JS_FILE "swad16.181.js" #define JS_FILE "swad16.181.js"
// Number of lines (includes comments but not blank lines) has been got with the following command: // 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 // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
/* /*
Version 16.194.13:Apr 28, 2017 Changed dialog to remove a social note. (218417 lines)
Version 16.194.12:Apr 28, 2017 Changed dialog to remove a social comment. (218398 lines) Version 16.194.12:Apr 28, 2017 Changed dialog to remove a social comment. (218398 lines)
Version 16.194.11:Apr 28, 2017 Changed dialog to remove a notice. (218379 lines) Version 16.194.11:Apr 28, 2017 Changed dialog to remove a notice. (218379 lines)
Version 16.194.10:Apr 28, 2017 Changed dialog to remove an exam announcement. (218379 lines) Version 16.194.10:Apr 28, 2017 Changed dialog to remove an exam announcement. (218379 lines)

View File

@ -578,7 +578,8 @@ struct Globals
struct struct
{ {
Soc_WhichUsrs_t WhichUsrs; Soc_WhichUsrs_t WhichUsrs;
long PubCod; // Used as parameter about publication to be edited, removed... long NotCod; // Used as parameter about social note to be edited, removed...
long PubCod; // Used as parameter about social publishing to be edited, removed...
} Social; } Social;
struct struct
{ {

View File

@ -225,6 +225,7 @@ static long Soc_UnfavSocialNote (void);
static long Soc_UnfavSocialComment (void); static long Soc_UnfavSocialComment (void);
static void Soc_RequestRemovalSocialNote (void); static void Soc_RequestRemovalSocialNote (void);
static void Soc_PutParamsRemoveSocialNote (void);
static void Soc_RemoveSocialNote (void); static void Soc_RemoveSocialNote (void);
static void Soc_RemoveImgFileFromSocialPost (long PstCod); static void Soc_RemoveImgFileFromSocialPost (long PstCod);
static void Soc_RemoveASocialNoteFromDB (struct SocialNote *SocNot); static void Soc_RemoveASocialNoteFromDB (struct SocialNote *SocNot);
@ -3648,27 +3649,44 @@ static void Soc_RequestRemovalSocialNote (void)
if (Gbl.Usrs.Me.Logged && if (Gbl.Usrs.Me.Logged &&
SocNot.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // I am the author of this note SocNot.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // I am the author of this note
{ {
/***** Show warning and social note *****/ /***** Show question and button to remove social note *****/
/* Warning message */ /* Start alert */
Lay_ShowAlert (Lay_WARNING,Txt_Do_you_really_want_to_remove_the_following_post); Lay_ShowAlertAndButton1 (Lay_QUESTION,Txt_Do_you_really_want_to_remove_the_following_post);
/* Show social note */ /* Show social note */
Soc_WriteSocialNote (&SocNot, Soc_WriteSocialNote (&SocNot,
Soc_TOP_MESSAGE_NONE,-1L, Soc_TOP_MESSAGE_NONE,-1L,
false,true); false,true);
/* End alert */
/***** Form to ask for confirmation to remove this social post *****/ Gbl.Social.NotCod = SocNot.NotCod; // Social note to be removed
Soc_FormStart (ActRemSocPubGbl,ActRemSocPubUsr); if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
Soc_PutHiddenParamNotCod (SocNot.NotCod); Lay_ShowAlertAndButton2 (ActRemSocPubUsr,"timeline",
Lay_PutRemoveButton (Txt_Remove); Soc_PutParamsRemoveSocialNote,
Act_FormEnd (); Lay_REMOVE_BUTTON,Txt_Remove);
else
Lay_ShowAlertAndButton2 (ActRemSocPubGbl,NULL,
Soc_PutParamsRemoveSocialNote,
Lay_REMOVE_BUTTON,Txt_Remove);
} }
} }
else else
Lay_ShowAlert (Lay_WARNING,Txt_The_original_post_no_longer_exists); Lay_ShowAlert (Lay_WARNING,Txt_The_original_post_no_longer_exists);
} }
/*****************************************************************************/
/****************** Put parameters to remove a social note *******************/
/*****************************************************************************/
static void Soc_PutParamsRemoveSocialNote (void)
{
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
Usr_PutParamOtherUsrCodEncrypted ();
else
Soc_PutParamWhichUsrs ();
Soc_PutHiddenParamNotCod (Gbl.Social.NotCod);
}
/*****************************************************************************/ /*****************************************************************************/
/*************************** Remove a social note ****************************/ /*************************** Remove a social note ****************************/
/*****************************************************************************/ /*****************************************************************************/
@ -3979,7 +3997,7 @@ static void Soc_RequestRemovalSocialComment (void)
true); true);
/* End alert */ /* End alert */
Gbl.Social.PubCod = SocCom.PubCod; // Publication to be removed Gbl.Social.PubCod = SocCom.PubCod; // Social publishing to be removed
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0) if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
Lay_ShowAlertAndButton2 (ActRemSocComUsr,"timeline", Lay_ShowAlertAndButton2 (ActRemSocComUsr,"timeline",
Soc_PutParamsRemoveSocialCommment, Soc_PutParamsRemoveSocialCommment,

View File

@ -9161,17 +9161,17 @@ const char *Txt_Do_you_really_want_to_remove_the_following_comment =
const char *Txt_Do_you_really_want_to_remove_the_following_post = const char *Txt_Do_you_really_want_to_remove_the_following_post =
#if L==1 #if L==1
"De veres voleu eliminar el següent comentari?"; "De veres voleu eliminar la següent publicació?";
#elif L==2 #elif L==2
"Wollen Sie wirklich, um die folgende Beitrag zu entfernen?"; "Wollen Sie wirklich, um die folgende Beitrag zu entfernen?";
#elif L==3 #elif L==3
"Do you really want to remove the following post?"; "Do you really want to remove the following post?";
#elif L==4 #elif L==4
"¿Realmente desea eliminar el siguiente comentario?"; "¿Realmente desea eliminar la siguiente publicación?";
#elif L==5 #elif L==5
"Voulez-vous vraiment supprimer le post suivant?"; "Voulez-vous vraiment supprimer le post suivant?";
#elif L==6 #elif L==6
"¿Realmente desea eliminar el siguiente comentario?"; // Okoteve traducción "¿Realmente desea eliminar la siguiente publicación?"; // Okoteve traducción
#elif L==7 #elif L==7
"Vuoi realmente rimuovere il seguente post?"; "Vuoi realmente rimuovere il seguente post?";
#elif L==8 #elif L==8
@ -24341,17 +24341,17 @@ const char *Txt_New_SOCIAL_comment =
const char *Txt_New_SOCIAL_post = const char *Txt_New_SOCIAL_post =
#if L==1 #if L==1
"Novo missatge"; "Nova publicació";
#elif L==2 #elif L==2
"Neue Beitrag"; "Neue Beitrag";
#elif L==3 #elif L==3
"New post"; "New post";
#elif L==4 #elif L==4
"Nuevo mensaje"; "Nueva publicación";
#elif L==5 #elif L==5
"Nouveau message"; "Nouveau post";
#elif L==6 #elif L==6
"Nuevo mensaje"; // Okoteve traducción "Nueva publicación"; // Okoteve traducción
#elif L==7 #elif L==7
"Nuovo post"; "Nuovo post";
#elif L==8 #elif L==8
@ -44832,7 +44832,7 @@ const char *Txt_The_original_post_no_longer_exists =
#elif L==4 #elif L==4
"La publicación original ya no existe."; "La publicación original ya no existe.";
#elif L==5 #elif L==5
"La publication originale a disparu."; "Le post original a disparu.";
#elif L==6 #elif L==6
"La publicación original ya no existe."; // Okoteve traducción "La publicación original ya no existe."; // Okoteve traducción
#elif L==7 #elif L==7