Skip to content
Snippets Groups Projects
Commit 9e076ac9 authored by Renaud Le Gac's avatar Renaud Le Gac
Browse files

Rename configurator cfg_blabla into to_blabla.

parent 8ccf2051
No related branches found
No related tags found
No related merge requests found
...@@ -181,17 +181,17 @@ gridModifier.set_filters(*filters, ...@@ -181,17 +181,17 @@ gridModifier.set_filters(*filters,
# #
formNode = dbui.Node(T('Forms'), formNode = dbui.Node(T('Forms'),
db.tables, db.tables,
lambda tablename: cvtSvc.to_form_panel(db[tablename])) configurator=lambda tablename: cvtSvc.to_form_panel(db[tablename]))
gridNode = dbui.Node(T('Tables'), gridNode = dbui.Node(T('Tables'),
db.tables, db.tables,
lambda tablename: cvtSvc.to_grid_panel(db[tablename])) configurator=lambda tablename: cvtSvc.to_grid_panel(db[tablename]))
reportNode = dbui.Node(T('Reports'), reportNode = dbui.Node(T('Reports'),
{'report_1': URL(c="reports", f="report_1"), {'report_1': URL(c="reports", f="report_1"),
'report_2': (URL(c="reports", f="report_2"), cvtSvc.to_form_items(dummy.foo1))}, 'report_2': (URL(c="reports", f="report_2"), cvtSvc.to_form_items(dummy.foo1))},
dbui.cfg_url_panel, configurators={'report_1': dbui.to_urlPanel,
configurators={'report_2': dbui.cfg_configurable_url_panel}) 'report_2': dbui.to_panelWithUrlSelector})
viewportModifier = dbui.ViewportModifier() viewportModifier = dbui.ViewportModifier()
viewportModifier.add_node(formNode, gridNode, reportNode) viewportModifier.add_node(formNode, gridNode, reportNode)
...@@ -23,5 +23,5 @@ from helper import (get_field_validators, ...@@ -23,5 +23,5 @@ from helper import (get_field_validators,
is_table_with_foreign_fields) is_table_with_foreign_fields)
from mapper import map_default, map_tabpanel from mapper import map_default, map_tabpanel
from modifier import Spacer, Widget from modifier import Spacer, Widget
from navtree import Node, cfg_configurable_url_panel, cfg_url_panel from navtree import Node, to_panelWithUrlSelector, to_urlPanel
from viewportmodifier import ViewportModifier from viewportmodifier import ViewportModifier
\ No newline at end of file
...@@ -9,14 +9,11 @@ from gluon import current ...@@ -9,14 +9,11 @@ from gluon import current
from helper import is_mathjax from helper import is_mathjax
def cfg_configurable_url_panel(key, value): def to_panelWithUrlSelector(key, value):
""" Return the configuration dictionary for a panel displaying """Return the configuration dictionary for a App.PanelWithUrlSelector.
an URL. The argument of the URL can be change using a form the main panel displays the URL content while the selector panel shows
appearing on the right side. The form is defined by a table a form allowing to change the URL argument.
of the dummy database.
The ExtJS widget behind the scene is App.panel.PanelWithConfigurator.
key key
it the name of the leaf it the name of the leaf
...@@ -50,7 +47,7 @@ def cfg_configurable_url_panel(key, value): ...@@ -50,7 +47,7 @@ def cfg_configurable_url_panel(key, value):
return cfg return cfg
def cfg_url_panel(key, url): def to_urlPanel(key, url):
"""Return the configuration dictionary for an Ext.Panel """Return the configuration dictionary for an Ext.Panel
displaying an URL. displaying an URL.
...@@ -85,7 +82,7 @@ class Node(object): ...@@ -85,7 +82,7 @@ class Node(object):
Dedicated configurator can be setup for each node if needed. Dedicated configurator can be setup for each node if needed.
""" """
def __init__(self, text, leaves, configurator, configurators={}, hidden=[]): def __init__(self, text, leaves, configurator=None, configurators={}, hidden=[]):
"""Constructor of the node """Constructor of the node
text text
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment