Commit ce26d524 by David Baumgold

set order attribute on chapters from server

parent f6ee5cf6
......@@ -55,6 +55,9 @@ CMS.Models.Textbook = Backbone.AssociatedModel.extend({
response.chapters = {"url": response.url};
delete response.url;
}
_.each(response.chapters, function(chapter, i) {
chapter.order = chapter.order || i+1;
})
return response;
},
toJSON: function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment