From 9e554db5c226ae4fa6a116c0f6ba86c5e39bf15b Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 10 Jun 2013 11:54:58 +0000 Subject: [PATCH] 2013-06-10 Miguel de Dios * include/functions_ui.php: fixed the reload the widget autocomplete when select a item from the list instead from writing all name. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8282 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/include/functions_ui.php | 22 +++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 14c57dcbe9..603228a881 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2013-06-10 Miguel de Dios + + * include/functions_ui.php: fixed the reload the widget autocomplete + when select a item from the list instead from writing all name. + 2013-06-10 Miguel de Dios * include/functions_html.php, include/functions_reporting.php, diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index aecb36c277..9da7975492 100644 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -2867,6 +2867,7 @@ function ui_print_agent_autocomplete_input($parameters) { ' . $javascript_function_action_into_source_js_call . ' } + //==== CACHE CODE ================================== //Check the cache var found = false; if (term in cache_' . $input_name . ') { @@ -2897,16 +2898,22 @@ function ui_print_agent_autocomplete_input($parameters) { } }); - if (found) + if (found) { break; + } } */ } + //================================================== + if (found) { //Set icon $("#' . $input_id . '") .css("background","url(\"' . $icon_image . '\") right center no-repeat"); + + select_item_click = 0; + return; } @@ -2929,6 +2936,8 @@ function ui_print_agent_autocomplete_input($parameters) { .css("background", "url(\"' . $icon_image . '\") right center no-repeat"); + select_item_click = 0; + return; } }); @@ -2936,6 +2945,8 @@ function ui_print_agent_autocomplete_input($parameters) { return; }, //---END source----------------------------------------- + + select: function( event, ui ) { var agent_name = ui.item.name; var agent_id = ui.item.id; @@ -2988,6 +2999,8 @@ function ui_print_agent_autocomplete_input($parameters) { ' . $javascript_function_action_after_select_js_call . ' } + select_item_click = 1; + return false; } }) @@ -3100,6 +3113,11 @@ function ui_print_agent_autocomplete_input($parameters) { return } + + if (select_item_click) { + return; + } + //Set loading $("#' . $input_id . '") .css("background", @@ -3233,6 +3251,8 @@ function ui_print_agent_autocomplete_input($parameters) { /*