Merge remote-tracking branch 'upstream/develop' into fix/warnings

This commit is contained in:
Frédéric FRANCE 2022-10-13 20:28:00 +02:00
commit c001fd9ba4
7 changed files with 51 additions and 27 deletions

View File

@ -412,15 +412,15 @@ function treeOutputForAbsoluteDir($sqltree, $selecteddir, $fullpathselecteddir,
if (preg_match('/^'.preg_quote($val['fullrelativename'].'/', '/').'/', $preopened)) {
$collapsedorexpanded = 'expanded';
}
print '<li class="directory '.$collapsedorexpanded.'">'; // collapsed is opposite if expanded
print '<li class="directory '.$collapsedorexpanded.' lidirecm">'; // collapsed is opposite if expanded
print "<a class=\"fmdirlia jqft ecmjqft\" href=\"";
print '<div class="divfmdirlia inline-block"><a class="fmdirlia jqft ecmjqft" href="';
print "#";
print "\" rel=\"".dol_escape_htmltag($val['fullrelativename'].'/')."\" id=\"fmdirlia_id_".$val['id']."\"";
print " onClick=\"loadandshowpreview('".dol_escape_js($val['fullrelativename'])."',".$val['id'].")";
print "\">";
print dol_escape_htmltag($file);
print "</a>";
print "</a></div>";
print '<div class="ecmjqft">';

View File

@ -5612,30 +5612,39 @@ 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 '<form method="POST" action="'.$page.'">';
print '<input type="hidden" name="action" value="setmode">';
print '<input type="hidden" name="token" value="'.newToken().'">';
$out .= '<form method="POST" action="'.$page.'">';
$out .= '<input type="hidden" name="action" value="setmode">';
$out .= '<input type="hidden" name="token" value="'.newToken().'">';
if ($type) {
print '<input type="hidden" name="type" value="'.dol_escape_htmltag($type).'">';
$out .= '<input type="hidden" name="type" value="'.dol_escape_htmltag($type).'">';
}
print $this->select_types_paiements($selected, $htmlname, $filtertype, 0, $addempty, 0, 0, $active, '', 1);
print '<input type="submit" class="button smallpaddingimp valignmiddle" value="'.$langs->trans("Modify").'">';
print '</form>';
$out .= $this->select_types_paiements($selected, $htmlname, $filtertype, 0, $addempty, 0, 0, $active, '', 1);
$out .= '<input type="submit" class="button smallpaddingimp valignmiddle" value="'.$langs->trans("Modify").'">';
$out .= '</form>';
} else {
if ($selected) {
$this->load_cache_types_paiements();
print $this->cache_types_paiements[$selected]['label'];
$out .= $this->cache_types_paiements[$selected]['label'];
} else {
print "&nbsp;";
$out .= "&nbsp;";
}
}
if ($nooutput) {
return $out;
} else {
print $out;
}
}
/**

View File

@ -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);

View File

@ -2919,7 +2919,7 @@ if ($action == 'create') {
print '<div class="fichehalfleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">';
print '<table class="border tableforfield centpercent">';
// Type
print '<tr><td class="titlefield">'.$langs->trans('Type').'</td><td>';
@ -3015,7 +3015,7 @@ if ($action == 'create') {
// Default terms of the settlement
$langs->load('bills');
print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print '<table class="nobordernopadding centpercent"><tr><td class="nowrap">';
print $langs->trans('PaymentConditions');
print '<td>';
if ($action != 'editconditions' && $form_permission) {
@ -3044,7 +3044,7 @@ if ($action == 'create') {
// Mode of payment
$langs->load('bills');
print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print '<table class="nobordernopadding centpercent"><tr><td class="nowrap">';
print $langs->trans('PaymentMode');
print '</td>';
if ($action != 'editmode' && $form_permission2) {
@ -3326,12 +3326,13 @@ if ($action == 'create') {
$paymentstatic->type_label = $objp->payment_type;
print '<tr class="oddeven">';
print '<td>';
print '<td class="nowrap">';
print $paymentstatic->getNomUrl(1);
print '</td>';
print '<td>'.dol_print_date($db->jdate($objp->dp), 'day').'</td>';
print '<td>';
print $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 '<td class="tdoverflowmax125" title="'.dol_escape_htmltag($s).'">';
print $s;
print '</td>';
if (isModEnabled("banque")) {
$bankaccountstatic->id = $objp->baid;

View File

@ -403,10 +403,10 @@ print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwit
print '<tr class="liste_titre_filter">';
// Ref
print '<td class="liste_titre left">';
print '<input class="flat" type="text" size="3" name="search_ref" value="'.$db->escape($search_ref).'">';
print '<input class="flat width50" type="text" name="search_ref" value="'.$db->escape($search_ref).'">';
print '</td>';
// Label
print '<td class="liste_titre"><input type="text" class="flat width150" name="search_label" value="'.$db->escape($search_label).'"></td>';
print '<td class="liste_titre"><input type="text" class="flat width100" name="search_label" value="'.$db->escape($search_label).'"></td>';
// Date start
print '<td class="liste_titre center">';
@ -435,13 +435,13 @@ print '</td>';
// Type
print '<td class="liste_titre left">';
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 '</td>';
// Bank account
if (isModEnabled("banque")) {
print '<td class="liste_titre">';
$form->select_comptes($search_account, 'search_account', 0, '', 1);
print $form->select_comptes($search_account, 'search_account', 0, '', 1, '', 0, 'maxwidth125', 1);
print '</td>';
}
@ -546,7 +546,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
}
// Label payment
print "<td>".dol_trunc($obj->label, 40)."</td>\n";
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->label).'">'.dol_escape_htmltag($obj->label)."</td>\n";
if (!$i) {
$totalarray['nbfield']++;
}
@ -564,7 +564,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
}
// Employee
print "<td>".$userstatic->getNomUrl(1)."</td>\n";
print '<td class="tdoverflowmax150">'.$userstatic->getNomUrl(1)."</td>\n";
if (!$i) {
$totalarray['nbfield']++;
}

View File

@ -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;
}
/* ============================================================================== */

View File

@ -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 */