Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Documentatio fixes.

  • Loading branch information...
commit 34cd55f83c5d3ebef4adbbbf9dcda39d554540aa 1 parent 6af5779
@ifeins authored
View
6 docs/marionette.compositeview.md
@@ -205,13 +205,13 @@ Backbone.Marionette.CompositeView.extend({
## Organizing ui elements
Similar to ItemView, you can organize the ui elements inside the
-CompositeView by specifying them in the "ui" hash. It should be
+CompositeView by specifying them in the `ui` hash. It should be
noted that the elements that can be accessed via this hash are
the elements that are directly rendered by the composite view
template, not those belonging to the collection.
The ui elements will be accessible as soon as the composite view
-template is rendered and before the collection is rendered,
-which means you can access them in the beforeRender method.
+template is rendered (and before the collection is rendered),
+which means you can even access them in the `beforeRender` method.
View
6 docs/marionette.itemview.md
@@ -271,12 +271,12 @@ Backbone.Marionette.ItemView.extend({
```
## Organizing ui elements
-As documented in View, you can specify a "ui" hash in your view that
+As documented in View, you can specify a `ui` hash in your view that
maps between a ui element's name and its jQuery selector, similar to
how regions are organized. This is especially useful if you access the
same ui element more than once in your view's code, so instead of
duplicating the selector you can simply reference it by
-this.ui.<elementName>:
+`this.ui.elementName`:
```js
Backbone.Marionette.ItemView.extend({
@@ -287,7 +287,7 @@ Backbone.Marionette.ItemView.extend({
},
onRender: function() {
- if (this.model.get('selected') === true) {
+ if (this.model.get('selected')) {
this.ui.checkbox.addClass('checked');
}
}
View
8 docs/marionette.view.md
@@ -88,13 +88,13 @@ to retrieve their data or manipulate them. For example you have a
certain div element you need to show/hide based on some state,
or other ui element that you wish to set a css class to it.
Instead of having jQuery selectors hanging around in the view's code
-you can define a "ui" hash that contains a mapping between the
+you can define a `ui` hash that contains a mapping between the
ui element's name and its jQuery selector. Afterwards you can simply
-access it via this.ui.<element name>.
+access it via `this.ui.elementName`.
See ItemView documentation for examples.
-This functionality is provided via the bindUIElements method.
-Since a View doesn't have a render method, then if you directly extend
+This functionality is provided via the `bindUIElements` method.
+Since View doesn't have implement the render method, then if you directly extend
from View you will need to invoke this method from your render method.
In ItemView and CompositeView this is already taken care of.
Please sign in to comment.
Something went wrong with that request. Please try again.