From 8310cbd6b97cd4fc27412cba28be3d89868bbb78 Mon Sep 17 00:00:00 2001 From: Brian Carstensen Date: Wed, 20 Mar 2013 11:38:50 -0500 Subject: [PATCH] Hide the picker for now, pick up the language from the URL params --- app/controllers/language_picker.coffee | 4 +++- css/language_picker.styl | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/language_picker.coffee b/app/controllers/language_picker.coffee index 56ace55..a292589 100644 --- a/app/controllers/language_picker.coffee +++ b/app/controllers/language_picker.coffee @@ -17,7 +17,9 @@ class LanguagePicker className: 'language-picker' constructor: -> - preferredLanguage = localStorage.preferredLanguage || DEFAULT + preferredLanguage = try location.search.match(/lang=([\$|\w]+)/)[1] + preferredLanguage ||= localStorage.preferredLanguage + preferredLanguage ||= DEFAULT HTML.attr 'data-language', preferredLanguage @el = $("") diff --git a/css/language_picker.styl b/css/language_picker.styl index 89ac423..eafb1f7 100644 --- a/css/language_picker.styl +++ b/css/language_picker.styl @@ -1,5 +1,6 @@ .language-picker bottom: 0 + display: none // TODO position: fixed right: 0 z-index: 3