From 44e774c1e1f8ec4152fed9faf6295ba254d84221 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 13 Oct 2022 17:22:29 +0200 Subject: [PATCH 1/6] css --- htdocs/core/ajax/ajaxdirtree.php | 6 +++--- htdocs/theme/eldy/global.inc.php | 7 +++++++ htdocs/theme/md/style.css.php | 5 +++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index 7daa715bbb9..47de50d0fd8 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -412,15 +412,15 @@ function treeOutputForAbsoluteDir($sqltree, $selecteddir, $fullpathselecteddir, if (preg_match('/^'.preg_quote($val['fullrelativename'].'/', '/').'/', $preopened)) { $collapsedorexpanded = 'expanded'; } - print '
  • '; // collapsed is opposite if expanded + print '
  • '; // collapsed is opposite if expanded - print ""; print dol_escape_htmltag($file); - print ""; + print ""; print '
    '; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index da006de3616..4b1ccc36bc0 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -3318,7 +3318,14 @@ li.expanded > a.fmdirlia.jqft.ecmjqft { font-weight: bold !important; } +.divfmdirlia { + width: calc(100% - 100px); +} +a.fmdirlia { + white-space: break-spaces; + word-break: break-all; +} /* ============================================================================== */ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 874e77985a2..687242d2451 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -3303,6 +3303,11 @@ li.expanded > a.fmdirlia.jqft.ecmjqft { font-weight: bold !important; } +a.fmdirlia { + white-space: break-spaces; + word-break: break-all; +} + /* ============================================================================== */ /* Onglets */ From ae67220d5f81324b89162d26e3845b7b557c68a0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 13 Oct 2022 17:59:13 +0200 Subject: [PATCH 2/6] css --- htdocs/fourn/facture/card.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 54ee8157e13..f00406d63fd 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2919,7 +2919,7 @@ if ($action == 'create') { print '
    '; print '
    '; - print ''; + print '
    '; // Type print '
    '.$langs->trans('Type').''; @@ -3015,7 +3015,7 @@ if ($action == 'create') { // Default terms of the settlement $langs->load('bills'); print '
    '; - print '
    '; + print '
    '; print $langs->trans('PaymentConditions'); print ''; if ($action != 'editconditions' && $form_permission) { @@ -3044,7 +3044,7 @@ if ($action == 'create') { // Mode of payment $langs->load('bills'); print '
    '; - print '
    '; + print ''; if ($action != 'editmode' && $form_permission2) { @@ -3326,12 +3326,13 @@ if ($action == 'create') { $paymentstatic->type_label = $objp->payment_type; print ''; - print ''; print ''; - print ''; if (isModEnabled("banque")) { $bankaccountstatic->id = $objp->baid; From 86af166792cb0c1a23ce82dcdbf1677bbfc451c6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 13 Oct 2022 18:08:42 +0200 Subject: [PATCH 3/6] css --- htdocs/core/class/html.form.class.php | 30 ++++++++++++++++++--------- htdocs/fourn/facture/card.php | 2 +- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 1479717b411..9c3e6794f4b 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5612,30 +5612,40 @@ class Form * @param int $active Active or not, -1 = all * @param int $addempty 1=Add empty entry * @param string $type Type ('direct-debit' or 'bank-transfer') + * @param int $nooutput 1=Return string, no output * @return void */ - public function form_modes_reglement($page, $selected = '', $htmlname = 'mode_reglement_id', $filtertype = '', $active = 1, $addempty = 0, $type = '') + public function form_modes_reglement($page, $selected = '', $htmlname = 'mode_reglement_id', $filtertype = '', $active = 1, $addempty = 0, $type = '', $nooutput = 0) { // phpcs:enable global $langs; + + $out = ''; if ($htmlname != "none") { - print '
    '; - print ''; - print ''; + $out .= ''; + $out .= ''; + $out .= ''; if ($type) { - print ''; + $out .= ''; } - print $this->select_types_paiements($selected, $htmlname, $filtertype, 0, $addempty, 0, 0, $active, '', 1); - print ''; - print ''; + $out .= $this->select_types_paiements($selected, $htmlname, $filtertype, 0, $addempty, 0, 0, $active, '', 1); + $out .= ''; + $out .= ''; } else { if ($selected) { $this->load_cache_types_paiements(); - print $this->cache_types_paiements[$selected]['label']; + $out .= $this->cache_types_paiements[$selected]['label']; } else { - print " "; + $out .= " "; } } + + if ($nooutput) { + return $out; + } else { + print $out; + } + } /** diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index f00406d63fd..7b318930b54 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -3330,7 +3330,7 @@ if ($action == 'create') { print $paymentstatic->getNomUrl(1); print ''; print '
    '; - $s = $form->form_modes_reglement(null, $objp->paiement_type, 'none').' '.$objp->num_payment; + $s = $form->form_modes_reglement(null, $objp->paiement_type, 'none', '', 1, 0, '', 1).' '.$objp->num_payment; print ''; From 00e7df5ae9d6fac16c47a89d7d6b1a2d15bcaa4f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 13 Oct 2022 18:11:04 +0200 Subject: [PATCH 4/6] css --- htdocs/fourn/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 7b318930b54..42b5d34f880 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -3331,7 +3331,7 @@ if ($action == 'create') { print ''; print ''; $s = $form->form_modes_reglement(null, $objp->paiement_type, 'none', '', 1, 0, '', 1).' '.$objp->num_payment; - print ''; if (isModEnabled("banque")) { From 5d5310d2124cddc749a2d0d9d58945df2e736b26 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 13 Oct 2022 18:31:45 +0200 Subject: [PATCH 5/6] css --- htdocs/salaries/list.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/salaries/list.php b/htdocs/salaries/list.php index 639879f8e17..e0efb53915b 100644 --- a/htdocs/salaries/list.php +++ b/htdocs/salaries/list.php @@ -403,10 +403,10 @@ print '
    '; print $langs->trans('PaymentMode'); print '
    '; + print ''; print $paymentstatic->getNomUrl(1); print ''.dol_print_date($db->jdate($objp->dp), 'day').''; - print $form->form_modes_reglement(null, $objp->paiement_type, 'none').' '.$objp->num_payment; + $s = $form->form_modes_reglement(null, $objp->paiement_type, 'none').' '.$objp->num_payment; + print ''; + print $s; print ''.dol_print_date($db->jdate($objp->dp), 'day').''; print $s; print ''.dol_print_date($db->jdate($objp->dp), 'day').''; + print ''; print $s; print '
    '; // Ref print ''; // Label -print ''; +print ''; // Date start print ''; // Type print ''; // Bank account if (isModEnabled("banque")) { print ''; } @@ -546,7 +546,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { } // Label payment - print "\n"; + print '\n"; if (!$i) { $totalarray['nbfield']++; } @@ -564,7 +564,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { } // Employee - print "\n"; + print '\n"; if (!$i) { $totalarray['nbfield']++; } From 89238f05eaf1ee86ac45f8feeafa16ae374fc0be Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 13 Oct 2022 18:32:40 +0200 Subject: [PATCH 6/6] Add log --- htdocs/core/lib/ajax.lib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index b6ec08da434..850ccd34c1c 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -193,6 +193,8 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLen $script .= ' $("#'.$htmlnamejquery.'").val(ui.item.id).trigger("change"); // Select new value + // Complementary actions + // Disable an element if (options.option_disabled) { console.log("Make action option_disabled on #"+options.option_disabled+" with disabled="+ui.item.disabled) @@ -224,7 +226,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLen // Update an input if (ui.item.update) { - console.log("Make action update on each ui.item.update") + console.log("Make action update on each ui.item.update (if there is)") // loop on each "update" fields $.each(ui.item.update, function(key, value) { console.log("Set value "+value+" into #"+key); @@ -232,7 +234,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLen }); } if (ui.item.textarea) { - console.log("Make action textarea on each ui.item.textarea") + console.log("Make action textarea on each ui.item.textarea (if there is)") $.each(ui.item.textarea, function(key, value) { if (typeof CKEDITOR == "object" && typeof CKEDITOR.instances != "undefined" && CKEDITOR.instances[key] != "undefined") { CKEDITOR.instances[key].setData(value);
    '; -print ''; +print ''; print ''; @@ -435,13 +435,13 @@ print ''; -print $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16, 1, '', 1); +print $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16, 1, 'maxwidth125', 1); print ''; - $form->select_comptes($search_account, 'search_account', 0, '', 1); + print $form->select_comptes($search_account, 'search_account', 0, '', 1, '', 0, 'maxwidth125', 1); print '".dol_trunc($obj->label, 40)."'.dol_escape_htmltag($obj->label)."".$userstatic->getNomUrl(1)."'.$userstatic->getNomUrl(1)."