function init_components_import(input){
var data = {};
input.component_autocomplete('import',$.extend(data,{
skin : function(item){
var html = '';
var re = new RegExp(input.val(),"gi");
label = item.label.replace(re, function (x) {
return ''+x+'';
});
html += '
'
return html;
},
onClick : function(selected,element){
container = input.data("data-component");
input.val(selected.id);
var label = selected.label;
if(selected.parentLabel) label+=' ('+selected.parentLabel+')';
container.val(label);
input.trigger('click').trigger('change');
},
onLoad : function(component,item){
var label = item.label;
component.container.val(label);
}
}));
}