From 2f11def1fbb5d7d92c60f360d63fc5fc7558145e Mon Sep 17 00:00:00 2001 From: David Glasser Date: Tue, 16 Oct 2012 10:40:38 -0700 Subject: [PATCH] Use newer form of Template.foo.events. --- examples/parties/client/client.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/parties/client/client.js b/examples/parties/client/client.js index d5dc73d6a1..ab8be92554 100644 --- a/examples/parties/client/client.js +++ b/examples/parties/client/client.js @@ -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); }, @@ -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; @@ -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; @@ -236,7 +236,7 @@ Template.createDialog.events = { 'click .cancel': function () { Session.set("showCreateDialog", false); } -}; +}); Template.createDialog.error = function () { return Session.get("createError"); @@ -253,7 +253,7 @@ 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); }, @@ -261,7 +261,7 @@ Template.inviteDialog.events = { Session.set("showInviteDialog", false); return false; } -}; +}); Template.inviteDialog.uninvited = function () { var party = Parties.findOne(Session.get("selected"));