Commit e663106a95629285308ea1950458764ab95b296f
Exists in
master
and in
22 other branches
Merge commit 'refs/merge-requests/183' of git://gitorious.org/noosfero/noosfero …
…into merge-requests/183
Showing
3 changed files
with
7 additions
and
7 deletions
Show diff stats
app/views/manage_products/_certifiers_for_selection.rhtml
1 | -<%= select_certifiers(@qualifier) %> | ||
2 | -<%= button_to_function(:delete, '', "jQuery(this).parents('tr').remove()") %> | 1 | +<%= select_certifiers(@qualifier) + |
2 | + button_to_function(:delete, content_tag('span', 'Delete qualifier'), "jQuery(this).parents('tr').remove()") %> | ||
3 | <% javascript_tag do %> | 3 | <% javascript_tag do %> |
4 | jQuery('#product-qualifiers-list *').removeClass('small-loading') | 4 | jQuery('#product-qualifiers-list *').removeClass('small-loading') |
5 | <% end %> | 5 | <% end %> |
app/views/manage_products/_edit_info.rhtml
@@ -39,8 +39,8 @@ | @@ -39,8 +39,8 @@ | ||
39 | <%= select_qualifiers(@product, qualifier.id) %> | 39 | <%= select_qualifiers(@product, qualifier.id) %> |
40 | </td> | 40 | </td> |
41 | <td id='certifier-area-<%= index %>'> | 41 | <td id='certifier-area-<%= index %>'> |
42 | - <%= select_certifiers(qualifier, @product) %> | ||
43 | - <%= button_to_function(:delete, content_tag('span', 'Delete qualifier'), "jQuery(this).parents('tr').remove()") %> | 42 | + <%= select_certifiers(qualifier, @product) + |
43 | + button_to_function(:delete, content_tag('span', 'Delete qualifier'), "jQuery(this).parents('tr').remove()") %> | ||
44 | </td> | 44 | </td> |
45 | </tr> | 45 | </tr> |
46 | <% end %> | 46 | <% end %> |
@@ -48,7 +48,7 @@ | @@ -48,7 +48,7 @@ | ||
48 | <%= button_to_function( | 48 | <%= button_to_function( |
49 | :add, | 49 | :add, |
50 | _('Add new qualifier'), | 50 | _('Add new qualifier'), |
51 | - "new_qualifier_row('#product-qualifiers-list', '#{escape_javascript(select_qualifiers(@product))}')" | 51 | + "new_qualifier_row('#product-qualifiers-list', '#{escape_javascript(select_qualifiers(@product))}', '#{escape_javascript(button_to_function(:delete, content_tag('span', 'Delete qualifier'), 'jQuery(this).parents(\'tr\').remove()'))}')" |
52 | ) %> | 52 | ) %> |
53 | <%= hidden_field_tag "product[qualifiers_list][nil]" %> | 53 | <%= hidden_field_tag "product[qualifiers_list][nil]" %> |
54 | <% end %> | 54 | <% end %> |
public/javascripts/application.js
@@ -454,9 +454,9 @@ function loading_for_button(selector) { | @@ -454,9 +454,9 @@ function loading_for_button(selector) { | ||
454 | jQuery(selector).css('cursor', 'progress'); | 454 | jQuery(selector).css('cursor', 'progress'); |
455 | } | 455 | } |
456 | 456 | ||
457 | -function new_qualifier_row(selector, select_qualifiers) { | 457 | +function new_qualifier_row(selector, select_qualifiers, delete_button) { |
458 | index = jQuery(selector + ' tr').size() - 1; | 458 | index = jQuery(selector + ' tr').size() - 1; |
459 | - jQuery(selector).append("<tr><td>" + select_qualifiers + "</td><td id='certifier-area-" + index + "'><select></select></td></tr>"); | 459 | + jQuery(selector).append("<tr><td>" + select_qualifiers + "</td><td id='certifier-area-" + index + "'><select></select>" + delete_button + "</td></tr>"); |
460 | } | 460 | } |
461 | 461 | ||
462 | // controls the display of the login/logout stuff | 462 | // controls the display of the login/logout stuff |