2013-06-29 01:06:16 +02:00
|
|
|
|
'use strict';
|
2013-06-25 01:41:59 +02:00
|
|
|
|
define(
|
|
|
|
|
[
|
|
|
|
|
'backbone',
|
|
|
|
|
'Series/SeriesModel'
|
|
|
|
|
], function (Backbone, SeriesModel) {
|
2013-06-30 21:57:26 +02:00
|
|
|
|
var Collection = Backbone.Collection.extend({
|
2013-06-25 01:41:59 +02:00
|
|
|
|
url : window.ApiRoot + '/series',
|
|
|
|
|
model: SeriesModel,
|
2013-05-02 09:09:35 +02:00
|
|
|
|
|
2013-06-25 01:41:59 +02:00
|
|
|
|
comparator: function (model) {
|
|
|
|
|
return model.get('title');
|
|
|
|
|
},
|
2013-05-02 09:09:35 +02:00
|
|
|
|
|
2013-06-25 01:41:59 +02:00
|
|
|
|
state: {
|
|
|
|
|
sortKey: 'title',
|
|
|
|
|
order : -1
|
|
|
|
|
}
|
|
|
|
|
});
|
2013-06-29 01:06:16 +02:00
|
|
|
|
|
2013-06-30 21:57:26 +02:00
|
|
|
|
var collection = new Collection();
|
|
|
|
|
collection.fetch();
|
|
|
|
|
|
|
|
|
|
return collection;
|
2013-02-14 19:01:30 +01:00
|
|
|
|
});
|