diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index 1c32462b8840aa9174bdf2d1c6e2d1d71e1f39c5..1b81c3cda50d38b735cd774f7569834ba5b55109 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 '</td>';
-    print '<td class="liste_titre" align="right">';
-    $searchpitco=$form->showFilterAndCheckAddButtons(0);
+    print '<td class="liste_titre" align="center">';
+    $searchpitco=$form->showFilterAndCheckAddButtons(1, 'checkforselect', 1);
     print $searchpitco;
     print '</td>';
     print "</tr>\n";
diff --git a/htdocs/compta/facture/mergepdftool.php b/htdocs/compta/facture/mergepdftool.php
index 19c1d08301864bb56786d30bcd310e1938a0a1cc..27325bdef1d41e4ef4ffd717f59d5a4c2bd501fd 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 '</td>';
 	print '<td class="liste_titre" align="center">';
-	$searchpitco=$form->showFilterAndCheckAddButtons(0);
+	$searchpitco=$form->showFilterAndCheckAddButtons(1, empty($mode)?'checkformerge':'checkforsend');
 	print $searchpitco;
-	if (empty($mode))
-	{
-		if ($conf->use_javascript_ajax) print '<a href="#" id="checkall">'.$langs->trans("All").'</a> / <a href="#" id="checknone">'.$langs->trans("None").'</a>';
-	}
-	else
-	{
-		if ($conf->use_javascript_ajax) print '<a href="#" id="checkallsend">'.$langs->trans("All").'</a> / <a href="#" id="checknonesend">'.$langs->trans("None").'</a>';
-	}
 	print '</td>';
 	print "</tr>\n";
 
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index ca4d9550bcb64e4a3ca9a71b55570db3dc23cbb4..633ff76117c9b52b13c1b154b3743ffbf059f992 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -508,7 +508,6 @@ class Form
     	
     	$ret.='<!-- JS CODE TO ENABLE mass action select -->
 		<script type="text/javascript">
-    	jQuery(document).ready(function () {
     		function initCheckForSelect()
     		{
     			atleastoneselected=0;
@@ -526,6 +525,8 @@ class Form
 	  				jQuery(".massaction").hide();
 	  			}
     		}
+    	    
+    	jQuery(document).ready(function () {
     		initCheckForSelect();
     		jQuery(".checkforselect").click(function() {
     			initCheckForSelect();
@@ -5679,20 +5680,38 @@ class Form
     /**
      *	Return HTML to show the search and clear seach button
      *
-     *  @param	int  	$addcheckuncheckall    Add the check all uncheck al button
+     *  @param	int  	$addcheckuncheckall        Add the check all uncheck al button
+     *  @param  string  $cssclass                  CSS class
+     *  @param  int     $calljsfunction            0=default. 1=call function initCheckForSelect() after changing status of checkboxes
      *  @return	string                          
      */
-    function showFilterAndCheckAddButtons($addcheckuncheckall=0)
+    function showFilterAndCheckAddButtons($addcheckuncheckall=0, $cssclass='checkforaction', $calljsfunction=0)
     {   
-        global $langs;
-        
+        global $conf, $langs;
+
         $out='';
         $out.='<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
+        $out.='<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
         if ($addcheckuncheckall)
         {
-            
+            if (! empty($conf->use_javascript_ajax)) $out.='<input type="checkbox" id="checkallactions" name="checkallactions" class="checkallactions">';
         }
-        $out.='<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
+        $out.='<script type="text/javascript">
+                $(document).ready(function() {
+                	$("#checkallactions").click(function() {
+                        if($(this).is(\':checked\')){
+                            console.log("We check all");
+                    		$(".'.$cssclass.'").prop(\'checked\', true);
+                        }
+                        else
+                        {
+                            console.log("We uncheck all");
+                    		$(".'.$cssclass.'").prop(\'checked\', false);
+                        }';
+        if ($calljsfunction) $out.='initCheckForSelect();';
+        $out.='         });
+                });
+              </script>';
         return $out;
     }
 }
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index 30f97b557d407e54ce8a16af3f8d98faeb77961a..4f1e049ba65d27575e29e1f476e77d22d7e7db71 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: <?php print $fontsize ?>px;
     font-family: <?php print $fontlist ?>;
     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 02896756c64a6ee12b3a703dd52027efa0402d94..b60c3c5be068a88a99c817bfe89ca6e6d6d0b239 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                                                         */