Browse Source

Put LeafLet to latest version, fix potential wrong GPS coordinates

master
tr4ck3ur des JM2L 7 years ago
parent
commit
b5aa7e12b0
14 changed files with 15898 additions and 7882 deletions
  1. +46
    -44
      jm2l/forms.py
  2. +1
    -1
      jm2l/static/js/jm2l.js
  3. BIN
      jm2l/static/vendor/leaflet/css/images/layers-2x.png
  4. BIN
      jm2l/static/vendor/leaflet/css/images/layers.png
  5. BIN
      jm2l/static/vendor/leaflet/css/images/marker-icon-2x.png
  6. BIN
      jm2l/static/vendor/leaflet/css/images/marker-icon.png
  7. BIN
      jm2l/static/vendor/leaflet/css/images/marker-shadow.png
  8. +110
    -14
      jm2l/static/vendor/leaflet/css/leaflet-routing-machine.css
  9. +197
    -43
      jm2l/static/vendor/leaflet/css/leaflet.css
  10. +4118
    -782
      jm2l/static/vendor/leaflet/js/leaflet-routing-machine.js
  11. +4
    -4
      jm2l/static/vendor/leaflet/js/leaflet-routing-machine.min.js
  12. +11411
    -6982
      jm2l/static/vendor/leaflet/js/leaflet-src.js
  13. +5
    -9
      jm2l/static/vendor/leaflet/js/leaflet.js
  14. +6
    -3
      jm2l/templates/Logistique/Dialog_Covoit.mako

+ 46
- 44
jm2l/forms.py View File

@@ -1,5 +1,5 @@
# -*- coding: utf8 -*- # -*- coding: utf8 -*-
from wtforms import Form, BooleanField, TextField, TextAreaField, SelectField
from wtforms import Form, BooleanField, StringField, TextAreaField, SelectField
from wtforms import SubmitField, validators, FieldList, PasswordField from wtforms import SubmitField, validators, FieldList, PasswordField
#import .ExtWforms #import .ExtWforms
from .ExtWtforms import MySelectField from .ExtWtforms import MySelectField
@@ -18,7 +18,7 @@ class MyBaseForm(Form):
csrf_time_limit = timedelta(minutes=60) csrf_time_limit = timedelta(minutes=60)


class BlogCreateForm(MyBaseForm): class BlogCreateForm(MyBaseForm):
title = TextField('Entry title', [validators.Length(min=1, max=255)],
title = StringField('Entry title', [validators.Length(min=1, max=255)],
filters=[strip_filter]) filters=[strip_filter])
body = TextAreaField('Entry body', [validators.Length(min=1)], body = TextAreaField('Entry body', [validators.Length(min=1)],
filters=[strip_filter]) filters=[strip_filter])
@@ -50,7 +50,7 @@ ATELIER_DURATION = [ (15,u'Lighting talk ( 5 min)'),




class StaffArea(MyBaseForm): class StaffArea(MyBaseForm):
name = TextField(u'Pôle')
name = StringField(u'Pôle')
description = TextAreaField('Description', [validators.optional(), validators.Length(max=1000000)], description = TextAreaField('Description', [validators.optional(), validators.Length(max=1000000)],
filters=[strip_filter] filters=[strip_filter]
) )
@@ -60,7 +60,7 @@ class EditStaffArea(StaffArea):
uid = HiddenField() uid = HiddenField()


class StaffTasks(MyBaseForm): class StaffTasks(MyBaseForm):
name = TextField(u'Nom de la tâche', [validators.Required()])
name = StringField(u'Nom de la tâche', [validators.Required()])
area_uid = SelectField(u'Pôle concerné', coerce=int ) area_uid = SelectField(u'Pôle concerné', coerce=int )
closed_by = SelectField(u'Assigné à', coerce=int ) closed_by = SelectField(u'Assigné à', coerce=int )
due_date = DateField(u'Date prévue', format='%d/%m/%Y') due_date = DateField(u'Date prévue', format='%d/%m/%Y')
@@ -86,8 +86,8 @@ class TiersMember(MyBaseForm):
csrf = False csrf = False


year_uid = SelectField(u'Année', coerce=int, choices=zip(range(2006,CurrentYear+1),range(2006,CurrentYear+1))) year_uid = SelectField(u'Année', coerce=int, choices=zip(range(2006,CurrentYear+1),range(2006,CurrentYear+1)))
user_uid = TextField(u'user')
role = TextField(u'Role')
user_uid = StringField(u'user')
role = StringField(u'Role')


class TiersRole(MyBaseForm): class TiersRole(MyBaseForm):
class Meta: class Meta:
@@ -102,8 +102,8 @@ class TiersChoice(MyBaseForm):


year_uid = HiddenField() year_uid = HiddenField()
user_uid = HiddenField() user_uid = HiddenField()
tiers_uid = TextField(u'Entité')
role = TextField(u'Role')
tiers_uid = StringField(u'Entité')
role = StringField(u'Role')


class AddIntervenant(MyBaseForm): class AddIntervenant(MyBaseForm):
class Meta: class Meta:
@@ -143,7 +143,7 @@ class ConfCreateForm(MyBaseForm):
) )


