From 99feaf52756fdd7977ab8f433ed3f42e6f5cd969 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 19 Apr 2018 21:33:26 +0200 Subject: [PATCH] Fix reposition class --- htdocs/core/js/lib_foot.js.php | 10 +++++----- htdocs/core/tpl/extrafields_view.tpl.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/js/lib_foot.js.php b/htdocs/core/js/lib_foot.js.php index a0bbad11518..635de52b7ff 100644 --- a/htdocs/core/js/lib_foot.js.php +++ b/htdocs/core/js/lib_foot.js.php @@ -143,17 +143,17 @@ 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.ref) + var page_y = $(document).scrollTop(); + 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); + 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 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"; diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php index 05d4eeab36e..0e3d742e986 100644 --- a/htdocs/core/tpl/extrafields_view.tpl.php +++ b/htdocs/core/tpl/extrafields_view.tpl.php @@ -113,7 +113,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] { $fieldid='id'; if ($object->table_element == 'societe') $fieldid='socid'; - print '' . img_edit().''; + print '' . img_edit().''; } print ''; $html_id = !empty($object->id) ? $object->element.'_extras_'.$key.'_'.$object->id : '';