Improved the autocomplete input for modules
* pandora_console/include/ajax/module.php: Improved the module name search. * pandora_consle/include/functons_html.php: Improved the autocomplete input for modules.
This commit is contained in:
parent
6412dc7e17
commit
0e768e003f
|
@ -48,7 +48,7 @@ if ($get_plugin_macros) {
|
|||
|
||||
if ($search_modules) {
|
||||
$id_agents = json_decode(io_safe_output(get_parameter('id_agents')));
|
||||
$filter = get_parameter('q', '') . '%';
|
||||
$filter = '%' . get_parameter('q', '') . '%';
|
||||
$other_filter = json_decode(io_safe_output(get_parameter('other_filter')), true);
|
||||
|
||||
$modules = agents_get_modules($id_agents, false,
|
||||
|
|
|
@ -2007,6 +2007,12 @@ function html_print_autocomplete_modules($name = 'module',
|
|||
}
|
||||
});
|
||||
},
|
||||
change: function( event, ui ) {
|
||||
if (!ui.item)
|
||||
$("input[name='<?php echo $name; ?>_hidden']")
|
||||
.val(0);
|
||||
return false;
|
||||
},
|
||||
select: function( event, ui ) {
|
||||
$("input[name='<?php echo $name; ?>_hidden']")
|
||||
.val(ui.item.value);
|
||||
|
|
Loading…
Reference in New Issue