layout and language changer
This commit is contained in:
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 427 B |
@@ -187,6 +187,9 @@ function Qupdate(selector){
|
|||||||
setTranslations(selector);
|
setTranslations(selector);
|
||||||
}
|
}
|
||||||
function setTranslations(selector){
|
function setTranslations(selector){
|
||||||
|
var list = $('#top-navigation-list');
|
||||||
|
list.find('.locale').show();
|
||||||
|
list.find('.locale-'+$locale).hide();
|
||||||
if(selector){
|
if(selector){
|
||||||
$(selector).find('[data-t]').each(function(){$(this).text(t($(this).attr('data-t')))})
|
$(selector).find('[data-t]').each(function(){$(this).text(t($(this).attr('data-t')))})
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -67,6 +67,15 @@ body
|
|||||||
.order-count-cell
|
.order-count-cell
|
||||||
white-space: nowrap
|
white-space: nowrap
|
||||||
.page-header
|
.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
|
#list-needs-help-button
|
||||||
button
|
button
|
||||||
margin-left: 5px
|
margin-left: 5px
|
||||||
|
|||||||
@@ -68,7 +68,9 @@ html lang="en"
|
|||||||
= link_to image_tag('icons/logo-small.png', alt: application_title), user_root_path, class: :brand
|
= link_to image_tag('icons/logo-small.png', alt: application_title), user_root_path, class: :brand
|
||||||
.container.nav-collapse
|
.container.nav-collapse
|
||||||
ul.nav#top-navigation-list
|
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
|
.container
|
||||||
.content
|
.content
|
||||||
.alert.alert-error.hide
|
.alert.alert-error.hide
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ for action in uc.action_methods
|
|||||||
## WRITE TO IOS PATH
|
## WRITE TO IOS PATH
|
||||||
ios_view = result.gsub /(href|src)="\/user\/([^"]+)/, %|\\1="./\\2| # replace absolute path names to relative ones
|
ios_view = result.gsub /(href|src)="\/user\/([^"]+)/, %|\\1="./\\2| # replace absolute path names to relative ones
|
||||||
ios_view = ios_view.gsub /(href|src)="\/assets\/([^"]+)/, %|\\1="./assets/\\2| # make assets calls relative
|
ios_view = ios_view.gsub /(href|src)="\/assets\/([^"]+)/, %|\\1="./assets/\\2| # make assets calls relative
|
||||||
ios_view.sub! /<\/title>/, '</title><script type="text/javascript" src="qmobile.js"><script type="text/javascript" src="cordova-2.2.0.js"></script><script type="text/javascript" src="barcodescanner.js"></script>'
|
ios_view.sub! /<\/title>/, '</title><script type="text/javascript" src="qmobile.js"></script><script type="text/javascript" src="cordova-2.2.0.js"></script><script type="text/javascript" src="barcodescanner.js"></script>'
|
||||||
ios_view.gsub! '##assets_path##', './assets/'
|
ios_view.gsub! '##assets_path##', './assets/'
|
||||||
File.open(File.join(ios_root, "#{action}.html"), 'w'){|f| f.puts ios_view}
|
File.open(File.join(ios_root, "#{action}.html"), 'w'){|f| f.puts ios_view}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user