mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-27 14:33:59 -04:00
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'
|
||||
'click .toggle-fullscreen': 'toggleFullscreen'
|
||||
|
||||
afterRender: ->
|
||||
super()
|
||||
@buildLanguages()
|
||||
|
||||
logoutAccount: ->
|
||||
logoutUser($('#login-email').val())
|
||||
|
||||
|
@ -41,11 +37,15 @@ module.exports = class RootView extends CocoView
|
|||
hash = location.hash
|
||||
location.hash = ''
|
||||
location.hash = hash
|
||||
@buildLanguages()
|
||||
|
||||
# TODO: automate tabs to put in hashes and navigate to them here
|
||||
|
||||
buildLanguages: ->
|
||||
$select = @$el.find(".language-dropdown").empty()
|
||||
if $select.hasClass("fancified")
|
||||
$select.parent().find('.options,.trigger').remove()
|
||||
$select.unwrap().removeClass("fancified")
|
||||
preferred = me.lang()
|
||||
codes = _.keys(locale)
|
||||
genericCodes = _.filter codes, (code) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue