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
718a229c
Commit
718a229c
authored
Aug 06, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: display jump action in the panel
parent
1f2b8971
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
7 deletions
+32
-7
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_html.html
...plateItem/web_page_module/rjs_gadget_erp5_panel_html.html
+1
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_html.xml
...mplateItem/web_page_module/rjs_gadget_erp5_panel_html.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.js
...hTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.js
+27
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.xml
...TemplateItem/web_page_module/rjs_gadget_erp5_panel_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_html.html
View file @
718a229c
...
...
@@ -17,6 +17,7 @@
data-i18n=Views
data-i18n=Workflows
data-i18n=Actions
data-i18n=Jumps
-->
<!-- renderjs -->
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_html.xml
View file @
718a229c
...
...
@@ -238,7 +238,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
79.2850.38922.4829
8
</string>
</value>
<value>
<string>
9
85.48809.10432.4457
8
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>
15
89291863.8
5
</float>
<float>
15
96701351.
5
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.js
View file @
718a229c
...
...
@@ -66,6 +66,7 @@
workflow_list
,
view_list
,
action_list
,
jump_list
,
i
;
if
(
visible
===
undefined
)
{
...
...
@@ -84,6 +85,7 @@
action_list
=
ensureArray
(
erp5_document
.
_links
.
action_object_jio_action
)
.
concat
(
ensureArray
(
erp5_document
.
_links
.
action_object_jio_button
))
.
concat
(
ensureArray
(
erp5_document
.
_links
.
action_object_jio_fast_input
));
jump_list
=
ensureArray
(
erp5_document
.
_links
.
action_object_jio_jump
);
if
(
view
===
'
view
'
)
{
for
(
i
=
0
;
i
<
view_list
.
length
;
i
+=
1
)
{
...
...
@@ -99,12 +101,16 @@
for
(
i
=
0
;
i
<
action_list
.
length
;
i
+=
1
)
{
action_list
[
i
].
class_name
=
action_list
[
i
].
href
===
view
?
'
active
'
:
''
;
}
for
(
i
=
0
;
i
<
jump_list
.
length
;
i
+=
1
)
{
jump_list
[
i
].
class_name
=
jump_list
[
i
].
href
===
view
?
'
active
'
:
''
;
}
}
// Prevent has much as possible to modify the DOM panel
// stateChange prefer to compare strings
workflow_list
=
JSON
.
stringify
(
workflow_list
);
view_list
=
JSON
.
stringify
(
view_list
);
action_list
=
JSON
.
stringify
(
action_list
);
jump_list
=
JSON
.
stringify
(
jump_list
);
}
return
context
.
getUrlParameter
(
'
editable
'
)
.
push
(
function
(
editable
)
{
...
...
@@ -114,6 +120,7 @@
workflow_list
:
workflow_list
,
view_list
:
view_list
,
action_list
:
action_list
,
jump_list
:
jump_list
,
global
:
true
,
jio_key
:
jio_key
,
editable
:
asBoolean
(
options
.
editable
)
||
asBoolean
(
editable
)
||
false
...
...
@@ -234,6 +241,7 @@
(
modification_dict
.
hasOwnProperty
(
"
editable
"
)
||
modification_dict
.
hasOwnProperty
(
"
workflow_list
"
)
||
modification_dict
.
hasOwnProperty
(
"
action_list
"
)
||
modification_dict
.
hasOwnProperty
(
"
jump_list
"
)
||
modification_dict
.
hasOwnProperty
(
"
jio_key
"
)
||
modification_dict
.
hasOwnProperty
(
"
view_list
"
)))
{
if
(
this
.
state
.
view_list
===
undefined
)
{
...
...
@@ -244,7 +252,8 @@
var
i
=
0
,
parameter_list
=
[],
view_list
=
JSON
.
parse
(
gadget
.
state
.
view_list
),
action_list
=
JSON
.
parse
(
gadget
.
state
.
action_list
);
action_list
=
JSON
.
parse
(
gadget
.
state
.
action_list
),
jump_list
=
JSON
.
parse
(
gadget
.
state
.
jump_list
);
workflow_list
=
JSON
.
parse
(
gadget
.
state
.
workflow_list
);
for
(
i
=
0
;
i
<
view_list
.
length
;
i
+=
1
)
{
...
...
@@ -274,16 +283,27 @@
}
});
}
for
(
i
=
0
;
i
<
jump_list
.
length
;
i
+=
1
)
{
parameter_list
.
push
({
command
:
'
display_dialog_with_history
'
,
options
:
{
jio_key
:
gadget
.
state
.
jio_key
,
view
:
jump_list
[
i
].
href
}
});
}
return
RSVP
.
all
([
gadget
.
getUrlForList
(
parameter_list
),
gadget
.
getTranslationList
([
'
Views
'
,
'
Workflows
'
,
'
Actions
'
])
gadget
.
getTranslationList
([
'
Views
'
,
'
Workflows
'
,
'
Actions
'
,
'
Jumps
'
])
]);
})
.
push
(
function
(
result_list
)
{
var
dl_element
,
dl_fragment
=
document
.
createDocumentFragment
(),
view_list
=
JSON
.
parse
(
gadget
.
state
.
view_list
),
action_list
=
JSON
.
parse
(
gadget
.
state
.
action_list
);
action_list
=
JSON
.
parse
(
gadget
.
state
.
action_list
),
jump_list
=
JSON
.
parse
(
gadget
.
state
.
jump_list
);
appendDt
(
dl_fragment
,
result_list
[
1
][
0
],
'
eye
'
,
view_list
,
result_list
[
0
],
0
);
...
...
@@ -295,6 +315,10 @@
appendDt
(
dl_fragment
,
result_list
[
1
][
2
],
'
cogs
'
,
action_list
,
result_list
[
0
],
view_list
.
length
+
workflow_list
.
length
);
appendDt
(
dl_fragment
,
result_list
[
1
][
3
],
'
plane
'
,
jump_list
,
result_list
[
0
],
view_list
.
length
+
workflow_list
.
length
+
action_list
.
length
);
dl_element
=
gadget
.
element
.
querySelector
(
"
dl
"
);
while
(
dl_element
.
firstChild
)
{
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.xml
View file @
718a229c
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
75.56491.25907.38877
</string>
</value>
<value>
<string>
9
86.32404.49746.11571
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
1
558448423.72
</float>
<float>
1
600352235.33
</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