From 289c7a5ad506b751b39e7e638b69a9bca3e9006b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Sirois Date: Mon, 27 Jan 2014 09:09:38 -0500 Subject: [PATCH] Fix listing image resizing. #8 --- src/kijiji/javascript/all.js | 5 +++- src/kijiji/stylesheets/all.css | 45 ++++++++++++++++++++++++++++++---- 2 files changed, 44 insertions(+), 6 deletions(-) diff --git a/src/kijiji/javascript/all.js b/src/kijiji/javascript/all.js index 7ebc2cb..3b1c25b 100644 --- a/src/kijiji/javascript/all.js +++ b/src/kijiji/javascript/all.js @@ -79,7 +79,10 @@ init = function() { $('#SNB_Results tr.resultsTableSB:not(.enhanced) td').unbind('click') // Enlarge listing thumbnails - $('.thumbImg, .thumbnail, .myadtitle img').each(function(){ $(this).attr('src', $(this).attr('src').replace('_14.JPG', '_35.JPG')) }) + $('.image img').each(function(){ + $(this).attr('src', $(this).attr('src').replace(/_[2|14]\.JPG/, '_35.JPG')) + }) + } /*}}}*/ diff --git a/src/kijiji/stylesheets/all.css b/src/kijiji/stylesheets/all.css index e4b3a29..f6d07b1 100644 --- a/src/kijiji/stylesheets/all.css +++ b/src/kijiji/stylesheets/all.css @@ -134,6 +134,21 @@ body, .title, #MainContainer a { /* Ads listing page {{{*/ +.container-results .image { + width: auto; +} + +.container-results .image img { + max-width: 250px; + max-height: 250px; + width: 250px; +} + +/* Prevent Multiple Images border from breaking when resized */ +.container-results .multiple-images { + background: none; +} + tr.highlight { background: #eee; } @@ -144,17 +159,37 @@ tr.highlight { background: transparent; } -.resultsTableSB .adLinkSB, -.resultsTableSB .prc { - font-size: 18px; - font-size: 1.8rem; +#MainContainer .container-results .watchlist { + padding: 0 10px; +} + +#MainContainer .container-results .description .title, +#MainContainer .container-results .price { + font-size: 18px !important; + font-size: 1.8rem !important; text-decoration: none; } -.resultsTableSB .nomorebroken { +#MainContainer .container-results .description .title, +#MainContainer .container-results .price { + font-size: 18px !important; + font-size: 1.8rem !important; text-decoration: none; } +#MainContainer .container-results .description { + width: 100%; +} + +#MainContainer .container-results .description p { + font-size: 16px !important; + font-size: 1.6rem !important; +} + +#MainContainer .container-results .posted { + white-space: nowrap; +} + .paginationBottomBg { font-size: 125%; }