Look and feel v21

This commit is contained in:
Laurent Destailleur 2024-10-27 14:08:59 +01:00
parent 0b3d696ce2
commit cb0ab53709
9 changed files with 39 additions and 32 deletions

View File

@ -62,6 +62,7 @@ $massaction = GETPOST('massaction', 'alpha');
$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
$mode = GETPOST('mode', 'aZ09');
$optioncss = GETPOST('optioncss', 'alpha');
$contextpage = GETPOST('contextpage', 'aZ09');
$id = $rowid = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('rowid'));
$search_label = GETPOST('search_label', 'alphanohtml'); // Must allow value like 'Abc Def' or '(MyTemplateName)'
@ -1231,8 +1232,7 @@ if ($num) {
print '<a class="reposition editfielda" href="'.$url.'&action=preview&token='.newToken().'">'.img_view().'</a>';
}
if ($iserasable) {
print '<a class="reposition marginleftonly" href="'.$url.'&action=delete&token='.newToken().'">'.img_delete().'</a>';
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionary can be edited by other profile than admin
print '<a class="reposition marginleftonly" href="'.$url.'&action=delete&token='.newToken().$param.'">'.img_delete().'</a>';
}
print '</td>';
}

View File

@ -308,24 +308,24 @@ class CActionComm
if (($onlyautoornot == -1 || $onlyautoornot == -2) && getDolGlobalString('AGENDA_USE_EVENT_TYPE')) {
// Add a group of elements
if ($typecalendar == 'system' || $typecalendar == 'user') {
$label = '&nbsp;&nbsp; '.$label;
//$label = '&nbsp;&nbsp; '.$label;
$TSystem['id'][-99] = $langs->trans("ActionAC_MANUAL");
$TSystem['code']['AC_NON_AUTO'] = '<small>-- '.$langs->trans("ActionAC_MANUAL").'</small>';
$TSystem['code']['AC_NON_AUTO'] = '<span class="smallincombo">-- '.$langs->trans("ActionAC_MANUAL").'</span>';
}
if ($typecalendar == 'systemauto') {
$label = '&nbsp;&nbsp; '.$label;
//$label = '&nbsp;&nbsp; '.$label;
$TSystemAuto['id'][-98] = $langs->trans("ActionAC_AUTO");
$TSystemAuto['code']['AC_ALL_AUTO'] = '<small>-- '.$langs->trans("ActionAC_AUTO").'</small>';
$TSystemAuto['code']['AC_ALL_AUTO'] = '<span class="smallincombo">-- '.$langs->trans("ActionAC_AUTO").'</span>';
}
if ($typecalendar == 'module') {
$module = preg_replace('/^[^@]+@/', '', $obj->module);
$label = '&nbsp;&nbsp; '.$label;
//$label = '&nbsp;&nbsp; '.$label;
if (!isset($TModule['id'][-1 * $idforallfornewmodule])) { // If first time for this module
$idforallfornewmodule--;
}
$TModule['id'][-1 * $idforallfornewmodule] = $langs->trans("ActionAC_ALL_".strtoupper($module));
$TModule['code']['AC_ALL_'.strtoupper($module)] = '<small>-- '.$langs->trans("Module").' '.ucfirst($module).'</small>';
$TModule['code']['AC_ALL_'.strtoupper($module)] = '<span class="smallincombo">-- '.$langs->trans("Module").' '.ucfirst($module).'</span>';
}
}
// Add element

View File

