mirror of https://github.com/acanas/swad-core.git
Version 18.60.1
This commit is contained in:
parent
c3a67eec72
commit
9850b4f822
|
@ -2614,6 +2614,11 @@ a:hover img.CENTRE_PHOTO_SHOW
|
|||
.TT_TUTO {box-sizing:border-box; height:16px; background-color:#D6E9C3; border:solid 2px; border-color:#E8FCD3 #C2D4B1 #C2D4B1 #E8FCD3;}
|
||||
|
||||
/********************************* Preference ********************************/
|
||||
|
||||
.PREF_CONTAINERS
|
||||
{
|
||||
margin:0 auto;
|
||||
}
|
||||
.PREF_CONTAINER
|
||||
{
|
||||
display:inline-block;
|
|
@ -42,6 +42,7 @@
|
|||
#include "swad_pagination.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_photo.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_privacy.h"
|
||||
#include "swad_QR.h"
|
||||
#include "swad_string.h"
|
||||
|
@ -157,9 +158,11 @@ void Agd_ShowMyAgenda (void)
|
|||
Hlp_PROFILE_Agenda,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Put forms to choice which events to show *****/
|
||||
Pre_StartPrefsHead ();
|
||||
Agd_ShowFormToSelPast__FutureEvents ();
|
||||
Agd_ShowFormToSelPrivatPublicEvents ();
|
||||
Agd_ShowFormToSelHiddenVisiblEvents ();
|
||||
Pre_EndPrefsHead ();
|
||||
|
||||
/***** Show the current events in the user's agenda *****/
|
||||
Agd_ShowEventsToday (Agd_MY_AGENDA_TODAY);
|
||||
|
@ -185,7 +188,7 @@ static void Agd_ShowFormToSelPast__FutureEvents (void)
|
|||
"calendar-plus.svg", // Agd_FUTURE_EVENTS
|
||||
};
|
||||
|
||||
fprintf (Gbl.F.Out,"<div class=\"PREF_CONTAINER\">");
|
||||
Pre_StartOnePrefSelector ();
|
||||
for (PstFut = Agd_PAST___EVENTS;
|
||||
PstFut <= Agd_FUTURE_EVENTS;
|
||||
PstFut++)
|
||||
|
@ -204,7 +207,7 @@ static void Agd_ShowFormToSelPast__FutureEvents (void)
|
|||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
Pre_EndOnePrefSelector ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -221,7 +224,7 @@ static void Agd_ShowFormToSelPrivatPublicEvents (void)
|
|||
"unlock.svg", // Agd_PUBLIC_EVENTS
|
||||
};
|
||||
|
||||
fprintf (Gbl.F.Out,"<div class=\"PREF_CONTAINER\">");
|
||||
Pre_StartOnePrefSelector ();
|
||||
for (PrvPub = Agd_PRIVAT_EVENTS;
|
||||
PrvPub <= Agd_PUBLIC_EVENTS;
|
||||
PrvPub++)
|
||||
|
@ -240,7 +243,7 @@ static void Agd_ShowFormToSelPrivatPublicEvents (void)
|
|||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
Pre_EndOnePrefSelector ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -257,7 +260,7 @@ static void Agd_ShowFormToSelHiddenVisiblEvents (void)
|
|||
"eye.svg", // Agd_VISIBL_EVENTS
|
||||
};
|
||||
|
||||
fprintf (Gbl.F.Out,"<div class=\"PREF_CONTAINER\">");
|
||||
Pre_StartOnePrefSelector ();
|
||||
for (HidVis = Agd_HIDDEN_EVENTS;
|
||||
HidVis <= Agd_VISIBL_EVENTS;
|
||||
HidVis++)
|
||||
|
@ -276,7 +279,7 @@ static void Agd_ShowFormToSelHiddenVisiblEvents (void)
|
|||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
Pre_EndOnePrefSelector ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "swad_pagination.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_photo.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_string.h"
|
||||
#include "swad_table.h"
|
||||
|
||||
|
@ -72,7 +73,6 @@ static bool Asg_CheckIfICanCreateAssignments (void);
|
|||
static void Asg_PutIconsListAssignments (void);
|
||||
static void Asg_PutIconToCreateNewAsg (void);
|
||||
static void Asg_PutButtonToCreateNewAsg (void);
|
||||
static void Asg_PutFormToSelectWhichGroupsToShow (void);
|
||||
static void Asg_ParamsWhichGroupsToShow (void);
|
||||
static void Asg_ShowOneAssignment (long AsgCod,bool PrintView);
|
||||
static void Asg_WriteAsgAuthor (struct Assignment *Asg);
|
||||
|
@ -146,7 +146,11 @@ static void Asg_ShowAllAssignments (void)
|
|||
|
||||
/***** Select whether show only my groups or all groups *****/
|
||||
if (Gbl.CurrentCrs.Grps.NumGrps)
|
||||
Asg_PutFormToSelectWhichGroupsToShow ();
|
||||
{
|
||||
Pre_StartPrefsHead ();
|
||||
Grp_ShowFormToSelWhichGrps (ActSeeAsg,Asg_ParamsWhichGroupsToShow);
|
||||
Pre_EndPrefsHead ();
|
||||
}
|
||||
|
||||
if (Gbl.Asgs.Num)
|
||||
{
|
||||
|
@ -291,16 +295,9 @@ static void Asg_PutButtonToCreateNewAsg (void)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Put form to select which groups to show *******************/
|
||||
/**************** Put params to select which groups to show ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Asg_PutFormToSelectWhichGroupsToShow (void)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div style=\"display:table; margin:0 auto;\">");
|
||||
Grp_ShowFormToSelWhichGrps (ActSeeAsg,Asg_ParamsWhichGroupsToShow);
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
|
||||
static void Asg_ParamsWhichGroupsToShow (void)
|
||||
{
|
||||
Asg_PutHiddenParamAsgOrder ();
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "swad_pagination.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_photo.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_QR.h"
|
||||
#include "swad_table.h"
|
||||
|
||||
|
@ -77,7 +78,6 @@ typedef enum
|
|||
/*****************************************************************************/
|
||||
|
||||
static void Att_ShowAllAttEvents (void);
|
||||
static void Att_PutFormToSelectWhichGroupsToShow (void);
|
||||
static void Att_ParamsWhichGroupsToShow (void);
|
||||
static void Att_PutIconsInListOfAttEvents (void);
|
||||
static void Att_PutIconToCreateNewAttEvent (void);
|
||||
|
@ -227,7 +227,11 @@ static void Att_ShowAllAttEvents (void)
|
|||
|
||||
/***** Select whether show only my groups or all groups *****/
|
||||
if (Gbl.CurrentCrs.Grps.NumGrps)
|
||||
Att_PutFormToSelectWhichGroupsToShow ();
|
||||
{
|
||||
Pre_StartPrefsHead ();
|
||||
Grp_ShowFormToSelWhichGrps (ActSeeAtt,Att_ParamsWhichGroupsToShow);
|
||||
Pre_EndPrefsHead ();
|
||||
}
|
||||
|
||||
if (Gbl.AttEvents.Num)
|
||||
{
|
||||
|
@ -294,16 +298,9 @@ static void Att_ShowAllAttEvents (void)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Put form to select which groups to show *******************/
|
||||
/***************** Put params to select which groups to show *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Att_PutFormToSelectWhichGroupsToShow (void)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div style=\"display:table; margin:0 auto;\">");
|
||||
Grp_ShowFormToSelWhichGrps (ActSeeAtt,Att_ParamsWhichGroupsToShow);
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
|
||||
static void Att_ParamsWhichGroupsToShow (void)
|
||||
{
|
||||
Att_PutHiddenParamAttOrder ();
|
||||
|
|
|
@ -82,7 +82,9 @@ void Cal_PutIconsToSelectFirstDayOfWeek (void)
|
|||
|
||||
Box_StartBox (NULL,Txt_Calendar,Cal_PutIconsFirstDayOfWeek,
|
||||
Hlp_PROFILE_Preferences_calendar,Box_NOT_CLOSABLE);
|
||||
Pre_StartPrefsHead ();
|
||||
Cal_ShowFormToSelFirstDayOfWeek (ActChg1stDay,NULL);
|
||||
Pre_EndPrefsHead ();
|
||||
Box_EndBox ();
|
||||
}
|
||||
|
||||
|
@ -108,7 +110,7 @@ void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,void (*FuncParams) ())
|
|||
unsigned FirstDayOfWeek;
|
||||
char Icon[32 + 1];
|
||||
|
||||
fprintf (Gbl.F.Out,"<div class=\"PREF_CONTAINER\">");
|
||||
Pre_StartOnePrefSelector ();
|
||||
for (FirstDayOfWeek = 0; // Monday
|
||||
FirstDayOfWeek <= 6; // Sunday
|
||||
FirstDayOfWeek++)
|
||||
|
@ -131,7 +133,7 @@ void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,void (*FuncParams) ())
|
|||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
Pre_EndOnePrefSelector ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -265,11 +267,15 @@ static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar,
|
|||
Gbl.CurrentDeg.Deg.DegCod,
|
||||
Gbl.CurrentCrs.Crs.CrsCod);
|
||||
|
||||
/***** Draw several months *****/
|
||||
/* Show form to change first day of week */
|
||||
/***** Preference selector to change first day of week *****/
|
||||
if (!PrintView)
|
||||
{
|
||||
Pre_StartPrefsHead ();
|
||||
Cal_ShowFormToSelFirstDayOfWeek (ActionChangeCalendar1stDay,NULL);
|
||||
Pre_EndPrefsHead ();
|
||||
}
|
||||
|
||||
/***** Draw several months *****/
|
||||
/* JavaScript will write HTML here */
|
||||
fprintf (Gbl.F.Out,"<div id=\"calendar\">"
|
||||
"</div>");
|
||||
|
|
|
@ -429,10 +429,11 @@ En OpenSWAD:
|
|||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.60 (2019-02-25)"
|
||||
#define CSS_FILE "swad18.57.css"
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.60.1 (2019-02-25)"
|
||||
#define CSS_FILE "swad18.60.1.css"
|
||||
#define JS_FILE "swad18.60.js"
|
||||
/*
|
||||
Version 18.60.1: Feb 25, 2019 Changes in CSS related to preferences. (237772 lines)
|
||||
Version 18.60: Feb 25, 2019 Code refactoring in JavaScript code related to favs and shared. (237709 lines)
|
||||
Version 18.59.2: Feb 25, 2019 Code refactoring related to favs and shared. (237677 lines)
|
||||
Version 18.59.1: Feb 25, 2019 Optimization in JavaScript code related to favs and shared. (237785 lines)
|
||||
|
@ -440,15 +441,15 @@ ps2pdf source.ps destination.pdf
|
|||
Version 18.58.1: Feb 24, 2019 Code cleaning related to AJAX and timeline.
|
||||
Fixed bug in recent clicks. (237768 lines)
|
||||
9 changes necessary in database:
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1512','es','N','Favorito public. social (global)');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1513','es','N','Deshacer fav. public. social (global)');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1514','es','N','Favorito public. social (usuario)');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1515','es','N','Deshacer fav. public. social (usuario)');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1516','es','N','Favorito coment. social (global)');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1517','es','N','Deshacer fav. coment. social (global)');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1518','es','N','Favorito coment. social (usuario)');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1519','es','N','Deshacer fav. coment. social (usuario)');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1520','es','N','Sugerir lista de usuarios a seguir');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1512','es','N','Marcar post social como favorito (global) ');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1513','es','N','Desmarcar post social como favorito (global)');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1514','es','N','Marcar post social como favorito (usuario)');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1515','es','N','Desmarcar post social como favorito (usuario)');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1516','es','N','Marcar comentario social como favorito (global)');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1517','es','N','Desmarcar comentario social como favorito (global)');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1518','es','N','Marcar comentario social como favorito (usuario)');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1519','es','N','Desmarcar comentario social como favorito (usuario)');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1520','es','N','A quién seguir');
|
||||
|
||||
Version 18.58: Feb 24, 2019 Favourites in social comments are made in AJAX without reloading page. (237816 lines)
|
||||
Version 18.57.3: Feb 24, 2019 Changes in social timeline related to AJAX and favourites. (237804 lines)
|
||||
|
|
17
swad_game.c
17
swad_game.c
|
@ -41,6 +41,7 @@
|
|||
#include "swad_group.h"
|
||||
#include "swad_pagination.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_role.h"
|
||||
#include "swad_table.h"
|
||||
#include "swad_test.h"
|
||||
|
@ -89,7 +90,6 @@ static void Gam_PutIconsListGames (void);
|
|||
static void Gam_PutIconToCreateNewGame (void);
|
||||
static void Gam_PutButtonToCreateNewGame (void);
|
||||
static void Gam_PutParamsToCreateNewGame (void);
|
||||
static void Gam_PutFormToSelectWhichGroupsToShow (void);
|
||||
static void Gam_ParamsWhichGroupsToShow (void);
|
||||
static void Gam_ShowOneGame (long GamCod,
|
||||
bool ShowOnlyThisGame,
|
||||
|
@ -224,7 +224,11 @@ static void Gam_ListAllGames (void)
|
|||
|
||||
/***** Select whether show only my groups or all groups *****/
|
||||
if (Gbl.CurrentCrs.Grps.NumGrps)
|
||||
Gam_PutFormToSelectWhichGroupsToShow ();
|
||||
{
|
||||
Pre_StartPrefsHead ();
|
||||
Grp_ShowFormToSelWhichGrps (ActSeeAllGam,Gam_ParamsWhichGroupsToShow);
|
||||
Pre_EndPrefsHead ();
|
||||
}
|
||||
|
||||
if (Gbl.Games.Num)
|
||||
{
|
||||
|
@ -373,16 +377,9 @@ static void Gam_PutParamsToCreateNewGame (void)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Put form to select which groups to show *******************/
|
||||
/**************** Put params to select which groups to show ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Gam_PutFormToSelectWhichGroupsToShow (void)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div style=\"display:table; margin:0 auto;\">");
|
||||
Grp_ShowFormToSelWhichGrps (ActSeeAllGam,Gam_ParamsWhichGroupsToShow);
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
|
||||
static void Gam_ParamsWhichGroupsToShow (void)
|
||||
{
|
||||
Gam_PutHiddenParamGameOrder ();
|
||||
|
|
|
@ -5010,7 +5010,7 @@ void Grp_ShowFormToSelWhichGrps (Act_Action_t Action,void (*FuncParams) ())
|
|||
extern const char *Txt_GROUP_WHICH_GROUPS[2];
|
||||
Grp_WhichGroups_t WhichGrps;
|
||||
|
||||
fprintf (Gbl.F.Out,"<div class=\"PREF_CONTAINER\">");
|
||||
Pre_StartOnePrefSelector ();
|
||||
for (WhichGrps = Grp_ONLY_MY_GROUPS;
|
||||
WhichGrps <= Grp_ALL_GROUPS;
|
||||
WhichGrps++)
|
||||
|
@ -5028,7 +5028,7 @@ void Grp_ShowFormToSelWhichGrps (Act_Action_t Action,void (*FuncParams) ())
|
|||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
Pre_EndOnePrefSelector ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -117,7 +117,8 @@ void Ico_PutIconsToSelectIconSet (void)
|
|||
|
||||
Box_StartBox (NULL,Txt_Icons,Ico_PutIconsIconSet,
|
||||
Hlp_PROFILE_Preferences_icons,Box_NOT_CLOSABLE);
|
||||
fprintf (Gbl.F.Out,"<div class=\"PREF_CONTAINER\">");
|
||||
Pre_StartPrefsHead ();
|
||||
Pre_StartOnePrefSelector ();
|
||||
for (IconSet = (Ico_IconSet_t) 0;
|
||||
IconSet < Ico_NUM_ICON_SETS;
|
||||
IconSet++)
|
||||
|
@ -135,7 +136,8 @@ void Ico_PutIconsToSelectIconSet (void)
|
|||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
Pre_EndOnePrefSelector ();
|
||||
Pre_EndPrefsHead ();
|
||||
Box_EndBox ();
|
||||
}
|
||||
|
||||
|
|
|
@ -411,7 +411,8 @@ void Mnu_PutIconsToSelectMenu (void)
|
|||
|
||||
Box_StartBox (NULL,Txt_Menu,Mnu_PutIconsMenu,
|
||||
Hlp_PROFILE_Preferences_menu,Box_NOT_CLOSABLE);
|
||||
fprintf (Gbl.F.Out,"<div class=\"PREF_CONTAINER\">");
|
||||
Pre_StartPrefsHead ();
|
||||
Pre_StartOnePrefSelector ();
|
||||
for (Menu = (Mnu_Menu_t) 0;
|
||||
Menu < Mnu_NUM_MENUS;
|
||||
Menu++)
|
||||
|
@ -425,7 +426,8 @@ void Mnu_PutIconsToSelectMenu (void)
|
|||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
Pre_EndOnePrefSelector ();
|
||||
Pre_EndPrefsHead ();
|
||||
Box_EndBox ();
|
||||
}
|
||||
|
||||
|
|
|
@ -235,7 +235,8 @@ static void Pre_PutIconsToSelectSideCols (void)
|
|||
|
||||
Box_StartBox (NULL,Txt_Columns,Pre_PutIconsSideColumns,
|
||||
Hlp_PROFILE_Preferences_columns,Box_NOT_CLOSABLE);
|
||||
fprintf (Gbl.F.Out,"<div class=\"PREF_CONTAINER\">");
|
||||
Pre_StartPrefsHead ();
|
||||
Pre_StartOnePrefSelector ();
|
||||
for (SideCols = 0;
|
||||
SideCols <= Lay_SHOW_BOTH_COLUMNS;
|
||||
SideCols++)
|
||||
|
@ -252,7 +253,8 @@ static void Pre_PutIconsToSelectSideCols (void)
|
|||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
Pre_EndOnePrefSelector ();
|
||||
Pre_EndPrefsHead ();
|
||||
Box_EndBox ();
|
||||
}
|
||||
|
||||
|
@ -363,3 +365,36 @@ unsigned Pre_GetParamSideCols (void)
|
|||
Lay_SHOW_BOTH_COLUMNS,
|
||||
Cfg_DEFAULT_COLUMNS);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********** Head to select one or several preferences using icons ************/
|
||||
/*****************************************************************************/
|
||||
/*
|
||||
+-- Container for several pref. selectors ---+
|
||||
| +One pref.selector+ +One pref.selector+ |
|
||||
| | +-----+ +-----+ | | +-----+ +-----+ | |
|
||||
| | |Icon | |Icon | | | |Icon | |Icon | | |
|
||||
| | |opt.A| |opt.B| | | |opt.A| |opt.B| | |
|
||||
| | +-----+ +-----+ | | +-----+ +-----+ | |
|
||||
| +-----------------+ +-----------------+ |
|
||||
+--------------------------------------------+
|
||||
*/
|
||||
void Pre_StartPrefsHead (void)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div class=\"PREF_CONTAINERS\">");
|
||||
}
|
||||
|
||||
void Pre_EndPrefsHead (void)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
|
||||
void Pre_StartOnePrefSelector (void)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div class=\"PREF_CONTAINER\">");
|
||||
}
|
||||
|
||||
void Pre_EndOnePrefSelector (void)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
|
|
|
@ -52,4 +52,9 @@ void Pre_ShowLeftCol (void);
|
|||
void Pre_ShowRightCol (void);
|
||||
unsigned Pre_GetParamSideCols (void);
|
||||
|
||||
void Pre_StartPrefsHead (void);
|
||||
void Pre_EndPrefsHead (void);
|
||||
void Pre_StartOnePrefSelector (void);
|
||||
void Pre_EndOnePrefSelector (void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "swad_pagination.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_photo.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_project.h"
|
||||
#include "swad_string.h"
|
||||
#include "swad_table.h"
|
||||
|
@ -266,6 +267,8 @@ static void Prj_ShowProjectsInCurrentPage (void)
|
|||
Hlp_ASSESSMENT_Projects,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Put forms to choice which projects to show *****/
|
||||
/* 1st. row */
|
||||
Pre_StartPrefsHead ();
|
||||
Prj_ShowFormToFilterByMy_All ();
|
||||
Prj_ShowFormToFilterByPreassignedNonPreassig ();
|
||||
switch (Gbl.Usrs.Me.Role.Logged)
|
||||
|
@ -278,6 +281,8 @@ static void Prj_ShowProjectsInCurrentPage (void)
|
|||
default: // Students will see only visible projects
|
||||
break;
|
||||
}
|
||||
Pre_EndPrefsHead ();
|
||||
/* 2nd. row */
|
||||
Prj_ShowFormToFilterByDpt ();
|
||||
|
||||
if (Gbl.Prjs.Num)
|
||||
|
@ -363,7 +368,7 @@ static void Prj_ShowFormToFilterByMy_All (void)
|
|||
"sitemap.svg", // Prj_ALL_PROJECTS
|
||||
};
|
||||
|
||||
fprintf (Gbl.F.Out,"<div class=\"PREF_CONTAINER\">");
|
||||
Pre_StartOnePrefSelector ();
|
||||
for (My_All = (Prj_WhoseProjects_t) 0;
|
||||
My_All <= (Prj_WhoseProjects_t) (Prj_NUM_WHOSE_PROJECTS - 1);
|
||||
My_All++)
|
||||
|
@ -385,7 +390,7 @@ static void Prj_ShowFormToFilterByMy_All (void)
|
|||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
Pre_EndOnePrefSelector ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -398,7 +403,7 @@ static void Prj_ShowFormToFilterByPreassignedNonPreassig (void)
|
|||
struct Prj_Filter Filter;
|
||||
Prj_PreassignedNonpreassig_t PreNon;
|
||||
|
||||
fprintf (Gbl.F.Out,"<div class=\"PREF_CONTAINER\">");
|
||||
Pre_StartOnePrefSelector ();
|
||||
for (PreNon = (Prj_PreassignedNonpreassig_t) 0;
|
||||
PreNon <= (Prj_PreassignedNonpreassig_t) (Prj_NUM_PREASSIGNED_NONPREASSIG - 1);
|
||||
PreNon++)
|
||||
|
@ -420,7 +425,7 @@ static void Prj_ShowFormToFilterByPreassignedNonPreassig (void)
|
|||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
Pre_EndOnePrefSelector ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -438,7 +443,7 @@ static void Prj_ShowFormToFilterByHidden (void)
|
|||
"eye.svg", // Prj_VISIBL
|
||||
};
|
||||
|
||||
fprintf (Gbl.F.Out,"<div class=\"PREF_CONTAINER\">");
|
||||
Pre_StartOnePrefSelector ();
|
||||
for (HidVis = (Prj_HiddenVisibl_t) 0;
|
||||
HidVis <= (Prj_HiddenVisibl_t) (Prj_NUM_HIDDEN_VISIBL - 1);
|
||||
HidVis++)
|
||||
|
@ -460,7 +465,7 @@ static void Prj_ShowFormToFilterByHidden (void)
|
|||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
Pre_EndOnePrefSelector ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -968,7 +968,9 @@ static void Soc_ShowTimeline (char *Query,
|
|||
Query);
|
||||
|
||||
/***** Start box *****/
|
||||
Box_StartBox (Soc_WIDTH_TIMELINE,Title,Soc_PutIconsTimeline,
|
||||
// Box_StartBox (Soc_WIDTH_TIMELINE,Title,Soc_PutIconsTimeline,
|
||||
// Hlp_SOCIAL_Timeline,Box_NOT_CLOSABLE);
|
||||
Box_StartBox (NULL,Title,Soc_PutIconsTimeline,
|
||||
Hlp_SOCIAL_Timeline,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Put form to select users whom public activity is displayed *****/
|
||||
|
@ -1120,7 +1122,9 @@ static void Soc_PutFormWhichUsrs (void)
|
|||
"users.svg", // Soc_USRS_ALL
|
||||
};
|
||||
|
||||
fprintf (Gbl.F.Out,"<div class=\"PREF_CONTAINER\">");
|
||||
/***** Preference selector for which users *****/
|
||||
Pre_StartPrefsHead ();
|
||||
Pre_StartOnePrefSelector ();
|
||||
for (WhichUsrs = (Soc_WhichUsrs_t) 1;
|
||||
WhichUsrs < Soc_NUM_WHICH_USRS;
|
||||
WhichUsrs++)
|
||||
|
@ -1134,7 +1138,8 @@ static void Soc_PutFormWhichUsrs (void)
|
|||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
Pre_EndOnePrefSelector ();
|
||||
Pre_EndPrefsHead ();
|
||||
|
||||
/***** Show warning if I do not follow anyone *****/
|
||||
if (Gbl.Social.WhichUsrs == Soc_USRS_FOLLOWED)
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "swad_notification.h"
|
||||
#include "swad_pagination.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_role.h"
|
||||
#include "swad_survey.h"
|
||||
#include "swad_table.h"
|
||||
|
@ -98,7 +99,6 @@ static void Svy_PutIconsListSurveys (void);
|
|||
static void Svy_PutIconToCreateNewSvy (void);
|
||||
static void Svy_PutButtonToCreateNewSvy (void);
|
||||
static void Svy_PutParamsToCreateNewSvy (void);
|
||||
static void Svy_PutFormToSelectWhichGroupsToShow (void);
|
||||
static void Svy_ParamsWhichGroupsToShow (void);
|
||||
static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
|
||||
bool ShowOnlyThisSvyComplete);
|
||||
|
@ -229,7 +229,11 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst)
|
|||
|
||||
/***** Select whether show only my groups or all groups *****/
|
||||
if (Gbl.CurrentCrs.Grps.NumGrps)
|
||||
Svy_PutFormToSelectWhichGroupsToShow ();
|
||||
{
|
||||
Pre_StartPrefsHead ();
|
||||
Grp_ShowFormToSelWhichGrps (ActSeeAllSvy,Svy_ParamsWhichGroupsToShow);
|
||||
Pre_EndPrefsHead ();
|
||||
}
|
||||
|
||||
if (Gbl.Svys.Num)
|
||||
{
|
||||
|
@ -375,16 +379,9 @@ static void Svy_PutParamsToCreateNewSvy (void)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Put form to select which groups to show *******************/
|
||||
/**************** Put params to select which groups to show ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Svy_PutFormToSelectWhichGroupsToShow (void)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div style=\"display:table; margin:0 auto;\">");
|
||||
Grp_ShowFormToSelWhichGrps (ActSeeAllSvy,Svy_ParamsWhichGroupsToShow);
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
|
||||
static void Svy_ParamsWhichGroupsToShow (void)
|
||||
{
|
||||
Svy_PutHiddenParamSvyOrder ();
|
||||
|
|
|
@ -268,7 +268,8 @@ void The_PutIconsToSelectTheme (void)
|
|||
|
||||
Box_StartBox (NULL,Txt_Theme_SKIN,The_PutIconsTheme,
|
||||
Hlp_PROFILE_Preferences_theme,Box_NOT_CLOSABLE);
|
||||
fprintf (Gbl.F.Out,"<div class=\"PREF_CONTAINER\">");
|
||||
Pre_StartPrefsHead ();
|
||||
Pre_StartOnePrefSelector ();
|
||||
for (Theme = (The_Theme_t) 0;
|
||||
Theme < The_NUM_THEMES;
|
||||
Theme++)
|
||||
|
@ -286,7 +287,8 @@ void The_PutIconsToSelectTheme (void)
|
|||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
Pre_EndOnePrefSelector ();
|
||||
Pre_EndPrefsHead ();
|
||||
Box_EndBox ();
|
||||
}
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "swad_global.h"
|
||||
#include "swad_language.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_timetable.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -370,15 +371,20 @@ void TT_ShowClassTimeTable (void)
|
|||
TT_ShowTimeTableGrpsSelected ();
|
||||
else
|
||||
{
|
||||
/***** Select whether show only my groups or all groups *****/
|
||||
/***** Preference selector *****/
|
||||
Pre_StartPrefsHead ();
|
||||
|
||||
/* Select whether show only my groups or all groups */
|
||||
if ( Gbl.TimeTable.Type == TT_MY_TIMETABLE ||
|
||||
(Gbl.TimeTable.Type == TT_COURSE_TIMETABLE &&
|
||||
Gbl.CurrentCrs.Grps.NumGrps))
|
||||
TT_PutFormToSelectWhichGroupsToShow ();
|
||||
|
||||
/***** Show form to change first day of week *****/
|
||||
/* Show form to change first day of week */
|
||||
Cal_ShowFormToSelFirstDayOfWeek (ActChgTT1stDay[Gbl.TimeTable.Type],
|
||||
Grp_PutParamWhichGrps);
|
||||
|
||||
Pre_EndPrefsHead ();
|
||||
}
|
||||
|
||||
/***** Show the time table *****/
|
||||
|
|
|
@ -5859,7 +5859,8 @@ void Usr_FreeListOtherRecipients (void)
|
|||
|
||||
void Usr_ShowFormsToSelectUsrListType (Act_Action_t NextAction)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div class=\"PREF_CONTAINER\">");
|
||||
Pre_StartPrefsHead ();
|
||||
Pre_StartOnePrefSelector ();
|
||||
|
||||
/***** Select Usr_LIST_AS_CLASS_PHOTO *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"%s\">",
|
||||
|
@ -5892,7 +5893,8 @@ void Usr_ShowFormsToSelectUsrListType (Act_Action_t NextAction)
|
|||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
Pre_EndOnePrefSelector ();
|
||||
Pre_EndPrefsHead ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
Loading…
Reference in New Issue