mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
CSS
This commit is contained in:
parent
708ebb3a89
commit
a365800967
|
|
@ -121,7 +121,7 @@ if ($action == 'update') {
|
|||
}
|
||||
|
||||
if (GETPOSTISSET('THEME_TOPMENU_DISABLE_IMAGE')) {
|
||||
$val=GETPOST('THEME_TOPMENU_DISABLE_IMAGE');
|
||||
$val = GETPOST('THEME_TOPMENU_DISABLE_IMAGE');
|
||||
if (!$val) {
|
||||
dolibarr_del_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', $conf->entity);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -9969,7 +9969,7 @@ class Form
|
|||
$ret .= '<a href="' . DOL_URL_ROOT . '/viewimage.php?modulepart=' . $modulepart . '&entity=' . $entity . '&file=' . urlencode($originalfile) . '&cache=' . $cache . '">';
|
||||
}
|
||||
}
|
||||
$ret .= '<img alt="Photo" class="photo' . $modulepart . ($cssclass ? ' ' . $cssclass : '') . ' photologo' . (preg_replace('/[^a-z]/i', '_', $file)) . '" ' . ($width ? ' width="' . $width . '"' : '') . ($height ? ' height="' . $height . '"' : '') . ' src="' . DOL_URL_ROOT . '/viewimage.php?modulepart=' . $modulepart . '&entity=' . $entity . '&file=' . urlencode($file) . '&cache=' . $cache . '">';
|
||||
$ret .= '<img alt="" class="photo' . $modulepart . ($cssclass ? ' ' . $cssclass : '') . ' photologo' . (preg_replace('/[^a-z]/i', '_', $file)) . '" ' . ($width ? ' width="' . $width . '"' : '') . ($height ? ' height="' . $height . '"' : '') . ' src="' . DOL_URL_ROOT . '/viewimage.php?modulepart=' . $modulepart . '&entity=' . $entity . '&file=' . urlencode($file) . '&cache=' . $cache . '">';
|
||||
if ($addlinktofullsize) {
|
||||
$ret .= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2335,7 +2335,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
|
|||
if (empty($tabsname)) {
|
||||
$tabsname = str_replace("@", "", $picto);
|
||||
}
|
||||
$out .= '<div id="moretabs'.$tabsname.'" class="inline-block tabsElem valignmiddle">';
|
||||
$out .= '<div id="moretabs'.$tabsname.'" class="inline-block tabsElem">';
|
||||
$out .= '<div class="tab"><a href="#" class="tab moretab inline-block tabunactive"><span class="hideonsmartphone">'.$langs->trans("More").'</span>... ('.$nbintab.')</a></div>'; // Do not use "reposition" class in the "More".
|
||||
$out .= '<div id="moretabsList'.$tabsname.'" style="width: '.$widthofpopup.'px; position: absolute; '.$left.': -999em; text-align: '.$left.'; margin:0px; padding:2px; z-index:10;">';
|
||||
$out .= $outmore;
|
||||
|
|
|
|||
|
|
@ -526,14 +526,14 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||
/*
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("TopMenuDisableImages").'</td>';
|
||||
print '<td>'.($conf->global->THEME_TOPMENU_DISABLE_IMAGE?$conf->global->THEME_TOPMENU_DISABLE_IMAGE:$langs->trans("Default")).'</td>';
|
||||
print '<td>'.(getDolGlobalString('THEME_TOPMENU_DISABLE_IMAGE',$langs->trans("Default")).'</td>';
|
||||
print '<td class="left" class="nowrap" width="20%"><input name="check_THEME_TOPMENU_DISABLE_IMAGE" id="check_THEME_TOPMENU_DISABLE_IMAGE" type="checkbox" '.(!empty($object->conf->THEME_ELDY_TEXTLINK)?" checked":"");
|
||||
print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo
|
||||
print '> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td>';
|
||||
if ($edit)
|
||||
{
|
||||
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_TOPMENU_DISABLE_IMAGE,array()),''),'THEME_TOPMENU_DISABLE_IMAGE','',1).' ';
|
||||
print $formother->selectColor(colorArrayToHex(colorStringToArray(getDolGlobalString('THEME_TOPMENU_DISABLE_IMAGE'),array()),''),'THEME_TOPMENU_DISABLE_IMAGE','',1).' ';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -643,12 +643,12 @@ function print_start_menu_entry($idsel, $classname, $showmode)
|
|||
*/
|
||||
function print_text_menu_entry($text, $showmode, $url, $id, $idsel, $classname, $atarget, $menuval = array())
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $langs;
|
||||
|
||||
$classnameimg = str_replace('class="', 'class="tmenuimage ', $classname);
|
||||
$classnametxt = str_replace('class="', 'class="tmenulabel ', $classname);
|
||||
|
||||
//$conf->global->THEME_TOPMENU_DISABLE_TEXT=1;
|
||||
//$conf->global->THEME_TOPMENU_DISABLE_IMAGE=1;
|
||||
if ($showmode == 1) {
|
||||
print '<a '.$classnameimg.' tabindex="-1" href="'.$url.'"'.($atarget ? ' target="'.$atarget.'"' : '').' title="'.dol_escape_htmltag($text).'">';
|
||||
print '<div class="'.$id.' '.$idsel.' topmenuimage">';
|
||||
|
|
|
|||
|
|
@ -1274,4 +1274,5 @@ FillMessageWithAIContent=Fill message with AI content
|
|||
EnterYourAIPromptHere=Enter your AI prompt here
|
||||
UseOrOperatorShort=or
|
||||
GoOnList=Go on list
|
||||
ShowSearchFields=Do a search
|
||||
ShowSearchFields=Do a search
|
||||
MyUserCard=My user file
|
||||
|
|
@ -1330,7 +1330,12 @@ if (GETPOSTINT('nojs')) { // If javascript was not disabled on URL
|
|||
// Set MAIN_OPTIMIZEFORTEXTBROWSER for user (must be after login part)
|
||||
if (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') && !empty($user->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||
$conf->global->MAIN_OPTIMIZEFORTEXTBROWSER = $user->conf->MAIN_OPTIMIZEFORTEXTBROWSER;
|
||||
if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') == 1) {
|
||||
$conf->global->THEME_TOPMENU_DISABLE_IMAGE = 1;
|
||||
}
|
||||
}
|
||||
//var_dump($conf->global->THEME_TOPMENU_DISABLE_IMAGE);
|
||||
//var_dump($user->conf->THEME_TOPMENU_DISABLE_IMAGE);
|
||||
|
||||
// set MAIN_OPTIMIZEFORCOLORBLIND for user
|
||||
$conf->global->MAIN_OPTIMIZEFORCOLORBLIND = empty($user->conf->MAIN_OPTIMIZEFORCOLORBLIND) ? '' : $user->conf->MAIN_OPTIMIZEFORCOLORBLIND;
|
||||
|
|
|
|||
|
|
@ -156,8 +156,9 @@ div#topmenu-global-search-dropdown a::after, div#topmenu-quickadd-dropdown a::af
|
|||
}
|
||||
|
||||
/*
|
||||
* MENU Dropdown
|
||||
*/
|
||||
* MENU Dropdown
|
||||
*/
|
||||
|
||||
.login_block.usedropdown .logout-btn{
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -207,7 +208,7 @@ div#topmenu-global-search-dropdown a::after, div#topmenu-quickadd-dropdown a::af
|
|||
}
|
||||
|
||||
div#topmenu-global-search-dropdown, div#topmenu-bookmark-dropdown, div#topmenu-quickadd-dropdown {
|
||||
<?php if (!getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE')) { ?>
|
||||
<?php if (!$disableimages) { ?>
|
||||
line-height: 46px;
|
||||
<?php } ?>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ $heightmenu = 50; /* height of top menu, part with image */
|
|||
$heightmenu2 = 49; /* height of top menu, part with login */
|
||||
$disableimages = 0;
|
||||
$maxwidthloginblock = 180;
|
||||
if (getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 1) {
|
||||
if (getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 1 || !empty($user->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||
$disableimages = 1;
|
||||
$maxwidthloginblock = $maxwidthloginblock + 50;
|
||||
$minwidthtmenu = 0;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ div#topmenu-quickadd-dropdown {
|
|||
}
|
||||
div#topmenu-bookmark-dropdown {
|
||||
position: fixed;
|
||||
<?php echo $right; ?>: 55px;
|
||||
<?php echo $right; ?>: <?php print empty($user->conf->MAIN_OPTIMIZEFORTEXTBROWSER) ? 55 : 85; ?>px;
|
||||
top: 0px;
|
||||
}
|
||||
div#topmenu-login-dropdown {
|
||||
|
|
@ -135,7 +135,7 @@ button.dropdown-item.global-search-item {
|
|||
|
||||
|
||||
/* CSS to hide the arrow to show open/close */
|
||||
div#topmenu-global-search-dropdown, , div#topmenu-quickadd-dropdown, div#topmenu-bookmark-dropdown {
|
||||
div#topmenu-global-search-dropdown, div#topmenu-quickadd-dropdown, div#topmenu-bookmark-dropdown {
|
||||
padding-right: 2px;
|
||||
}
|
||||
div#topmenu-global-search-dropdown a::after, div#topmenu-quickadd-dropdown a::after, div#topmenu-bookmark-dropdown a::after {
|
||||
|
|
@ -221,7 +221,11 @@ div#topmenu-global-search-dropdown a::after, div#topmenu-quickadd-dropdown a::af
|
|||
}
|
||||
|
||||
div#topmenu-global-search-dropdown, div#topmenu-quickadd-dropdown, div#topmenu-bookmark-dropdown, div#topmenu-login-dropdown {
|
||||
line-height: <?php echo(getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 1 ? '35' : '46'); ?>px;
|
||||
<?php if ($disableimages) { ?>
|
||||
line-height: 35px;
|
||||
<?php } else { ?>
|
||||
line-height: 46px;
|
||||
<?php } ?>
|
||||
}
|
||||
a.top-menu-dropdown-link {
|
||||
padding: 8px;
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
|||
if (empty($user->id) && !empty($_SESSION['dol_login'])) {
|
||||
$user->fetch('', $_SESSION['dol_login'], '', 1);
|
||||
$user->getrights();
|
||||
//$user->loadPersonalConf();
|
||||
|
||||
// Reload menu now we have the good user (and we need the good menu to have ->showmenu('topnb') correct.
|
||||
$menumanager = new MenuManager($db, empty($user->socid) ? 0 : 1);
|
||||
|
|
@ -2775,7 +2776,7 @@ $heightmenu = 48; /* height of top menu, part with image */
|
|||
$heightmenu2 = 48; /* height of top menu, ârt with login */
|
||||
$disableimages = 0;
|
||||
$maxwidthloginblock = 110;
|
||||
if (getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 1) {
|
||||
if (getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 1 || !empty($user->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||
$heightmenu = 30;
|
||||
$disableimages = 1;
|
||||
$maxwidthloginblock = 180;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user