mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 05:53:39 -04:00
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)')
|
||||
|
||||
getCurrentView: ->
|
||||
tabText = _.string.underscored $('li.active')[0]?.textContent
|
||||
currentView = @subviews["editor_level_#{tabText}_tab_view"]
|
||||
if tabText is 'patches' then currentView = @patchesView
|
||||
if tabText is 'documentation' then currentView = @subviews.docs_components_view
|
||||
currentView
|
||||
currentViewID = @$el.find('.tab-pane.active').attr('id')
|
||||
return @patchesView if currentViewID is 'editor-level-patches'
|
||||
currentViewID = 'components-documentation-view' if currentViewID is 'editor-level-documentation'
|
||||
return @subviews[_.string.underscored(currentViewID)]
|
||||
|
||||
startPatchingLevel: (e) ->
|
||||
@openModalView new SaveVersionModal({model: @level})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue