fixing language selection disappearance when showing cached home view
This commit is contained in:
parent
b3009ae909
commit
34df232d4f
1 changed files with 4 additions and 4 deletions
|
@ -18,10 +18,6 @@ module.exports = class RootView extends CocoView
|
||||||
'change .language-dropdown': 'showDiplomatSuggestionModal'
|
'change .language-dropdown': 'showDiplomatSuggestionModal'
|
||||||
'click .toggle-fullscreen': 'toggleFullscreen'
|
'click .toggle-fullscreen': 'toggleFullscreen'
|
||||||
|
|
||||||
afterRender: ->
|
|
||||||
super()
|
|
||||||
@buildLanguages()
|
|
||||||
|
|
||||||
logoutAccount: ->
|
logoutAccount: ->
|
||||||
logoutUser($('#login-email').val())
|
logoutUser($('#login-email').val())
|
||||||
|
|
||||||
|
@ -41,11 +37,15 @@ module.exports = class RootView extends CocoView
|
||||||
hash = location.hash
|
hash = location.hash
|
||||||
location.hash = ''
|
location.hash = ''
|
||||||
location.hash = hash
|
location.hash = hash
|
||||||
|
@buildLanguages()
|
||||||
|
|
||||||
# TODO: automate tabs to put in hashes and navigate to them here
|
# TODO: automate tabs to put in hashes and navigate to them here
|
||||||
|
|
||||||
buildLanguages: ->
|
buildLanguages: ->
|
||||||
$select = @$el.find(".language-dropdown").empty()
|
$select = @$el.find(".language-dropdown").empty()
|
||||||
|
if $select.hasClass("fancified")
|
||||||
|
$select.parent().find('.options,.trigger').remove()
|
||||||
|
$select.unwrap().removeClass("fancified")
|
||||||
preferred = me.lang()
|
preferred = me.lang()
|
||||||
codes = _.keys(locale)
|
codes = _.keys(locale)
|
||||||
genericCodes = _.filter codes, (code) ->
|
genericCodes = _.filter codes, (code) ->
|
||||||
|
|
Reference in a new issue