Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed code/text formatting issues.

  • Loading branch information...
commit 216b8ce7b3c74e4761426046f67356decb0376d2 1 parent 7f8a668
Joe Catera zhouyaoji authored
2  docs/dev_guide/code_exs/binding_events.rst
View
@@ -552,7 +552,7 @@ If the query string created by ``Y.QueryString.stringify`` is "page=2" ,
.. code-block:: javascript
...
- function createLink(actionContext, params) {
+ function createLink(actionContext, params) {
var mergedParams = Y.mojito.util.copy(actionContext.params.getFromMerged());
for (var k in params) {
mergedParams[k] = params[k];
2  docs/dev_guide/code_exs/query_params.rst
View
@@ -286,7 +286,7 @@ To set up and run ``using_parameters``:
#. Change to ``mojits/QueryMojit``.
#. Modify the controller to access different query parameters by replacing the code in
- ``controller.server.js`` with the following:
+ ``controller.server.js`` with the following:
.. code-block:: javascript
38 docs/dev_guide/code_exs/scroll_views.rst
View
@@ -144,26 +144,24 @@ node, so the template ``index.hb.html`` must have a ``div`` element with the
.. code-block:: html
- <div id="{{mojit_view_id}}" class="mojit">
- <div id="scrollview-container">
- <div id="scrollview-header">
- <h1>{{title}}</h1>
- </div>
- <div id="scrollview-content" class="yui3-scrollview-loading">
- <ul>
- {{#photos}}
- <li><img src="{{url}}" alt="{{alt}}"></li>
- {{/photos}}
- </ul>
- </div>
- </div>
- </div>
+ <div id="{{mojit_view_id}}" class="mojit">
+ <div id="scrollview-container">
+ <div id="scrollview-header">
+ <h1>{{title}}</h1>
+ </div>
+ <div id="scrollview-content" class="yui3-scrollview-loading">
+ <ul>
+ {{#photos}}
+ <li><img src="{{url}}" alt="{{alt}}"></li>
+ {{/photos}}
+ </ul>
+ </div>
+ </div>
+ </div>
For detailed instructions about YUI ScrollView, see
`ScrollView: Getting Started <http://developer.yahoo.com/yui/3/scrollview/#start>`_.
- .. code-block:: javascript
-
.. _code_exs_yui_views-setup:
Setting Up this Example
@@ -206,10 +204,10 @@ To set up and run ``scroll_views``:
}
},
{
- "settings": [ "device:iphone" ],
- "selector": "iphone"
- }
- ]
+ "settings": [ "device:iphone" ],
+ "selector": "iphone"
+ }
+ ]
#. To configure routing to call the ``index`` action from the instance of the
``HTMLFrameMojit`` when an HTTP GET call is made on the route path, replace
11 docs/dev_guide/faq/index.rst
View
@@ -532,11 +532,10 @@ Data
as seen below. The ``template`` object can contain key-value pairs that can be added
to the view template as Handlebars expressions. For example, the key ``foo`` in the
``template`` object shown here can be used in the template as ``{{foo}}``, which will
- be replaced by the value 'bar' when the template is rendered.
+ be replaced by the value 'bar' when the template is rendered.::
- ``// Inside parent mojit``
-
- ``ac.done({ template: { "foo": "bar" }});``
+ // Inside parent mojit
+ ac.done({ template: { "foo": "bar" }});
------------
@@ -736,8 +735,8 @@ Logging/Testing
}
...
- See `Including and Excluding Modules From Logging <../topics/mojito_logging.rst#logging_custom-include_exclude_src>`_
- for more information.
+ See `Including and Excluding Modules From Logging <../topics/mojito_logging.rst#logging_custom-include_exclude_src>`_
+ for more information.
------------
6 docs/dev_guide/reference/mojito_troubleshooting.rst
View
@@ -189,9 +189,9 @@ Try doing the following:
.. code-block:: javascript
...
- ac.composite.execute(cfg, function(data, meta){
- ac.done(data, meta);
- });
+ ac.composite.execute(cfg, function(data, meta){
+ ac.done(data, meta);
+ });
...
8 docs/dev_guide/topics/mojito_composite_mojits.rst
View
@@ -144,10 +144,10 @@ are embedded using Handlebars expressions.
.. code-block:: html
<div id="{{mojit_view_id}}" class="mojit" style="border: dashed black 1px;">
- <h1>{{title}}</h1>
- <div class="nav" style="border: dashed black 1px; margin: 10px 10px 10px 10px;">{{{nav}}}</div>
- <div class="body" style="border: dashed black 1px; margin: 10px 10px 10px 10px;">{{{body}}}</div>
- <div class="footer" style="border: dashed black 1px; margin: 10px 10px 10px 10px;">{{{footer}}}</div>
+ <h1>{{title}}</h1>
+ <div class="nav" style="border: dashed black 1px; margin: 10px 10px 10px 10px;">{{{nav}}}</div>
+ <div class="body" style="border: dashed black 1px; margin: 10px 10px 10px 10px;">{{{body}}}</div>
+ <div class="footer" style="border: dashed black 1px; margin: 10px 10px 10px 10px;">{{{footer}}}</div>
</div>
7 docs/dev_guide/topics/mojito_extensions.rst
View
@@ -586,20 +586,19 @@ The view engine addon must have the following:
.. code-block:: javascript
...
-
function EjsAdapter(viewId) {
this.viewId = viewId;
}
...
Y.namespace('mojito.addons.viewEngines').ejs = EjsAdapter;
-
+ ...
+
- a prototype of the object has the following two methods ``render`` and ``compiler``
as shown below:
.. code-block:: javascript
...
-
EjsAdapter.prototype = {
render: function(data, mojitType, tmpl, adapter, meta, more) {
@@ -608,7 +607,7 @@ The view engine addon must have the following:
compiler: function(tmpl) {
...
}
- ...
+ ...
.. _reqs_ve-methods:
12 docs/dev_guide/topics/mojito_logging.rst
View
@@ -130,7 +130,7 @@ Customizing Logging
Client and Server Logging
-------------------------
-You can use the ``master and the ``runtime:client`` contexts to create different
+You can use the ``master`` and the ``runtime:client`` contexts to create different
logging settings for the client and server.
In the ``application.json`` file, create two configuration
@@ -159,7 +159,7 @@ the ``yui.config`` object.
{
"settings": [ "master" ],
...
- "yui": {
+ "yui": {
"config": {
"debug": true,
"logLevel": "info"
@@ -169,7 +169,7 @@ the ``yui.config`` object.
{
"settings": [ "runtime:client" ],
...
- "yui": {
+ "yui": {
"config": {
"debug": true,
"logLevel": "warn"
@@ -198,7 +198,7 @@ We recommend that you pass the first three parameters to
In the example binder below, ``Y.log`` logs
a message at the ``info`` level and specifies the module
-through ``NAME``, which in this case contains the value "DemoBinderIndex``.
+through ``NAME``, which in this case contains the value ``DemoBinderIndex``.
.. code-block:: javascript
@@ -212,9 +212,9 @@ through ``NAME``, which in this case contains the value "DemoBinderIndex``.
this.node = node;
}
};
-}, '0.0.1', {requires: ['mojito-client']});
+ }, '0.0.1', {requires: ['mojito-client']});
+
-..
2  docs/dev_guide/topics/mojito_npm.rst
View
@@ -70,7 +70,7 @@ Your application may not need to install any npm modules.
#. Add any needed dependencies to ``dependencies`` object in ``package.json``.
#. Install dependencies with npm.
- ``{app_dir}$ npm install``
+ ``{app_dir}$ npm install``
#. When Mojito starts, your application will have access to the installed
npm modules.
2  docs/dev_guide/topics/mojito_run_dyn_defined_mojits.rst
View
@@ -532,7 +532,7 @@ SpawnedMojit
ac.done({ "route": ac.params.route('name'),
"url": ac.params.url('path'),
"body": ac.params.body("message")
- });
+ });
}
};
}, '0.0.1', {requires: ['mojito']});
9 docs/dev_guide/topics/mojito_using_contexts.rst
View
@@ -523,8 +523,9 @@ configurations of the current context.
.. code-block:: javascript
- YUI.add('TestMojit', function(Y) {
- Y.mojito.controller = {
+
+ YUI.add('TestMojit', function(Y, NAME) {
+ Y.namespace('mojito.controllers')[NAME] = {
index: function(ac) {
var cfg = {
children: {
@@ -540,11 +541,11 @@ configurations of the current context.
}
};
var child = ac.params.getFromMerged('child');
- if(child){
+ if (child){
ac.composite.execute(cfg, function (data,meta){
ac.done(data["one"]);
});
- }else{
+ } else{
ac.done(
'config key "alpha": ' + ac.config.get('alpha', '[alpha not found]')
);
Please sign in to comment.
Something went wrong with that request. Please try again.