summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@peacefrogs.net>2012-07-02 17:48:35 +0200
committerÉtienne Loks <etienne.loks@peacefrogs.net>2012-07-02 17:48:35 +0200
commit677cd9b02e50de2a43d30130f40b60d93e5c2f2a (patch)
treed2bcdf47ab42215c76f1eaa99dc0e04f27be3d7a
parent9703a301bf2637d053b683f458af42c7f31a80a4 (diff)
downloadChimère-677cd9b02e50de2a43d30130f40b60d93e5c2f2a.tar.bz2
Chimère-677cd9b02e50de2a43d30130f40b60d93e5c2f2a.zip
Extent JS warning activation to all pages (refs #364)
-rw-r--r--chimere/static/chimere/css/styles.css11
-rw-r--r--chimere/templates/chimere/base.html8
-rw-r--r--chimere/templates/chimere/base_user.html13
-rw-r--r--chimere/templates/chimere/edit.html1
-rw-r--r--chimere/templates/chimere/edit_route.html1
-rw-r--r--chimere/templates/chimere/main_map.html7
6 files changed, 21 insertions, 20 deletions
diff --git a/chimere/static/chimere/css/styles.css b/chimere/static/chimere/css/styles.css
index 9083911..cba308e 100644
--- a/chimere/static/chimere/css/styles.css
+++ b/chimere/static/chimere/css/styles.css
@@ -14,7 +14,7 @@ a, a:link, a:visited, legend,
}
h2, h3, th, .action li, .action li a,
-.action li li a,
+.action li li a, #no-js-message,
#footer a, #footer a:link, #footer a:visited, .ui-widget-header{
color:#fff;
}
@@ -28,7 +28,7 @@ h2, h3, th, .action li, .action li a,
body, h2, h3, th,
.ui-widget-header,
-.action li.selected,
+.action li.selected, #no-js-message,
#content .olControlLayerSwitcher .layersDiv,
#content .olControlLayerSwitcher span{
background-color:#449506;
@@ -359,6 +359,7 @@ ul#share li{
left:0px;
right:0px;
z-index:0;
+ display:none;
}
#main-map p.warning{
@@ -521,6 +522,12 @@ p.warning{
padding:0.5em;
}
+#no-js-message{
+ z-index:1000;
+ text-align:center;
+}
+
+
#welcome_button,
#permalink{
display: block;
diff --git a/chimere/templates/chimere/base.html b/chimere/templates/chimere/base.html
index cd16525..709ff9c 100644
--- a/chimere/templates/chimere/base.html
+++ b/chimere/templates/chimere/base.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-{% load chimere_tags %}
+{% load chimere_tags i18n %}
{% block extra_head %}
<link rel="stylesheet" href="{{ STATIC_URL }}chimere/css/styles.css" />
{% if css_area %}
@@ -14,6 +14,12 @@
{% endblock %}
{% endblock %}
{% block content %}
+ <div id="no-js-message">
+ <p id='no-js' class='warning'>{% trans "You must enable JavaScript in your browser to display Chimère."%}</p>
+ </div>
+<script type="text/javascript">
+ $("#no-js").hide();
+</script>
{% block top %}{% endblock %}
{% block message_map %}{% endblock %}
{% block message_edit %}{% endblock %}
diff --git a/chimere/templates/chimere/base_user.html b/chimere/templates/chimere/base_user.html
deleted file mode 100644
index d60cc15..0000000
--- a/chimere/templates/chimere/base_user.html
+++ /dev/null
@@ -1,13 +0,0 @@
-{% extends "chimere/base.html" %}
-{% load i18n %}
-{# to customize your base Chimère template add codes between the following blocks #}
-{# title of the map #}{% block title %}{% endblock %}
-{# head of the document #}{% block head %}{% endblock %}
-{# top of the page before the tabs #}{% block top %}{% endblock %}
-{# message block displayed on the map #}{% block message_map %}{% endblock %}
-{# message block displayed on the edit pages #}{% block message_edit %}{% endblock %}
-{# top of the page after the tabs #}{% block sidebar %}{% endblock %}
-{# main part of the page #}{% block content %}{% endblock %}
-{# bottom of the page before the footer #}{% block bottom %}{% endblock %}
-{# inside the footer - please leave bloc.super it shows the Chimère copyright #}
-{% block footer %}{{ block.super }}{% endblock %}
diff --git a/chimere/templates/chimere/edit.html b/chimere/templates/chimere/edit.html
index 7ab5d03..5108ab2 100644
--- a/chimere/templates/chimere/edit.html
+++ b/chimere/templates/chimere/edit.html
@@ -14,6 +14,7 @@
{% endblock %}
{% block content %}
+ {{ block.super }}
{% if submited %}{% submited %}{% endif %}
{% if error_message %}<fieldset class='edit errorlist'>
<legend>{% trans "Error" %}</legend>
diff --git a/chimere/templates/chimere/edit_route.html b/chimere/templates/chimere/edit_route.html
index 0aeacf4..fb4cf9a 100644
--- a/chimere/templates/chimere/edit_route.html
+++ b/chimere/templates/chimere/edit_route.html
@@ -14,6 +14,7 @@
{% endblock %}
{% block content %}
+ {{ block.super }}
{% if submited %}{% submited %}{% endif %}
{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
<fieldset class='edit'>
diff --git a/chimere/templates/chimere/main_map.html b/chimere/templates/chimere/main_map.html
index e716df0..534fe1f 100644
--- a/chimere/templates/chimere/main_map.html
+++ b/chimere/templates/chimere/main_map.html
@@ -29,11 +29,10 @@
<div id='category_detail'></div>
{% endblock %}
{% block content %}
- <div id='main-map'>
- <p id='no-js' class='warning'>{% trans "You must enable JavaScript in your browser to display Chimère."%}</p>
- </div>
+ {{block.super}}
+ <div id='main-map'></div>
<script type="text/javascript">
- $("#no-js").hide();
+ $("#main-map").show();
</script>
{% map_params %}
{% endblock %}