projects
/
mkdru-moved-to-drupal.org.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af73966
)
Fix paging by ensuring 'page' param is a number
author
Jakub Skoczen
<jakub@indexdata.dk>
Thu, 20 Jan 2011 15:33:34 +0000
(16:33 +0100)
committer
Jakub Skoczen
<jakub@indexdata.dk>
Thu, 20 Jan 2011 15:33:34 +0000
(16:33 +0100)
Otherwise the next button on page=1 will point to '11' and so on.
mkdru.client.js
patch
|
blob
|
history
diff --git
a/mkdru.client.js
b/mkdru.client.js
index
2881fda
..
ebd713f
100644
(file)
--- a/
mkdru.client.js
+++ b/
mkdru.client.js
@@
-239,6
+239,10
@@
mkdru.limitTarget = function (id, name) {
};
mkdru.generatePager = function () {
+ // make sure page param is a number, otherwise pageing frwd will be broken
+ if (typeof mkdru.state.page == "string") {
+ mkdru.state.page = Number(mkdru.state.page);
+ }
var total = Math.ceil(mkdru.totalRec / mkdru.state.perpage);
var first = (mkdru.state.page - mkdru.pagerRange > 0)
? mkdru.state.page - mkdru.pagerRange : 1;