Page MenuHomec4science

index.html
No OneTemporary

File Metadata

Created
Sat, Dec 14, 10:42

index.html

<html>
<head>
<link href='https://fonts.googleapis.com/css?family=Bree+Serif|Source+Sans+Pro:200,200i,300,300i,400,400i,600,600i,700,700i,900,900i'
rel='stylesheet'>
<link href='./style.css' rel='stylesheet'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<style>
.mailto-hidden {
display: none;
}
</style>
</head>
<body>
<div class='content mailto-hidden'>
<p>If you have questions about your query results or this SHRINE network, contact the Data Steward at your site.</p>
<div class='email js-email'>
<button class='button button--large js-button mailto'>Email Data Steward</button>
</div>
</div>
<div class='init-div'>
Initializing...
</div>
<script src='node_modules/jquery/dist/jquery.min.js'>
</script>
<script>
/*
Simple mailto initialization.
*/
$(document).ready(function () {
init();
});
function init() {
var url = 'shrine-metadata/data/';
fetchStewardEmail(url)
.then(initMailTo)
.then(hideLoading)
.fail(notifyOfFailure);
}
function fetchStewardEmail(url) {
return $.ajax(url);
}
function hideLoading() {
$('.init-div').addClass('mailto-hidden');
}
function showContent() {
$('.content').removeClass('mailto-hidden');
}
function initMailTo(address) {
var sMailto = 'mailto:' + address;
var sSubject = 'subject=' + encodeURIComponent('Question from a SHRINE User');
var body = encodeURIComponent('Please enter the suggested information and your question. Your data steward will reply to this email.' +
'\n\n***Never send patient information, passwords, or other sensitive information by email****' +
'\nName:' +
'\nTitle:' +
'\nUser name (to log into SHRINE):' +
'\nTelephone Number (optional):' +
'\nPreferred email address (optional):' +
'\n\nQuestion or Comment:');
$('.mailto').on('click', function () {
var sBody = 'body=' + body;
var mail = sMailto + '?' + sSubject + '&' + sBody;
document.location.href = mail;
});
showContent();
}
function notifyOfFailure(data) {
alert('error retrieving steward email.');
}
</script>
</body>
</html>

Event Timeline