From 36b314a2d696aacaa121ac39fb4395b559bc1d72 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Thu, 25 Apr 2013 20:27:45 +0200
Subject: [PATCH] Try to solve some problems with table (replaced by div).

---
 htdocs/adherents/class/adherent.class.php     |  8 +--
 htdocs/comm/propal/class/propal.class.php     | 10 ++--
 htdocs/commande/class/commande.class.php      | 12 ++--
 htdocs/commande/index.php                     |  6 +-
 htdocs/commande/liste.php                     | 13 ++---
 htdocs/commande/orderstoinvoice.php           |  2 +-
 htdocs/compta/dons/index.php                  |  2 +-
 htdocs/compta/facture.php                     | 45 +++++----------
 htdocs/compta/facture/impayees.php            |  2 +-
 htdocs/compta/facture/list.php                |  2 +-
 htdocs/compta/index.php                       |  6 +-
 htdocs/contact/class/contact.class.php        |  8 +--
 htdocs/core/class/commoninvoice.class.php     | 16 +++---
 htdocs/core/class/html.formfile.class.php     | 15 +++++
 htdocs/core/lib/functions.lib.php             |  2 +-
 .../core/tpl/freeproductline_create.tpl.php   |  2 +-
 .../tpl/predefinedproductline_create.tpl.php  |  2 +-
 htdocs/fichinter/class/fichinter.class.php    |  6 +-
 .../class/fournisseur.commande.class.php      | 16 +++---
 htdocs/fourn/commande/index.php               |  4 +-
 htdocs/main.inc.php                           | 28 ++++++----
 htdocs/theme/amarok/style.css.php             | 27 ++++++---
 htdocs/theme/auguria/style.css.php            | 15 ++++-
 htdocs/theme/bureau2crea/style.css.php        | 39 ++++++++-----
 htdocs/theme/cameleo/style.css.php            | 18 +++++-
 htdocs/theme/eldy/style.css.php               | 55 +++++++++----------
 26 files changed, 205 insertions(+), 156 deletions(-)

diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index 13a6bdea810..325b5cf6426 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -1619,11 +1619,11 @@ class Adherent extends CommonObject
             if ($statut == -1) return $langs->trans("MemberStatusDraft").' '.img_picto($langs->trans('MemberStatusDraft'),'statut0');
             if ($statut >= 1)
             {
-                if (! $date_end_subscription)            return $langs->trans("MemberStatusActive").' '.img_picto($langs->trans('MemberStatusActive'),'statut1');
-                elseif ($date_end_subscription < time()) return $langs->trans("MemberStatusActiveLate").' '.img_picto($langs->trans('MemberStatusActiveLate'),'statut3');
-                else                                     return $langs->trans("MemberStatusPaid").' '.img_picto($langs->trans('MemberStatusPaid'),'statut4');
+                if (! $date_end_subscription)            return '<span class="hideonsmartphone">'.$langs->trans("MemberStatusActive").' </span>'.img_picto($langs->trans('MemberStatusActive'),'statut1');
+                elseif ($date_end_subscription < time()) return '<span class="hideonsmartphone">'.$langs->trans("MemberStatusActiveLate").' </span>'.img_picto($langs->trans('MemberStatusActiveLate'),'statut3');
+                else                                     return '<span class="hideonsmartphone">'.$langs->trans("MemberStatusPaid").' </span>'.img_picto($langs->trans('MemberStatusPaid'),'statut4');
             }
-            if ($statut == 0)  return $langs->trans("MemberStatusResiliated").' '.img_picto($langs->trans('MemberStatusResiliated'),'statut5');
+            if ($statut == 0)  return '<span class="hideonsmartphone">'.$langs->trans("MemberStatusResiliated").' </span>'.img_picto($langs->trans('MemberStatusResiliated'),'statut5');
         }
     }
 
diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php
index 1b283e41ed0..92664782f3f 100644
--- a/htdocs/comm/propal/class/propal.class.php
+++ b/htdocs/comm/propal/class/propal.class.php
@@ -2223,11 +2223,11 @@ class Propal extends CommonObject
         }
         if ($mode == 5)
         {
-            if ($statut==0) return $this->labelstatut_short[$statut].' '.img_picto($langs->trans('PropalStatusDraftShort'),'statut0');
-            if ($statut==1) return $this->labelstatut_short[$statut].' '.img_picto($langs->trans('PropalStatusOpenedShort'),'statut1');
-            if ($statut==2) return $this->labelstatut_short[$statut].' '.img_picto($langs->trans('PropalStatusSignedShort'),'statut3');
-            if ($statut==3) return $this->labelstatut_short[$statut].' '.img_picto($langs->trans('PropalStatusNotSignedShort'),'statut5');
-            if ($statut==4) return $this->labelstatut_short[$statut].' '.img_picto($langs->trans('PropalStatusBilledShort'),'statut6');
+            if ($statut==0) return '<span class="hideonsmartphone">'.$this->labelstatut_short[$statut].' </span>'.img_picto($langs->trans('PropalStatusDraftShort'),'statut0');
+            if ($statut==1) return '<span class="hideonsmartphone">'.$this->labelstatut_short[$statut].' </span>'.img_picto($langs->trans('PropalStatusOpenedShort'),'statut1');
+            if ($statut==2) return '<span class="hideonsmartphone">'.$this->labelstatut_short[$statut].' </span>'.img_picto($langs->trans('PropalStatusSignedShort'),'statut3');
+            if ($statut==3) return '<span class="hideonsmartphone">'.$this->labelstatut_short[$statut].' </span>'.img_picto($langs->trans('PropalStatusNotSignedShort'),'statut5');
+            if ($statut==4) return '<span class="hideonsmartphone">'.$this->labelstatut_short[$statut].' </span>'.img_picto($langs->trans('PropalStatusBilledShort'),'statut6');
         }
     }
 
diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index 4612d378908..9be91fd80e5 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -2557,12 +2557,12 @@ class Commande extends CommonOrder
         }
         elseif ($mode == 5)
         {
-            if ($statut==-1) return $langs->trans('StatusOrderCanceledShort').' '.img_picto($langs->trans('StatusOrderCanceled'),'statut5');
-            if ($statut==0) return $langs->trans('StatusOrderDraftShort').' '.img_picto($langs->trans('StatusOrderDraft'),'statut0');
-            if ($statut==1) return $langs->trans('StatusOrderValidatedShort').' '.img_picto($langs->trans('StatusOrderValidated'),'statut1');
-            if ($statut==2) return $langs->trans('StatusOrderSentShort').' '.img_picto($langs->trans('StatusOrderSent'),'statut3');
-            if ($statut==3 && (! $facturee && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return $langs->trans('StatusOrderToBillShort').' '.img_picto($langs->trans('StatusOrderToBill'),'statut7');
-            if ($statut==3 && ($facturee || ! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return $langs->trans('StatusOrderProcessedShort').' '.img_picto($langs->trans('StatusOrderProcessed'),'statut6');
+            if ($statut==-1) return '<span class="hideonsmartphone">'.$langs->trans('StatusOrderCanceledShort').' </span>'.img_picto($langs->trans('StatusOrderCanceled'),'statut5');
+            if ($statut==0) return '<span class="hideonsmartphone">'.$langs->trans('StatusOrderDraftShort').' </span>'.img_picto($langs->trans('StatusOrderDraft'),'statut0');
+            if ($statut==1) return '<span class="hideonsmartphone">'.$langs->trans('StatusOrderValidatedShort').' </span>'.img_picto($langs->trans('StatusOrderValidated'),'statut1');
+            if ($statut==2) return '<span class="hideonsmartphone">'.$langs->trans('StatusOrderSentShort').' </span>'.img_picto($langs->trans('StatusOrderSent'),'statut3');
+            if ($statut==3 && (! $facturee && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return '<span class="hideonsmartphone">'.$langs->trans('StatusOrderToBillShort').' </span>'.img_picto($langs->trans('StatusOrderToBill'),'statut7');
+            if ($statut==3 && ($facturee || ! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return '<span class="hideonsmartphone">'.$langs->trans('StatusOrderProcessedShort').' </span>'.img_picto($langs->trans('StatusOrderProcessed'),'statut6');
         }
     }
 
diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php
index d8b45e1b9af..d9f5cca0415 100644
--- a/htdocs/commande/index.php
+++ b/htdocs/commande/index.php
@@ -261,7 +261,7 @@ if ($resql)
 			print '&nbsp;';
 			print '</td>';
 
-			print '<td width="16" align="right" class="nobordernopadding">';
+			print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
 			$filename=dol_sanitizeFileName($obj->ref);
 			$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
 			$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
@@ -330,7 +330,7 @@ if (! empty($conf->commande->enabled))
 				print '&nbsp;';
 				print '</td>';
 
-				print '<td width="16" align="right" class="nobordernopadding">';
+				print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
 				$filename=dol_sanitizeFileName($obj->ref);
 				$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
 				$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
@@ -401,7 +401,7 @@ if (! empty($conf->commande->enabled))
 				print '&nbsp;';
 				print '</td>';
 
-				print '<td width="16" align="right" class="nobordernopadding">';
+				print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
 				$filename=dol_sanitizeFileName($obj->ref);
 				$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
 				$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php
index 7ba7ddc82bd..a9de12c790a 100644
--- a/htdocs/commande/liste.php
+++ b/htdocs/commande/liste.php
@@ -318,12 +318,13 @@ if ($resql)
 		if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && $db->jdate($objp->date_valid) < ($now - $conf->commande->client->warning_delay)) print img_picto($langs->trans("Late"),"warning");
 		print '</td>';
 
-		print '<td width="16" align="right" class="nobordernopadding">';
+		print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
 		$filename=dol_sanitizeFileName($objp->ref);
 		$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($objp->ref);
 		$urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->rowid;
 		print $formfile->getDocumentsLink($generic_commande->element, $filename, $filedir);
-		print '</td></tr></table>';
+		print '</td>';
+		print '</tr></table>';
 
 		print '</td>';
 
@@ -333,18 +334,16 @@ if ($resql)
 		$companystatic->client=$objp->client;
 		print '<td>';
 		print $companystatic->getNomUrl(1,'customer');
-		print '&nbsp;<a href="'.DOL_URL_ROOT.'/commande/orderstoinvoice.php?socid='.$companystatic->id.'">';
 
 		// If module invoices enabled and user with invoice creation permissions
-		if (! empty($conf->facture->enabled))
+		if (! empty($conf->facture->enabled) && ! empty($conf->global->ORDER_BILLING_ALL_CUSTOMER))
 		{
 			if ($user->rights->facture->creer)
 			{
-
 				if (($objp->fk_statut > 0 && $objp->fk_statut < 3) || ($objp->fk_statut == 3 && $objp->facturee == 0))
 				{
-
-					print img_picto($langs->trans("CreateInvoiceForThisCustomer").' : '.$companystatic->nom,'object_bill').'</a>';
+					print '&nbsp;<a href="'.DOL_URL_ROOT.'/commande/orderstoinvoice.php?socid='.$companystatic->id.'">';
+					print img_picto($langs->trans("CreateInvoiceForThisCustomer").' : '.$companystatic->nom, 'object_bill', 'hideonsmrtphone').'</a>';
 				}
 			}
 		}
diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php
index 664f9ce0f1b..93a4db53fbb 100755
--- a/htdocs/commande/orderstoinvoice.php
+++ b/htdocs/commande/orderstoinvoice.php
@@ -621,7 +621,7 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs))
 			if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && $db->jdate($objp->date_valid) < ($now - $conf->commande->client->warning_delay)) print img_picto($langs->trans("Late"),"warning");
 			print '</td>';
 
-			print '<td width="16" align="right" class="nobordernopadding">';
+			print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
 			$filename=dol_sanitizeFileName($objp->ref);
 			$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($objp->ref);
 			$urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->rowid;
diff --git a/htdocs/compta/dons/index.php b/htdocs/compta/dons/index.php
index 36c1e897c44..bc258dec541 100644
--- a/htdocs/compta/dons/index.php
+++ b/htdocs/compta/dons/index.php
@@ -185,7 +185,7 @@ if ($resql)
             print dolGetFirstLastname($obj->nom,$obj->firstname);
             print '</td>';
 
-            print '<td width="16" align="right" class="nobordernopadding">';
+            print '<td align="right" class="nobordernopadding">';
             print price($obj->amount,1);
             print '</td>';
 
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index f9d8aefda2f..55276b8c7a3 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -1897,7 +1897,6 @@ $now=dol_now();
 llxHeader('',$langs->trans('Bill'),'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes');
 
 
-
 /*********************************************************************
  *
 * Mode creation
@@ -2450,7 +2449,6 @@ else if ($id > 0 || ! empty($ref))
 
 		$objectidnext=$object->getIdReplacingInvoice();
 
-
 		$head = facture_prepare_head($object);
 
 		dol_fiche_head($head, 'compta', $langs->trans('InvoiceCustomer'), 0, 'bill');
@@ -2692,6 +2690,8 @@ else if ($id > 0 || ! empty($ref))
 		print $formconfirm;
 
 
+
+
 		// Invoice content
 
 		print '<table class="border" width="100%">';
@@ -2879,13 +2879,13 @@ else if ($id > 0 || ! empty($ref))
 			if ($object->statut == 0 && $object->type != 2 && $object->type != 3) print ' ('.$addabsolutediscount.')<br>';
 			else print '. ';
 		}
-		/*if ($object->statut == 0 && $object->type != 2 && $object->type != 3)
-		 {
-		if (! $absolute_discount && ! $absolute_creditnote) print '<br>';
+		//if ($object->statut == 0 && $object->type != 2 && $object->type != 3)
+		// {
+		//if (! $absolute_discount && ! $absolute_creditnote) print '<br>';
 		//print ' &nbsp; - &nbsp; ';
-		print $addabsolutediscount;
+		//print $addabsolutediscount;
 		//print ' &nbsp; - &nbsp; '.$addcreditnote;      // We disbale link to credit note
-		}*/
+		//}
 		print '</td></tr>';
 
 		// Date invoice
@@ -2915,9 +2915,7 @@ else if ($id > 0 || ! empty($ref))
 		print '</td>';
 
 
-		/*
-		 * List of payments
-		*/
+		// List of payments
 
 		$sign=1;
 		if ($object->type == 2) $sign=-1;
@@ -3359,9 +3357,7 @@ else if ($id > 0 || ! empty($ref))
 				include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php';
 			}
 
-			/*
-			 * Lines
-			*/
+			// Lines
 			$result = $object->getLinesArray();
 
 			if (! empty($conf->use_javascript_ajax) && $object->statut == 0)
@@ -3375,9 +3371,7 @@ else if ($id > 0 || ! empty($ref))
 			if (! empty($object->lines))
 				$ret=$object->printObjectLines($action,$mysoc,$soc,$lineid,1);
 
-			/*
-			 * Form to add new line
-			*/
+			// Form to add new line
 			if ($object->statut == 0 && $user->rights->facture->creer && $action <> 'valid' && $action <> 'editline')
 			{
 				$var=true;
@@ -3409,9 +3403,7 @@ else if ($id > 0 || ! empty($ref))
 			print "</div>\n";
 
 
-			/*
-			 * Boutons actions
-			*/
+			// Boutons actions
 
 			if ($action != 'prerelance' && $action != 'presend')
 			{
@@ -3624,24 +3616,19 @@ else if ($id > 0 || ! empty($ref))
 			if ($action != 'prerelance' && $action != 'presend')
 			{
 				print '<div class="fichecenter"><div class="fichehalfleft">';
-				//print '<table width="100%"><tr><td width="50%" valign="top">';
-				//print '<a name="builddoc"></a>'; // ancre
+				print '<a name="builddoc"></a>'; // ancre
 
-				/*
-				 * Documents generes
-				*/
+				// Documents generes
 				$filename=dol_sanitizeFileName($object->ref);
 				$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($object->ref);
 				$urlsource=$_SERVER['PHP_SELF'].'?facid='.$object->id;
 				$genallowed=$user->rights->facture->creer;
 				$delallowed=$user->rights->facture->supprimer;
-
+				
 				print $formfile->showdocuments('facture',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang);
 				$somethingshown=$formfile->numoffiles;
 
-				/*
-				 * Linked object block
-				*/
+				// Linked object block
 				$somethingshown=$object->showLinkedObjectBlock();
 
 				// Link for paypal payment
@@ -3652,14 +3639,12 @@ else if ($id > 0 || ! empty($ref))
 				}
 
 				print '</div><div class="fichehalfright"><div class="ficheaddleft">';
-				//print '</td><td valign="top" width="50%">';
 
 				// List of actions on element
 				include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
 				$formactions=new FormActions($db);
 				$somethingshown=$formactions->showactions($object,'invoice',$socid);
 
-				//print '</td></tr></table>';
 				print '</div></div></div>';
 			}
 			else
diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php
index 441da8c959e..11464a9eec0 100644
--- a/htdocs/compta/facture/impayees.php
+++ b/htdocs/compta/facture/impayees.php
@@ -351,7 +351,7 @@ if ($resql)
 			print '</td>';
 
 			// PDF Picto
-			print '<td width="16" align="right" class="nobordernopadding">';
+			print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
             $filename=dol_sanitizeFileName($objp->facnumber);
 			$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($objp->facnumber);
 			print $formfile->getDocumentsLink($facturestatic->element, $filename, $filedir);
diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index ca2a94d35e2..b577c92b93f 100644
--- a/htdocs/compta/facture/list.php
+++ b/htdocs/compta/facture/list.php
@@ -337,7 +337,7 @@ if ($resql)
             print $objp->increment;
             print '</td>';
 
-            print '<td width="16" align="right" class="nobordernopadding">';
+            print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
             $filename=dol_sanitizeFileName($objp->facnumber);
             $filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($objp->facnumber);
             $urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->facid;
diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php
index e892ec204cd..d1e02eea879 100644
--- a/htdocs/compta/index.php
+++ b/htdocs/compta/index.php
@@ -383,7 +383,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
 				print '<td width="20" class="nobordernopadding nowrap">';
 				if ($obj->fk_statut == 1 && ! $obj->paye && $db->jdate($obj->datelimite) < ($now - $conf->facture->client->warning_delay)) print img_warning($langs->trans("Late"));
 				print '</td>';
-				print '<td width="16" align="right" class="nobordernopadding">';
+				print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
 				$filename=dol_sanitizeFileName($obj->facnumber);
 				$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($obj->facnumber);
 				$urlsource=$_SERVER['PHP_SELF'].'?facid='.$obj->rowid;
@@ -775,7 +775,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us
 				print '<td width="20" class="nobordernopadding nowrap">';
 				print '&nbsp;';
 				print '</td>';
-				print '<td width="16" align="right" class="nobordernopadding">';
+				print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
 				$filename=dol_sanitizeFileName($obj->ref);
 				$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
 				$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
@@ -875,7 +875,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
 				print '<td width="20" class="nobordernopadding nowrap">';
 				if ($db->jdate($obj->datelimite) < ($now - $conf->facture->client->warning_delay)) print img_warning($langs->trans("Late"));
 				print '</td>';
-				print '<td width="16" align="right" class="nobordernopadding">';
+				print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
 				$filename=dol_sanitizeFileName($obj->facnumber);
 				$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($obj->facnumber);
 				$urlsource=$_SERVER['PHP_SELF'].'?facid='.$obj->rowid;
diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php
index a41aaf6b366..4cbc1d7fbcd 100644
--- a/htdocs/contact/class/contact.class.php
+++ b/htdocs/contact/class/contact.class.php
@@ -944,10 +944,10 @@ class Contact extends CommonObject
 		}
 		elseif ($mode == 5)
 		{
-			if ($statut==0) return $langs->trans('StatusContactDraftShort').' '.img_picto($langs->trans('StatusContactDraftShort'),'statut0');
-			elseif ($statut==1) return $langs->trans('StatusContactValidatedShort').' '.img_picto($langs->trans('StatusContactValidatedShort'),'statut1');
-			elseif ($statut==4) return $langs->trans('StatusContactValidatedShort').' '.img_picto($langs->trans('StatusContactValidatedShort'),'statut4');
-			elseif ($statut==5) return $langs->trans('StatusContactValidatedShort').' '.img_picto($langs->trans('StatusContactValidatedShort'),'statut5');
+			if ($statut==0) return '<span class="hideonsmartphone">'.$langs->trans('StatusContactDraftShort').' </span>'.img_picto($langs->trans('StatusContactDraftShort'),'statut0');
+			elseif ($statut==1) return '<span class="hideonsmartphone">'.$langs->trans('StatusContactValidatedShort').' </span>'.img_picto($langs->trans('StatusContactValidatedShort'),'statut1');
+			elseif ($statut==4) return '<span class="hideonsmartphone">'.$langs->trans('StatusContactValidatedShort').' </span>'.img_picto($langs->trans('StatusContactValidatedShort'),'statut4');
+			elseif ($statut==5) return '<span class="hideonsmartphone">'.$langs->trans('StatusContactValidatedShort').' </span>'.img_picto($langs->trans('StatusContactValidatedShort'),'statut5');
 		}
 	}
 
diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php
index 20d56ae6ef6..0359d9dde25 100644
--- a/htdocs/core/class/commoninvoice.class.php
+++ b/htdocs/core/class/commoninvoice.class.php
@@ -273,17 +273,17 @@ abstract class CommonInvoice extends CommonObject
 			$prefix='Short';
 			if (! $paye)
 			{
-				if ($status == 0) return $langs->trans('Bill'.$prefix.'StatusDraft').' '.img_picto($langs->trans('BillStatusDraft'),'statut0');
-				if (($status == 3 || $status == 2) && $alreadypaid <= 0) return $langs->trans('Bill'.$prefix.'StatusCanceled').' '.img_picto($langs->trans('BillStatusCanceled'),'statut5');
-				if (($status == 3 || $status == 2) && $alreadypaid > 0) return $langs->trans('Bill'.$prefix.'StatusClosedPaidPartially').' '.img_picto($langs->trans('BillStatusClosedPaidPartially'),'statut7');
-				if ($alreadypaid <= 0) return $langs->trans('Bill'.$prefix.'StatusNotPaid').' '.img_picto($langs->trans('BillStatusNotPaid'),'statut1');
-				return $langs->trans('Bill'.$prefix.'StatusStarted').' '.img_picto($langs->trans('BillStatusStarted'),'statut3');
+				if ($status == 0) return '<span class="hideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusDraft').' </span>'.img_picto($langs->trans('BillStatusDraft'),'statut0');
+				if (($status == 3 || $status == 2) && $alreadypaid <= 0) return '<span class="hideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusCanceled').' </span>'.img_picto($langs->trans('BillStatusCanceled'),'statut5');
+				if (($status == 3 || $status == 2) && $alreadypaid > 0) return '<span class="hideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusClosedPaidPartially').' </span>'.img_picto($langs->trans('BillStatusClosedPaidPartially'),'statut7');
+				if ($alreadypaid <= 0) return '<span class="hideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusNotPaid').' </span>'.img_picto($langs->trans('BillStatusNotPaid'),'statut1');
+				return '<span class="hideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusStarted').' </span>'.img_picto($langs->trans('BillStatusStarted'),'statut3');
 			}
 			else
 			{
-				if ($type == 2) return $langs->trans('Bill'.$prefix.'StatusPaidBackOrConverted').' '.img_picto($langs->trans('BillStatusPaidBackOrConverted'),'statut6');
-				elseif ($type == 3) return $langs->trans('Bill'.$prefix.'StatusConverted').' '.img_picto($langs->trans('BillStatusConverted'),'statut6');
-				else return $langs->trans('Bill'.$prefix.'StatusPaid').' '.img_picto($langs->trans('BillStatusPaid'),'statut6');
+				if ($type == 2) return '<span class="hideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusPaidBackOrConverted').' </span>'.img_picto($langs->trans('BillStatusPaidBackOrConverted'),'statut6');
+				elseif ($type == 3) return '<span class="hideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusConverted').' </span>'.img_picto($langs->trans('BillStatusConverted'),'statut6');
+				else return '<span class="hideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusPaid').' </span>'.img_picto($langs->trans('BillStatusPaid'),'statut6');
 			}
 		}
 	}
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index f9c7b54b12c..6f98c742e82 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -383,6 +383,19 @@ class FormFile
             $buttonlabeltoshow=$buttonlabel;
             if (empty($buttonlabel)) $buttonlabel=$langs->trans('Generate');
 
