Files
edx-platform/cms/static/js/collections/checklist.js
2013-10-04 13:43:50 -04:00

24 lines
737 B
JavaScript

define(["backbone", "underscore", "js/models/checklist"],
function(Backbone, _, ChecklistModel) {
var ChecklistCollection = Backbone.Collection.extend({
model : ChecklistModel,
parse: function(response) {
_.each(response,
function( element, idx ) {
element.id = idx;
});
return response;
},
// Disable caching so the browser back button will work (checklists have links to other
// places within Studio).
fetch: function (options) {
options.cache = false;
return Backbone.Collection.prototype.fetch.call(this, options);
}
});
return ChecklistCollection;
});