* delete only one row during DeleteDeliverable(Hour|Cost)

* delete button is now a simple link and no input tag to prevent accidental submit

git-svn-id: https://dev.finn.de/svn/cockpit/trunk@132 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
hjust 15 years ago
parent 11380467da
commit af35c40c8f
  1. 2
      app/views/deliverables/_deliverable_cost.rhtml
  2. 2
      app/views/deliverables/_deliverable_hour.rhtml
  3. 2
      assets/javascripts/deliverables.js

@ -38,7 +38,7 @@
end %>
</td>
<td class="delete">
<%= image_to_function 'delete.png', "deleteDeliverableCost('#{id_prefix}')" %>
<%= link_to_function image_tag('delete.png'), "deleteDeliverableCost('#{id_prefix}')" %>
</td>
</tr>
<% end %>

@ -35,7 +35,7 @@
<%= observe_field( "#{id_prefix}_hours", :frequency => 1, :url => {:action => :update_deliverable_hour}, :with => "'user_id=' + encodeURIComponent(document.getElementById('#{id_prefix}_user_id').value) + '&hours=' + encodeURIComponent(value) + '&fixed_date=' + encodeURIComponent(document.getElementById('deliverable_fixed_date').value) + '&element_id=#{id_prefix}'") %>
</td>
<td class="delete" rowspan="2">
<%= image_to_function 'delete.png', "deleteDeliverableHour('#{id_prefix}')" %>
<%= link_to_function image_tag('delete.png'), "deleteDeliverableHour('#{id_prefix}')" %>
</td>
</tr>
<% end %>

@ -7,7 +7,6 @@ function deleteDeliverableCost(id) {
Element.stopObserving (id + '_units')
// delete the row
e.next().remove();
e.remove();
// fix the markup classes
@ -23,7 +22,6 @@ function deleteDeliverableHour(id) {
Element.stopObserving (id + '_hours')
// delete the row
e.next().remove();
e.remove();
// fix the markup classes

Loading…
Cancel
Save