2011-11-19 14:47:56 +00:00
|
|
|
class Locomotive.Models.ContentAsset extends Backbone.Model
|
|
|
|
|
2011-12-07 15:10:21 +00:00
|
|
|
paramRoot: 'content_asset'
|
|
|
|
|
|
|
|
urlRoot: "#{Locomotive.mount_on}/content_assets"
|
|
|
|
|
2011-11-19 14:47:56 +00:00
|
|
|
initialize: ->
|
2011-12-07 15:10:21 +00:00
|
|
|
@prepare()
|
|
|
|
|
|
|
|
prepare: ->
|
2011-11-19 14:47:56 +00:00
|
|
|
@set
|
|
|
|
image: @get('content_type') == 'image'
|
|
|
|
|
2011-12-07 15:10:21 +00:00
|
|
|
return @
|
|
|
|
|
2011-11-19 14:47:56 +00:00
|
|
|
class Locomotive.Models.ContentAssetsCollection extends Backbone.Collection
|
|
|
|
|
|
|
|
model: Locomotive.Models.ContentAsset
|
|
|
|
|
|
|
|
url: "#{Locomotive.mount_on}/content_assets"
|