return pp;
};
+ ns.reinit_widgets = function() {
+ kivi.run_once_for('input.part_autocomplete', 'part_picker', function(elt) {
+ kivi.Part.Picker($(elt));
+ });
+ }
+
$(function(){
// assortment
$('#part_warehouse_id').change(kivi.Part.reload_bin_selection);
- $('input.part_autocomplete').each(function(i,real){
- kivi.Part.Picker($(real));
- });
+ ns.reinit_widgets();
});
});
$(elt).datepicker();
});
- if (ns.Part)
- ns.run_once_for('input.part_autocomplete', 'part_picker', function(elt) {
- kivi.Part.Picker($(elt));
- });
+ if (ns.Part) ns.Part.reinit_widgets();
if (ns.ProjectPicker)
ns.run_once_for('input.project_autocomplete', 'project_picker', function(elt) {