Skip to content
Open
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
18 changes: 18 additions & 0 deletions fec/fec/static/js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,22 @@ $(function() {
}
$p.nextAll().remove();
});

/**
* Check for an in-page element with a classList that contains 'js-launch-fecfile-eligibility'.
* If any are found, add the js and css files for it.
* fecfile-eligibility.js will activate the launcher button
*/
let eligibilityLauncher = document.querySelector('.js-launch-fecfile-eligibility');
if (eligibilityLauncher) {
let newScript = document.createElement('script');
newScript.src = '/static/js/widgets/fecfile-eligibility.js'; // This could begin with 'https://www.fec.gov/'
document.body.append(newScript);

let eligibilityStyles = document.createElement('link');
eligibilityStyles.rel = 'stylesheet';
eligibilityStyles.href = '/static/css/widgets/fecfile-eligibility.css'; // This could begin with 'https://www.fec.gov/'
document.body.append(eligibilityStyles);
}
eligibilityLauncher = undefined; // No reason to keep the var
});
10 changes: 5 additions & 5 deletions fec/fec/static/js/modules/calc-admin-fines.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
//
*/
import Vue from 'vue/dist/vue.esm.js';
import Vue from 'vue-2/dist/vue.esm.js';

import { availableDates, getTotalAdminFine } from './calc-admin-fines-logic.js';

Expand Down Expand Up @@ -355,15 +355,15 @@ Vue.component('frames', {
return this[q.showIfVar1] === q.showIfVar1ExpectedValue;
}
},
frameClass: function(frameIndex, addtionalClasses) {
frameClass: function(frameIndex, additionalClasses) {
return [
'frame',
{
previous: frameIndex < this.currentFrameNum,
current: frameIndex == this.currentFrameNum,
'next off-screen': frameIndex > this.currentFrameNum
},
addtionalClasses
additionalClasses
// {
// viewed: this.frames[navIndex].viewed || navIndex == 0,
// current: navIndex == this.currentFrameNum,
Expand Down Expand Up @@ -652,7 +652,7 @@ new Vue({
help: `<p>For election sensitive reports, a committee is a non-filer if it files after this point or doesn't file at all.</p>
<p>A committee is a late filer if it files the report after the due date, but more than four days before the date of the applicable election.</p>
<p>For non-election sensitive reports, a committee is a non-filer if it files its report later than that or not at all.</p>
<p>A committee will be considerered a late filer if it files its report within 30 days after the due date.</p>`
<p>A committee will be considered a late filer if it files its report within 30 days after the due date.</p>`
}
],
viewed: false
Expand Down Expand Up @@ -871,7 +871,7 @@ new Vue({
} else if (passedTests === true) {
// If the value is undefined, this is the first time it's being set so let's advance
let autoStep = this[affectedVmodel] == undefined ? true : false;
// …unless we specifially shouldn't autoadvance
// …unless we specifically shouldn't autoadvance
autoStep = frameShouldAutoAdvance;
//
this.setBreadCrumbText(frameNum, qNum, q);
Expand Down
Loading