diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 0d6ac348413..8a065190373 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -131,11 +131,13 @@ if ($action == 'update') if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTLINK', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_TEXTLINK', $val, 'chaine', 0, '', $conf->entity); - if (GETPOST('THEME_ELDY_USE_HOVER') == '') dolibarr_set_const($db, "THEME_ELDY_USE_HOVER", '0', 'chaine', 0, '', $conf->entity); // If empty, we set to '0' ('000000' is for black) - else dolibarr_set_const($db, "THEME_ELDY_USE_HOVER", $_POST["THEME_ELDY_USE_HOVER"], 'chaine', 0, '', $conf->entity); + $val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_USE_HOVER'), array())))); + if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_USE_HOVER', $conf->entity); + else dolibarr_set_const($db, "THEME_ELDY_USE_HOVER", $val, 'chaine', 0, '', $conf->entity); - if (GETPOST('THEME_ELDY_USE_CHECKED') == '') dolibarr_set_const($db, "THEME_ELDY_USE_CHECKED", '0', 'chaine', 0, '', $conf->entity); - else dolibarr_set_const($db, "THEME_ELDY_USE_CHECKED", $_POST["THEME_ELDY_USE_CHECKED"], 'chaine', 0, '', $conf->entity); + $val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_USE_CHECKED'), array())))); + if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_USE_CHECKED', $conf->entity); + else dolibarr_set_const($db, "THEME_ELDY_USE_CHECKED", $val, 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"], 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", $_POST["main_size_shortliste_limit"], 'chaine', 0, '', $conf->entity); @@ -239,14 +241,14 @@ if ($action == 'edit') // Edit print ''; // Default language - print ''.$langs->trans("DefaultLanguage").''; + print ''.$langs->trans("DefaultLanguage").''; print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'MAIN_LANG_DEFAULT', 1, 0, 0, 0, 0, 'minwidth300', 2); print ''; print ' '; print ''; // Multilingual GUI - print ''.$langs->trans("EnableMultilangInterface").''; + print ''.$langs->trans("EnableMultilangInterface").''; print $form->selectyesno('MAIN_MULTILANGS', $conf->global->MAIN_MULTILANGS, 1); print ''; print ' '; @@ -265,19 +267,19 @@ if ($action == 'edit') // Edit print ''; // Disable javascript and ajax - print ''.$langs->trans("DisableJavascript").''; + print ''.$langs->trans("DisableJavascript").''; print $form->selectyesno('MAIN_DISABLE_JAVASCRIPT', isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0, 1); print ''; print ' '; print ''; // Max size of lists - print ''.$langs->trans("DefaultMaxSizeList").''; + print ''.$langs->trans("DefaultMaxSizeList").''; print ' '; print ''; // Max size of short lists on customer card - print ''.$langs->trans("DefaultMaxSizeShortList").''; + print ''.$langs->trans("DefaultMaxSizeShortList").''; print ' '; print ''; @@ -291,28 +293,28 @@ if ($action == 'edit') // Edit */ // First day for weeks - print ''.$langs->trans("WeekStartOnDay").''; + print ''.$langs->trans("WeekStartOnDay").''; print $formother->select_dayofweek((isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:'1'), 'MAIN_START_WEEK', 0); print ''; print ' '; print ''; // DefaultWorkingDays - print ''.$langs->trans("DefaultWorkingDays").''; + print ''.$langs->trans("DefaultWorkingDays").''; print ''; print ''; print ' '; print ''; // DefaultWorkingHours - print ''.$langs->trans("DefaultWorkingHours").''; + print ''.$langs->trans("DefaultWorkingHours").''; print ''; print ''; print ' '; print ''; // Firstname/Name - print ''.$langs->trans("FirstnameNamePosition").''; + print ''.$langs->trans("FirstnameNamePosition").''; $array=array(0=>$langs->trans("Firstname").' '.$langs->trans("Lastname"), 1=>$langs->trans("Lastname").' '.$langs->trans("Firstname")); print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION', $array, (isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?$conf->global->MAIN_FIRSTNAME_NAME_POSITION:0)); print ''; @@ -320,14 +322,14 @@ if ($action == 'edit') // Edit print ''; // Hide unauthorized button - print ''.$langs->trans("ButtonHideUnauthorized").''; + print ''.$langs->trans("ButtonHideUnauthorized").''; print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0, 1); print ''; print ' '; print ''; // Show logo - print ''.$langs->trans("EnableShowLogo").''; + print ''.$langs->trans("EnableShowLogo").''; print $form->selectyesno('MAIN_SHOW_LOGO', $conf->global->MAIN_SHOW_LOGO, 1); print ''; print ' '; @@ -344,7 +346,7 @@ if ($action == 'edit') // Edit */ // Show bugtrack link - print ''.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).''; + print ''.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).''; print $form->selectyesno('MAIN_BUGTRACK_ENABLELINK', $conf->global->MAIN_BUGTRACK_ENABLELINK, 1); print ''; print ' '; @@ -352,7 +354,7 @@ if ($action == 'edit') // Edit // Hide wiki link on login page $pictohelp=''; - print ''.$langs->trans("DisableLinkToHelp", $pictohelp).''; + print ''.$langs->trans("DisableLinkToHelp", $pictohelp).''; print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0, 1); print ''; print ' '; @@ -362,7 +364,7 @@ if ($action == 'edit') // Edit $substitutionarray=getCommonSubstitutionArray($langs, 0, array('object','objectamount')); complete_substitutions_array($substitutionarray, $langs); - print ''; + print ''; $texthelp=$langs->trans("FollowingConstantsWillBeSubstituted").'
'; foreach($substitutionarray as $key => $val) { @@ -390,7 +392,7 @@ if ($action == 'edit') // Edit // Message on login page $substitutionarray=getCommonSubstitutionArray($langs, 0, array('object','objectamount','user')); complete_substitutions_array($substitutionarray, $langs); - print ''; + print ''; $texthelp=$langs->trans("FollowingConstantsWillBeSubstituted").'
'; foreach($substitutionarray as $key => $val) { @@ -403,14 +405,14 @@ if ($action == 'edit') // Edit print ''."\n"; // Hide helpcenter link on login page - print ''.$langs->trans("DisableLinkToHelpCenter").''; + print ''.$langs->trans("DisableLinkToHelpCenter").''; print $form->selectyesno('MAIN_HELPCENTER_DISABLELINK', isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0, 1); print ''; print ' '; print ''; // Background - print ''; + print ''; print '
'; print ''; if (! empty($conf->global->MAIN_LOGIN_BACKGROUND)) { diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 532ff5dfb3d..4ce610aaf90 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -842,7 +842,7 @@ function show_theme($fuser, $edit = 0, $foruserprofile = false) if ($color != 'e6edf0') print ''; else print $langs->trans("Default"); } - else print $langs->trans("None"); + else print $langs->trans("Default"); } print '   ('.$langs->trans("Default").': e6edf0) '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); @@ -886,7 +886,7 @@ function show_theme($fuser, $edit = 0, $foruserprofile = false) if ($color != 'e6edf0') print ''; else print $langs->trans("Default"); } - else print $langs->trans("None"); + else print $langs->trans("Default"); } print '   ('.$langs->trans("Default").': e6edf0) '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index acfd6c5c4d3..58c26f330e6 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -62,7 +62,7 @@ if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf- -> + global->MAIN_VIEW_LINE_NUMBER)) { ?> diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index e82a9a2dda7..0cbbeb6d240 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -2209,7 +2209,51 @@ else if ($action == 'editline' && $line->rowid == GETPOST('rowid', 'int')) { - print ''; + + // Add line with link to add new file or attach to an existing file + $colspan = 12; + if (! empty($conf->projet->enabled)) $colspan++; + if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) $colspan++; + + print ''; + print ''; + print ''.$langs->trans("UploadANewFileNow"); + print img_picto($langs->trans("UploadANewFileNow"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly'); + print ''; + if ($conf->global->MAIN_FEATURES_LEVEL >= 2) + { + print '   -   '.''.$langs->trans("AttachTheNewLineToTheDocument"); + print img_picto($langs->trans("AttachTheNewLineToTheDocument"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly'); + print ''; + } + + print ''."\n"; + print ''; + + $tredited='tredited'; + include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_addfile.tpl.php'; + include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_linktofile.tpl.php'; + + print ''; print ''; @@ -2264,11 +2308,8 @@ else print ''; print ''; - if ($action != 'editline') - { - print ''.$langs->trans('AmountHT').''; - print ''.$langs->trans('AmountTTC').''; - } + //print ''.$langs->trans('AmountHT').''; + //print ''.$langs->trans('AmountTTC').''; // Picture print ''; @@ -2280,6 +2321,8 @@ else print ''; print '
'; print ''; + + print ''; } $i++; @@ -2342,157 +2385,8 @@ else print ''."\n"; print ''; - // Add line to upload new file - print 'global->MAIN_OPTIMIZEFORTEXTBROWSER)?' style="display: none"':'').'>'; - print ''; - - $modulepart = 'expensereport'; - $permission = $user->rights->expensereport->creer; - - // We define var to enable the feature to add prefix of uploaded files - $savingdocmask=''; - if (empty($conf->global->MAIN_DISABLE_SUGGEST_REF_AS_PREFIX)) - { - //var_dump($modulepart); - if (in_array($modulepart, array('facture_fournisseur','commande_fournisseur','facture','commande','propal','supplier_proposal','ficheinter','contract','expedition','project','project_task','expensereport','tax', 'produit', 'product_batch'))) - { - $savingdocmask=dol_sanitizeFileName($object->ref).'-__file__'; - } - } - - // Show upload form (document and links) - $formfile->form_attach_new_file( - $_SERVER["PHP_SELF"].'?id='.$object->id, - 'none', - 0, - 0, - $permission, - $conf->browser->layout == 'phone' ? 40 : 60, - $object, - '', - 1, - $savingdocmask, - 0, - 'formuserfile', - 'accept', - '', - 1 - ); - - print ''; - - // Add line to select existing file - if ($conf->global->MAIN_FEATURES_LEVEL >= 2) - { - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; - require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; - $upload_dir = $conf->expensereport->dir_output . "/" . dol_sanitizeFileName($object->ref); - $arrayoffiles=dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png|'.preg_quote(dol_sanitizeFileName($object->ref.'.pdf'), '/').')$'); - $nbFiles = count($arrayoffiles); - $nbLinks=Link::count($db, $object->element, $object->id); - - if ($nbFiles > 0) - { - print 'global->MAIN_OPTIMIZEFORTEXTBROWSER)?' style="display: none"':'').'>'; - print ''; - //print ''.$langs->trans("AttachTheNewLineToTheDocument").'
'; - $modulepart='expensereport';$maxheightmini=48; - $relativepath=(! empty($object->ref)?dol_sanitizeFileName($object->ref):'').'/'; - foreach($arrayoffiles as $file) - { - print '
'; - $fileinfo = pathinfo($file['name']); - if (image_format_supported($file['name']) > 0) - { - $minifile=getImageFileNameForSize($file['name'], '_mini'); // For new thumbs using same ext (in lower case however) than original - //print $file['path'].'/'.$minifile.'
'; - $urlforhref=getAdvancedPreviewUrl($modulepart, $fileinfo['relativename'].'.'.strtolower($fileinfo['extension']), 1, '&entity='.(!empty($object->entity)?$object->entity:$conf->entity)); - if (empty($urlforhref)) { - $urlforhref=DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.(!empty($object->entity)?$object->entity:$conf->entity).'&file='.urlencode($fileinfo['relativename'].'.'.strtolower($fileinfo['extension'])); - print ''; - } else { - print ''; - } - print '
'; - print ''; - print '
'; - print '
'; - } - else - { - $modulepart='expensereport'; - print '
'; - $thumbshown=0; - if (preg_match('/\.pdf$/i', $file['name'])) - { - $filepdf = $conf->expensereport->dir_output.'/'.$relativepath.$file['name']; - $fileimage = $conf->expensereport->dir_output.'/'.$relativepath.$file['name'].'_preview.png'; - $relativepathimage = $relativepath.$file['name'].'_preview.png'; - - $pdfexists = file_exists($filepdf); - - if ($pdfexists) - { - // Conversion du PDF en image png si fichier png non existant - if (! file_exists($fileimage) || (filemtime($fileimage) < filemtime($filepdf))) - { - if (empty($conf->global->MAIN_DISABLE_PDF_THUMBS)) // If you experience trouble with pdf thumb generation and imagick, you can disable here. - { - include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - $ret = dol_convert_file($filepdf, 'png', $fileimage, '0'); // Convert first page of PDF into a file _preview.png - if ($ret < 0) $error++; - } - } - } - - if ($pdfexists && ! $error) - { - $heightforphotref=70; - if (! empty($conf->dol_optimize_smallscreen)) $heightforphotref=60; - // If the preview file is found - if (file_exists($fileimage)) - { - $thumbshown=1; - print ''; - } - } - } - - if (! $thumbshown) - { - print img_mime($minifile); - } - print '
'; - } - print '
'; - $checked=''; - //var_dump(GETPOST($file['relativename'])); var_dump($file['relativename']); var_dump($_FILES['userfile']['name']); - foreach($_FILES['userfile']['name'] as $tmpfile) - { - if ($file['relativename'] == (GETPOST('savingdocmask', 'alpha') ? dol_sanitizeFileName($object->ref.'-') : '').$tmpfile) - { - $checked=' checked'; - break; - } - elseif ($file['relativename'] && in_array($file['relativename'], GETPOST('attachfile', 'array'))) { - $checked=' checked'; - break; - } - } - print '
'.$file['relativename'].'
'; - print '
'; - } - print ''; - } - else - { - print 'global->MAIN_OPTIMIZEFORTEXTBROWSER)?' style="display: none"':'').'>'; - print ''; - print ''.$langs->trans("NoFilesUploadedYet").''; - print ''; - } - } + include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_addfile.tpl.php'; + include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_linktofile.tpl.php'; print ''; print ''; @@ -2511,7 +2405,7 @@ else print ''; print ''; - print ''; + print ''; // Line number print ''; diff --git a/htdocs/expensereport/tpl/expensereport_addfile.tpl.php b/htdocs/expensereport/tpl/expensereport_addfile.tpl.php new file mode 100644 index 00000000000..5bca1ba8f81 --- /dev/null +++ b/htdocs/expensereport/tpl/expensereport_addfile.tpl.php @@ -0,0 +1,40 @@ +'."\n"; +print 'global->MAIN_OPTIMIZEFORTEXTBROWSER)?' style="display: none"':'').'>'; +print ''; + +$modulepart = 'expensereport'; +$permission = $user->rights->expensereport->creer; + +// We define var to enable the feature to add prefix of uploaded files +$savingdocmask=''; +if (empty($conf->global->MAIN_DISABLE_SUGGEST_REF_AS_PREFIX)) +{ + //var_dump($modulepart); + if (in_array($modulepart, array('facture_fournisseur','commande_fournisseur','facture','commande','propal','supplier_proposal','ficheinter','contract','expedition','project','project_task','expensereport','tax', 'produit', 'product_batch'))) + { + $savingdocmask=dol_sanitizeFileName($object->ref).'-__file__'; + } +} + +// Show upload form (document and links) +$formfile->form_attach_new_file( + $_SERVER["PHP_SELF"].'?id='.$object->id, + 'none', + 0, + 0, + $permission, + $conf->browser->layout == 'phone' ? 40 : 60, + $object, + '', + 1, + $savingdocmask, + 0, + 'formuserfile', + 'accept', + '', + 1 + ); + +print ''; \ No newline at end of file diff --git a/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php b/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php new file mode 100644 index 00000000000..ccdbc4ecf12 --- /dev/null +++ b/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php @@ -0,0 +1,115 @@ +global->MAIN_FEATURES_LEVEL >= 2) +{ + print ''."\n"; + + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; + $upload_dir = $conf->expensereport->dir_output . "/" . dol_sanitizeFileName($object->ref); + $arrayoffiles=dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png|'.preg_quote(dol_sanitizeFileName($object->ref.'.pdf'), '/').')$'); + $nbFiles = count($arrayoffiles); + $nbLinks=Link::count($db, $object->element, $object->id); + + if ($nbFiles > 0) + { + print 'global->MAIN_OPTIMIZEFORTEXTBROWSER)?' style="display: none"':'').'>'; + print ''; + //print ''.$langs->trans("AttachTheNewLineToTheDocument").'
'; + $modulepart='expensereport';$maxheightmini=48; + $relativepath=(! empty($object->ref)?dol_sanitizeFileName($object->ref):'').'/'; + foreach($arrayoffiles as $file) + { + print '
'; + $fileinfo = pathinfo($file['name']); + if (image_format_supported($file['name']) > 0) + { + $minifile=getImageFileNameForSize($file['name'], '_mini'); // For new thumbs using same ext (in lower case however) than original + //print $file['path'].'/'.$minifile.'
'; + $urlforhref=getAdvancedPreviewUrl($modulepart, $fileinfo['relativename'].'.'.strtolower($fileinfo['extension']), 1, '&entity='.(!empty($object->entity)?$object->entity:$conf->entity)); + if (empty($urlforhref)) { + $urlforhref=DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.(!empty($object->entity)?$object->entity:$conf->entity).'&file='.urlencode($fileinfo['relativename'].'.'.strtolower($fileinfo['extension'])); + print ''; + } else { + print ''; + } + print '
'; + print ''; + print '
'; + print '
'; + } + else + { + $modulepart='expensereport'; + print '
'; + $thumbshown=0; + if (preg_match('/\.pdf$/i', $file['name'])) + { + $filepdf = $conf->expensereport->dir_output.'/'.$relativepath.$file['name']; + $fileimage = $conf->expensereport->dir_output.'/'.$relativepath.$file['name'].'_preview.png'; + $relativepathimage = $relativepath.$file['name'].'_preview.png'; + + $pdfexists = file_exists($filepdf); + + if ($pdfexists) + { + // Conversion du PDF en image png si fichier png non existant + if (! file_exists($fileimage) || (filemtime($fileimage) < filemtime($filepdf))) + { + if (empty($conf->global->MAIN_DISABLE_PDF_THUMBS)) // If you experience trouble with pdf thumb generation and imagick, you can disable here. + { + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + $ret = dol_convert_file($filepdf, 'png', $fileimage, '0'); // Convert first page of PDF into a file _preview.png + if ($ret < 0) $error++; + } + } + } + + if ($pdfexists && ! $error) + { + $heightforphotref=70; + if (! empty($conf->dol_optimize_smallscreen)) $heightforphotref=60; + // If the preview file is found + if (file_exists($fileimage)) + { + $thumbshown=1; + print ''; + } + } + } + + if (! $thumbshown) + { + print img_mime($minifile); + } + print '
'; + } + print '
'; + $checked=''; + //var_dump(GETPOST($file['relativename'])); var_dump($file['relativename']); var_dump($_FILES['userfile']['name']); + foreach($_FILES['userfile']['name'] as $tmpfile) + { + if ($file['relativename'] == (GETPOST('savingdocmask', 'alpha') ? dol_sanitizeFileName($object->ref.'-') : '').$tmpfile) + { + $checked=' checked'; + break; + } + elseif ($file['relativename'] && in_array($file['relativename'], GETPOST('attachfile', 'array'))) { + $checked=' checked'; + break; + } + } + print '
'.$file['relativename'].'
'; + print '
'; + } + print ''; + } + else + { + print 'global->MAIN_OPTIMIZEFORTEXTBROWSER)?' style="display: none"':'').'>'; + print ''; + print ''.$langs->trans("NoFilesUploadedYet").''; + print ''; + } +} diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index 09554e562d0..0f2d1a66f86 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -277,3 +277,6 @@ ALTER TABLE llx_product ADD INDEX idx_product_fk_project (fk_project); ALTER TABLE llx_actioncomm ADD COLUMN calling_duration integer; ALTER TABLE llx_emailcollector_emailcollector ADD COLUMN datelastok datetime; + +DELETE FROM llx_const WHERE name = 'THEME_ELDY_USE_HOVER' AND value = '0'; +DELETE FROM llx_const WHERE name = 'THEME_ELDY_USE_CHECKED' AND value = '0'; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index af5ead68a26..d2042494191 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1711,8 +1711,8 @@ SomethingMakeInstallFromWebNotPossible2=For this reason, process to upgrade desc InstallModuleFromWebHasBeenDisabledByFile=Install of external module from application has been disabled by your administrator. You must ask him to remove the file %s to allow this feature. ConfFileMustContainCustom=Installing or building an external module from application need to save the module files into directory %s. To have this directory processed by Dolibarr, you must setup your conf/conf.php to add the 2 directive lines:
$dolibarr_main_url_root_alt='/custom';
$dolibarr_main_document_root_alt='%s/custom'; HighlightLinesOnMouseHover=Highlight table lines when mouse move passes over -HighlightLinesColor=Highlight color of the line when the mouse passes over (keep empty for no highlight) -HighlightLinesChecked=Highlight color of the line when it is checked (keep empty for no highlight) +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) 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 diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index c917ac1661c..41afdc87d56 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -2849,13 +2849,14 @@ div.pagination li.paginationafterarrows { /* Set the color for hover lines */ .oddeven:hover, .evenodd:hover, .impair:hover, .pair:hover { - background: rgb() !important; /* Must be background to be stronger than background of odd or even */ - +} +.tredited { + background: rgb() !important; /* Must be background to be stronger than background of odd or even */ } .highlight { - background: rgb() !important; /* Must be background to be stronger than background of odd or even */ + background: rgb() !important; /* Must be background to be stronger than background of odd or even */ } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 8087c955592..70479584c5a 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -134,15 +134,14 @@ $fontsize =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty( $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); // Hover color -$colorbacklinepairhover=((! isset($conf->global->THEME_ELDY_USE_HOVER) || (string) $conf->global->THEME_ELDY_USE_HOVER === '0')?'':($conf->global->THEME_ELDY_USE_HOVER === '1'?'e6edf0':$conf->global->THEME_ELDY_USE_HOVER)); -$colorbacklinepairchecked=((! isset($conf->global->THEME_ELDY_USE_CHECKED) || (string) $conf->global->THEME_ELDY_USE_CHECKED === '0')?'':($conf->global->THEME_ELDY_USE_CHECKED === '1'?'e6edf0':$conf->global->THEME_ELDY_USE_CHECKED)); +$colorbacklinepairhover=((! isset($conf->global->THEME_ELDY_USE_HOVER) || (string) $conf->global->THEME_ELDY_USE_HOVER === '255,255,255')?'':($conf->global->THEME_ELDY_USE_HOVER === '1'?'e6edf0':$conf->global->THEME_ELDY_USE_HOVER)); +$colorbacklinepairchecked=((! isset($conf->global->THEME_ELDY_USE_CHECKED) || (string) $conf->global->THEME_ELDY_USE_CHECKED === '255,255,255')?'':($conf->global->THEME_ELDY_USE_CHECKED === '1'?'e6edf0':$conf->global->THEME_ELDY_USE_CHECKED)); if (! empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)) { $colorbacklinepairhover=((! isset($user->conf->THEME_ELDY_USE_HOVER) || $user->conf->THEME_ELDY_USE_HOVER === '0')?'':($user->conf->THEME_ELDY_USE_HOVER === '1'?'e6edf0':$user->conf->THEME_ELDY_USE_HOVER)); $colorbacklinepairchecked=((! isset($user->conf->THEME_ELDY_USE_CHECKED) || $user->conf->THEME_ELDY_USE_CHECKED === '0')?'':($user->conf->THEME_ELDY_USE_CHECKED === '1'?'e6edf0':$user->conf->THEME_ELDY_USE_CHECKED)); } -//$colortopbordertitle1=$colorbackhmenu1; // Set text color to black or white $colorbackhmenu1=join(',', colorStringToArray($colorbackhmenu1)); // Normalize value to 'x,y,z' diff --git a/htdocs/theme/eldy/theme_vars.inc.php b/htdocs/theme/eldy/theme_vars.inc.php index 69ced3490ae..e4718a25212 100644 --- a/htdocs/theme/eldy/theme_vars.inc.php +++ b/htdocs/theme/eldy/theme_vars.inc.php @@ -48,6 +48,7 @@ $colorbacklineimpair2='255,255,255'; // line impair $colorbacklinepair1='250,250,250'; // line pair $colorbacklinepair2='250,250,250'; // line pair $colorbacklinepairhover='230,237,244'; // line hover +$colorbacklinepairchecked='230,237,244'; // line checked $colorbacklinebreak='223,218,220'; // line break $colorbackbody='255,255,255'; $colortexttitlenotab='100,60,20'; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index cc2043de141..dde278f86a3 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -99,7 +99,7 @@ if (! isset($conf->global->THEME_ELDY_BACKBODY)) $conf->global->THEME_ELDY_BACKB if (! isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) $conf->global->THEME_ELDY_TOPMENU_BACK1=$colorbackhmenu1; if (! isset($conf->global->THEME_ELDY_VERMENU_BACK1)) $conf->global->THEME_ELDY_VERMENU_BACK1=$colorbackvmenu1; if (! isset($conf->global->THEME_ELDY_BACKTITLE1)) $conf->global->THEME_ELDY_BACKTITLE1=$colorbacktitle1; -if (! isset($conf->global->THEME_ELDY_USE_HOVER)) $conf->global->THEME_ELDY_USE_HOVER==$colorbacklinepairhover; +if (! isset($conf->global->THEME_ELDY_USE_HOVER)) $conf->global->THEME_ELDY_USE_HOVER=$colorbacklinepairhover; if (! isset($conf->global->THEME_ELDY_USE_CHECKED)) $conf->global->THEME_ELDY_USE_CHECKED=$colorbacklinepairchecked; if (! isset($conf->global->THEME_ELDY_LINEBREAK)) $conf->global->THEME_ELDY_LINEBREAK=$colorbacklinebreak; if (! isset($conf->global->THEME_ELDY_TEXTTITLENOTAB)) $conf->global->THEME_ELDY_TEXTTITLENOTAB=$colortexttitlenotab; @@ -137,17 +137,16 @@ $fontsize =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty( $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); // Hover color -$colorbacklinepairhover=((! isset($conf->global->THEME_ELDY_USE_HOVER) || (string) $conf->global->THEME_ELDY_USE_HOVER === '0')?'':($conf->global->THEME_ELDY_USE_HOVER === '1'?'edf4fb':$conf->global->THEME_ELDY_USE_HOVER)); -$colorbacklinepairchecked=((! isset($conf->global->THEME_ELDY_USE_CHECKED) || (string) $conf->global->THEME_ELDY_USE_CHECKED === '0')?'':($conf->global->THEME_ELDY_USE_CHECKED === '1'?'edf4fb':$conf->global->THEME_ELDY_USE_CHECKED)); +$colorbacklinepairhover=((! isset($conf->global->THEME_ELDY_USE_HOVER) || (string) $conf->global->THEME_ELDY_USE_HOVER === '255,255,255')?'':($conf->global->THEME_ELDY_USE_HOVER === '1'?'edf4fb':$conf->global->THEME_ELDY_USE_HOVER)); +$colorbacklinepairchecked=((! isset($conf->global->THEME_ELDY_USE_CHECKED) || (string) $conf->global->THEME_ELDY_USE_CHECKED === '255,255,255')?'':($conf->global->THEME_ELDY_USE_CHECKED === '1'?'edf4fb':$conf->global->THEME_ELDY_USE_CHECKED)); if (! empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)) { - $colorbacklinepairhover=((! isset($user->conf->THEME_ELDY_USE_HOVER) || $user->conf->THEME_ELDY_USE_HOVER === '0')?'':($user->conf->THEME_ELDY_USE_HOVER === '1'?'edf4fb':$user->conf->THEME_ELDY_USE_HOVER)); - $colorbacklinepairchecked=((! isset($user->conf->THEME_ELDY_USE_CHECKED) || $user->conf->THEME_ELDY_USE_CHECKED === '0')?'':($user->conf->THEME_ELDY_USE_CHECKED === '1'?'edf4fb':$user->conf->THEME_ELDY_USE_CHECKED)); + $colorbacklinepairhover=((! isset($user->conf->THEME_ELDY_USE_HOVER) || $user->conf->THEME_ELDY_USE_HOVER === '255,255,255')?'':($user->conf->THEME_ELDY_USE_HOVER === '1'?'edf4fb':$user->conf->THEME_ELDY_USE_HOVER)); + $colorbacklinepairchecked=((! isset($user->conf->THEME_ELDY_USE_CHECKED) || $user->conf->THEME_ELDY_USE_CHECKED === '255,255,255')?'':($user->conf->THEME_ELDY_USE_CHECKED === '1'?'edf4fb':$user->conf->THEME_ELDY_USE_CHECKED)); } if (empty($colortopbordertitle1)) $colortopbordertitle1=$colorbackhmenu1; - // Set text color to black or white $colorbackhmenu1=join(',', colorStringToArray($colorbackhmenu1)); // Normalize value to 'x,y,z' $tmppart=explode(',', $colorbackhmenu1); @@ -3010,13 +3009,14 @@ ul.noborder li:nth-child(odd):not(.liste_titre) { box-shadow: unset; -webkit-box-shadow: unset; } + .oddeven:hover, .evenodd:hover, .impair:hover, .pair:hover { - background: rgb() !important; - } - +.tredited { + background: rgb() !important; /* Must be background to be stronger than background of odd or even */ +} .highlight { background: rgb() !important; /* Must be background to be stronger than background of odd or even */ diff --git a/htdocs/theme/md/theme_vars.inc.php b/htdocs/theme/md/theme_vars.inc.php index 47b8d93fdbb..95ac3abdd34 100644 --- a/htdocs/theme/md/theme_vars.inc.php +++ b/htdocs/theme/md/theme_vars.inc.php @@ -44,7 +44,8 @@ $colorbacklineimpair1='255,255,255'; // line impair $colorbacklineimpair2='255,255,255'; // line impair $colorbacklinepair1='248,248,248'; // line pair $colorbacklinepair2='246,246,246'; // line pair -$colorbacklinepairhover='230,237,244'; // line pair +$colorbacklinepairhover='230,237,244'; // line hover +$colorbacklinepairchecked='230,237,244'; // line checked $colorbacklinebreak='214,218,220'; $colorbackbody='248,248,248'; $colortexttitlenotab='90,90,90';