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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
61d51dbe
Commit
61d51dbe
authored
Nov 08, 2017
by
Tomáš Peterka
Committed by
Tomáš Peterka
Nov 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[renderjs_ui] LinesField renders "synchronously" with the application
/reviewed-on
nexedi/erp5!484
parent
56530e6e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
14 deletions
+18
-14
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_linesfield_js.js
...lateItem/web_page_module/rjs_gadget_erp5_linesfield_js.js
+8
-8
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_linesfield_js.xml
...ateItem/web_page_module/rjs_gadget_erp5_linesfield_js.xml
+2
-2
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_lines_field_zuite/testEmptyLine.zpt
...tal_tests/renderjs_ui_lines_field_zuite/testEmptyLine.zpt
+8
-4
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_linesfield_js.js
View file @
61d51dbe
...
...
@@ -3,14 +3,14 @@
(
function
(
window
,
rJS
)
{
"
use strict
"
;
function
listToNewlines
(
li
st
)
{
if
(
list
.
constructor
===
Array
)
{
return
list
.
join
(
"
\n
"
);
}
return
li
st
;
function
listToNewlines
(
li
nes
)
{
if
(
Array
.
isArray
(
lines
))
{
return
lines
.
join
(
"
\n
"
);
}
return
li
nes
;
}
function
listToBR
(
li
st
)
{
if
(
list
.
constructor
===
Array
)
{
return
list
.
join
(
"
<br/>
\n
"
);
}
return
li
st
;
function
listToBR
(
li
nes
)
{
if
(
Array
.
isArray
(
lines
))
{
return
lines
.
join
(
"
<br/>
\n
"
);
}
return
li
nes
;
}
rJS
(
window
)
...
...
@@ -50,7 +50,7 @@
});
});
}
return
gadget
.
getDeclaredGadget
(
'
sub
'
)
.
push
(
function
(
input
)
{
if
(
modification_dict
.
hasOwnProperty
(
"
value
"
))
{
...
...
@@ -61,7 +61,7 @@
}
}
// when we only receive changes we can simply pass (minimaly modified) modification dictionary
input
.
render
(
modification_dict
);
return
input
.
render
(
modification_dict
);
});
})
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_linesfield_js.xml
View file @
61d51dbe
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.
46312.16078.20206
</string>
</value>
<value>
<string>
961.
56527.16709.20804
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
15
03932173.09
</float>
<float>
15
10071879.23
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_lines_field_zuite/testEmptyLine.zpt
View file @
61d51dbe
...
...
@@ -22,7 +22,9 @@
<td>
//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_lines.html"]//textarea
</td><td></td></tr>
<tr><td>
type
</td>
<td>
field_my_lines_list
</td>
<td>
javascript{"\na\nb\n"}
</td></tr>
<td>
a
b
</td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//button[@data-i18n='Save']
</td><td></td></tr>
<tr><td>
click
</td>
...
...
@@ -39,8 +41,10 @@
<td>
//div[@data-gadget-url='${renderjs_url}/gadget_erp5_field_listbox.html']//table/tbody/tr[1]//a
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_lines.html"]//textarea
</td><td></td></tr>
<tr><td>
assertEval
</td>
<td>
this.browserbot.findElement('field_my_lines_list').value
</td>
<td>
javascript{"\na\nb\n"}
</td></tr>
<tr><td>
assertValue
</td>
<td>
//textarea[@name='field_my_lines_list']
</td>
<td>
a
b
</td></tr>
</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