name = TextField(u'Le nom de votre ',
name = StringField(u'Le nom de votre ',
[validators.DataRequired(u'Vous devez spécifier un nom pour votre intérvention'), [validators.DataRequired(u'Vous devez spécifier un nom pour votre intérvention'),
validators.Length(min=1, max=80, message='entre 1 et 80 car')], validators.Length(min=1, max=80, message='entre 1 et 80 car')],
filters=[strip_filter]) filters=[strip_filter])
@@ -162,7 +162,7 @@ class SalleForm(MyBaseForm):
place_type = SelectField('Type', choices=[('Conference',u'Conférence'), place_type = SelectField('Type', choices=[('Conference',u'Conférence'),
('Stand','Stand'), ('Atelier','Atelier'), ('Table ronde','Table ronde'), ('Stand','Stand'), ('Atelier','Atelier'), ('Table ronde','Table ronde'),
('MAO','MAO'), ('Repas','Repas / Snack'), ('Autres','Autres') ]) ('MAO','MAO'), ('Repas','Repas / Snack'), ('Autres','Autres') ])
name = TextField('Nom de la salle', [validators.Length(min=1, max=40)],
name = StringField('Nom de la salle', [validators.Length(min=1, max=40)],
filters=[strip_filter]) filters=[strip_filter])
description = TextAreaField('Description', description = TextAreaField('Description',
filters=[strip_filter]) filters=[strip_filter])
@@ -171,9 +171,9 @@ class EditSalleForm(SalleForm):
salle_id = HiddenField() salle_id = HiddenField()


class SallePhyForm(MyBaseForm): class SallePhyForm(MyBaseForm):
name = TextField('Nom de la salle', [validators.Length(min=1, max=40)],
name = StringField('Nom de la salle', [validators.Length(min=1, max=40)],
filters=[strip_filter]) filters=[strip_filter])
nb_places = TextField('Nombre de places', [validators.Length(max=4)])
nb_places = StringField('Nombre de places', [validators.Length(max=4)])
description = TextAreaField('Description', description = TextAreaField('Description',
filters=[strip_filter]) filters=[strip_filter])


@@ -184,19 +184,21 @@ class PlaceCreateForm(MyBaseForm):


