-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from TheDMSGroup/ENG-557-contact-dl
[ENG-557] Improve contact export.
- Loading branch information
Showing
4 changed files
with
57 additions
and
324 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
/* | ||
* @copyright 2018 Mautic Contributors. All rights reserved | ||
* @author Digital Media Solutions, LLC | ||
* | ||
* @link http://mautic.org | ||
* | ||
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html | ||
*/ | ||
?> | ||
<script type="text/javascript"> | ||
mQuery('a[href="#leads-container"]:first') | ||
.parent() | ||
.after('<button id="lead_export_btn" class="btn btn-success pull-right"><i class="fa fa-download"></i> Export Contacts</button>') | ||
.parent() | ||
.find('#lead_export_btn') | ||
.click(function () { | ||
console.log('dnloadin'); | ||
dateFrom = mQuery('#daterange_date_from:first').val(); | ||
dateTo = mQuery('#daterange_date_to:first').val(); | ||
var frame = document.createElement('iframe'), | ||
campaignId = window.location.pathname.split('/').pop(), | ||
src = mauticBaseUrl + 's/campaignwatch/export/' + campaignId + '/' + dateFrom + '/' + dateTo, | ||
button = mQuery(this); | ||
frame.setAttribute('src', src); | ||
frame.setAttribute('style', 'display: none'); | ||
document.body.appendChild(frame); | ||
button.attr('disabled', 'disabled'); | ||
setTimeout(function () { | ||
button.attr('disabled', false); | ||
button.find('i').removeClass('fa-spin').removeClass('fa-spinner').addClass('fa-download'); | ||
}, 30000); | ||
}); | ||
Mautic.loadStylesheet(mauticBaseUrl + 'plugins/MauticCampaignWatchBundle/Assets/css/leads.css'); | ||
</script> |
Oops, something went wrong.