Commit 9797b34c by David Baumgold

Pluralize CMS.URL.TEXTBOOK

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