]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Pflichtenheftzeitschätzung: neuer Menüeintrag "Speichern und geöffnet lassen"
authorMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 2 Sep 2013 09:45:40 +0000 (11:45 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 1 Apr 2014 11:10:32 +0000 (13:10 +0200)
SL/Controller/RequirementSpec.pm
js/locale/de.js
js/requirement_spec.js
locale/de/all
templates/webpages/requirement_spec/_show_time_and_cost_estimate.html

index ee0a94f25cc9830cd3f296aa0278084b68d82626..3fa13c0f50e1544499544298dbb81dbaa564830a 100644 (file)
@@ -149,9 +149,12 @@ sub action_ajax_save_time_and_cost_estimate {
 
   $self->requirement_spec(SL::DB::RequirementSpec->new(id => $self->requirement_spec->id)->load);
 
-  my $html = $self->render('requirement_spec/_show_time_and_cost_estimate', { output => 0 });
-  $self->js->replaceWith('#time_cost_estimate', $html)
-           ->remove('#time_cost_estimate_form_container');
+  my $html = $self->render('requirement_spec/_show_time_and_cost_estimate', { output => 0 }, initially_hidden => !!$::form->{keep_open});
+  $self->js->replaceWith('#time_cost_estimate', $html);
+
+  return $self->js->render($self) if $::form->{keep_open};
+
+  $self->js->remove('#time_cost_estimate_form_container');
 
   if ($self->visible_section) {
     $html = $self->render('requirement_spec_item/_section', { output => 0 }, requirement_spec_item => $self->visible_section);
index 9cdf4a82da65f92c8232f867638e4161de12bad8..9c54d6158b08d4af6432f6ccda6cec652e3ce36c 100644 (file)
@@ -45,6 +45,7 @@ namespace("kivi").setupLocale({
 "Requirement spec template actions":"Pflichtenheftvorlagen-Aktionen",
 "Revert to version":"Auf Version zurücksetzen",
 "Save":"Speichern",
+"Save and keep open":"Speichern und geöffnet lassen",
 "Section/Function block actions":"Abschnitts-/Funktionsblockaktionen",
 "Select template to paste":"Einzufügende Vorlage auswählen",
 "Text block actions":"Textblockaktionen",
index 96a2cba15561587de7b4bcfe14f090a507f87bd7..535c34eabeb5bbe29911b424d5bc65d03e9df9e7 100644 (file)
@@ -469,7 +469,13 @@ ns.standard_time_cost_estimate_ajax_call = function(key, opt) {
     return true;
   }
 
-  var data = "action=RequirementSpec/ajax_" + key + "_time_and_cost_estimate&";
+  var add_data = '';
+  if (key == 'save_keep_open') {
+    key      = 'save';
+    add_data = 'keep_open=1&';
+  }
+
+  var data = "action=RequirementSpec/ajax_" + key + "_time_and_cost_estimate&" + add_data;
 
   if (key == 'save')
     data += $('#edit_time_cost_estimate_form').serialize()
@@ -771,6 +777,7 @@ ns.create_context_menus = function(is_template) {
     items:    $.extend({
         heading: { name: kivi.t8('Time/cost estimate actions'), className: 'context-menu-heading' }
       , save:    { name: kivi.t8('Save'),   icon: "save",  callback: kivi.requirement_spec.standard_time_cost_estimate_ajax_call }
+      , save_keep_open: { name: kivi.t8('Save and keep open'), icon: "save", callback: kivi.requirement_spec.standard_time_cost_estimate_ajax_call }
       , cancel:  { name: kivi.t8('Cancel'), icon: "close", callback: kivi.requirement_spec.standard_time_cost_estimate_ajax_call }
     }, general_actions)
   });
index a8fdb7015539431a5435357b35c69b57b0658593..1fd0ad6daf792fe7fdced32512ef84f7ebb5d5a9 100755 (executable)
@@ -2000,6 +2000,7 @@ $self->{texts} = {
   'Save and RFQ'                => 'Speichern und Lieferantenanfrage',
   'Save and close'              => 'Speichern und schlie&szlig;en',
   'Save and execute'            => 'Speichern und ausführen',
+  'Save and keep open'          => 'Speichern und geöffnet lassen',
   'Save as new'                 => 'als neu speichern',
   'Save document in WebDAV repository' => 'Dokument in WebDAV-Ablage speichern',
   'Save draft'                  => 'Entwurf speichern',
index 76b7afe610b746dfebcba800dc2a5f0e2541a186..e8e4c3d5215a2618432578af58f89f4a0f271e3e 100644 (file)
@@ -1,7 +1,7 @@
 [%- USE LxERP -%][%- USE L -%][%- USE HTML -%][%- USE P -%]
 [%- DEFAULT id_prefix = 'time_and_cost_estimate_form' %]
 
-<div id="time_cost_estimate">
+<div id="time_cost_estimate"[% IF initially_hidden %] style="display: none;"[% END %]>
  [%- IF !SELF.requirement_spec.sections.size %]
   <p>[%- LxERP.t8("Neither sections nor function blocks have been created yet.") %]</p>