Fix and cleanup stock takings (PR #667)

This commit is contained in:
JuliusR 2019-05-14 16:24:41 +02:00 committed by wvengen
parent c38abedf2a
commit 2d0a81c92d
7 changed files with 38 additions and 62 deletions

View file

@ -0,0 +1,14 @@
// Handle more advanced DOM update after AJAX database manipulation.
// See publish/subscribe design pattern in /doc.
(function() {
$('#stock_changes p').removeClass('alert alert-success');
var stock_change = $('<%= j(render(
:partial => 'stock_change',
:locals => {
:stock_change => @stock_change
}
)) %>').addClass('alert alert-success');
$('#stock_changes').prepend(stock_change);
})();