X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=js%2Fkivi.Order.js;h=9ef6ef58d72ed38cbe8abfdf0e55e53e34096129;hb=04dccca70c47960cd6ea03a4f0ae05a9cbc42c41;hp=b0960e7be0de30ad54c5343da0dda4b93f772485;hpb=1b58f5dac1365a81044fd066ed9efc8f2da64f3f;p=kivitendo-erp.git diff --git a/js/kivi.Order.js b/js/kivi.Order.js index b0960e7be..9ef6ef58d 100644 --- a/js/kivi.Order.js +++ b/js/kivi.Order.js @@ -878,7 +878,6 @@ namespace('kivi.Order', function(ns) { ns.create_part = function() { var data = $('#order_form').serializeArray(); data.push({ name: 'action', value: 'Order/create_part' }); - $.post("controller.pl", data, kivi.eval_json_result); }; @@ -906,6 +905,38 @@ namespace('kivi.Order', function(ns) { return true; }; + ns.load_phone_note = function(id, subject, body) { + $('#phone_note_edit_text').html(kivi.t8('Edit note')); + $('#phone_note_id').val(id); + $('#phone_note_subject').val(subject); + $('#phone_note_body').val(body); + $('#phone_note_delete_button').show(); + }; + + ns.cancel_phone_note = function() { + $('#phone_note_edit_text').html(kivi.t8('Add note')); + $('#phone_note_id').val(''); + $('#phone_note_subject').val(''); + $('#phone_note_body').val(''); + $('#phone_note_delete_button').hide(); + }; + + ns.save_phone_note = function() { + var data = $('#order_form').serializeArray(); + data.push({ name: 'action', value: 'Order/save_phone_note' }); + + $.post("controller.pl", data, kivi.eval_json_result); + }; + + ns.delete_phone_note = function() { + if ($('#phone_note_id').val() === '') return; + + var data = $('#order_form').serializeArray(); + data.push({ name: 'action', value: 'Order/delete_phone_note' }); + + $.post("controller.pl", data, kivi.eval_json_result); + }; + }); $(function() {