layout and language changer

This commit is contained in:
2012-12-11 17:04:45 +01:00
parent 754806b61f
commit 63cb3593ed
7 changed files with 16 additions and 2 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

@@ -187,6 +187,9 @@ function Qupdate(selector){
setTranslations(selector);
}
function setTranslations(selector){
var list = $('#top-navigation-list');
list.find('.locale').show();
list.find('.locale-'+$locale).hide();
if(selector){
$(selector).find('[data-t]').each(function(){$(this).text(t($(this).attr('data-t')))})
}else{
@@ -67,6 +67,15 @@ body
.order-count-cell
white-space: nowrap
.page-header
#top-navigation-list
.locale
padding-left: 30px
background-repeat: no-repeat
background-position: 15px center
&.locale-en
background-image: image-url('flags/flag-en.png')
&.locale-nl
background-image: image-url('flags/flag-nl.png')
#list-needs-help-button
button
margin-left: 5px
+3 -1
View File
@@ -68,7 +68,9 @@ html lang="en"
= link_to image_tag('icons/logo-small.png', alt: application_title), user_root_path, class: :brand
.container.nav-collapse
ul.nav#top-navigation-list
li= link_to 'View history', user_list_history_path
li.locale.locale-en= link_to_function 'English', %|setLocale('en')|
li.locale.locale-nl= link_to_function 'Nederlands', %|setLocale('nl')|
li= link_to t('user.list_history.title'), user_list_history_path, data: {t: 'list_history.title'}
.container
.content
.alert.alert-error.hide