Revision 96145038
Von Bernd Bleßmann vor 7 Monaten hinzugefügt
- ID 96145038a7ff693efd5fd07c0f058caa76922105
- Vorgänger a833c262
| js/kivi.Warehouse.js | ||
|---|---|---|
|
ns.wh_changed = function(target) {
|
||
|
const wh_id = $(target).val();
|
||
|
const bin_dom_id = $(target).data('bin-dom-id');
|
||
|
const bin_id = $('#' + bin_dom_id).val();
|
||
|
|
||
|
$.post("controller.pl", { action: 'Warehouse/wh_bin_select_update_bins',
|
||
|
wh_id: wh_id,
|
||
|
bin_id: bin_id,
|
||
|
bin_dom_id: bin_dom_id },
|
||
|
kivi.eval_json_result);
|
||
|
};
|
||
|
|
||
|
ns.wh_bin_select_update_bins = function(bin_dom_id, bins) {
|
||
|
ns.wh_bin_select_update_bins = function(bin_dom_id, bins, selected_bin) {
|
||
|
const $bin_select = $('#' + bin_dom_id);
|
||
|
$bin_select.empty();
|
||
|
|
||
|
$.each(bins, function(idx, elt) {
|
||
|
$bin_select.append($('<option/>', {value: elt.key, text: elt.value}));
|
||
|
if (elt.key == selected_bin) {
|
||
|
$bin_select.append($('<option/>', {value: elt.key, text: elt.value, selected: 1}));
|
||
|
} else {
|
||
|
$bin_select.append($('<option/>', {value: elt.key, text: elt.value}));
|
||
|
}
|
||
|
});
|
||
|
};
|
||
|
|
||
Auch abrufbar als: Unified diff
Presenter Lagerplatz: Beim Laden vorbelegte Auswahl berücksichtigen