forked from Wavyzz/dolibarr
Enhance sorting of field for lists on field with several sort criterias
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user