Skip to content

Commit

Permalink
Quiz feature - prepared code for initial review
Browse files Browse the repository at this point in the history
  • Loading branch information
zeala committed Dec 20, 2015
1 parent ebac70b commit 3bf6929
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,6 @@ Template.multipleChoiceTemplate.events({
}
question.options = options;
},
'keyup .js-option-title-input': function(event){
var index = parseInt(event.target.id);
var text = $(event.target).val();
var question = Template.currentData().question;
var option = question.options[index];
option.title = text;
},


});
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,11 @@ Template.multipleChoiceInputField.helpers({
});

Template.multipleChoiceInputField.events({

'keyup .js-option-title-input': function(event){
var index = parseInt(event.target.id);
var text = $(event.target).val();
var question = Template.currentData().question;
var option = Template.currentData().option;
option.title = text;
},
})

0 comments on commit 3bf6929

Please sign in to comment.