6 [%# L.dump(SELF.parts) %]
 
   8 [% FOREACH part = SELF.parts %]
 
   9   [% PROCESS part_block %]
 
  12 [%- BLOCK part_block %]
 
  13 <div class='part_picker_part'>
 
  14   <input type='hidden' class='part_picker_id' value='[% part.id %]'>
 
  15   <input type='hidden' class='part_picker_partnumber' value='[% part.partnumber %]'>
 
  16   <input type='hidden' class='part_picker_description' value='[% part.description %]'>
 
  17   <span style='float:left'>[% part.partnumber | html %]</span>
 
  18   <span style='float:right; font-weight:bold'>[% part.description | html %]</span>
 
  19   <div style='clear:both;'></div>
 
  20   [% 'Sellprice' | $T8 %]: [% part.sellprice_as_number | html %]
 
  24 <div style='clear:both'></div>
 
  26 [% L.paginate_controls(target='#part_picker_result', selector='#part_picker_result') %]
 
  28 <script type='text/javascript'>
 
  29   $('div.part_picker_part').each(function(){
 
  30     $(this).click(function(){
 
  31       var real_id = $('#part_picker_real_id').val();
 
  32       var $dummy  = $('#' + real_id + '_name');
 
  33       var $real   = $('#' + real_id);
 
  35       $dummy.val($(this).children('input.part_picker_description').val());
 
  36       $real.val($(this).children('input.part_picker_id').val());
 
  37       $real.trigger('change');
 
  39       $('#part_selection').jqmClose();