mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
Fix select2 search
This commit is contained in:
@@ -5520,12 +5520,13 @@ class Form
|
||||
'.($callurlonselect ? '
|
||||
/* Code to execute a GET when we select a value */
|
||||
$(".'.$htmlname.'").change(function() {
|
||||
var selected = $(".'.$htmlname.'").select2("val");
|
||||
$(".'.$htmlname.'").select2("val",""); /* reset visible combo value */
|
||||
var selected = $(".'.$htmlname.'").val();
|
||||
console.log("We select "+selected)
|
||||
$(".'.$htmlname.'").val(""); /* reset visible combo value */
|
||||
$.each( saveRemoteData, function( key, value ) {
|
||||
if (key == selected)
|
||||
{
|
||||
console.log("Do a redirect into selectArrayAjax to "+value.url)
|
||||
console.log("selectArrayAjax - Do a redirect to "+value.url)
|
||||
location.assign(value.url);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -160,8 +160,8 @@ var select2arrayoflanguage = {
|
||||
noResults: function () { return "<?php echo dol_escape_js($langs->transnoentitiesnoconv("Select2NotFound")); ?>"; },
|
||||
inputTooShort: function (input) {
|
||||
var n = input.minimum;
|
||||
console.log(input);
|
||||
console.log(input.minimum);
|
||||
/*console.log(input);
|
||||
console.log(input.minimum);*/
|
||||
if (n > 1) return "<?php echo dol_escape_js($langs->transnoentitiesnoconv("Select2Enter")); ?> " + n + " <?php echo dol_escape_js($langs->transnoentitiesnoconv("Select2MoreCharacters")); ?>";
|
||||
else return "<?php echo dol_escape_js($langs->transnoentitiesnoconv("Select2Enter")); ?> " + n + " <?php echo dol_escape_js($langs->transnoentitiesnoconv("Select2MoreCharacter")); ?>"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user