Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
w2pext
plugin_dbui
Commits
88374839
Commit
88374839
authored
Apr 17, 2015
by
LE GAC Renaud
Browse files
Review navtree.py documentation.
parent
49296ae4
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
74 additions
and
22 deletions
+74
-22
docs/api/generated/navtree/plugin_dbui.navtree.Node.add_child.rst
.../generated/navtree/plugin_dbui.navtree.Node.add_child.rst
+6
-0
docs/api/generated/navtree/plugin_dbui.navtree.Node.add_children.rst
...nerated/navtree/plugin_dbui.navtree.Node.add_children.rst
+6
-0
docs/api/generated/navtree/plugin_dbui.navtree.Node.get_node.rst
...i/generated/navtree/plugin_dbui.navtree.Node.get_node.rst
+6
-0
docs/api/generated/navtree/plugin_dbui.navtree.Node.sort_children.rst
...erated/navtree/plugin_dbui.navtree.Node.sort_children.rst
+6
-0
docs/api/generated/plugin_dbui.navtree.Node.rst
docs/api/generated/plugin_dbui.navtree.Node.rst
+21
-0
docs/api/user_interface.rst
docs/api/user_interface.rst
+10
-7
modules/plugin_dbui/navtree.py
modules/plugin_dbui/navtree.py
+19
-15
No files found.
docs/api/generated/navtree/plugin_dbui.navtree.Node.add_child.rst
0 → 100644
View file @
88374839
plugin_dbui.navtree.Node.add_child
==================================
.. currentmodule:: plugin_dbui.navtree
.. automethod:: Node.add_child
\ No newline at end of file
docs/api/generated/navtree/plugin_dbui.navtree.Node.add_children.rst
0 → 100644
View file @
88374839
plugin_dbui.navtree.Node.add_children
=====================================
.. currentmodule:: plugin_dbui.navtree
.. automethod:: Node.add_children
\ No newline at end of file
docs/api/generated/navtree/plugin_dbui.navtree.Node.get_node.rst
0 → 100644
View file @
88374839
plugin_dbui.navtree.Node.get_node
=================================
.. currentmodule:: plugin_dbui.navtree
.. automethod:: Node.get_node
\ No newline at end of file
docs/api/generated/navtree/plugin_dbui.navtree.Node.sort_children.rst
0 → 100644
View file @
88374839
plugin_dbui.navtree.Node.sort_children
======================================
.. currentmodule:: plugin_dbui.navtree
.. automethod:: Node.sort_children
\ No newline at end of file
docs/api/generated/plugin_dbui.navtree.Node.rst
0 → 100644
View file @
88374839
plugin_dbui.navtree.Node
========================
.. currentmodule:: plugin_dbui.navtree
.. autoclass:: Node
.. rubric:: Methods
.. autosummary::
:toctree: navtree/
~Node.add_child
~Node.add_children
~Node.get_node
~Node.sort_children
docs/api/user_interface.rst
View file @
88374839
...
...
@@ -43,6 +43,16 @@ Grid
configure_grids
GridModifier
Node
^^^^
.. currentmodule:: plugin_dbui.navtree
.. autosummary::
:toctree: generated/
Node
Store
^^^^^
...
...
@@ -57,13 +67,6 @@ Store
Viewport
^^^^^^^^
.. currentmodule:: plugin_dbui.navtree
.. autosummary::
:toctree: generated/
Node
.. currentmodule:: plugin_dbui.viewportmodifier
.. autosummary::
...
...
modules/plugin_dbui/navtree.py
View file @
88374839
...
...
@@ -7,23 +7,22 @@ from gluon import current
class
Node
(
object
):
"""The
``
node
``
is the key element of the navigation tree.
"""The
*
node
*
is the key element of the navigation tree.
It contains children (leaves) which are associated to widgets.
The widget will be display on the panel of the *Viewport*.
Args:
text (str): name of the node appearing in the viewport
navigation tree.
Attributes:
text (str)
children (list)
hidden (list)
text (str)
: name of the node
children (list)
: list of children
hidden (list)
: list of children to be hidden
"""
def
__init__
(
self
,
text
):
"""Construct the node.
Args:
text (str): name of the node appearing in the viewport
"""
self
.
text
=
text
self
.
children
=
[]
self
.
hidden
=
[]
...
...
@@ -49,14 +48,14 @@ class Node(object):
"""Add children (leaves) to the node.
Args:
leaves (list):
a list of string
leaves (list):
names of the leaves
func (function):
function
translat
ing the leaf name
in
to
function
mapp
ing the leaf name to
the Ext JS configuration options dictionary.
The latter defines the associated widget.
hidden (list): list of children to be
hidden
.
hidden (list): list of children to be
ignored
.
Note:
* Leaf names are translated in the current language
...
...
@@ -89,9 +88,14 @@ class Node(object):
Returns:
dict:
* ``text`` (str): name of the node
* ``children`` (list): list of dictionary containing
Ext JS configuration for the widgets associated to the leaves.
* **text** (str): name of the node
* **children** (list): list of leaves. Each element is
a dictionary with three keys:
* **cfg** (dict): configuration for the widgets
associated to the leaf.
* **leave** (bool): always ``True``.
* **text** (str): name of the leaf
"""
return
{
'text'
:
self
.
text
,
'children'
:
self
.
children
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment