Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ecommerce-ui
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
ecommerce-ui
Commits
4ad1a770
Commit
4ad1a770
authored
May 01, 2014
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
data/app: integrate query parameters in link generation and link categories
parent
10a2afd1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
data/home.json
data/home.json
+2
-2
js/erp5_loader.js
js/erp5_loader.js
+7
-4
No files found.
data/home.json
View file @
4ad1a770
...
...
@@ -22,8 +22,8 @@
"initial_query"
:
{
"query"
:
"reference: 'product_group'"
,
"include_docs"
:
true
,
"select_list"
:
[
"title"
,
"title_i18n"
,
"_id"
]},
"property_dict"
:
{
"link"
:
true
,
"link_identifier"
:
"
title
"
,
"link_core"
:
"product_module
:
:group="
"link_identifier"
:
"
_id
"
,
"link_core"
:
"product_module
&query
:group="
},
"scheme"
:
[
{
...
...
js/erp5_loader.js
View file @
4ad1a770
...
...
@@ -7149,17 +7149,20 @@
* @return {string} href
*/
app
.
util
.
generateLink
=
function
(
spec
,
id
)
{
var
level
,
core
,
separator
,
empty_string
;
var
level
,
core
,
separator
,
empty_string
,
is_core
,
has_query
,
has_depth
;
empty_string
=
""
;
is_core
=
spec
.
link_core
||
empty_string
;
has_query
=
is_core
.
split
(
"
query:
"
).
length
>
1
;
has_depth
=
is_core
.
split
(
"
%26
"
).
length
>
1
;
// external link
if
(
spec
.
source
)
{
return
spec
.
source
;
}
//
link current segment parameter vs segmen
t
if
(
(
spec
.
link_core
||
empty_string
).
split
(
"
%26
"
).
length
>
1
)
{
//
TODO: not robus
t
if
(
has_query
||
has_depth
)
{
separator
=
empty_string
;
}
else
{
separator
=
"
/
"
;
...
...
@@ -7169,7 +7172,7 @@
core
=
spec
.
link_core
||
(
spec
.
fragment_list
?
spec
.
fragment_list
.
slice
(
0
,
level
+
1
).
join
(
"
/
"
)
:
empty_string
);
return
(
"
#
"
+
core
+
separator
+
window
.
encodeURIComponent
(
id
));
return
(
"
#
"
+
window
.
encodeURIComponent
(
core
+
separator
+
id
));
};
/**
...
...
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