mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-17 08:50:58 -05:00
Fixed #786.
This commit is contained in:
parent
00d3c48a0c
commit
8349578057
2 changed files with 2 additions and 5 deletions
|
@ -41,13 +41,13 @@ module.exports = class RootView extends CocoView
|
|||
hash = location.hash
|
||||
location.hash = ''
|
||||
location.hash = hash
|
||||
@buildLanguages()
|
||||
@renderScrollbar()
|
||||
#@$('.antiscroll-wrap').antiscroll() # not yet, buggy
|
||||
|
||||
afterRender: ->
|
||||
super(arguments...)
|
||||
@chooseTab(location.hash.replace('#','')) if location.hash
|
||||
@buildLanguages()
|
||||
$('body').removeClass('is-playing')
|
||||
|
||||
chooseTab: (category) ->
|
||||
|
@ -58,7 +58,7 @@ module.exports = class RootView extends CocoView
|
|||
buildLanguages: ->
|
||||
$select = @$el.find(".language-dropdown").empty()
|
||||
if $select.hasClass("fancified")
|
||||
$select.parent().find('.options,.trigger').remove()
|
||||
$select.parent().find('.options, .trigger').remove()
|
||||
$select.unwrap().removeClass("fancified")
|
||||
preferred = me.lang()
|
||||
codes = _.keys(locale)
|
||||
|
@ -76,10 +76,8 @@ module.exports = class RootView extends CocoView
|
|||
$.i18n.setLng(newLang, {})
|
||||
@saveLanguage(newLang)
|
||||
@render()
|
||||
@buildLanguages()
|
||||
unless newLang.split('-')[0] is "en"
|
||||
@openModalView(application.router.getView("modal/diplomat_suggestion", "_modal"))
|
||||
$('body').attr('lang', newLang)
|
||||
|
||||
saveLanguage: (newLang) ->
|
||||
me.set('preferredLanguage', newLang)
|
||||
|
|
|
@ -227,4 +227,3 @@ module.exports = class PlayView extends View
|
|||
super()
|
||||
@$el.find('.modal').on 'shown.bs.modal', ->
|
||||
$('input:visible:first', @).focus()
|
||||
|
||||
|
|
Loading…
Reference in a new issue