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
alecs_myu
erp5
Commits
76a7427d
Commit
76a7427d
authored
Oct 30, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Panel: use getUrlForList
Reduce number of acquire method call
parent
58295978
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
40 deletions
+34
-40
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
+32
-38
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 @
76a7427d
...
...
@@ -29,7 +29,7 @@
//////////////////////////////////////////////
// acquired method
//////////////////////////////////////////////
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
getUrlFor
List
"
,
"
getUrlForList
"
)
.
declareAcquiredMethod
(
"
translateHtml
"
,
"
translateHtml
"
)
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
...
...
@@ -162,14 +162,14 @@
queue
// Update the global links
.
push
(
function
()
{
return
RSVP
.
all
([
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
front
"
}})
,
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
history
"
}})
,
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
preference
"
}})
,
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
logout
"
}})
,
context
.
getUrlFor
({
command
:
'
display_stored_state
'
,
options
:
{
page
:
"
search
"
}})
,
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
worklist
"
}})
,
context
.
getUrlFor
({
command
:
'
display
'
})
return
context
.
getUrlForList
([
{
command
:
'
display
'
,
options
:
{
page
:
"
front
"
}}
,
{
command
:
'
display
'
,
options
:
{
page
:
"
history
"
}}
,
{
command
:
'
display
'
,
options
:
{
page
:
"
preference
"
}}
,
{
command
:
'
display
'
,
options
:
{
page
:
"
logout
"
}}
,
{
command
:
'
display_stored_state
'
,
options
:
{
page
:
"
search
"
}}
,
{
command
:
'
display
'
,
options
:
{
page
:
"
worklist
"
}}
,
{
command
:
'
display
'
}
]);
})
.
push
(
function
(
result_list
)
{
...
...
@@ -227,45 +227,39 @@
queue
.
push
(
function
()
{
var
i
=
0
,
p
romise
_list
=
[],
p
arameter
_list
=
[],
workflow_list
=
JSON
.
parse
(
gadget
.
state
.
workflow_list
),
view_list
=
JSON
.
parse
(
gadget
.
state
.
view_list
),
action_list
=
JSON
.
parse
(
gadget
.
state
.
action_list
);
for
(
i
=
0
;
i
<
workflow_list
.
length
;
i
+=
1
)
{
promise_list
.
push
(
gadget
.
getUrlFor
({
command
:
'
change
'
,
options
:
{
view
:
workflow_list
[
i
].
href
,
page
:
undefined
}
})
);
parameter_list
.
push
({
command
:
'
change
'
,
options
:
{
view
:
workflow_list
[
i
].
href
,
page
:
undefined
}
});
}
for
(
i
=
0
;
i
<
view_list
.
length
;
i
+=
1
)
{
promise_list
.
push
(
gadget
.
getUrlFor
({
command
:
'
change
'
,
options
:
{
view
:
view_list
[
i
].
href
,
page
:
undefined
}
})
);
parameter_list
.
push
({
command
:
'
change
'
,
options
:
{
view
:
view_list
[
i
].
href
,
page
:
undefined
}
});
}
for
(
i
=
0
;
i
<
action_list
.
length
;
i
+=
1
)
{
promise_list
.
push
(
gadget
.
getUrlFor
({
command
:
'
change
'
,
options
:
{
view
:
action_list
[
i
].
href
,
page
:
undefined
}
})
);
parameter_list
.
push
({
command
:
'
change
'
,
options
:
{
view
:
action_list
[
i
].
href
,
page
:
undefined
}
});
}
return
RSVP
.
all
(
promise
_list
);
return
gadget
.
getUrlForList
(
parameter
_list
);
})
.
push
(
function
(
result_list
)
{
var
i
,
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.xml
View file @
76a7427d
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
68.5552.51560.44322
</string>
</value>
<value>
<string>
9
71.19133.62867.18210
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
15
39942701.69
</float>
<float>
15
40909039.27
</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