#276 Automatic lesson summary page
- Basic overview of all the assignments needed to be solved in a lesson - Clicking on a link will jump to the correct page with the assignment - Lesson completed also updates lesson overview immediately
This commit is contained in:
@ -0,0 +1,24 @@
|
||||
define([
|
||||
'backbone'],
|
||||
function(
|
||||
Backbone) {
|
||||
return Backbone.View.extend({
|
||||
tagName: 'li',
|
||||
template: _.template($('#assignmentTemplate').html() ),
|
||||
|
||||
events: {
|
||||
"click a": "clicked"
|
||||
},
|
||||
|
||||
clicked: function(e){
|
||||
e.preventDefault();
|
||||
var id = $(e.currentTarget).data("id");
|
||||
Backbone.trigger('assignment:navTo',{'assignment': id});
|
||||
},
|
||||
|
||||
render: function() {
|
||||
this.$el.html(this.template(this.model.toJSON()));
|
||||
return this;
|
||||
}
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user