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