Skip to content

Commit

Permalink
Fix Meteor demo
Browse files Browse the repository at this point in the history
  • Loading branch information
dandv committed Dec 17, 2014
2 parents cd37a0d + 20ed2ca commit efe6f00
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 2 deletions.
9 changes: 8 additions & 1 deletion meteor/example/client/define-object-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,21 @@ Template.sortableItemTarget.events({
name.hide();
input.focus();
},
'blur input': function (event, template) {
'blur input[type=text]': function (event, template) {
// commit the change to the name
var input = template.$('input');
input.hide();
template.$('.name').show();
// TODO - what is the collection here? We'll hard-code for now.
// https://github.com/meteor/meteor/issues/3303
Attributes.update(this._id, {$set: {name: input.val()}});
},
'keydown input[type=text]': function(event) {
// ESC or ENTER
if (event.which === 27 || event.which === 13) {
event.preventDefault();
event.target.blur();
}
}
});

Expand Down
1 change: 0 additions & 1 deletion meteor/example/package.json

This file was deleted.

0 comments on commit efe6f00

Please sign in to comment.