forked from Wavyzz/dolibarr
clean code
This commit is contained in:
@@ -906,8 +906,7 @@ class FormOther
|
||||
</script>';
|
||||
}
|
||||
$out .= '<input id="colorpicker'.$prefix.'" name="'.$prefix.'" size="6" maxlength="7" class="flat'.($morecss ? ' '.$morecss : '').'" type="text" value="'.dol_escape_htmltag($set_color).'" />';
|
||||
} else // In most cases, this is not used. We used instead function with no specific list of colors
|
||||
{
|
||||
} else { // In most cases, this is not used. We used instead function with no specific list of colors
|
||||
if (empty($conf->dol_use_jmobile) && !empty($conf->use_javascript_ajax)) {
|
||||
$out .= '<link rel="stylesheet" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/colorpicker/jquery.colorpicker.css" type="text/css" media="screen" />';
|
||||
$out .= '<script src="'.DOL_URL_ROOT.'/includes/jquery/plugins/colorpicker/jquery.colorpicker.js" type="text/javascript"></script>';
|
||||
|
||||
@@ -562,7 +562,7 @@ function setConstant(url, code, input, entity, strict, forcereload, userid, toke
|
||||
value: value
|
||||
},
|
||||
function() { /* handler for success of post */
|
||||
console.log("url request success forcereload="+forcereload+" value="+value);
|
||||
console.log("Ajax url request to set constant is a success. forcereload="+forcereload+" value="+value);
|
||||
if (value == 0) {
|
||||
$("#set_" + code).show();
|
||||
$("#del_" + code).hide();
|
||||
@@ -642,7 +642,7 @@ function delConstant(url, code, input, entity, strict, forcereload, userid, toke
|
||||
token: token
|
||||
},
|
||||
function() {
|
||||
console.log("url request success forcereload="+forcereload);
|
||||
console.log("Ajax url request to delete constant is success forcereload="+forcereload);
|
||||
$("#del_" + code).hide();
|
||||
$("#set_" + code).show();
|
||||
$.each(input, function(type, data) {
|
||||
|
||||
@@ -407,7 +407,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
||||
} else {
|
||||
$title = $langs->trans("ShowPreview");
|
||||
}
|
||||
print '<img class="img-skinthumb shadow" src="'.$url.'" alt="'.$title.'" title="'.$title.'" style="border: none; margin-bottom: 5px;">';
|
||||
print '<img class="img-skinthumb shadow" src="'.$url.'" alt="'.dol_escape_htmltag($title).'" title="'.dol_escape_htmltag($title).'" style="border: none; margin-bottom: 5px;">';
|
||||
print '</a><br>';
|
||||
if ($subdir == $selected_theme) {
|
||||
print '<input '.($edit ? '' : 'disabled').' type="radio" class="themethumbs" style="border: 0px;" id="main_theme'.$subdir.'" checked name="main_theme" value="'.$subdir.'"><label for="main_theme'.$subdir.'"> <b>'.$subdir.'</b></label>';
|
||||
@@ -440,6 +440,9 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
||||
$colorbacklinepairhover = '';
|
||||
$colorbacklinepairhover = '';
|
||||
$colorbacklinepairchecked = '';
|
||||
$butactionbg = '';
|
||||
$textbutaction = '';
|
||||
// Set the variables with the default value
|
||||
if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php')) {
|
||||
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
}
|
||||
@@ -954,7 +957,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
||||
print '<td>'.$langs->trans("BtnActionColor").'</td>';
|
||||
print '<td colspan="'.($colspan - 1).'">';
|
||||
if ($edit) {
|
||||
print $formother->selectColor(colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_BTNACTION) ? $conf->global->THEME_ELDY_BTNACTION : ''), array()), ''), 'THEME_ELDY_BTNACTION', '', 1, '', '', 'colorbtnaction').' ';
|
||||
print $formother->selectColor(colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_BTNACTION) ? $conf->global->THEME_ELDY_BTNACTION : ''), array()), ''), 'THEME_ELDY_BTNACTION', '', 1, '', '', 'butactionbg').' ';
|
||||
} else {
|
||||
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BTNACTION, array()), '');
|
||||
if ($color) {
|
||||
@@ -1000,7 +1003,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
||||
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').' ';
|
||||
print $formother->selectColor(colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_TEXTBTNACTION) ? $conf->global->THEME_ELDY_TEXTBTNACTION : ''), array()), ''), 'THEME_ELDY_TEXTBTNACTION', '', 1, '', '', 'textbutaction').' ';
|
||||
} else {
|
||||
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTBTNACTION, array()), '');
|
||||
if ($color) {
|
||||
|
||||
Reference in New Issue
Block a user