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
Labels
Merge Requests
141
Merge Requests
141
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
Jobs
Commits
Open sidebar
nexedi
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,
...
@@ -960,9 +960,14 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
tmp_sort_on
=
()
tmp_sort_on
=
()
if
sort_on
is
not
None
:
if
sort_on
is
not
None
:
for
grain
in
sort_on
:
if
grain
!=
""
:
if
isinstance
(
sort_on
,
list
):
tmp_sort_on
+=
(
tuple
([
x
for
x
in
grain
.
split
(
","
)]),)
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
:
if
query
:
sql_list
=
callable_list_method
(
full_text
=
query
,
limit
=
limit
,
sort_on
=
tmp_sort_on
,
local_roles
=
local_roles
,
**
catalog_kw
)
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 @@
...
@@ -56,7 +56,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<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>
<item>
<item>
<key>
<string>
id
</string>
</key>
<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 @@
...
@@ -116,6 +116,7 @@
parsed_query
,
parsed_query
,
sub_query
,
sub_query
,
result_list
,
result_list
,
tmp_list
=
[],
local_roles
;
local_roles
;
if
(
option_dict
.
query
)
{
if
(
option_dict
.
query
)
{
parsed_query
=
jIO
.
QueryFactory
.
create
(
option_dict
.
query
);
parsed_query
=
jIO
.
QueryFactory
.
create
(
option_dict
.
query
);
...
@@ -159,7 +160,12 @@
...
@@ -159,7 +160,12 @@
option_dict
.
query
=
query
;
option_dict
.
query
=
query
;
option_dict
.
local_roles
=
local_roles
;
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
(
return
wrapJioCall
(
this
,
this
,
'
getAttachment
'
,
'
getAttachment
'
,
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
View file @
c65b316e
...
@@ -283,7 +283,7 @@
...
@@ -283,7 +283,7 @@
for
(
i
=
0
;
i
<
gadget
.
props
.
field_json
.
column_list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
gadget
.
props
.
field_json
.
column_list
.
length
;
i
+=
1
)
{
class_value
=
""
;
class_value
=
""
;
for
(
j
=
0
;
j
<
gadget
.
props
.
sort_list
.
length
;
j
+=
1
)
{
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
[
0
]
===
gadget
.
props
.
field_json
.
column_list
[
i
][
0
])
{
if
(
tmp
[
1
]
===
"
ascending
"
)
{
if
(
tmp
[
1
]
===
"
ascending
"
)
{
class_value
=
"
ui-icon-arrow-up
"
;
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 @@
...
@@ -42,7 +42,7 @@
return
this
.
getUrlParameter
(
argument_list
)
return
this
.
getUrlParameter
(
argument_list
)
.
push
(
function
(
result
)
{
.
push
(
function
(
result
)
{
if
((
result
===
undefined
)
&&
(
argument_list
[
0
]
===
'
field_listbox_sort_list:json
'
))
{
if
((
result
===
undefined
)
&&
(
argument_list
[
0
]
===
'
field_listbox_sort_list:json
'
))
{
return
[
"
modification_date,descending,
"
,
""
];
return
[
[
'
modification_date
'
,
'
descending
'
]
];
}
}
return
result
;
return
result
;
});
});
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_sorteditor_js.js
View file @
c65b316e
...
@@ -25,13 +25,11 @@
...
@@ -25,13 +25,11 @@
function
createSortItemTemplate
(
gadget
,
sort_value
)
{
function
createSortItemTemplate
(
gadget
,
sort_value
)
{
var
sort_column_list
=
gadget
.
props
.
sort_column_list
,
var
sort_column_list
=
gadget
.
props
.
sort_column_list
,
sort_value_list
=
[],
sort_value_list
=
sort_value
||
[],
option_list
=
[],
option_list
=
[],
i
;
i
;
if
(
sort_value
)
{
sort_value_list
=
sort_value
.
split
(
"
,
"
);
}
for
(
i
=
0
;
i
<
sort_column_list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
sort_column_list
.
length
;
i
+=
1
)
{
option_list
.
push
({
option_list
.
push
({
"
text
"
:
sort_column_list
[
i
][
1
],
"
text
"
:
sort_column_list
[
i
][
1
],
...
@@ -143,21 +141,18 @@
...
@@ -143,21 +141,18 @@
sort_query
=
[],
sort_query
=
[],
select_list
,
select_list
,
sort_item
,
sort_item
,
sort_item_query
,
options
=
{},
options
=
{},
i
;
i
;
for
(
i
=
0
;
i
<
sort_list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
sort_list
.
length
;
i
+=
1
)
{
sort_item
=
sort_list
[
i
];
sort_item
=
sort_list
[
i
];
select_list
=
sort_item
.
querySelectorAll
(
"
select
"
);
select_list
=
sort_item
.
querySelectorAll
(
"
select
"
);
sort_item_query
=
select_list
[
0
][
select_list
[
0
].
selectedIndex
].
value
sort_query
[
i
]
=
[
select_list
[
0
][
select_list
[
0
].
selectedIndex
].
value
,
+
"
,
"
+
select_list
[
1
][
select_list
[
1
].
selectedIndex
].
value
+
"
,
"
;
select_list
[
1
][
select_list
[
1
].
selectedIndex
].
value
];
sort_query
[
i
]
=
sort_item_query
;
}
}
if
(
i
===
0
)
{
if
(
i
===
0
)
{
options
[
gadget
.
props
.
key
]
=
undefined
;
options
[
gadget
.
props
.
key
]
=
undefined
;
}
else
{
}
else
{
sort_query
[
i
]
=
""
;
options
[
gadget
.
props
.
key
]
=
sort_query
;
options
[
gadget
.
props
.
key
]
=
sort_query
;
}
}
return
gadget
.
redirect
({
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