From 81aae30253ff494a4f38624238845fc632f28564 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 7 Feb 2016 19:55:41 +0100 Subject: [PATCH] NEW Add a checkbox to select/unselect all lines on page that support mass actions (like invoice list page) --- htdocs/compta/facture/list.php | 4 ++-- htdocs/compta/facture/mergepdftool.php | 10 +------- htdocs/core/class/html.form.class.php | 33 ++++++++++++++++++++------ htdocs/theme/eldy/style.css.php | 8 +++++-- htdocs/theme/md/style.css.php | 5 ++++ 5 files changed, 40 insertions(+), 20 deletions(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 1c32462b884..1b81c3cda50 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -783,8 +783,8 @@ if ($resql) $liststatus=array('0'=>$langs->trans("BillShortStatusDraft"), '1'=>$langs->trans("BillShortStatusNotPaid"), '2'=>$langs->trans("BillShortStatusPaid"), '3'=>$langs->trans("BillShortStatusCanceled")); print $form->selectarray('search_status', $liststatus, $search_status, 1); print ''; - print ''; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + print ''; + $searchpitco=$form->showFilterAndCheckAddButtons(1, 'checkforselect', 1); print $searchpitco; print ''; print "\n"; diff --git a/htdocs/compta/facture/mergepdftool.php b/htdocs/compta/facture/mergepdftool.php index 19c1d083018..27325bdef1d 100644 --- a/htdocs/compta/facture/mergepdftool.php +++ b/htdocs/compta/facture/mergepdftool.php @@ -848,16 +848,8 @@ if ($resql) print $form->selectarray('filtre', $liststatus, $filter, 1); print ''; print ''; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=$form->showFilterAndCheckAddButtons(1, empty($mode)?'checkformerge':'checkforsend'); print $searchpitco; - if (empty($mode)) - { - if ($conf->use_javascript_ajax) print ''.$langs->trans("All").' / '.$langs->trans("None").''; - } - else - { - if ($conf->use_javascript_ajax) print ''.$langs->trans("All").' / '.$langs->trans("None").''; - } print ''; print "\n"; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index ca4d9550bcb..633ff76117c 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -508,7 +508,6 @@ class Form $ret.=' '; return $out; } } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 30f97b557d4..4f1e049ba65 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -263,7 +263,7 @@ input, input.flat, textarea, textarea.flat, form.flat select, select, select.fla font-size: px; font-family: ; background: #FFF; - color: #111; + /* color: #111; */ border: 1px solid #C0C0C0; margin: 0px 0px 0px 0px; } @@ -515,7 +515,11 @@ div.myavailability { padding-top: 4px; padding-bottom: 4px; } - +.checkallactions { + vertical-align: top; + margin-top: 6px; + margin-left: 4px; +} /* ============================================================================== */ /* Styles to hide objects */ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 02896756c64..b60c3c5be06 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -503,6 +503,11 @@ div.myavailability { padding-top: 4px; padding-bottom: 4px; } +.checkallactions { + vertical-align: top; + margin-top: 6px; + margin-left: 4px; +} /* ============================================================================== */ /* Styles to hide objects */