foodsoft/app/views/stockit/show_on_stock_article_update.js.erb

14 lines
421 B
Text
Raw Permalink Normal View History

// Handle more advanced DOM update after AJAX database manipulation.
// See publish/subscribe design pattern in /doc.
(function() {
var stock_article_details = $('<%= j(render(
:partial => 'stock_article_details',
:locals => {
:stock_article => @stock_article
}
)) %>');
$('#stockArticleDetails').replaceWith(stock_article_details);
$('h1').first().text('<%= j(@stock_article.name) %>');
})();