This commit is contained in:
Nick Winter 2014-04-12 12:35:45 -07:00
parent 00d3c48a0c
commit 8349578057
2 changed files with 2 additions and 5 deletions

View file

@ -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)

View file

@ -227,4 +227,3 @@ module.exports = class PlayView extends View
super()
@$el.find('.modal').on 'shown.bs.modal', ->
$('input:visible:first', @).focus()