Commit 9e076ac9 authored by Renaud Le Gac's avatar Renaud Le Gac
Browse files

Rename configurator cfg_blabla into to_blabla.

parent 8ccf2051
......@@ -181,17 +181,17 @@ gridModifier.set_filters(*filters,
#
formNode = dbui.Node(T('Forms'),
db.tables,
lambda tablename: cvtSvc.to_form_panel(db[tablename]))
configurator=lambda tablename: cvtSvc.to_form_panel(db[tablename]))
gridNode = dbui.Node(T('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'),
{'report_1': URL(c="reports", f="report_1"),
'report_2': (URL(c="reports", f="report_2"), cvtSvc.to_form_items(dummy.foo1))},
dbui.cfg_url_panel,
configurators={'report_2': dbui.cfg_configurable_url_panel})
configurators={'report_1': dbui.to_urlPanel,
'report_2': dbui.to_panelWithUrlSelector})
viewportModifier = dbui.ViewportModifier()
viewportModifier.add_node(formNode, gridNode, reportNode)
......@@ -23,5 +23,5 @@ from helper import (get_field_validators,
is_table_with_foreign_fields)
from mapper import map_default, map_tabpanel
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
\ No newline at end of file
......@@ -9,14 +9,11 @@ from gluon import current
from helper import is_mathjax
def cfg_configurable_url_panel(key, value):
""" Return the configuration dictionary for a panel displaying
an URL. The argument of the URL can be change using a form
appearing on the right side. The form is defined by a table
of the dummy database.
The ExtJS widget behind the scene is App.panel.PanelWithConfigurator.
def to_panelWithUrlSelector(key, value):
"""Return the configuration dictionary for a App.PanelWithUrlSelector.
the main panel displays the URL content while the selector panel shows
a form allowing to change the URL argument.
key
it the name of the leaf
......@@ -50,7 +47,7 @@ def cfg_configurable_url_panel(key, value):
return cfg
def cfg_url_panel(key, url):
def to_urlPanel(key, url):
"""Return the configuration dictionary for an Ext.Panel
displaying an URL.
......@@ -85,7 +82,7 @@ class Node(object):
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
text
......
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