Unjanking getCurrentView.

This commit is contained in:
Scott Erickson 2014-09-02 16:58:34 -07:00
parent daca7b54f3
commit 6394482c34

View file

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