2
0
forked from Wavyzz/dolibarr

Fix js warning

This commit is contained in:
Laurent Destailleur (aka Eldy)
2025-01-16 15:35:17 +01:00
parent a233abdcc5
commit 84d982cdfb
2 changed files with 4 additions and 4 deletions

View File

@@ -9091,7 +9091,7 @@ class Form
}, },
cache: true cache: true
}, },
language: select2arrayoflanguage || \'en\', language: (typeof select2arrayoflanguage === \'undefined\') ? \'en\' : select2arrayoflanguage,
containerCssClass: \':all:\', /* Line to add class from the original SELECT propagated to the new <span class="select2-selection...> tag */ containerCssClass: \':all:\', /* Line to add class from the original SELECT propagated to the new <span class="select2-selection...> tag */
placeholder: \'' . dol_escape_js($placeholder) . '\', placeholder: \'' . dol_escape_js($placeholder) . '\',
escapeMarkup: function (markup) { return markup; }, // let our custom formatter work escapeMarkup: function (markup) { return markup; }, // let our custom formatter work
@@ -9181,7 +9181,7 @@ class Form
$(\'.' . dol_escape_js($htmlname) . '\').select2({ $(\'.' . dol_escape_js($htmlname) . '\').select2({
data: data, data: data,
language: select2arrayoflanguage || \'en\', language: (typeof select2arrayoflanguage === \'undefined\') ? \'en\' : select2arrayoflanguage,
containerCssClass: \':all:\', /* Line to add class from the original SELECT propagated to the new <span class="select2-selection...> tag */ containerCssClass: \':all:\', /* Line to add class from the original SELECT propagated to the new <span class="select2-selection...> tag */
placeholder: \'' . dol_escape_js($placeholder) . '\', placeholder: \'' . dol_escape_js($placeholder) . '\',
escapeMarkup: function (markup) { return markup; }, // let our custom formatter work escapeMarkup: function (markup) { return markup; }, // let our custom formatter work
@@ -9375,7 +9375,7 @@ class Form
// Specify format function for selected item // Specify format function for selected item
formatSelection: formatSelection, formatSelection: formatSelection,
templateSelection: formatSelection, /* For 4.0 */ templateSelection: formatSelection, /* For 4.0 */
language: select2arrayoflanguage || \'en\' language: (typeof select2arrayoflanguage === \'undefined\') ? \'en\' : select2arrayoflanguage
}); });
/* Add also morecss to the css .select2 that is after the #htmlname, for component that are show dynamically after load, because select2 set /* Add also morecss to the css .select2 that is after the #htmlname, for component that are show dynamically after load, because select2 set

View File

@@ -1375,7 +1375,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
placeholder: "' . $langs->trans('Name of the new third party. In the meantime we check if it already exists...') . '", placeholder: "' . $langs->trans('Name of the new third party. In the meantime we check if it already exists...') . '",
allowClear: true, allowClear: true,
minimumInputLength: 3, minimumInputLength: 3,
language: select2arrayoflanguage, language: (typeof select2arrayoflanguage === \'undefined\') ? \'en\' : select2arrayoflanguage,
containerCssClass: ":all:", containerCssClass: ":all:",
selectionCssClass: ":all:", selectionCssClass: ":all:",
tags: true, tags: true,