From d2eaa25d924dbe50e41a8b46352b2e615cfd29ca Mon Sep 17 00:00:00 2001 From: David Greenspan Date: Wed, 27 Aug 2014 21:01:51 -0700 Subject: [PATCH] UI.body to Template.body --- docs/client/api.html | 28 ++++++++++++++-------------- docs/client/api.js | 6 +++--- docs/client/docs.js | 3 +-- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/docs/client/api.html b/docs/client/api.html index c14e6f34a2..d3fb05c16e 100644 --- a/docs/client/api.html +++ b/docs/client/api.html @@ -2196,6 +2196,20 @@ Alias for `this.view.autorun`. {{> api_box template_view}} +{{> api_box template_body}} + +You can define helpers and event maps on `Template.body` just like on +any `Template.myTemplate` object. + +Helpers on `Template.body` are only available in the `` tags of +your app. To register a global helper, use +[UI.registerHelper](#ui_registerhelper). + +Event maps on `Template.body` don't apply to elements added to the +body via `UI.insert`, jQuery, or the DOM API, or to the body element +itself. To handle events on the body, window, or document, use jQuery +or the DOM API. +

Template utilities

The `UI` namespace contains several utilities that are helpful when writing your @@ -2207,20 +2221,6 @@ any part of the DOM for finer control than just using template inclusions. {{> api_box ui_registerhelper}} -{{> api_box ui_body}} - -You can define helpers and event maps on `UI.body` just like on any -`Template.myTemplate` object. - -Helpers on `UI.body` are only available in the `` tags of your -app. To register a global helper, use -[UI.registerHelper](#ui_registerhelper). - -Event maps on `UI.body` don't apply to elements added to the body via -`UI.insert`, jQuery, or the DOM API, or to the body element itself. -To handle events on the body, window, or document, use jQuery or the -DOM API. - {{> api_box ui_render}} This returns a "rendered View," which you can insert into the DOM diff --git a/docs/client/api.js b/docs/client/api.js index 37abedf799..fda25a3ca8 100644 --- a/docs/client/api.js +++ b/docs/client/api.js @@ -1901,9 +1901,9 @@ Template.api.ui_dynamic = { }] }; -Template.api.ui_body = { - id: "ui_body", - name: "UI.body", +Template.api.template_body = { + id: "template_body", + name: "Template.body", locus: "Client", descr: ["The [template object](#templates_api) representing your `` tag."] }; diff --git a/docs/client/docs.js b/docs/client/docs.js index 20f0a314c9..4172830b2e 100644 --- a/docs/client/docs.js +++ b/docs/client/docs.js @@ -1,6 +1,5 @@ Template.headline.release = function () { return Meteor.release ? "0.9.0" : "(checkout)"; - }; Meteor.startup(function () { @@ -258,9 +257,9 @@ var toc = [ {instance: "this", name: "autorun", id: "template_autorun"}, {instance: "this", name: "view", id: "template_view"} ], + "Template.body", "UI", [ "UI.registerHelper", - "UI.body", "UI.render", "UI.renderWithData", "UI.insert",