Merge pull request #80 from HDinger/fix/21460-hide-vertical-scrollbar-when-there-is-nothing-to-scroll

[21460] Hide vertical scrollbar when there is nothing to scroll
pull/6827/head
Jan Sandbrink 9 years ago
commit 34c0f5d2a2
  1. 27
      lib/widget/entry_table.rb

@ -23,7 +23,7 @@ class Widget::Table::EntryTable < Widget::Table
detailed_table self
def render
content = content_tag :div, class: 'generic-table--container' do
content = content_tag :div, class: 'generic-table--container -with-footer' do
content_tag :div, class: 'generic-table--results-container' do
table = content_tag :table, 'interactive-table' => true,
role: 'grid',
@ -34,7 +34,9 @@ class Widget::Table::EntryTable < Widget::Table
concat foot
concat body
end
table + content_tag(:div, class: 'generic-table--header-background') {}
table +
content_tag(:div, class: 'generic-table--header-background') {} +
content_tag(:div, class: 'generic-table--footer-background') {}
end
end
# FIXME do that js-only, like a man's man
@ -96,14 +98,23 @@ class Widget::Table::EntryTable < Widget::Table
content_tag :tr do
if show_result(@subject, 0) != show_result(@subject)
concat content_tag(:th, '', colspan: FIELDS.size)
concat content_tag(:th,
show_result(@subject), class: 'inner')
concat content_tag(:th,
show_result(@subject, 0), class: 'result')
concat content_tag(:th) {
concat content_tag(:div,
show_result(@subject),
class: 'inner generic-table--footer-outer')
}
concat content_tag(:th) {
concat content_tag(:div,
show_result(@subject, 0),
class: 'result generic-table--footer-outer')
}
else
concat content_tag(:th, '', colspan: FIELDS.size + 1)
concat content_tag(:th,
show_result(@subject), class: 'result')
concat content_tag(:th) {
concat content_tag(:div,
show_result(@subject),
class: 'result generic-table--footer-outer')
}
end
concat content_tag(:th, '', class: 'unsortable')
end

Loading…
Cancel
Save