Merge pull request #746 from Mainmich/patch-1

[-] MO : Blocklayered Fix pagination incompatibility
This commit is contained in:
Gregory Roussac
2013-09-25 09:45:51 -07:00
+2 -2
View File
@@ -230,11 +230,11 @@ function initLayered()
function paginationButton() {
$('#pagination a').not(':hidden').each(function () {
if ($(this).attr('href').search('&p=') == -1) {
if ($(this).attr('href').search(/&|\?p=/) == -1) {
var page = 1;
}
else {
var page = $(this).attr('href').replace(/^.*&p=(\d+).*$/, '$1');
var page = $(this).attr('href').replace(/^.*[&|\?]p=(\d+).*$/, '$1');
}
var location = window.location.href.replace(/#.*$/, '');
$(this).attr('href', location+current_friendly_url.replace(/\/page-(\d+)/, '')+'/page-'+page);