From f303e6664b9525fa5282b078fa1e4e0fd5741bb0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 19 Jun 2021 15:32:20 +0200 Subject: [PATCH] Fix reposition do not add several times the page_y parameter. --- htdocs/core/js/lib_foot.js.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/js/lib_foot.js.php b/htdocs/core/js/lib_foot.js.php index 20debf50f12..dce74d93653 100644 --- a/htdocs/core/js/lib_foot.js.php +++ b/htdocs/core/js/lib_foot.js.php @@ -198,7 +198,9 @@ print ' { if (this.href) { + console.log("We click on tag with .reposition class. this.ref was "+this.href); var hrefarray = this.href.split("#", 2); + hrefarray[0]=hrefarray[0].replace(/&page_y=(\d+)/, \'\'); /* remove page_y param if already present */ this.href=hrefarray[0]+\'&page_y=\'+page_y; console.log("We click on tag with .reposition class. this.ref is now "+this.href); }