Langtext-Dialog: Größe prozentual zum Hauptfenster einstellbar pro Benutzer
[kivitendo-erp.git] / templates / webpages / part / _part_picker_result.html
index c6a8143..cdcbf8d 100644 (file)
@@ -1,40 +1,35 @@
 [%- USE T8 %]
 [%- USE HTML %]
 [%- USE L %]
+[%- USE P %]
 [%- USE LxERP %]
 
 [%# L.dump(SELF.parts) %]
 
-[% FOREACH part = SELF.parts %]
-  [% PROCESS part_block %]
-[% END %]
-
-[%- BLOCK part_block %]
-<div class='part_picker_part'>
+[% BLOCK part_block %]
+<div class='part_picker_part [% FORM.no_paginate ? 'ppp_line' : 'ppp_block' %]'>
   <input type='hidden' class='part_picker_id' value='[% part.id %]'>
   <input type='hidden' class='part_picker_partnumber' value='[% part.partnumber %]'>
-  <input type='hidden' class='part_picker_description' value='[% part.description %]'>
-  <span style='float:left'>[% part.partnumber | html %]</span>
-  <span style='float:right; font-weight:bold'>[% part.description | html %]</span>
+  <input type='hidden' class='part_picker_description' value='[% part.displayable_name %]'>
+  <input type='hidden' class='part_picker_ean' value='[% part.ean %]'>
+  <input type='hidden' class='part_picker_unit' value='[% part.unit %]'>
+  <span class='ppp_block_number'>[% part.partnumber | html %]</span>
+  <span class='ppp_block_ean'>[% part.ean | html %]</span>
+  <span class='ppp_block_description'>[% part.description | html %]</span>
   <div style='clear:both;'></div>
-  [% 'Sellprice' | $T8 %]: [% part.sellprice_as_number | html %]
+  <span class='ppp_block_sellprice'>[% 'Sellprice' | $T8 %]: [% part.sellprice_as_number | html %]</span>
+  <span class='ppp_block_description'>[% part.presenter.typeclass_abbreviation %]</span>
 </div>
 [%- END %]
 
-<div style='clear:both'></div>
 
-[% L.paginate_controls(target='#part_picker_result', selector='#part_picker_result') %]
+[% FOREACH part = SELF.parts %]
+  [% PROCESS part_block %]
+[% END %]
+
+<div style='clear:both'></div>
 
+[% L.paginate_controls(target='#part_picker_result', selector='#part_picker_result', models=SELF.models) %]
 <script type='text/javascript'>
-  var pp = kivi.PartPickerCache[$('#part_picker_real_id').val()];
-  $('div.part_picker_part').each(function(){
-    $(this).click(function(){
-      pp.set_item({
-        name: $(this).children('input.part_picker_description').val(),
-        id:   $(this).children('input.part_picker_id').val(),
-      });
-      $('#part_selection').jqmClose();
-      return true;
-    });
-  });
+  $('#'+$('#part_picker_real_id').val()).data("part_picker").dialog.init_results();
 </script>