Language and selected currency class now match

This commit is contained in:
Felipe Martín 2015-09-07 20:53:54 +02:00
parent 946c14530a
commit d3c71ba13f
2 changed files with 4 additions and 3 deletions

View File

@ -61,8 +61,8 @@
var self = this;
if (this.currencies.indexOf(currency) !== -1) {
if (this.DEBUG) console.log('[money] set user currency: ' + currency)
$('[data-currency-change]').removeClass('underlined');
$('[data-currency-change="' + currency + '"]').addClass('underlined');
$('[data-currency-change]').removeClass('active');
$('[data-currency-change="' + currency + '"]').addClass('active');
window.localStorage.setItem('currency', currency);
this.currency = currency;
this.convertPrices();

View File

@ -1,5 +1,6 @@
{% load static i18n account %}
{% user_display user as user_display %}
{% get_current_language as LANGUAGE_CODE %}
<!DOCTYPE html>
<html>
@ -148,7 +149,7 @@
<div class="ui link list">
{% for lang_code, lang_name in languages %}
{% language lang_code %}
<a class="item" href="#">{{ lang_name }}</a>
<a class="item {% if lang_code == LANGUAGE_CODE %}active{% endif %}" href="#">{{ lang_name }}</a>
{% endlanguage %}
{% endfor %}
</div>