1
0

Last changes on Redmine 4.0

This commit is contained in:
cryptogopher
2022-07-24 16:46:28 +02:00
parent 745e1f4264
commit 71bfc5a33a
18 changed files with 154 additions and 60 deletions

View File

@@ -0,0 +1,17 @@
<%= labelled_form_for @measurement, url: measurement_readouts_path(@measurement),
method: :patch, remote: true,
html: {id: 'edit-measurement-form', name: 'edit-measurement-form'} do |measurement_f| %>
<div class="box tabular">
<%= render partial: 'measurements/form', locals: {measurement_f: measurement_f} %>
</div>
<div class="tabular">
<p>
<%= submit_tag l(:button_save) %>
<%= link_to l(:button_cancel), "#",
onclick: '$(this).closest("tr").nextUntil("tr.measurement", "tr.details").show()
.addBack().first().remove(); return false;' %>
</p>
</div>
<% end %>

View File

@@ -0,0 +1,9 @@
$('tr[id=measurement-<%= @measurement.id %>]').nextUntil('tr.measurement')
.remove('tr:not(.details)').hide().addBack().first().after(
'<tr>' +
'<td class="topleft symmetric"' +
'colspan="'+$('table#readouts tr:first-child td').length+'">' +
'<%= j render partial: 'readouts/edit_form' %>' +
'</td>' +
'</tr>'
);

View File

@@ -0,0 +1 @@
$('#readouts').html('<%= j render partial: 'readouts/index' %>');