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
Frederic Thoma
erp5
Commits
c65b316e
Commit
c65b316e
authored
Mar 17, 2016
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: allDocs's sort_on parameter should be 2 dimensions array
parent
4c09b548
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
16 deletions
+22
-16
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
...rtal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
+8
-3
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.xml
...tal_skins/erp5_hal_json_style/ERP5Document_getHateoas.xml
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_jio_js.js
...athTemplateItem/web_page_module/rjs_gadget_erp5_jio_js.js
+7
-1
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
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_search_js.js
...ateItem/web_page_module/rjs_gadget_erp5_page_search_js.js
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_sorteditor_js.js
...lateItem/web_page_module/rjs_gadget_erp5_sorteditor_js.js
+4
-9
No files found.
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
View file @
c65b316e
...
...
@@ -960,9 +960,14 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
tmp_sort_on
=
()
if
sort_on
is
not
None
:
for
grain
in
sort_on
:
if
grain
!=
""
:
tmp_sort_on
+=
(
tuple
([
x
for
x
in
grain
.
split
(
","
)]),)
if
isinstance
(
sort_on
,
list
):
for
grain
in
sort_on
:
tmp_sort_on
+=
(
tuple
([
x
for
x
in
json
.
loads
(
grain
)]),)
else
:
#only one single criteria
tmp_sort_on
=
(
tuple
([
x
for
x
in
json
.
loads
(
sort_on
)]),)
if
query
:
sql_list
=
callable_list_method
(
full_text
=
query
,
limit
=
limit
,
sort_on
=
tmp_sort_on
,
local_roles
=
local_roles
,
**
catalog_kw
)
...
...
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.xml
View file @
c65b316e
...
...
@@ -56,7 +56,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
REQUEST=None, response=None, view=None, mode=\'root\', query=None, select_list=None, limit=10, local_roles=None, form=None, relative_url=None, restricted=0, list_method=None, default_param_json=None, form_relative_url=None, bulk_list="[]", sort_on=
()
</string>
</value>
<value>
<string>
REQUEST=None, response=None, view=None, mode=\'root\', query=None, select_list=None, limit=10, local_roles=None, form=None, relative_url=None, restricted=0, list_method=None, default_param_json=None, form_relative_url=None, bulk_list="[]", sort_on=
None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_jio_js.js
View file @
c65b316e
...
...
@@ -116,6 +116,7 @@
parsed_query
,
sub_query
,
result_list
,
tmp_list
=
[],
local_roles
;
if
(
option_dict
.
query
)
{
parsed_query
=
jIO
.
QueryFactory
.
create
(
option_dict
.
query
);
...
...
@@ -159,7 +160,12 @@
option_dict
.
query
=
query
;
option_dict
.
local_roles
=
local_roles
;
}
if
(
option_dict
.
sort_on
)
{
for
(
i
=
0
;
i
<
option_dict
.
sort_on
.
length
;
i
+=
1
)
{
tmp_list
.
push
(
JSON
.
stringify
(
option_dict
.
sort_on
[
i
]));
}
option_dict
.
sort_on
=
tmp_list
;
}
return
wrapJioCall
(
this
,
'
getAttachment
'
,
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
View file @
c65b316e
...
...
@@ -283,7 +283,7 @@
for
(
i
=
0
;
i
<
gadget
.
props
.
field_json
.
column_list
.
length
;
i
+=
1
)
{
class_value
=
""
;
for
(
j
=
0
;
j
<
gadget
.
props
.
sort_list
.
length
;
j
+=
1
)
{
tmp
=
gadget
.
props
.
sort_list
[
j
]
.
split
(
"
,
"
)
;
tmp
=
gadget
.
props
.
sort_list
[
j
];
if
(
tmp
[
0
]
===
gadget
.
props
.
field_json
.
column_list
[
i
][
0
])
{
if
(
tmp
[
1
]
===
"
ascending
"
)
{
class_value
=
"
ui-icon-arrow-up
"
;
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_search_js.js
View file @
c65b316e
...
...
@@ -42,7 +42,7 @@
return
this
.
getUrlParameter
(
argument_list
)
.
push
(
function
(
result
)
{
if
((
result
===
undefined
)
&&
(
argument_list
[
0
]
===
'
field_listbox_sort_list:json
'
))
{
return
[
"
modification_date,descending,
"
,
""
];
return
[
[
'
modification_date
'
,
'
descending
'
]
];
}
return
result
;
});
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_sorteditor_js.js
View file @
c65b316e
...
...
@@ -25,13 +25,11 @@
function
createSortItemTemplate
(
gadget
,
sort_value
)
{
var
sort_column_list
=
gadget
.
props
.
sort_column_list
,
sort_value_list
=
[],
sort_value_list
=
sort_value
||
[],
option_list
=
[],
i
;
if
(
sort_value
)
{
sort_value_list
=
sort_value
.
split
(
"
,
"
);
}
for
(
i
=
0
;
i
<
sort_column_list
.
length
;
i
+=
1
)
{
option_list
.
push
({
"
text
"
:
sort_column_list
[
i
][
1
],
...
...
@@ -143,21 +141,18 @@
sort_query
=
[],
select_list
,
sort_item
,
sort_item_query
,
options
=
{},
i
;
for
(
i
=
0
;
i
<
sort_list
.
length
;
i
+=
1
)
{
sort_item
=
sort_list
[
i
];
select_list
=
sort_item
.
querySelectorAll
(
"
select
"
);
sort_item_query
=
select_list
[
0
][
select_list
[
0
].
selectedIndex
].
value
+
"
,
"
+
select_list
[
1
][
select_list
[
1
].
selectedIndex
].
value
+
"
,
"
;
sort_query
[
i
]
=
sort_item_query
;
sort_query
[
i
]
=
[
select_list
[
0
][
select_list
[
0
].
selectedIndex
].
value
,
select_list
[
1
][
select_list
[
1
].
selectedIndex
].
value
];
}
if
(
i
===
0
)
{
options
[
gadget
.
props
.
key
]
=
undefined
;
}
else
{
sort_query
[
i
]
=
""
;
options
[
gadget
.
props
.
key
]
=
sort_query
;
}
return
gadget
.
redirect
({
...
...
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