Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
erp5
Commits
f9c408f7
Commit
f9c408f7
authored
May 14, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Use getUrlForList to reduce number of acquired method call
parent
4234b52a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
34 deletions
+36
-34
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
...emplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
+17
-23
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
...mplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_frontpage_js.js
...teItem/web_page_module/rjs_gadget_erp5_pt_frontpage_js.js
+15
-7
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_frontpage_js.xml
...eItem/web_page_module/rjs_gadget_erp5_pt_frontpage_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
View file @
f9c408f7
...
@@ -146,6 +146,7 @@
...
@@ -146,6 +146,7 @@
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
declareAcquiredMethod
(
"
translateHtml
"
,
"
translateHtml
"
)
.
declareAcquiredMethod
(
"
translateHtml
"
,
"
translateHtml
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
getUrlForList
"
,
"
getUrlForList
"
)
.
declareAcquiredMethod
(
"
getUrlParameter
"
,
"
getUrlParameter
"
)
.
declareAcquiredMethod
(
"
getUrlParameter
"
,
"
getUrlParameter
"
)
.
declareAcquiredMethod
(
"
renderEditorPanel
"
,
"
renderEditorPanel
"
)
.
declareAcquiredMethod
(
"
renderEditorPanel
"
,
"
renderEditorPanel
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
...
@@ -482,8 +483,7 @@
...
@@ -482,8 +483,7 @@
sort_list
=
JSON
.
parse
(
gadget
.
state
.
sort_list_json
);
sort_list
=
JSON
.
parse
(
gadget
.
state
.
sort_list_json
);
// Every line points to a sub-document so we need those links
// Every line points to a sub-document so we need those links
for
(
i
=
0
;
i
<
counter
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
counter
;
i
+=
1
)
{
promise_list
.
push
(
promise_list
.
push
({
gadget
.
getUrlFor
({
command
:
gadget
.
state
.
command
,
command
:
gadget
.
state
.
command
,
options
:
{
options
:
{
jio_key
:
allDocs_result
.
data
.
rows
[
i
].
id
,
jio_key
:
allDocs_result
.
data
.
rows
[
i
].
id
,
...
@@ -493,24 +493,18 @@
...
@@ -493,24 +493,18 @@
list_method_template
:
gadget
.
state
.
list_method_template
,
list_method_template
:
gadget
.
state
.
list_method_template
,
"
sort_list:json
"
:
sort_list
"
sort_list:json
"
:
sort_list
}
}
})
});
);
for
(
j
=
0
;
j
<
column_list
.
length
;
j
+=
1
)
{
for
(
j
=
0
;
j
<
column_list
.
length
;
j
+=
1
)
{
content_value
=
allDocs_result
.
data
.
rows
[
i
].
value
[
column_list
[
j
][
0
]]
||
""
;
content_value
=
allDocs_result
.
data
.
rows
[
i
].
value
[
column_list
[
j
][
0
]]
||
""
;
if
(
content_value
.
url_value
)
{
if
(
content_value
.
url_value
)
{
if
(
content_value
.
url_value
.
command
)
{
if
(
content_value
.
url_value
.
command
)
{
url_promise_list
.
push
(
url_promise_list
.
push
(
content_value
.
url_value
);
gadget
.
getUrlFor
(
content_value
.
url_value
)
);
}
}
}
}
}
}
}
}
promise_list
.
push
.
apply
(
promise_list
,
url_promise_list
);
promise_list
.
push
.
apply
(
promise_list
,
url_promise_list
);
return
new
RSVP
.
Queue
()
return
gadget
.
getUrlForList
(
promise_list
)
.
push
(
function
()
{
return
RSVP
.
all
(
promise_list
);
})
.
push
(
function
(
line_link_list
)
{
.
push
(
function
(
line_link_list
)
{
var
row_list
=
[],
var
row_list
=
[],
value
,
value
,
...
@@ -610,9 +604,9 @@
...
@@ -610,9 +604,9 @@
prev_param
[
gadget
.
state
.
key
+
'
_begin_from
'
]
=
gadget
.
state
.
begin_from
-
lines
;
prev_param
[
gadget
.
state
.
key
+
'
_begin_from
'
]
=
gadget
.
state
.
begin_from
-
lines
;
setNext
();
setNext
();
}
}
return
RSVP
.
all
([
return
gadget
.
getUrlForList
([
gadget
.
getUrlFor
({
command
:
'
change
'
,
options
:
prev_param
})
,
{
command
:
'
change
'
,
options
:
prev_param
}
,
gadget
.
getUrlFor
({
command
:
'
change
'
,
options
:
next_param
})
{
command
:
'
change
'
,
options
:
next_param
}
]);
]);
})
})
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
View file @
f9c408f7
...
@@ -236,7 +236,7 @@
...
@@ -236,7 +236,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
967.34
816.49816.58760
</string>
</value>
<value>
<string>
967.34
904.15900.7253
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -254,7 +254,7 @@
...
@@ -254,7 +254,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
152629
2640.95
</float>
<float>
152629
7884.31
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_frontpage_js.js
View file @
f9c408f7
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
getUrlParameter
"
,
"
getUrlParameter
"
)
.
declareAcquiredMethod
(
"
getUrlParameter
"
,
"
getUrlParameter
"
)
.
declareAcquiredMethod
(
"
getUrlForList
"
,
"
getUrlForList
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
...
@@ -18,14 +19,21 @@
...
@@ -18,14 +19,21 @@
.
allowPublicAcquisition
(
'
updateHeader
'
,
function
()
{
.
allowPublicAcquisition
(
'
updateHeader
'
,
function
()
{
return
;
return
;
})
})
.
allowPublicAcquisition
(
'
getUrlFor
'
,
function
(
argument_list
)
{
.
allowPublicAcquisition
(
'
getUrlForList
'
,
function
(
argument_list
)
{
if
(
argument_list
[
0
].
command
===
'
index
'
)
{
var
i
,
return
this
.
getUrlFor
({
options_list
=
argument_list
[
0
],
result_list
=
[];
for
(
i
=
0
;
i
<
options_list
.
length
;
i
+=
1
)
{
if
(
options_list
[
i
].
command
===
'
index
'
)
{
result_list
.
push
({
command
:
'
display_stored_state
'
,
command
:
'
display_stored_state
'
,
options
:
{
jio_key
:
argument_list
[
0
].
options
.
jio_key
}
options
:
{
jio_key
:
options_list
[
i
].
options
.
jio_key
}
});
});
}
else
{
result_list
.
push
(
options_list
[
i
]);
}
}
return
this
.
getUrlFor
.
apply
(
this
,
argument_list
);
}
return
this
.
getUrlForList
.
apply
(
this
,
[
result_list
]);
})
})
.
allowPublicAcquisition
(
'
jio_allDocs
'
,
function
(
argument_list
)
{
.
allowPublicAcquisition
(
'
jio_allDocs
'
,
function
(
argument_list
)
{
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_frontpage_js.xml
View file @
f9c408f7
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
5.30895.62413.8584
</string>
</value>
<value>
<string>
96
7.35005.6239.57258
</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
18597596.15
</float>
<float>
15
26303943.53
</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