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 @@
<title>Browser Module</title>
</head>
<body>
<!-- TODO: rename to "pagination" gadget -->
<div class="browser_bar">
<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>
......
......@@ -50,7 +50,9 @@ define([
spec.pointer = config.datasource.pointer;
spec.method = spec.pointer ? undefined : config.datasource.method || "allDocs";
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) {
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