Version19.95.1

This commit is contained in:
Antonio Cañas Vargas 2019-12-18 14:51:53 +01:00
parent c6a3d98704
commit c1ba956fcc
2 changed files with 15 additions and 5 deletions

View File

@ -321,7 +321,8 @@ static void Ctr_Configuration (bool PrintView)
Ctr_ConfigTitle (PutLink); Ctr_ConfigTitle (PutLink);
/***** Centre map *****/ /***** Centre map *****/
Ctr_ConfigMap (); if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
Ctr_ConfigMap ();
/***** Centre photo *****/ /***** Centre photo *****/
Ctr_ConfigPhoto (PrintView,PutLink); Ctr_ConfigPhoto (PrintView,PutLink);
@ -447,6 +448,7 @@ static void Ctr_ConfigTitle (bool PutLink)
static void Ctr_ConfigMap (void) static void Ctr_ConfigMap (void)
{ {
/* https://leafletjs.com/examples/quick-start/ */
/***** Leaflet CSS *****/ /***** Leaflet CSS *****/
HTM_Txt ("<link rel=\"stylesheet\"" HTM_Txt ("<link rel=\"stylesheet\""
" href=\"https://unpkg.com/leaflet@1.6.0/dist/leaflet.css\"" " href=\"https://unpkg.com/leaflet@1.6.0/dist/leaflet.css\""
@ -468,7 +470,7 @@ static void Ctr_ConfigMap (void)
HTM_SCRIPT_Begin (NULL,NULL); HTM_SCRIPT_Begin (NULL,NULL);
/* Let's create a map of the center of London with pretty Mapbox Streets tiles */ /* Let's create a map of the center of London with pretty Mapbox Streets tiles */
HTM_Txt ("\tvar mymap = L.map('centre_mapid').setView([37.19704, -3.62451], 18);"); HTM_Txt ("\tvar mymap = L.map('centre_mapid').setView([37.19704, -3.62451], 16);\n");
/* Next we'll add a tile layer to add to our map, /* Next we'll add a tile layer to add to our map,
in this case it's a Mapbox Streets tile layer. in this case it's a Mapbox Streets tile layer.
@ -479,12 +481,19 @@ static void Ctr_ConfigMap (void)
from Mapbox's Static Tiles API from Mapbox's Static Tiles API
(in order to use tiles from Mapbox, (in order to use tiles from Mapbox,
you must also request an access token).*/ you must also request an access token).*/
HTM_Txt ("L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', {" HTM_Txt ("\tL.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', {"
"attribution: 'Map data &copy; <a href=\"https://www.openstreetmap.org/\">OpenStreetMap</a> contributors, <a href=\"https://creativecommons.org/licenses/by-sa/2.0/\">CC-BY-SA</a>, Imagery &copy; <a href=\"https://www.mapbox.com/\">Mapbox</a>'," "attribution: 'Map data &copy; <a href=\"https://www.openstreetmap.org/\">OpenStreetMap</a> contributors, <a href=\"https://creativecommons.org/licenses/by-sa/2.0/\">CC-BY-SA</a>, Imagery &copy; <a href=\"https://www.mapbox.com/\">Mapbox</a>',"
"maxZoom: 20," "maxZoom: 20,"
"id: 'mapbox/streets-v11'," "id: 'mapbox/streets-v11',"
"accessToken: 'pk.eyJ1IjoiYWNhbmFzIiwiYSI6ImNrNGFoNXFxOTAzdHozcnA4d3Y0M3BwOGkifQ.uSg754Lv2iZEJg0W2pjiOQ'" "accessToken: 'pk.eyJ1IjoiYWNhbmFzIiwiYSI6ImNrNGFoNXFxOTAzdHozcnA4d3Y0M3BwOGkifQ.uSg754Lv2iZEJg0W2pjiOQ'"
"}).addTo(mymap);"); "}).addTo(mymap);\n");
/* Marker */
HTM_Txt ("\tvar marker = L.marker([37.19704, -3.62451]).addTo(mymap);");
HTM_TxtF ("\tmarker.bindPopup(\"<strong>%s</strong><br />%s\").openPopup();",
Gbl.Hierarchy.Ctr.ShrtName,
Gbl.Hierarchy.Ins.ShrtName);
HTM_SCRIPT_End (); HTM_SCRIPT_End ();
} }

View File

@ -490,13 +490,14 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD: En OpenSWAD:
ps2pdf source.ps destination.pdf ps2pdf source.ps destination.pdf
*/ */
#define Log_PLATFORM_VERSION "SWAD 19.95 (2019-12-17)" #define Log_PLATFORM_VERSION "SWAD 19.95.1 (2019-12-18)"
#define CSS_FILE "swad19.95.css" #define CSS_FILE "swad19.95.css"
#define JS_FILE "swad19.91.1.js" #define JS_FILE "swad19.91.1.js"
/* /*
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.) // 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: Impedir la creación y edición de proyectos si no son editables.
Version 19.95.1: Dec 18, 2019 Map marker in centre information. (249331 lines)
Version 19.95: Dec 17, 2019 Trying Leaflet (open-source JavaScript library for mobile-friendly interactive maps). (249323 lines) Version 19.95: Dec 17, 2019 Trying Leaflet (open-source JavaScript library for mobile-friendly interactive maps). (249323 lines)
Version 19.94.3: Dec 17, 2019 Code refactoring in centre information. (249282 lines) Version 19.94.3: Dec 17, 2019 Code refactoring in centre information. (249282 lines)
Version 19.94.2: Dec 17, 2019 Code refactoring in centre information. (249178 lines) Version 19.94.2: Dec 17, 2019 Code refactoring in centre information. (249178 lines)