Fixed , forcing reloads when populating i18n in documents.

This commit is contained in:
Scott Erickson 2014-10-28 14:21:22 -07:00
parent 895645ef6d
commit 67684b89d5
2 changed files with 11 additions and 2 deletions

View file

@ -43,7 +43,7 @@ module.exports = class LevelEditView extends RootView
'click #components-tab': -> @subviews.editor_level_components_tab_view.refreshLevelThangsTreema @level.get('thangs')
'click #level-patch-button': 'startPatchingLevel'
'click #level-watch-button': 'toggleWatchLevel'
'click #pop-level-i18n-button': -> @level.populateI18N()
'click #pop-level-i18n-button': 'onPopulateI18N'
'click a[href="#editor-level-documentation"]': 'onClickDocumentationTab'
'mouseup .nav-tabs > li a': 'toggleTab'
@ -163,6 +163,11 @@ module.exports = class LevelEditView extends RootView
button = @$el.find('#level-watch-button')
@level.watch(button.find('.watch').is(':visible'))
button.find('> span').toggleClass('secret')
onPopulateI18N: ->
@level.populateI18N()
f = -> document.location.reload()
setTimeout(f, 200)
toggleTab: (e) ->
@renderScrollbar()

View file

@ -20,7 +20,7 @@ module.exports = class LevelComponentEditView extends CocoView
'click #component-history-button': 'showVersionHistory'
'click #patch-component-button': 'startPatchingComponent'
'click #component-watch-button': 'toggleWatchComponent'
'click #pop-component-i18n-button': -> @levelComponent.populateI18N()
'click #pop-component-i18n-button': 'onPopulateI18N'
constructor: (options) ->
super options
@ -134,6 +134,10 @@ module.exports = class LevelComponentEditView extends CocoView
@levelComponent.watch(button.find('.watch').is(':visible'))
button.find('> span').toggleClass('secret')
onPopulateI18N: ->
@levelComponent.populateI18N()
@render()
destroy: ->
@destroyAceEditor(@editor)
@componentSettingsTreema?.destroy()