Revision 819ee4a9
Added by Patrick Plitzner over 5 years ago
modules/cdm_dataportal/cdm_csv_export/js/cdm_csv_export.js | ||
---|---|---|
7 | 7 |
* |
8 | 8 |
*/ |
9 | 9 |
function blockUIForDownload() { |
10 |
|
|
11 |
var token = new Date().getTime()/1000|0;//'1234'; //use the current timestamp as the token value |
|
12 |
jQuery('#downloadTokenValueId').val(token); |
|
13 |
jQuery.blockUI( { message:'</br><h1><img src="../css/jquery-ui/images/ajax-loader.png">Please wait until the file is ready to download...</h1><br/>'}); |
|
14 |
fileDownloadCheckTimer = window.setInterval(function () { |
|
15 |
var cookieValue = jQuery.cookie('fileDownloadToken'); |
|
16 |
if (cookieValue == token) |
|
17 |
finishDownload(); |
|
18 |
}, 1000); |
|
19 |
} |
|
10 |
|
|
11 |
var token = new Date().getTime()/1000|0;//'1234'; //use the current timestamp as the token value |
|
12 |
jQuery('#downloadTokenValueId').val(token); |
|
13 |
fileDownloadCheckTimer = window.setInterval(function () { |
|
14 |
var cookieValue = jQuery.cookie('fileDownloadToken'); |
|
15 |
if (cookieValue == token) { |
|
16 |
finishDownload(); |
|
17 |
} |
|
18 |
|
|
19 |
}, 1000); |
|
20 |
jQuery.blockUI( { message:'</br><h1><img src="../css/jquery-ui/images/ajax-loader.png">Please wait until the file is ready to download...</h1><br/>'}); |
|
21 |
} |
|
20 | 22 |
|
21 | 23 |
function finishDownload() { |
22 | 24 |
window.clearInterval(fileDownloadCheckTimer); |
Also available in: Unified diff
Code cleaning