Fixed bug LT-85 (Location Response Selections). Work on LT-9 and LT-12

This commit is contained in:
Erik Ziegler committed 2015-12-20 18:24:51 -05:00
1 parent 28cee350ff
commit 220ff065dc
44 files changed
+1515 -824

No files matched your search

@@ -0,0 +1,51 @@
function closeHandler() {
// Hide the lesion dialog
$("#confirmDeleteDialog").css('display', 'none');
// Remove the backdrop
$(".removableBackdrop").remove();
// Remove the callback from the template data
delete Template.confirmDeleteDialog.doneCallback;
}
showConfirmDialog = function(doneCallback) {
// Show the backdrop
UI.render(Template.removableBackdrop, document.body);
// Make sure the context menu is closed when the user clicks away
$(".removableBackdrop").one('mousedown touchstart', function() {
closeHandler();
});
$("#confirmDeleteDialog").css('display', 'block');
if (doneCallback && typeof doneCallback === 'function') {
Template.confirmDeleteDialog.doneCallback = doneCallback;
}
};
Template.confirmDeleteDialog.events({
'click #cancel, click #close': function() {
closeHandler();
},
'click #confirm': function() {
var doneCallback = Template.confirmDeleteDialog.doneCallback;
if (doneCallback && typeof doneCallback === 'function') {
doneCallback();
}
closeHandler();
},
'keypress #confirmDeleteDialog': function(e) {
if (this.keyPressAllowed === false) {
return;
}
// If Enter is pressed, close the dialog
if (e.which === 13) {
closeHandler();
}
}
});