Commit 355d2a9a authored by Sven Franck's avatar Sven Franck

Gadgets/Browser: added jio sorting criteria for prev/next button

parent ee278413
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<title>Browser Module</title> <title>Browser Module</title>
</head> </head>
<body> <body>
<!-- TODO: rename to "pagination" gadget -->
<div class="browser_bar"> <div class="browser_bar">
<div data-role="controlgroup" data-type="horizontal"> <div data-role="controlgroup" data-type="horizontal">
<a href="details.html?item_id=prev" data-icon="arrow-l" data-transition="slide" data-direction="reverse" data-role="button" data-iconpos="notext" class="translate prev" data-i18n="browser.previous">Previous</a> <a href="details.html?item_id=prev" data-icon="arrow-l" data-transition="slide" data-direction="reverse" data-role="button" data-iconpos="notext" class="translate prev" data-i18n="browser.previous">Previous</a>
......
...@@ -50,7 +50,9 @@ define([ ...@@ -50,7 +50,9 @@ define([
spec.pointer = config.datasource.pointer; spec.pointer = config.datasource.pointer;
spec.method = spec.pointer ? undefined : config.datasource.method || "allDocs"; spec.method = spec.pointer ? undefined : config.datasource.method || "allDocs";
spec.storage = spec.pointer ? undefined : config.datasource.storage || "items"; spec.storage = spec.pointer ? undefined : config.datasource.storage || "items";
// no options spec.options = spec.pointer ? undefined : config.datasource.options || {
"sort_on": [["_id","ascending"]]
}
spec.callback = function (err, response) { spec.callback = function (err, response) {
var currentId = location.href.split("?")[1].split("=")[1], var currentId = location.href.split("?")[1].split("=")[1],
......
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