+
+// Keep this. Used for test with jmobile
+/*print '
+<form id="form1" name="form1">
+<select id="custom-select2a" name="custom-select2a">
+<option value="" data-placeholder="true">Choose One...</option>
+<option value="option1">Option #1</option>
+<option value="option2">Option #2</option>
+<option value="option3">Option #3 - This is a really really really really really long label.</option>
+</select>
+</form>
+';
+*/
             if (empty($noform)) $out.= '<form action="'.$urlsource.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc').'" name="'.$forname.'" id="'.$forname.'_form" method="post">';
             $out.= '<input type="hidden" name="action" value="builddoc">';
             $out.= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
@@ -529,6 +542,8 @@ class FormFile
             {
                 if (empty($noform)) $out.= '</form>'."\n";
             }
+            
+$out.='</div>';            
         }
         $out.= '<!-- End show_document -->'."\n";
         //return ($i?$i:$headershown);
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 3418c6419fd..54aa10e23b4 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -816,7 +816,7 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e
 	}
 	if (! is_object($outputlangs)) $outputlangs=$langs;
 	if (! $format) $format='daytextshort';
-	$reduceformat=(! empty($conf->dol_optimize_smallscreen) && in_array($format,array('day','hour')))?1:0;
+	$reduceformat=(! empty($conf->dol_optimize_smallscreen) && in_array($format,array('day','dayhour')))?1:0;
 
 	// Change predefined format into computer format. If found translation in lang file we use it, otherwise we use default.
 	if ($format == 'day')				$format=($outputlangs->trans("FormatDateShort")!="FormatDateShort"?$outputlangs->trans("FormatDateShort"):$conf->format_date_short);
