UI.body to Template.body

This commit is contained in:
David Greenspan
2014-08-27 21:01:51 -07:00
parent a0fe0c8ad6
commit d2eaa25d92
3 changed files with 18 additions and 19 deletions

View File

@@ -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 `<body>` 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.
<h2 id="ui"><span>Template utilities</span></h2>
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 `<body>` 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

View File

@@ -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 `<body>` tag."]
};

View File

@@ -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",