foodsoft/app/views/orders/add_article.js.erb

17 lines
575 B
Plaintext

$('div.container-fluid').prepend(
'<%= j(render(:partial => 'shared/alert_success', :locals => {:alert_message => t('.notice', :name => @order_article.article.name)})) %>'
);
(function() {
$('.ordered-articles tr').removeClass('success');
var article_for_adding = $(
'<%= j(render(:partial => 'edit_amount', :locals => {:order_article => @order_article})) %>'
).addClass('success');
$('.ordered-articles tbody').append(article_for_adding);
updateSort('.ordered-articles');
$('#order_articles_<%= @order_article.id %>_units_received').focus();
})();