From 05c8f2aa3379728ddb5fbeaa76d91913fe267415 Mon Sep 17 00:00:00 2001 From: Joe Catera Date: Tue, 4 Dec 2012 12:16:30 -0800 Subject: [PATCH] Made copy edits. --- docs/dev_guide/intro/mojito_configuring.rst | 8 ++++---- docs/dev_guide/intro/mojito_mvc.rst | 2 +- docs/dev_guide/topics/mojito_extensions.rst | 6 +++--- docs/dev_guide/topics/mojito_logging.rst | 14 +++++++------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/dev_guide/intro/mojito_configuring.rst b/docs/dev_guide/intro/mojito_configuring.rst index e86d078aa..747612fec 100644 --- a/docs/dev_guide/intro/mojito_configuring.rst +++ b/docs/dev_guide/intro/mojito_configuring.rst @@ -836,7 +836,7 @@ the ``index`` function in the controller of the ``Foo`` mojit. .. _configure_mj-routing: -routing +Routing ======= In Mojito, routing is the mapping of URLs to specific mojit actions. This section @@ -1067,7 +1067,7 @@ Using Parameterized Paths to Call a Mojit Action Your routing configuration can also use parameterized paths to call mojit actions. In the ``routes.json`` below, the ``path`` property uses parameters to capture a part of the matched URL and then uses that captured part to -replace ``{{mojit-action}}`` in the value for the ``call``property. Any +replace ``{{mojit-action}}`` in the value for the ``call`` property. Any value can be used for the parameter as long as it is prepended with a colon (e.g., ``:foo``). After the parameter has been replaced by a value given in the path, the call to the action should have the following syntax: @@ -1109,7 +1109,7 @@ The following URLs call the ``index`` and ``myAction`` functions in the controll Using Regular Expressions to Match Routing Paths ------------------------------------------------ -You can use the ``regex`` property of the ``routing`` object to define a key-value +You can use the ``regex`` property of a routing object to define a key-value pair that defines a path parameter and a regular expression. The key is prepended with a colon when represented as a path parameter. For example, the key ``name`` would be represented as ``:name`` as a path parameter: ``"path": "/:name"``. @@ -1184,7 +1184,7 @@ Accessing Configurations from Mojits The model and binder can access mojit configurations from the ``init`` function. The controller and model are passed ``configuration`` objects. The controller -can access configuration the ``actionContext`` object and the ``Config`` addon. +can access configuration with the ``Config`` addon. The ``init`` function in the binder, instead of a configuration object, is passed the ``mojitProxy`` object, which enables you to access configurations. diff --git a/docs/dev_guide/intro/mojito_mvc.rst b/docs/dev_guide/intro/mojito_mvc.rst index c69283e5b..1f208bd72 100644 --- a/docs/dev_guide/intro/mojito_mvc.rst +++ b/docs/dev_guide/intro/mojito_mvc.rst @@ -39,7 +39,7 @@ Models are found in the ``models`` directory of each mojit. For the application Naming Convention ----------------- -The name of the model files depend on the affinity, which is the location +The name of the model file depend on the affinity, which is the location where a resource is available. Thus, the name of the model file is ``{model_name}.{affinity}.js``, where ``{affinity}`` can be ``common``, ``server``, or ``client``. diff --git a/docs/dev_guide/topics/mojito_extensions.rst b/docs/dev_guide/topics/mojito_extensions.rst index ad3b44bee..bc6f2687b 100644 --- a/docs/dev_guide/topics/mojito_extensions.rst +++ b/docs/dev_guide/topics/mojito_extensions.rst @@ -33,7 +33,7 @@ Addons allows you to do the following: Creating New Addons ------------------- -An addon is simply a JavaScript files that contains a YUI module. You can create +An addon is simply a JavaScript file that contains a YUI module. You can create addons at the application and mojit level. Application-level addons are available to all mojits in the application, whereas, mojit-level addons are only available to its mojit. @@ -287,7 +287,7 @@ Libraries Mojito allows you to use YUI libraries, external libraries, or customized libraries. To use any library in Mojito, you need to specify the module in -either the ``requires`` array in the controller for YUI libraries or using +either the ``requires`` array in the controller for YUI libraries or by using the ``require`` method for Node.js modules. .. _extending_libraries-yui: @@ -356,7 +356,7 @@ instance. log: function(user_name){ Y.log(user_name + "'s UID is " + '['+this.uid+']'); } - } + }; Y.namespace('mojito').UID = create_id; }); diff --git a/docs/dev_guide/topics/mojito_logging.rst b/docs/dev_guide/topics/mojito_logging.rst index 1ec7a09aa..bc8805375 100644 --- a/docs/dev_guide/topics/mojito_logging.rst +++ b/docs/dev_guide/topics/mojito_logging.rst @@ -21,9 +21,9 @@ Mojito has the following six log levels: - ``error`` - ``none`` -All of them should be familiar except the last, which are framework-level messages that -indicate that an important framework event is occurring (one that users might want to -track). +All of them should be familiar except ``mojito``, which is the logging level for +capturing framework-level messages that indicate that an important framework event is +occurring (one that users might want to track). Setting a log level of ``warn`` will filter out all ``debug`` and ``info`` messages, while ``warn``, ``error``, and ``mojito`` log messages will be processed. To see all @@ -38,8 +38,8 @@ The server and client log settings have the following default values: - ``debug: true`` - turns logging on so that messages are displayed in the console. - ``logLevel: "debug"`` - log level filter. -- ``logLevelOrder: ['debug', 'mojito', 'info', 'warn', 'error', 'none']`` - the order of - that log levels are evaluated. +- ``logLevelOrder: ['debug', 'mojito', 'info', 'warn', 'error', 'none']`` - the order in + which the log levels are evaluated. @@ -195,9 +195,9 @@ through ``NAME``, which in this case contains the value ``DemoBinderIndex``. Customizing the Log Level Order ------------------------------- -You can reorder and create log levels with ``logLevelOrder`` property of the +You can reorder and create log levels with the ``logLevelOrder`` property of the ``yui.config`` object. In the example ``yui.config`` object below, -the order of the log levels are switched for ``warn`` and ``info`` and +the order of the log levels is switched for ``warn`` and ``info`` and the new log level ``danger`` is created. .. code-block:: javascript