Documentation tab for Level Editor

This commit is contained in:
Darredevil 2014-07-25 23:06:04 +03:00
parent b77b796cef
commit 3b704330d6
2 changed files with 6 additions and 2 deletions

View file

@ -1,4 +1,5 @@
RootView = require 'views/kinds/RootView'
#RootView = require 'views/kinds/RootView'
CocoView = require 'views/kinds/CocoView'
template = require 'templates/docs/components'
CocoCollection = require 'collections/CocoCollection'
LevelComponent = require 'models/LevelComponent'
@ -7,9 +8,10 @@ class ComponentDocsCollection extends CocoCollection
url: '/db/level.component?project=name,description,dependencies,propertyDocumentation,code'
model: LevelComponent
module.exports = class ComponentDocumentationView extends RootView
module.exports = class ComponentDocumentationView extends CocoView
id: 'docs-components-view'
template: template
className: 'tab-pane'
constructor: (options) ->
super(options)

View file

@ -16,6 +16,7 @@ LevelForkView = require './modals/ForkLevelModal'
SaveVersionModal = require 'views/modal/SaveVersionModal'
PatchesView = require 'views/editor/PatchesView'
VersionHistoryView = require './modals/LevelVersionsModal'
ComponentDocsView = require 'views/docs/ComponentDocumentationView'
module.exports = class LevelEditView extends RootView
id: 'editor-level-view'
@ -71,6 +72,7 @@ module.exports = class LevelEditView extends RootView
@scriptsTab = @insertSubView new ScriptsTabView world: @world, supermodel: @supermodel, files: @files
@componentsTab = @insertSubView new ComponentsTabView supermodel: @supermodel
@systemsTab = @insertSubView new SystemsTabView supermodel: @supermodel
@componentDocsTab = @insertSubView new ComponentDocsView supermodel: @supermodel
Backbone.Mediator.publish 'level-loaded', level: @level
@showReadOnly() if me.get('anonymous')
@patchesView = @insertSubView(new PatchesView(@level), @$el.find('.patches-view'))