diff --git a/swad_HTML.c b/swad_HTML.c
index bd3a4af3..47adfdca 100644
--- a/swad_HTML.c
+++ b/swad_HTML.c
@@ -72,6 +72,7 @@ static unsigned HTM_LABEL_NestingLevel = 0;
static unsigned HTM_BUTTON_NestingLevel = 0;
static unsigned HTM_TEXTAREA_NestingLevel = 0;
static unsigned HTM_SELECT_NestingLevel = 0;
+static unsigned HTM_OPTGROUP_NestingLevel = 0;
/*****************************************************************************/
/***************************** Private prototypes ****************************/
@@ -1378,6 +1379,23 @@ void HTM_SELECT_End (void)
HTM_SELECT_NestingLevel--;
}
+void HTM_OPTGROUP_Begin (const char *Label)
+ {
+ fprintf (Gbl.F.Out,"");
+
+ HTM_OPTGROUP_NestingLevel--;
+ }
+
void HTM_OPTION (HTM_Type_t Type,const void *ValuePtr,bool Selected,bool Disabled,
const char *fmt,...)
{
diff --git a/swad_HTML.h b/swad_HTML.h
index da97c8c1..38bbd419 100644
--- a/swad_HTML.h
+++ b/swad_HTML.h
@@ -139,6 +139,8 @@ void HTM_TEXTAREA_End (void);
void HTM_SELECT_Begin (bool SubmitOnChange,
const char *fmt,...);
void HTM_SELECT_End (void);
+void HTM_OPTGROUP_Begin (const char *Label);
+void HTM_OPTGROUP_End (void);
void HTM_OPTION (HTM_Type_t Type,const void *ValuePtr,bool Selected,bool Disabled,
const char *fmt,...);
diff --git a/swad_changelog.h b/swad_changelog.h
index f96d34d3..4bc267f9 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -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.59 (2019-11-09)"
+#define Log_PLATFORM_VERSION "SWAD 19.60 (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.60: Nov 09, 2019 Code refactoring in HTML options. (246203 lines)
Version 19.59: Nov 09, 2019 Code refactoring in HTML params. (246187 lines)
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)
diff --git a/swad_course.c b/swad_course.c
index 8409c3f2..6f20c66c 100644
--- a/swad_course.c
+++ b/swad_course.c
@@ -1072,8 +1072,8 @@ void Crs_WriteSelectorMyCoursesInBreadcrumb (void)
if (DegCod != LastDegCod)
{
if (LastDegCod > 0)
- fprintf (Gbl.F.Out,"");
- fprintf (Gbl.F.Out,"");
+ HTM_OPTGROUP_End ();
}
/***** Write an option with the current course