From 9d990e2b59cfc9c2491ee6d2333277d51483aa48 Mon Sep 17 00:00:00 2001 From: Matt Lee Date: Thu, 24 Apr 2014 17:05:51 -0700 Subject: [PATCH] Handle long target/location values better --- r2/r2/public/static/css/reddit.less | 23 ++++++++++++++++++++--- r2/r2/templates/renderablecampaign.html | 9 ++++++--- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/r2/r2/public/static/css/reddit.less b/r2/r2/public/static/css/reddit.less index e0a77cc29..12797e9e5 100755 --- a/r2/r2/public/static/css/reddit.less +++ b/r2/r2/public/static/css/reddit.less @@ -4770,6 +4770,16 @@ ul.tabmenu.formtab { padding: 2px 4px; } +.existing-campaigns { + td.campaign-target, + td.campaign-location { + overflow: hidden; + text-overflow: ellipsis; + max-width: 100px; + } +} + + .campaign .bid-info { font-size: x-small; } .campaign .bid-info.error { color: red; } .campaign .buttons { float:right; } @@ -5444,7 +5454,7 @@ div #campaign-field { .create-promo { float: left; margin: 5px 20px 0 5px; - width: 620px; + width: 650px; } .create-promo .infobar { @@ -5494,8 +5504,15 @@ div #campaign-field { } } -.existing-campaigns th button.new-campaign { - margin: 3px 0; +.existing-campaigns { + th button.new-campaign { + margin: 3px 0; + white-space: nowrap; + } + + .campaign { + border: 0; + } } .create-promo .hidden { display: none; } diff --git a/r2/r2/templates/renderablecampaign.html b/r2/r2/templates/renderablecampaign.html index 0695aa839..ebad3b561 100644 --- a/r2/r2/templates/renderablecampaign.html +++ b/r2/r2/templates/renderablecampaign.html @@ -106,11 +106,14 @@ %endif - - ${'/r/%s' % thing.campaign.sr_name if thing.campaign.sr_name else _('frontpage')} + <% + campaign_target = '/r/%s' % thing.campaign.sr_name if thing.campaign.sr_name else _('frontpage') + %> + + ${campaign_target} - + ${thing.location_str}