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'
|
|
|
|
|
2012-01-14 13:54:01 +00:00
|
|
|
urlRoot: "#{Locomotive.mounted_on}/content_assets"
|
2011-12-07 15:10:21 +00:00
|
|
|
|
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
|
|
|
|
|
2012-01-14 13:54:01 +00:00
|
|
|
url: "#{Locomotive.mounted_on}/content_assets"
|