2013-06-22 08:24:24 +02:00
|
|
|
|
'use strict';
|
2013-06-21 03:43:58 +02:00
|
|
|
|
define(
|
|
|
|
|
[
|
2013-06-21 07:19:41 +02:00
|
|
|
|
'app',
|
2013-06-21 03:43:58 +02:00
|
|
|
|
'backbone',
|
|
|
|
|
'Series/SeriesModel'
|
|
|
|
|
], function (App, Backbone, SeriesModel) {
|
|
|
|
|
return Backbone.Collection.extend({
|
|
|
|
|
url : Constants.ApiRoot + '/series/lookup',
|
|
|
|
|
model: SeriesModel,
|
2013-05-13 06:24:04 +02:00
|
|
|
|
|
2013-06-21 03:43:58 +02:00
|
|
|
|
parse: function (response) {
|
2013-05-26 07:54:02 +02:00
|
|
|
|
|
2013-06-21 03:43:58 +02:00
|
|
|
|
_.each(response, function (model) {
|
|
|
|
|
model.id = undefined;
|
|
|
|
|
});
|
2013-05-26 07:54:02 +02:00
|
|
|
|
|
2013-06-21 03:43:58 +02:00
|
|
|
|
return response;
|
|
|
|
|
}
|
|
|
|
|
});
|
2013-05-13 06:24:04 +02:00
|
|
|
|
});
|