forked from Wavyzz/dolibarr
FIX Fix the reposition on the clear target button.
This commit is contained in:
@@ -122,9 +122,10 @@ if (GETPOST('clearlist'))
|
|||||||
// Loading Class
|
// Loading Class
|
||||||
$obj = new MailingTargets($db);
|
$obj = new MailingTargets($db);
|
||||||
$obj->clear_target($id);
|
$obj->clear_target($id);
|
||||||
|
/* Avoid this to allow reposition
|
||||||
header("Location: ".$_SERVER['PHP_SELF']."?id=".$id);
|
header("Location: ".$_SERVER['PHP_SELF']."?id=".$id);
|
||||||
exit;
|
exit;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'delete')
|
if ($action == 'delete')
|
||||||
@@ -400,7 +401,7 @@ if ($object->fetch($id) >= 0)
|
|||||||
|
|
||||||
$cleartext='';
|
$cleartext='';
|
||||||
if ($allowaddtarget) {
|
if ($allowaddtarget) {
|
||||||
$cleartext=$langs->trans("ToClearAllRecipientsClickHere").' '.'<input type="submit" name="clearlist" class="button" value="'.$langs->trans("TargetsReset").'">';
|
$cleartext=$langs->trans("ToClearAllRecipientsClickHere").' '.'<a href="'.$_SERVER["PHP_SELF"].'?clearlist=1&id='.$object->id.'" class="button reposition">'.$langs->trans("TargetsReset").'</a>';
|
||||||
}
|
}
|
||||||
print_barre_liste($langs->trans("MailSelectedRecipients"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,$cleartext,$num,$nbtotalofrecords,'title_generic',0,'','',$limit);
|
print_barre_liste($langs->trans("MailSelectedRecipients"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,$cleartext,$num,$nbtotalofrecords,'title_generic',0,'','',$limit);
|
||||||
|
|
||||||
|
|||||||
@@ -5329,6 +5329,7 @@ function printCommonFooter($zone='private')
|
|||||||
print "\n";
|
print "\n";
|
||||||
if (! empty($conf->use_javascript_ajax))
|
if (! empty($conf->use_javascript_ajax))
|
||||||
{
|
{
|
||||||
|
print '<!-- Reposition management (does not work if a redirect is done after action of submission) -->'."\n";
|
||||||
print '<script type="text/javascript" language="javascript">jQuery(document).ready(function() {'."\n";
|
print '<script type="text/javascript" language="javascript">jQuery(document).ready(function() {'."\n";
|
||||||
|
|
||||||
print '<!-- If page_y set, we set scollbar with it -->'."\n";
|
print '<!-- If page_y set, we set scollbar with it -->'."\n";
|
||||||
@@ -5338,7 +5339,7 @@ function printCommonFooter($zone='private')
|
|||||||
print '<!-- Set handler to add page_y param on some a href links -->'."\n";
|
print '<!-- Set handler to add page_y param on some a href links -->'."\n";
|
||||||
print 'jQuery(".reposition").click(function() {
|
print 'jQuery(".reposition").click(function() {
|
||||||
var page_y = $(document).scrollTop();
|
var page_y = $(document).scrollTop();
|
||||||
/* alert(page_y); */
|
/*alert(page_y);*/
|
||||||
this.href=this.href+\'&page_y=\'+page_y;
|
this.href=this.href+\'&page_y=\'+page_y;
|
||||||
});'."\n";
|
});'."\n";
|
||||||
print '});'."\n";
|
print '});'."\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user