From: Bernd Bleßmann Date: Tue, 8 Mar 2016 13:13:28 +0000 (+0100) Subject: kivi.SalesPurchase.edit_longdescription: callback zum Setzen der Beschreibung angeben... X-Git-Tag: release-3.4.1~356 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=a84a030e2ecdb0f1068bab87ed706f1594b9caf1;p=kivitendo-erp.git kivi.SalesPurchase.edit_longdescription: callback zum Setzen der Beschreibung angeben können --- 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'); };