Unjanking getCurrentView.
This commit is contained in:
parent
daca7b54f3
commit
6394482c34
1 changed files with 4 additions and 5 deletions
|
@ -135,11 +135,10 @@ module.exports = class LevelEditView extends RootView
|
||||||
@$el.find('#redo-button').attr('title', 'Redo ' + redoDescription + ' (Ctrl+Shift+Z)')
|
@$el.find('#redo-button').attr('title', 'Redo ' + redoDescription + ' (Ctrl+Shift+Z)')
|
||||||
|
|
||||||
getCurrentView: ->
|
getCurrentView: ->
|
||||||
tabText = _.string.underscored $('li.active')[0]?.textContent
|
currentViewID = @$el.find('.tab-pane.active').attr('id')
|
||||||
currentView = @subviews["editor_level_#{tabText}_tab_view"]
|
return @patchesView if currentViewID is 'editor-level-patches'
|
||||||
if tabText is 'patches' then currentView = @patchesView
|
currentViewID = 'components-documentation-view' if currentViewID is 'editor-level-documentation'
|
||||||
if tabText is 'documentation' then currentView = @subviews.docs_components_view
|
return @subviews[_.string.underscored(currentViewID)]
|
||||||
currentView
|
|
||||||
|
|
||||||
startPatchingLevel: (e) ->
|
startPatchingLevel: (e) ->
|
||||||
@openModalView new SaveVersionModal({model: @level})
|
@openModalView new SaveVersionModal({model: @level})
|
||||||
|
|
Reference in a new issue