Merge remote-tracking branch 'bennibu/rails3' into rails3
Conflicts: app/assets/stylesheets/bootstrap_and_overrides.css.less app/controllers/stockit_controller.rb app/models/ordergroup.rb app/models/workgroup.rb app/views/stockit/index.html.haml
This commit is contained in:
commit
2d382df1f1
10 changed files with 50 additions and 24 deletions
5
app/views/stockit/_destroy_fail.js.haml
Normal file
5
app/views/stockit/_destroy_fail.js.haml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
-# please polish the following line if you know how, same in view destroy
|
||||
var errorDiv = $('<div class="alert fade in alert-error"><a class="close" data-dismiss="alert" href="#">x</a></div>');
|
||||
|
||||
errorDiv.append(document.createTextNode('#{j(fail_msg)}'));
|
||||
$('div.container-fluid').prepend(errorDiv);
|
||||
14
app/views/stockit/destroy.js.haml
Normal file
14
app/views/stockit/destroy.js.haml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
-# please polish the following line if you know how, same in partial _destroy_fail
|
||||
var successDiv = $('<div class="alert fade in alert-success"><a class="close" data-dismiss="alert" href="#">x</a></div>');
|
||||
|
||||
successDiv.append(document.createTextNode('Artikel #{j(@article.name)} gelöscht.'));
|
||||
$('div.container-fluid').prepend(successDiv);
|
||||
|
||||
-# WARNING: If you try to use the escape j(...) here, an error occurs:
|
||||
-# Ein Fehler ist aufgetreten: undefined method `gsub' for 50:Fixnum
|
||||
-# However, it should work without without escaping.
|
||||
-# Note that article names which are purely numeric, e.g. 12345, are escaped correctly (see above).
|
||||
|
||||
$('#stockArticle-#{@article.id}').remove();
|
||||
|
||||
-# WARNING: Do not use a simple .fadeOut() above, because it conflicts with the show/hide function of unavailable articles.
|
||||
|
|
@ -29,7 +29,6 @@
|
|||
- Supplier.all.each do |supplier|
|
||||
%li= link_to supplier.name, new_supplier_delivery_path(supplier), tabindex: -1
|
||||
|
||||
|
||||
%table.table.table-hover#articles
|
||||
%thead
|
||||
%tr
|
||||
|
|
@ -45,7 +44,7 @@
|
|||
%th
|
||||
%tbody
|
||||
- for article in @stock_articles
|
||||
%tr{:class => stock_article_classes(article)}
|
||||
%tr{:class => stock_article_classes(article), :id => "stockArticle-#{article.id}"}
|
||||
%td=h article.name
|
||||
%td= article.quantity
|
||||
%td= article.quantity - article.quantity_available
|
||||
|
|
@ -58,7 +57,7 @@
|
|||
%td
|
||||
= link_to t('ui.edit'), edit_stock_article_path(article), class: 'btn btn-mini'
|
||||
= link_to t('ui.delete'), article, :method => :delete, :confirm => t('.confirm_delete'),
|
||||
class: 'btn btn-mini btn-danger'
|
||||
class: 'btn btn-mini btn-danger', :remote => true
|
||||
%p
|
||||
= t '.stock_worth'
|
||||
= number_to_currency StockArticle.stock_value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue