PDF Textbooks: implemented "View Live" link

This commit is contained in:
Frances Botsford
2013-07-01 15:07:52 -04:00
committed by David Baumgold
parent 2a92a14054
commit b41d23747a
3 changed files with 11 additions and 3 deletions

View File

@@ -12,7 +12,10 @@ CMS.Views.ShowTextbook = Backbone.View.extend({
"click .hide-chapters": "hideChapters"
},
render: function() {
this.$el.html(this.template(this.model.attributes));
var attrs = $.extend({}, this.model.attributes);
attrs.bookindex = this.model.collection.indexOf(this.model);
attrs.course = window.section.attributes;
this.$el.html(this.template(attrs));
return this;
},
editTextbook: function(e) {