Skip to content

Commit

Permalink
[#2375] Update the language snippet to use select2
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed Jul 25, 2012
1 parent 9472a94 commit bc55777
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
13 changes: 7 additions & 6 deletions ckan/public/base/css/main.css
Expand Up @@ -6553,16 +6553,14 @@ li .icon-large:before {
.site-footer:after {
clear: both;
}
.site-footer a {
color: #ffffff;
}
.site-footer,
.site-footer a,
.site-footer label {
color: #ffffff;
color: #fff;
color: rgba(255, 255, 255, 0.8);
}
.footer-links,
.attribution {
opacity: 0.8;
filter: alpha(opacity=80);
float: left;
margin-left: 20px;
width: 460px;
Expand All @@ -6587,6 +6585,9 @@ li .icon-large:before {
margin-top: 2px;
background: url("../images/ckan-logo-footer.png") no-repeat top left;
}
.attribution .select2-drop {
color: #000;
}
.profile-info {
*zoom: 1;
-webkit-border-radius: 3px 3px 0 0;
Expand Down
14 changes: 8 additions & 6 deletions ckan/public/base/less/footer.less
Expand Up @@ -4,17 +4,15 @@
padding: 20px 0;
}

.site-footer a {
color: @mastheadLinkColor;
}

.site-footer,
.site-footer a,
.site-footer label {
color: @mastheadLinkColor;
color: #fff;
color: rgba(255, 255, 255, 0.8);
}

.footer-links,
.attribution {
.opacity(80);
.makeColumn(6);
}

Expand All @@ -41,3 +39,7 @@
margin-top: 2px;
background: url("@{imagePath}/ckan-logo-footer.png") no-repeat top left;
}

.attribution .select2-drop {
color: #000;
}
6 changes: 3 additions & 3 deletions ckan/templates/snippets/language_selector.html
Expand Up @@ -2,10 +2,10 @@
{% set current_lang = request.environ.CKAN_LANG %}
<form class="form-inline form-select" action="{% url_for controller='util', action='redirect' %}" data-module="select-switch" method="POST">
<label for="field-lang-select">{{ _('Language') }}</label>
<select id="field-lang-select" name="url">
<select id="field-lang-select" name="url" data-module="autocomplete">
{% for locale in h.get_available_locales() %}
<option value="{% url_for current_url, locale=locale %}" {% if locale == current_lang %}selected="selected"{% endif %}>
{{ locale.display_name or locale.english_name }}
<option value="{% url_for current_url, locale=locale %}" {% if locale == current_lang %}selected="selected"{% endif %}>
{{ locale.display_name or locale.english_name }}
</option>
{% endfor %}
</select>
Expand Down

0 comments on commit bc55777

Please sign in to comment.