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
Paul Graydon
erp5
Commits
f2be0272
Commit
f2be0272
authored
5 years ago
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Listbox is not editable in select mode
parent
13213a53
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
162 additions
and
6 deletions
+162
-6
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
+4
-4
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
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testEditableFieldInSelectMode.xml
...nderjs_ui_listbox_zuite/testEditableFieldInSelectMode.xml
+58
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testEditableFieldInSelectMode.zpt
...nderjs_ui_listbox_zuite/testEditableFieldInSelectMode.zpt
+98
-0
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
View file @
f2be0272
...
@@ -868,7 +868,7 @@
...
@@ -868,7 +868,7 @@
var
lines
=
gadget
.
state
.
lines
,
var
lines
=
gadget
.
state
.
lines
,
promise_list
=
[],
promise_list
=
[],
url_promise_list
=
[],
url_promise_list
=
[],
allDocs_result
=
gadget
.
state
.
allDocs_result
,
allDocs_result
=
JSON
.
parse
(
gadget
.
state
.
allDocs_result
)
,
counter
,
counter
,
pagination_message
=
''
,
pagination_message
=
''
,
content_value
;
content_value
;
...
@@ -965,7 +965,7 @@
...
@@ -965,7 +965,7 @@
}
}
// note row's editable UID into gadget.props.listbox_uid_dict if exists to send it back to ERP5
// note row's editable UID into gadget.props.listbox_uid_dict if exists to send it back to ERP5
// together with ListBox data. The listbox_uid_dict has quite surprising structure {key: <key>, value: <uid-array>}
// together with ListBox data. The listbox_uid_dict has quite surprising structure {key: <key>, value: <uid-array>}
if
(
allDocs_result
.
data
.
rows
[
i
].
value
[
'
listbox_uid:list
'
]
!==
undefined
)
{
if
(
(
!
gadget
.
state
.
show_line_selector
)
&&
(
allDocs_result
.
data
.
rows
[
i
].
value
[
'
listbox_uid:list
'
]
!==
undefined
)
)
{
gadget
.
props
.
listbox_uid_dict
.
key
=
allDocs_result
.
data
.
rows
[
i
].
value
[
'
listbox_uid:list
'
].
key
;
gadget
.
props
.
listbox_uid_dict
.
key
=
allDocs_result
.
data
.
rows
[
i
].
value
[
'
listbox_uid:list
'
].
key
;
gadget
.
props
.
listbox_uid_dict
.
value
.
push
(
allDocs_result
.
data
.
rows
[
i
].
value
[
'
listbox_uid:list
'
].
value
);
gadget
.
props
.
listbox_uid_dict
.
value
.
push
(
allDocs_result
.
data
.
rows
[
i
].
value
[
'
listbox_uid:list
'
].
value
);
// we could come up with better name than "value" for almost everything ^^
// we could come up with better name than "value" for almost everything ^^
...
@@ -1069,7 +1069,7 @@
...
@@ -1069,7 +1069,7 @@
nav_element
.
appendChild
(
fragment
);
nav_element
.
appendChild
(
fragment
);
})
})
.
push
(
function
()
{
.
push
(
function
()
{
var
result_sum
=
(
gadget
.
state
.
allDocs_result
.
sum
||
{}).
rows
||
[],
// render summary footer if available
var
result_sum
=
(
allDocs_result
.
sum
||
{}).
rows
||
[],
// render summary footer if available
summary
=
result_sum
.
map
(
function
(
row
,
row_index
)
{
summary
=
result_sum
.
map
(
function
(
row
,
row_index
)
{
var
row_editability
=
row
[
'
listbox_uid:list
'
]
!==
undefined
;
var
row_editability
=
row
[
'
listbox_uid:list
'
]
!==
undefined
;
return
{
return
{
...
@@ -1188,7 +1188,7 @@
...
@@ -1188,7 +1188,7 @@
})
})
.
push
(
function
(
result
)
{
.
push
(
function
(
result
)
{
return
gadget
.
changeState
({
return
gadget
.
changeState
({
allDocs_result
:
result
allDocs_result
:
JSON
.
stringify
(
result
)
});
});
},
function
(
error
)
{
},
function
(
error
)
{
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
View file @
f2be0272
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
97
2.64219.61976.2884
</string>
</value>
<value>
<string>
97
4.49753.38890.51660
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +252,7 @@
...
@@ -252,7 +252,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
47458514.41
</float>
<float>
15
54195993.54
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testEditableFieldInSelectMode.xml
0 → 100644
View file @
f2be0272
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
testEditableFieldInSelectMode
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
This diff is collapsed.
Click to expand it.
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testEditableFieldInSelectMode.zpt
0 → 100644
View file @
f2be0272
<html
xmlns:tal=
"http://xml.zope.org/namespaces/tal"
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>
Test RenderJS UI
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test RenderJS UI
</td></tr>
</thead><tbody>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<tr>
<td>
open
</td>
<td>
${base_url}/foo_module/ListBoxZuite_reset
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Reset Successfully.
</td>
<td></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/renderjs_runner/#/foo_module
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n='Add']
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
link=Add
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog"
/>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@data-i18n='Save']
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/wait_for_activities"
/>
<tr>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_columns=modification_date%7CModification%20Date
&
field_editable_columns=modification_date
&
field_editable=checked
</td>
<td></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/renderjs_runner/#/foo_module?editable=true
</td>
<td></td>
</tr>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(1)', 'footer': '1 Records'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text"
/>
</tal:block>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope="field_listbox"]//div[@class='datetimefield']
</td>
<td></td>
</tr>
<tr>
<td>
verifyElementPresent
</td>
<td>
//div[@data-gadget-scope="field_listbox"]//div[@class='datetimefield']//input
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_select"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded"
/>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(1)', 'footer': '1 Records'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text"
/>
</tal:block>
<tr>
<td>
verifyElementNotPresent
</td>
<td>
//div[@data-gadget-scope="field_listbox"]//div[@class='datetimefield']//input
</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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