Widget:MattTest: Difference between revisions
Jump to navigation
Jump to search
Matt Pijoan (talk | contribs) No edit summary |
Matt Pijoan (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
<script src="https://code.jquery.com/jquery-1.9.1.js"></script> | |||
<link rel="stylesheet" href="https://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> | <link rel="stylesheet" href="https://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> | ||
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> | |||
<script type="text/javascript"> | <script type="text/javascript"> | ||
// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys | // From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys | ||
Line 50: | Line 50: | ||
$(document).ready(function () { | $(document).ready(function () { | ||
//Update the Screening Visit Window | //Update the Screening Visit Window | ||
$("#missedInfusion").dialog({ | |||
autoOpen: false | |||
}); | |||
$("#beforeWindow").dialog({ | |||
autoOpen: false | |||
}); | |||
$("#afterWindow").dialog({ | |||
autoOpen: false | |||
}); | |||
$("#missedInfusionWarning").dialog({ | |||
autoOpen: false | |||
}); | |||
$("#delayedInfusion").dialog({ | |||
autoOpen: false | |||
}); | |||
//Check Entered Screening Visit Date | //Check Entered Screening Visit Date | ||
$("#screenDate").datepicker({ | $("#screenDate").datepicker({ | ||
onSelect: function() { | onSelect: function() { | ||
checkScreenDate( | checkScreenDate(); | ||
} | } | ||
}); | }); | ||
Line 61: | Line 78: | ||
onSelect: function(curDate, instance) { | onSelect: function(curDate, instance) { | ||
if(curDate != instance.lastVal) { | if(curDate != instance.lastVal) { | ||
screenUpdate( | screenUpdate(); | ||
} | } | ||
} | } | ||
Line 145: | Line 162: | ||
}); | }); | ||
}); | |||
///////////// | ///////////// | ||
// | // | ||
Line 796: | Line 813: | ||
} | } | ||
function screenUpdate( | function screenUpdate(){ | ||
var event = | var event = $("#eventDate").datepicker("getDate"); | ||
var screenMin = new Date(event.getFullYear(),event.getMonth(),event.getDate()); | var screenMin = new Date(event.getFullYear(),event.getMonth(),event.getDate()); | ||
Line 807: | Line 824: | ||
} | } | ||
function checkScreenDate( | function checkScreenDate(){ | ||
var screen = $("#screenDate").datepicker("getDate"); | |||
var event = | var event = $("#eventDate").datepicker("getDate"); | ||
var screenMin = new Date(event.getFullYear(),event.getMonth(),event.getDate()); | var screenMin = new Date(event.getFullYear(),event.getMonth(),event.getDate()); | ||
var screenMax = new Date(event.getFullYear(),event.getMonth(),event.getDate() + 5 ); | var screenMax = new Date(event.getFullYear(),event.getMonth(),event.getDate() + 5 ); | ||
Line 956: | Line 974: | ||
console.log(visitName+" occurs Study Day"+studyDays); | console.log(visitName+" occurs Study Day"+studyDays); | ||
} | } | ||
</script> | </script> | ||
<style type="text/css"> | <style type="text/css"> |