mirror of https://github.com/acanas/swad-core.git
Version 21.103.4: Jun 30, 2022 Code refactoring in icons.
This commit is contained in:
parent
be696099ee
commit
5461b98a55
|
@ -606,10 +606,11 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate
|
||||||
|
|
||||||
TODO: Attach pdf files in multimedia.
|
TODO: Attach pdf files in multimedia.
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 21.103.3 (2022-06-30)"
|
#define Log_PLATFORM_VERSION "SWAD 21.103.4 (2022-06-30)"
|
||||||
#define CSS_FILE "swad21.100.css"
|
#define CSS_FILE "swad21.100.css"
|
||||||
#define JS_FILE "swad21.100.js"
|
#define JS_FILE "swad21.100.js"
|
||||||
/*
|
/*
|
||||||
|
Version 21.103.4: Jun 30, 2022 Code refactoring in icons. (327968 lines)
|
||||||
Version 21.103.3: Jun 30, 2022 Code refactoring in icons. (328131 lines)
|
Version 21.103.3: Jun 30, 2022 Code refactoring in icons. (328131 lines)
|
||||||
Version 21.103.2: Jun 30, 2022 Preparation for Turkish translation. (328306 lines)
|
Version 21.103.2: Jun 30, 2022 Preparation for Turkish translation. (328306 lines)
|
||||||
Version 21.103.1: Jun 29, 2022 Code refactoring in icons. (328305 lines)
|
Version 21.103.1: Jun 29, 2022 Code refactoring in icons. (328305 lines)
|
||||||
|
|
138
swad_text.c
138
swad_text.c
|
@ -5244,29 +5244,6 @@ const char *Txt_columns =
|
||||||
"Sütunlar";
|
"Sütunlar";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_Comment = // As a verb
|
|
||||||
#if L==1 // ca
|
|
||||||
"Comentar";
|
|
||||||
#elif L==2 // de
|
|
||||||
"Kommentieren";
|
|
||||||
#elif L==3 // en
|
|
||||||
"Comment";
|
|
||||||
#elif L==4 // es
|
|
||||||
"Comentar";
|
|
||||||
#elif L==5 // fr
|
|
||||||
"Commenter";
|
|
||||||
#elif L==6 // gn
|
|
||||||
"Comentar"; // Okoteve traducción
|
|
||||||
#elif L==7 // it
|
|
||||||
"Commentare";
|
|
||||||
#elif L==8 // pl
|
|
||||||
"Komentować";
|
|
||||||
#elif L==9 // pt
|
|
||||||
"Comentar";
|
|
||||||
#elif L==10 // tr
|
|
||||||
"Comment"; // Çeviri lazim!
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_Comment_removed =
|
const char *Txt_Comment_removed =
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"Comentari eliminat.";
|
"Comentari eliminat.";
|
||||||
|
@ -20356,29 +20333,6 @@ const char *Txt_Mark_all_NOTIFICATIONS_as_read =
|
||||||
"Mark all as read"; // Çeviri lazim!
|
"Mark all as read"; // Çeviri lazim!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_TIMELINE_Mark_as_favourite =
|
|
||||||
#if L==1 // ca
|
|
||||||
"Marca com favorit";
|
|
||||||
#elif L==2 // de
|
|
||||||
"Markieren als Favorit";
|
|
||||||
#elif L==3 // en
|
|
||||||
"Mark as favourite";
|
|
||||||
#elif L==4 // es
|
|
||||||
"Marcar como favorito";
|
|
||||||
#elif L==5 // fr
|
|
||||||
"Marquer comme favori";
|
|
||||||
#elif L==6 // gn
|
|
||||||
"Marcar como favorito"; // Okoteve traducción
|
|
||||||
#elif L==7 // it
|
|
||||||
"Segnare come preferito";
|
|
||||||
#elif L==8 // pl
|
|
||||||
"Oznacz jako ulubiony";
|
|
||||||
#elif L==9 // pt
|
|
||||||
"Marcar como favorito";
|
|
||||||
#elif L==10 // tr
|
|
||||||
"Mark as favourite"; // Çeviri lazim!
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_Marks_management_area =
|
const char *Txt_Marks_management_area =
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"Zona d'administració de qualificacions";
|
"Zona d'administració de qualificacions";
|
||||||
|
@ -54391,29 +54345,6 @@ const char *Txt_Timeline_OF_A_USER = // Warning: it is very important to include
|
||||||
"%s timeline"; // Çeviri lazim!
|
"%s timeline"; // Çeviri lazim!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_TIMELINE_Favourite =
|
|
||||||
#if L==1 // ca
|
|
||||||
"Favorit";
|
|
||||||
#elif L==2 // de
|
|
||||||
"Favorit";
|
|
||||||
#elif L==3 // en
|
|
||||||
"Favourite";
|
|
||||||
#elif L==4 // es
|
|
||||||
"Favorito";
|
|
||||||
#elif L==5 // fr
|
|
||||||
"Favori";
|
|
||||||
#elif L==6 // gn
|
|
||||||
"Favorito"; // Okoteve traducción
|
|
||||||
#elif L==7 // it
|
|
||||||
"Preferito";
|
|
||||||
#elif L==8 // pl
|
|
||||||
"Ulubiony";
|
|
||||||
#elif L==9 // pt
|
|
||||||
"Favorito";
|
|
||||||
#elif L==10 // tr
|
|
||||||
"Favourite"; // Çeviri lazim!
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_TIMELINE_Favourited_by_X_USERS = // Warning: it is very important to include %u in the following sentences
|
const char *Txt_TIMELINE_Favourited_by_X_USERS = // Warning: it is very important to include %u in the following sentences
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"Marcat com favorit per %u";
|
"Marcat com favorit per %u";
|
||||||
|
@ -55024,52 +54955,6 @@ const char *Txt_TIMETABLE_TYPES[Tmt_NUM_TIMETABLE_TYPES] =
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *Txt_TIMELINE_Share =
|
|
||||||
#if L==1 // ca
|
|
||||||
"Compartir";
|
|
||||||
#elif L==2 // de
|
|
||||||
"Teilen";
|
|
||||||
#elif L==3 // en
|
|
||||||
"Share";
|
|
||||||
#elif L==4 // es
|
|
||||||
"Compartir";
|
|
||||||
#elif L==5 // fr
|
|
||||||
"Partager";
|
|
||||||
#elif L==6 // gn
|
|
||||||
"Compartir"; // Okoteve traducción
|
|
||||||
#elif L==7 // it
|
|
||||||
"Condividere";
|
|
||||||
#elif L==8 // pl
|
|
||||||
"Dzielić";
|
|
||||||
#elif L==9 // pt
|
|
||||||
"Compartilhar";
|
|
||||||
#elif L==10 // tr
|
|
||||||
"Share"; // Çeviri lazim!
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_TIMELINE_Shared =
|
|
||||||
#if L==1 // ca
|
|
||||||
"Compartit";
|
|
||||||
#elif L==2 // de
|
|
||||||
"Geteilt";
|
|
||||||
#elif L==3 // en
|
|
||||||
"Shared";
|
|
||||||
#elif L==4 // es
|
|
||||||
"Compartido";
|
|
||||||
#elif L==5 // fr
|
|
||||||
"Partagé";
|
|
||||||
#elif L==6 // gn
|
|
||||||
"Compartido"; // Okoteve traducción
|
|
||||||
#elif L==7 // it
|
|
||||||
"Condiviso";
|
|
||||||
#elif L==8 // pl
|
|
||||||
"Udostępnione";
|
|
||||||
#elif L==9 // pt
|
|
||||||
"Compartilhado";
|
|
||||||
#elif L==10 // tr
|
|
||||||
"Shared"; // Çeviri lazim!
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_TIMELINE_Shared_by_X_USERS = // Warning: it is very important to include %u in the following sentences
|
const char *Txt_TIMELINE_Shared_by_X_USERS = // Warning: it is very important to include %u in the following sentences
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"Compartit per %u";
|
"Compartit per %u";
|
||||||
|
@ -58288,29 +58173,6 @@ const char *Txt_View_all_recipients =
|
||||||
"View all recipients"; // Çeviri lazim!
|
"View all recipients"; // Çeviri lazim!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_View_all_USERS =
|
|
||||||
#if L==1 // ca
|
|
||||||
"Veure tots";
|
|
||||||
#elif L==2 // de
|
|
||||||
"Anzeigen alle";
|
|
||||||
#elif L==3 // en
|
|
||||||
"View all";
|
|
||||||
#elif L==4 // es
|
|
||||||
"Ver todos";
|
|
||||||
#elif L==5 // fr
|
|
||||||
"Voir tous";
|
|
||||||
#elif L==6 // gn
|
|
||||||
"Ver todos"; // Okoteve traducción
|
|
||||||
#elif L==7 // it
|
|
||||||
"Vedi tutti";
|
|
||||||
#elif L==8 // pl
|
|
||||||
"Zobacz wszystkich";
|
|
||||||
#elif L==9 // pt
|
|
||||||
"Ver todos";
|
|
||||||
#elif L==10 // tr
|
|
||||||
"View all"; // Çeviri lazim!
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_View_attendance =
|
const char *Txt_View_attendance =
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"Veure assistència";
|
"Veure assistència";
|
||||||
|
|
|
@ -113,12 +113,10 @@ static void TmlCom_ResetComm (struct TmlCom_Comment *Com);
|
||||||
/********* Put an icon to toggle on/off the form to comment a note ***********/
|
/********* Put an icon to toggle on/off the form to comment a note ***********/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void TmlCom_PutIconToToggleComm (const char UniqueId[Frm_MAX_BYTES_ID + 1])
|
void TmlCom_PutIconToToggleComm (const struct Tml_Timeline *Timeline,
|
||||||
|
const char UniqueId[Frm_MAX_BYTES_ID + 1])
|
||||||
{
|
{
|
||||||
extern const char *Txt_Comment;
|
/***** Begin container *****/
|
||||||
|
|
||||||
/***** Link to toggle on/off the form to comment a note *****/
|
|
||||||
/* Begin container */
|
|
||||||
HTM_DIV_Begin ("id=\"%s_ico\" class=\"Tml_ICO_COM_OFF\"",UniqueId);
|
HTM_DIV_Begin ("id=\"%s_ico\" class=\"Tml_ICO_COM_OFF\"",UniqueId);
|
||||||
|
|
||||||
/* Begin anchor */
|
/* Begin anchor */
|
||||||
|
@ -128,12 +126,14 @@ void TmlCom_PutIconToToggleComm (const char UniqueId[Frm_MAX_BYTES_ID + 1])
|
||||||
|
|
||||||
/* Icon to toggle comment */
|
/* Icon to toggle comment */
|
||||||
Ico_PutIcon ("comment-regular.svg",Ico_BLACK,
|
Ico_PutIcon ("comment-regular.svg",Ico_BLACK,
|
||||||
Txt_Comment,"CONTEXT_ICO16x16");
|
Act_GetActionText (Timeline->UsrOrGbl == TmlUsr_TIMELINE_GBL ? ActRcvComGblTL :
|
||||||
|
ActRcvComUsrTL),
|
||||||
|
"CONTEXT_ICO16x16");
|
||||||
|
|
||||||
/* End anchor */
|
/* End anchor */
|
||||||
HTM_A_End ();
|
HTM_A_End ();
|
||||||
|
|
||||||
/* End container */
|
/***** End container *****/
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,14 +143,14 @@ void TmlCom_PutIconToToggleComm (const char UniqueId[Frm_MAX_BYTES_ID + 1])
|
||||||
|
|
||||||
void TmlCom_PutIconCommDisabled (void)
|
void TmlCom_PutIconCommDisabled (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Comment;
|
extern const char *Txt_not_available;
|
||||||
|
|
||||||
/***** Disabled icon to comment a note *****/
|
/***** Disabled icon to comment a note *****/
|
||||||
/* Begin container */
|
/* Begin container */
|
||||||
HTM_DIV_Begin ("class=\"Tml_ICO_COM_OFF Tml_ICO_DISABLED\"");
|
HTM_DIV_Begin ("class=\"Tml_ICO_COM_OFF Tml_ICO_DISABLED\"");
|
||||||
|
|
||||||
/* Disabled icon */
|
/* Disabled icon */
|
||||||
Ico_PutIcon ("edit.svg",Ico_BLACK,Txt_Comment,"ICO16x16");
|
Ico_PutIcon ("comment-regular.svg",Ico_BLACK,Txt_not_available,"ICO16x16");
|
||||||
|
|
||||||
/* End container */
|
/* End container */
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
|
@ -671,8 +671,8 @@ static void TmlCom_WriteButtons (const struct Tml_Timeline *Timeline,
|
||||||
HTM_DIV_Begin ("id=\"fav_com_%s_%u\" class=\"Tml_FAV_COM Tml_FAV_WIDTH\"",
|
HTM_DIV_Begin ("id=\"fav_com_%s_%u\" class=\"Tml_FAV_COM Tml_FAV_WIDTH\"",
|
||||||
Gbl.UniqueNameEncrypted,NumDiv);
|
Gbl.UniqueNameEncrypted,NumDiv);
|
||||||
TmlUsr_PutIconFavSha (TmlUsr_FAV_UNF_COMM,
|
TmlUsr_PutIconFavSha (TmlUsr_FAV_UNF_COMM,
|
||||||
Com->PubCod,Com->UsrCod,Com->NumFavs,
|
Com->PubCod,Com->UsrCod,Com->NumFavs,
|
||||||
TmlUsr_SHOW_FEW_USRS);
|
TmlUsr_SHOW_FEW_USRS);
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
|
|
||||||
/***** Foot column 2: icon to remove this comment *****/
|
/***** Foot column 2: icon to remove this comment *****/
|
||||||
|
|
|
@ -48,7 +48,8 @@ struct TmlCom_Comment
|
||||||
/****************************** Public prototypes ****************************/
|
/****************************** Public prototypes ****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void TmlCom_PutIconToToggleComm (const char UniqueId[Frm_MAX_BYTES_ID + 1]);
|
void TmlCom_PutIconToToggleComm (const struct Tml_Timeline *Timeline,
|
||||||
|
const char UniqueId[Frm_MAX_BYTES_ID + 1]);
|
||||||
void TmlCom_PutIconCommDisabled (void);
|
void TmlCom_PutIconCommDisabled (void);
|
||||||
|
|
||||||
void TmlCom_PutPhotoAndFormToWriteNewComm (const struct Tml_Timeline *Timeline,
|
void TmlCom_PutPhotoAndFormToWriteNewComm (const struct Tml_Timeline *Timeline,
|
||||||
|
|
|
@ -73,8 +73,8 @@ void TmlFav_ShowAllFaversNoteGbl (void)
|
||||||
|
|
||||||
/***** Write HTML inside DIV with form to fav/unfav *****/
|
/***** Write HTML inside DIV with form to fav/unfav *****/
|
||||||
TmlUsr_PutIconFavSha (TmlUsr_FAV_UNF_NOTE,
|
TmlUsr_PutIconFavSha (TmlUsr_FAV_UNF_NOTE,
|
||||||
Not.NotCod,Not.UsrCod,Not.NumFavs,
|
Not.NotCod,Not.UsrCod,Not.NumFavs,
|
||||||
TmlUsr_SHOW_ALL_USRS);
|
TmlUsr_SHOW_ALL_USRS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -99,8 +99,8 @@ void TmlFav_FavNoteGbl (void)
|
||||||
|
|
||||||
/***** Write HTML inside DIV with form to unfav *****/
|
/***** Write HTML inside DIV with form to unfav *****/
|
||||||
TmlUsr_PutIconFavSha (TmlUsr_FAV_UNF_NOTE,
|
TmlUsr_PutIconFavSha (TmlUsr_FAV_UNF_NOTE,
|
||||||
Not.NotCod,Not.UsrCod,Not.NumFavs,
|
Not.NotCod,Not.UsrCod,Not.NumFavs,
|
||||||
TmlUsr_SHOW_FEW_USRS);
|
TmlUsr_SHOW_FEW_USRS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TmlFav_UnfNoteUsr (void)
|
void TmlFav_UnfNoteUsr (void)
|
||||||
|
@ -121,8 +121,8 @@ void TmlFav_UnfNoteGbl (void)
|
||||||
|
|
||||||
/***** Write HTML inside DIV with form to fav *****/
|
/***** Write HTML inside DIV with form to fav *****/
|
||||||
TmlUsr_PutIconFavSha (TmlUsr_FAV_UNF_NOTE,
|
TmlUsr_PutIconFavSha (TmlUsr_FAV_UNF_NOTE,
|
||||||
Not.NotCod,Not.UsrCod,Not.NumFavs,
|
Not.NotCod,Not.UsrCod,Not.NumFavs,
|
||||||
TmlUsr_SHOW_FEW_USRS);
|
TmlUsr_SHOW_FEW_USRS);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void TmlFav_FavNote (struct TmlNot_Note *Not)
|
static void TmlFav_FavNote (struct TmlNot_Note *Not)
|
||||||
|
@ -209,8 +209,8 @@ void TmlFav_ShowAllFaversComGbl (void)
|
||||||
|
|
||||||
/***** Write HTML inside DIV with form to fav/unfav *****/
|
/***** Write HTML inside DIV with form to fav/unfav *****/
|
||||||
TmlUsr_PutIconFavSha (TmlUsr_FAV_UNF_COMM,
|
TmlUsr_PutIconFavSha (TmlUsr_FAV_UNF_COMM,
|
||||||
Com.PubCod,Com.UsrCod,Com.NumFavs,
|
Com.PubCod,Com.UsrCod,Com.NumFavs,
|
||||||
TmlUsr_SHOW_ALL_USRS);
|
TmlUsr_SHOW_ALL_USRS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -235,8 +235,8 @@ void TmlFav_FavCommGbl (void)
|
||||||
|
|
||||||
/***** Write HTML inside DIV with form to unfav *****/
|
/***** Write HTML inside DIV with form to unfav *****/
|
||||||
TmlUsr_PutIconFavSha (TmlUsr_FAV_UNF_COMM,
|
TmlUsr_PutIconFavSha (TmlUsr_FAV_UNF_COMM,
|
||||||
Com.PubCod,Com.UsrCod,Com.NumFavs,
|
Com.PubCod,Com.UsrCod,Com.NumFavs,
|
||||||
TmlUsr_SHOW_FEW_USRS);
|
TmlUsr_SHOW_FEW_USRS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TmlFav_UnfCommUsr (void)
|
void TmlFav_UnfCommUsr (void)
|
||||||
|
@ -257,8 +257,8 @@ void TmlFav_UnfCommGbl (void)
|
||||||
|
|
||||||
/***** Write HTML inside DIV with form to fav *****/
|
/***** Write HTML inside DIV with form to fav *****/
|
||||||
TmlUsr_PutIconFavSha (TmlUsr_FAV_UNF_COMM,
|
TmlUsr_PutIconFavSha (TmlUsr_FAV_UNF_COMM,
|
||||||
Com.PubCod,Com.UsrCod,Com.NumFavs,
|
Com.PubCod,Com.UsrCod,Com.NumFavs,
|
||||||
TmlUsr_SHOW_FEW_USRS);
|
TmlUsr_SHOW_FEW_USRS);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void TmlFav_FavComm (struct TmlCom_Comment *Com)
|
static void TmlFav_FavComm (struct TmlCom_Comment *Com)
|
||||||
|
|
|
@ -41,8 +41,6 @@
|
||||||
/************************* Private constants and types ***********************/
|
/************************* Private constants and types ***********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define TmlFrm_ICON_ELLIPSIS "ellipsis-h.svg"
|
|
||||||
|
|
||||||
const Act_Action_t TmlFrm_ActionGbl[TmlFrm_NUM_ACTIONS] =
|
const Act_Action_t TmlFrm_ActionGbl[TmlFrm_NUM_ACTIONS] =
|
||||||
{
|
{
|
||||||
[TmlFrm_RECEIVE_POST] = ActRcvPstGblTL,
|
[TmlFrm_RECEIVE_POST] = ActRcvPstGblTL,
|
||||||
|
@ -94,10 +92,6 @@ extern struct Globals Gbl;
|
||||||
|
|
||||||
void TmlFrm_PutFormToFavUnfShaUns (TmlUsr_FavSha_t FavSha,long Cod)
|
void TmlFrm_PutFormToFavUnfShaUns (TmlUsr_FavSha_t FavSha,long Cod)
|
||||||
{
|
{
|
||||||
extern const char *Txt_TIMELINE_Mark_as_favourite;
|
|
||||||
extern const char *Txt_TIMELINE_Favourite;
|
|
||||||
extern const char *Txt_TIMELINE_Share;
|
|
||||||
extern const char *Txt_TIMELINE_Shared;
|
|
||||||
struct Tml_Form Form[TmlUsr_NUM_FAV_SHA][2] =
|
struct Tml_Form Form[TmlUsr_NUM_FAV_SHA][2] =
|
||||||
{
|
{
|
||||||
[TmlUsr_FAV_UNF_NOTE] =
|
[TmlUsr_FAV_UNF_NOTE] =
|
||||||
|
@ -109,7 +103,6 @@ void TmlFrm_PutFormToFavUnfShaUns (TmlUsr_FavSha_t FavSha,long Cod)
|
||||||
.ParamCod = Cod,
|
.ParamCod = Cod,
|
||||||
.Icon = TmlFav_ICON_FAV,
|
.Icon = TmlFav_ICON_FAV,
|
||||||
.Color = Ico_BLACK,
|
.Color = Ico_BLACK,
|
||||||
.Title = Txt_TIMELINE_Mark_as_favourite,
|
|
||||||
},
|
},
|
||||||
[true] = // I have faved ==> unfav
|
[true] = // I have faved ==> unfav
|
||||||
{
|
{
|
||||||
|
@ -118,7 +111,6 @@ void TmlFrm_PutFormToFavUnfShaUns (TmlUsr_FavSha_t FavSha,long Cod)
|
||||||
.ParamCod = Cod,
|
.ParamCod = Cod,
|
||||||
.Icon = TmlFav_ICON_FAV,
|
.Icon = TmlFav_ICON_FAV,
|
||||||
.Color = Ico_RED,
|
.Color = Ico_RED,
|
||||||
.Title = Txt_TIMELINE_Favourite,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
[TmlUsr_FAV_UNF_COMM] =
|
[TmlUsr_FAV_UNF_COMM] =
|
||||||
|
@ -130,7 +122,6 @@ void TmlFrm_PutFormToFavUnfShaUns (TmlUsr_FavSha_t FavSha,long Cod)
|
||||||
.ParamCod = Cod,
|
.ParamCod = Cod,
|
||||||
.Icon = TmlFav_ICON_FAV,
|
.Icon = TmlFav_ICON_FAV,
|
||||||
.Color = Ico_BLACK,
|
.Color = Ico_BLACK,
|
||||||
.Title = Txt_TIMELINE_Mark_as_favourite,
|
|
||||||
},
|
},
|
||||||
[true] = // I have faved ==> unfav
|
[true] = // I have faved ==> unfav
|
||||||
{
|
{
|
||||||
|
@ -139,7 +130,6 @@ void TmlFrm_PutFormToFavUnfShaUns (TmlUsr_FavSha_t FavSha,long Cod)
|
||||||
.ParamCod = Cod,
|
.ParamCod = Cod,
|
||||||
.Icon = TmlFav_ICON_FAV,
|
.Icon = TmlFav_ICON_FAV,
|
||||||
.Color = Ico_RED,
|
.Color = Ico_RED,
|
||||||
.Title = Txt_TIMELINE_Favourite,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
[TmlUsr_SHA_UNS_NOTE] =
|
[TmlUsr_SHA_UNS_NOTE] =
|
||||||
|
@ -151,7 +141,6 @@ void TmlFrm_PutFormToFavUnfShaUns (TmlUsr_FavSha_t FavSha,long Cod)
|
||||||
.ParamCod = Cod,
|
.ParamCod = Cod,
|
||||||
.Icon = TmlSha_ICON_SHARE,
|
.Icon = TmlSha_ICON_SHARE,
|
||||||
.Color = Ico_BLACK,
|
.Color = Ico_BLACK,
|
||||||
.Title = Txt_TIMELINE_Share,
|
|
||||||
},
|
},
|
||||||
[true] = // I have shared ==> unshare
|
[true] = // I have shared ==> unshare
|
||||||
{
|
{
|
||||||
|
@ -160,7 +149,6 @@ void TmlFrm_PutFormToFavUnfShaUns (TmlUsr_FavSha_t FavSha,long Cod)
|
||||||
.ParamCod = Cod,
|
.ParamCod = Cod,
|
||||||
.Icon = TmlSha_ICON_SHARE,
|
.Icon = TmlSha_ICON_SHARE,
|
||||||
.Color = Ico_GREEN,
|
.Color = Ico_GREEN,
|
||||||
.Title = Txt_TIMELINE_Shared,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -197,38 +185,6 @@ void TmlFrm_EndForm (void)
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/********************* Form to show all favers/sharers ***********************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
void TmlFrm_PutFormToSeeAllFaversSharers (TmlFrm_Action_t Action,
|
|
||||||
const char *ParamFormat,long ParamCod,
|
|
||||||
TmlUsr_HowManyUsrs_t HowManyUsrs)
|
|
||||||
{
|
|
||||||
extern const char *Txt_View_all_USERS;
|
|
||||||
struct Tml_Form Form =
|
|
||||||
{
|
|
||||||
.Action = Action,
|
|
||||||
.ParamFormat = ParamFormat,
|
|
||||||
.ParamCod = ParamCod,
|
|
||||||
.Icon = TmlFrm_ICON_ELLIPSIS,
|
|
||||||
.Color = Ico_BLACK,
|
|
||||||
.Title = Txt_View_all_USERS,
|
|
||||||
};
|
|
||||||
|
|
||||||
switch (HowManyUsrs)
|
|
||||||
{
|
|
||||||
case TmlUsr_SHOW_FEW_USRS:
|
|
||||||
/***** Form and icon to view all users *****/
|
|
||||||
TmlFrm_FormFavSha (&Form);
|
|
||||||
break;
|
|
||||||
case TmlUsr_SHOW_ALL_USRS:
|
|
||||||
/***** Disabled icon *****/
|
|
||||||
Ico_PutIconOff (TmlFrm_ICON_ELLIPSIS,Ico_BLACK,Txt_View_all_USERS);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******* Form to fav/unfav or share/unshare in global or user timeline *******/
|
/******* Form to fav/unfav or share/unshare in global or user timeline *******/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -236,7 +192,6 @@ void TmlFrm_PutFormToSeeAllFaversSharers (TmlFrm_Action_t Action,
|
||||||
void TmlFrm_FormFavSha (const struct Tml_Form *Form)
|
void TmlFrm_FormFavSha (const struct Tml_Form *Form)
|
||||||
{
|
{
|
||||||
char *OnSubmit;
|
char *OnSubmit;
|
||||||
const char *Anchor;
|
|
||||||
char ParamStr[7 + Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
char ParamStr[7 + Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||||
|
|
||||||
/***** Create parameter string *****/
|
/***** Create parameter string *****/
|
||||||
|
@ -269,7 +224,10 @@ void TmlFrm_FormFavSha (const struct Tml_Form *Form)
|
||||||
ParamStr,
|
ParamStr,
|
||||||
Gbl.Usrs.Other.UsrDat.EnUsrCod) < 0)
|
Gbl.Usrs.Other.UsrDat.EnUsrCod) < 0)
|
||||||
Err_NotEnoughMemoryExit ();
|
Err_NotEnoughMemoryExit ();
|
||||||
Anchor = "timeline";
|
Frm_BeginFormUniqueAnchorOnSubmit (ActUnk,"timeline",OnSubmit);
|
||||||
|
free (OnSubmit);
|
||||||
|
Ico_PutIconLink (Form->Icon,Form->Color,
|
||||||
|
Act_GetActionText (TmlFrm_ActionUsr[Form->Action]));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -280,11 +238,11 @@ void TmlFrm_FormFavSha (const struct Tml_Form *Form)
|
||||||
Gbl.Session.Id,
|
Gbl.Session.Id,
|
||||||
ParamStr) < 0)
|
ParamStr) < 0)
|
||||||
Err_NotEnoughMemoryExit ();
|
Err_NotEnoughMemoryExit ();
|
||||||
Anchor = NULL;
|
Frm_BeginFormUniqueAnchorOnSubmit (ActUnk,NULL,OnSubmit);
|
||||||
|
free (OnSubmit);
|
||||||
|
Ico_PutIconLink (Form->Icon,Form->Color,
|
||||||
|
Act_GetActionText (TmlFrm_ActionGbl[Form->Action]));
|
||||||
}
|
}
|
||||||
Frm_BeginFormUniqueAnchorOnSubmit (ActUnk,Anchor,OnSubmit);
|
|
||||||
free (OnSubmit);
|
|
||||||
Ico_PutIconLink (Form->Icon,Form->Color,Form->Title);
|
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,6 @@ struct Tml_Form
|
||||||
long ParamCod;
|
long ParamCod;
|
||||||
const char *Icon;
|
const char *Icon;
|
||||||
Ico_Color_t Color;
|
Ico_Color_t Color;
|
||||||
const char *Title;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -76,9 +75,6 @@ void TmlFrm_BeginForm (const struct Tml_Timeline *Timeline,
|
||||||
TmlFrm_Action_t Action);
|
TmlFrm_Action_t Action);
|
||||||
void TmlFrm_EndForm (void);
|
void TmlFrm_EndForm (void);
|
||||||
|
|
||||||
void TmlFrm_PutFormToSeeAllFaversSharers (TmlFrm_Action_t Action,
|
|
||||||
const char *ParamFormat,long ParamCod,
|
|
||||||
TmlUsr_HowManyUsrs_t HowManyUsrs);
|
|
||||||
void TmlFrm_FormFavSha (const struct Tml_Form *Form);
|
void TmlFrm_FormFavSha (const struct Tml_Form *Form);
|
||||||
|
|
||||||
void TmlFrm_FormToShowHiddenComms (long NotCod,
|
void TmlFrm_FormToShowHiddenComms (long NotCod,
|
||||||
|
|
|
@ -96,7 +96,8 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
|
||||||
static void TmlNot_WriteButtonsAndComms (const struct Tml_Timeline *Timeline,
|
static void TmlNot_WriteButtonsAndComms (const struct Tml_Timeline *Timeline,
|
||||||
const struct TmlNot_Note *Not,
|
const struct TmlNot_Note *Not,
|
||||||
const struct UsrData *UsrDat);
|
const struct UsrData *UsrDat);
|
||||||
static void TmlNot_WriteButtonToAddAComm (const struct TmlNot_Note *Not,
|
static void TmlNot_WriteButtonToAddAComm (const struct Tml_Timeline *Timeline,
|
||||||
|
const struct TmlNot_Note *Not,
|
||||||
const char IdNewComm[Frm_MAX_BYTES_ID + 1]);
|
const char IdNewComm[Frm_MAX_BYTES_ID + 1]);
|
||||||
static void TmlNot_WriteFavShaRemAndComms (const struct Tml_Timeline *Timeline,
|
static void TmlNot_WriteFavShaRemAndComms (const struct Tml_Timeline *Timeline,
|
||||||
const struct TmlNot_Note *Not,
|
const struct TmlNot_Note *Not,
|
||||||
|
@ -758,7 +759,7 @@ static void TmlNot_WriteButtonsAndComms (const struct Tml_Timeline *Timeline,
|
||||||
Frm_SetUniqueId (IdNewComm);
|
Frm_SetUniqueId (IdNewComm);
|
||||||
|
|
||||||
/***** Left: button to add a comment *****/
|
/***** Left: button to add a comment *****/
|
||||||
TmlNot_WriteButtonToAddAComm (Not,IdNewComm);
|
TmlNot_WriteButtonToAddAComm (Timeline,Not,IdNewComm);
|
||||||
|
|
||||||
/***** Right: write favs, shared and remove buttons, and comments *****/
|
/***** Right: write favs, shared and remove buttons, and comments *****/
|
||||||
TmlNot_WriteFavShaRemAndComms (Timeline,Not,UsrDat);
|
TmlNot_WriteFavShaRemAndComms (Timeline,Not,UsrDat);
|
||||||
|
@ -771,7 +772,8 @@ static void TmlNot_WriteButtonsAndComms (const struct Tml_Timeline *Timeline,
|
||||||
/********************** Write button to add a comment ************************/
|
/********************** Write button to add a comment ************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void TmlNot_WriteButtonToAddAComm (const struct TmlNot_Note *Not,
|
static void TmlNot_WriteButtonToAddAComm (const struct Tml_Timeline *Timeline,
|
||||||
|
const struct TmlNot_Note *Not,
|
||||||
const char IdNewComm[Frm_MAX_BYTES_ID + 1])
|
const char IdNewComm[Frm_MAX_BYTES_ID + 1])
|
||||||
{
|
{
|
||||||
/***** Begin container *****/
|
/***** Begin container *****/
|
||||||
|
@ -781,7 +783,7 @@ static void TmlNot_WriteButtonToAddAComm (const struct TmlNot_Note *Not,
|
||||||
if (Not->Unavailable) // Unavailable notes can not be commented
|
if (Not->Unavailable) // Unavailable notes can not be commented
|
||||||
TmlCom_PutIconCommDisabled ();
|
TmlCom_PutIconCommDisabled ();
|
||||||
else
|
else
|
||||||
TmlCom_PutIconToToggleComm (IdNewComm);
|
TmlCom_PutIconToToggleComm (Timeline,IdNewComm);
|
||||||
|
|
||||||
/***** End container *****/
|
/***** End container *****/
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
|
@ -828,8 +830,8 @@ static void TmlNot_WriteFavShaRem (const struct Tml_Timeline *Timeline,
|
||||||
" class=\"Tml_FAV_NOT Tml_FAV_NOT_WIDTH\"",
|
" class=\"Tml_FAV_NOT Tml_FAV_NOT_WIDTH\"",
|
||||||
Gbl.UniqueNameEncrypted,NumDiv);
|
Gbl.UniqueNameEncrypted,NumDiv);
|
||||||
TmlUsr_PutIconFavSha (TmlUsr_FAV_UNF_NOTE,
|
TmlUsr_PutIconFavSha (TmlUsr_FAV_UNF_NOTE,
|
||||||
Not->NotCod,Not->UsrCod,Not->NumFavs,
|
Not->NotCod,Not->UsrCod,Not->NumFavs,
|
||||||
TmlUsr_SHOW_FEW_USRS);
|
TmlUsr_SHOW_FEW_USRS);
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
|
|
||||||
/***** Foot column 2: share zone *****/
|
/***** Foot column 2: share zone *****/
|
||||||
|
@ -837,8 +839,8 @@ static void TmlNot_WriteFavShaRem (const struct Tml_Timeline *Timeline,
|
||||||
" class=\"Tml_SHA_NOT Tml_SHA_NOT_WIDTH\"",
|
" class=\"Tml_SHA_NOT Tml_SHA_NOT_WIDTH\"",
|
||||||
Gbl.UniqueNameEncrypted,NumDiv);
|
Gbl.UniqueNameEncrypted,NumDiv);
|
||||||
TmlUsr_PutIconFavSha (TmlUsr_SHA_UNS_NOTE,
|
TmlUsr_PutIconFavSha (TmlUsr_SHA_UNS_NOTE,
|
||||||
Not->NotCod,Not->UsrCod,Not->NumShared,
|
Not->NotCod,Not->UsrCod,Not->NumShared,
|
||||||
TmlUsr_SHOW_FEW_USRS);
|
TmlUsr_SHOW_FEW_USRS);
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
|
|
||||||
/***** Foot column 3: icon to remove this note *****/
|
/***** Foot column 3: icon to remove this note *****/
|
||||||
|
|
|
@ -70,8 +70,8 @@ void TmlSha_ShowAllSharersNoteGbl (void)
|
||||||
|
|
||||||
/***** Write HTML inside DIV with form to share/unshare *****/
|
/***** Write HTML inside DIV with form to share/unshare *****/
|
||||||
TmlUsr_PutIconFavSha (TmlUsr_SHA_UNS_NOTE,
|
TmlUsr_PutIconFavSha (TmlUsr_SHA_UNS_NOTE,
|
||||||
Not.NotCod,Not.UsrCod,Not.NumShared,
|
Not.NotCod,Not.UsrCod,Not.NumShared,
|
||||||
TmlUsr_SHOW_ALL_USRS);
|
TmlUsr_SHOW_ALL_USRS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -96,8 +96,8 @@ void TmlSha_ShaNoteGbl (void)
|
||||||
|
|
||||||
/***** Write HTML inside DIV with form to unshare *****/
|
/***** Write HTML inside DIV with form to unshare *****/
|
||||||
TmlUsr_PutIconFavSha (TmlUsr_SHA_UNS_NOTE,
|
TmlUsr_PutIconFavSha (TmlUsr_SHA_UNS_NOTE,
|
||||||
Not.NotCod,Not.UsrCod,Not.NumShared,
|
Not.NotCod,Not.UsrCod,Not.NumShared,
|
||||||
TmlUsr_SHOW_FEW_USRS);
|
TmlUsr_SHOW_FEW_USRS);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void TmlSha_ShaNote (struct TmlNot_Note *Not)
|
static void TmlSha_ShaNote (struct TmlNot_Note *Not)
|
||||||
|
@ -155,8 +155,8 @@ void TmlSha_UnsNoteGbl (void)
|
||||||
|
|
||||||
/***** Write HTML inside DIV with form to share *****/
|
/***** Write HTML inside DIV with form to share *****/
|
||||||
TmlUsr_PutIconFavSha (TmlUsr_SHA_UNS_NOTE,
|
TmlUsr_PutIconFavSha (TmlUsr_SHA_UNS_NOTE,
|
||||||
Not.NotCod,Not.UsrCod,Not.NumShared,
|
Not.NotCod,Not.UsrCod,Not.NumShared,
|
||||||
TmlUsr_SHOW_FEW_USRS);
|
TmlUsr_SHOW_FEW_USRS);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void TmlSha_UnsNote (struct TmlNot_Note *Not)
|
static void TmlSha_UnsNote (struct TmlNot_Note *Not)
|
||||||
|
|
|
@ -117,8 +117,8 @@ void TmlUsr_RemoveUsrContent (long UsrCod)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void TmlUsr_GetAndShowSharersOrFavers (TmlUsr_FavSha_t FavSha,
|
static void TmlUsr_GetAndShowSharersOrFavers (TmlUsr_FavSha_t FavSha,
|
||||||
long Cod,long UsrCod,unsigned NumUsrs,
|
long Cod,long UsrCod,unsigned NumUsrs,
|
||||||
TmlUsr_HowManyUsrs_t HowManyUsrs)
|
TmlUsr_HowManyUsrs_t HowManyUsrs)
|
||||||
{
|
{
|
||||||
static const TmlFrm_Action_t Action[TmlUsr_NUM_FAV_SHA] =
|
static const TmlFrm_Action_t Action[TmlUsr_NUM_FAV_SHA] =
|
||||||
{
|
{
|
||||||
|
@ -132,6 +132,14 @@ static void TmlUsr_GetAndShowSharersOrFavers (TmlUsr_FavSha_t FavSha,
|
||||||
[TmlUsr_FAV_UNF_COMM] = "PubCod=%ld",
|
[TmlUsr_FAV_UNF_COMM] = "PubCod=%ld",
|
||||||
[TmlUsr_SHA_UNS_NOTE] = "NotCod=%ld",
|
[TmlUsr_SHA_UNS_NOTE] = "NotCod=%ld",
|
||||||
};
|
};
|
||||||
|
struct Tml_Form Form =
|
||||||
|
{
|
||||||
|
.Action = Action[FavSha],
|
||||||
|
.ParamFormat = ParamFormat[FavSha],
|
||||||
|
.ParamCod = Cod,
|
||||||
|
.Icon = "ellipsis-h.svg",
|
||||||
|
.Color = Ico_BLACK,
|
||||||
|
};
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
unsigned NumFirstUsrs;
|
unsigned NumFirstUsrs;
|
||||||
|
|
||||||
|
@ -140,7 +148,7 @@ static void TmlUsr_GetAndShowSharersOrFavers (TmlUsr_FavSha_t FavSha,
|
||||||
NumFirstUsrs =
|
NumFirstUsrs =
|
||||||
TmlUsr_GetListFaversOrSharers (FavSha,Cod,UsrCod,
|
TmlUsr_GetListFaversOrSharers (FavSha,Cod,UsrCod,
|
||||||
HowManyUsrs == TmlUsr_SHOW_FEW_USRS ? TmlUsr_DEF_USRS_SHOWN :
|
HowManyUsrs == TmlUsr_SHOW_FEW_USRS ? TmlUsr_DEF_USRS_SHOWN :
|
||||||
TmlUsr_MAX_USRS_SHOWN,
|
TmlUsr_MAX_USRS_SHOWN,
|
||||||
&mysql_res);
|
&mysql_res);
|
||||||
else
|
else
|
||||||
NumFirstUsrs = 0;
|
NumFirstUsrs = 0;
|
||||||
|
@ -156,9 +164,7 @@ static void TmlUsr_GetAndShowSharersOrFavers (TmlUsr_FavSha_t FavSha,
|
||||||
TmlUsr_ListSharersOrFavers (&mysql_res,NumUsrs,NumFirstUsrs);
|
TmlUsr_ListSharersOrFavers (&mysql_res,NumUsrs,NumFirstUsrs);
|
||||||
if (NumFirstUsrs < NumUsrs) // Not all are shown
|
if (NumFirstUsrs < NumUsrs) // Not all are shown
|
||||||
/* Clickable ellipsis to show all users */
|
/* Clickable ellipsis to show all users */
|
||||||
TmlFrm_PutFormToSeeAllFaversSharers (Action[FavSha],
|
TmlFrm_FormFavSha (&Form);
|
||||||
ParamFormat[FavSha],Cod,
|
|
||||||
HowManyUsrs);
|
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
|
|
||||||
/***** Free structure that stores the query result *****/
|
/***** Free structure that stores the query result *****/
|
||||||
|
|
Loading…
Reference in New Issue