2
0
forked from Wavyzz/dolibarr

Enhance sorting of field for lists on field with several sort criterias

This commit is contained in:
Laurent Destailleur
2018-04-28 19:54:41 +02:00
parent 2241418b33
commit e72c2e6a11
7 changed files with 52 additions and 31 deletions

View File

@@ -141,15 +141,18 @@ print '
/* Set handler to add page_y param on output (click on href links or submit button) */
jQuery(".reposition").click(function() {
var page_y = $(document).scrollTop();
if (this.href)
if (page_y > 0)
{
this.href=this.href+\'&page_y=\'+page_y;
console.log("We click on tag with .reposition class. this.ref is now "+this.href);
}
else
{
console.log("We click on tag with .reposition class but element is not an <a> html tag, so we try to update form field page_y with value "+page_y);
jQuery("input[type=hidden][name=page_y]").val(page_y);
if (this.href)
{
this.href=this.href+\'&page_y=\'+page_y;
console.log("We click on tag with .reposition class. this.ref is now "+this.href);
}
else
{
console.log("We click on tag with .reposition class but element is not an <a> html tag, so we try to update form field page_y with value "+page_y);
jQuery("input[type=hidden][name=page_y]").val(page_y);
}
}
});
});'."\n";