From: Moritz Bunkus Date: Wed, 31 Jul 2013 11:24:10 +0000 (+0200) Subject: Pflichtenheftabschätzung: Bei RETURN per AJAX speichern; "Speichern"-Button anzeigen X-Git-Tag: release-3.2.0beta~467^2~99 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=bca1207918502291b707557e530833aab45b42f3;p=kivitendo-erp.git Pflichtenheftabschätzung: Bei RETURN per AJAX speichern; "Speichern"-Button anzeigen --- diff --git a/SL/Controller/RequirementSpec.pm b/SL/Controller/RequirementSpec.pm index 9da08f30d..58a037475 100644 --- a/SL/Controller/RequirementSpec.pm +++ b/SL/Controller/RequirementSpec.pm @@ -115,6 +115,7 @@ sub action_ajax_edit_time_and_cost_estimate { $self->js ->replaceWith('#time_cost_estimate', $html) + ->on('#time_cost_estimate INPUT[type=text]', 'keydown', 'kivi.requirement_spec.time_cost_estimate_input_key_down') ->render($self); } diff --git a/js/requirement_spec.js b/js/requirement_spec.js index 567f893a4..cb1024686 100644 --- a/js/requirement_spec.js +++ b/js/requirement_spec.js @@ -324,6 +324,14 @@ ns.standard_time_cost_estimate_ajax_call = function(key, opt) { return true; }; +ns.time_cost_estimate_input_key_down = function(event) { + if(event.keyCode == 13) { + event.preventDefault(); + ns.standard_time_cost_estimate_ajax_call('save'); + return false; + } +}; + // ------------------------------------------------------------------------- // --------------------------- quotations/orders --------------------------- // ------------------------------------------------------------------------- diff --git a/templates/webpages/requirement_spec/_edit_time_and_cost_estimate.html b/templates/webpages/requirement_spec/_edit_time_and_cost_estimate.html index f0e6831a9..1bd80929a 100644 --- a/templates/webpages/requirement_spec/_edit_time_and_cost_estimate.html +++ b/templates/webpages/requirement_spec/_edit_time_and_cost_estimate.html @@ -39,6 +39,8 @@ [%- END -%] + + [% L.button_tag("kivi.requirement_spec.standard_time_cost_estimate_ajax_call('save')", LxERP.t8("Save")) %] [%- END %]