2013-06-10 Miguel de Dios <miguel.dedios@artica.es>

* 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
This commit is contained in:
mdtrooper 2013-06-10 11:54:58 +00:00
parent e4b533f2a0
commit 9e554db5c2
2 changed files with 26 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2013-06-10 Miguel de Dios <miguel.dedios@artica.es>
* 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 <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_reporting.php,

View File

@ -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) {
/* <![CDATA[ */';
}
$html .= 'var select_item_click = 0;' . "\n";
$html .= $javascript_function_change;
if ($javascript_is_function_select) {
$html .= $javascript_code_function_select;