mirror of https://github.com/acanas/swad-core.git
Version19.70.1
This commit is contained in:
parent
d1dfae9cde
commit
5ff2e98856
25
swad_HTML.c
25
swad_HTML.c
|
@ -1292,14 +1292,27 @@ void HTM_INPUT_CHECKBOX (const char *Name,bool SubmitOnChange,
|
|||
/********************************** Buttons **********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void HTM_BUTTON_Begin (const char *Class,bool SubmitOnMouseDown)
|
||||
void HTM_BUTTON_OnMouseDown_Begin (const char *Class)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<button type=\"submit\" class=\"%s\"",Class);
|
||||
|
||||
if (SubmitOnMouseDown)
|
||||
fprintf (Gbl.F.Out," onmousedown=\"document.getElementById('%s').submit();return false;\"",
|
||||
Gbl.Form.Id);
|
||||
fprintf (Gbl.F.Out,"<button type=\"submit\" class=\"%s\""
|
||||
" onmousedown=\"document.getElementById('%s').submit();return false;\" />",
|
||||
Class,Gbl.Form.Id);
|
||||
HTM_BUTTON_NestingLevel++;
|
||||
}
|
||||
|
||||
void HTM_BUTTON_Begin (const char *Title,const char *Class,const char *OnSubmit)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<button type=\"submit\"");
|
||||
if (Title)
|
||||
if (Title[0])
|
||||
HTM_TxtF (" title=\"%s\"",Title);
|
||||
if (Class)
|
||||
if (Class[0])
|
||||
HTM_TxtF (" class=\"%s\"",Class);
|
||||
if (OnSubmit) // JavaScript function to be called
|
||||
// before submitting the form
|
||||
if (OnSubmit[0])
|
||||
HTM_TxtF ("onsubmit=\"%s;\"",OnSubmit);
|
||||
fprintf (Gbl.F.Out," />");
|
||||
|
||||
HTM_BUTTON_NestingLevel++;
|
||||
|
|
|
@ -134,7 +134,8 @@ void HTM_INPUT_RADIO (const char *Name,bool SubmitOnClick,
|
|||
void HTM_INPUT_CHECKBOX (const char *Name,bool SubmitOnChange,
|
||||
const char *fmt,...);
|
||||
|
||||
void HTM_BUTTON_Begin (const char *Class,bool SubmitOnMouseDown);
|
||||
void HTM_BUTTON_OnMouseDown_Begin (const char *Class);
|
||||
void HTM_BUTTON_Begin (const char *Title,const char *Class,const char *OnSubmit);
|
||||
void HTM_BUTTON_End (void);
|
||||
|
||||
void HTM_TEXTAREA_Begin (const char *fmt,...);
|
||||
|
|
|
@ -200,6 +200,7 @@ static void Agd_ShowFormToSelPast__FutureEvents (void)
|
|||
Agd_PutParamsMyAgenda (Gbl.Agenda.Past__FutureEvents ^ (1 << PstFut), // Toggle
|
||||
Gbl.Agenda.PrivatPublicEvents,
|
||||
Gbl.Agenda.HiddenVisiblEvents,
|
||||
Gbl.Agenda.SelectedOrder,
|
||||
Gbl.Agenda.CurrentPage,
|
||||
-1L);
|
||||
Ico_PutSettingIconLink (Icon[PstFut],
|
||||
|
@ -236,6 +237,7 @@ static void Agd_ShowFormToSelPrivatPublicEvents (void)
|
|||
Agd_PutParamsMyAgenda (Gbl.Agenda.Past__FutureEvents,
|
||||
Gbl.Agenda.PrivatPublicEvents ^ (1 << PrvPub), // Toggle
|
||||
Gbl.Agenda.HiddenVisiblEvents,
|
||||
Gbl.Agenda.SelectedOrder,
|
||||
Gbl.Agenda.CurrentPage,
|
||||
-1L);
|
||||
Ico_PutSettingIconLink (Icon[PrvPub],
|
||||
|
@ -272,6 +274,7 @@ static void Agd_ShowFormToSelHiddenVisiblEvents (void)
|
|||
Agd_PutParamsMyAgenda (Gbl.Agenda.Past__FutureEvents,
|
||||
Gbl.Agenda.PrivatPublicEvents,
|
||||
Gbl.Agenda.HiddenVisiblEvents ^ (1 << HidVis), // Toggle
|
||||
Gbl.Agenda.SelectedOrder,
|
||||
Gbl.Agenda.CurrentPage,
|
||||
-1L);
|
||||
Ico_PutSettingIconLink (Icon[HidVis],
|
||||
|
@ -587,15 +590,20 @@ static void Agd_WriteHeaderListEvents (Agd_AgendaType_t AgendaType)
|
|||
Pag_PutHiddenParamPagNum (Pag_ANOTHER_AGENDA,Gbl.Agenda.CurrentPage);
|
||||
break;
|
||||
}
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Agd_PutParamsMyAgenda (Gbl.Agenda.Past__FutureEvents,
|
||||
Gbl.Agenda.PrivatPublicEvents,
|
||||
Gbl.Agenda.HiddenVisiblEvents,
|
||||
Order,
|
||||
Gbl.Agenda.CurrentPage,
|
||||
-1L);
|
||||
|
||||
Frm_LinkFormSubmit (Txt_START_END_TIME_HELP[Order],"TIT_TBL",NULL);
|
||||
HTM_BUTTON_Begin (Txt_START_END_TIME_HELP[Order],"BT_LINK TIT_TBL",NULL);
|
||||
if (Order == Gbl.Agenda.SelectedOrder)
|
||||
HTM_U_Begin ();
|
||||
HTM_Txt (Txt_START_END_TIME[Order]);
|
||||
if (Order == Gbl.Agenda.SelectedOrder)
|
||||
HTM_U_End ();
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
|
||||
Frm_EndForm ();
|
||||
HTM_TH_End ();
|
||||
|
@ -699,6 +707,7 @@ static void Agd_PutButtonToCreateNewEvent (void)
|
|||
Agd_PutParamsMyAgenda (Gbl.Agenda.Past__FutureEvents,
|
||||
Gbl.Agenda.PrivatPublicEvents,
|
||||
Gbl.Agenda.HiddenVisiblEvents,
|
||||
Gbl.Agenda.SelectedOrder,
|
||||
Gbl.Agenda.CurrentPage,
|
||||
-1L);
|
||||
Btn_PutConfirmButton (Txt_New_event);
|
||||
|
@ -864,6 +873,7 @@ static void Agd_PutCurrentParamsMyAgenda (void)
|
|||
Agd_PutParamsMyAgenda (Gbl.Agenda.Past__FutureEvents,
|
||||
Gbl.Agenda.PrivatPublicEvents,
|
||||
Gbl.Agenda.HiddenVisiblEvents,
|
||||
Gbl.Agenda.SelectedOrder,
|
||||
Gbl.Agenda.CurrentPage,
|
||||
Gbl.Agenda.AgdCodToEdit);
|
||||
}
|
||||
|
@ -875,6 +885,7 @@ static void Agd_PutCurrentParamsMyAgenda (void)
|
|||
void Agd_PutParamsMyAgenda (unsigned Past__FutureEvents,
|
||||
unsigned PrivatPublicEvents,
|
||||
unsigned HiddenVisiblEvents,
|
||||
Agd_Order_t Order,
|
||||
unsigned NumPage,
|
||||
long AgdCodToEdit)
|
||||
{
|
||||
|
@ -890,8 +901,8 @@ void Agd_PutParamsMyAgenda (unsigned Past__FutureEvents,
|
|||
Agd_DEFAULT_VISIBL_EVENTS))
|
||||
Agd_PutHiddenParamHiddenVisiblEvents (HiddenVisiblEvents);
|
||||
|
||||
if (Gbl.Agenda.SelectedOrder != Agd_ORDER_DEFAULT)
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Gbl.Agenda.SelectedOrder);
|
||||
if (Order != Agd_ORDER_DEFAULT)
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
|
||||
if (NumPage > 1)
|
||||
Pag_PutHiddenParamPagNum (Pag_MY_AGENDA,NumPage);
|
||||
|
|
|
@ -107,6 +107,7 @@ void Agd_RequestCreatOrEditEvent (void);
|
|||
void Agd_PutParamsMyAgenda (unsigned Past__FutureEvents,
|
||||
unsigned PrivatPublicEvents,
|
||||
unsigned HiddenVisiblEvents,
|
||||
Agd_Order_t Order,
|
||||
unsigned NumPage,
|
||||
long AgdCodToEdit);
|
||||
void Agd_PutHiddenParamEventsOrder (void);
|
||||
|
|
|
@ -100,7 +100,7 @@ void Btn_PutButtonInline (Btn_Button_t Button,const char *TxtButton)
|
|||
void Btn_PutCreateButton (const char *TxtButton)
|
||||
{
|
||||
HTM_DIV_Begin ("class=\"CM\"");
|
||||
HTM_BUTTON_Begin ("BT_SUBMIT BT_CREATE",false);
|
||||
HTM_BUTTON_Begin (NULL,"BT_SUBMIT BT_CREATE",NULL);
|
||||
HTM_Txt (TxtButton);
|
||||
HTM_BUTTON_End ();
|
||||
HTM_DIV_End ();
|
||||
|
@ -108,7 +108,7 @@ void Btn_PutCreateButton (const char *TxtButton)
|
|||
|
||||
void Btn_PutCreateButtonInline (const char *TxtButton)
|
||||
{
|
||||
HTM_BUTTON_Begin ("BT_SUBMIT_INLINE BT_CREATE",false);
|
||||
HTM_BUTTON_Begin (NULL,"BT_SUBMIT_INLINE BT_CREATE",NULL);
|
||||
HTM_Txt (TxtButton);
|
||||
HTM_BUTTON_End ();
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ void Btn_PutCreateButtonInline (const char *TxtButton)
|
|||
void Btn_PutConfirmButton (const char *TxtButton)
|
||||
{
|
||||
HTM_DIV_Begin ("class=\"CM\"");
|
||||
HTM_BUTTON_Begin ("BT_SUBMIT BT_CONFIRM",false);
|
||||
HTM_BUTTON_Begin (NULL,"BT_SUBMIT BT_CONFIRM",NULL);
|
||||
HTM_Txt (TxtButton);
|
||||
HTM_BUTTON_End ();
|
||||
HTM_DIV_End ();
|
||||
|
@ -124,7 +124,7 @@ void Btn_PutConfirmButton (const char *TxtButton)
|
|||
|
||||
void Btn_PutConfirmButtonInline (const char *TxtButton)
|
||||
{
|
||||
HTM_BUTTON_Begin ("BT_SUBMIT_INLINE BT_CONFIRM",false);
|
||||
HTM_BUTTON_Begin (NULL,"BT_SUBMIT_INLINE BT_CONFIRM",NULL);
|
||||
HTM_Txt (TxtButton);
|
||||
HTM_BUTTON_End ();
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ void Btn_PutConfirmButtonInline (const char *TxtButton)
|
|||
void Btn_PutRemoveButton (const char *TxtButton)
|
||||
{
|
||||
HTM_DIV_Begin ("class=\"CM\"");
|
||||
HTM_BUTTON_Begin ("BT_SUBMIT BT_REMOVE",false);
|
||||
HTM_BUTTON_Begin (NULL,"BT_SUBMIT BT_REMOVE",NULL);
|
||||
HTM_Txt (TxtButton);
|
||||
HTM_BUTTON_End ();
|
||||
HTM_DIV_End ();
|
||||
|
@ -140,7 +140,7 @@ void Btn_PutRemoveButton (const char *TxtButton)
|
|||
|
||||
void Btn_PutRemoveButtonInline (const char *TxtButton)
|
||||
{
|
||||
HTM_BUTTON_Begin ("BT_SUBMIT_INLINE BT_REMOVE",false);
|
||||
HTM_BUTTON_Begin (NULL,"BT_SUBMIT_INLINE BT_REMOVE",NULL);
|
||||
HTM_Txt (TxtButton);
|
||||
HTM_BUTTON_End ();
|
||||
}
|
||||
|
|
|
@ -488,14 +488,15 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
|||
En OpenSWAD:
|
||||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.70 (2019-11-17)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.70.1 (2019-11-17)"
|
||||
#define CSS_FILE "swad19.70.css"
|
||||
#define JS_FILE "swad19.70.js"
|
||||
/*
|
||||
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
|
||||
// TODO: Impedir la creación y edición de proyectos si no son editables.
|
||||
// TODO: Fix bug: cuando se envía una nueva publicación al timeline, si se baja al final y se pulsa en Mostrar más", se repiten los mensajes.
|
||||
|
||||
Version 19.70.1: Nov 17, 2019 Converting links to send forms to buttons.
|
||||
Fixed bug in agenda. (247061 lines)
|
||||
Version 19.70: Nov 17, 2019 Hidden comments in timeline are loaded on request using AJAX. (247028 lines)
|
||||
1 change necessary in database:
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1806','es','N','Ver comentarios ocultos (global)');
|
||||
|
|
|
@ -2596,7 +2596,7 @@ static void Mch_ShowQuestionAndAnswersStd (struct Match *Match)
|
|||
if (asprintf (&Class,"MCH_STD_BUTTON BT_%c",'A' + (char) NumOpt) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
}
|
||||
HTM_BUTTON_Begin (Class,true);
|
||||
HTM_BUTTON_OnMouseDown_Begin (Class);
|
||||
HTM_TxtF ("%c",'a' + (char) NumOpt);
|
||||
HTM_BUTTON_End ();
|
||||
free (Class);
|
||||
|
|
|
@ -2049,19 +2049,18 @@ void Ntf_WriteNumberOfNewNtfs (void)
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_StartFormId (ActSeeNewNtf,"form_ntf");
|
||||
Frm_LinkFormSubmitId (Txt_See_notifications,
|
||||
The_ClassNotif[Gbl.Prefs.Theme],"form_ntf",NULL);
|
||||
HTM_BUTTON_Begin (Txt_See_notifications,The_ClassNotif[Gbl.Prefs.Theme],NULL);
|
||||
|
||||
/***** Number of unseen notifications *****/
|
||||
HTM_SPAN_Begin ("id=\"notif_all\"");
|
||||
HTM_TxtF ("%u %s",NumUnseenNtfs,NumUnseenNtfs == 1 ? Txt_notification :
|
||||
Txt_notifications);
|
||||
HTM_BR ();
|
||||
HTM_SPAN_End ();
|
||||
|
||||
/***** Icon and number of new notifications *****/
|
||||
if (NumNewNtfs)
|
||||
{
|
||||
HTM_BR ();
|
||||
HTM_IMG (Gbl.Prefs.URLTheme,"bell.svg",Txt_Notifications,
|
||||
"class=\"ICO16x16\"");
|
||||
HTM_TxtF (" %u",NumNewNtfs);
|
||||
|
@ -2072,7 +2071,7 @@ void Ntf_WriteNumberOfNewNtfs (void)
|
|||
}
|
||||
|
||||
/***** End form *****/
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
||||
|
|
|
@ -226,6 +226,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
Agd_PutParamsMyAgenda (Gbl.Agenda.Past__FutureEvents,
|
||||
Gbl.Agenda.PrivatPublicEvents,
|
||||
Gbl.Agenda.HiddenVisiblEvents,
|
||||
Gbl.Agenda.SelectedOrder,
|
||||
1,
|
||||
-1L);
|
||||
break;
|
||||
|
@ -337,6 +338,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
Agd_PutParamsMyAgenda (Gbl.Agenda.Past__FutureEvents,
|
||||
Gbl.Agenda.PrivatPublicEvents,
|
||||
Gbl.Agenda.HiddenVisiblEvents,
|
||||
Gbl.Agenda.SelectedOrder,
|
||||
1,
|
||||
-1L);
|
||||
break;
|
||||
|
@ -436,6 +438,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
Agd_PutParamsMyAgenda (Gbl.Agenda.Past__FutureEvents,
|
||||
Gbl.Agenda.PrivatPublicEvents,
|
||||
Gbl.Agenda.HiddenVisiblEvents,
|
||||
Gbl.Agenda.SelectedOrder,
|
||||
Pagination->LeftPage,
|
||||
-1L);
|
||||
break;
|
||||
|
@ -548,6 +551,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
Agd_PutParamsMyAgenda (Gbl.Agenda.Past__FutureEvents,
|
||||
Gbl.Agenda.PrivatPublicEvents,
|
||||
Gbl.Agenda.HiddenVisiblEvents,
|
||||
Gbl.Agenda.SelectedOrder,
|
||||
NumPage,
|
||||
-1L);
|
||||
break;
|
||||
|
@ -645,6 +649,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
Agd_PutParamsMyAgenda (Gbl.Agenda.Past__FutureEvents,
|
||||
Gbl.Agenda.PrivatPublicEvents,
|
||||
Gbl.Agenda.HiddenVisiblEvents,
|
||||
Gbl.Agenda.SelectedOrder,
|
||||
Pagination->RightPage,
|
||||
-1L);
|
||||
break;
|
||||
|
@ -743,6 +748,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
Agd_PutParamsMyAgenda (Gbl.Agenda.Past__FutureEvents,
|
||||
Gbl.Agenda.PrivatPublicEvents,
|
||||
Gbl.Agenda.HiddenVisiblEvents,
|
||||
Gbl.Agenda.SelectedOrder,
|
||||
Pagination->NumPags,
|
||||
-1L);
|
||||
break;
|
||||
|
|
12
swad_theme.c
12
swad_theme.c
|
@ -102,12 +102,12 @@ const char *The_ClassTagline[The_NUM_THEMES] =
|
|||
|
||||
const char *The_ClassNotif[The_NUM_THEMES] =
|
||||
{
|
||||
"NOTIF_WHITE",
|
||||
"NOTIF_GREY",
|
||||
"NOTIF_PURPLE",
|
||||
"NOTIF_BLUE",
|
||||
"NOTIF_YELLOW",
|
||||
"NOTIF_PINK",
|
||||
"BT_LINK NOTIF_WHITE",
|
||||
"BT_LINK NOTIF_GREY",
|
||||
"BT_LINK NOTIF_PURPLE",
|
||||
"BT_LINK NOTIF_BLUE",
|
||||
"BT_LINK NOTIF_YELLOW",
|
||||
"BT_LINK NOTIF_PINK",
|
||||
};
|
||||
|
||||
const char *The_ClassUsr[The_NUM_THEMES] =
|
||||
|
|
|
@ -2400,7 +2400,7 @@ static void TL_PutTextarea (const char *Placeholder,const char *ClassTextArea)
|
|||
Med_PutMediaUploader (-1,"TL_MED_INPUT_WIDTH");
|
||||
|
||||
/***** Submit button *****/
|
||||
HTM_BUTTON_Begin ("BT_SUBMIT_INLINE BT_CREATE",false);
|
||||
HTM_BUTTON_Begin (NULL,"BT_SUBMIT_INLINE BT_CREATE",NULL);
|
||||
HTM_Txt (Txt_Post);
|
||||
HTM_BUTTON_End ();
|
||||
|
||||
|
@ -2765,7 +2765,7 @@ static void TL_FormToShowHiddenComments (Act_Action_t ActionGbl,Act_Action_t Act
|
|||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||
Txt_See_the_previous_X_COMMENTS,
|
||||
NumInitialComments);
|
||||
HTM_BUTTON_Begin (The_ClassFormLink[Gbl.Prefs.Theme],false);
|
||||
HTM_BUTTON_Begin (NULL,The_ClassFormLink[Gbl.Prefs.Theme],NULL);
|
||||
Ico_PutIconTextLink ("angle-up.svg",Gbl.Title);
|
||||
HTM_BUTTON_End ();
|
||||
|
||||
|
|
Loading…
Reference in New Issue