@ -160,7 +160,7 @@ class modWebsite extends DolibarrModules
*/
public function init($options = '')
{
global $conf, $langs;
global $langs;
$error = 0;

View File

@ -630,7 +630,7 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && getDolGlobalInt(
$sensitiveget = false;
if ((GETPOSTISSET('massaction') || GETPOST('action', 'aZ09')) && getDolGlobalInt('MAIN_SECURITY_CSRF_WITH_TOKEN') >= 3) {
// All GET actions (except the listed exceptions that are usually post for pre-actions and not real action) and mass actions are processed as sensitive.
if (GETPOSTISSET('massaction') || !in_array(GETPOST('action', 'aZ09'), array('create', 'createsite', 'createcard', 'edit', 'editcontract', 'editvalidator', 'file_manager', 'presend', 'presend_addmessage', 'preview', 'reconcile', 'specimen'))) { // We exclude some action that are not sensitive so legitimate
if (GETPOSTISSET('massaction') || !in_array(GETPOST('action', 'aZ09'), array('create', 'create2', 'createsite', 'createcard', 'edit', 'editcontract', 'editvalidator', 'file_manager', 'presend', 'presend_addmessage', 'preview', 'reconcile', 'specimen'))) { // We exclude some action that are not sensitive so legitimate
$sensitiveget = true;
}
} elseif (getDolGlobalInt('MAIN_SECURITY_CSRF_WITH_TOKEN') >= 2) {

View File

@ -45,6 +45,7 @@ $ref = GETPOST('ref', 'alpha');
$action = GETPOST('action', 'aZ09');
$cancel = GETPOST('cancel', 'aZ09');
$backtopage = GETPOST('backtopage', 'alpha');
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'moagenda'; // To manage different context of search
if (GETPOST('actioncode', 'array')) {
$actioncode = GETPOST('actioncode', 'array', 3);

View File

@ -915,31 +915,30 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '<tr class="liste_titre">';
// Product
print '<td>';
print $form->select_produits('', 'productidtoadd', '', 0, 0, -1, 2, '', 1, array(), 0, '1', 0, 'maxwidth300');
print $form->select_produits('', 'productidtoadd', '', 0, 0, -1, 2, '', 1, array(), 0, '1', 0, 'maxwidth150');
print '</td>';
// Qty
print '<td class="right"><input type="text" name="qtytoadd" value="1" class="width50 right"></td>';
print '<td class="right"><input type="text" name="qtytoadd" value="1" class="width40 right"></td>';
// Unit
print '<td></td>';
// Cost price
if ($permissiontoupdatecost && getDolGlobalString('MRP_SHOW_COST_FOR_CONSUMPTION')) {
print '<td></td>';
}
$colspan="3";
if (isModEnabled('stock')) {
$colspan++;;
}
if (isModEnabled('productbatch')) {
$colspan++;
}
// Qty already consumed + Warehouse
print '<td colspan="2">';
print '<td colspan="'.$colspan.'">';
print '<input type="submit" class="button buttongen button-add" name="addconsumelinebutton" value="'.$langs->trans("Add").'">';
print '<input type="submit" class="button buttongen button-cancel" name="canceladdconsumelinebutton" value="'.$langs->trans("Cancel").'">';
print '</td>';
if (isModEnabled('stock')) {
print '<td></td>';
}
// Lot - serial
if (isModEnabled('productbatch')) {
print '<td></td>';
}
// Split
print '<td></td>';
// SplitAll
// Split All
print '<td></td>';
// Edit Line
if ($object->status == Mo::STATUS_DRAFT) {

View File

@ -567,7 +567,7 @@ print '<br>';
//print '<br>';
// Form to upload a file
print '<form name="userfile" action="'.$_SERVER["PHP_SELF"].'" enctype="multipart/form-data" METHOD="POST">';
print '<form name="userfile" action="'.$_SERVER["PHP_SELF"].'" enctype="multipart/form-data" method="POST">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="importCSV">';
if (!empty($conf->dol_optimize_smallscreen)) {
@ -660,7 +660,7 @@ print '<input type="hidden" name="action" value="addline">';
print '<div class="div-table-responsive-no-min">';
print '<table class="liste centpercent">';
print '<table class="liste noborder centpercent">';
$param = '';

View File

@ -896,6 +896,10 @@ textarea.centpercent {
.small, small {
font-size: 85%;
}
.smallincombo {
font-size: 95%;
font-weight: bold;
}
.lineheightsmall {
line-height: 1.2em;
}
@ -7273,11 +7277,11 @@ select.multiselectononeline {
@media only screen and (min-width: 768px)
{
/* CSS to have the dropdown boxes larger that the input search area */
.select2-container.select2-container--open:not(.graphtype):not(.yesno) .select2-dropdown.ui-dialog {
.select2-container.select2-container--open:not(.graphtype, .limit, .combolargeelem):not(.yesno) .select2-dropdown.ui-dialog {
min-width: 230px !important;
}
.select2-container.select2-container--open:not(.graphtype):not(.yesno) .select2-dropdown--below:not(.onrightofpage),
.select2-container.select2-container--open:not(.graphtype):not(.yesno) .select2-dropdown--above:not(.onrightofpage) {
.select2-container.select2-container--open:not(.graphtype, .limit, .combolargeelem):not(.yesno) .select2-dropdown--below:not(.onrightofpage),
.select2-container.select2-container--open:not(.graphtype, .limit, .combolargeelem):not(.yesno) .select2-dropdown--above:not(.onrightofpage) {
min-width: 230px !important;
}
.onrightofpage span.select2-dropdown.ui-dialog.select2-dropdown--below,
@ -7285,7 +7289,7 @@ select.multiselectononeline {
min-width: 140px !important;
}
.combolargeelem.select2-container.select2-container--open .select2-dropdown.ui-dialog {
min-width: 300px !important;
min-width: 320px !important;
}
.select2-container--open .select2-dropdown--below {

View File

@ -7147,17 +7147,20 @@ select.multiselectononeline {
@media only screen and (min-width: 767px)
{
/* CSS to have the dropdown boxes larger that the input search area */
.select2-container.select2-container--open:not(.graphtype):not(.yesno) .select2-dropdown.ui-dialog {
.select2-container.select2-container--open:not(.graphtype, .limit, .combolargeelem):not(.yesno) .select2-dropdown.ui-dialog {
min-width: 240px !important;
}
.select2-container.select2-container--open:not(.graphtype):not(.yesno) .select2-dropdown--below:not(.onrightofpage),
.select2-container.select2-container--open:not(.graphtype):not(.yesno) .select2-dropdown--above:not(.onrightofpage) {
.select2-container.select2-container--open:not(.graphtype, .limit, .combolargeelem):not(.yesno) .select2-dropdown--below:not(.onrightofpage),
.select2-container.select2-container--open:not(.graphtype, .limit, .combolargeelem):not(.yesno) .select2-dropdown--above:not(.onrightofpage) {
min-width: 240px !important;
}
.onrightofpage span.select2-dropdown.ui-dialog.select2-dropdown--below,
.onrightofpage span.select2-dropdown.ui-dialog.select2-dropdown--above {
min-width: 140px !important;
}
.combolargeelem.select2-container.select2-container--open .select2-dropdown.ui-dialog {
min-width: 320px !important;
}
.select2-container--open .select2-dropdown--below {
border-top: 1px solid var(--inputbordercolor);