Version19.58

This commit is contained in:
Antonio Cañas Vargas 2019-11-09 20:15:38 +01:00
parent 837a8a4dcd
commit b215723389
4 changed files with 45 additions and 25 deletions

View File

@ -69,6 +69,7 @@ static unsigned HTM_DD_NestingLevel = 0;
static unsigned HTM_A_NestingLevel = 0;
static unsigned HTM_SCRIPT_NestingLevel = 0;
static unsigned HTM_LABEL_NestingLevel = 0;
static unsigned HTM_BUTTON_NestingLevel = 0;
static unsigned HTM_TEXTAREA_NestingLevel = 0;
static unsigned HTM_SELECT_NestingLevel = 0;
@ -1215,6 +1216,27 @@ void HTM_INPUT_CHECKBOX (const char *Name,bool SubmitOnChange,
fprintf (Gbl.F.Out," />");
}
/*****************************************************************************/
/********************************** Buttons **********************************/
/*****************************************************************************/
void HTM_BUTTON_Begin (const char *Class)
{
fprintf (Gbl.F.Out,"<button type=\"submit\" class=\"%s\">",Class);
HTM_BUTTON_NestingLevel++;
}
void HTM_BUTTON_End (void)
{
if (HTM_BUTTON_NestingLevel == 0) // No BUTTON open
Ale_ShowAlert (Ale_ERROR,"Trying to close unopened BUTTON.");
fprintf (Gbl.F.Out,"</button>");
HTM_BUTTON_NestingLevel--;
}
/*****************************************************************************/
/********************************* Text areas ********************************/
/*****************************************************************************/

View File

@ -127,6 +127,9 @@ 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);
void HTM_BUTTON_End (void);
void HTM_TEXTAREA_Begin (const char *fmt,...);
void HTM_TEXTAREA_End (void);

View File

@ -100,53 +100,47 @@ void Btn_PutButtonInline (Btn_Button_t Button,const char *TxtButton)
void Btn_PutCreateButton (const char *TxtButton)
{
HTM_DIV_Begin ("class=\"CM\"");
fprintf (Gbl.F.Out,"<button type=\"submit\" class=\"BT_SUBMIT BT_CREATE\">"
"%s"
"</button>",
TxtButton);
HTM_BUTTON_Begin ("BT_SUBMIT BT_CREATE");
fprintf (Gbl.F.Out,"%s",TxtButton);
HTM_BUTTON_End ();
HTM_DIV_End ();
}
void Btn_PutCreateButtonInline (const char *TxtButton)
{
fprintf (Gbl.F.Out,"<button type=\"submit\" class=\"BT_SUBMIT_INLINE BT_CREATE\">"
"%s"
"</button>",
TxtButton);
HTM_BUTTON_Begin ("BT_SUBMIT_INLINE BT_CREATE");
fprintf (Gbl.F.Out,"%s",TxtButton);
HTM_BUTTON_End ();
}
void Btn_PutConfirmButton (const char *TxtButton)
{
HTM_DIV_Begin ("class=\"CM\"");
fprintf (Gbl.F.Out,"<button type=\"submit\" class=\"BT_SUBMIT BT_CONFIRM\">"
"%s"
"</button>",
TxtButton);
HTM_BUTTON_Begin ("BT_SUBMIT BT_CONFIRM");
fprintf (Gbl.F.Out,"%s",TxtButton);
HTM_BUTTON_End ();
HTM_DIV_End ();
}
void Btn_PutConfirmButtonInline (const char *TxtButton)
{
fprintf (Gbl.F.Out,"<button type=\"submit\" class=\"BT_SUBMIT_INLINE BT_CONFIRM\">"
"%s"
"</button>",
TxtButton);
HTM_BUTTON_Begin ("BT_SUBMIT_INLINE BT_CONFIRM");
fprintf (Gbl.F.Out,"%s",TxtButton);
HTM_BUTTON_End ();
}
void Btn_PutRemoveButton (const char *TxtButton)
{
HTM_DIV_Begin ("class=\"CM\"");
fprintf (Gbl.F.Out,"<button type=\"submit\" class=\"BT_SUBMIT BT_REMOVE\">"
"%s"
"</button>",
TxtButton);
HTM_BUTTON_Begin ("BT_SUBMIT BT_REMOVE");
fprintf (Gbl.F.Out,"%s",TxtButton);
HTM_BUTTON_End ();
HTM_DIV_End ();
}
void Btn_PutRemoveButtonInline (const char *TxtButton)
{
fprintf (Gbl.F.Out,"<button type=\"submit\" class=\"BT_SUBMIT_INLINE BT_REMOVE\">"
"%s"
"</button>",
TxtButton);
HTM_BUTTON_Begin ("BT_SUBMIT_INLINE BT_REMOVE");
fprintf (Gbl.F.Out,"%s",TxtButton);
HTM_BUTTON_End ();
}

View File

@ -487,7 +487,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
#define Log_PLATFORM_VERSION "SWAD 19.57 (2019-11-09)"
#define Log_PLATFORM_VERSION "SWAD 19.58 (2019-11-09)"
#define CSS_FILE "swad19.47.css"
#define JS_FILE "swad19.39.js"
/*
@ -495,6 +495,7 @@ ps2pdf source.ps destination.pdf
// TODO: Impedir la creación y edición de proyectos si no son editables.
// TODO: Importante: filtrar proyectos por usuarios (igual que en trabajos o en asistencia)
Version 19.58: Nov 09, 2019 Code refactoring in HTML definition lists. (246169 lines)
Version 19.57: Nov 09, 2019 Code refactoring in HTML definition lists. (246156 lines)
Version 19.56: Nov 08, 2019 Fixed bug in groups.
New constants for sizes of numerical strings. (246104 lines)