Fix linkof mass action for pdf merge

This commit is contained in:
Laurent Destailleur 2016-12-07 14:14:03 +01:00
parent 3abeee2d7d
commit 1583d0e49f
2 changed files with 13 additions and 6 deletions

View File

@ -289,7 +289,7 @@ if ($sall) {
}
if ($search_product_category > 0) $sql.=" AND cp.fk_categorie = ".$search_product_category;
if ($socid > 0) $sql.= ' AND s.rowid = '.$socid;
if ($viewstatut <> '')
if ($viewstatut != '' && $viewstatut != '-1')
{
$sql.= ' AND p.fk_statut IN ('.$viewstatut.')';
}

View File

@ -562,10 +562,17 @@ class Form
jQuery(".checkforselect").click(function() {
initCheckForSelect();
});
/* Warning: if you set submit button to disabled, post using Enter will no more work
jQuery(".massactionselect").change(function() {
console.log( $( this ).val() );
if ($(this).val() != \'0\')
var massaction = $( this ).val();
var urlform = $( this ).closest("form").attr("action").replace("#show_files","");
if (massaction == "builddoc")
{
urlform = urlform + "#show_files";
}
$( this ).closest("form").attr("action", urlform);
console.log("we select a mass action "+massaction+" - "+urlform);
/* Warning: if you set submit button to disabled, post using Enter will no more work
if ($(this).val() != \'0\')
{
jQuery(".massactionconfirmed").prop(\'disabled\', false);
}
@ -573,8 +580,8 @@ class Form
{
jQuery(".massactionconfirmed").prop(\'disabled\', true);
}
});
*/
*/
});
});
</script>
';