Commit 955850fd authored by Sven Franck's avatar Sven Franck

data/app: added sorting links to side panel

parent 4ad1a770
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
"map_children": "listItem" "map_children": "listItem"
}, },
"children": [ "children": [
{"type": "item", "href": "#product_module::sort=date_created,descending", "center": [{"type": "h1", "text_i18n":"global_dict.latest"}]}, {"type": "item", "href": "#product_module&sort:date_created=descending", "center": [{"type": "h1", "text_i18n":"global_dict.latest"}]},
{"type": "item", "href": "#product_module::sort=price,descending", "center": [{"type": "h1","text_i18n":"global_dict.lowest"}]}, {"type": "item", "href": "#product_module&sort:price=descending", "center": [{"type": "h1","text_i18n":"global_dict.lowest"}]},
{"type": "item", "href": "#product_module::sort=price,ascending", "center": [{"type": "h1","text_i18n":"global_dict.highest"}]} {"type": "item", "href": "#product_module&sort:price=ascending", "center": [{"type": "h1","text_i18n":"global_dict.highest"}]}
] ]
} }
] ]
......
...@@ -7149,11 +7149,11 @@ ...@@ -7149,11 +7149,11 @@
* @return {string} href * @return {string} href
*/ */
app.util.generateLink = function (spec, id) { app.util.generateLink = function (spec, id) {
var level, core, separator, empty_string, is_core, has_query, has_depth; var level, core, separator, empty_string, is_core, has_param, has_depth;
empty_string = ""; empty_string = "";
is_core = spec.link_core || empty_string; is_core = spec.link_core || empty_string;
has_query = is_core.split("query:").length > 1; has_param = is_core.split("&").length > 1;
has_depth = is_core.split("%26").length > 1; has_depth = is_core.split("%26").length > 1;
// external link // external link
...@@ -7162,7 +7162,7 @@ ...@@ -7162,7 +7162,7 @@
} }
// TODO: not robust // TODO: not robust
if (has_query || has_depth) { if (has_param || has_depth) {
separator = empty_string; separator = empty_string;
} else { } else {
separator = "/"; separator = "/";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment