ADD config text color
This commit is contained in:
parent
cceb98a195
commit
28b9ead688
@ -207,6 +207,13 @@ if ($action == 'update') {
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_BTNACTION', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTBTNACTION'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_TEXTBTNACTION', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_TEXTBTNACTION', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode == 'dashboard') {
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2010-2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2021 Anthony Berton <bertonanthony@gmail.com>
|
||||
* Copyright (C) 2021 Anthony Berton <bertonanthony@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -952,6 +952,52 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Text btn action
|
||||
if ($foruserprofile) {
|
||||
/*
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
|
||||
print '<td>'.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TEXTBTNACTION:$langs->trans("Default")).'</td>';
|
||||
print '<td class="nowrap left" width="20%"><input name="check_THEME_ELDY_TEXTBTNACTION" id="check_THEME_ELDY_TEXTBTNACTION" type="checkbox" '.(! empty($object->conf->THEME_ELDY_TEXTBTNACTION)?" 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_ELDY_TEXTBTNACTION,array()),''),'THEME_ELDY_TEXTBTNACTION','',1).' ';
|
||||
}
|
||||
else
|
||||
{
|
||||
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BTNACTION,array()),'');
|
||||
if ($color) print '<input type="text" class="colorthumb" disabled style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
|
||||
else print '';
|
||||
}
|
||||
if ($edit) print '<br>('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
|
||||
print '</td>';*/
|
||||
} else {
|
||||
$default = (empty($textbutaction) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($textbutaction)));
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("TextBtnActionColor").'</td>';
|
||||
print '<td colspan="'.($colspan - 1).'">';
|
||||
if ($edit) {
|
||||
print $formother->selectColor(colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_TEXTBTNACTION) ? $conf->global->THEME_ELDY_TEXTBTNACTION : ''), array()), ''), 'THEME_ELDY_TEXTBTNACTION', '', 1, '', '', 'colortextbtnaction').' ';
|
||||
} else {
|
||||
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTBTNACTION, array()), '');
|
||||
if ($color) {
|
||||
print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
|
||||
} else {
|
||||
//print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$defaultcolor.'" value="'.$langs->trans("Default").'">';
|
||||
//print '<span style="color: #000078">'.$langs->trans("Default").'</span>';
|
||||
print $langs->trans("Default");
|
||||
}
|
||||
}
|
||||
print ' <span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong><span style="color: #000">'.$default.'</span></strong> ';
|
||||
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Use MAIN_OPTIMIZEFORTEXTBROWSER
|
||||
if ($foruserprofile && !empty($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||
//$default=yn($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER);
|
||||
|
||||
@ -1918,6 +1918,7 @@ HighlightLinesOnMouseHover=Highlight table lines when mouse move passes over
|
||||
HighlightLinesColor=Highlight color of the line when the mouse passes over (use 'ffffff' for no highlight)
|
||||
HighlightLinesChecked=Highlight color of the line when it is checked (use 'ffffff' for no highlight)
|
||||
BtnActionColor=Color of the action button
|
||||
TextBtnActionColor=Text color of the action button
|
||||
TextTitleColor=Text color of Page title
|
||||
LinkColor=Color of links
|
||||
PressF5AfterChangingThis=Press CTRL+F5 on keyboard or clear your browser cache after changing this value to have it effective
|
||||
|
||||
@ -11,6 +11,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) {
|
||||
--btncolorborder: #FFF;
|
||||
--butactiondeletebg: rgb(234,228,225);
|
||||
--butactionbg: rgb(<?php print $butactionbg; ?>);
|
||||
--textbutaction: rgb(<?php print $textbutaction; ?>);
|
||||
}
|
||||
|
||||
<?php
|
||||
@ -28,6 +29,7 @@ if (!empty($conf->global->THEME_DARKMODEENABLED)) {
|
||||
--btncolorborder: #2b2c2e;
|
||||
--butactiondeletebg: rgb(252,84,91);
|
||||
--butactionbg: rgb(173,140,79);
|
||||
--textbutaction: rgb(255,255,255);
|
||||
|
||||
}\n";
|
||||
if ($conf->global->THEME_DARKMODEENABLED != 2) {
|
||||
@ -67,7 +69,7 @@ span.butAction, span.butActionDelete {
|
||||
}
|
||||
.butAction {
|
||||
background: var(--butactionbg);
|
||||
color: #FFF !important;
|
||||
color: var(--textbutaction) !important;
|
||||
/* background: rgb(230, 232, 239); */
|
||||
}
|
||||
.butActionRefused, .butAction, .butActionDelete {
|
||||
|
||||
@ -228,7 +228,7 @@ input, select {
|
||||
}
|
||||
#mainbody input.button:not(.buttongen):not(.bordertransp), #mainbody a.button:not(.buttongen):not(.bordertransp) {
|
||||
background: var(--butactionbg);
|
||||
color: #FFF !important;
|
||||
color: var(--textbutaction)!important;
|
||||
border-radius: 3px;
|
||||
border-collapse: collapse;
|
||||
border: none;
|
||||
|
||||
@ -154,6 +154,9 @@ if (!isset($conf->global->THEME_ELDY_TEXTLINK)) {
|
||||
if (!isset($conf->global->THEME_ELDY_BTNACTION)) {
|
||||
$conf->global->THEME_ELDY_BTNACTION = $butactionbg;
|
||||
}
|
||||
if (!isset($conf->global->THEME_ELDY_TEXTBTNACTION)) {
|
||||
$conf->global->THEME_ELDY_TEXTBTNACTION = $textbutaction;
|
||||
}
|
||||
// Case of option editable only if option THEME_ELDY_ENABLE_PERSONALIZED is on
|
||||
if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED)) {
|
||||
$conf->global->THEME_ELDY_BACKTABCARD1 = '255,255,255'; // card
|
||||
@ -181,7 +184,8 @@ $colortexttitle = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (emp
|
||||
$colortexttitlelink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $conf->global->THEME_ELDY_TEXTTITLELINK) : (empty($user->conf->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $user->conf->THEME_ELDY_TEXTTITLELINK);
|
||||
$colortext = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXT) ? $colortext : $conf->global->THEME_ELDY_TEXT) : (empty($user->conf->THEME_ELDY_TEXT) ? $colortext : $user->conf->THEME_ELDY_TEXT);
|
||||
$colortextlink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTLINK) ? $colortextlink : $conf->global->THEME_ELDY_TEXTLINK) : (empty($user->conf->THEME_ELDY_TEXTLINK) ? $colortextlink : $user->conf->THEME_ELDY_TEXTLINK);
|
||||
$butactionbg = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_BTNACTION) ? $butactionbg : $conf->global->THEME_ELDY_BTNACTION) : (empty($user->conf->THEME_ELDY_BTNACTION) ? $butactionbg : $user->conf->THEME_ELDY_BTNACTION);
|
||||
$butactionbg = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_BTNACTION) ? $butactionbg : $conf->global->THEME_ELDY_BTNACTION) : (empty($user->conf->THEME_ELDY_BTNACTION) ? $butactionbg : $user->conf->THEME_ELDY_BTNACTION);
|
||||
$textbutaction = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTBTNACTION) ? $textbutaction : $conf->global->THEME_ELDY_TEXTBTNACTION) : (empty($user->conf->THEME_ELDY_TEXTBTNACTION) ? $textbutaction : $user->conf->THEME_ELDY_TEXTBTNACTION);
|
||||
$fontsize = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_FONT_SIZE1) ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE1) : (empty($user->conf->THEME_ELDY_FONT_SIZE1) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE1);
|
||||
$fontsizesmaller = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_FONT_SIZE2) ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE2) : (empty($user->conf->THEME_ELDY_FONT_SIZE2) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE2);
|
||||
|
||||
|
||||
@ -75,6 +75,7 @@ $topMenuFontSize = '1.1em';
|
||||
$toolTipBgColor = 'rgba(255, 255, 255, 0.96)';
|
||||
$toolTipFontColor = '#333';
|
||||
$butactionbg = '150, 110, 162, 0.95';
|
||||
$textbutaction = '255, 255, 255';
|
||||
|
||||
// text color
|
||||
$textSuccess = '#28a745';
|
||||
|
||||
@ -11,6 +11,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) {
|
||||
--btncolorborder: #FFF;
|
||||
--butactiondeletebg: rgb(234,228,225);
|
||||
--butactionbg: rgb(<?php print $butactionbg; ?>);
|
||||
--textbutaction: rgb(<?php print $textbutaction; ?>);
|
||||
}
|
||||
|
||||
<?php
|
||||
@ -28,6 +29,7 @@ if (!empty($conf->global->THEME_DARKMODEENABLED)) {
|
||||
--btncolorborder: #2b2c2e;
|
||||
--butactiondeletebg: rgb(252,84,91);
|
||||
--butactionbg: rgb(173,140,79);
|
||||
--textbutaction: rgb(255,255,255);
|
||||
|
||||
}\n";
|
||||
if ($conf->global->THEME_DARKMODEENABLED != 2) {
|
||||
@ -62,7 +64,7 @@ span.butAction, span.butActionDelete {
|
||||
|
||||
.butAction {
|
||||
background: var(--butactionbg);
|
||||
color: #FFF !important;
|
||||
color: var(--textbutaction) !important;
|
||||
/* background: rgb(230, 232, 239); */
|
||||
}
|
||||
.butActionRefused, .butAction, .butActionDelete {
|
||||
|
||||
@ -152,6 +152,9 @@ if (!isset($conf->global->THEME_ELDY_TEXTLINK)) {
|
||||
if (!isset($conf->global->THEME_ELDY_BTNACTION)) {
|
||||
$conf->global->THEME_ELDY_BTNACTION = $butactionbg;
|
||||
}
|
||||
if (!isset($conf->global->THEME_ELDY_TEXTBTNACTION)) {
|
||||
$conf->global->THEME_ELDY_TEXTBTNACTION = $textbutaction;
|
||||
}
|
||||
|
||||
// Case of option editable only if option THEME_ELDY_ENABLE_PERSONALIZED is on
|
||||
if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED)) {
|
||||
@ -182,6 +185,7 @@ $colortexttitlelink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (emp
|
||||
$colortext = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXT) ? $colortext : $conf->global->THEME_ELDY_TEXT) : (empty($user->conf->THEME_ELDY_TEXT) ? $colortext : $user->conf->THEME_ELDY_TEXT);
|
||||
$colortextlink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTLINK) ? $colortext : $conf->global->THEME_ELDY_TEXTLINK) : (empty($user->conf->THEME_ELDY_TEXTLINK) ? $colortextlink : $user->conf->THEME_ELDY_TEXTLINK);
|
||||
$butactionbg = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_BTNACTION) ? $butactionbg : $conf->global->THEME_ELDY_BTNACTION) : (empty($user->conf->THEME_ELDY_BTNACTION) ? $butactionbg : $user->conf->THEME_ELDY_BTNACTION);
|
||||
$textbutaction = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTBTNACTION) ? $textbutaction : $conf->global->THEME_ELDY_TEXTBTNACTION) : (empty($user->conf->THEME_ELDY_TEXTBTNACTION) ? $textbutaction : $user->conf->THEME_ELDY_TEXTBTNACTION);
|
||||
$fontsize = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_FONT_SIZE1) ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE1) : (empty($user->conf->THEME_ELDY_FONT_SIZE1) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE1);
|
||||
$fontsizesmaller = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_FONT_SIZE2) ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE2) : (empty($user->conf->THEME_ELDY_FONT_SIZE2) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE2);
|
||||
|
||||
@ -344,6 +348,7 @@ print '*/'."\n";
|
||||
--productlinestocktoolow: #884400;
|
||||
--infoboxmoduleenabledbgcolor : linear-gradient(0.4turn, #fff, #fff, #fff, #e4efe8);
|
||||
--butactionbg : #<?php print $butactionbg; ?>;
|
||||
--textbutaction : #<?php print $textbutaction; ?>;
|
||||
}
|
||||
|
||||
body {
|
||||
@ -445,8 +450,8 @@ input, select {
|
||||
margin-top:1px;
|
||||
}
|
||||
#mainbody input.button:not(.buttongen):not(.bordertransp), #mainbody a.button:not(.buttongen):not(.bordertransp) {
|
||||
background: var(--butactionbg);;
|
||||
color: #FFF !important;
|
||||
background: var(--butactionbg);
|
||||
color: var(--textbutaction)!important;
|
||||
border-radius: 3px;
|
||||
border-collapse: collapse;
|
||||
border: none;
|
||||
|
||||
@ -70,6 +70,7 @@ $topMenuFontSize = '1.1em';
|
||||
$toolTipBgColor = 'rgba(255, 255, 255, 0.96)';
|
||||
$toolTipFontColor = '#333';
|
||||
$butactionbg = '150, 110, 162, 0.95';
|
||||
$textbutaction = '255, 255, 255, 255';
|
||||
|
||||
// text color
|
||||
$textSuccess = '#28a745';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user