Browse Source

Merge branch 'tr4ck3ur/various_fixes_2017' of JM2L/jm2l into master

master
JM2L 7 years ago
committed by Gogs
parent
commit
bf8015e272
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 -*-
from wtforms import Form, BooleanField, TextField, TextAreaField, SelectField
from wtforms import Form, BooleanField, StringField, TextAreaField, SelectField
from wtforms import SubmitField, validators, FieldList, PasswordField
#import .ExtWforms
from .ExtWtforms import MySelectField
@@ -18,7 +18,7 @@ class MyBaseForm(Form):
csrf_time_limit = timedelta(minutes=60)

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])
body = TextAreaField('Entry body', [validators.Length(min=1)],
filters=[strip_filter])
@@ -50,7 +50,7 @@ ATELIER_DURATION = [ (15,u'Lighting talk ( 5 min)'),


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

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 )
closed_by = SelectField(u'Assigné à', coerce=int )
due_date = DateField(u'Date prévue', format='%d/%m/%Y')
@@ -86,8 +86,8 @@ class TiersMember(MyBaseForm):
csrf = False

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 Meta:
@@ -102,8 +102,8 @@ class TiersChoice(MyBaseForm):

year_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 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.Length(min=1, max=80, message='entre 1 et 80 car')],
filters=[strip_filter])
@@ -162,7 +162,7 @@ class SalleForm(MyBaseForm):
place_type = SelectField('Type', choices=[('Conference',u'Conférence'),
('Stand','Stand'), ('Atelier','Atelier'), ('Table ronde','Table ronde'),
('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])
description = TextAreaField('Description',
filters=[strip_filter])
@@ -171,9 +171,9 @@ class EditSalleForm(SalleForm):
salle_id = HiddenField()

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])
nb_places = TextField('Nombre de places', [validators.Length(max=4)])
nb_places = StringField('Nombre de places', [validators.Length(max=4)])
description = TextAreaField('Description',
filters=[strip_filter])

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

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])
name = TextField('Nom Complet', [validators.Length(min=1, max=80)],
name = StringField('Nom Complet', [validators.Length(min=1, max=80)],
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])
adresse = TextAreaField('Adresse', [validators.Length(max=100)],
filters=[strip_filter])
codePostal = TextField('Code Postal', [validators.Length(max=5)],
codePostal = StringField('Code Postal', [validators.Length(max=5)],
filters=[strip_filter])
ville = TextField('Ville', [validators.Length(max=40)],
ville = StringField('Ville', [validators.Length(max=40)],
filters=[strip_filter])
website = TextField('Site Web', [validators.Length(max=100)],
website = StringField('Site Web', [validators.Length(max=100)],
filters=[strip_filter])
description = TextAreaField('Description',
filters=[strip_filter])
@@ -222,17 +224,17 @@ class UserPasswordForm(MyBaseForm):
confirm = PasswordField('Confirmez')
class UserRegisterForm(MyBaseForm):
nom = TextField(u'Nom', [
nom = StringField(u'Nom', [
validators.Length(max=80, message=u"80 car. maximum"),
validators.required(message=u"Ce champ est obligatoire") ],
filters=[strip_filter]
)
prenom = TextField(u'Prénom', [
prenom = StringField(u'Prénom', [
validators.Length(max=80, message=u"80 car. maximum"),
validators.required(message=u"Ce champ est obligatoire"),
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.Email(message=u"Essayez aussi avec une adresse e-mail valide"),
validators.Length(max=100)],
@@ -241,30 +243,30 @@ class UserRegisterForm(MyBaseForm):
u"Cette adresse ne sera pas rendue publique, "+
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]
)
class ProfilForm(MyBaseForm):
id = HiddenField()
user_id = HiddenField()
nom = TextField(u'Nom', [validators.Length(max=80)],
nom = StringField(u'Nom', [validators.Length(max=80)],
filters=[strip_filter],
description = u"Les espaces sont autorisés, la ponctuation n'est " +
u"pas autorisée à l'exception des points, traits d'union, " +
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],
description = u"Les espaces sont autorisés, la ponctuation n'est " +
u"pas autorisée à l'exception des points, traits d'union, " +
u"apostrophes et tirets bas."
)
pseudo = TextField(u'Pseudo', [validators.Length(max=80)],
pseudo = StringField(u'Pseudo', [validators.Length(max=80)],
filters=[strip_filter],
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],
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,"+
@@ -272,7 +274,7 @@ class ProfilForm(MyBaseForm):
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")],
filters=[strip_filter],
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."
)
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],
description = "Renseignez ici votre site Web."
)
@@ -349,7 +351,7 @@ class DateStartConfidenceForm(MyBaseForm):
DayChoice = [("4","Jeudi"), ("5","Vendredi"), ("6","Samedi"), ("0","Dimanche"), ("1","Lundi")]
Day = SelectField(u'Jour', choices=DayChoice )
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"),
validators.Regexp("\d+:\d+",
message=u"doit être sous la forme HH:MM")],
@@ -381,19 +383,19 @@ class AddItineraireForm(Form):

class AddMember(MyBaseForm):
tiers_uid = HiddenField()
nom = TextField(u'Nom', [validators.Length(max=80)],
nom = StringField(u'Nom', [validators.Length(max=80)],
filters=[strip_filter],
description = u"Les espaces sont autorisés, la ponctuation n'est " +
u"pas autorisée à l'exception des points, traits d'union, " +
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],
description = u"Les espaces sont autorisés, la ponctuation n'est " +
u"pas autorisée à l'exception des points, traits d'union, " +
u"apostrophes et tirets bas."
)
email = TextField(u'Email', [validators.required(),
email = StringField(u'Email', [validators.required(),
validators.length(max=10),
validators.Email(message='Ceci ne ressemble pas à une adresse valide')],
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')

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

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 = TextAreaField('Descriptif',
[validators.optional(), validators.Length(max=1000000)],
filters=[strip_filter],
@@ -433,7 +435,7 @@ class UpdateTiersForm(TiersForm):

class ExchCateg(MyBaseForm):
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],
description = "Le nom de la categorie"
)
@@ -453,7 +455,7 @@ class AskCForm(ItineraireForm):
DayChoice = [("4","Jeudi"), ("5","Vendredi"), ("6","Samedi"), ("0","Dimanche"), ("1","Lundi")]
Day_start = SelectField(u'Jour', choices=DayChoice )
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"),
validators.Regexp("\d+:\d+",
message=u"doit être sous la forme HH:MM")],
@@ -475,14 +477,14 @@ class AskHForm(MyBaseForm):
class AskMForm(MyBaseForm):
DayChoice = [("4","Jeudi"), ("5","Vendredi"), ("6","Samedi"), ("0","Dimanche"), ("1","Lundi")]
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"),
validators.Regexp("\d+:\d+",
message=u"doit être sous la forme HH:MM")],
filters=[strip_filter])
start_time = HiddenField()
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"),
validators.Regexp("\d+:\d+",
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")]
Day_start = SelectField(u'Jour', choices=DayChoice )
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"),
validators.Regexp("\d+:\d+",
message=u"doit être sous la forme HH:MM")],
@@ -532,14 +534,14 @@ class PropHForm(MyBaseForm):
class PropMForm(MyBaseForm):
DayChoice = [("4","Jeudi"), ("5","Vendredi"), ("6","Samedi"), ("0","Dimanche"), ("1","Lundi")]
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"),
validators.Regexp("\d+:\d+",
message=u"doit être sous la forme HH:MM")],
filters=[strip_filter])
start_time = HiddenField()
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"),
validators.Regexp("\d+:\d+",
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")
setTimeout(function() {
map.invalidateSize();
toast.route();
great_route.route();
$('#map_Itineraire').eq(0).html( $('.leaflet-routing-alt').eq(0).html() );
$('.leaflet-routing-container').eq(0).attr("style","display:none;")
$('#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;
background-color: white;
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 {
margin-right: -340px;
width: 32px;
height: 32px;
}

.leaflet-routing-container h2 {
@@ -18,7 +20,11 @@
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;
margin-top: 2px;
margin-bottom: 6px;
@@ -28,6 +34,11 @@
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 {
border-bottom: none;
}
@@ -86,14 +97,15 @@
.leaflet-routing-icon-depart { background-position: -160px 0; }
.leaflet-routing-icon-enter-roundabout { background-position: -180px 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 {
padding: 4px;
padding: 4px 0px 4px 0px;
}

.leaflet-routing-geocoders input {
width: 286px;
width: 303px;
width: calc(100% - 4px);
line-height: 1.67;
border: 1px solid #ccc;
}
@@ -104,22 +116,36 @@
border-radius: 4px;
background-color: white;
margin: 0;
margin-right: 3px;
float: right;
cursor: pointer;
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 {
background-color: #eee;
}

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

.leaflet-routing-geocoder-result {
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
position: absolute;
max-height: 0;
overflow: hidden;
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 {
@@ -144,19 +170,89 @@
}

.leaflet-routing-remove-waypoint {
position: relative;
float: right;
background-color: transparent;
display: inline-block;
vertical-align: middle;
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-weight: bold;
left: 4px;
content: "\00d7";
text-align: center;
cursor: pointer;
color: #ccc;
background: white;
padding-bottom: 16px;
margin-top: -16px;
padding-right: 4px;
line-height: 1;
}

.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 */
.leaflet-map-pane,
.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-pane,
.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-image-layer,
.leaflet-layer {
@@ -20,7 +16,6 @@
}
.leaflet-container {
overflow: hidden;
-ms-touch-action: none;
}
.leaflet-tile,
.leaflet-marker-icon,
@@ -28,20 +23,49 @@
-webkit-user-select: none;
-moz-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-shadow {
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;
}
/* 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 {
filter: inherit;
visibility: hidden;
@@ -52,18 +76,26 @@
.leaflet-zoom-box {
width: 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 */
.leaflet-overlay-pane svg {
-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 {
width: 1px;
@@ -80,7 +112,8 @@
.leaflet-control {
position: relative;
z-index: 7;
z-index: 800;
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
pointer-events: auto;
}
.leaflet-top,
@@ -124,7 +157,9 @@
/* zoom and fade animations */
.leaflet-fade-anim .leaflet-tile,
.leaflet-fade-anim .leaflet-tile {
will-change: opacity;
}
.leaflet-fade-anim .leaflet-popup {
opacity: 0;
-webkit-transition: opacity 0.2s linear;
@@ -132,11 +167,17 @@
-o-transition: opacity 0.2s linear;
transition: opacity 0.2s linear;
}
.leaflet-fade-anim .leaflet-tile-loaded,
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
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 {
-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);
@@ -144,8 +185,7 @@
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile,
.leaflet-touching .leaflet-zoom-animated {
.leaflet-pan-anim .leaflet-tile {
-webkit-transition: none;
-moz-transition: none;
-o-transition: none;
@@ -159,24 +199,44 @@
/* cursors */
.leaflet-clickable {
.leaflet-interactive {
cursor: pointer;
}
.leaflet-container {
.leaflet-grab {
cursor: -webkit-grab;
cursor: -moz-grab;
}
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive {
cursor: crosshair;
}
.leaflet-popup-pane,
.leaflet-control {
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: -webkit-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 */
@@ -249,7 +309,14 @@
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 */
@@ -258,16 +325,10 @@
font: bold 18px 'Lucida Console', Monaco, monospace;
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;
}
.leaflet-touch .leaflet-control-zoom-out {
font-size: 24px;
}
/* layers control */
@@ -303,6 +364,11 @@
color: #333;
background: #fff;
}
.leaflet-control-layers-scrollbar {
overflow-y: scroll;
overflow-x: hidden;
padding-right: 5px;
}
.leaflet-control-layers-selector {
margin-top: 2px;
position: relative;
@@ -317,6 +383,11 @@
margin: 5px -10px 5px -6px;
}
/* Default icon URLs */
.leaflet-default-icon-path {
background-image: url(images/marker-icon.png);
}
/* attribution and scale controls */
@@ -354,8 +425,8 @@
font-size: 11px;
white-space: nowrap;
overflow: hidden;
-moz-box-sizing: content-box;
box-sizing: content-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
background: #fff;
background: rgba(255, 255, 255, 0.5);
@@ -386,6 +457,7 @@
.leaflet-popup {
position: absolute;
text-align: center;
margin-bottom: 20px;
}
.leaflet-popup-content-wrapper {
padding: 1px;
@@ -400,11 +472,13 @@
margin: 18px 0;
}
.leaflet-popup-tip-container {
margin: 0 auto;
width: 40px;
height: 20px;
position: relative;
position: absolute;
left: 50%;
margin-left: -20px;
overflow: hidden;
pointer-events: none;
}
.leaflet-popup-tip {
width: 17px;
@@ -422,7 +496,7 @@
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
background: white;
color: #333;
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
}
.leaflet-container a.leaflet-popup-close-button {
@@ -430,6 +504,7 @@
top: 0;
right: 0;
padding: 4px 4px 0 0;
border: none;
text-align: center;
width: 18px;
height: 14px;
@@ -476,3 +551,82 @@
background: #fff;
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 osm = new L.TileLayer(osmUrl, {minZoom: 8, maxZoom: 17, attribution: osmAttrib});
map.addLayer(osm);
var toast = L.Routing.control({
var great_route = L.Routing.control({
containerClassName: '#map_Itineraire',
show:false,
language:'fr',
waypoints: [
L.latLng(${Exch.Itin.start.gps_coord}),
L.latLng(${Exch.Itin.arrival.gps_coord})
]
});
toast.addTo(map);
great_route.addTo(map);
</script>
</div>
<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>
% endif



Loading…
Cancel
Save