Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions fec/fec/static/js/modules/columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ export const filings = {
return reportType({
doc_description: doc_description,
amendment_version: amendment_version,
large_pdf: row.pages >= 100000,
fec_url: fec_url,
pdf_url: pdf_url,
csv_url: csv_url,
Expand Down
3 changes: 2 additions & 1 deletion fec/fec/static/js/modules/dropdowns.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ Dropdown.prototype.handleFocusAway = function(e) {
this.isOpen &&
!this.$panel.has($target).length &&
!this.$panel.is($target) &&
!$target.is(this.$button)
!$target.is(this.$button) &&
!this.$panel.has('p.dropdown-msg').length
) {
this.hide();
}
Expand Down
1 change: 1 addition & 0 deletions fec/fec/static/js/modules/tables.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ export function modalRenderFactory(template, fetch) {

// If the click target is a link, stop here. Don't toggle any rows
if ($target.is('a')) return true;
if ($target.is('.dropdown-msg')) return true;

// Hide any other open rows
// For each row
Expand Down
9 changes: 8 additions & 1 deletion fec/fec/static/js/templates/reports/reportType.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@
{{/if}}
{{#if pdf_url}}
<li class="dropdown__item">
<a class="dropdown__value" target="_blank" href="{{ pdf_url }}">.pdf</a>
{{#if large_pdf}}
<p class="dropdown-msg">
.pdf not available for reports 100,000 pages or more. Request data at
<a href="mailto:efiletechsupport@fec.gov" aria-label="Request data at efiletechsupport@fec.gov">efiletechsupport@fec.gov</a>
</p>
{{else}}
<a class="dropdown__value" target="_blank" href="{{ pdf_url }}">.pdf</a>
{{/if}}
</li>
{{/if}}
</ul>
Expand Down
22 changes: 21 additions & 1 deletion fec/fec/static/scss/components/_dropdowns.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,26 @@
width: 100%;
}

.dropdown-msg {
color: $neutral-base !important;;
display: block;
font-size: inherit;
line-height: u(1.7rem);
padding: u(.5rem 1rem .5rem .7rem);
cursor: default;

&:hover {
background-color: $gray-light;
}

a {
color: $base !important;
&:hover {
border-bottom: 1px dotted $aqua !important;
}
}
}

// For scrolling dropdowns, force the scrollbars to appear,
// flip its x to move the scroll to the left, then flip its content back
&.dropdown-scrolling {
Expand Down Expand Up @@ -124,7 +144,7 @@
color: $base;
display: block;
margin: 0;
padding: u(0.5rem 1rem 0.5rem 1.5rem);
padding: u(.5rem .75rem);
max-width: 100%;
white-space: nowrap;

Expand Down