mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
Fixed #892 by having the components tab reload whenever it's opened.
This commit is contained in:
parent
4221fd55cb
commit
ed222338e7
3 changed files with 4 additions and 4 deletions
|
@ -24,7 +24,7 @@ block header
|
||||||
li
|
li
|
||||||
a(href="#editor-level-settings-tab-view", data-toggle="tab", data-i18n="editor.level_tab_settings") Settings
|
a(href="#editor-level-settings-tab-view", data-toggle="tab", data-i18n="editor.level_tab_settings") Settings
|
||||||
li
|
li
|
||||||
a(href="#editor-level-components-tab-view", data-toggle="tab", data-i18n="editor.level_tab_components") Components
|
a(href="#editor-level-components-tab-view", data-toggle="tab", data-i18n="editor.level_tab_components")#components-tab Components
|
||||||
li
|
li
|
||||||
a(href="#editor-level-systems-tab-view", data-toggle="tab", data-i18n="editor.level_tab_systems") Systems
|
a(href="#editor-level-systems-tab-view", data-toggle="tab", data-i18n="editor.level_tab_systems") Systems
|
||||||
li
|
li
|
||||||
|
|
|
@ -14,7 +14,6 @@ module.exports = class ComponentsTabView extends View
|
||||||
className: 'tab-pane'
|
className: 'tab-pane'
|
||||||
|
|
||||||
subscriptions:
|
subscriptions:
|
||||||
'level-thangs-changed': 'onLevelThangsChanged'
|
|
||||||
'edit-level-component': 'editLevelComponent'
|
'edit-level-component': 'editLevelComponent'
|
||||||
'level-component-edited': 'onLevelComponentEdited'
|
'level-component-edited': 'onLevelComponentEdited'
|
||||||
'level-component-editing-ended': 'onLevelComponentEditingEnded'
|
'level-component-editing-ended': 'onLevelComponentEditingEnded'
|
||||||
|
@ -24,8 +23,8 @@ module.exports = class ComponentsTabView extends View
|
||||||
'click #create-new-component-button-no-select': 'createNewLevelComponent'
|
'click #create-new-component-button-no-select': 'createNewLevelComponent'
|
||||||
|
|
||||||
onLoaded: ->
|
onLoaded: ->
|
||||||
onLevelThangsChanged: (e) ->
|
|
||||||
thangsData = e.thangsData
|
refreshLevelThangsTreema: (thangsData) ->
|
||||||
presentComponents = {}
|
presentComponents = {}
|
||||||
for thang in thangsData
|
for thang in thangsData
|
||||||
for component in thang.components
|
for component in thang.components
|
||||||
|
|
|
@ -29,6 +29,7 @@ module.exports = class EditorLevelView extends View
|
||||||
'click #fork-level-start-button': 'startForkingLevel'
|
'click #fork-level-start-button': 'startForkingLevel'
|
||||||
'click #level-history-button': 'showVersionHistory'
|
'click #level-history-button': 'showVersionHistory'
|
||||||
'click #patches-tab': -> @patchesView.load()
|
'click #patches-tab': -> @patchesView.load()
|
||||||
|
'click #components-tab': -> @componentsTab.refreshLevelThangsTreema @level.get('thangs')
|
||||||
'click #level-patch-button': 'startPatchingLevel'
|
'click #level-patch-button': 'startPatchingLevel'
|
||||||
'click #level-watch-button': 'toggleWatchLevel'
|
'click #level-watch-button': 'toggleWatchLevel'
|
||||||
'click #pop-level-i18n-button': -> @level.populateI18N()
|
'click #pop-level-i18n-button': -> @level.populateI18N()
|
||||||
|
|
Loading…
Reference in a new issue