Commit e98b93fc authored by legac's avatar legac
Browse files

Move :note: to .. note::

parent 9eb87310
......@@ -68,7 +68,7 @@ def _to_field(field, linkedcombo=True, **kwargs):
:returns: :class:`plugin_dbui.extjs.Field`
:note:
.. note::
The return configurator is a :class:`plugin_dbui.extjs.Field`.
However it can be a :class:`plugin_dbui.extjs.ComboBox`,
a :class:`plugin_dbui.extjs.FieldDate`,
......@@ -77,7 +77,7 @@ def _to_field(field, linkedcombo=True, **kwargs):
The association is defined in the dictionary
:const:`FTYPE_TO_XTYPE`.
:attention:
.. attention::
It is recommended to used the more general method :meth:`to_field`
which also understands :class:`plugin_dbui.extjs.FieldContainer`.
......@@ -181,7 +181,7 @@ def to_field(field, composite=True, linkedcombo=True, **kwargs):
:class:`plugin_dbui.extjs.FieldContainer` and takes into account
the :class:`plugin_dbui.fieldsmodifier.FieldsModifier` instructions.
:note:
.. note::
The return configurator is a :class:`plugin_dbui.extjs.Field`.
However it can be a :class:`plugin_dbui.extjs.ComboBox`,
a :class:`plugin_dbui.extjs.FieldDate`,
......@@ -190,7 +190,7 @@ def to_field(field, composite=True, linkedcombo=True, **kwargs):
The association is defined in the dictionary
:const:`FTYPE_TO_XTYPE`.
:note:
.. note::
The database fields can be organized in
:class:`plugin_dbui.extjs.FieldContainer` in the application
model using the modifiers
......
......@@ -147,11 +147,14 @@ class DbSvc(BaseSvc):
* the second element contains only the left join conditions or an empty string.
* the third element contains only the filter conditions or an empty string.
:note: All elements of the list are ANDED in the web2py query
.. note::
All elements of the list are ANDED in the web2py query
:note: comparison operators are ``==, !=, <, >, <=, >=``
.. note::
comparison operators are ``==, !=, <, >, <=, >=``
:note: Boolean operators are ``&, |``
.. note::
Boolean operators are ``&, |``
"""
query, join, filter = "", "", ""
......@@ -285,7 +288,8 @@ class DbSvc(BaseSvc):
:raise DbSvcException: when the table does not exists
:note: The method works with regular and alias tables.
..note::
The method works with regular and alias tables.
"""
db = current.globalenv['db']
......
......@@ -19,7 +19,8 @@ class Base(Storage):
and ``append_plugins``. They are required to append ``items``
and ``plugins``.
:note: A protection is set to avoid changing the ``xtype`` of the element.
.. note::
A protection is set to avoid changing the ``xtype`` of the element.
"""
xtype = None
......@@ -142,7 +143,8 @@ class FieldText(Base):
class FieldTextArea(Base):
"""Configurator for ``Ext.form.field.TextArea``.
:note: Regular expression for the validation can be written as a string.
.. note::
Regular expression for the validation can be written as a string.
"""
xtype = 'textarea'
......@@ -169,7 +171,8 @@ class GridColumn(dict):
class GridColumnModel(list):
"""Configurator for ``Ext.grid.ColumnModel``.
:note: It is implemented as a ``list`` of :class:`GridColumn`.
.. note::
It is implemented as a ``list`` of :class:`GridColumn`.
"""
......
......@@ -96,7 +96,7 @@ class FieldsModifier(Modifier):
They can be super seed by the keyword arguments.
:note:
.. note::
* Each ``field`` is identified by its database field name.
* ``field`` should belong to the database table defined in the constructor.
* The first ``field`` is the main field of the ``FieldContainer``.
......
......@@ -14,7 +14,8 @@ def CLEAN_COMMA(value):
:returns: str or unicode
:note: return the value unchanged when it is not a string.
.. note::
return the value unchanged when it is not a string.
"""
if not isinstance(value, (str, unicode)):
......@@ -32,7 +33,8 @@ def CLEAN_SPACES(value):
:returns: str or unicode
:note: return the value unchanged when it is not a string.
.. note::
return the value unchanged when it is not a string.
"""
if not isinstance(value, (str, unicode)):
......
......@@ -26,7 +26,7 @@ def configure_forms(db, **extjs):
list of forms to be modified. They are identified by their
associated table name.
:note:
.. note::
The keyword arguments define values for the Ext JS configuration
options of he ``Ext.form.Panel`` class.
......
......@@ -124,11 +124,11 @@ def encode_field(*args):
:returns: str
:note:
.. note::
useful to build database field name like ``TableField``
or ``TableFieldFunc``.
:note:
.. note::
The Ext JS ComboBox don't decode properly any separator between
table and field like table+field. Therefore choice for the encoding
are very limited.
......@@ -168,7 +168,7 @@ def get_all_tables(dal):
:returns: list
:note:
.. note::
It is recommend to use standard iterator provided by
the gluon.dal.DAL class. However by construction, they ignore
alias table.
......
......@@ -63,7 +63,7 @@ class Modifier(object):
def configure(self, **extjs):
"""Set the configuration parameters for the associated Ext JS widget.
:note:
.. note::
* Existing value of the configuration parameters are replaced by
those defined in the keyword arguments.
......@@ -128,4 +128,5 @@ class Modifier(object):
del extjs['plugins']
self.data.extjs.update(extjs)
\ No newline at end of file
self.data.extjs.update(extjs)
\ No newline at end of file
......@@ -55,7 +55,7 @@ class Node(object):
:type hidden: list
:param hidden: List of children to be hidden.
:note:
.. note::
* Leaf names are translated in the current language
* Leaf names are sorted in alphabetic order
......
......@@ -42,7 +42,7 @@ class AddStore(object):
For an ``Ext.data.ArrayStore`` the keyword ``fields`` and ``data``
have to be defined. For more details see the ExtJS documentation.
:note:
.. note::
The key associated to this store in the persistent dictionary
is the ``storeId``. Its value is derived from the store name,
*e.g.* ``nameStore``.
......
......@@ -51,13 +51,13 @@ class ViewportModifier(Modifier):
def add_node(self, *args):
"""Add a list of :class:`plugin_dbui.navtree.Node`s
"""Add a list of :class:`plugin_dbui.navtree.Node`
to the navigation tree.
:type args: list of :class:`plugin_dbui.navtree.Node`
:param args:
:note:
.. note::
Elements of the list equal to ``None`` are ignored.
This feature is useful when the list of nodes depend on user role.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment