diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php index c38b99263ba0846a8ceb85df6fa0fc154c9241f3..802dee8474fe743e39a074f516d3875c8cc115d7 100644 --- a/htdocs/core/boxes/box_services_contracts.php +++ b/htdocs/core/boxes/box_services_contracts.php @@ -128,7 +128,7 @@ class box_services_contracts extends ModeleBoxes } } - $this->info_box_contents[$i][] = array('td' => 'align="left"', + $this->info_box_contents[$i][] = array('td' => 'class="tdoverflow maxwidth100onsmartphone" align="left"', 'text' => $contratlignestatic->getNomUrl(1), 'asis' => 1 ); diff --git a/htdocs/core/boxes/box_services_expired.php b/htdocs/core/boxes/box_services_expired.php index 578d83e0b6628343d65d8509a398fca3b8a1c137..296ef56af8ac352e6ca6513feeda93824480ad20 100644 --- a/htdocs/core/boxes/box_services_expired.php +++ b/htdocs/core/boxes/box_services_expired.php @@ -103,8 +103,8 @@ class box_services_expired extends ModeleBoxes 'logo' => 'company', 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); - $this->info_box_contents[$i][3] = array('td' => 'align="left"', - 'text' => dol_trunc($objp->name,40), + $this->info_box_contents[$i][3] = array('td' => 'class="tdoverflow maxwidth100onsmartphone" align="left"', + 'text' => $objp->name, 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); $this->info_box_contents[$i][4] = array('td' => 'align="center"', diff --git a/htdocs/core/boxes/modules_boxes.php b/htdocs/core/boxes/modules_boxes.php index d9b1f42132a1fb2242b2678ee7bc184736848d97..7bc8672ddab04025b0d5d3a9e317247f3ad0d78b 100644 --- a/htdocs/core/boxes/modules_boxes.php +++ b/htdocs/core/boxes/modules_boxes.php @@ -182,6 +182,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" global $langs, $user, $conf; // Trick to get result into a var from a function that makes print instead of return + // TODO Replace ob_start with param nooutput=1 into showBox ob_start(); $result = $this->showBox($head, $contents); $output = ob_get_contents(); @@ -191,14 +192,14 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" } /** - *Standard method to show a box (usage by boxes not mandatory, a box can still use its own showBox function) + * Standard method to show a box (usage by boxes not mandatory, a box can still use its own showBox function) * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines - * + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) + function showBox($head = null, $contents = null, $nooutput=0) { global $langs, $user, $conf; @@ -242,7 +243,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" $out.= '>'; if ($conf->use_javascript_ajax) { - $out.= '<table summary="" class="nobordernopadding" width="100%"><tr><td>'; + $out.= '<table summary="" class="nobordernopadding" width="100%"><tr><td class="tdoverflow maxwidth300onsmartphone">'; } if (! empty($head['text'])) { @@ -358,13 +359,16 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" } } else { dol_syslog(get_class($this).'::showBoxCached'); - $out = dol_readcachefile($cachedir, $filename); - print "<!-- Box ".get_class($this)." from cache -->"; - + $out = "<!-- Box ".get_class($this)." from cache -->"; + $out.= dol_readcachefile($cachedir, $filename); } - print $out; - } - + + if ($nooutput) return $out; + else print $out; + + return ''; + } + } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 35049193abebab2b782a3d4425e31fa40a075c24..a30b006bb0b36bfcf3076055d441b57c361769cb 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -585,6 +585,7 @@ div.myavailability { .clearboth { clear:both; } .hideobject { display: none; } +.minwidth50 { min-width: 50px; } .minwidth100 { min-width: 100px; } .minwidth200 { min-width: 200px; } .minwidth300 { min-width: 300px; } @@ -617,6 +618,7 @@ div.myavailability { .maxwidth100onsmartphone { max-width: 100px; } .maxwidth200onsmartphone { max-width: 200px; } .maxwidth300onsmartphone { max-width: 300px; } + .maxwidth400onsmartphone { max-width: 400px; } .titlefield { width: auto; } .titlefieldcreate { width: auto; } } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 4fe274b3ae3e18bc43f667733aa8a17af7fd9c85..b26509ed82e86537de97e7cc6ac793d8dcbb96e7 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -583,6 +583,7 @@ div.myavailability { .clearboth { clear:both; } .hideobject { display: none; } +.minwidth50 { min-width: 50px; } .minwidth100 { min-width: 100px; } .minwidth200 { min-width: 200px; } .minwidth300 { min-width: 300px; } @@ -615,6 +616,7 @@ div.myavailability { .maxwidth100onsmartphone { max-width: 100px; } .maxwidth200onsmartphone { max-width: 200px; } .maxwidth300onsmartphone { max-width: 300px; } + .maxwidth400onsmartphone { max-width: 400px; } .titlefield { width: auto; } .titlefieldcreate { width: auto; } } @@ -683,9 +685,12 @@ td.showDragHandle { display: block; font-family: "RobotoDraft","Roboto",sans-serif; left: 0; +<?php if ((GETPOST('testmenuhider') || ! empty($conf->global->MAIN_TESTMENUHIDER)) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?> +<?php } else { ?> position: fixed; top: 50px; - z-index: 4; +<?php } ?> + z-index: 200; -webkit-transform: translateZ(0); -moz-transform: translateZ(0); -ms-transform: translateZ(0); @@ -709,9 +714,12 @@ td.showDragHandle { -moz-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); -webkit-overflow-scrolling: touch; +<?php if ((GETPOST('testmenuhider') || ! empty($conf->global->MAIN_TESTMENUHIDER)) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?> +<?php } else { ?> overflow-x: hidden; overflow-y: auto; <?php } ?> +<?php } ?> } .side-nav-vert { margin-left: 228px; @@ -730,11 +738,16 @@ div.login_block { top: inherit !important; } .side-nav { - /*top: inherit !important;*/ +<?php if ((GETPOST('testmenuhider') || ! empty($conf->global->MAIN_TESTMENUHIDER)) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?> +<?php } else { ?> overflow-x: initial !important; overflow-y: scroll; - /*position: initial !important;*/ +<?php } ?> display: none; + + position: auto; + top: auto; + z-index: 200; } div.login_block { /* position: initial !important;*/ @@ -744,7 +757,13 @@ div.login_block { padding-left: 0 ! important; } #id-left { + z-index: 201; + background: #FFF; +<?php if ((GETPOST('testmenuhider') || ! empty($conf->global->MAIN_TESTMENUHIDER)) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?> + top: 50px ! important; +<?php } else { ?> top: 60px ! important; +<?php } ?> } <?php } ?> @@ -1319,7 +1338,11 @@ div.login_block { padding-bottom: 3px; <?php print $left; ?>: 0; top: 0px; +<?php if ((GETPOST('testmenuhider') || ! empty($conf->global->MAIN_TESTMENUHIDER)) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?> + position: absolute; +<?php } else { ?> position: fixed; +<?php } ?> font-weight: bold; z-index: 10; text-align: center; @@ -1491,7 +1514,7 @@ div.blockvmenuhelp text-align: center; text-decoration: none; padding-left: 0px; - padding-right: 3px; + padding-right: 8px; padding-top: 3px; padding-bottom: 3px; margin: 4px 0px 0px 0px;