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