diff --git a/swad_centre_config.c b/swad_centre_config.c
index acadbe0d..ecc5c54b 100644
--- a/swad_centre_config.c
+++ b/swad_centre_config.c
@@ -357,7 +357,8 @@ static void CtrCfg_Map (void)
Map_AddMarker (&Gbl.Hierarchy.Ctr.Coord);
/* Add popup */
- Map_AddPopup (Gbl.Hierarchy.Ctr.ShrtName,Gbl.Hierarchy.Ins.ShrtName);
+ Map_AddPopup (Gbl.Hierarchy.Ctr.ShrtName,Gbl.Hierarchy.Ins.ShrtName,
+ true); // Open
HTM_SCRIPT_End ();
}
diff --git a/swad_changelog.h b/swad_changelog.h
index d9feac68..db217582 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -492,7 +492,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.111 (2020-01-03)"
+#define Log_PLATFORM_VERSION "SWAD 19.111.1 (2020-01-03)"
#define CSS_FILE "swad19.111.css"
#define JS_FILE "swad19.91.1.js"
/*
@@ -500,8 +500,9 @@ ps2pdf source.ps destination.pdf
// TODO: Impedir la creación y edición de proyectos si no son editables.
// TODO: No se puede entrar con DNI '1' suponiendo que no tenga password ¿por qué?
// TODO: Version 19.1xx: Jan xx, 2020 Map in institution information. (? lines)
-// TODO: Fijar Popups y ampliación de mapa en institución
+// TODO: Fijar ampliación de mapa en institución
+ Version 19.111.1: Jan 03, 2020 Map in institution information. (278215 lines)
Version 19.111: Jan 03, 2020 Map in institution information. (278208 lines)
Version 19.110: Jan 03, 2020 Code refactoring in maps. (278160 lines)
Version 19.109.9: Jan 03, 2020 Removed unused actions. (278046 lines)
diff --git a/swad_institution_config.c b/swad_institution_config.c
index 6e43ce0f..44141705 100644
--- a/swad_institution_config.c
+++ b/swad_institution_config.c
@@ -361,7 +361,8 @@ static void InsCfg_Map (void)
Map_AddMarker (&Ctr.Coord);
/* Add popup */
- Map_AddPopup (Ctr.ShrtName,Gbl.Hierarchy.Ins.ShrtName);
+ Map_AddPopup (Ctr.ShrtName,Gbl.Hierarchy.Ins.ShrtName,
+ false); // Closed
}
/* Free structure that stores the query result */
diff --git a/swad_map.c b/swad_map.c
index cd17f00a..402d783c 100644
--- a/swad_map.c
+++ b/swad_map.c
@@ -147,16 +147,19 @@ void Map_AddMarker (const struct Coordinates *Coord)
}
/*****************************************************************************/
-/************************** Add a marker to our map **************************/
+/************************* Add a marker to our map ***************************/
/*****************************************************************************/
-void Map_AddPopup (const char *Title,const char *Subtitle)
+void Map_AddPopup (const char *Title,const char *Subtitle,bool Open)
{
/* The bindPopup method attaches a popup with the specified HTML content
to your marker so the popup appears when you click on the object,
- and the openPopup method (for markers only) immediately opens the attached popup. */
-
+ and the openPopup method (for markers only)
+ immediately opens the attached popup. */
HTM_TxtF ("\t"
- "marker.bindPopup(\"%s
%s\").openPopup();\n",
+ "marker.bindPopup(\"%s
%s\")",
Title,Subtitle);
+ if (Open)
+ HTM_Txt (".openPopup()");
+ HTM_Txt (";\n");
}
diff --git a/swad_map.h b/swad_map.h
index 2209f1a7..a6f48459 100644
--- a/swad_map.h
+++ b/swad_map.h
@@ -47,6 +47,6 @@ void Map_LeafletScript (void);
void Map_CreateMap (const char *ContainerId,const struct Coordinates *Coord);
void Map_AddTileLayer (void);
void Map_AddMarker (const struct Coordinates *Coord);
-void Map_AddPopup (const char *Title,const char *Subtitle);
+void Map_AddPopup (const char *Title,const char *Subtitle,bool Open);
#endif