Revision b3854e89
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
js/kivi.DispositionManager.js | ||
---|---|---|
1 | 1 |
namespace('kivi.DispositionManager', function(ns) { |
2 | 2 |
ns.sort_vendors = function() { |
3 |
ns.display_vendor_parts($('#vendor_id2').val()); |
|
4 |
$("tbody tr").each(function(index) { |
|
5 |
if ( index !== 0 ) { |
|
6 |
$row = $(this); |
|
7 |
if( $row.find("select[name='vendor_ids[]']").val() != $('#vendor_id2').val()) { |
|
8 |
$row.remove(); |
|
9 |
} |
|
3 |
ns.display_vendor_parts($('#vendor_id').val()); |
|
4 |
$("#basket_items tr").each(function(_index) { |
|
5 |
if( |
|
6 |
$(this).find("select[name='vendor_ids[]']").val() != $('#vendor_id').val() |
|
7 |
&& $('#vendor_id').val() != '' |
|
8 |
) { |
|
9 |
$(this).find("[name='ids[+]']").prop("checked", false); |
|
10 |
this.style.display = "none"; |
|
11 |
} else { |
|
12 |
this.style.removeProperty('display'); |
|
10 | 13 |
} |
11 | 14 |
}); |
12 | 15 |
} |
... | ... | |
49 | 52 |
return true; |
50 | 53 |
}; |
51 | 54 |
}); |
55 |
|
|
56 |
$(function() { |
|
57 |
$('#vendor_id').change('set_item:CustomerVendorPicker', function(_e,_o) { |
|
58 |
kivi.DispositionManager.sort_vendors(); |
|
59 |
}) |
|
60 |
}); |
templates/design40_webpages/disposition_manager/show_purchase_basket.html | ||
---|---|---|
16 | 16 |
<caption>[% 'Vendor' | $T8 %]</caption> |
17 | 17 |
<tbody> |
18 | 18 |
<tr> |
19 |
<td>[% P.customer_vendor.picker('vendor_id2', FORM.vendor_id2, type='vendor') %]</td>
|
|
19 |
<td>[% P.customer_vendor.picker('vendor_id', '', type='vendor') %]</td>
|
|
20 | 20 |
</tr> |
21 | 21 |
</tbody> |
22 | 22 |
</table> |
... | ... | |
41 | 41 |
<th>[% 'Vendor' | $T8 %] </th> |
42 | 42 |
</tr> |
43 | 43 |
</thead> |
44 |
<tbody> |
|
44 |
<tbody id="basket_items">
|
|
45 | 45 |
[% FOREACH basket_item = BASKET_ITEMS %] |
46 | 46 |
|
47 | 47 |
<tr> |
... | ... | |
74 | 74 |
|
75 | 75 |
<div id="vendor_parts" class="wrapper"></div> |
76 | 76 |
</form> |
77 |
|
|
78 |
|
|
79 |
<script type="text/javascript"> |
|
80 |
<!-- |
|
81 |
|
|
82 |
$('#vendor_id2').change('set_item:CustomerVendorPicker', function(e,o) { |
|
83 |
kivi.DispositionManager.sort_vendors(); |
|
84 |
}) |
|
85 |
--> |
|
86 |
</script> |
|
87 |
|
templates/webpages/disposition_manager/show_purchase_basket.html | ||
---|---|---|
10 | 10 |
<div> |
11 | 11 |
<p> |
12 | 12 |
[% 'Vendor' | $T8 %]: |
13 |
[% P.customer_vendor.picker('vendor_id2', FORM.vendor_id2, type='vendor') %]
|
|
13 |
[% P.customer_vendor.picker('vendor_id', '', type='vendor') %]
|
|
14 | 14 |
</p> |
15 | 15 |
</div> |
16 | 16 |
<div> |
... | ... | |
29 | 29 |
<th>[% 'Vendor' | $T8 %] </th> |
30 | 30 |
</tr> |
31 | 31 |
</thead> |
32 |
<tbody> |
|
32 |
<tbody id="basket_items">
|
|
33 | 33 |
[% FOREACH basket_item = BASKET_ITEMS %] |
34 | 34 |
|
35 | 35 |
<tr class="listrow"> |
... | ... | |
64 | 64 |
<div id="vendor_parts"></div> |
65 | 65 |
</form> |
66 | 66 |
<hr> |
67 |
<script type="text/javascript"> |
|
68 |
<!-- |
|
69 |
|
|
70 |
$('#vendor_id2').change('set_item:CustomerVendorPicker', function(e,o) { |
|
71 |
kivi.DispositionManager.sort_vendors(); |
|
72 |
}) |
|
73 |
--> |
|
74 |
</script> |
Auch abrufbar als: Unified diff
DispositionManager: FIX: Wechsel Lieferanten im Einkaufswarenkorb