Merge branch 'master' into production

This commit is contained in:
Scott Erickson 2014-01-22 20:49:18 -08:00
commit 0fb5b1c2ea
3 changed files with 11 additions and 8 deletions

View file

@ -0,0 +1,7 @@
LevelComponent = require 'models/LevelComponent'
CocoCollection = require 'models/CocoCollection'
module.exports = class ComponentsCollection extends CocoCollection
url: '/db/level_component/search'
model: LevelComponent

View file

@ -2,8 +2,8 @@ VersionsView = require 'views/kinds/VersionsView'
module.exports = class SuperVersionsView extends VersionsView
id: "editor-component-versions-view"
url: "/db/component/"
url: "/db/level.component/"
page: "component"
constructor: (options, @ID) ->
super options, ID, require 'models/Component'
super options, ID, require 'models/LevelComponent'

View file

@ -3,13 +3,9 @@ template = require 'templates/editor/components/main'
Level = require 'models/Level'
LevelComponent = require 'models/LevelComponent'
CocoCollection = require 'models/CocoCollection'
ComponentsCollection = require 'collections/ComponentsCollection'
ComponentConfigView = require './config'
class ComponentsSearchCollection extends CocoCollection
url: '/db/level_component/search'
model: LevelComponent
module.exports = class ThangComponentEditView extends CocoView
id: "thang-components-edit-view"
template: template
@ -25,7 +21,7 @@ module.exports = class ThangComponentEditView extends CocoView
for model in [Level, LevelComponent]
(new model()).on 'schema-loaded', @render unless model.schema?.loaded
if not @componentCollection
@componentCollection = @supermodel.getCollection new ComponentsSearchCollection()
@componentCollection = @supermodel.getCollection new ComponentsCollection()
unless @componentCollection.loaded
@componentCollection.once 'sync', @onComponentsSync
@componentCollection.fetch()