Version 23.53.6: Dec 19, 2023 Responsive design in questions.

This commit is contained in:
acanas 2023-12-20 00:03:58 +01:00
parent 812d6d22d1
commit 1df78e9f15
12 changed files with 200 additions and 197 deletions

View File

@ -2674,9 +2674,13 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;}
} }
/****************************** Date range form ******************************/ /****************************** Date range form ******************************/
.DATE_RANGE .DATE_FORM_YMD, .DATE_FORM_HMS, .DATE_FORM_TODAY
{ {
float:left; /* To display something after the table in the same line */ display: inline-block;
}
.DATE_FORM_MONTH
{
width: 60px;
} }
/*********************************** Lists ***********************************/ /*********************************** Lists ***********************************/
@ -3082,21 +3086,21 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;}
.REC_C1_BOT .REC_C1_BOT
{ {
box-sizing:border-box; box-sizing:border-box;
width:120px; width:80px;
max-width:120px; max-width:80px;
overflow:hidden; overflow:hidden;
} }
.REC_C2_BOT .REC_C2_BOT
{ {
box-sizing:border-box; box-sizing:border-box;
width:148px; width:188px;
max-width:148px; max-width:188px;
overflow:hidden; overflow:hidden;
} }
.REC_C2_BOT_INPUT .REC_C2_BOT_INPUT
{ {
box-sizing:border-box; box-sizing:border-box;
width:144px; width:184px;
} }
} }
@media only screen and (min-width: 480px) and (max-width: 600px) @media only screen and (min-width: 480px) and (max-width: 600px)
@ -5207,7 +5211,7 @@ button.PAG_DARK:hover, .PAG_CUR_DARK {background-color:#707070;}
{ {
display: block; display: block;
overflow-x: auto; overflow-x: auto;
width: 280px; width: 260px;
margin: 0 auto; margin: 0 auto;
} }
} }

View File

