Revision bdf33d88
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/Controller/RequirementSpec.pm | ||
---|---|---|
109 | 109 |
$self->render('requirement_spec/_show_time_and_cost_estimate', { layout => 0 }); |
110 | 110 |
} |
111 | 111 |
|
112 |
sub action_ajax_cancel_time_and_cost_estimate { |
|
113 |
my ($self) = @_; |
|
114 |
|
|
115 |
my $html = $self->render('requirement_spec/_show_time_and_cost_estimate', { output => 0 }); |
|
116 |
|
|
117 |
$self->js |
|
118 |
->replaceWith('#time_cost_estimate', $html) |
|
119 |
->render($self); |
|
120 |
} |
|
121 |
|
|
122 | 112 |
sub action_ajax_edit_time_and_cost_estimate { |
123 | 113 |
my ($self) = @_; |
124 | 114 |
|
125 | 115 |
my $html = $self->render('requirement_spec/_edit_time_and_cost_estimate', { output => 0 }); |
126 | 116 |
|
127 | 117 |
$self->js |
128 |
->replaceWith('#time_cost_estimate', $html) |
|
118 |
->hide('#time_cost_estimate') |
|
119 |
->after('#time_cost_estimate', $html) |
|
129 | 120 |
->on('#time_cost_estimate INPUT[type=text]', 'keydown', 'kivi.requirement_spec.time_cost_estimate_input_key_down') |
130 | 121 |
->render($self); |
131 | 122 |
} |
js/requirement_spec.js | ||
---|---|---|
326 | 326 |
// ------------------------------------------------------------------------- |
327 | 327 |
|
328 | 328 |
ns.standard_time_cost_estimate_ajax_call = function(key, opt) { |
329 |
if ((key == 'cancel') && !confirm(kivi.t8('Do you really want to cancel?'))) |
|
329 |
if (key == 'cancel') { |
|
330 |
if (confirm(kivi.t8('Do you really want to cancel?'))) { |
|
331 |
$('#time_cost_estimate').show(); |
|
332 |
$('#time_cost_estimate_form_container').remove(); |
|
333 |
} |
|
330 | 334 |
return true; |
335 |
} |
|
331 | 336 |
|
332 | 337 |
var data = "action=RequirementSpec/ajax_" + key + "_time_and_cost_estimate&"; |
333 | 338 |
|
templates/webpages/requirement_spec/_edit_time_and_cost_estimate.html | ||
---|---|---|
1 | 1 |
[%- USE LxERP -%][%- USE L -%][%- USE HTML -%][%- USE P -%] |
2 | 2 |
[%- DEFAULT id_prefix = 'time_and_cost_estimate_form' %] |
3 | 3 |
|
4 |
<div id="time_cost_estimate" class="edit-time-cost-estimate-context-menu"> |
|
4 |
<div id="time_cost_estimate_form_container" class="edit-time-cost-estimate-context-menu">
|
|
5 | 5 |
[%- IF !SELF.requirement_spec.sections.size %] |
6 | 6 |
<p>[%- LxERP.t8("Neither sections nor function blocks have been created yet.") %]</p> |
7 | 7 |
|
Auch abrufbar als: Unified diff
Pflichtenheftkostenschätzung: "Abbrechen" ohne AJAX-Call nur in JS