Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1360 from SumOfUs/fix-progress-tracker-styling
Browse files Browse the repository at this point in the history
Fix progress tracker styling
  • Loading branch information
eyko committed Mar 14, 2019
2 parents ee6a0f2 + 79cd9a2 commit 4b99ea5
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion app/javascript/plugins/progress-tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,30 @@ export default class ProgressTracker {
}

addEventListeners() {
const $header = $('.header-logo');
ee.on('action:submitted_success', this.show);
ee.on('action:submitted_success', () => this.tick('signed'));
ee.on('fundraiser:transaction_success', () => this.tick('donated'));
window.addEventListener('share', () => this.tick('shared'), false);
window.addEventListener(
'share',
() => {
$header.hide();
this.tick('shared');
},
false
);
$('.two-step__decline').on('click', () => {
$header.hide();
this.cross('shared');
});
}

show() {
const $header = $('.header-logo');
const $tracker = $('.header-logo .progress-tracker');

$header.addClass('with-progress-tracker');

$tracker
.removeClass('hidden-closed')
.clone()
Expand Down

0 comments on commit 4b99ea5

Please sign in to comment.