Skip to content

Commit

Permalink
Use newer form of Template.foo.events.
Browse files Browse the repository at this point in the history
  • Loading branch information
glasser committed Oct 16, 2012
1 parent 7b03dfc commit 2f11def
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/parties/client/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ var coordsRelativeToElement = function (element, event) {
return { x: x, y: y };
};

Template.map.events = {
Template.map.events({
'mousedown circle, mousedown text': function (event, template) {
Session.set("selected", event.currentTarget.id);
},
Expand All @@ -120,7 +120,7 @@ Template.map.events = {
var coords = coordsRelativeToElement(event.currentTarget, event);
openCreateDialog(coords.x / 500, coords.y / 500);
}
};
});

Template.map.rendered = function () {
var self = this;
Expand Down Expand Up @@ -205,7 +205,7 @@ Template.page.showCreateDialog = function () {
return Session.get("showCreateDialog");
};

Template.createDialog.events = {
Template.createDialog.events({
'click .save': function (event, template) {
var title = template.find(".title").value;
var description = template.find(".description").value;
Expand Down Expand Up @@ -236,7 +236,7 @@ Template.createDialog.events = {
'click .cancel': function () {
Session.set("showCreateDialog", false);
}
};
});

Template.createDialog.error = function () {
return Session.get("createError");
Expand All @@ -253,15 +253,15 @@ Template.page.showInviteDialog = function () {
return Session.get("showInviteDialog");
};

Template.inviteDialog.events = {
Template.inviteDialog.events({
'click .invite': function (event, template) {
Meteor.call('invite', Session.get("selected"), this._id);
},
'click .done': function (event, template) {
Session.set("showInviteDialog", false);
return false;
}
};
});

Template.inviteDialog.uninvited = function () {
var party = Parties.findOne(Session.get("selected"));
Expand Down

0 comments on commit 2f11def

Please sign in to comment.