Revision 1ae384cf
Von Tamino Steinert vor etwa 1 Jahr hinzugefügt
js/kivi.EmailJournal.js | ||
---|---|---|
10 | 10 |
$.post("controller.pl", data, kivi.eval_json_result); |
11 | 11 |
} |
12 | 12 |
|
13 |
ns.update_customer_vendor_selection = function() {
|
|
13 |
ns.update_email_workflow_options = function() {
|
|
14 | 14 |
let customer_vendor = $('#customer_vendor_selection').val(); |
15 |
|
|
16 |
$('#customer_div').hide(); |
|
17 |
$('#customer_record_types_div').hide(); |
|
18 |
$('#vendor_div').hide(); |
|
19 |
$('#vendor_record_types_div').hide(); |
|
20 |
|
|
21 |
if (customer_vendor == 'customer') { |
|
22 |
$('#customer_div').show(); |
|
23 |
$('#customer_record_types_div').show(); |
|
24 |
} else { // if (customer_vendor == 'vendor') |
|
25 |
$('#vendor_div').show(); |
|
26 |
$('#vendor_record_types_div').show(); |
|
27 |
} |
|
28 |
kivi.EmailJournal.update_record_list(); |
|
29 |
} |
|
30 |
|
|
31 |
ns.update_action_selection = function() { |
|
32 | 15 |
let record_action = $('#action_selection').val(); |
33 | 16 |
|
17 |
// Hide all div |
|
18 |
['customer', 'vendor'].forEach(function(cv) { |
|
19 |
$(`#${cv}_div`).hide(); |
|
20 |
['workflow_record', 'template_record', 'linking_record', 'new_record'].forEach(function(action) { |
|
21 |
$(`#${cv}_${action}_types_div`).hide(); |
|
22 |
|
|
23 |
}); |
|
24 |
}); |
|
25 |
$('#new_record_div').hide(); |
|
26 |
$('#template_record_div').hide(); |
|
34 | 27 |
$('#record_selection_div').hide(); |
35 |
$('#create_new_div').hide(); |
|
36 | 28 |
|
37 |
if (record_action == 'create_new') { |
|
38 |
$('#create_new_div').show(); |
|
39 |
$('#create_new_div').css('display','inline-block') |
|
29 |
// Enable needed div |
|
30 |
$(`#${customer_vendor}_div`).show(); |
|
31 |
$(`#${customer_vendor}_${record_action}_types_div`).show(); |
|
32 |
if (record_action == 'new_record') { |
|
33 |
$('#new_record_div').show(); |
|
34 |
$('#new_record_div').css('display','inline-block') |
|
40 | 35 |
} else { |
41 | 36 |
$('#record_selection_div').show(); |
37 |
kivi.EmailJournal.update_record_list(); |
|
42 | 38 |
} |
43 | 39 |
} |
44 | 40 |
|
Auch abrufbar als: Unified diff
EmailJournal: Belegvorlage zum Workflow hinzugefügt