Projet

Général

Profil

« Précédent | Suivant » 

Révision 3e79844f

Ajouté par Thomas Noël il y a plus de 9 ans

map markers, at least !

Voir les différences:

usr/local/univnautes/sp/sp/templates/registration/login.html
1 1
{% extends "base.html" %}
2 2
{% load static %}
3 3

  
4
{% block js %}
5
<script src="{% static "univnautes/leaflet/leaflet.js" %}"></script>
6
{% endblock %}
7 4
{% block css %}
8 5
<link rel="stylesheet" href="{% static "univnautes/leaflet/leaflet.css" %}" />
6
<link rel="stylesheet" href="{% static "univnautes/leaflet/MarkerCluster.css" %}" />
7
<link rel="stylesheet" href="{% static "univnautes/leaflet/MarkerCluster.Default.css" %}" />
9 8
{% endblock %}
10 9

  
11 10
{% block content %}
12 11
<div id="map">map</div>
13 12

  
14
<div id="search">
15
    <input name="" placeholder="chercher un établissement…">
16
</div>
17

  
18 13
<div id="idplist">
19 14
    <div id="idplist-static">
20 15
	    {% if defaultidps %}
......
23 18
		    {% endif %}{% endfor %}{% endfor %}
24 19
	    </ul>
25 20
	    {% endif %}
21
	    <ul>
22
		    <li><input id="search" name="search" placeholder="chercher un établissement…"></li>
23
	    </ul>
26 24
    </div>
27 25
    <div id="idplist-float">
28 26
    <ul>
29 27
        {% for idp in idps %}
30
        <li><a href="/authsaml2/sso?entity_id={{ idp.entity_id|urlencode:"" }}">{{ idp.name }}</a></li>{% endfor %}
28
	<li id="idp-{{ idp.slug }}"><a href="/authsaml2/sso?entity_id={{ idp.entity_id|urlencode:"" }}">{{ idp.name }}</a></li>{% endfor %}
31 29
    </ul>
32 30
    </div>
33 31
</div>
......
35 33

  
36 34
{% block page-end %}
37 35
<script src="{% static "univnautes/jquery/jquery-1.11.1.min.js" %}"></script>
36
<script src="{% static "univnautes/leaflet/leaflet.js" %}"></script>
37
<script src="{% static "univnautes/leaflet/leaflet.markercluster.js" %}"></script>
38
<script src="{% static "univnautes/univnautes.js" %}"></script>
39
<script src="{% static "univnautes/geoinfos.js" %}"></script>
38 40

  
39 41
<script>
40 42

  
41 43
$(document).ready(function () {
42 44
    /* float list starts just after the static one */
43
    $('#idplist-float').css('top', $('#idplist-static').height() + 'px');
45
    var static_height = $('#idplist-static').height() + 5;
46
    $('#idplist-float').css('top', static_height + 'px');
47

  
48
    univnautes(
49
        {% if geoinitialbounds %}{{ geoinitialbounds }}{% else %}null{% endif %}
50
    );
51

  
52
    $('#search').focus();
44 53

  
45
    var map = L.map('map').setView([46.5, 2.5], 6);
46
    {% if geoinitialbounds %}map.fitBounds({{ geoinitialbounds }});{% endif %}
47
    L.tileLayer('/map/{z}/{x}/{y}.png').addTo(map);
48 54
});
49 55
</script>
50 56
{% endblock %}

Formats disponibles : Unified diff