Documentation tab for Level Editor
This commit is contained in:
parent
b77b796cef
commit
3b704330d6
2 changed files with 6 additions and 2 deletions
app/views
|
@ -1,4 +1,5 @@
|
||||||
RootView = require 'views/kinds/RootView'
|
#RootView = require 'views/kinds/RootView'
|
||||||
|
CocoView = require 'views/kinds/CocoView'
|
||||||
template = require 'templates/docs/components'
|
template = require 'templates/docs/components'
|
||||||
CocoCollection = require 'collections/CocoCollection'
|
CocoCollection = require 'collections/CocoCollection'
|
||||||
LevelComponent = require 'models/LevelComponent'
|
LevelComponent = require 'models/LevelComponent'
|
||||||
|
@ -7,9 +8,10 @@ class ComponentDocsCollection extends CocoCollection
|
||||||
url: '/db/level.component?project=name,description,dependencies,propertyDocumentation,code'
|
url: '/db/level.component?project=name,description,dependencies,propertyDocumentation,code'
|
||||||
model: LevelComponent
|
model: LevelComponent
|
||||||
|
|
||||||
module.exports = class ComponentDocumentationView extends RootView
|
module.exports = class ComponentDocumentationView extends CocoView
|
||||||
id: 'docs-components-view'
|
id: 'docs-components-view'
|
||||||
template: template
|
template: template
|
||||||
|
className: 'tab-pane'
|
||||||
|
|
||||||
constructor: (options) ->
|
constructor: (options) ->
|
||||||
super(options)
|
super(options)
|
||||||
|
|
|
@ -16,6 +16,7 @@ LevelForkView = require './modals/ForkLevelModal'
|
||||||
SaveVersionModal = require 'views/modal/SaveVersionModal'
|
SaveVersionModal = require 'views/modal/SaveVersionModal'
|
||||||
PatchesView = require 'views/editor/PatchesView'
|
PatchesView = require 'views/editor/PatchesView'
|
||||||
VersionHistoryView = require './modals/LevelVersionsModal'
|
VersionHistoryView = require './modals/LevelVersionsModal'
|
||||||
|
ComponentDocsView = require 'views/docs/ComponentDocumentationView'
|
||||||
|
|
||||||
module.exports = class LevelEditView extends RootView
|
module.exports = class LevelEditView extends RootView
|
||||||
id: 'editor-level-view'
|
id: 'editor-level-view'
|
||||||
|
@ -71,6 +72,7 @@ module.exports = class LevelEditView extends RootView
|
||||||
@scriptsTab = @insertSubView new ScriptsTabView world: @world, supermodel: @supermodel, files: @files
|
@scriptsTab = @insertSubView new ScriptsTabView world: @world, supermodel: @supermodel, files: @files
|
||||||
@componentsTab = @insertSubView new ComponentsTabView supermodel: @supermodel
|
@componentsTab = @insertSubView new ComponentsTabView supermodel: @supermodel
|
||||||
@systemsTab = @insertSubView new SystemsTabView supermodel: @supermodel
|
@systemsTab = @insertSubView new SystemsTabView supermodel: @supermodel
|
||||||
|
@componentDocsTab = @insertSubView new ComponentDocsView supermodel: @supermodel
|
||||||
Backbone.Mediator.publish 'level-loaded', level: @level
|
Backbone.Mediator.publish 'level-loaded', level: @level
|
||||||
@showReadOnly() if me.get('anonymous')
|
@showReadOnly() if me.get('anonymous')
|
||||||
@patchesView = @insertSubView(new PatchesView(@level), @$el.find('.patches-view'))
|
@patchesView = @insertSubView(new PatchesView(@level), @$el.find('.patches-view'))
|
||||||
|
|
Reference in a new issue