4 [% L.javascript_tag('jquery', 'jquery-ui') %]
5 <link rel="stylesheet" href="css/ui-lightness/jquery-ui-1.8.12.custom.css" type="text/css" />
8 id: [% L.input_tag('part_id', '') %]
9 nr: [% L.input_tag('part_partnumber', '') %]
10 desc: [% L.input_tag('part_description', '') %]
12 <script type='text/javascript'>
13 function autocomplete_part (selector, column, type) {
14 $(function(){ $(selector).autocomplete({
15 source: function(req, rsp) {
17 url: 'controller.pl?action=Part/ajax_autocomplete',
22 current: function() { $('#part_id').val() },
26 success: function (data){ rsp(data) }
31 select: function(event, ui) {
32 $('#part_id').val(ui.item.id);
33 $('#part_partnumber').val(ui.item.partnumber);
34 $('#part_description').val(ui.item.description);
38 autocomplete_part('#part_partnumber', 'partnumber', ['part', 'assembly']);
39 autocomplete_part('#part_description', 'description', ['part', 'assembly']);