$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);
"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",
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()
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)
});
'Save and RFQ' => 'Speichern und Lieferantenanfrage',
'Save and close' => 'Speichern und schließ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',
[%- 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>