start_bounds in templates (and start_zoom is useless)

This commit is contained in:
Thomas NOËL 2013-03-22 14:56:10 +01:00
parent 80ee6ce194
commit deec571f78
6 changed files with 8 additions and 10 deletions

View File

@ -1205,7 +1205,6 @@
<geourls>aHR0cHM6Ly9zdGF0aWMuZGlzY29qdWljZS5vcmcvZmVlZHMvcmVuYXRlcg0KaHR0cDovL2lzb3MudW5pdm5hdXRlcy5lbnRyb3V2ZXJ0LmNvbS91bml2bmF1dGVzLmdlbw==</geourls>
<geolocal/>
<start_bounds>[[41.1,-5.53],[51.5,9.91]]</start_bounds>
<start_zoom>6</start_zoom>
<email_subjects>TW9uIOl0YWJsaXNzZW1lbnQgbidlc3QgcGFzIGRhbnMgbGEgbGlzdGUNCkplIG5lIGNvbm5haXMgcGFzIG1lcyBjb2RlcyBkJ2FjY+hz</email_subjects>
<email_rcpt/>
<email_host/>

View File

@ -106,6 +106,7 @@ def login(request):
'https_hostname': settings.HTTPS_HOSTNAME,
'disco_stores_read': settings.DISCO_STORES_READ,
'disco_stores_write': settings.DISCO_STORES_WRITE,
'start_bounds': settings.GEO_START_BOUNDS,
},
context_instance=RequestContext(request))

View File

@ -293,6 +293,11 @@ try:
except:
EMAIL_USE_TLS = True
try:
GEO_START_BOUNDS = root.find('installedpackages/univnautestexts/config/start_bounds').text
except:
GEO_START_BOUNDS = "[[41.1,-5.53],[51.5,9.91]]"
# local_settings.py can be used to override environment-specific settings
# like database and email that differ between development and production.

View File

@ -113,7 +113,7 @@
<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 %};
var start_zoom = 6;
</script>
<script src="{{ MEDIA_URL }}univnautes/js/univnautes.js"></script>

View File

@ -79,6 +79,7 @@ function univnautes_restart_all() {
}
function univnautes_texts_sync() {
mwexec_bg("/usr/local/etc/rc.d/univnautes.sh restart");
mwexec_bg("/usr/local/bin/univnautes-update-map.sh");
univnautes_texts_build();
}

View File

@ -108,14 +108,6 @@
<type>input</type>
<size>40</size>
</field>
<field>
<fielddescr>Initial zoom</fielddescr>
<fieldname>start_zoom</fieldname>
<description>A number. If empty, use 6</description>
<default_value></default_value>
<type>input</type>
<size>4</size>
</field>
<field>
<type>listtopic</type>
<name>Email form configuration (/mail)</name>