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
Léo-Paul Géneau
erp5
Commits
828f59fd
Commit
828f59fd
authored
Oct 07, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: display tool's actions on panel
parent
0ddad40a
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
217 additions
and
6 deletions
+217
-6
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_form_js.js
...plateItem/web_page_module/rjs_gadget_erp5_page_form_js.js
+4
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_form_js.xml
...lateItem/web_page_module/rjs_gadget_erp5_page_form_js.xml
+2
-2
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListMenuActionLinkForModule.xml
...e_templates_zuite/testFormListMenuActionLinkForModule.xml
+58
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListMenuActionLinkForModule.zpt
...e_templates_zuite/testFormListMenuActionLinkForModule.zpt
+0
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListMenuActionLinkForTool.xml
...age_templates_zuite/testFormListMenuActionLinkForTool.xml
+1
-1
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListMenuActionLinkForTool.zpt
...age_templates_zuite/testFormListMenuActionLinkForTool.zpt
+43
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListMenuViewLinkForModule.xml
...age_templates_zuite/testFormListMenuViewLinkForModule.xml
+58
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListMenuViewLinkForModule.zpt
...age_templates_zuite/testFormListMenuViewLinkForModule.zpt
+0
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListMenuViewLinkForTool.xml
..._page_templates_zuite/testFormListMenuViewLinkForTool.xml
+1
-1
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListMenuViewLinkForTool.zpt
..._page_templates_zuite/testFormListMenuViewLinkForTool.zpt
+50
-0
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_form_js.js
View file @
828f59fd
...
...
@@ -48,6 +48,7 @@ and handling data send&receive.
'
gadget_html5_select.html
'
],
erp5_module_regexp
=
/^
[^\/]
+_module$/
,
erp5_portal_regexp
=
/^portal_
[^\/]
+/
,
erp5_portal_document_regexp
=
/^portal_.*
\/
.+$/
,
erp5_module_document_regexp
=
/^
[^\/]
+_module
\/
.+$/
;
/*jslint regexp: false*/
...
...
@@ -272,6 +273,7 @@ and handling data send&receive.
options
=
gadget
.
state
.
options
,
page_template_gadget
,
is_module
=
erp5_module_regexp
.
test
(
gadget
.
state
.
options
.
jio_key
),
is_portal
=
erp5_portal_regexp
.
test
(
gadget
.
state
.
options
.
jio_key
),
is_module_document
=
erp5_module_document_regexp
.
test
(
gadget
.
state
.
options
.
jio_key
),
is_portal_document
=
erp5_portal_document_regexp
.
test
(
gadget
.
state
.
options
.
jio_key
),
erp5_document
=
JSON
.
parse
(
gadget
.
state
.
erp5_document
),
...
...
@@ -318,13 +320,13 @@ and handling data send&receive.
}
})
.
push
(
function
()
{
if
(
is_module
)
{
if
(
is_module
||
is_portal
)
{
return
gadget
.
getTranslationList
([
"
List
"
]);
}
})
.
push
(
function
(
translation_list
)
{
var
display_workflow_list
=
true
;
if
(
is_module
)
{
if
(
is_module
||
is_portal
)
{
if
(
erp5_document
.
_links
)
{
// hardcode "VIEWS: List" to hide "consistency", "history" and "metadata"
erp5_document
.
_links
.
action_object_view
=
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_form_js.xml
View file @
828f59fd
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
98
3.16778.9416.38758
</string>
</value>
<value>
<string>
98
6.32404.49746.11571
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
1
587089012.07
</float>
<float>
1
602059037.84
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListMenuActionLinkForModule.xml
0 → 100644
View file @
828f59fd
<?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>
testFormListMenuActionLinkForModule
</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_page_templates_zuite/testFormListMenuActionLink.zpt
→
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListMenuActionLink
ForModule
.zpt
View file @
828f59fd
File moved
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListMenu
ViewLink
.xml
→
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListMenu
ActionLinkForTool
.xml
View file @
828f59fd
...
...
@@ -42,7 +42,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
testFormListMenu
ViewLink
</string>
</value>
<value>
<string>
testFormListMenu
ActionLinkForTool
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListMenuActionLinkForTool.zpt
0 → 100644
View file @
828f59fd
<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 Form View Editable Save Action
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test Tool Panel Action Links
</td></tr>
</thead><tbody>
<tal:block
metal:use-macro=
"here/PTZuite_CommonTemplate/macros/init"
/>
<tr>
<td>
open
</td>
<td>
$
{base_url}/web_site_module/renderjs_runner/#/portal_preferences
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded"
/>
<!-- Wait for gadget to be loaded -->
<tr>
<td>
assertElementPresent
</td>
<td>
//div[@data-gadget-url='
$
{base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_list.html']
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Add
</td>
<td></td>
</tr>
<!-- Go to the views from the panel -->
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/open_menu_panel"
/>
<tr>
<td>
assertElementPresent
</td>
<td>
//div[@data-gadget-scope='panel' and contains(@class, 'visible')]//a[text()='Change Password']
</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListMenuViewLinkForModule.xml
0 → 100644
View file @
828f59fd
<?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>
testFormListMenuViewLinkForModule
</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_page_templates_zuite/testFormListMenuViewLink.zpt
→
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListMenuViewLink
ForModule
.zpt
View file @
828f59fd
File moved
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListMenu
ActionLink
.xml
→
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListMenu
ViewLinkForTool
.xml
View file @
828f59fd
...
...
@@ -42,7 +42,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
testFormListMenu
ActionLink
</string>
</value>
<value>
<string>
testFormListMenu
ViewLinkForTool
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListMenuViewLinkForTool.zpt
0 → 100644
View file @
828f59fd
<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 Default Module View
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test Default Module View
</td></tr>
</thead><tbody>
<tal:block
metal:use-macro=
"here/PTZuite_CommonTemplate/macros/init"
/>
<tr>
<td>
open
</td>
<td>
$
{base_url}/web_site_module/renderjs_runner/#/portal_preferences
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded"
/>
<!-- Wait for gadget to be loaded -->
<tr>
<td>
assertElementPresent
</td>
<td>
//div[@data-gadget-url='
$
{base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_list.html']
</td>
<td></td>
</tr>
<!-- Go to the views from the panel -->
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/open_menu_panel"
/>
<tr>
<td>
assertElementPresent
</td>
<td>
//div[@data-gadget-scope='panel' and contains(@class, 'visible')]//a[text()='List']
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//div[@data-gadget-scope='panel']//a[text()='List']
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tr>
<td>
assertElementPresent
</td>
<td>
//div[@data-gadget-url='
$
{base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_list.html']
</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