place_type = SelectField('Type', choices=PLACE_TYPE) place_type = SelectField('Type', choices=PLACE_TYPE)
display_name = TextField(u'Nom affiché', [validators.Length(min=1, max=20)],
display_name = StringField(u'Nom affiché', [validators.Length(min=1, max=20)],
filters=[strip_filter]) filters=[strip_filter])
name = TextField('Nom Complet', [validators.Length(min=1, max=80)],
name = StringField('Nom Complet', [validators.Length(min=1, max=80)],
filters=[strip_filter]) filters=[strip_filter])
gps_coord = TextField(u'Coordonnées GPS', [validators.Length(max=30)],
gps_coord = StringField(u'Coordonnées GPS', [validators.Length(max=30),
validators.Regexp( "^[0-9]*\.?[0-9],[0-9]*\.?[0-9]+",
message=u"Le GPS devrait être sous la forme 43.6158372,7.0723401")],
filters=[strip_filter]) filters=[strip_filter])
adresse = TextAreaField('Adresse', [validators.Length(max=100)], adresse = TextAreaField('Adresse', [validators.Length(max=100)],
filters=[strip_filter]) filters=[strip_filter])
codePostal = TextField('Code Postal', [validators.Length(max=5)],
codePostal = StringField('Code Postal', [validators.Length(max=5)],
filters=[strip_filter]) filters=[strip_filter])
ville = TextField('Ville', [validators.Length(max=40)],
ville = StringField('Ville', [validators.Length(max=40)],
filters=[strip_filter]) filters=[strip_filter])
website = TextField('Site Web', [validators.Length(max=100)],
website = StringField('Site Web', [validators.Length(max=100)],
filters=[strip_filter]) filters=[strip_filter])
description = TextAreaField('Description', description = TextAreaField('Description',
filters=[strip_filter]) filters=[strip_filter])
@@ -222,17 +224,17 @@ class UserPasswordForm(MyBaseForm):
confirm = PasswordField('Confirmez') confirm = PasswordField('Confirmez')
class UserRegisterForm(MyBaseForm): class UserRegisterForm(MyBaseForm):
nom = TextField(u'Nom', [
nom = StringField(u'Nom', [
validators.Length(max=80, message=u"80 car. maximum"), validators.Length(max=80, message=u"80 car. maximum"),
validators.required(message=u"Ce champ est obligatoire") ], validators.required(message=u"Ce champ est obligatoire") ],
filters=[strip_filter] filters=[strip_filter]
) )
prenom = TextField(u'Prénom', [
prenom = StringField(u'Prénom', [
validators.Length(max=80, message=u"80 car. maximum"), validators.Length(max=80, message=u"80 car. maximum"),
validators.required(message=u"Ce champ est obligatoire"), validators.required(message=u"Ce champ est obligatoire"),
validators.Length(max=80)], filters=[strip_filter] validators.Length(max=80)], filters=[strip_filter]
) )
mail = TextField(u'Adresse électronique', [
mail = StringField(u'Adresse électronique', [
validators.required(message=u"Ce champ est obligatoire"), validators.required(message=u"Ce champ est obligatoire"),
validators.Email(message=u"Essayez aussi avec une adresse e-mail valide"), validators.Email(message=u"Essayez aussi avec une adresse e-mail valide"),
validators.Length(max=100)], validators.Length(max=100)],
@@ -241,30 +243,30 @@ class UserRegisterForm(MyBaseForm):
u"Cette adresse ne sera pas rendue publique, "+ u"Cette adresse ne sera pas rendue publique, "+
u"et ne sera pas divulguée à des tiers." u"et ne sera pas divulguée à des tiers."
) )
captcha = TextField(u'Captcha', [validators.Length(max=8), captcha_check],
captcha = StringField(u'Captcha', [validators.Length(max=8), captcha_check],
filters=[strip_filter] filters=[strip_filter]
) )
class ProfilForm(MyBaseForm): class ProfilForm(MyBaseForm):
id = HiddenField() id = HiddenField()
user_id = HiddenField() user_id = HiddenField()
nom = TextField(u'Nom', [validators.Length(max=80)],
nom = StringField(u'Nom', [validators.Length(max=80)],
filters=[strip_filter], filters=[strip_filter],
description = u"Les espaces sont autorisés, la ponctuation n'est " + description = u"Les espaces sont autorisés, la ponctuation n'est " +
u"pas autorisée à l'exception des points, traits d'union, " + u"pas autorisée à l'exception des points, traits d'union, " +
u"apostrophes et tirets bas." u"apostrophes et tirets bas."
) )
prenom = TextField(u'Prénom', [validators.Length(max=80)],
prenom = StringField(u'Prénom', [validators.Length(max=80)],
filters=[strip_filter], filters=[strip_filter],
description = u"Les espaces sont autorisés, la ponctuation n'est " + description = u"Les espaces sont autorisés, la ponctuation n'est " +
u"pas autorisée à l'exception des points, traits d'union, " + u"pas autorisée à l'exception des points, traits d'union, " +
u"apostrophes et tirets bas." u"apostrophes et tirets bas."
) )
pseudo = TextField(u'Pseudo', [validators.Length(max=80)],
pseudo = StringField(u'Pseudo', [validators.Length(max=80)],
filters=[strip_filter], filters=[strip_filter],
description = "Votre pseudo d'usage sur la toile." description = "Votre pseudo d'usage sur la toile."
) )
mail = TextField(u'Adresse électronique', [validators.optional(), validators.Email(), validators.Length(max=100)],
mail = StringField(u'Adresse électronique', [validators.optional(), validators.Email(), validators.Length(max=100)],
filters=[strip_filter], filters=[strip_filter],
description = u"Une adresse e-mail valide. Tous les messages de ce système" + description = u"Une adresse e-mail valide. Tous les messages de ce système" +
u"seront envoyés à cette adresse. Cette adresse ne sera pas rendue publique,"+ u"seront envoyés à cette adresse. Cette adresse ne sera pas rendue publique,"+
@@ -272,7 +274,7 @@ class ProfilForm(MyBaseForm):
u"recevoir personnellement certaines nouvelles ou avertissements." u"recevoir personnellement certaines nouvelles ou avertissements."
) )
phone = TextField(u'Mobile', [validators.optional(), validators.Length(max=10),
phone = StringField(u'Mobile', [validators.optional(), validators.Length(max=10),
validators.Regexp("\d+", message=u"Le numéro de téléphone mobile ne doit contenir que des chiffres")], validators.Regexp("\d+", message=u"Le numéro de téléphone mobile ne doit contenir que des chiffres")],
filters=[strip_filter], filters=[strip_filter],
description = u"Un numéro de mobile valide. Afin de pouvoir rester en" + description = u"Un numéro de mobile valide. Afin de pouvoir rester en" +
@@ -281,7 +283,7 @@ class ProfilForm(MyBaseForm):
u"vous désirez recevoir personnellement certaines nouvelles ou alertes." u"vous désirez recevoir personnellement certaines nouvelles ou alertes."
) )
website = TextField(u'Site web', [validators.optional(), validators.URL(), validators.Length(max=100)],
website = StringField(u'Site web', [validators.optional(), validators.URL(), validators.Length(max=100)],
filters=[strip_filter], filters=[strip_filter],
description = "Renseignez ici votre site Web." description = "Renseignez ici votre site Web."
) )
@@ -349,7 +351,7 @@ class DateStartConfidenceForm(MyBaseForm):
DayChoice = [("4","Jeudi"), ("5","Vendredi"), ("6","Samedi"), ("0","Dimanche"), ("1","Lundi")] DayChoice = [("4","Jeudi"), ("5","Vendredi"), ("6","Samedi"), ("0","Dimanche"), ("1","Lundi")]
Day = SelectField(u'Jour', choices=DayChoice ) Day = SelectField(u'Jour', choices=DayChoice )
Confidence = SelectField(u'Confiance', choices=ConfidenceLevel) Confidence = SelectField(u'Confiance', choices=ConfidenceLevel)
Hour = TextField(u'Heure', [validators.Length(max=5,
Hour = StringField(u'Heure', [validators.Length(max=5,
message=u"doit faire au maximum 5 caractères"), message=u"doit faire au maximum 5 caractères"),
validators.Regexp("\d+:\d+", validators.Regexp("\d+:\d+",
message=u"doit être sous la forme HH:MM")], message=u"doit être sous la forme HH:MM")],
@@ -381,19 +383,19 @@ class AddItineraireForm(Form):


class AddMember(MyBaseForm): class AddMember(MyBaseForm):
tiers_uid = HiddenField() tiers_uid = HiddenField()
nom = TextField(u'Nom', [validators.Length(max=80)],
nom = StringField(u'Nom', [validators.Length(max=80)],
filters=[strip_filter], filters=[strip_filter],
description = u"Les espaces sont autorisés, la ponctuation n'est " + description = u"Les espaces sont autorisés, la ponctuation n'est " +
u"pas autorisée à l'exception des points, traits d'union, " + u"pas autorisée à l'exception des points, traits d'union, " +
u"apostrophes et tirets bas." u"apostrophes et tirets bas."
) )
prenom = TextField(u'Prénom', [validators.Length(max=80)],
prenom = StringField(u'Prénom', [validators.Length(max=80)],
filters=[strip_filter], filters=[strip_filter],
description = u"Les espaces sont autorisés, la ponctuation n'est " + description = u"Les espaces sont autorisés, la ponctuation n'est " +
u"pas autorisée à l'exception des points, traits d'union, " + u"pas autorisée à l'exception des points, traits d'union, " +
u"apostrophes et tirets bas." u"apostrophes et tirets bas."
) )
email = TextField(u'Email', [validators.required(),
email = StringField(u'Email', [validators.required(),
validators.length(max=10), validators.length(max=10),
validators.Email(message='Ceci ne ressemble pas à une adresse valide')], validators.Email(message='Ceci ne ressemble pas à une adresse valide')],
description=u"Afin d'éviter la duplication d'information et les doublons inutile, "+ description=u"Afin d'éviter la duplication d'information et les doublons inutile, "+
@@ -402,7 +404,7 @@ class AddMember(MyBaseForm):
add = SubmitField('Ajouter des membres') add = SubmitField('Ajouter des membres')


class TiersForm(MyBaseForm): class TiersForm(MyBaseForm):
name = TextField(u'Nom', [validators.Length(max=100)],
name = StringField(u'Nom', [validators.Length(max=100)],
filters=[strip_filter], filters=[strip_filter],
description = u"Les espaces sont autorisés, la ponctuation n'est " + description = u"Les espaces sont autorisés, la ponctuation n'est " +
u"pas autorisée à l'exception des points, traits d'union, " + u"pas autorisée à l'exception des points, traits d'union, " +
@@ -411,11 +413,11 @@ class TiersForm(MyBaseForm):


tiers_type = MySelectField('Nature', coerce=int) tiers_type = MySelectField('Nature', coerce=int)
website = TextField(u'Site web', [validators.optional(), validators.URL(), validators.Length(max=100)],
filters=[strip_filter],
website = StringField(u'Site web', [validators.optional(), validators.URL(), validators.Length(max=100)],
filters=[strip_filter],
description = "Renseignez ici le site Web." description = "Renseignez ici le site Web."
)
)
description = TextAreaField('Descriptif', description = TextAreaField('Descriptif',
[validators.optional(), validators.Length(max=1000000)], [validators.optional(), validators.Length(max=1000000)],
filters=[strip_filter], filters=[strip_filter],
@@ -433,7 +435,7 @@ class UpdateTiersForm(TiersForm):


class ExchCateg(MyBaseForm): class ExchCateg(MyBaseForm):
exch_type = HiddenField() exch_type = HiddenField()
exch_subtype = TextField(u'Catégorie', [validators.Length(max=80)],
exch_subtype = StringField(u'Catégorie', [validators.Length(max=80)],
filters=[strip_filter], filters=[strip_filter],
description = "Le nom de la categorie" description = "Le nom de la categorie"
) )
@@ -453,7 +455,7 @@ class AskCForm(ItineraireForm):
DayChoice = [("4","Jeudi"), ("5","Vendredi"), ("6","Samedi"), ("0","Dimanche"), ("1","Lundi")] DayChoice = [("4","Jeudi"), ("5","Vendredi"), ("6","Samedi"), ("0","Dimanche"), ("1","Lundi")]
Day_start = SelectField(u'Jour', choices=DayChoice ) Day_start = SelectField(u'Jour', choices=DayChoice )
Confidence = SelectField(u'Confiance', choices=ConfidenceLevel) Confidence = SelectField(u'Confiance', choices=ConfidenceLevel)
Hour_start = TextField(u'Heure', [validators.Length(max=5,
Hour_start = StringField(u'Heure', [validators.Length(max=5,
message=u"doit faire au maximum 5 caractères"), message=u"doit faire au maximum 5 caractères"),
validators.Regexp("\d+:\d+", validators.Regexp("\d+:\d+",
message=u"doit être sous la forme HH:MM")], message=u"doit être sous la forme HH:MM")],
@@ -475,14 +477,14 @@ class AskHForm(MyBaseForm):
class AskMForm(MyBaseForm): class AskMForm(MyBaseForm):
DayChoice = [("4","Jeudi"), ("5","Vendredi"), ("6","Samedi"), ("0","Dimanche"), ("1","Lundi")] DayChoice = [("4","Jeudi"), ("5","Vendredi"), ("6","Samedi"), ("0","Dimanche"), ("1","Lundi")]
Day_start = SelectField(u"à partir de", choices=DayChoice ) Day_start = SelectField(u"à partir de", choices=DayChoice )
Hour_start = TextField(u'vers', [validators.Length(max=5,
Hour_start = StringField(u'vers', [validators.Length(max=5,
message=u"doit faire au maximum 5 caractères"), message=u"doit faire au maximum 5 caractères"),
validators.Regexp("\d+:\d+", validators.Regexp("\d+:\d+",
message=u"doit être sous la forme HH:MM")], message=u"doit être sous la forme HH:MM")],
filters=[strip_filter]) filters=[strip_filter])
start_time = HiddenField() start_time = HiddenField()
Day_end = SelectField(u"Jusqu'à", choices=DayChoice ) Day_end = SelectField(u"Jusqu'à", choices=DayChoice )
Hour_end = TextField(u'vers', [validators.Length(max=5,
Hour_end = StringField(u'vers', [validators.Length(max=5,
message=u"doit faire au maximum 5 caractères"), message=u"doit faire au maximum 5 caractères"),
validators.Regexp("\d+:\d+", validators.Regexp("\d+:\d+",
message=u"doit être sous la forme HH:MM")], message=u"doit être sous la forme HH:MM")],
@@ -506,7 +508,7 @@ class PropCForm(ItineraireForm):
DayChoice = [("4","Jeudi"), ("5","Vendredi"), ("6","Samedi"), ("0","Dimanche"), ("1","Lundi")] DayChoice = [("4","Jeudi"), ("5","Vendredi"), ("6","Samedi"), ("0","Dimanche"), ("1","Lundi")]
Day_start = SelectField(u'Jour', choices=DayChoice ) Day_start = SelectField(u'Jour', choices=DayChoice )
Confidence = SelectField(u'Confiance', choices=ConfidenceLevel) Confidence = SelectField(u'Confiance', choices=ConfidenceLevel)
Hour_start = TextField(u'Heure', [validators.Length(max=5,
Hour_start = StringField(u'Heure', [validators.Length(max=5,
message=u"doit faire au maximum 5 caractères"), message=u"doit faire au maximum 5 caractères"),
validators.Regexp("\d+:\d+", validators.Regexp("\d+:\d+",
message=u"doit être sous la forme HH:MM")], message=u"doit être sous la forme HH:MM")],
@@ -532,14 +534,14 @@ class PropHForm(MyBaseForm):
class PropMForm(MyBaseForm): class PropMForm(MyBaseForm):
DayChoice = [("4","Jeudi"), ("5","Vendredi"), ("6","Samedi"), ("0","Dimanche"), ("1","Lundi")] DayChoice = [("4","Jeudi"), ("5","Vendredi"), ("6","Samedi"), ("0","Dimanche"), ("1","Lundi")]
Day_start = SelectField(u"à partir de", choices=DayChoice ) Day_start = SelectField(u"à partir de", choices=DayChoice )
Hour_start = TextField(u'vers', [validators.Length(max=5,
Hour_start = StringField(u'vers', [validators.Length(max=5,
message=u"doit faire au maximum 5 caractères"), message=u"doit faire au maximum 5 caractères"),
validators.Regexp("\d+:\d+", validators.Regexp("\d+:\d+",
message=u"doit être sous la forme HH:MM")], message=u"doit être sous la forme HH:MM")],
filters=[strip_filter]) filters=[strip_filter])
start_time = HiddenField() start_time = HiddenField()
Day_end = SelectField(u"Jusqu'a ", choices=DayChoice ) Day_end = SelectField(u"Jusqu'a ", choices=DayChoice )
Hour_end = TextField(u'vers', [validators.Length(max=5,
Hour_end = StringField(u'vers', [validators.Length(max=5,
message=u"doit faire au maximum 5 caractères"), message=u"doit faire au maximum 5 caractères"),
validators.Regexp("\d+:\d+", validators.Regexp("\d+:\d+",
message=u"doit être sous la forme HH:MM")], message=u"doit être sous la forme HH:MM")],


+ 1
- 1
jm2l/static/js/jm2l.js View File

@@ -114,7 +114,7 @@ $(document).ready(function() {
if (bla.target.id=="ItinMap") if (bla.target.id=="ItinMap")
setTimeout(function() { setTimeout(function() {
map.invalidateSize(); map.invalidateSize();
toast.route();
great_route.route();
$('#map_Itineraire').eq(0).html( $('.leaflet-routing-alt').eq(0).html() ); $('#map_Itineraire').eq(0).html( $('.leaflet-routing-alt').eq(0).html() );
$('.leaflet-routing-container').eq(0).attr("style","display:none;") $('.leaflet-routing-container').eq(0).attr("style","display:none;")
$('#map_Itineraire > table').eq(0).attr("style","width:100%;"); $('#map_Itineraire > table').eq(0).attr("style","width:100%;");


BIN
jm2l/static/vendor/leaflet/css/images/layers-2x.png View File

Before After
Width: 52  |  Height: 52  |  Size: 2.8 KiB

BIN
jm2l/static/vendor/leaflet/css/images/layers.png View File

Before After
Width: 26  |  Height: 26  |  Size: 1.5 KiB

BIN
jm2l/static/vendor/leaflet/css/images/marker-icon-2x.png View File

Before After
Width: 50  |  Height: 82  |  Size: 3.9 KiB

BIN
jm2l/static/vendor/leaflet/css/images/marker-icon.png View File

Before After
Width: 25  |  Height: 41  |  Size: 1.7 KiB

BIN
jm2l/static/vendor/leaflet/css/images/marker-shadow.png View File

Before After
Width: 41  |  Height: 41  |  Size: 797 B

+ 110
- 14
jm2l/static/vendor/leaflet/css/leaflet-routing-machine.css View File

@@ -1,12 +1,14 @@
.leaflet-routing-container {
.leaflet-routing-container, .leaflet-routing-error {
width: 320px; width: 320px;
background-color: white; background-color: white;
padding-top: 4px; padding-top: 4px;
transition: margin-right 0.2s ease;
transition: all 0.2s ease;
box-sizing: border-box;
} }


.leaflet-control-container .leaflet-routing-container-hide { .leaflet-control-container .leaflet-routing-container-hide {
margin-right: -340px;
width: 32px;
height: 32px;
} }


.leaflet-routing-container h2 { .leaflet-routing-container h2 {
@@ -18,7 +20,11 @@
font-weight: normal; font-weight: normal;
} }


.leaflet-routing-alt, .leaflet-routing-geocoders {
.leaflet-routing-collapsible .leaflet-routing-geocoders {
margin-top: 20px;
}

.leaflet-routing-alt, .leaflet-routing-geocoders, .leaflet-routing-error {
padding: 6px; padding: 6px;
margin-top: 2px; margin-top: 2px;
margin-bottom: 6px; margin-bottom: 6px;
@@ -28,6 +34,11 @@
transition: all 0.2s ease; transition: all 0.2s ease;
} }


.leaflet-control-container .leaflet-routing-container-hide .leaflet-routing-alt,
.leaflet-control-container .leaflet-routing-container-hide .leaflet-routing-geocoders {
display: none;
}

.leaflet-bar .leaflet-routing-alt:last-child { .leaflet-bar .leaflet-routing-alt:last-child {
border-bottom: none; border-bottom: none;
} }
@@ -86,14 +97,15 @@
.leaflet-routing-icon-depart { background-position: -160px 0; } .leaflet-routing-icon-depart { background-position: -160px 0; }
.leaflet-routing-icon-enter-roundabout { background-position: -180px 0; } .leaflet-routing-icon-enter-roundabout { background-position: -180px 0; }
.leaflet-routing-icon-arrive { background-position: -200px 0; } .leaflet-routing-icon-arrive { background-position: -200px 0; }
.leaflet-routing-icon-via { background-position: -200px 0; }
.leaflet-routing-icon-via { background-position: -220px 0; }


.leaflet-routing-geocoders div { .leaflet-routing-geocoders div {
padding: 4px;
padding: 4px 0px 4px 0px;
} }


.leaflet-routing-geocoders input { .leaflet-routing-geocoders input {
width: 286px;
width: 303px;
width: calc(100% - 4px);
line-height: 1.67; line-height: 1.67;
border: 1px solid #ccc; border: 1px solid #ccc;
} }
@@ -104,22 +116,36 @@
border-radius: 4px; border-radius: 4px;
background-color: white; background-color: white;
margin: 0; margin: 0;
margin-right: 3px;
float: right; float: right;
cursor: pointer; cursor: pointer;
transition: background-color 0.2s ease; transition: background-color 0.2s ease;
} }


.leaflet-routing-add-waypoint:after {
content: '+';
}

.leaflet-routing-reverse-waypoints:after {
font-weight: normal;
content: '\21c5';
}

.leaflet-routing-geocoders button:hover { .leaflet-routing-geocoders button:hover {
background-color: #eee; background-color: #eee;
} }


.leaflet-routing-geocoders input,.leaflet-routing-remove-waypoint,.leaflet-routing-geocoder {
position: relative;
}

.leaflet-routing-geocoder-result { .leaflet-routing-geocoder-result {
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
position: absolute; position: absolute;
max-height: 0; max-height: 0;
overflow: hidden; overflow: hidden;
transition: all 0.5s ease; transition: all 0.5s ease;
z-index: 15; /* Arbitrary, but try to be above "most" things. */
z-index: 1000; /* Arbitrary, but try to be above "most" things. */
} }


.leaflet-routing-geocoder-result table { .leaflet-routing-geocoder-result table {
@@ -144,19 +170,89 @@
} }


.leaflet-routing-remove-waypoint { .leaflet-routing-remove-waypoint {
position: relative;
float: right;
background-color: transparent;
display: inline-block;
vertical-align: middle;
cursor: pointer; cursor: pointer;
}

.leaflet-routing-remove-waypoint:after {
position: absolute;
display: block;
width: 15px;
height: 1px;
z-index: 1;
right: 1px;
top: 4px;
bottom: 0;
margin: auto;
padding: 2px;
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
left: 4px;
content: "\00d7";
text-align: center;
cursor: pointer;
color: #ccc; color: #ccc;
background: white;
padding-bottom: 16px;
margin-top: -16px;
padding-right: 4px;
line-height: 1;
} }


.leaflet-routing-remove-waypoint:hover { .leaflet-routing-remove-waypoint:hover {
color: inherit;
color: black;
}

.leaflet-routing-instruction-distance {
width: 48px;
}

.leaflet-routing-collapse-btn {
position: absolute;
top: 0;
right: 6px;
font-size: 24px;
color: #ccc;
font-weight: bold;
}

.leaflet-routing-collapse-btn:after {
content: '\00d7';
}

.leaflet-routing-container-hide .leaflet-routing-collapse-btn {
position: relative;
left: 4px;
top: 4px;
display: block;
width: 26px;
height: 23px;
background-image: url('routing-icon.png');
}

.leaflet-routing-container-hide .leaflet-routing-collapse-btn:after {
content: none;
}

.leaflet-top .leaflet-routing-container.leaflet-routing-container-hide {
margin-top: 10px !important;
}
.leaflet-right .leaflet-routing-container.leaflet-routing-container-hide {
margin-right: 10px !important;
}
.leaflet-bottom .leaflet-routing-container.leaflet-routing-container-hide {
margin-bottom: 10px !important;
}
.leaflet-left .leaflet-routing-container.leaflet-routing-container-hide {
margin-left: 10px !important;
} }


.leaflet-routing-remove-waypoint:before {
content: '\00d7'
@media only screen and (max-width: 640px) {
.leaflet-routing-container {
margin: 0 !important;
padding: 0 !important;
width: 100%;
height: 100%;
}
} }

+ 197
- 43
jm2l/static/vendor/leaflet/css/leaflet.css View File

@@ -1,16 +1,12 @@
/* required styles */ /* required styles */
.leaflet-map-pane,
.leaflet-pane,
.leaflet-tile, .leaflet-tile,
.leaflet-marker-icon, .leaflet-marker-icon,
.leaflet-marker-shadow, .leaflet-marker-shadow,
.leaflet-tile-pane,
.leaflet-tile-container, .leaflet-tile-container,
.leaflet-overlay-pane,
.leaflet-shadow-pane,
.leaflet-marker-pane,
.leaflet-popup-pane,
.leaflet-overlay-pane svg,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box, .leaflet-zoom-box,
.leaflet-image-layer, .leaflet-image-layer,
.leaflet-layer { .leaflet-layer {
@@ -20,7 +16,6 @@
} }
.leaflet-container { .leaflet-container {
overflow: hidden; overflow: hidden;
-ms-touch-action: none;
} }
.leaflet-tile, .leaflet-tile,
.leaflet-marker-icon, .leaflet-marker-icon,
@@ -28,20 +23,49 @@
-webkit-user-select: none; -webkit-user-select: none;
-moz-user-select: none; -moz-user-select: none;
user-select: none; user-select: none;
-webkit-user-drag: none;
-webkit-user-drag: none;
}
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari .leaflet-tile {
image-rendering: -webkit-optimize-contrast;
}
/* hack that prevents hw layers "stretching" when loading new tiles */
.leaflet-safari .leaflet-tile-container {
width: 1600px;
height: 1600px;
-webkit-transform-origin: 0 0;
} }
.leaflet-marker-icon, .leaflet-marker-icon,
.leaflet-marker-shadow { .leaflet-marker-shadow {
display: block; display: block;
} }
/* map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container img {
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg,
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer {
max-width: none !important; max-width: none !important;
} }
/* stupid Android 2 doesn't understand "max-width: none" properly */
.leaflet-container img.leaflet-image-layer {
max-width: 15000px !important;
.leaflet-container.leaflet-touch-zoom {
-ms-touch-action: pan-x pan-y;
touch-action: pan-x pan-y;
} }
.leaflet-container.leaflet-touch-drag {
-ms-touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
-ms-touch-action: none;
touch-action: none;
}
.leaflet-container {
-webkit-tap-highlight-color: transparent;
}
.leaflet-container a {
-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
}
.leaflet-tile { .leaflet-tile {
filter: inherit; filter: inherit;
visibility: hidden; visibility: hidden;
@@ -52,18 +76,26 @@
.leaflet-zoom-box { .leaflet-zoom-box {
width: 0; width: 0;
height: 0; height: 0;
-moz-box-sizing: border-box;
box-sizing: border-box;
z-index: 800;
} }
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ /* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg { .leaflet-overlay-pane svg {
-moz-user-select: none; -moz-user-select: none;
} }
.leaflet-tile-pane { z-index: 2; }
.leaflet-objects-pane { z-index: 3; }
.leaflet-overlay-pane { z-index: 4; }
.leaflet-shadow-pane { z-index: 5; }
.leaflet-marker-pane { z-index: 6; }
.leaflet-popup-pane { z-index: 7; }
.leaflet-pane { z-index: 400; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }
.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg { z-index: 200; }
.leaflet-vml-shape { .leaflet-vml-shape {
width: 1px; width: 1px;
@@ -80,7 +112,8 @@
.leaflet-control { .leaflet-control {
position: relative; position: relative;
z-index: 7;
z-index: 800;
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
pointer-events: auto; pointer-events: auto;
} }
.leaflet-top, .leaflet-top,
@@ -124,7 +157,9 @@
/* zoom and fade animations */ /* zoom and fade animations */
.leaflet-fade-anim .leaflet-tile,
.leaflet-fade-anim .leaflet-tile {
will-change: opacity;
}
.leaflet-fade-anim .leaflet-popup { .leaflet-fade-anim .leaflet-popup {
opacity: 0; opacity: 0;
-webkit-transition: opacity 0.2s linear; -webkit-transition: opacity 0.2s linear;
@@ -132,11 +167,17 @@
-o-transition: opacity 0.2s linear; -o-transition: opacity 0.2s linear;
transition: opacity 0.2s linear; transition: opacity 0.2s linear;
} }
.leaflet-fade-anim .leaflet-tile-loaded,
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { .leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
opacity: 1; opacity: 1;
} }
.leaflet-zoom-animated {
-webkit-transform-origin: 0 0;
-ms-transform-origin: 0 0;
transform-origin: 0 0;
}
.leaflet-zoom-anim .leaflet-zoom-animated {
will-change: transform;
}
.leaflet-zoom-anim .leaflet-zoom-animated { .leaflet-zoom-anim .leaflet-zoom-animated {
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
@@ -144,8 +185,7 @@
transition: transform 0.25s cubic-bezier(0,0,0.25,1); transition: transform 0.25s cubic-bezier(0,0,0.25,1);
} }
.leaflet-zoom-anim .leaflet-tile, .leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile,
.leaflet-touching .leaflet-zoom-animated {
.leaflet-pan-anim .leaflet-tile {
-webkit-transition: none; -webkit-transition: none;
-moz-transition: none; -moz-transition: none;
-o-transition: none; -o-transition: none;
@@ -159,24 +199,44 @@
/* cursors */ /* cursors */
.leaflet-clickable {
.leaflet-interactive {
cursor: pointer; cursor: pointer;
} }
.leaflet-container {
.leaflet-grab {
cursor: -webkit-grab; cursor: -webkit-grab;
cursor: -moz-grab; cursor: -moz-grab;
} }
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive {
cursor: crosshair;
}
.leaflet-popup-pane, .leaflet-popup-pane,
.leaflet-control { .leaflet-control {
cursor: auto; cursor: auto;
} }
.leaflet-dragging .leaflet-container,
.leaflet-dragging .leaflet-clickable {
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive,
.leaflet-dragging .leaflet-marker-draggable {
cursor: move; cursor: move;
cursor: -webkit-grabbing; cursor: -webkit-grabbing;
cursor: -moz-grabbing; cursor: -moz-grabbing;
} }
/* marker & overlays interactivity */
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-pane > svg path,
.leaflet-tile-container {
pointer-events: none;
}
.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive {
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
pointer-events: auto;
}
/* visual tweaks */ /* visual tweaks */
@@ -249,7 +309,14 @@
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
} }
.leaflet-touch .leaflet-bar a:first-child {
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.leaflet-touch .leaflet-bar a:last-child {
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
}
/* zoom control */ /* zoom control */
@@ -258,16 +325,10 @@
font: bold 18px 'Lucida Console', Monaco, monospace; font: bold 18px 'Lucida Console', Monaco, monospace;
text-indent: 1px; text-indent: 1px;
} }
.leaflet-control-zoom-out {
font-size: 20px;
}
.leaflet-touch .leaflet-control-zoom-in {
.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {
font-size: 22px; font-size: 22px;
} }
.leaflet-touch .leaflet-control-zoom-out {
font-size: 24px;
}
/* layers control */ /* layers control */
@@ -303,6 +364,11 @@
color: #333; color: #333;
background: #fff; background: #fff;
} }
.leaflet-control-layers-scrollbar {
overflow-y: scroll;
overflow-x: hidden;
padding-right: 5px;
}
.leaflet-control-layers-selector { .leaflet-control-layers-selector {
margin-top: 2px; margin-top: 2px;
position: relative; position: relative;
@@ -317,6 +383,11 @@
margin: 5px -10px 5px -6px; margin: 5px -10px 5px -6px;
} }
/* Default icon URLs */
.leaflet-default-icon-path {
background-image: url(images/marker-icon.png);
}
/* attribution and scale controls */ /* attribution and scale controls */
@@ -354,8 +425,8 @@
font-size: 11px; font-size: 11px;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
-moz-box-sizing: content-box;
box-sizing: content-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
background: #fff; background: #fff;
background: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.5);
@@ -386,6 +457,7 @@
.leaflet-popup { .leaflet-popup {
position: absolute; position: absolute;
text-align: center; text-align: center;
margin-bottom: 20px;
} }
.leaflet-popup-content-wrapper { .leaflet-popup-content-wrapper {
padding: 1px; padding: 1px;
@@ -400,11 +472,13 @@
margin: 18px 0; margin: 18px 0;
} }
.leaflet-popup-tip-container { .leaflet-popup-tip-container {
margin: 0 auto;
width: 40px; width: 40px;
height: 20px; height: 20px;
position: relative;
position: absolute;
left: 50%;
margin-left: -20px;
overflow: hidden; overflow: hidden;
pointer-events: none;
} }
.leaflet-popup-tip { .leaflet-popup-tip {
width: 17px; width: 17px;
@@ -422,7 +496,7 @@
.leaflet-popup-content-wrapper, .leaflet-popup-content-wrapper,
.leaflet-popup-tip { .leaflet-popup-tip {
background: white; background: white;
color: #333;
box-shadow: 0 3px 14px rgba(0,0,0,0.4); box-shadow: 0 3px 14px rgba(0,0,0,0.4);
} }
.leaflet-container a.leaflet-popup-close-button { .leaflet-container a.leaflet-popup-close-button {
@@ -430,6 +504,7 @@
top: 0; top: 0;
right: 0; right: 0;
padding: 4px 4px 0 0; padding: 4px 4px 0 0;
border: none;
text-align: center; text-align: center;
width: 18px; width: 18px;
height: 14px; height: 14px;
@@ -476,3 +551,82 @@
background: #fff; background: #fff;
border: 1px solid #666; border: 1px solid #666;
} }
/* Tooltip */
/* Base styles for the element that has a tooltip */
.leaflet-tooltip {
position: absolute;
padding: 6px;
background-color: #fff;
border: 1px solid #fff;
border-radius: 3px;
color: #222;
white-space: nowrap;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
pointer-events: none;
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.leaflet-tooltip.leaflet-clickable {
cursor: pointer;
pointer-events: auto;
}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
position: absolute;
pointer-events: none;
border: 6px solid transparent;
background: transparent;
content: "";
}
/* Directions */
.leaflet-tooltip-bottom {
margin-top: 6px;
}
.leaflet-tooltip-top {
margin-top: -6px;
}
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-top:before {
left: 50%;
margin-left: -6px;
}
.leaflet-tooltip-top:before {
bottom: 0;
margin-bottom: -12px;
border-top-color: #fff;
}
.leaflet-tooltip-bottom:before {
top: 0;
margin-top: -12px;
margin-left: -6px;
border-bottom-color: #fff;
}
.leaflet-tooltip-left {
margin-left: -6px;
}
.leaflet-tooltip-right {
margin-left: 6px;
}
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
top: 50%;
margin-top: -6px;
}
.leaflet-tooltip-left:before {
right: 0;
margin-right: -12px;
border-left-color: #fff;
}
.leaflet-tooltip-right:before {
left: 0;
margin-left: -12px;
border-right-color: #fff;
}

+ 4118
- 782
jm2l/static/vendor/leaflet/js/leaflet-routing-machine.js
File diff suppressed because it is too large
View File


+ 4
- 4
jm2l/static/vendor/leaflet/js/leaflet-routing-machine.min.js
File diff suppressed because it is too large
View File


+ 11411
- 6982
jm2l/static/vendor/leaflet/js/leaflet-src.js
File diff suppressed because it is too large
View File


+ 5
- 9
jm2l/static/vendor/leaflet/js/leaflet.js
File diff suppressed because it is too large
View File


+ 6
- 3
jm2l/templates/Logistique/Dialog_Covoit.mako View File

@@ -61,20 +61,23 @@
var osmAttrib='Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors'; var osmAttrib='Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors';
var osm = new L.TileLayer(osmUrl, {minZoom: 8, maxZoom: 17, attribution: osmAttrib}); var osm = new L.TileLayer(osmUrl, {minZoom: 8, maxZoom: 17, attribution: osmAttrib});
map.addLayer(osm); map.addLayer(osm);
var toast = L.Routing.control({
var great_route = L.Routing.control({
containerClassName: '#map_Itineraire', containerClassName: '#map_Itineraire',
show:false, show:false,
language:'fr',
waypoints: [ waypoints: [
L.latLng(${Exch.Itin.start.gps_coord}), L.latLng(${Exch.Itin.start.gps_coord}),
L.latLng(${Exch.Itin.arrival.gps_coord}) L.latLng(${Exch.Itin.arrival.gps_coord})
] ]
}); });
toast.addTo(map);
great_route.addTo(map);
</script> </script>
</div> </div>
<div class="tab-pane fade in" id="Place_Itin"> <div class="tab-pane fade in" id="Place_Itin">
<div id="map_Itineraire"></div>
<div id="map_Itineraire">
Cliquez sur l'onglet carte pour démarrer la recherche d'intineraire.
</div>
</div> </div>
% endif % endif




Loading…
Cancel
Save