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:
Alejandro Gallardo Escobar 2014-09-10 17:49:17 +02:00
parent 6412dc7e17
commit 0e768e003f
2 changed files with 7 additions and 1 deletions

View File

@ -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,

View File

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