@ -1922,10 +1922,15 @@ void HTM_TxtF (const char *fmt,...)
void HTM_SPTxt (const char *Txt) void HTM_SPTxt (const char *Txt)
{ {
HTM_Txt (" "); HTM_SP ();
HTM_Txt (Txt); HTM_Txt (Txt);
} }
void HTM_SP (void)
{
HTM_Txt (" ");
}
void HTM_Txt (const char *Txt) void HTM_Txt (const char *Txt)
{ {
if (Txt) if (Txt)
@ -2068,7 +2073,7 @@ void HTM_TD_Txt_Right (const char *Txt)
void HTM_TD_TxtColon (const char *Txt) void HTM_TD_TxtColon (const char *Txt)
{ {
HTM_TD_Begin ("class=\"RT FORM_IN_%s\"",The_GetSuffix ()); HTM_TD_Begin ("class=\"REC_C1_BOT RT FORM_IN_%s\"",The_GetSuffix ());
HTM_TxtColon (Txt); HTM_TxtColon (Txt);
HTM_TD_End (); HTM_TD_End ();
} }

View File

@ -223,6 +223,7 @@ void HTM_BR (void);
void HTM_TxtF (const char *fmt,...); void HTM_TxtF (const char *fmt,...);
void HTM_SPTxt (const char *Txt); void HTM_SPTxt (const char *Txt);
void HTM_SP (void);
void HTM_Txt (const char *Txt); void HTM_Txt (const char *Txt);
void HTM_TxtColon (const char *Txt); void HTM_TxtColon (const char *Txt);
void HTM_TxtSemicolon (const char *Txt); void HTM_TxtSemicolon (const char *Txt);

View File

@ -154,7 +154,7 @@ void Asg_ShowAllAssignments (struct Asg_Assignments *Assignments)
Assignments->CurrentPage = (unsigned) Pagination.CurrentPage; Assignments->CurrentPage = (unsigned) Pagination.CurrentPage;
/***** Begin box *****/ /***** Begin box *****/
Box_BoxBegin ("100%",Txt_Assignments, Box_BoxBegin (NULL,Txt_Assignments,
Asg_PutIconsListAssignments,Assignments, Asg_PutIconsListAssignments,Assignments,
Hlp_ASSESSMENT_Assignments,Box_NOT_CLOSABLE); Hlp_ASSESSMENT_Assignments,Box_NOT_CLOSABLE);

View File

@ -633,10 +633,11 @@ Me sale este error, no s
"can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod') "can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod')
*/ */
#define Log_PLATFORM_VERSION "SWAD 23.53.5 (2023-12-19)" #define Log_PLATFORM_VERSION "SWAD 23.53.6 (2023-12-19)"
#define CSS_FILE "swad23.53.5.css" #define CSS_FILE "swad23.53.6.css"
#define JS_FILE "swad23.53.3.js" #define JS_FILE "swad23.53.6.js"
/* /*
Version 23.53.6: Dec 19, 2023 Responsive design in questions. (335874 lines)
Version 23.53.5: Dec 19, 2023 Responsive design in calls for exams. (335874 lines) Version 23.53.5: Dec 19, 2023 Responsive design in calls for exams. (335874 lines)
Version 23.53.4: Dec 18, 2023 Responsive design in projects. (335869 lines) Version 23.53.4: Dec 18, 2023 Responsive design in projects. (335869 lines)
Version 23.53.3: Dec 18, 2023 Responsive design in assignments. (335868 lines) Version 23.53.3: Dec 18, 2023 Responsive design in assignments. (335868 lines)

View File

@ -622,10 +622,10 @@ void Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (const Dat_SetHMS
HTM_TR_Begin (NULL); HTM_TR_Begin (NULL);
/* Label */ /* Label */
Frm_LabelColumn ("RM","",Txt_START_END_TIME[Dat_STR_TIME]); Frm_LabelColumn ("REC_C1_BOT RT","",Txt_START_END_TIME[Dat_STR_TIME]);
/* Data (date-time) */ /* Data (date-time) */
HTM_TD_Begin ("class=\"LM\""); HTM_TD_Begin ("class=\"REC_C2_BOT LT\"");
Dat_WriteFormClientLocalDateTimeFromTimeUTC ("Start", Dat_WriteFormClientLocalDateTimeFromTimeUTC ("Start",
Dat_STR_TIME, Dat_STR_TIME,
Dat_Time.Range.TimeUTC[Dat_STR_TIME], Dat_Time.Range.TimeUTC[Dat_STR_TIME],
@ -636,11 +636,13 @@ void Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (const Dat_SetHMS
HTM_DONT_SUBMIT_ON_CHANGE); HTM_DONT_SUBMIT_ON_CHANGE);
/* "Yesterday" and "Today" buttons */ /* "Yesterday" and "Today" buttons */
HTM_NBSP (); HTM_DIV_Begin ("class=\"DATE_FORM_TODAY\"");
// HTM_SP ();
HTM_INPUT_BUTTON ("Yesterday",Txt_Yesterday, HTM_INPUT_BUTTON ("Yesterday",Txt_Yesterday,
"onclick=\"setDateToYesterday('Start','End');\""); "onclick=\"setDateToYesterday('Start','End');\"");
HTM_INPUT_BUTTON ("Today",Txt_Today, HTM_INPUT_BUTTON ("Today",Txt_Today,
"onclick=\"setDateToToday('Start','End');\""); "onclick=\"setDateToToday('Start','End');\"");
HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
HTM_TR_End (); HTM_TR_End ();
@ -649,10 +651,10 @@ void Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (const Dat_SetHMS
HTM_TR_Begin (NULL); HTM_TR_Begin (NULL);
/* Label */ /* Label */
Frm_LabelColumn ("RM","",Txt_START_END_TIME[Dat_END_TIME]); Frm_LabelColumn ("REC_C1_BOT RT","",Txt_START_END_TIME[Dat_END_TIME]);
/* Data (date-time) */ /* Data (date-time) */
HTM_TD_Begin ("class=\"LM\""); HTM_TD_Begin ("class=\"REC_C2_BOT LT\"");
Dat_WriteFormClientLocalDateTimeFromTimeUTC ("End", Dat_WriteFormClientLocalDateTimeFromTimeUTC ("End",
Dat_END_TIME, Dat_END_TIME,
Dat_Time.Range.TimeUTC[Dat_END_TIME], Dat_Time.Range.TimeUTC[Dat_END_TIME],
@ -752,12 +754,10 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
Id) < 0) Id) < 0)
Err_NotEnoughMemoryExit (); Err_NotEnoughMemoryExit ();
/***** Begin table *****/ /***** Year, month, day *****/
HTM_TABLE_Begin ("DATE_RANGE"); HTM_DIV_Begin ("class=\"DATE_FORM_YMD\"");
HTM_TR_Begin (NULL);
/***** Year *****/ /* Year */
HTM_TD_Begin ("class=\"RM\"");
HTM_SELECT_Begin (SubmitOnChange,FuncsYearMonth, HTM_SELECT_Begin (SubmitOnChange,FuncsYearMonth,
"id=\"%sYear\" name=\"%sYear\"" "id=\"%sYear\" name=\"%sYear\""
" class=\"INPUT_%s\"", " class=\"INPUT_%s\"",
@ -771,13 +771,11 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
HTM_OPTION_ENABLED, HTM_OPTION_ENABLED,
"%u",Year); "%u",Year);
HTM_SELECT_End (); HTM_SELECT_End ();
HTM_TD_End ();
/***** Month *****/ /* Month */
HTM_TD_Begin ("class=\"CM\"");
HTM_SELECT_Begin (SubmitOnChange,FuncsYearMonth, HTM_SELECT_Begin (SubmitOnChange,FuncsYearMonth,
"id=\"%sMonth\" name=\"%sMonth\"" "id=\"%sMonth\" name=\"%sMonth\""
" class=\"INPUT_%s\"", " class=\"DATE_FORM_MONTH INPUT_%s\"",
Id,Dat_ParName[StartEndTime], Id,Dat_ParName[StartEndTime],
The_GetSuffix ()); The_GetSuffix ());
for (Month = 1; for (Month = 1;
@ -788,10 +786,8 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
HTM_OPTION_ENABLED, HTM_OPTION_ENABLED,
"%s",Txt_MONTHS_SMALL[Month - 1]); "%s",Txt_MONTHS_SMALL[Month - 1]);
HTM_SELECT_End (); HTM_SELECT_End ();
HTM_TD_End ();
/***** Day *****/ /* Day */
HTM_TD_Begin ("class=\"LM\"");
HTM_SELECT_Begin (SubmitOnChange,FuncDayHMS, HTM_SELECT_Begin (SubmitOnChange,FuncDayHMS,
"id=\"%sDay\" name=\"%sDay\"" "id=\"%sDay\" name=\"%sDay\""
" class=\"INPUT_%s\"", " class=\"INPUT_%s\"",
@ -805,10 +801,13 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
HTM_OPTION_ENABLED, HTM_OPTION_ENABLED,
"%u",Day); "%u",Day);
HTM_SELECT_End (); HTM_SELECT_End ();
HTM_TD_End ();
/***** Hour *****/ HTM_DIV_End ();
HTM_TD_Begin ("class=\"RM\"");
/***** Hour, minute, second *****/
HTM_DIV_Begin ("class=\"DATE_FORM_HMS\"");
/* Hour */
HTM_SELECT_Begin (SubmitOnChange,FuncDayHMS, HTM_SELECT_Begin (SubmitOnChange,FuncDayHMS,
"id=\"%sHour\" name=\"%sHour\"" "id=\"%sHour\" name=\"%sHour\""
" class=\"INPUT_%s\"", " class=\"INPUT_%s\"",
@ -822,10 +821,8 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
HTM_OPTION_ENABLED, HTM_OPTION_ENABLED,
"%02u h",Hour); "%02u h",Hour);
HTM_SELECT_End (); HTM_SELECT_End ();
HTM_TD_End ();
/***** Minute *****/ /* Minute */
HTM_TD_Begin ("class=\"CM\"");
HTM_SELECT_Begin (SubmitOnChange,FuncDayHMS, HTM_SELECT_Begin (SubmitOnChange,FuncDayHMS,
"id=\"%sMinute\" name=\"%sMinute\"" "id=\"%sMinute\" name=\"%sMinute\""
" class=\"INPUT_%s\"", " class=\"INPUT_%s\"",
@ -839,12 +836,10 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
HTM_OPTION_ENABLED, HTM_OPTION_ENABLED,
"%02u &prime;",Minute); "%02u &prime;",Minute);
HTM_SELECT_End (); HTM_SELECT_End ();
HTM_TD_End ();
/***** Second *****/ /* Second */
if (FormSeconds == Dat_FORM_SECONDS_ON) if (FormSeconds == Dat_FORM_SECONDS_ON)
{ {
HTM_TD_Begin ("class=\"LM\"");
HTM_SELECT_Begin (SubmitOnChange,FuncDayHMS, HTM_SELECT_Begin (SubmitOnChange,FuncDayHMS,
"id=\"%sSecond\" name=\"%sSecond\"" "id=\"%sSecond\" name=\"%sSecond\""
" class=\"INPUT_%s\"", " class=\"INPUT_%s\"",
@ -858,12 +853,9 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
HTM_OPTION_ENABLED, HTM_OPTION_ENABLED,
"%02u &Prime;",Second); "%02u &Prime;",Second);
HTM_SELECT_End (); HTM_SELECT_End ();
HTM_TD_End ();
} }
/***** End table *****/ HTM_DIV_End ();
HTM_TR_End ();
HTM_TABLE_End ();
/***** Free strings for onchange functions *****/ /***** Free strings for onchange functions *****/
free (FuncsYearMonth); free (FuncsYearMonth);

View File

@ -1234,7 +1234,7 @@ void Lay_PutContextualLinkIconText (Act_Action_t NextAction,const char *Anchor,
const char *Text,const char *OnSubmit) const char *Text,const char *OnSubmit)
{ {
/***** Separator *****/ /***** Separator *****/
HTM_Txt (" "); // This space is necessary to enable HTM_SP (); // This space is necessary to enable
// jumping to the next line on narrow screens // jumping to the next line on narrow screens
/***** Begin form *****/ /***** Begin form *****/
@ -1258,7 +1258,7 @@ void Lay_PutContextualLinkIconText (Act_Action_t NextAction,const char *Anchor,
Frm_EndForm (); Frm_EndForm ();
/***** Separator *****/ /***** Separator *****/
HTM_Txt (" "); // This space is necessary to enable HTM_SP (); // This space is necessary to enable
// jumping to the next line on narrow screens // jumping to the next line on narrow screens
} }
@ -1274,7 +1274,7 @@ void Lay_PutContextualCheckbox (Act_Action_t NextAction,
{ {
/***** Separator *****/ /***** Separator *****/
if (Text) if (Text)
HTM_Txt (" "); // This space is necessary to enable HTM_SP (); // This space is necessary to enable
// jumping to the next line on narrow screens // jumping to the next line on narrow screens
/***** Begin form *****/ /***** Begin form *****/
@ -1316,7 +1316,7 @@ void Lay_PutContextualCheckbox (Act_Action_t NextAction,
/***** Separator *****/ /***** Separator *****/
if (Text) if (Text)
HTM_Txt (" "); // This space is necessary to enable HTM_SP (); // This space is necessary to enable
// jumping to the next line on narrow screens // jumping to the next line on narrow screens
} }

View File

@ -528,7 +528,7 @@ static void Prj_ShowPrjsInCurrentPage (void *Projects)
((struct Prj_Projects *) Projects)->CurrentPage = (unsigned) Pagination.CurrentPage; ((struct Prj_Projects *) Projects)->CurrentPage = (unsigned) Pagination.CurrentPage;
/***** Begin box *****/ /***** Begin box *****/
Box_BoxBegin ("100%",Txt_Projects, Box_BoxBegin (NULL,Txt_Projects,
Prj_PutIconsListProjects,Projects, Prj_PutIconsListProjects,Projects,
Hlp_ASSESSMENT_Projects,Box_NOT_CLOSABLE); Hlp_ASSESSMENT_Projects,Box_NOT_CLOSABLE);

View File

@ -198,11 +198,11 @@ void Qst_ShowFormRequestEditQsts (struct Qst_Questions *Questions)
/***** Warning message *****/ /***** Warning message *****/
Ale_ShowAlert (Ale_INFO,Txt_No_questions); Ale_ShowAlert (Ale_INFO,Txt_No_questions);
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);
/***** End box *****/ /***** End box *****/
Box_BoxEnd (); Box_BoxEnd ();
/* Free structure that stores the query result */
DB_FreeMySQLResult (&mysql_res);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -225,7 +225,7 @@ void Qst_ShowFormAnswerTypes (const struct Qst_AnswerTypes *AnswerTypes)
HTM_TD_TxtColon (Txt_Types_of_answers); HTM_TD_TxtColon (Txt_Types_of_answers);
/***** Select all types of answers *****/ /***** Select all types of answers *****/
HTM_TD_Begin ("class=\"LT\""); HTM_TD_Begin ("class=\"REC_C2_BOT LT\"");
HTM_TABLE_BeginPadding (2); HTM_TABLE_BeginPadding (2);
HTM_TR_Begin (NULL); HTM_TR_Begin (NULL);

View File

@ -387,7 +387,7 @@ static void Sta_PutFormCrsHits (struct Sta_Stats *Stats)
HTM_LABEL_End (); HTM_LABEL_End ();
/* Separator */ /* Separator */
HTM_Txt (" "); HTM_SP ();
/* Number of rows per page */ /* Number of rows per page */
// To use getElementById in Firefox, it's necessary to have the id attribute // To use getElementById in Firefox, it's necessary to have the id attribute

View File

@ -297,7 +297,7 @@ void Tag_ShowFormSelTags (const struct Tag_Tags *Tags,
HTM_TD_TxtColon (Txt_Tags); HTM_TD_TxtColon (Txt_Tags);
/***** Select all tags *****/ /***** Select all tags *****/
HTM_TD_Begin ("class=\"LT\""); HTM_TD_Begin ("class=\"REC_C2_BOT LT\"");
HTM_TABLE_BeginPadding (2); HTM_TABLE_BeginPadding (2);
@ -306,7 +306,7 @@ void Tag_ShowFormSelTags (const struct Tag_Tags *Tags,
if (!ShowOnlyEnabledTags) if (!ShowOnlyEnabledTags)
HTM_TD_Empty (1); HTM_TD_Empty (1);
HTM_TD_Begin ("class=\"LM\""); HTM_TD_Begin ("class=\"LT\"");
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"", HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",
The_GetSuffix ()); The_GetSuffix ());
HTM_INPUT_CHECKBOX ("AllTags",HTM_DONT_SUBMIT_ON_CHANGE, HTM_INPUT_CHECKBOX ("AllTags",HTM_DONT_SUBMIT_ON_CHANGE,
@ -330,7 +330,7 @@ void Tag_ShowFormSelTags (const struct Tag_Tags *Tags,
if (!ShowOnlyEnabledTags) if (!ShowOnlyEnabledTags)
{ {
TagHidden = (row[2][0] == 'Y'); TagHidden = (row[2][0] == 'Y');
HTM_TD_Begin ("class=\"LM\""); HTM_TD_Begin ("class=\"LT\"");
if (TagHidden) if (TagHidden)
Ico_PutIconOff ("eye-slash.svg",Ico_RED ,Txt_Tag_not_allowed); Ico_PutIconOff ("eye-slash.svg",Ico_RED ,Txt_Tag_not_allowed);
else else
@ -353,7 +353,7 @@ void Tag_ShowFormSelTags (const struct Tag_Tags *Tags,
} }
} }
HTM_TD_Begin ("class=\"LM\""); HTM_TD_Begin ("class=\"LT\"");
HTM_LABEL_Begin ("class=\"DAT_%s\"", HTM_LABEL_Begin ("class=\"DAT_%s\"",
The_GetSuffix ()); The_GetSuffix ());
HTM_INPUT_CHECKBOX ("ChkTag",HTM_DONT_SUBMIT_ON_CHANGE, HTM_INPUT_CHECKBOX ("ChkTag",HTM_DONT_SUBMIT_ON_CHANGE,