mirror of
https://github.com/fergalmoran/dss.git
synced 2026-01-01 06:28:39 +00:00
21 lines
874 B
CoffeeScript
Executable File
21 lines
874 B
CoffeeScript
Executable File
define ['backbone', 'vent', 'models/activity/activityItem', 'app.lib/backbone.dss.model.collection'], \
|
|
(Backbone, vent, ActivityItem, DssCollection) ->
|
|
class ActivityCollection extends DssCollection
|
|
model: ActivityItem
|
|
url:com.podnoms.settings.urlRoot + "activity/"
|
|
|
|
initialize: ->
|
|
@listenTo vent, "model:activity:new", (url) =>
|
|
console.log("ActivityCollection: activity:new")
|
|
item = new ActivityItem()
|
|
item.fetch
|
|
url: url,
|
|
success: (response) =>
|
|
console.log("ActivityCollection: item fetched")
|
|
console.log(response)
|
|
@add response
|
|
|
|
comparator: (item)->
|
|
-item.id
|
|
|
|
ActivityCollection |