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
Show 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 @@
...
@@ -29,7 +29,7 @@
//////////////////////////////////////////////
//////////////////////////////////////////////
// acquired method
// acquired method
//////////////////////////////////////////////
//////////////////////////////////////////////
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
getUrlFor
List
"
,
"
getUrlForList
"
)
.
declareAcquiredMethod
(
"
translateHtml
"
,
"
translateHtml
"
)
.
declareAcquiredMethod
(
"
translateHtml
"
,
"
translateHtml
"
)
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
...
@@ -162,14 +162,14 @@
...
@@ -162,14 +162,14 @@
queue
queue
// Update the global links
// Update the global links
.
push
(
function
()
{
.
push
(
function
()
{
return
RSVP
.
all
([
return
context
.
getUrlForList
([
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
front
"
}})
,
{
command
:
'
display
'
,
options
:
{
page
:
"
front
"
}}
,
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
history
"
}})
,
{
command
:
'
display
'
,
options
:
{
page
:
"
history
"
}}
,
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
preference
"
}})
,
{
command
:
'
display
'
,
options
:
{
page
:
"
preference
"
}}
,
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
logout
"
}})
,
{
command
:
'
display
'
,
options
:
{
page
:
"
logout
"
}}
,
context
.
getUrlFor
({
command
:
'
display_stored_state
'
,
options
:
{
page
:
"
search
"
}})
,
{
command
:
'
display_stored_state
'
,
options
:
{
page
:
"
search
"
}}
,
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
worklist
"
}})
,
{
command
:
'
display
'
,
options
:
{
page
:
"
worklist
"
}}
,
context
.
getUrlFor
({
command
:
'
display
'
})
{
command
:
'
display
'
}
]);
]);
})
})
.
push
(
function
(
result_list
)
{
.
push
(
function
(
result_list
)
{
...
@@ -227,45 +227,39 @@
...
@@ -227,45 +227,39 @@
queue
queue
.
push
(
function
()
{
.
push
(
function
()
{
var
i
=
0
,
var
i
=
0
,
p
romise
_list
=
[],
p
arameter
_list
=
[],
workflow_list
=
JSON
.
parse
(
gadget
.
state
.
workflow_list
),
workflow_list
=
JSON
.
parse
(
gadget
.
state
.
workflow_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
);
for
(
i
=
0
;
i
<
workflow_list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
workflow_list
.
length
;
i
+=
1
)
{
promise_list
.
push
(
parameter_list
.
push
({
gadget
.
getUrlFor
({
command
:
'
change
'
,
command
:
'
change
'
,
options
:
{
options
:
{
view
:
workflow_list
[
i
].
href
,
view
:
workflow_list
[
i
].
href
,
page
:
undefined
page
:
undefined
}
}
})
});
);
}
}
for
(
i
=
0
;
i
<
view_list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
view_list
.
length
;
i
+=
1
)
{
promise_list
.
push
(
parameter_list
.
push
({
gadget
.
getUrlFor
({
command
:
'
change
'
,
command
:
'
change
'
,
options
:
{
options
:
{
view
:
view_list
[
i
].
href
,
view
:
view_list
[
i
].
href
,
page
:
undefined
page
:
undefined
}
}
})
});
);
}
}
for
(
i
=
0
;
i
<
action_list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
action_list
.
length
;
i
+=
1
)
{
promise_list
.
push
(
parameter_list
.
push
({
gadget
.
getUrlFor
({
command
:
'
change
'
,
command
:
'
change
'
,
options
:
{
options
:
{
view
:
action_list
[
i
].
href
,
view
:
action_list
[
i
].
href
,
page
:
undefined
page
:
undefined
}
}
})
});
);
}
}
return
RSVP
.
all
(
promise
_list
);
return
gadget
.
getUrlForList
(
parameter
_list
);
})
})
.
push
(
function
(
result_list
)
{
.
push
(
function
(
result_list
)
{
var
i
,
var
i
,
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.xml
View file @
76a7427d
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
39942701.69
</float>
<float>
15
40909039.27
</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