diff --git a/app/assets/javascripts/list.unlist.js b/app/assets/javascripts/list.unlist.js index f649369f..dc7101ed 100644 --- a/app/assets/javascripts/list.unlist.js +++ b/app/assets/javascripts/list.unlist.js @@ -136,9 +136,9 @@ List.prototype.templateEngines.unlist = function(list, settings) { $(item.elm).removeClass('unlisted'); }; this.hide = function(item) { - if (item.elm !== undefined) { - $(item.elm).addClass('unlisted'); - } + ensure.created(item); + $(item.elm).addClass('unlisted'); + listSource.appendChild(item.elm); }; this.clear = function() { $(listSource.childNodes).addClass('unlisted'); diff --git a/app/assets/stylesheets/list.unlist.css b/app/assets/stylesheets/list.unlist.css index b0ed4600..9fad9603 100644 --- a/app/assets/stylesheets/list.unlist.css +++ b/app/assets/stylesheets/list.unlist.css @@ -1,3 +1,3 @@ -.list .unlisted { +.list .unlisted:not(.no-unlist) { display: none; } \ No newline at end of file diff --git a/app/views/group_orders/_form.html.haml b/app/views/group_orders/_form.html.haml index dfac473f..64e88453 100644 --- a/app/views/group_orders/_form.html.haml +++ b/app/views/group_orders/_form.html.haml @@ -67,8 +67,8 @@ %th{style: "width:15px;"}= t '.sum' %tbody.list - @order.articles_grouped_by_category.each do |category, order_articles| - %tr.article-category - %td.name + %tr.no-unlist.article-category + %td = category %i.icon-tag %td{colspan: "9"}