Fix and cleanup stock takings (PR #667)
This commit is contained in:
parent
c38abedf2a
commit
2d0a81c92d
7 changed files with 38 additions and 62 deletions
14
app/views/stock_takings/new_on_stock_article_create.js.erb
Normal file
14
app/views/stock_takings/new_on_stock_article_create.js.erb
Normal 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);
|
||||
})();
|
||||
Loading…
Add table
Add a link
Reference in a new issue