Commit a72fc7e1 authored by Son Nguyen's avatar Son Nguyen Committed by Aaron Wells

Reset the offset value when changing the page size (Bug 1053708)

in the paginator

Change-Id: I362704b27761c334be712a32f3b3e5f73c3b3b37
Signed-off-by: default avatarSon Nguyen <son.nguyen@catalyst.net.nz>
parent 84718118
......@@ -77,7 +77,11 @@ var Paginator = function(id, datatable, script, extradata) {
url += "?";
}
url += setlimitselect.name + "=" + setlimitselect.value;
url += "&" + currentoffset.name + "=" + currentoffset.value;
var offsetvalue = currentoffset.value;
if ((offsetvalue % setlimitselect.value) !== 0) {
offsetvalue = Math.floor(offsetvalue / setlimitselect.value) * setlimitselect.value;
}
url += "&" + currentoffset.name + "=" + offsetvalue;
location.assign(url);
});
}
......
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