Commit 9797b34c by David Baumgold

Pluralize CMS.URL.TEXTBOOK

parent 77ae9a6a
......@@ -18,9 +18,9 @@ CMS.Models.Textbook = Backbone.AssociatedModel.extend({
},
url: function() {
if(this.isNew()) {
return CMS.URL.TEXTBOOK + "/new";
return CMS.URL.TEXTBOOKS + "/new";
} else {
return CMS.URL.TEXTBOOK + "/" + this.id;
return CMS.URL.TEXTBOOKS + "/" + this.id;
}
},
parse: function(response) {
......@@ -71,7 +71,7 @@ CMS.Models.Textbook = Backbone.AssociatedModel.extend({
});
CMS.Collections.TextbookSet = Backbone.Collection.extend({
model: CMS.Models.Textbook,
url: function() { return CMS.URL.TEXTBOOK; },
url: function() { return CMS.URL.TEXTBOOKS; },
save: function(options) {
return this.sync('update', this, options);
}
......
......@@ -17,7 +17,7 @@
<%block name="jsextra">
<script type="text/javascript">
CMS.URL.UPLOAD_ASSET = "${upload_asset_url}"
CMS.URL.TEXTBOOK = "${textbook_url}"
CMS.URL.TEXTBOOKS = "${textbook_url}"
window.section = new CMS.Models.Section({
id: "${course.id}",
name: "${course.display_name_with_default | h}"
......
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