From b05b4cf3d76b71cf9f58832cda4cc8b0a14e5a2e Mon Sep 17 00:00:00 2001 From: Renfred Harper Date: Thu, 31 Oct 2013 13:42:38 -0400 Subject: [PATCH] Fix for scrolling grid-boxes --- website/static/css/style.css | 1 + website/static/js/grid.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/website/static/css/style.css b/website/static/css/style.css index 9a1e8bd..9a50520 100644 --- a/website/static/css/style.css +++ b/website/static/css/style.css @@ -257,6 +257,7 @@ ul.ui-autocomplete { #info-body { position: static; cursor: pointer; + overflow-y: auto; } #info-close { display: none; diff --git a/website/static/js/grid.js b/website/static/js/grid.js index 73d84ca..967385a 100644 --- a/website/static/js/grid.js +++ b/website/static/js/grid.js @@ -2,7 +2,7 @@ var restaurants = []; function correct_grid_overflow(){ // This function ensures that all text inside the grid-boxes display nicely on one line. - $('.restaurant').css('font-size', ''); + $('.restaurant').css('font-size', '').css('overflow-y', 'scroll'); $('.restaurant').each(function() { // Overflow is detected if the height of the box is less than // the clipped scroll height of the box. @@ -15,6 +15,7 @@ function correct_grid_overflow(){ $(this).css('padding-top', 31 - newSize + 'px'); } }); + $('.restaurant').css('overflow-y', ''); } function sort_restaurants(filtered_restaurants) { @@ -51,7 +52,7 @@ function construct_grid(filtered_restaurants) { ); }); $('#grid').show(); - correct_overflow(); + correct_grid_overflow(); } function update_grid(restaurants) { -- GitLab