From 914d56bb1b1c856dd428e8b1b0512dd06d181064 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Sat, 9 Jul 2016 16:54:04 +0200
Subject: [PATCH] Fix css for last chrome versions. max-width: 0 fails on box

---
 htdocs/core/boxes/box_services_contracts.php |  8 ++++----
 htdocs/langs/en_US/contracts.lang            |  1 +
 htdocs/theme/eldy/style.css.php              | 16 ++++++++++++++--
 htdocs/theme/md/style.css.php                | 12 ++++++++++++
 4 files changed, 31 insertions(+), 6 deletions(-)

diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php
index b45bde124a3..9f71a98e77f 100644
--- a/htdocs/core/boxes/box_services_contracts.php
+++ b/htdocs/core/boxes/box_services_contracts.php
@@ -128,22 +128,22 @@ class box_services_contracts extends ModeleBoxes
 						}
 					}
 
-					$this->info_box_contents[$i][] = array('td' => 'class="tdoverflow maxwidth100onsmartphone" align="left"',
+					$this->info_box_contents[$i][] = array('td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"',
                     'text' => $contratlignestatic->getNomUrl(1),
 					'asis' => 1
                     );
 
-					$this->info_box_contents[$i][] = array('td' => 'align="left"',
+					$this->info_box_contents[$i][] = array('td' => '',
                     'text' => $contractstatic->getNomUrl(1),
 					'asis' => 1
                     );
 
-					$this->info_box_contents[$i][] = array('td' => 'align="left"',
+					$this->info_box_contents[$i][] = array('td' => '',
                     'text' => $thirdpartytmp->getNomUrl(1),
 					'asis' => 1
                     );
 
-					$this->info_box_contents[$i][] = array('td' => 'align="right"',
+					$this->info_box_contents[$i][] = array('td' => '',
                     'text' => dol_print_date($datem,'day'));
 
 					$this->info_box_contents[$i][] = array('td' => 'align="right" width="18"',
diff --git a/htdocs/langs/en_US/contracts.lang b/htdocs/langs/en_US/contracts.lang
index bb4bb033b03..08e5bb562db 100644
--- a/htdocs/langs/en_US/contracts.lang
+++ b/htdocs/langs/en_US/contracts.lang
@@ -14,6 +14,7 @@ ServiceStatusNotLateShort=Not expired
 ServiceStatusLate=Running, expired
 ServiceStatusLateShort=Expired
 ServiceStatusClosed=Closed
+ShowContractOfService=Show contract of service
 Contracts=Contracts
 ContractsSubscriptions=Contracts/Subscriptions
 ContractsAndLine=Contracts and line of contracts
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index 53a8528781b..761ce42e0f5 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -561,6 +561,18 @@ div.myavailability {
     text-overflow: ellipsis;
     white-space: nowrap;
 }
+.tdoverflowmax100 {
+    max-width: 100px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
+.tdoverflowmax300 {
+    max-width: 300px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
 .tdoverflowauto {
     max-width: 0;
     overflow: auto;
@@ -769,8 +781,8 @@ div.ficheaddleft {
 	<?php if ($conf->browser->layout != 'phone')   { print "padding-".$left.": 16px;\n"; }
 	else print "margin-top: 10px;\n"; ?>
 }
-/* Force values for small screen */
-@media only screen and (max-width: 900px)
+/* Force values on one colum for small screen */
+@media only screen and (max-width: 960px)
 {
     div.fiche {
     	margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:($dol_hide_leftmenu?'6':'20')); ?>px;
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index c86a70c905a..92234aeddf3 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -560,6 +560,18 @@ div.myavailability {
     text-overflow: ellipsis;
     white-space: nowrap;
 }
+.tdoverflowmax100 {
+    max-width: 100px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
+.tdoverflowmax300 {
+    max-width: 300px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
 .tdoverflowauto {
     max-width: 0;
     overflow: auto;
-- 
GitLab