Work on refactoring measurements out of Lesion Tracker package

- Removed AssociatedStudies Collection
- Measurement API is generated from configuration files
- Data exchange methods are defined in configuration
This commit is contained in:
Erik Ziegler committed 2016-11-15 08:21:46 +01:00
1 parent c511edd419
commit ab4d4c9008
537 files changed
+5122 -3545

No files matched your search

@@ -0,0 +1,10 @@
<template name="timeoutCountdownDialog">
<div id="timeoutCountdownDialog">
<div class="dialogHeader">
<h5>Your session is about to expire.</h5>
</div>
<div class="dialogContent">
<p>You will be logged out in {{timeLeft}}.</p>
</div>
</div>
</template>
@@ -0,0 +1,39 @@
Template.timeoutCountdownDialog.helpers({
timeLeft: function() {
var timeLeft = Session.get('countdownDialogLeftTime');
var suffix = timeLeft > 1 ? 'seconds': 'second';
return timeLeft + suffix;
}
});
Template.timeoutCountdownDialog.onRendered(function() {
// Show countdown dialog
var timeoutCountdownInterval;
$(document).on('TriggerOpenTimeoutCountdownDialog', function(e, leftTime) {
// Show modal dialog
timeoutCountdownInterval = setInterval(function() {
// Set countdownDialogLeftTime session
Session.set('countdownDialogLeftTime', --leftTime);
var dialog = $('#timeoutCountdownDialog');
// Show dialog
dialog.css('display', 'block');
}, 1000);
});
$(document).on('TriggerCloseTimeoutCountdownDialog', function() {
var dialog = $('#timeoutCountdownDialog');
// Close the dialog
dialog.css('display', 'none');
if (timeoutCountdownInterval) {
clearInterval(timeoutCountdownInterval);
// Remove reviewer info for the user
Meteor.call('removeUserFromReviewers', Meteor.userId());
}
});
});
@@ -0,0 +1,15 @@
#timeoutCountdownDialog
display: none
position: absolute
top: 0
bottom: 0
left: 0
right: 0
margin: auto
width: 20%
height: 15%
z-index: 100
border-radius: 5px
padding: 10px 20px 10px 20px
background-color: rgba(255,255,255,1)
outline: none