summaryrefslogtreecommitdiffstats
path: root/virtualenv/pffedportal
diff options
context:
space:
mode:
authorThomas NOEL <tnoel@entrouvert.com>2013-03-22 12:57:32 (GMT)
committerThomas NOEL <tnoel@entrouvert.com>2013-03-22 12:57:32 (GMT)
commit1791c30d31afa27ed379e1e7b19d601a55d8c273 (patch)
tree6727e95f3a7a394b686b5e121d8313cfa3afdff2 /virtualenv/pffedportal
parentdb907bc479161df74cf966d6a8584c7ec1dc0817 (diff)
downloadunivnautes-old-1791c30d31afa27ed379e1e7b19d601a55d8c273.zip
univnautes-old-1791c30d31afa27ed379e1e7b19d601a55d8c273.tar.gz
univnautes-old-1791c30d31afa27ed379e1e7b19d601a55d8c273.tar.bz2
css/js: better handling of screen size
Diffstat (limited to 'virtualenv/pffedportal')
-rw-r--r--virtualenv/pffedportal/media/univnautes/css/univnautes.css8
-rw-r--r--virtualenv/pffedportal/media/univnautes/js/univnautes.js12
-rw-r--r--virtualenv/pffedportal/templates/login0.html9
3 files changed, 19 insertions, 10 deletions
diff --git a/virtualenv/pffedportal/media/univnautes/css/univnautes.css b/virtualenv/pffedportal/media/univnautes/css/univnautes.css
index f3656df..25c4692 100644
--- a/virtualenv/pffedportal/media/univnautes/css/univnautes.css
+++ b/virtualenv/pffedportal/media/univnautes/css/univnautes.css
@@ -21,9 +21,9 @@ a.discoidp, a.defaultidp {
/* Large desktop */
@media (min-width: 1200px) {
- #map { height: 700px; }
+ #map { height: 560px; }
ul#idps {
- height: 570px;
+ height: 350px;
overflow-y: auto;
}
}
@@ -32,7 +32,7 @@ a.discoidp, a.defaultidp {
@media (min-width: 768px) and (max-width: 979px) {
#map { height: 500px; }
ul#idps {
- height: 350px;
+ height: 290px;
overflow-y: auto;
}
}
@@ -41,7 +41,7 @@ a.discoidp, a.defaultidp {
@media (max-width: 767px) {
#map { height: 450px; }
ul#idps {
- height: 300px;
+ height: 240px;
overflow-y: auto;
}
}
diff --git a/virtualenv/pffedportal/media/univnautes/js/univnautes.js b/virtualenv/pffedportal/media/univnautes/js/univnautes.js
index c81549d..4ab7ed5 100644
--- a/virtualenv/pffedportal/media/univnautes/js/univnautes.js
+++ b/virtualenv/pffedportal/media/univnautes/js/univnautes.js
@@ -1,9 +1,12 @@
$(function() {
+var start_lat = (start_bounds[0][0] + start_bounds[1][0])/2;
+var start_lon = (start_bounds[0][1] + start_bounds[1][1])/2;
+var start_center = [start_lat, start_lon];
+
var redirectTimeout;
var refreshmarkersTimeout;
var redirectLink = '';
-var metropole = [ [41.1, -5.53], [51.5, 9.91] ];
var mapstyle = 'cm-22677';
var searchinput = $('input#search');
var markers = new L.MarkerClusterGroup({
@@ -13,11 +16,12 @@ var markers = new L.MarkerClusterGroup({
animateAddingMarkers: false,
disableClusteringAtZoom: 50,
maxClusterRadius: 25,
+ spiderfyDistanceMultiplier: 3,
// singleMarkerMode: true,
});
var map = L.map('map', {
- center: [46.5, 2.0],
- zoom: 6,
+ center: start_center,
+ zoom: start_zoom,
maxZoom: 16,
});
@@ -102,7 +106,7 @@ function delayRefresh(e) {
refreshmarkersTimeout = setTimeout(refreshmarkers, 500);
}
-map.fitBounds(metropole);
+map.fitBounds(start_bounds);
map.addLayer(markers);
refreshmarkers();
map.on('moveend', delayRefresh);
diff --git a/virtualenv/pffedportal/templates/login0.html b/virtualenv/pffedportal/templates/login0.html
index 4a0a013..ec31308 100644
--- a/virtualenv/pffedportal/templates/login0.html
+++ b/virtualenv/pffedportal/templates/login0.html
@@ -17,7 +17,7 @@
{% block content %}
<div class="row-fluid">
- <div class="span4">
+ <div class="span5">
{% if disco_stores_read %}
<div class="well sidebar-nav" id="discoidp">
@@ -49,7 +49,7 @@
</div><!--/.well -->
</div><!--/span-->
- <div class="span8">
+ <div class="span7">
<div class="row-fluid">
<div id="map" class="span12">Si la carte ne s'affiche pas, sélectionnez votre établissement d'origine dans la liste.</div>
</div>
@@ -111,6 +111,11 @@
</script>
{% endif %}
+<script>
+ var start_bounds = {% if start_bounds %}{{ start_bounds }}{% else %}[[41.1, -5.53], [51.5, 9.91]]{% endif %};
+ var start_zoom = {% if start_zoom %}{{ start_zoom }}{% else %}6{% endif %};
+</script>
+
<script src="{{ MEDIA_URL }}univnautes/js/univnautes.js"></script>
{% endblock %}