Skip to content

Commit

Permalink
Merge pull request #1452 from 18F/fix/tooltip-under-alignment
Browse files Browse the repository at this point in the history
Fix/tooltip under alignment
  • Loading branch information
patphongs authored Nov 7, 2017
2 parents 4f6fc20 + 8442d64 commit eb1e1c9
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 9 deletions.
9 changes: 5 additions & 4 deletions fec/data/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ def committee(request, committee_id):
'totals': totals,
'min_receipt_date': utils.three_days_ago(),
'context_vars': context_vars,
'party_full': committee['party_full']
}


Expand All @@ -322,10 +323,10 @@ def committee(request, committee_id):
# If there's no reports, find the first year with reports and redirect there
for c in sorted(committee['cycles'], reverse=True):
financials = api_caller.load_cmte_financials(committee['committee_id'], cycle=c)
if financials['reports']:
return redirect(
url_for('committee_page', c_id=committee['committee_id'], cycle=c)
)
# if financials['reports']:
# return redirect(
# url_for('committee_page', c_id=committee['committee_id'], cycle=c)
# )

# If it's not a senate committee and we're in the current cycle
# check if there's any raw filings in the last three days
Expand Down
13 changes: 13 additions & 0 deletions fec/fec/static/img/tooltip-point.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 17 additions & 4 deletions fec/fec/static/scss/components/_calendar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,11 @@
// Event details
.cal-details {
font-size: u(1.4rem);
left: auto;
top: auto;
margin-top: u(1rem);
padding: 0;
left: auto !important;
top: auto !important;
margin-top: u(1.5rem);
margin-left: u(-8rem);
padding: 0 !important;
text-align: left;
width: u(26rem);
white-space: initial;
Expand All @@ -256,6 +257,7 @@
@include triangle(2rem, $primary, up);
background-image: none;
left: 20%;
top: u(-2rem) !important;
}

.button--close--primary {
Expand All @@ -265,6 +267,17 @@
}
}

.fc-event-container:nth-child(1) {
.cal-details {
margin-left: unset;

&::before {
right: auto;
left: u(2rem);
}
}
}

.fc-event-container:nth-child(7) {
.cal-details {
right: 0;
Expand Down
2 changes: 1 addition & 1 deletion fec/fec/static/scss/components/_tooltips.scss
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
//

.tooltip--under {
$top: u(1rem);
$top: u(1.5rem);
width: u(30rem);
left: u(-14rem);
top: calc(100% + #{$top});
Expand Down

0 comments on commit eb1e1c9

Please sign in to comment.