#13517 autocomplete param size
This commit is contained in:
parent
a544cb0609
commit
7763e8fa39
|
@ -2318,7 +2318,9 @@ if (is_metaconsole() === true) {
|
||||||
$params['add_none_module'] = true;
|
$params['add_none_module'] = true;
|
||||||
$params['use_hidden_input_idagent'] = true;
|
$params['use_hidden_input_idagent'] = true;
|
||||||
$params['hidden_input_idagent_id'] = 'hidden-id_agent';
|
$params['hidden_input_idagent_id'] = 'hidden-id_agent';
|
||||||
|
$params['size'] = 40;
|
||||||
if ($meta) {
|
if ($meta) {
|
||||||
|
$params['size'] = 44;
|
||||||
$params['use_input_id_server'] = true;
|
$params['use_input_id_server'] = true;
|
||||||
$params['input_id_server_id'] = 'hidden-server_id';
|
$params['input_id_server_id'] = 'hidden-server_id';
|
||||||
$params['metaconsole_enabled'] = true;
|
$params['metaconsole_enabled'] = true;
|
||||||
|
|
|
@ -5867,7 +5867,7 @@ function ui_print_agent_autocomplete_input($parameters)
|
||||||
$hidden_input_idagent_value = $parameters['hidden_input_idagent_value'];
|
$hidden_input_idagent_value = $parameters['hidden_input_idagent_value'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$size = 30;
|
$size = 100;
|
||||||
// Default value.
|
// Default value.
|
||||||
if (isset($parameters['size'])) {
|
if (isset($parameters['size'])) {
|
||||||
$size = $parameters['size'];
|
$size = $parameters['size'];
|
||||||
|
@ -6293,14 +6293,14 @@ function ui_print_agent_autocomplete_input($parameters)
|
||||||
$javascript_function_change .= '
|
$javascript_function_change .= '
|
||||||
function setInputBackground(inputId, image) {
|
function setInputBackground(inputId, image) {
|
||||||
$("#"+inputId)
|
$("#"+inputId)
|
||||||
.attr("style", "background-image: url(\'"+image+"\'); background-repeat: no-repeat; background-position: 97% center; background-size: 20px; width:100%; '.$inputStyles.'");
|
.attr("style", "background-image: url(\'"+image+"\'); background-repeat: no-repeat; background-position: 97% center; background-size: 20px; width:'.$size.'%; '.$inputStyles.'");
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$("#'.$input_id.'").focusout(function (e) {
|
$("#'.$input_id.'").focusout(function (e) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
let iconImage = "'.$icon_image.'";
|
let iconImage = "'.$icon_image.'";
|
||||||
$("#'.$input_id.'").attr("style", "background-image: url(\'"+iconImage+"\'); background-repeat: no-repeat; background-position: 97% center; background-size: 20px; width:100%; '.$inputStyles.'");
|
$("#'.$input_id.'").attr("style", "background-image: url(\'"+iconImage+"\'); background-repeat: no-repeat; background-position: 97% center; background-size: 20px; width:'.$size.'%; '.$inputStyles.'");
|
||||||
}, 100);
|
}, 100);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -6574,7 +6574,7 @@ function ui_print_agent_autocomplete_input($parameters)
|
||||||
if (select_item_click) {
|
if (select_item_click) {
|
||||||
select_item_click = 0;
|
select_item_click = 0;
|
||||||
$("#'.$input_id.'")
|
$("#'.$input_id.'")
|
||||||
.attr("style", "background-image: url(\"'.$spinner_image.'\"); background-repeat: no-repeat; background-position: 97% center; background-size: 20px; width:100%; '.$inputStyles.'");
|
.attr("style", "background-image: url(\"'.$spinner_image.'\"); background-repeat: no-repeat; background-position: 97% center; background-size: 20px; width:'.$size.'%; '.$inputStyles.'");
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
// Clear selectbox if item is not selected.
|
// Clear selectbox if item is not selected.
|
||||||
|
@ -6589,7 +6589,7 @@ function ui_print_agent_autocomplete_input($parameters)
|
||||||
|
|
||||||
//Set loading
|
//Set loading
|
||||||
$("#'.$input_id.'")
|
$("#'.$input_id.'")
|
||||||
.attr("style", "background-image: url(\"'.$spinner_image.'\"); background-repeat: no-repeat; background-position: 97% center; background-size: 20px; width:100%; '.$inputStyles.'");
|
.attr("style", "background-image: url(\"'.$spinner_image.'\"); background-repeat: no-repeat; background-position: 97% center; background-size: 20px; width:'.$size.'%; '.$inputStyles.'");
|
||||||
var term = input_value; //Word to search
|
var term = input_value; //Word to search
|
||||||
|
|
||||||
'.$javascript_change_ajax_params_text.'
|
'.$javascript_change_ajax_params_text.'
|
||||||
|
@ -6606,7 +6606,7 @@ function ui_print_agent_autocomplete_input($parameters)
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data.length < 2) {
|
if (data.length < 2) {
|
||||||
//Set icon
|
//Set icon
|
||||||
$("#'.$input_id.'").attr("style", "background-image: url(\"'.$spinner_image.'\"); background-repeat: no-repeat; background-position: 97% center; background-size: 20px; width:100%; '.$inputStyles.'");
|
$("#'.$input_id.'").attr("style", "background-image: url(\"'.$spinner_image.'\"); background-repeat: no-repeat; background-position: 97% center; background-size: 20px; width:'.$size.'%; '.$inputStyles.'");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6656,7 +6656,7 @@ function ui_print_agent_autocomplete_input($parameters)
|
||||||
|
|
||||||
//Set icon
|
//Set icon
|
||||||
$("#'.$input_id.'")
|
$("#'.$input_id.'")
|
||||||
.attr("style", "background: url(\"'.$icon_image.'\") 97% center no-repeat; background-size: 20px; width:100%; '.$inputStyles.'")
|
.attr("style", "background: url(\"'.$icon_image.'\") 97% center no-repeat; background-size: 20px; width:'.$size.'%; '.$inputStyles.'")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -6675,7 +6675,7 @@ function ui_print_agent_autocomplete_input($parameters)
|
||||||
}
|
}
|
||||||
|
|
||||||
$attrs = [];
|
$attrs = [];
|
||||||
$attrs['style'] = 'background-image: url('.$icon_image.'); background-repeat: no-repeat; background-position: 97% center; background-size: 20px; width:100%; '.$text_color.' '.$inputStyles.'';
|
$attrs['style'] = 'background-image: url('.$icon_image.'); background-repeat: no-repeat; background-position: 97% center; background-size: 20px; width:'.$size.'%; '.$text_color.' '.$inputStyles.'';
|
||||||
|
|
||||||
if (!$disabled_javascript_on_blur_function) {
|
if (!$disabled_javascript_on_blur_function) {
|
||||||
$attrs['onblur'] = $javascript_on_blur_function_name.'()';
|
$attrs['onblur'] = $javascript_on_blur_function_name.'()';
|
||||||
|
|
Loading…
Reference in New Issue