Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
f2be0272
Commit
f2be0272
authored
Apr 02, 2019
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
Hide 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 @@
var
lines
=
gadget
.
state
.
lines
,
promise_list
=
[],
url_promise_list
=
[],
allDocs_result
=
gadget
.
state
.
allDocs_result
,
allDocs_result
=
JSON
.
parse
(
gadget
.
state
.
allDocs_result
)
,
counter
,
pagination_message
=
''
,
content_value
;
...
...
@@ -965,7 +965,7 @@
}
// 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>}
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
.
value
.
push
(
allDocs_result
.
data
.
rows
[
i
].
value
[
'
listbox_uid:list
'
].
value
);
// we could come up with better name than "value" for almost everything ^^
...
...
@@ -1069,7 +1069,7 @@
nav_element
.
appendChild
(
fragment
);
})
.
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
)
{
var
row_editability
=
row
[
'
listbox_uid:list
'
]
!==
undefined
;
return
{
...
...
@@ -1188,7 +1188,7 @@
})
.
push
(
function
(
result
)
{
return
gadget
.
changeState
({
allDocs_result
:
result
allDocs_result
:
JSON
.
stringify
(
result
)
});
},
function
(
error
)
{
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
View file @
f2be0272
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<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>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
15
47458514.41
</float>
<float>
15
54195993.54
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
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>
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
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