diff --git a/htdocs/core/tpl/freeproductline_create.tpl.php b/htdocs/core/tpl/freeproductline_create.tpl.php
index 666b0d59896..33adea50f20 100644
--- a/htdocs/core/tpl/freeproductline_create.tpl.php
+++ b/htdocs/core/tpl/freeproductline_create.tpl.php
@@ -33,7 +33,7 @@ if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($ob
 <tr class="liste_titre nodrag nodrop">
 	<td
 	<?php echo (! empty($conf->global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>><div
-			id="add"></div> <?php echo $langs->trans('AddNewLine').' - '.$langs->trans("FreeZone"); ?>
+			id="add"></div> <span class="hideonsmartphone"><?php echo $langs->trans('AddNewLine').' - ' ?></span><?php echo $langs->trans("FreeZone"); ?>
 	</td>
 	<td align="right"><?php echo $langs->trans('VAT'); ?></td>
 	<td align="right"><?php echo $langs->trans('PriceUHT'); ?></td>
diff --git a/htdocs/core/tpl/predefinedproductline_create.tpl.php b/htdocs/core/tpl/predefinedproductline_create.tpl.php
index 06decde294f..422e7fa063e 100644
--- a/htdocs/core/tpl/predefinedproductline_create.tpl.php
+++ b/htdocs/core/tpl/predefinedproductline_create.tpl.php
@@ -35,7 +35,7 @@ if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($ob
 <tr class="liste_titre nodrag nodrop">
 	<td<?php echo (! empty($conf->global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="4"' : ' colspan="3"'); ?>>
 	<?php
-	echo $langs->trans("AddNewLine").' - ';
+	echo '<span class="hideonsmartphone">'.$langs->trans("AddNewLine").' - </span>';
 	if (! empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans('RecordedProducts');
 	else if (empty($conf->product->enabled) && ! empty($conf->service->enabled)) echo $langs->trans('RecordedServices');
 	else echo $langs->trans('RecordedProductsAndServices');
diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php
index 81e648c2710..60dbbef1ee5 100644
--- a/htdocs/fichinter/class/fichinter.class.php
+++ b/htdocs/fichinter/class/fichinter.class.php
@@ -496,9 +496,9 @@ class Fichinter extends CommonObject
 		}
 		if ($mode == 5)
 		{
-			if ($statut==0) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut0');
-			if ($statut==1) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut4');
-			if ($statut==2) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut6');
+			if ($statut==0) return '<span class="hideonsmartphone">'.$langs->trans($this->statuts_short[$statut]).' </span>'.img_picto($langs->trans($this->statuts_short[$statut]),'statut0');
+			if ($statut==1) return '<span class="hideonsmartphone">'.$langs->trans($this->statuts_short[$statut]).' </span>'.img_picto($langs->trans($this->statuts_short[$statut]),'statut4');
+			if ($statut==2) return '<span class="hideonsmartphone">'.$langs->trans($this->statuts_short[$statut]).' </span>'.img_picto($langs->trans($this->statuts_short[$statut]),'statut6');
 		}
 	}
 
diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php
index 2c6ad45f30f..39c729f91e4 100644
--- a/htdocs/fourn/class/fournisseur.commande.class.php
+++ b/htdocs/fourn/class/fournisseur.commande.class.php
@@ -563,14 +563,14 @@ class CommandeFournisseur extends CommonOrder
         }
         if ($mode == 5)
         {
-            if ($statut==0) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut0');
-            if ($statut==1) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut1');
-            if ($statut==2) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut3');
-            if ($statut==3) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut3');
-            if ($statut==4) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut3');
-            if ($statut==5) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut6');
-            if ($statut==6 || $statut==7) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut5');
-            if ($statut==9) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut5');
+            if ($statut==0) return '<span class="hideonsmartphone">'.$langs->trans($statutshort[$statut]).' </span>'.img_picto($langs->trans($this->statuts[$statut]),'statut0');
+            if ($statut==1) return '<span class="hideonsmartphone">'.$langs->trans($statutshort[$statut]).' </span>'.img_picto($langs->trans($this->statuts[$statut]),'statut1');
+            if ($statut==2) return '<span class="hideonsmartphone">'.$langs->trans($statutshort[$statut]).' </span>'.img_picto($langs->trans($this->statuts[$statut]),'statut3');
+            if ($statut==3) return '<span class="hideonsmartphone">'.$langs->trans($statutshort[$statut]).' </span>'.img_picto($langs->trans($this->statuts[$statut]),'statut3');
+            if ($statut==4) return '<span class="hideonsmartphone">'.$langs->trans($statutshort[$statut]).' </span>'.img_picto($langs->trans($this->statuts[$statut]),'statut3');
+            if ($statut==5) return '<span class="hideonsmartphone">'.$langs->trans($statutshort[$statut]).' </span>'.img_picto($langs->trans($this->statuts[$statut]),'statut6');
+            if ($statut==6 || $statut==7) return '<span class="hideonsmartphone">'.$langs->trans($statutshort[$statut]).' </span>'.img_picto($langs->trans($this->statuts[$statut]),'statut5');
+            if ($statut==9) return '<span class="hideonsmartphone">'.$langs->trans($statutshort[$statut]).' </span>'.img_picto($langs->trans($this->statuts[$statut]),'statut5');
         }
     }
 
diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php
index 86490fc9c8f..3e1943c9b27 100755
--- a/htdocs/fourn/commande/index.php
+++ b/htdocs/fourn/commande/index.php
@@ -344,7 +344,7 @@ if ($resql)
             print '&nbsp;';
             print '</td>';
 
-            print '<td width="16" align="right" class="nobordernopadding">';
+            print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
             $filename=dol_sanitizeFileName($obj->ref);
             $filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
             $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
@@ -412,7 +412,7 @@ print '<td width="16" class="nobordernopadding nowrap">';
 print '&nbsp;';
 print '</td>';
 
-print '<td width="16" align="right" class="nobordernopadding">';
+print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
 $filename=dol_sanitizeFileName($obj->ref);
 $filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
 $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index a756661e603..2efbe589334 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1317,7 +1317,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
 
     if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '<div class="ui-layout-north"> <!-- Begin top layout -->'."\n";
 
-    if (empty($_SESSION['dol_hide_topmenu']) && ! GETPOST('dol_hide_topmenu'))
+    if (empty($conf->dol_hide_topmenu))
     {
 	    print '<div id="tmenu_tooltip" class="tmenu">'."\n";
 
@@ -1418,9 +1418,8 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
 
     print "<!-- End top horizontal menu -->\n";
 
-    if (empty($conf->use_javascript_ajax) || empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '<table width="100%" class="notopnoleftnoright" summary="leftmenutable" id="undertopmenu"><tr>';
-
-
+	//XXX if (empty($conf->use_javascript_ajax) || empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '<table width="100%" class="notopnoleftnoright" summary="leftmenutable" id="undertopmenu"><tr>';
+    if (empty($conf->dol_hide_leftmenu) && (empty($conf->use_javascript_ajax) || empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))) print '<div id="id-container">';
 }
 
 
@@ -1448,10 +1447,11 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
     // Instantiate hooks of thirdparty module
     $hookmanager->initHooks(array('searchform','leftblock'));
 
-    if (empty($_SESSION['dol_hide_leftmenu']) && ! GETPOST('dol_hide_leftmenu'))
+    if (empty($conf->dol_hide_leftmenu))
     {
 	    if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print "\n".'<div class="ui-layout-west"> <!-- Begin left layout -->'."\n";
-	    else print '<td class="vmenu" valign="top">';
+		//XXX else print '<td class="vmenu" valign="top">';
+		else print '<div id="id-left">';
 
 	    print "\n";
 
@@ -1613,7 +1613,8 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
 	    print $leftblock;
 
 	    if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '</div> <!-- End left layout -->'."\n";
-	    else print '</td>';
+		//XXX	    else print '</td>';
+	    else print '</div>';	// End div id="id-left"
     }
 
     print "\n";
@@ -1637,10 +1638,10 @@ function main_area($title='')
     if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))
     {
         print '<div id="mainContent"><div class="ui-layout-center"> <!-- begin main layout -->'."\n";
-        print '<table width="100%" class="notopnoleftnoright" summary="centermenutable" id="undertopmenu"><tr>';
+        //print '<table width="100%" class="notopnoleftnoright" summary="centermenutable" id="undertopmenu"><tr>';
     }
-
-    print '<td valign="top">'."\n";
+	//XXX print '<td valign="top">'."\n";
+	if (empty($conf->dol_hide_leftmenu)) print '<div id="id-right">';
 
     print "\n";
 
@@ -1765,14 +1766,17 @@ if (! function_exists("llxFooter"))
         print '</div> <!-- end div class="fiche" -->'."\n";
 
 
-        print "\n".'</td></tr></table> <!-- end right area -->'."\n";
-        if ($conf->use_javascript_ajax && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '</div></div> <!-- end main layout -->'."\n";
+		//XXX print "\n".'</td></tr></table> <!-- end right area -->'."\n";
+        if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '</div></div> <!-- end main layout -->'."\n";
+		if (empty($conf->dol_hide_leftmenu)) print '</div>'; // End div id-right
 
         print "\n";
         if ($foot) print '<!-- '.$foot.' -->'."\n";
 
         printCommonFooter();
 
+        if (empty($conf->dol_hide_leftmenu)) print '</div>';	// End div container
+        
         print "</body>\n";
         print "</html>\n";
     }
diff --git a/htdocs/theme/amarok/style.css.php b/htdocs/theme/amarok/style.css.php
index a3bbd990a12..c7e784d2977 100755
--- a/htdocs/theme/amarok/style.css.php
+++ b/htdocs/theme/amarok/style.css.php
@@ -566,6 +566,15 @@ div.login_main_home {
 /* Menu gauche                                                                    */
 /* ============================================================================== */
 
+td.vmenu {
+	<?php if (GETPOST("optioncss") != 'print') {?>
+    margin-right:2px;
+    padding:0px;
+    width:170px;
+    /* border-right: 1px solid #666666; */
+    <?php } ?>
+}
+
 div.vmenu {
 	<?php if (GETPOST("optioncss") == 'print') {?>
 	display:none;
@@ -943,13 +952,17 @@ a.tab:hover {color:#333333;}
 /* Styles de positionnement des zones                                             */
 /* ============================================================================== */
 
-td.vmenu {
-	<?php if (GETPOST("optioncss") != 'print') {?>
-    margin-right:2px;
-    padding:0px;
-    width:170px;
-    /* border-right: 1px solid #666666; */
-    <?php } ?>
+#id-container {
+  display: table;
+  table-layout: fixed;
+}
+#id-right, #id-left {
+  display: table-cell;
+  float: none;
+  vertical-align: top;
+}
+#id-<?php echo $right; ?> {
+	width: 100%;
 }
 
 div.fiche {
diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php
index 3af50441fc3..c8aa6959d49 100644
--- a/htdocs/theme/auguria/style.css.php
+++ b/htdocs/theme/auguria/style.css.php
@@ -230,6 +230,19 @@ td.showDragHandle {
 /* Styles de positionnement des zones                                             */
 /* ============================================================================== */
 
+#id-container {
+  display: table;
+  table-layout: fixed;
+}
+#id-right, #id-left {
+  display: table-cell;
+  float: none;
+  vertical-align: top;
+}
+#id-<?php echo $right; ?> {
+	width: 100%;
+}
+
 div.fiche {
 	margin-<?php print $left; ?>: <?php print empty($conf->dol_optimize_smallscreen)?'10':'2'; ?>px;
 	margin-<?php print $right; ?>: <?php print empty($conf->dol_optimize_smallscreen)?'8':''; ?>px;
@@ -596,7 +609,7 @@ img.login, img.printer, img.entity {
 /* Menu gauche                                                                    */
 /* ============================================================================== */
 
-td.vmenu {
+div.vmenu, td.vmenu {
     margin-<?php print $right; ?>: 2px;
     padding: 0px;
     padding-bottom: 0px;
diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php
index e9b1521c026..42db41fec0f 100644
--- a/htdocs/theme/bureau2crea/style.css.php
+++ b/htdocs/theme/bureau2crea/style.css.php
@@ -259,19 +259,24 @@ td.showDragHandle {
 /* Styles de positionnement des zones                                             */
 /* ============================================================================== */
 
+#id-container {
+  display: table;
+  table-layout: fixed;
+}
+#id-right, #id-left {
+  display: table-cell;
+  float: none;
+  vertical-align: top;
+}
+#id-<?php echo $right; ?> {
+	width: 100%;
+}
+
 div.leftContent {
 	margin-left: 20px !important;
     width: 220px !important;
 }
 
-div.vmenu {
-	position: relative;
-    float: left;
-    margin: 0px;
-    width: 180px;
-    margin-left: 10px;
-}
-
 div.fiche {
 	margin-<?php print $left; ?>: <?php print empty($conf->dol_optimize_smallscreen)?'10':'2'; ?>px;
 	margin-<?php print $right; ?>: <?php print empty($conf->dol_optimize_smallscreen)?'10':''; ?>px;
@@ -647,10 +652,11 @@ img.login, img.printer, img.entity {
 /* ============================================================================== */
 /* Menu gauche                                                                    */
 /* ============================================================================== */
-.vmenu{
-margin: 0;
-position: relative;
-width: 180px;
+
+.vmenu {
+	margin: 0;
+	position: relative;
+	width: 180px;
 }
 <?php if (GETPOST("optioncss") == 'print') { ?>
 .vmenu {
@@ -658,6 +664,14 @@ width: 180px;
 }
 <?php } ?>
 
+div.vmenu {
+	position: relative;
+    float: left;
+    margin: 0px;
+    width: 180px;
+    margin-left: 10px;
+}
+
 a.vmenu:link        { font-size:12px; text-align:left; font-weight: normal; color: #FFFFFF; margin: 1px 1px 1px 4px; }
 a.vmenu:visited     { font-size:12px; text-align:left; font-weight: normal; color: #FFFFFF; margin: 1px 1px 1px 4px; }
 a.vmenu:active      { font-size:12px; text-align:left; font-weight: normal; color: #FFFFFF; margin: 1px 1px 1px 4px; }
@@ -738,7 +752,6 @@ div.blockvmenusearch
 {
 	margin: 3px 0px 15px 0px;
 	padding: 25px 0px 2px 2px;
-	width: 180px;
     background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/bg_leftMenu.jpg',1); ?>);
     background-position: top right;
     background-repeat: no-repeat;
diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php
index 4866ed0f0aa..954bc385337 100644
--- a/htdocs/theme/cameleo/style.css.php
+++ b/htdocs/theme/cameleo/style.css.php
@@ -233,9 +233,22 @@ td.showDragHandle {
 /* ============================================================================== */
 /* Styles de positionnement des zones                                             */
 /* ============================================================================== */
+
+#id-container {
+  display: table;
+  table-layout: fixed;
+}
+#id-right, #id-left {
+  display: table-cell;
+  float: none;
+  vertical-align: top;
+}
+#id-<?php echo $right; ?> {
+	width: 100%;
+}
+
 div.leftContent {
 	margin-left: 0px !important;
-        width: 200px !important;
         background-color: #FFF;
 }
 
@@ -651,7 +664,7 @@ img.login, img.printer, img.entity {
 /* Menu gauche                                                                    */
 /* ============================================================================== */
 
-td.vmenu {
+div.vmenu, td.vmenu {
     margin-<?php print $right; ?>: 2px;
     padding: 0px;
     padding-bottom: 0px;
@@ -754,7 +767,6 @@ div.blockvmenusearch
 {
     margin: 3px 0px 15px 0px;
     padding: 25px 0px 2px 2px;
-    width: 200px;
     background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/bg_leftMenu.jpg',1); ?>);
     background-position: top right;
     background-repeat: no-repeat;
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index 17c11d4eb12..b351bd32b8a 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -389,9 +389,23 @@ td.showDragHandle {
 /* Styles de positionnement des zones                                             */
 /* ============================================================================== */
 
+#id-container {
+  display: table;
+  table-layout: fixed;
+}
+#id-right, #id-left {
+  display: table-cell;
+  float: none;
+  vertical-align: top;
+}
+#id-<?php echo $right; ?> {
+	width: 100%;
+}
+
 div.fiche {
 	margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:((empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))?($dol_hide_leftmenu?'4':'20'):'24')); ?>px;
 	margin-<?php print $right; ?>: <?php print (GETPOST("optioncss") == 'print'?8:(empty($conf->dol_optimize_smallscreen)?'12':'4')); ?>px;
+	<?php if (! empty($conf->dol_hide_leftmenu) && ! empty($conf->dol_hide_topmenu)) print 'margin-top: 4px;'; ?>
 }
 
 div.fichecenter {
@@ -857,7 +871,7 @@ img.login, img.printer, img.entity {
 /* Menu gauche                                                                    */
 /* ============================================================================== */
 
-td.vmenu {
+div.vmenu, td.vmenu {
     margin-<?php print $right; ?>: 2px;
     padding: 0px;
     padding-bottom: 0px;
@@ -888,7 +902,6 @@ a.help:link, a.help:visited, a.help:hover, a.help:active { font-size:<?php print
 
 div.blockvmenupair, div.blockvmenuimpair, div.blockvmenubookmarks
 {
-    width:174px;
 	font-family: <?php print $fontlist ?>;
 	color: #000000;
 	text-align: <?php print $left; ?>;
@@ -924,7 +937,6 @@ div.blockvmenupair, div.blockvmenuimpair, div.blockvmenubookmarks
 
 div.blockvmenusearch
 {
-    width:174px;
 	font-family: <?php print $fontlist ?>;
 	color: #000000;
 	text-align: <?php print $left; ?>;
@@ -956,7 +968,6 @@ div.blockvmenusearch
 
 div.blockvmenubookmarksold
 {
-    width:174px;
     border-right: 1px solid #555555;
     border-bottom: 1px solid #555555;
     font-family: <?php print $fontlist ?>;
@@ -991,7 +1002,6 @@ div.blockvmenubookmarksold
 div.blockvmenuhelp
 {
 <?php if (empty($conf->dol_optimize_smallscreen)) { ?>
-    width:174px;
 	font-family: <?php print $fontlist ?>;
 	color: #000000;
 	text-align: center;
@@ -2585,7 +2595,7 @@ a.ui-link, a.ui-link:hover {
 .ui-btn-inner {
 	padding-left: 10px;
 	padding-right: 10px;
-	white-space: normal;
+	/* white-space: normal; */		/* Warning, enable this break the truncate feature */
 }
 .ui-select .ui-btn-icon-right .ui-btn-inner {
 	padding-right: 36px;
@@ -2623,34 +2633,19 @@ a.ui-link {
 	word-wrap: break-word;
 }
 
+/* force wrap possible onto field overflow does not works */
+.formdoc .ui-btn-inner
+{
+	white-space: normal;
+	overflow: hidden;
+	text-overflow: hidden;
+}
+
 /* Warning: setting this make screen not beeing refreshed after a combo selection */
 /*.ui-body-c {
 	background: #fff;
 }*/
-/*
-.ui-li-divider {
-	background: #eee !important;
-}
-.ui-bar-b {
-	border: 1px solid #CCC !important;
-	background: #aaa !important;
-	font-weight: bold !important;
-	color: #444 !important;
-	text-shadow: 0 1px 1px #fff !important;
-	background-image: -webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#aaa)) !important;
-	background-image: -webkit-linear-gradient(top,#fdfdfd,#aaa) !important;
-	background-image: -moz-linear-gradient(top,#fdfdfd,#aaa) !important;
-	background-image: -ms-linear-gradient(top,#fdfdfd,#aaa) !important;
-	background-image: -o-linear-gradient(top,#fdfdfd,#aaa) !important;
-	background-image: linear-gradient(top,#fdfdfd,#aaa) !important;
-}
-.ui-bar-b .ui-link {
-	border: none;
-	font-weight: bold !important;
-	color: #444 !important;
-	text-shadow: 0 1px 1px #fff !important;
-}
-*/
+
 
 <?php
 if (is_object($db)) $db->close();
-- 
GitLab