maposmatic-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Maposmatic-dev] [[PATCH maposmatic] 2/2] Fix language selection and nav


From: Maxime Petazzoni
Subject: [Maposmatic-dev] [[PATCH maposmatic] 2/2] Fix language selection and navigation bar (closes bug #36055)
Date: Sat, 31 Mar 2012 12:06:53 -0700

The language selection drop-down was not working anymore after the
rework of the navigation bar because the ul#nav was over the
form#langsel and prevented clicks on the select widget.

Also fixes the navigation bar in RTL mode, which was forgotten during
the navigation bar fixes previously.

Signed-off-by: Maxime Petazzoni <address@hidden>
---
 www/media/css/style-rtl.css        |    4 ----
 www/templates/maposmatic/base.html |   17 +++++++++--------
 2 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/www/media/css/style-rtl.css b/www/media/css/style-rtl.css
index 5734be2..1585926 100644
--- a/www/media/css/style-rtl.css
+++ b/www/media/css/style-rtl.css
@@ -51,10 +51,6 @@ ul#nav {
   padding-right: 2em !important;
 }
 
-ul#nav li {
-  float: right !important;
-}
-
 /* Content */
 #content {
   padding-right: 0 !important;
diff --git a/www/templates/maposmatic/base.html 
b/www/templates/maposmatic/base.html
index 9831b81..13bdbd9 100644
--- a/www/templates/maposmatic/base.html
+++ b/www/templates/maposmatic/base.html
@@ -55,14 +55,6 @@
     <div id="header">
       <h1><a href="{% url main %}">MapOSMatic</a></h1>
       <h2>{% trans "Your free city maps!" %}</h2>
-      <form name="langsel" action="/i18n/setlang/" method="post" id="langsel">
-        <select name="language" onChange="document.langsel.submit();">
-          {% for lang in LANGUAGES %}<option{% ifequal lang.0 LANGUAGE_CODE %} 
selected{% endifequal %} value="{{ lang.0 }}" {% ifequal lang.0 "ar" 
%}dir="rtl"{% else %}dir="ltr"{% endifequal %}>{{ lang.1 }}</option>
-          {% endfor %}
-        </select>
-        <noscript><input type="submit" value="Go" /></noscript>
-      </form>
-
       <ul id="nav">
         <li {% block menu-home %}{% endblock %}><a href="{% url main %}">{% 
trans "Home" %}</a></li>
         <li {% block menu-new  %}{% endblock %}><a href="{% url new  %}">{% 
trans "Create map" %}</a></li>
@@ -71,6 +63,15 @@
         <li><a href="http://news.maposmatic.org";>{% trans "News" %}</a></li>
         <li {% block menu-donate %}{% endblock %}><a href="{% url donate 
%}">{% trans "Donate" %}</a></li>
         <li {% block menu-about %}{% endblock %}><a href="{% url about %}">{% 
trans "About" %}</a></li>
+
+        <form name="langsel" action="/i18n/setlang/" method="post" 
id="langsel">
+          <select name="language" onChange="document.langsel.submit();">
+            {% for lang in LANGUAGES %}<option{% ifequal lang.0 LANGUAGE_CODE 
%} selected{% endifequal %} value="{{ lang.0 }}" {% ifequal lang.0 "ar" 
%}dir="rtl"{% else %}dir="ltr"{% endifequal %}>{{ lang.1 }}</option>
+            {% endfor %}
+          </select>
+          <noscript><input type="submit" value="Go" /></noscript>
+        </form>
+
       </ul>
     </div>
 
-- 
1.7.8.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]