Преглед на файлове

Bug fix - object creation

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@145 a333f486-631f-4898-b8df-5754b55c2be0
romainq преди 15 години
родител
ревизия
67c2445c66
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      application/cmdbabstract.class.inc.php

+ 1 - 0
application/cmdbabstract.class.inc.php

@@ -661,6 +661,7 @@ abstract class cmdbAbstractObject extends CMDBObject
 							// another hidden input to store & pass the object's Id
 							// another hidden input to store & pass the object's Id
 							$sHTMLValue .= "<input type=\"hidden\" id=\"$iInputId\" name=\"attr_{$sAttCode}{$sNameSuffix}\" value=\"$value\" />\n";
 							$sHTMLValue .= "<input type=\"hidden\" id=\"$iInputId\" name=\"attr_{$sAttCode}{$sNameSuffix}\" value=\"$value\" />\n";
 							$oPage->add_ready_script("\$('#label_$iInputId').autocomplete('./ajax.render.php', { minChars:3, onItemSelect:selectItem, onFindValue:findValue, formatItem:formatItem, autoFill:true, keyHolder:'#$iInputId', extraParams:{operation:'autocomplete', sclass:'$sClass',attCode:'".$sAttCode."'}});");
 							$oPage->add_ready_script("\$('#label_$iInputId').autocomplete('./ajax.render.php', { minChars:3, onItemSelect:selectItem, onFindValue:findValue, formatItem:formatItem, autoFill:true, keyHolder:'#$iInputId', extraParams:{operation:'autocomplete', sclass:'$sClass',attCode:'".$sAttCode."'}});");
+							$oPage->add_ready_script("\$('#label_$iInputId').result( function(event, data, formatted) { if (data) { $('#{$iInputId}').val(data[1]); } } );");
 						}
 						}
 						else
 						else
 						{
 						{