mirror of https://github.com/acanas/swad-core.git
Version 20.39.8: Mar 02, 2021 Code refactoring in timeline.
This commit is contained in:
parent
3612c0ef86
commit
58e615fc69
|
@ -203,7 +203,7 @@ static void Agd_ShowMyAgenda (struct Agd_Agenda *Agenda)
|
||||||
Hlp_PROFILE_Agenda,Box_NOT_CLOSABLE);
|
Hlp_PROFILE_Agenda,Box_NOT_CLOSABLE);
|
||||||
|
|
||||||
/***** Put forms to choice which events to show *****/
|
/***** Put forms to choice which events to show *****/
|
||||||
Set_StartSettingsHead ();
|
Set_BeginSettingsHead ();
|
||||||
Agd_ShowFormToSelPast__FutureEvents (Agenda);
|
Agd_ShowFormToSelPast__FutureEvents (Agenda);
|
||||||
Agd_ShowFormToSelPrivatPublicEvents (Agenda);
|
Agd_ShowFormToSelPrivatPublicEvents (Agenda);
|
||||||
Agd_ShowFormToSelHiddenVisiblEvents (Agenda);
|
Agd_ShowFormToSelHiddenVisiblEvents (Agenda);
|
||||||
|
@ -233,7 +233,7 @@ static void Agd_ShowFormToSelPast__FutureEvents (const struct Agd_Agenda *Agenda
|
||||||
[Agd_FUTURE_EVENTS] = "calendar-plus.svg",
|
[Agd_FUTURE_EVENTS] = "calendar-plus.svg",
|
||||||
};
|
};
|
||||||
|
|
||||||
Set_StartOneSettingSelector ();
|
Set_BeginOneSettingSelector ();
|
||||||
for (PstFut = Agd_PAST___EVENTS;
|
for (PstFut = Agd_PAST___EVENTS;
|
||||||
PstFut <= Agd_FUTURE_EVENTS;
|
PstFut <= Agd_FUTURE_EVENTS;
|
||||||
PstFut++)
|
PstFut++)
|
||||||
|
@ -270,7 +270,7 @@ static void Agd_ShowFormToSelPrivatPublicEvents (const struct Agd_Agenda *Agenda
|
||||||
[Agd_PUBLIC_EVENTS] = "unlock.svg",
|
[Agd_PUBLIC_EVENTS] = "unlock.svg",
|
||||||
};
|
};
|
||||||
|
|
||||||
Set_StartOneSettingSelector ();
|
Set_BeginOneSettingSelector ();
|
||||||
for (PrvPub = Agd_PRIVAT_EVENTS;
|
for (PrvPub = Agd_PRIVAT_EVENTS;
|
||||||
PrvPub <= Agd_PUBLIC_EVENTS;
|
PrvPub <= Agd_PUBLIC_EVENTS;
|
||||||
PrvPub++)
|
PrvPub++)
|
||||||
|
@ -307,7 +307,7 @@ static void Agd_ShowFormToSelHiddenVisiblEvents (const struct Agd_Agenda *Agenda
|
||||||
[Agd_VISIBL_EVENTS] = "eye-green.svg",
|
[Agd_VISIBL_EVENTS] = "eye-green.svg",
|
||||||
};
|
};
|
||||||
|
|
||||||
Set_StartOneSettingSelector ();
|
Set_BeginOneSettingSelector ();
|
||||||
for (HidVis = Agd_HIDDEN_EVENTS;
|
for (HidVis = Agd_HIDDEN_EVENTS;
|
||||||
HidVis <= Agd_VISIBL_EVENTS;
|
HidVis <= Agd_VISIBL_EVENTS;
|
||||||
HidVis++)
|
HidVis++)
|
||||||
|
|
|
@ -167,7 +167,7 @@ static void Asg_ShowAllAssignments (struct Asg_Assignments *Assignments)
|
||||||
/***** Select whether show only my groups or all groups *****/
|
/***** Select whether show only my groups or all groups *****/
|
||||||
if (Gbl.Crs.Grps.NumGrps)
|
if (Gbl.Crs.Grps.NumGrps)
|
||||||
{
|
{
|
||||||
Set_StartSettingsHead ();
|
Set_BeginSettingsHead ();
|
||||||
Grp_ShowFormToSelWhichGrps (ActSeeAsg,
|
Grp_ShowFormToSelWhichGrps (ActSeeAsg,
|
||||||
Asg_ParamsWhichGroupsToShow,Assignments);
|
Asg_ParamsWhichGroupsToShow,Assignments);
|
||||||
Set_EndSettingsHead ();
|
Set_EndSettingsHead ();
|
||||||
|
|
|
@ -249,7 +249,7 @@ static void Att_ShowAllAttEvents (struct Att_Events *Events)
|
||||||
/***** Select whether show only my groups or all groups *****/
|
/***** Select whether show only my groups or all groups *****/
|
||||||
if (Gbl.Crs.Grps.NumGrps)
|
if (Gbl.Crs.Grps.NumGrps)
|
||||||
{
|
{
|
||||||
Set_StartSettingsHead ();
|
Set_BeginSettingsHead ();
|
||||||
Grp_ShowFormToSelWhichGrps (ActSeeAtt,
|
Grp_ShowFormToSelWhichGrps (ActSeeAtt,
|
||||||
Att_ParamsWhichGroupsToShow,&Events);
|
Att_ParamsWhichGroupsToShow,&Events);
|
||||||
Set_EndSettingsHead ();
|
Set_EndSettingsHead ();
|
||||||
|
|
|
@ -86,7 +86,7 @@ void Cal_PutIconsToSelectFirstDayOfWeek (void)
|
||||||
Box_BoxBegin (NULL,Txt_Calendar,
|
Box_BoxBegin (NULL,Txt_Calendar,
|
||||||
Cal_PutIconsFirstDayOfWeek,NULL,
|
Cal_PutIconsFirstDayOfWeek,NULL,
|
||||||
Hlp_PROFILE_Settings_calendar,Box_NOT_CLOSABLE);
|
Hlp_PROFILE_Settings_calendar,Box_NOT_CLOSABLE);
|
||||||
Set_StartSettingsHead ();
|
Set_BeginSettingsHead ();
|
||||||
Cal_ShowFormToSelFirstDayOfWeek (ActChg1stDay,
|
Cal_ShowFormToSelFirstDayOfWeek (ActChg1stDay,
|
||||||
NULL,NULL);
|
NULL,NULL);
|
||||||
Set_EndSettingsHead ();
|
Set_EndSettingsHead ();
|
||||||
|
@ -115,7 +115,7 @@ void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,
|
||||||
unsigned FirstDayOfWeek;
|
unsigned FirstDayOfWeek;
|
||||||
char Icon[32 + 1];
|
char Icon[32 + 1];
|
||||||
|
|
||||||
Set_StartOneSettingSelector ();
|
Set_BeginOneSettingSelector ();
|
||||||
for (FirstDayOfWeek = 0; // Monday
|
for (FirstDayOfWeek = 0; // Monday
|
||||||
FirstDayOfWeek <= 6; // Sunday
|
FirstDayOfWeek <= 6; // Sunday
|
||||||
FirstDayOfWeek++)
|
FirstDayOfWeek++)
|
||||||
|
@ -264,7 +264,7 @@ static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar,
|
||||||
/***** Preference selector to change first day of week *****/
|
/***** Preference selector to change first day of week *****/
|
||||||
if (!PrintView)
|
if (!PrintView)
|
||||||
{
|
{
|
||||||
Set_StartSettingsHead ();
|
Set_BeginSettingsHead ();
|
||||||
Cal_ShowFormToSelFirstDayOfWeek (ActionChangeCalendar1stDay,
|
Cal_ShowFormToSelFirstDayOfWeek (ActionChangeCalendar1stDay,
|
||||||
NULL,NULL);
|
NULL,NULL);
|
||||||
Set_EndSettingsHead ();
|
Set_EndSettingsHead ();
|
||||||
|
|
|
@ -598,10 +598,11 @@ TODO: DNI de un estudiante sale err
|
||||||
TODO: BUG: Cuando un tipo de grupo sólo tiene un grupo, inscribirse es voluntario, el estudiante sólo puede pertenecer a un grupo, y se inscribe en él, debería poder desapuntarse. Ahora no puede.
|
TODO: BUG: Cuando un tipo de grupo sólo tiene un grupo, inscribirse es voluntario, el estudiante sólo puede pertenecer a un grupo, y se inscribe en él, debería poder desapuntarse. Ahora no puede.
|
||||||
TODO: Salvador Romero Cortés: @acanas opción para editar posts
|
TODO: Salvador Romero Cortés: @acanas opción para editar posts
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 20.39.7 (2021-03-02)"
|
#define Log_PLATFORM_VERSION "SWAD 20.39.8 (2021-03-02)"
|
||||||
#define CSS_FILE "swad20.33.9.css"
|
#define CSS_FILE "swad20.33.9.css"
|
||||||
#define JS_FILE "swad20.6.2.js"
|
#define JS_FILE "swad20.6.2.js"
|
||||||
/*
|
/*
|
||||||
|
Version 20.39.8: Mar 02, 2021 Code refactoring in timeline. (305573 lines)
|
||||||
Version 20.39.7: Mar 02, 2021 Code refactoring in fav/share timeline comments. (305566 lines)
|
Version 20.39.7: Mar 02, 2021 Code refactoring in fav/share timeline comments. (305566 lines)
|
||||||
Version 20.39.6: Mar 02, 2021 Code refactoring in fav/share timeline notes. (305570 lines)
|
Version 20.39.6: Mar 02, 2021 Code refactoring in fav/share timeline notes. (305570 lines)
|
||||||
Version 20.39.5: Mar 02, 2021 Code refactoring in timeline notes and posts. (305620 lines)
|
Version 20.39.5: Mar 02, 2021 Code refactoring in timeline notes and posts. (305620 lines)
|
||||||
|
|
|
@ -232,7 +232,7 @@ void ExaSes_ListSessions (struct Exa_Exams *Exams,
|
||||||
case Rol_SYS_ADM:
|
case Rol_SYS_ADM:
|
||||||
if (Gbl.Crs.Grps.NumGrps)
|
if (Gbl.Crs.Grps.NumGrps)
|
||||||
{
|
{
|
||||||
Set_StartSettingsHead ();
|
Set_BeginSettingsHead ();
|
||||||
Grp_ShowFormToSelWhichGrps (ActSeeExa,
|
Grp_ShowFormToSelWhichGrps (ActSeeExa,
|
||||||
Exa_PutParams,Exams);
|
Exa_PutParams,Exams);
|
||||||
Set_EndSettingsHead ();
|
Set_EndSettingsHead ();
|
||||||
|
|
|
@ -4993,7 +4993,7 @@ void Grp_ShowFormToSelWhichGrps (Act_Action_t Action,
|
||||||
Grp_WhichGroups_t WhichGrps;
|
Grp_WhichGroups_t WhichGrps;
|
||||||
|
|
||||||
/***** Start setting selector *****/
|
/***** Start setting selector *****/
|
||||||
Set_StartOneSettingSelector ();
|
Set_BeginOneSettingSelector ();
|
||||||
|
|
||||||
/***** Put icons to select which groups *****/
|
/***** Put icons to select which groups *****/
|
||||||
for (WhichGrps = Grp_MY_GROUPS;
|
for (WhichGrps = Grp_MY_GROUPS;
|
||||||
|
|
|
@ -118,8 +118,8 @@ void Ico_PutIconsToSelectIconSet (void)
|
||||||
Box_BoxBegin (NULL,Txt_Icons,
|
Box_BoxBegin (NULL,Txt_Icons,
|
||||||
Ico_PutIconsIconSet,NULL,
|
Ico_PutIconsIconSet,NULL,
|
||||||
Hlp_PROFILE_Settings_icons,Box_NOT_CLOSABLE);
|
Hlp_PROFILE_Settings_icons,Box_NOT_CLOSABLE);
|
||||||
Set_StartSettingsHead ();
|
Set_BeginSettingsHead ();
|
||||||
Set_StartOneSettingSelector ();
|
Set_BeginOneSettingSelector ();
|
||||||
for (IconSet = (Ico_IconSet_t) 0;
|
for (IconSet = (Ico_IconSet_t) 0;
|
||||||
IconSet <= (Ico_IconSet_t) (Ico_NUM_ICON_SETS - 1);
|
IconSet <= (Ico_IconSet_t) (Ico_NUM_ICON_SETS - 1);
|
||||||
IconSet++)
|
IconSet++)
|
||||||
|
|
|
@ -358,7 +358,7 @@ void Mch_ListMatches (struct Gam_Games *Games,
|
||||||
case Rol_SYS_ADM:
|
case Rol_SYS_ADM:
|
||||||
if (Gbl.Crs.Grps.NumGrps)
|
if (Gbl.Crs.Grps.NumGrps)
|
||||||
{
|
{
|
||||||
Set_StartSettingsHead ();
|
Set_BeginSettingsHead ();
|
||||||
Grp_ShowFormToSelWhichGrps (ActSeeGam,
|
Grp_ShowFormToSelWhichGrps (ActSeeGam,
|
||||||
Gam_PutParams,Games);
|
Gam_PutParams,Games);
|
||||||
Set_EndSettingsHead ();
|
Set_EndSettingsHead ();
|
||||||
|
@ -2556,7 +2556,7 @@ static void Mch_ShowLeftColumnTch (struct Mch_Match *Match)
|
||||||
Mch_PutMatchControlButtons (Match);
|
Mch_PutMatchControlButtons (Match);
|
||||||
|
|
||||||
/***** Put forms to choice which projects to show *****/
|
/***** Put forms to choice which projects to show *****/
|
||||||
Set_StartSettingsHead ();
|
Set_BeginSettingsHead ();
|
||||||
Mch_ShowFormColumns (Match);
|
Mch_ShowFormColumns (Match);
|
||||||
Set_EndSettingsHead ();
|
Set_EndSettingsHead ();
|
||||||
|
|
||||||
|
@ -3031,7 +3031,7 @@ static void Mch_ShowFormColumns (const struct Mch_Match *Match)
|
||||||
};
|
};
|
||||||
|
|
||||||
/***** Begin selector *****/
|
/***** Begin selector *****/
|
||||||
Set_StartOneSettingSelector ();
|
Set_BeginOneSettingSelector ();
|
||||||
|
|
||||||
for (NumCols = 1;
|
for (NumCols = 1;
|
||||||
NumCols <= Mch_MAX_COLS;
|
NumCols <= Mch_MAX_COLS;
|
||||||
|
|
|
@ -280,8 +280,8 @@ void Mnu_PutIconsToSelectMenu (void)
|
||||||
Box_BoxBegin (NULL,Txt_Menu,
|
Box_BoxBegin (NULL,Txt_Menu,
|
||||||
Mnu_PutIconsMenu,NULL,
|
Mnu_PutIconsMenu,NULL,
|
||||||
Hlp_PROFILE_Settings_menu,Box_NOT_CLOSABLE);
|
Hlp_PROFILE_Settings_menu,Box_NOT_CLOSABLE);
|
||||||
Set_StartSettingsHead ();
|
Set_BeginSettingsHead ();
|
||||||
Set_StartOneSettingSelector ();
|
Set_BeginOneSettingSelector ();
|
||||||
for (Menu = (Mnu_Menu_t) 0;
|
for (Menu = (Mnu_Menu_t) 0;
|
||||||
Menu <= (Mnu_Menu_t) (Mnu_NUM_MENUS - 1);
|
Menu <= (Mnu_Menu_t) (Mnu_NUM_MENUS - 1);
|
||||||
Menu++)
|
Menu++)
|
||||||
|
|
|
@ -482,7 +482,7 @@ static void Prj_ShowPrjsInCurrentPage (void *Projects)
|
||||||
|
|
||||||
/***** Put forms to choice which projects to show *****/
|
/***** Put forms to choice which projects to show *****/
|
||||||
/* 1st. row */
|
/* 1st. row */
|
||||||
Set_StartSettingsHead ();
|
Set_BeginSettingsHead ();
|
||||||
Prj_ShowFormToFilterByMy_All ((struct Prj_Projects *) Projects);
|
Prj_ShowFormToFilterByMy_All ((struct Prj_Projects *) Projects);
|
||||||
Prj_ShowFormToFilterByAssign ((struct Prj_Projects *) Projects);
|
Prj_ShowFormToFilterByAssign ((struct Prj_Projects *) Projects);
|
||||||
switch (Gbl.Usrs.Me.Role.Logged)
|
switch (Gbl.Usrs.Me.Role.Logged)
|
||||||
|
@ -579,7 +579,7 @@ static void Prj_ShowFormToFilterByMy_All (const struct Prj_Projects *Projects)
|
||||||
1 << Usr_WHO_SELECTED |
|
1 << Usr_WHO_SELECTED |
|
||||||
1 << Usr_WHO_ALL;
|
1 << Usr_WHO_ALL;
|
||||||
|
|
||||||
Set_StartOneSettingSelector ();
|
Set_BeginOneSettingSelector ();
|
||||||
for (Who = (Usr_Who_t) 1;
|
for (Who = (Usr_Who_t) 1;
|
||||||
Who <= (Usr_Who_t) (Usr_NUM_WHO - 1);
|
Who <= (Usr_Who_t) (Usr_NUM_WHO - 1);
|
||||||
Who++)
|
Who++)
|
||||||
|
@ -616,7 +616,7 @@ static void Prj_ShowFormToFilterByAssign (const struct Prj_Projects *Projects)
|
||||||
struct Prj_Filter Filter;
|
struct Prj_Filter Filter;
|
||||||
Prj_AssignedNonassig_t Assign;
|
Prj_AssignedNonassig_t Assign;
|
||||||
|
|
||||||
Set_StartOneSettingSelector ();
|
Set_BeginOneSettingSelector ();
|
||||||
for (Assign = (Prj_AssignedNonassig_t) 0;
|
for (Assign = (Prj_AssignedNonassig_t) 0;
|
||||||
Assign <= (Prj_AssignedNonassig_t) (Prj_NUM_ASSIGNED_NONASSIG - 1);
|
Assign <= (Prj_AssignedNonassig_t) (Prj_NUM_ASSIGNED_NONASSIG - 1);
|
||||||
Assign++)
|
Assign++)
|
||||||
|
@ -657,7 +657,7 @@ static void Prj_ShowFormToFilterByHidden (const struct Prj_Projects *Projects)
|
||||||
[Prj_VISIBL] = "eye-green.svg",
|
[Prj_VISIBL] = "eye-green.svg",
|
||||||
};
|
};
|
||||||
|
|
||||||
Set_StartOneSettingSelector ();
|
Set_BeginOneSettingSelector ();
|
||||||
for (HidVis = (Prj_HiddenVisibl_t) 0;
|
for (HidVis = (Prj_HiddenVisibl_t) 0;
|
||||||
HidVis <= (Prj_HiddenVisibl_t) (Prj_NUM_HIDDEN_VISIBL - 1);
|
HidVis <= (Prj_HiddenVisibl_t) (Prj_NUM_HIDDEN_VISIBL - 1);
|
||||||
HidVis++)
|
HidVis++)
|
||||||
|
@ -698,7 +698,7 @@ static void Prj_ShowFormToFilterByWarning (const struct Prj_Projects *Projects)
|
||||||
[Prj_FAULTLESS] = "check-circle.svg",
|
[Prj_FAULTLESS] = "check-circle.svg",
|
||||||
};
|
};
|
||||||
|
|
||||||
Set_StartOneSettingSelector ();
|
Set_BeginOneSettingSelector ();
|
||||||
for (Faultiness = (Prj_Faultiness_t) 0;
|
for (Faultiness = (Prj_Faultiness_t) 0;
|
||||||
Faultiness <= (Prj_Faultiness_t) (Prj_NUM_FAULTINESS - 1);
|
Faultiness <= (Prj_Faultiness_t) (Prj_NUM_FAULTINESS - 1);
|
||||||
Faultiness++)
|
Faultiness++)
|
||||||
|
|
|
@ -252,8 +252,8 @@ static void Set_PutIconsToSelectSideCols (void)
|
||||||
Box_BoxBegin (NULL,Txt_Columns,
|
Box_BoxBegin (NULL,Txt_Columns,
|
||||||
Set_PutIconsSideColumns,NULL,
|
Set_PutIconsSideColumns,NULL,
|
||||||
Hlp_PROFILE_Settings_columns,Box_NOT_CLOSABLE);
|
Hlp_PROFILE_Settings_columns,Box_NOT_CLOSABLE);
|
||||||
Set_StartSettingsHead ();
|
Set_BeginSettingsHead ();
|
||||||
Set_StartOneSettingSelector ();
|
Set_BeginOneSettingSelector ();
|
||||||
for (SideCols = 0;
|
for (SideCols = 0;
|
||||||
SideCols <= Lay_SHOW_BOTH_COLUMNS;
|
SideCols <= Lay_SHOW_BOTH_COLUMNS;
|
||||||
SideCols++)
|
SideCols++)
|
||||||
|
@ -337,7 +337,7 @@ unsigned Set_GetParamSideCols (void)
|
||||||
| +-----------------+ +-----------------+ |
|
| +-----------------+ +-----------------+ |
|
||||||
+--------------------------------------------+
|
+--------------------------------------------+
|
||||||
*/
|
*/
|
||||||
void Set_StartSettingsHead (void)
|
void Set_BeginSettingsHead (void)
|
||||||
{
|
{
|
||||||
HTM_DIV_Begin ("class=\"PREF_CONTS\"");
|
HTM_DIV_Begin ("class=\"PREF_CONTS\"");
|
||||||
}
|
}
|
||||||
|
@ -347,7 +347,7 @@ void Set_EndSettingsHead (void)
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Set_StartOneSettingSelector (void)
|
void Set_BeginOneSettingSelector (void)
|
||||||
{
|
{
|
||||||
HTM_DIV_Begin ("class=\"PREF_CONT\"");
|
HTM_DIV_Begin ("class=\"PREF_CONT\"");
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,9 +48,9 @@ void Set_RemoveOldSettingsFromIP (void);
|
||||||
void Set_ChangeSideCols (void);
|
void Set_ChangeSideCols (void);
|
||||||
unsigned Set_GetParamSideCols (void);
|
unsigned Set_GetParamSideCols (void);
|
||||||
|
|
||||||
void Set_StartSettingsHead (void);
|
void Set_BeginSettingsHead (void);
|
||||||
void Set_EndSettingsHead (void);
|
void Set_EndSettingsHead (void);
|
||||||
void Set_StartOneSettingSelector (void);
|
void Set_BeginOneSettingSelector (void);
|
||||||
void Set_EndOneSettingSelector (void);
|
void Set_EndOneSettingSelector (void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -249,7 +249,7 @@ static void Svy_ListAllSurveys (struct Svy_Surveys *Surveys)
|
||||||
/***** Select whether show only my groups or all groups *****/
|
/***** Select whether show only my groups or all groups *****/
|
||||||
if (Gbl.Crs.Grps.NumGrps)
|
if (Gbl.Crs.Grps.NumGrps)
|
||||||
{
|
{
|
||||||
Set_StartSettingsHead ();
|
Set_BeginSettingsHead ();
|
||||||
Grp_ShowFormToSelWhichGrps (ActSeeAllSvy,
|
Grp_ShowFormToSelWhichGrps (ActSeeAllSvy,
|
||||||
Svy_ParamsWhichGroupsToShow,Surveys);
|
Svy_ParamsWhichGroupsToShow,Surveys);
|
||||||
Set_EndSettingsHead ();
|
Set_EndSettingsHead ();
|
||||||
|
|
|
@ -321,8 +321,8 @@ void The_PutIconsToSelectTheme (void)
|
||||||
Box_BoxBegin (NULL,Txt_Theme_SKIN,
|
Box_BoxBegin (NULL,Txt_Theme_SKIN,
|
||||||
The_PutIconsTheme,NULL,
|
The_PutIconsTheme,NULL,
|
||||||
Hlp_PROFILE_Settings_theme,Box_NOT_CLOSABLE);
|
Hlp_PROFILE_Settings_theme,Box_NOT_CLOSABLE);
|
||||||
Set_StartSettingsHead ();
|
Set_BeginSettingsHead ();
|
||||||
Set_StartOneSettingSelector ();
|
Set_BeginOneSettingSelector ();
|
||||||
for (Theme = (The_Theme_t) 0;
|
for (Theme = (The_Theme_t) 0;
|
||||||
Theme <= (The_Theme_t) (The_NUM_THEMES - 1);
|
Theme <= (The_Theme_t) (The_NUM_THEMES - 1);
|
||||||
Theme++)
|
Theme++)
|
||||||
|
|
|
@ -165,8 +165,10 @@ extern struct Globals Gbl;
|
||||||
static void TL_GetAndShowOldTimeline (struct TL_Timeline *Timeline);
|
static void TL_GetAndShowOldTimeline (struct TL_Timeline *Timeline);
|
||||||
|
|
||||||
static void TL_ShowTimeline (struct TL_Timeline *Timeline,
|
static void TL_ShowTimeline (struct TL_Timeline *Timeline,
|
||||||
const char *Title,long NotCodToHighlight);
|
long NotCodToHighlight,const char *Title);
|
||||||
static void TL_PutIconsTimeline (__attribute__((unused)) void *Args);
|
static void TL_PutIconsTimeline (__attribute__((unused)) void *Args);
|
||||||
|
static unsigned TL_ListRecentPubs (struct TL_Timeline *Timeline,
|
||||||
|
long NotCodToHighlight);
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/************************ Initialize global timeline *************************/
|
/************************ Initialize global timeline *************************/
|
||||||
|
@ -262,7 +264,7 @@ void TL_ShowTimelineGblHighlightingNot (struct TL_Timeline *Timeline,
|
||||||
TL_Pub_GetListPubsToShowInTimeline (Timeline);
|
TL_Pub_GetListPubsToShowInTimeline (Timeline);
|
||||||
|
|
||||||
/***** Show timeline *****/
|
/***** Show timeline *****/
|
||||||
TL_ShowTimeline (Timeline,Txt_Timeline,NotCod);
|
TL_ShowTimeline (Timeline,NotCod,Txt_Timeline);
|
||||||
|
|
||||||
/***** Free chained list of publications *****/
|
/***** Free chained list of publications *****/
|
||||||
TL_Pub_FreeListPubs (Timeline);
|
TL_Pub_FreeListPubs (Timeline);
|
||||||
|
@ -292,10 +294,9 @@ void TL_ShowTimelineUsrHighlightingNot (struct TL_Timeline *Timeline,
|
||||||
TL_Pub_GetListPubsToShowInTimeline (Timeline);
|
TL_Pub_GetListPubsToShowInTimeline (Timeline);
|
||||||
|
|
||||||
/***** Show timeline *****/
|
/***** Show timeline *****/
|
||||||
TL_ShowTimeline (Timeline,
|
TL_ShowTimeline (Timeline,NotCod,
|
||||||
Str_BuildStringStr (Txt_Timeline_OF_A_USER,
|
Str_BuildStringStr (Txt_Timeline_OF_A_USER,
|
||||||
Gbl.Usrs.Other.UsrDat.FrstName),
|
Gbl.Usrs.Other.UsrDat.FrstName));
|
||||||
NotCod);
|
|
||||||
Str_FreeString ();
|
Str_FreeString ();
|
||||||
|
|
||||||
/***** Free chained list of publications *****/
|
/***** Free chained list of publications *****/
|
||||||
|
@ -417,13 +418,11 @@ static void TL_GetAndShowOldTimeline (struct TL_Timeline *Timeline)
|
||||||
\ |_____|
|
\ |_____|
|
||||||
*/
|
*/
|
||||||
static void TL_ShowTimeline (struct TL_Timeline *Timeline,
|
static void TL_ShowTimeline (struct TL_Timeline *Timeline,
|
||||||
const char *Title,long NotCodToHighlight)
|
long NotCodToHighlight,const char *Title)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_START_Timeline;
|
extern const char *Hlp_START_Timeline;
|
||||||
struct TL_Pub_Publication *Pub;
|
|
||||||
struct TL_Not_Note Not;
|
|
||||||
unsigned NumPubs;
|
|
||||||
bool GlobalTimeline = (Gbl.Usrs.Other.UsrDat.UsrCod <= 0);
|
bool GlobalTimeline = (Gbl.Usrs.Other.UsrDat.UsrCod <= 0);
|
||||||
|
unsigned NumNotesShown;
|
||||||
|
|
||||||
/***** Begin box *****/
|
/***** Begin box *****/
|
||||||
Box_BoxBegin (NULL,Title,
|
Box_BoxBegin (NULL,Title,
|
||||||
|
@ -435,8 +434,7 @@ static void TL_ShowTimeline (struct TL_Timeline *Timeline,
|
||||||
TL_Who_PutFormWho (Timeline);
|
TL_Who_PutFormWho (Timeline);
|
||||||
|
|
||||||
/***** Form to write a new post *****/
|
/***** Form to write a new post *****/
|
||||||
if (GlobalTimeline ||
|
if (GlobalTimeline || Usr_ItsMe (Gbl.Usrs.Other.UsrDat.UsrCod))
|
||||||
Usr_ItsMe (Gbl.Usrs.Other.UsrDat.UsrCod))
|
|
||||||
TL_Pst_PutPhotoAndFormToWriteNewPost (Timeline);
|
TL_Pst_PutPhotoAndFormToWriteNewPost (Timeline);
|
||||||
|
|
||||||
/***** New publications refreshed dynamically via AJAX *****/
|
/***** New publications refreshed dynamically via AJAX *****/
|
||||||
|
@ -457,33 +455,11 @@ static void TL_ShowTimeline (struct TL_Timeline *Timeline,
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** List recent publications in timeline *****/
|
/***** List recent publications in timeline *****/
|
||||||
/* Begin list */
|
NumNotesShown = TL_ListRecentPubs (Timeline,NotCodToHighlight);
|
||||||
HTM_UL_Begin ("id=\"timeline_list\" class=\"TL_LIST\"");
|
|
||||||
|
|
||||||
/* For each publication in list... */
|
|
||||||
for (Pub = Timeline->Pubs.Top, NumPubs = 0;
|
|
||||||
Pub;
|
|
||||||
Pub = Pub->Next, NumPubs++)
|
|
||||||
{
|
|
||||||
/* Get data of note */
|
|
||||||
Not.NotCod = Pub->NotCod;
|
|
||||||
TL_Not_GetDataOfNoteByCod (&Not);
|
|
||||||
|
|
||||||
/* Write note */
|
|
||||||
HTM_LI_Begin ("class=\"%s\"",Not.NotCod == NotCodToHighlight ? "TL_WIDTH TL_SEP TL_NEW_PUB" :
|
|
||||||
"TL_WIDTH TL_SEP");
|
|
||||||
TL_Not_CheckAndWriteNoteWithTopMsg (Timeline,&Not,
|
|
||||||
TL_Pub_GetTopMessage (Pub->PubType),
|
|
||||||
Pub->PublisherCod);
|
|
||||||
HTM_LI_End ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* End list */
|
|
||||||
HTM_UL_End ();
|
|
||||||
|
|
||||||
/***** If the number of publications shown is the maximum,
|
/***** If the number of publications shown is the maximum,
|
||||||
probably there will be more, so show link to get more *****/
|
probably there will be more, so show link to get more *****/
|
||||||
if (NumPubs == TL_Pub_MAX_REC_PUBS_TO_GET_AND_SHOW)
|
if (NumNotesShown == TL_Pub_MAX_REC_PUBS_TO_GET_AND_SHOW)
|
||||||
{
|
{
|
||||||
/* Link to view old publications via AJAX */
|
/* Link to view old publications via AJAX */
|
||||||
TL_Pub_PutLinkToViewOldPubs ();
|
TL_Pub_PutLinkToViewOldPubs ();
|
||||||
|
@ -507,6 +483,45 @@ static void TL_PutIconsTimeline (__attribute__((unused)) void *Args)
|
||||||
Fig_PutIconToShowFigure (Fig_TIMELINE);
|
Fig_PutIconToShowFigure (Fig_TIMELINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/******************* List recent publications in timeline ********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
// Returns number of notes shown
|
||||||
|
|
||||||
|
static unsigned TL_ListRecentPubs (struct TL_Timeline *Timeline,
|
||||||
|
long NotCodToHighlight)
|
||||||
|
{
|
||||||
|
unsigned NumNotesShown;
|
||||||
|
struct TL_Pub_Publication *Pub;
|
||||||
|
struct TL_Not_Note Not;
|
||||||
|
|
||||||
|
/***** Begin list *****/
|
||||||
|
HTM_UL_Begin ("id=\"timeline_list\" class=\"TL_LIST\"");
|
||||||
|
|
||||||
|
/***** For each publication in list... *****/
|
||||||
|
for (Pub = Timeline->Pubs.Top, NumNotesShown = 0;
|
||||||
|
Pub;
|
||||||
|
Pub = Pub->Next, NumNotesShown++)
|
||||||
|
{
|
||||||
|
/* Get data of note */
|
||||||
|
Not.NotCod = Pub->NotCod;
|
||||||
|
TL_Not_GetDataOfNoteByCod (&Not);
|
||||||
|
|
||||||
|
/* Write list item (note) */
|
||||||
|
HTM_LI_Begin ("class=\"%s\"",Not.NotCod == NotCodToHighlight ? "TL_WIDTH TL_SEP TL_NEW_PUB" :
|
||||||
|
"TL_WIDTH TL_SEP");
|
||||||
|
TL_Not_CheckAndWriteNoteWithTopMsg (Timeline,&Not,
|
||||||
|
TL_Pub_GetTopMessage (Pub->PubType),
|
||||||
|
Pub->PublisherCod);
|
||||||
|
HTM_LI_End ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/***** End list *****/
|
||||||
|
HTM_UL_End ();
|
||||||
|
|
||||||
|
return NumNotesShown;
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************* Write the date of creation of a note ********************/
|
/******************* Write the date of creation of a note ********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -123,47 +123,42 @@ void TL_Usr_ShowSharersOrFavers (MYSQL_RES **mysql_res,
|
||||||
{
|
{
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
unsigned NumUsr;
|
unsigned NumUsr;
|
||||||
unsigned NumUsrsShown = 0;
|
|
||||||
struct UsrData UsrDat;
|
struct UsrData UsrDat;
|
||||||
|
|
||||||
if (NumUsrs)
|
/***** Trivial check 1: are there favers or sharers? *****/
|
||||||
|
if (!NumUsrs)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/***** Trivial check 1: number of favers or sharers to show *****/
|
||||||
|
if (!NumFirstUsrs)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/***** Initialize structure with user's data *****/
|
||||||
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
|
||||||
|
/***** List users *****/
|
||||||
|
for (NumUsr = 0;
|
||||||
|
NumUsr < NumFirstUsrs;
|
||||||
|
NumUsr++)
|
||||||
{
|
{
|
||||||
/***** A list of users has been got from database *****/
|
/***** Get user's code *****/
|
||||||
if (NumFirstUsrs)
|
row = mysql_fetch_row (*mysql_res);
|
||||||
|
UsrDat.UsrCod = Str_ConvertStrCodToLongCod (row[0]);
|
||||||
|
|
||||||
|
/***** Get user's data and show user's photo *****/
|
||||||
|
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,Usr_DONT_GET_PREFS))
|
||||||
{
|
{
|
||||||
/***** Initialize structure with user's data *****/
|
/* Begin container */
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
HTM_DIV_Begin ("class=\"TL_SHARER\"");
|
||||||
|
|
||||||
/***** List users *****/
|
/* User's photo */
|
||||||
for (NumUsr = 0;
|
Pho_ShowUsrPhotoIfAllowed (&UsrDat,"PHOTO12x16",Pho_ZOOM,true); // Use unique id
|
||||||
NumUsr < NumFirstUsrs;
|
|
||||||
NumUsr++)
|
|
||||||
{
|
|
||||||
/***** Get user *****/
|
|
||||||
/* Get row */
|
|
||||||
row = mysql_fetch_row (*mysql_res);
|
|
||||||
|
|
||||||
/* Get user's code (row[0]) */
|
/* End container */
|
||||||
UsrDat.UsrCod = Str_ConvertStrCodToLongCod (row[0]);
|
HTM_DIV_End ();
|
||||||
|
|
||||||
/***** Get user's data and show user's photo *****/
|
|
||||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,Usr_DONT_GET_PREFS))
|
|
||||||
{
|
|
||||||
/* Begin container */
|
|
||||||
HTM_DIV_Begin ("class=\"TL_SHARER\"");
|
|
||||||
|
|
||||||
/* User's photo */
|
|
||||||
Pho_ShowUsrPhotoIfAllowed (&UsrDat,"PHOTO12x16",Pho_ZOOM,true); // Use unique id
|
|
||||||
|
|
||||||
/* End container */
|
|
||||||
HTM_DIV_End ();
|
|
||||||
|
|
||||||
NumUsrsShown++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Free memory used for user's data *****/
|
|
||||||
Usr_UsrDataDestructor (&UsrDat);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***** Free memory used for user's data *****/
|
||||||
|
Usr_UsrDataDestructor (&UsrDat);
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,32 +76,32 @@ void TL_Who_PutFormWho (struct TL_Timeline *Timeline)
|
||||||
1 << Usr_WHO_ALL;
|
1 << Usr_WHO_ALL;
|
||||||
|
|
||||||
/***** Setting selector for which users *****/
|
/***** Setting selector for which users *****/
|
||||||
Set_StartSettingsHead ();
|
Set_BeginSettingsHead ();
|
||||||
Set_StartOneSettingSelector ();
|
Set_BeginOneSettingSelector ();
|
||||||
for (Who = (Usr_Who_t) 0;
|
for (Who = (Usr_Who_t) 0;
|
||||||
Who <= (Usr_Who_t) (Usr_NUM_WHO - 1);
|
Who <= (Usr_Who_t) (Usr_NUM_WHO - 1);
|
||||||
Who++)
|
Who++)
|
||||||
if (Mask & (1 << Who))
|
if (Mask & (1 << Who))
|
||||||
{
|
{
|
||||||
/* Begin container */
|
/* Begin container */
|
||||||
HTM_DIV_Begin ("class=\"%s\"",
|
HTM_DIV_Begin ("class=\"%s\"",
|
||||||
Who == Timeline->Who ? "PREF_ON" :
|
Who == Timeline->Who ? "PREF_ON" :
|
||||||
"PREF_OFF");
|
"PREF_OFF");
|
||||||
|
|
||||||
/* Begin form */
|
/* Begin form */
|
||||||
Frm_BeginForm (ActSeeGblTL);
|
Frm_BeginForm (ActSeeGblTL);
|
||||||
Par_PutHiddenParamUnsigned (NULL,"Who",(unsigned) Who);
|
Par_PutHiddenParamUnsigned (NULL,"Who",(unsigned) Who);
|
||||||
|
|
||||||
/* Icon to select which users */
|
/* Icon to select which users */
|
||||||
Usr_PutWhoIcon (Who);
|
Usr_PutWhoIcon (Who);
|
||||||
|
|
||||||
/* End form */
|
/* End form */
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
|
||||||
/* End container */
|
/* End container */
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
}
|
}
|
||||||
Set_EndOneSettingSelector ();
|
Set_EndOneSettingSelector ();
|
||||||
Set_EndSettingsHead ();
|
Set_EndSettingsHead ();
|
||||||
|
|
||||||
/***** Show warning if I do not follow anyone *****/
|
/***** Show warning if I do not follow anyone *****/
|
||||||
|
@ -210,7 +210,7 @@ static void TL_Who_ShowWarningYouDontFollowAnyUser (void)
|
||||||
|
|
||||||
/***** Contextual menu *****/
|
/***** Contextual menu *****/
|
||||||
Mnu_ContextMenuBegin ();
|
Mnu_ContextMenuBegin ();
|
||||||
Fol_PutLinkWhoToFollow (); // Users to follow
|
Fol_PutLinkWhoToFollow (); // Users to follow
|
||||||
Mnu_ContextMenuEnd ();
|
Mnu_ContextMenuEnd ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -382,7 +382,7 @@ void TT_ShowClassTimeTable (void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/***** Setting selector *****/
|
/***** Setting selector *****/
|
||||||
Set_StartSettingsHead ();
|
Set_BeginSettingsHead ();
|
||||||
|
|
||||||
/* Select whether show only my groups or all groups */
|
/* Select whether show only my groups or all groups */
|
||||||
if ( Timetable.Type == TT_MY_TIMETABLE ||
|
if ( Timetable.Type == TT_MY_TIMETABLE ||
|
||||||
|
|
|
@ -6108,8 +6108,8 @@ void Usr_FreeListOtherRecipients (void)
|
||||||
|
|
||||||
void Usr_ShowFormsToSelectUsrListType (void (*FuncParams) (void *Args),void *Args)
|
void Usr_ShowFormsToSelectUsrListType (void (*FuncParams) (void *Args),void *Args)
|
||||||
{
|
{
|
||||||
Set_StartSettingsHead ();
|
Set_BeginSettingsHead ();
|
||||||
Set_StartOneSettingSelector ();
|
Set_BeginOneSettingSelector ();
|
||||||
|
|
||||||
/***** Select Usr_LIST_AS_CLASS_PHOTO *****/
|
/***** Select Usr_LIST_AS_CLASS_PHOTO *****/
|
||||||
HTM_DIV_Begin ("class=\"%s\"",
|
HTM_DIV_Begin ("class=\"%s\"",
|
||||||
|
|
Loading…
Reference in New Issue