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
Admin message
Gitlab has been updated. More info
here
and
there
.
Show more breadcrumbs
w2pext
plugin_dbui
Commits
c4a023ec
Commit
c4a023ec
authored
12 years ago
by
LE GAC Renaud
Browse files
Options
Downloads
Patches
Plain Diff
Modify to_gridfilter to deal with linkedcombobox.
parent
4200c308
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/plugin_dbui/converter.py
+12
-3
12 additions, 3 deletions
modules/plugin_dbui/converter.py
with
12 additions
and
3 deletions
modules/plugin_dbui/converter.py
+
12
−
3
View file @
c4a023ec
...
...
@@ -424,8 +424,13 @@ def to_gridFilter(table, **kwargs):
# ignore composite field defined for form
cfg
=
to_field
(
field
,
composite
=
False
)
# remove default value
# make no sense in this context
# remove field constraints making no sense for a filter
if
'
allowBlank
'
in
cfg
:
cfg
[
"
allowBlank
"
]
=
True
if
'
readOnly
'
in
cfg
:
cfg
[
'
readOnly
'
]
=
False
if
'
value
'
in
cfg
:
del
cfg
[
'
value
'
]
...
...
@@ -433,6 +438,10 @@ def to_gridFilter(table, **kwargs):
if
cfg
[
'
xtype
'
]
==
'
xtextarea
'
:
cfg
[
'
xtype
'
]
=
'
xtextfield
'
# replace all linkedcombobox by combobox
if
cfg
[
'
xtype
'
]
==
'
xlinkedcombobox
'
:
cfg
[
'
xtype
'
]
=
'
xcombobox
'
# empty text for combobox
if
cfg
[
'
xtype
'
]
==
'
xcombobox
'
:
cfg
[
'
emptyText
'
]
=
T
(
'
select...
'
)
...
...
@@ -440,7 +449,7 @@ def to_gridFilter(table, **kwargs):
# prepare the name for the where close [table.field]
cfg
[
'
name
'
]
=
name
# store information to customi
z
e the filter
# store information to customi
s
e the filter
cfg
[
'
filterComment
'
]
=
comment
cfg
[
'
filterOperator
'
]
=
operator
cfg
[
'
filterType
'
]
=
field
.
type
...
...
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