FIX CSS and responsive behaviour (feature with a menu hider is on on

smarpthone)
This commit is contained in:
Laurent Destailleur 2016-06-17 16:28:16 +02:00
parent 243a30e5de
commit 34c741bf0d
7 changed files with 32 additions and 22 deletions

View File

@ -1267,7 +1267,7 @@ class FormFile
print '<input type="hidden" name="id" value="' . $object->id . '">';
print '<input type="hidden" name="linkid" value="' . $link->id . '">';
print '<input type="hidden" name="action" value="confirm_updateline">';
print $langs->trans('Link') . ': <input type="text" name="link" size="50" value="' . $link->url . '">';
print $langs->trans('Link') . ': <input type="text" name="link" value="' . $link->url . '">';
print '</td>';
print '<td>';
print $langs->trans('Label') . ': <input type="text" name="label" value="' . $link->label . '">';

View File

@ -170,11 +170,11 @@ class MenuManager
$lastopened = 1; // For menu manager "empty", we force to not have blockvmenulast defined
if (($alt%2==0))
{
print '<div class="blockvmenuimpair'.($lastopened?' blockvmenulast':'').($alt == 1 ? ' blockvmenufirst':'').'">'."\n";
print '<div class="blockvmenuimpair blockvmenuunique'.($lastopened?' blockvmenulast':'').($alt == 1 ? ' blockvmenufirst':'').'">'."\n";
}
else
{
print '<div class="blockvmenupair'.($lastopened?' blockvmenulast':'').($alt == 1 ? ' blockvmenufirst':'').'">'."\n";
print '<div class="blockvmenupair blockvmenuunique'.($lastopened?' blockvmenulast':'').($alt == 1 ? ' blockvmenufirst':'').'">'."\n";
}
}

View File

@ -65,7 +65,7 @@ $formfile->form_attach_new_file(
0,
0,
$permission,
50,
$conf->browser->layout == 'phone' ? 40 : 60,
$object,
'',
1,

View File

@ -371,7 +371,7 @@ $moreheadjs=empty($conf->use_javascript_ajax)?"":"
, north__paneSelector: \"#ecm-layout-north\"
, west__paneSelector: \"#ecm-layout-west\"
, resizable: true
, north__size: 32
, north__size: 36
, north__resizable: false
, north__closable: false
, west__size: 340

View File

@ -373,7 +373,7 @@ $moreheadjs=empty($conf->use_javascript_ajax)?"":"
, north__paneSelector: \"#ecm-layout-north\"
, west__paneSelector: \"#ecm-layout-west\"
, resizable: true
, north__size: 32
, north__size: 36
, north__resizable: false
, north__closable: false
, west__size: 340

View File

@ -207,7 +207,7 @@ if (ini_get('register_globals')) // To solve bug in using $_SESSION
}
// Init the 5 global objects
// This include will set: $conf, $db, $langs, $user, $mysoc objects
// This include will make the new and set properties for: $conf, $db, $langs, $user, $mysoc objects
require_once 'master.inc.php';
// Activate end of page function
@ -221,11 +221,12 @@ if (isset($_SERVER["HTTP_USER_AGENT"]))
$conf->browser->os=$tmp['browseros'];
$conf->browser->version=$tmp['browserversion'];
$conf->browser->layout=$tmp['layout']; // 'classic', 'phone', 'tablet'
$conf->browser->phone=$tmp['phone']; // deprecated, use layout
$conf->browser->tablet=$tmp['tablet']; // deprecated, use layout
$conf->browser->phone=$tmp['phone']; // TODO deprecated, use ->layout
$conf->browser->tablet=$tmp['tablet']; // TODO deprecated, use ->layout
//var_dump($conf->browser);
}
if ($conf->browser->layout == 'phone') $conf->global->MAIN_TESTMENUHIDER=1;
}
// Force HTTPS if required ($conf->file->main_force_https is 0/1 or https dolibarr root url)
// $_SERVER["HTTPS"] is 'on' when link is https, otherwise $_SERVER["HTTPS"] is empty or 'off'

View File

