Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yusei Tahara
erp5
Commits
e841ef41
Commit
e841ef41
authored
Oct 04, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Listbox: handle not simple uid value
parent
b446323a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
19 deletions
+27
-19
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
...emplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
+25
-17
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
...mplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
View file @
e841ef41
...
...
@@ -7,6 +7,28 @@
loading_class_list
=
[
'
ui-icon-spinner
'
,
'
ui-btn-icon-left
'
],
disabled_class
=
'
ui-disabled
'
;
function
buildFieldGadgetParam
(
value
)
{
var
field_gadget_param
;
if
((
value
!==
undefined
)
&&
(
value
!==
null
)
&&
(
value
.
constructor
===
Object
))
{
if
(
value
.
field_gadget_param
)
{
field_gadget_param
=
value
.
field_gadget_param
;
}
else
{
field_gadget_param
=
{
'
editable
'
:
0
,
'
default
'
:
value
.
default
};
}
}
else
{
field_gadget_param
=
{
'
editable
'
:
0
,
'
default
'
:
value
};
}
return
field_gadget_param
;
}
function
listbox_tbody_template
(
options
)
{
/*
<tbody>
...
...
@@ -897,7 +919,7 @@
command
:
gadget
.
state
.
command
,
options
:
{
jio_key
:
allDocs_result
.
data
.
rows
[
i
].
id
,
uid
:
allDocs_result
.
data
.
rows
[
i
].
value
.
uid
,
uid
:
buildFieldGadgetParam
(
allDocs_result
.
data
.
rows
[
i
].
value
.
uid
).
default
,
selection_index
:
gadget
.
state
.
begin_from
+
i
,
query
:
gadget
.
state
.
query_string
,
list_method_template
:
gadget
.
state
.
list_method_template
,
...
...
@@ -953,22 +975,8 @@
// value accordingly. value can be simply just a value in
// case of non-editable field thus we construct "field_json"
// manually and insert the value in "default"
value
=
buildFieldGadgetParam
(
value
);
if
(
value
.
constructor
===
Object
)
{
if
(
value
.
field_gadget_param
)
{
value
=
value
.
field_gadget_param
;
}
else
{
value
=
{
'
editable
'
:
0
,
'
default
'
:
value
.
default
};
}
}
else
{
value
=
{
'
editable
'
:
0
,
'
default
'
:
value
};
}
value
.
href
=
url_value
;
value
.
editable
=
value
.
editable
&&
gadget
.
state
.
editable
;
value
.
line
=
i
;
...
...
@@ -986,7 +994,7 @@
cell_list
.
forEach
(
setNonEditable
);
}
row_list
.
push
({
"
uid
"
:
allDocs_result
.
data
.
rows
[
i
].
value
.
uid
,
"
uid
"
:
buildFieldGadgetParam
(
allDocs_result
.
data
.
rows
[
i
].
value
.
uid
).
default
,
"
jump
"
:
line_link_list
[
i
],
"
cell_list
"
:
cell_list
,
"
line_icon
"
:
gadget
.
state
.
line_icon
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
View file @
e841ef41
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
978.
14035.65281.5780
4
</string>
</value>
<value>
<string>
978.
63078.12405.102
4
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
15
67608261.37
</float>
<float>
15
70723719.08
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment