Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
plugin_dbui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
w2pext
plugin_dbui
Commits
9e076ac9
Commit
9e076ac9
authored
13 years ago
by
Renaud Le Gac
Browse files
Options
Downloads
Patches
Plain Diff
Rename configurator cfg_blabla into to_blabla.
parent
8ccf2051
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
models/widgets.py
+4
-4
4 additions, 4 deletions
models/widgets.py
modules/plugin_dbui/__init__.py
+1
-1
1 addition, 1 deletion
modules/plugin_dbui/__init__.py
modules/plugin_dbui/navtree.py
+7
-10
7 additions, 10 deletions
modules/plugin_dbui/navtree.py
with
12 additions
and
15 deletions
models/widgets.py
+
4
−
4
View file @
9e076ac9
...
...
@@ -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
_p
anel
,
configurators
=
{
'
report_2
'
:
dbui
.
cfg_configurable_url_panel
})
configurators
=
{
'
report_1
'
:
dbui
.
to
_url
P
anel
,
'
report_2
'
:
dbui
.
to_panelWithUrlSelector
})
viewportModifier
=
dbui
.
ViewportModifier
()
viewportModifier
.
add_node
(
formNode
,
gridNode
,
reportNode
)
This diff is collapsed.
Click to expand it.
modules/plugin_dbui/__init__.py
+
1
−
1
View file @
9e076ac9
...
...
@@ -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
_p
anel
from
navtree
import
Node
,
to_panelWithUrlSelector
,
to
_url
P
anel
from
viewportmodifier
import
ViewportModifier
\ No newline at end of file
This diff is collapsed.
Click to expand it.
modules/plugin_dbui/navtree.py
+
7
−
10
View file @
9e076ac9
...
...
@@ -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
_p
anel
(
key
,
url
):
def
to
_url
P
anel
(
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment