From a84a030e2ecdb0f1068bab87ed706f1594b9caf1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Tue, 8 Mar 2016 14:13:28 +0100 Subject: [PATCH] =?utf8?q?kivi.SalesPurchase.edit=5Flongdescription:=20cal?= =?utf8?q?lback=20zum=20Setzen=20der=20Beschreibung=20angeben=20k=C3=B6nne?= =?utf8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- js/kivi.SalesPurchase.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/js/kivi.SalesPurchase.js b/js/kivi.SalesPurchase.js index 83f79394f..3e8dc6392 100644 --- a/js/kivi.SalesPurchase.js +++ b/js/kivi.SalesPurchase.js @@ -26,6 +26,9 @@ namespace('kivi.SalesPurchase', function(ns) { if (params.element) { $container.data('element', params.element); } + if (params.set_function) { + $container.data('setFunction', params.set_function); + } $edit.val(params.default_longdescription); @@ -50,10 +53,13 @@ namespace('kivi.SalesPurchase', function(ns) { }; this.set_longdescription = function() { - $('#popup_edit_longdescription_input_container') - .data('element') - .val( $('#popup_edit_longdescription_input').val() ); - + if ($('#popup_edit_longdescription_input_container').data('setFunction')) { + $('#popup_edit_longdescription_input_container').data('setFunction')($('#popup_edit_longdescription_input').val()); + } else { + $('#popup_edit_longdescription_input_container') + .data('element') + .val( $('#popup_edit_longdescription_input').val() ); + } $('#edit_longdescription_dialog').dialog('close'); }; -- 2.20.1