-
+ {% for message in messages %}
+
- {{ message }} + {% endfor %} +
diff --git a/scripts/univcloud-geo2idp.py b/scripts/univcloud-geo2idp.py index ce3dcf8..fb59e82 100755 --- a/scripts/univcloud-geo2idp.py +++ b/scripts/univcloud-geo2idp.py @@ -49,7 +49,7 @@ for idp in get_idp_list_sorted(): entity_id = idp['entity_id'] name = idp['name'] geo = geo_idps.get(entity_id, {}).get('geo', { 'lat': 47.0 + 2.0*math.sin(n), 'lon': 2.5 + 3.0*math.cos(n) }) - href = '/sso?' + urllib.urlencode([('entity_id', entity_id)]) + href = '/authsaml2/sso?' + urllib.urlencode([('entity_id', entity_id)]) li = u'
' + text + '
'); + new_markers.push(marker); + } + markers.clearLayers(); + markers.addLayers(new_markers); +} + +function delayRefresh(e) { + clearTimeout(refreshmarkersTimeout); + refreshmarkersTimeout = setTimeout(refreshmarkers, 500); +} + +map.fitBounds(start_bounds); +map.addLayer(markers); +refreshmarkers(); +map.on('moveend', delayRefresh); +searchinput.on('keyup webkitspeechchange speechchange', delayRefresh); + +searchinput.focus(); + +// handle up/page-up and down/page-down keys + +$('a#preferedidp').on('keydown', function(e) { + if ((e.which == 40) || (e.which == 34)) { // down & page-down + e.preventDefault(); + searchinput.focus(); + }; + if ((e.which == 38) || (e.which == 33)) { // up && page-up + e.preventDefault(); + $('ul#idps li:not(.hidden):last a').focus(); + }; +}); + +searchinput.on('keydown', function(e) { + if ((e.which == 40) || (e.which == 34)) { // down & page-down + e.preventDefault(); + $('ul#idps li:not(.hidden):first a').focus(); + } + if ((e.which == 38) || (e.which == 33)) { // up && page-up + e.preventDefault(); + $('a#preferedidp').focus(); + } +}); + +$('ul#idps').on('keydown', function(e) { + if ((e.which == 40) || (e.which == 34)) { // down & page-down + e.preventDefault(); + a = $('ul#idps a:focus').parent().nextAll('li:not(.hidden)').first().find('a'); + if (a.length == 0) { + $('a#preferedidp').focus(); + } else { + a.focus(); + } + }; + if ((e.which == 38) || (e.which == 33)) { // up && page-up + e.preventDefault(); + a = $('ul#idps a:focus').parent().prevAll('li:not(.hidden)').first().find('a'); + if (a.length == 0) { + searchinput.focus(); + } else { + a.focus(); + } + }; +}); + +}); diff --git a/univcloud/templates/base.html b/univcloud/templates/base.html new file mode 100644 index 0000000..926cdcd --- /dev/null +++ b/univcloud/templates/base.html @@ -0,0 +1,42 @@ +{% load url from future %} +{% load i18n %} + + + + +{% trans 'Mot de passe incorrect.' %}
@@ -37,4 +56,6 @@