@ -958,7 +958,6 @@ a.tmenu:link, a.tmenu:visited, a.tmenu:hover, a.tmenu:active {
font-weight: normal;
padding: 0px 5px 0px 3px;
white-space: nowrap;
/* text-shadow: 1px 1px 1px #000000; */
color: #<?php echo $colortextbackhmenu; ?>;
text-decoration: none;
}
@ -1002,13 +1001,16 @@ li.tmenu, li.tmenusel {
margin: 0 0 0 0;
font-weight: normal;
}
li.menuhider:hover {
background-image: none !important;
}
li.tmenusel, li.tmenu:hover {
background-image: -o-linear-gradient(bottom, rgba(250,250,250,0.3) 0%, rgba(0,0,0,0.5) 100%) !important;
background-image: -moz-linear-gradient(bottom, rgba(0,0,0,0.5) 0%, rgba(250,250,250,0) 100%) !important;
background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.5) 0%, rgba(250,250,250,0) 100%) !important;
background-image: -ms-linear-gradient(bottom, rgba(250,250,250,0.3) 0%, rgba(0,0,0,0.5) 100%) !important;
background-image: linear-gradient(bottom, rgba(250,250,250,0.3) 0%, rgba(0,0,0,0.5) 100%) !important;
background: rgb(<?php echo $colorbackhmenu1 ?>);
background-image: -o-linear-gradient(bottom, rgba(250,250,250,0.3) 0%, rgba(0,0,0,0.5) 100%);
background-image: -moz-linear-gradient(bottom, rgba(0,0,0,0.5) 0%, rgba(250,250,250,0) 100%);
background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.5) 0%, rgba(250,250,250,0) 100%);
background-image: -ms-linear-gradient(bottom, rgba(250,250,250,0.3) 0%, rgba(0,0,0,0.5) 100%);
background-image: linear-gradient(bottom, rgba(250,250,250,0.3) 0%, rgba(0,0,0,0.5) 100%);
/* background: rgb(<?php echo $colorbackhmenu1 ?>); */
}
.tmenuend .tmenuleft { width: 0px; }
.tmenuend { display: none; }
@ -1038,6 +1040,13 @@ div.tmenucenter
height: <?php print $heightmenu; ?>px;
<?php } ?>
width: 100%;
/*
max-width: <?php echo round($fontsize * 8); ?>px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #<?php echo $colortextbackhmenu; ?>;
*/
}
#menu_titre_logo {
padding-top: 0;
@ -4310,7 +4319,7 @@ img.demothumb {
/* nboftopmenuentries = <?php echo $nbtopmenuentries ?>, fontsize=<?php echo $fontsize ?> */
/* rule to reduce top menu - 1st reduction */
@media only screen and (max-width: <?php echo round($nbtopmenuentries * $fontsize * 6.7, 0) + 8; ?>px)
@media only screen and (max-width: <?php echo round($nbtopmenuentries * $fontsize * 7, 0) + 20; ?>px)
{
div.tmenucenter {
max-width: <?php echo round($fontsize * 4); ?>px; /* size of viewport */
@ -4329,7 +4338,7 @@ img.demothumb {
}
li.tmenu, li.tmenusel {
min-width: 32px;
min-width: 36px;
}
div.mainmenu {
min-width: auto;
@ -4339,7 +4348,7 @@ img.demothumb {
}
}
/* rule to reduce top menu - 2nd reduction */
@media only screen and (max-width: <?php echo round($nbtopmenuentries * $fontsize * 4.7, 0) + 8; ?>px)
@media only screen and (max-width: <?php echo round($nbtopmenuentries * $fontsize * 4.5, 0) + 8; ?>px)
{
div.mainmenu {
height: 23px;
@ -4358,7 +4367,7 @@ img.demothumb {
}
}
/* rule to reduce top menu - 3rd reduction */
@media only screen and (max-width: 605px)
@media only screen and (max-width: 660px)
{
/* Reduce login top right info */
.usertextatoplogin {
@ -4385,7 +4394,7 @@ img.demothumb {
<?php } ?>
}
li.tmenu, li.tmenusel {
min-width: 30px;
min-width: 32px;
}
div.mainmenu {
height: 23px;