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
Titouan Soulard
erp5
Commits
d63ee187
Commit
d63ee187
authored
Sep 14, 2021
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: improve readability
parent
9fa1ea05
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
27 deletions
+29
-27
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
-25
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 @
d63ee187
...
...
@@ -42,6 +42,7 @@
//////////////////////////////////////////////
.
declareAcquiredMethod
(
"
getUrlForList
"
,
"
getUrlForList
"
)
.
declareAcquiredMethod
(
"
getTranslationList
"
,
"
getTranslationList
"
)
.
declareAcquiredMethod
(
"
getTranslationDict
"
,
"
getTranslationDict
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
getUrlParameter
"
,
"
getUrlParameter
"
)
...
...
@@ -174,8 +175,8 @@
queue
// Update the global links
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getUrlForList
([
return
RSVP
.
hash
({
url_list
:
gadget
.
getUrlForList
([
{
command
:
'
display
'
},
{
command
:
'
display
'
,
options
:
{
page
:
"
front
"
}},
{
command
:
'
display
'
,
options
:
{
page
:
"
worklist
"
}},
...
...
@@ -184,7 +185,7 @@
{
command
:
'
display
'
,
options
:
{
page
:
"
preference
"
}},
{
command
:
'
display
'
,
options
:
{
page
:
"
logout
"
}}
]),
gadget
.
getTranslationList
([
translation_list
:
gadget
.
getTranslationList
([
'
Editable
'
,
'
Home
'
,
'
Modules
'
,
...
...
@@ -194,10 +195,10 @@
'
Preferences
'
,
'
Logout
'
]),
gadget
.
getDeclaredGadget
(
"
erp5_checkbox
"
)
]
);
checkbox_gadget
:
gadget
.
getDeclaredGadget
(
"
erp5_checkbox
"
)
}
);
})
.
push
(
function
(
result_
lis
t
)
{
.
push
(
function
(
result_
dic
t
)
{
var
editable_value
=
[],
element_list
=
[],
icon_and_key_list
=
[
...
...
@@ -210,14 +211,14 @@
'
power-off
'
,
'
o
'
];
for
(
i
=
0
;
i
<
result_
list
[
0
]
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
result_
dict
.
url_list
.
length
;
i
+=
1
)
{
// <li><a href="URL" class="ui-btn-icon-left ui-icon-ICON" data-i18n="TITLE" accesskey="KEY"></a></li>
element_list
.
push
(
domsugar
(
'
li
'
,
[
domsugar
(
'
a
'
,
{
href
:
result_
list
[
0
]
[
i
],
href
:
result_
dict
.
url_list
[
i
],
'
class
'
:
'
ui-btn-icon-left ui-icon-
'
+
icon_and_key_list
[
2
*
i
],
accesskey
:
icon_and_key_list
[
2
*
i
+
1
],
text
:
result_
list
[
1
]
[
i
+
1
]
text
:
result_
dict
.
translation_list
[
i
+
1
]
})
]));
}
...
...
@@ -228,12 +229,12 @@
if
(
gadget
.
state
.
editable
)
{
editable_value
=
[
'
editable
'
];
}
return
result_
list
[
2
]
.
render
({
field_json
:
{
return
result_
dict
.
checkbox_gadget
.
render
({
field_json
:
{
editable
:
true
,
name
:
'
editable
'
,
key
:
'
editable
'
,
hidden
:
false
,
items
:
[[
result_
list
[
1
]
[
0
],
'
editable
'
]],
items
:
[[
result_
dict
.
translation_list
[
0
],
'
editable
'
]],
'
default
'
:
editable_value
}});
});
...
...
@@ -269,25 +270,26 @@
).
concat
(
clone_list
).
concat
(
jump_list
).
map
(
function
(
options
)
{
return
options
.
url_kw
;
});
return
RSVP
.
all
([
gadget
.
getUrlForList
(
parameter_list
),
gadget
.
getTranslationList
([
'
Views
'
,
'
Workflows
'
,
'
Actions
'
,
'
Jumps
'
])
]);
return
RSVP
.
hash
({
url_list
:
gadget
.
getUrlForList
(
parameter_list
),
translation_dict
:
gadget
.
getTranslationDict
([
'
Views
'
,
'
Workflows
'
,
'
Actions
'
,
'
Jumps
'
])
});
})
.
push
(
function
(
result_
lis
t
)
{
appendDt
(
dl_fragment
,
result_
list
[
1
][
0
]
,
'
eye
'
,
view_list
,
result_
list
[
0
]
,
0
);
.
push
(
function
(
result_
dic
t
)
{
appendDt
(
dl_fragment
,
result_
dict
.
translation_dict
.
Views
,
'
eye
'
,
view_list
,
result_
dict
.
url_list
,
0
);
if
(
gadget
.
state
.
display_workflow_list
)
{
// show Workflows only on document
appendDt
(
dl_fragment
,
result_
list
[
1
][
1
]
,
'
random
'
,
workflow_list
,
result_
list
[
0
]
,
view_list
.
length
);
appendDt
(
dl_fragment
,
result_
dict
.
translation_dict
.
Workflows
,
'
random
'
,
workflow_list
,
result_
dict
.
url_list
,
view_list
.
length
);
}
appendDt
(
dl_fragment
,
result_
list
[
1
][
2
]
,
'
cogs
'
,
action_list
.
concat
(
clone_list
),
result_
list
[
0
]
,
appendDt
(
dl_fragment
,
result_
dict
.
translation_dict
.
Actions
,
'
cogs
'
,
action_list
.
concat
(
clone_list
),
result_
dict
.
url_list
,
view_list
.
length
+
workflow_list
.
length
);
appendDt
(
dl_fragment
,
result_
list
[
1
][
3
]
,
'
plane
'
,
jump_list
,
result_
list
[
0
]
,
appendDt
(
dl_fragment
,
result_
dict
.
translation_dict
.
Jumps
,
'
plane
'
,
jump_list
,
result_
dict
.
url_list
,
view_list
.
length
+
workflow_list
.
length
+
action_list
.
length
+
clone_list
.
length
);
});
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.xml
View file @
d63ee187
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
994.510
61.29790.4608
</string>
</value>
<value>
<string>
994.510
79.60050.30071
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
163162
1138.31
</float>
<float>
163162
2266.86
</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