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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gabriel Monnerat
erp5
Commits
f3320c75
Commit
f3320c75
authored
Nov 18, 2020
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: Add developer mode section with links from raw_list
parent
dd8bd84a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
25 deletions
+33
-25
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
+31
-23
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_js.js
View file @
f3320c75
...
@@ -71,6 +71,7 @@
...
@@ -71,6 +71,7 @@
view_list
,
view_list
,
action_list
,
action_list
,
jump_list
,
jump_list
,
raw_list
,
i
;
i
;
if
(
visible
===
undefined
)
{
if
(
visible
===
undefined
)
{
...
@@ -90,6 +91,7 @@
...
@@ -90,6 +91,7 @@
.
concat
(
ensureArray
(
erp5_document
.
_links
.
action_object_jio_button
))
.
concat
(
ensureArray
(
erp5_document
.
_links
.
action_object_jio_button
))
.
concat
(
ensureArray
(
erp5_document
.
_links
.
action_object_jio_fast_input
));
.
concat
(
ensureArray
(
erp5_document
.
_links
.
action_object_jio_fast_input
));
jump_list
=
ensureArray
(
erp5_document
.
_links
.
action_object_jio_jump
);
jump_list
=
ensureArray
(
erp5_document
.
_links
.
action_object_jio_jump
);
raw_list
=
ensureArray
(
erp5_document
.
_links
.
action_object_jio_raw
);
if
(
view
===
'
view
'
)
{
if
(
view
===
'
view
'
)
{
for
(
i
=
0
;
i
<
view_list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
view_list
.
length
;
i
+=
1
)
{
...
@@ -115,6 +117,7 @@
...
@@ -115,6 +117,7 @@
view_list
=
JSON
.
stringify
(
view_list
);
view_list
=
JSON
.
stringify
(
view_list
);
action_list
=
JSON
.
stringify
(
action_list
);
action_list
=
JSON
.
stringify
(
action_list
);
jump_list
=
JSON
.
stringify
(
jump_list
);
jump_list
=
JSON
.
stringify
(
jump_list
);
raw_list
=
JSON
.
stringify
(
raw_list
);
}
}
return
context
.
getUrlParameter
(
'
editable
'
)
return
context
.
getUrlParameter
(
'
editable
'
)
.
push
(
function
(
editable
)
{
.
push
(
function
(
editable
)
{
...
@@ -125,6 +128,7 @@
...
@@ -125,6 +128,7 @@
view_list
:
view_list
,
view_list
:
view_list
,
action_list
:
action_list
,
action_list
:
action_list
,
jump_list
:
jump_list
,
jump_list
:
jump_list
,
raw_list
:
raw_list
,
global
:
true
,
global
:
true
,
jio_key
:
jio_key
,
jio_key
:
jio_key
,
view
:
view
,
view
:
view
,
...
@@ -250,6 +254,7 @@
...
@@ -250,6 +254,7 @@
modification_dict
.
hasOwnProperty
(
"
workflow_list
"
)
||
modification_dict
.
hasOwnProperty
(
"
workflow_list
"
)
||
modification_dict
.
hasOwnProperty
(
"
action_list
"
)
||
modification_dict
.
hasOwnProperty
(
"
action_list
"
)
||
modification_dict
.
hasOwnProperty
(
"
jump_list
"
)
||
modification_dict
.
hasOwnProperty
(
"
jump_list
"
)
||
modification_dict
.
hasOwnProperty
(
"
raw_list
"
)
||
modification_dict
.
hasOwnProperty
(
"
jio_key
"
)
||
modification_dict
.
hasOwnProperty
(
"
jio_key
"
)
||
modification_dict
.
hasOwnProperty
(
"
view_list
"
)))
{
modification_dict
.
hasOwnProperty
(
"
view_list
"
)))
{
if
(
this
.
state
.
view_list
===
undefined
)
{
if
(
this
.
state
.
view_list
===
undefined
)
{
...
@@ -261,7 +266,8 @@
...
@@ -261,7 +266,8 @@
parameter_list
=
[],
parameter_list
=
[],
view_list
=
JSON
.
parse
(
gadget
.
state
.
view_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
);
jump_list
=
JSON
.
parse
(
gadget
.
state
.
jump_list
),
raw_list
=
JSON
.
parse
(
gadget
.
state
.
raw_list
);
workflow_list
=
JSON
.
parse
(
gadget
.
state
.
workflow_list
);
workflow_list
=
JSON
.
parse
(
gadget
.
state
.
workflow_list
);
for
(
i
=
0
;
i
<
view_list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
view_list
.
length
;
i
+=
1
)
{
...
@@ -292,30 +298,26 @@
...
@@ -292,30 +298,26 @@
});
});
}
}
for
(
i
=
0
;
i
<
jump_list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
jump_list
.
length
;
i
+=
1
)
{
if
(
jump_list
[
i
].
href
.
indexOf
(
"
http
"
)
!==
-
1
)
{
parameter_list
.
push
({
parameter_list
.
push
({
command
:
'
display_dialog_with_history
'
,
command
:
'
display_dialog_with_history
'
,
options
:
{
options
:
{
jio_key
:
gadget
.
state
.
jio_key
,
jio_key
:
gadget
.
state
.
jio_key
,
view
:
jump_list
[
i
].
href
view
:
jump_list
[
i
].
href
}
}
});
});
}
}
else
{
for
(
i
=
0
;
i
<
raw_list
.
length
;
i
+=
1
)
{
// support action that redirect developers to the backend
parameter_list
.
push
({
// For example, link to access a document portal type
command
:
'
raw
'
,
parameter_list
.
push
({
options
:
{
command
:
'
raw
'
,
url
:
raw_list
[
i
].
href
options
:
{
}
url
:
jump_list
[
i
].
href
});
}
});
}
}
}
return
RSVP
.
all
([
return
RSVP
.
all
([
gadget
.
getUrlForList
(
parameter_list
),
gadget
.
getUrlForList
(
parameter_list
),
gadget
.
getTranslationList
([
'
Views
'
,
'
Workflows
'
,
'
Actions
'
,
gadget
.
getTranslationList
([
'
Views
'
,
'
Workflows
'
,
'
Actions
'
,
'
Jumps
'
])
'
Jumps
'
,
'
Developer Mode
'
])
]);
]);
})
})
.
push
(
function
(
result_list
)
{
.
push
(
function
(
result_list
)
{
...
@@ -323,7 +325,8 @@
...
@@ -323,7 +325,8 @@
dl_fragment
=
document
.
createDocumentFragment
(),
dl_fragment
=
document
.
createDocumentFragment
(),
view_list
=
JSON
.
parse
(
gadget
.
state
.
view_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
);
jump_list
=
JSON
.
parse
(
gadget
.
state
.
jump_list
),
raw_list
=
JSON
.
parse
(
gadget
.
state
.
raw_list
);
appendDt
(
dl_fragment
,
result_list
[
1
][
0
],
'
eye
'
,
appendDt
(
dl_fragment
,
result_list
[
1
][
0
],
'
eye
'
,
view_list
,
result_list
[
0
],
0
);
view_list
,
result_list
[
0
],
0
);
...
@@ -339,7 +342,12 @@
...
@@ -339,7 +342,12 @@
jump_list
,
result_list
[
0
],
jump_list
,
result_list
[
0
],
view_list
.
length
+
workflow_list
.
length
+
view_list
.
length
+
workflow_list
.
length
+
action_list
.
length
);
action_list
.
length
);
if
(
raw_list
.
length
!==
0
)
{
appendDt
(
dl_fragment
,
result_list
[
1
][
4
],
'
plane
'
,
raw_list
,
result_list
[
0
],
view_list
.
length
+
workflow_list
.
length
+
action_list
.
length
);
}
dl_element
=
gadget
.
element
.
querySelector
(
"
dl
"
);
dl_element
=
gadget
.
element
.
querySelector
(
"
dl
"
);
while
(
dl_element
.
firstChild
)
{
while
(
dl_element
.
firstChild
)
{
dl_element
.
removeChild
(
dl_element
.
firstChild
);
dl_element
.
removeChild
(
dl_element
.
firstChild
);
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.xml
View file @
f3320c75
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
988.
2148.10611.6495
5
</string>
</value>
<value>
<string>
988.
3902.36248.1230
5
</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>
1605
623076.71
</float>
<float>
1605
718582.87
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</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