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 50: | Line 50: | ||
$(document).ready(function () { | $(document).ready(function () { | ||
//Update the Screening Visit Window | //Update the Screening Visit Window | ||
var $j = jQuery.noConflict(); | |||
//Check Entered Screening Visit Date | //Check Entered Screening Visit Date | ||
$("#screenDate").datepicker({ | $j("#screenDate").datepicker({ | ||
onSelect: function() { | onSelect: function() { | ||
$("#eventDate").datepicker(); | $("#eventDate").datepicker(); | ||
Line 59: | Line 59: | ||
} | } | ||
}); | }); | ||
$("#eventDate").datepicker({ | $j("#eventDate").datepicker({ | ||
onSelect: function(curDate, instance) { | onSelect: function(curDate, instance) { | ||
if(curDate != instance.lastVal) { | if(curDate != instance.lastVal) { | ||
Line 69: | Line 69: | ||
//"Enable" some pretty jQuery UI actions | //"Enable" some pretty jQuery UI actions | ||
$.datepicker.setDefaults({dateFormat: "dd-M-yy" }); | $.datepicker.setDefaults({dateFormat: "dd-M-yy" }); | ||
$(".date").datepicker(); | $j(".date").datepicker(); | ||
nextApptHour = $( "#nextApptHour" ).spinner(); | nextApptHour = $( "#nextApptHour" ).spinner(); | ||
$("#nextApptHour").spinner({min: 0}); | $j("#nextApptHour").spinner({min: 0}); | ||
$("#nextApptHour").spinner({max: 24}); | $j("#nextApptHour").spinner({max: 24}); | ||
nextApptMinute = $( "#nextApptMinute" ).spinner(); | nextApptMinute = $( "#nextApptMinute" ).spinner(); | ||
$("#nextApptMinute").spinner({min: 0}); | $j("#nextApptMinute").spinner({min: 0}); | ||
$("#nextApptMinute").spinner({max: 60}); | $j("#nextApptMinute").spinner({max: 60}); | ||
day1 = new Date(); | day1 = new Date(); | ||
Line 92: | Line 92: | ||
timeConstraints = checkStudy($("#subStudy").val()); | timeConstraints = checkStudy($("#subStudy").val()); | ||
lockFields("disabled"); | lockFields("disabled"); | ||
day1 = $("#eventDate").datepicker("getDate"); | day1 = $j("#eventDate").datepicker("getDate"); | ||
screenDate = $("#screenDate").datepicker("getDate"); | screenDate = $j("#screenDate").datepicker("getDate"); | ||
target = targetDates(visitCounter); | target = targetDates(visitCounter); | ||
Line 157: | Line 157: | ||
//This uses the information from the previous iteration to decide if the infusion dates need | //This uses the information from the previous iteration to decide if the infusion dates need | ||
//to be bumped back. | //to be bumped back. | ||
// logDifferenceinDates(target.name,$("#nextApptDate").datepicker("getDate")) | // logDifferenceinDates(target.name,$j("#nextApptDate").datepicker("getDate")) | ||
bumpDates(target.shortDescr,timeConstraints,target.dtar,$("#nextApptDate").datepicker("getDate")); | bumpDates(target.shortDescr,timeConstraints,target.dtar,$j("#nextApptDate").datepicker("getDate")); | ||
//Update Patient Schedule Table | //Update Patient Schedule Table | ||
Line 204: | Line 204: | ||
//to be bumped back. | //to be bumped back. | ||
// logDifferenceinDates(target.name,$("#nextApptDate").datepicker("getDate")) | // logDifferenceinDates(target.name,$("#nextApptDate").datepicker("getDate")) | ||
bumpDates(target.shortDescr,timeConstraints,target.dtar,$("#nextApptDate").datepicker("getDate")); | bumpDates(target.shortDescr,timeConstraints,target.dtar,$j("#nextApptDate").datepicker("getDate")); | ||
//Update Patient Schedule Table | //Update Patient Schedule Table | ||
Line 246: | Line 246: | ||
function submitNextAppt (){ | function submitNextAppt (){ | ||
var scheduledDate = $("#nextApptDate").datepicker("getDate"); | var scheduledDate = $j("#nextApptDate").datepicker("getDate"); | ||
var nextApptDate = new Date(scheduledDate.getFullYear(),scheduledDate.getMonth(),scheduledDate.getDate(),("0"+$("#nextApptHour").val()).slice(-2),("0"+$("#nextApptMinute").val()).slice(-2) ) | var nextApptDate = new Date(scheduledDate.getFullYear(),scheduledDate.getMonth(),scheduledDate.getDate(),("0"+$("#nextApptHour").val()).slice(-2),("0"+$("#nextApptMinute").val()).slice(-2) ) | ||
var tstart = ("0"+$("#nextApptHour").val()).slice(-2)+("0"+$("#nextApptMinute").val()).slice(-2); | var tstart = ("0"+$("#nextApptHour").val()).slice(-2)+("0"+$("#nextApptMinute").val()).slice(-2); |