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
b81db879
Commit
b81db879
authored
11 years ago
by
legac
Browse files
Options
Downloads
Patches
Plain Diff
None node can be added in the ViewportModifier.
parent
85dc8276
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_viewport.py
+6
-1
6 additions, 1 deletion
models/widgets_viewport.py
modules/plugin_dbui/viewportmodifier.py
+18
-4
18 additions, 4 deletions
modules/plugin_dbui/viewportmodifier.py
static/plugin_dbui/CHANGELOG
+1
-0
1 addition, 0 deletions
static/plugin_dbui/CHANGELOG
with
25 additions
and
5 deletions
models/widgets_viewport.py
+
6
−
1
View file @
b81db879
...
@@ -2,6 +2,11 @@
...
@@ -2,6 +2,11 @@
"""
widgets viewport
"""
widgets viewport
"""
"""
#
# the CAS node
#
casNode
=
None
#
#
# The form node
# The form node
#
#
...
@@ -48,6 +53,6 @@ reportNode.add_child(T('report_3'), leaf_3)
...
@@ -48,6 +53,6 @@ reportNode.add_child(T('report_3'), leaf_3)
viewportModifier
=
dbui
.
ViewportModifier
()
viewportModifier
=
dbui
.
ViewportModifier
()
viewportModifier
.
append_plugins
(
'
pViewportLogin
'
)
viewportModifier
.
append_plugins
(
'
pViewportLogin
'
)
viewportModifier
.
configure
(
logged
=
True
)
viewportModifier
.
configure
(
logged
=
True
)
viewportModifier
.
add_node
(
helpNode
,
formNode
,
gridNode
,
reportNode
)
viewportModifier
.
add_node
(
helpNode
,
casNode
,
formNode
,
gridNode
,
reportNode
)
viewportModifier
.
default_node
(
T
(
'
Tables
'
),
T
(
'
publications
'
))
viewportModifier
.
default_node
(
T
(
'
Tables
'
),
T
(
'
publications
'
))
This diff is collapsed.
Click to expand it.
modules/plugin_dbui/viewportmodifier.py
+
18
−
4
View file @
b81db879
...
@@ -50,17 +50,31 @@ class ViewportModifier(Modifier):
...
@@ -50,17 +50,31 @@ class ViewportModifier(Modifier):
def
add_node
(
self
,
*
args
):
def
add_node
(
self
,
*
args
):
"""
Add L{Node}s to the navigation tree.
"""
Add
a list of
L{Node}s to the navigation tree.
@type args: L{Node}
@type args:
list of
L{Node}
@param args:
@param args:
@note: Elements of the list equal to C{None} are ignored.
This feature is useful when the list of nodes depend on user role.
@raise ViewportModifierException: at least one element of the list
is not a C{Node} or C{None}.
"""
"""
li
=
[]
for
el
in
args
:
for
el
in
args
:
if
not
isinstance
(
el
,
Node
):
if
isinstance
(
el
,
Node
):
li
.
append
(
el
)
elif
el
==
None
:
continue
else
:
raise
ViewportModifierException
(
MSG_INVALID_NODE
)
raise
ViewportModifierException
(
MSG_INVALID_NODE
)
self
.
data
.
nodes
.
extend
(
args
)
self
.
data
.
nodes
.
extend
(
li
)
def
default_node
(
self
,
*
args
):
def
default_node
(
self
,
*
args
):
...
...
This diff is collapsed.
Click to expand it.
static/plugin_dbui/CHANGELOG
+
1
−
0
View file @
b81db879
...
@@ -4,6 +4,7 @@ HEAD
...
@@ -4,6 +4,7 @@ HEAD
- The viewport can open a tab at startup.
- The viewport can open a tab at startup.
- Automatic loggout when the page is refreshed and closed.
- Automatic loggout when the page is refreshed and closed.
- In the App.GridPanel a new record is inserted after the selected one.
- In the App.GridPanel a new record is inserted after the selected one.
- None node can be added in the ViewportModifier.
0.4.13.2 (Jul 2013)
0.4.13.2 (Jul 2013)
- Table callback _before_delete, _before_insert and _before_update
- Table callback _before_delete, _before_insert and _before_update
...
...
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