diff --git a/src/main/webapp/PMmodule/ClientManager/ocan_staff_form_validation.js b/src/main/webapp/PMmodule/ClientManager/ocan_staff_form_validation.js index f6b13b79dfa..2102d08a1d6 100755 --- a/src/main/webapp/PMmodule/ClientManager/ocan_staff_form_validation.js +++ b/src/main/webapp/PMmodule/ClientManager/ocan_staff_form_validation.js @@ -1211,8 +1211,6 @@ $("document").ready(function () { $("#1_where_live").change(function () { - //var version = $().jquery; - //alert("jquery version="+version); if ($("#1_where_live").val() == "OTH") { $("#1_where_live_other").attr("disabled", ""); $("#1_where_live_other").val(""); @@ -2850,8 +2848,6 @@ $("document").ready(function () { }); - - //$("#serviceUseRecord_orgLHIN") }); $("document").ready(function () { @@ -3184,8 +3180,6 @@ function submitOcanForm() { } } - - //medication_1_se_description var medicationFailed = false; $("input[value='410515003']").each(function () { if (medicationFailed) { diff --git a/src/main/webapp/casemgmt/noteProgram.js b/src/main/webapp/casemgmt/noteProgram.js index fc629582cdb..6ba599b4233 100644 --- a/src/main/webapp/casemgmt/noteProgram.js +++ b/src/main/webapp/casemgmt/noteProgram.js @@ -294,8 +294,6 @@ var _setupProgramList = function () { jQuery(programList).empty(); for (var p = 0; p < data.programs.length; p++) { _programRoleMap[data.programs[p].programNo] = data.programs[p].roleAccess; - //if (data.programs[p].programName.endsWith("(discharged)")) - // data.programs[p].programName = data.programs[p].programName.substring(0, data.programs[p].programName.indexOf("(discharged)") - 1) jQuery(programList).append( jQuery("") .attr("value", data.programs[p].programNo) @@ -340,4 +338,4 @@ var _setCurrentProgramAndRoleIdForNote = function (noteId) { if (typeof console != "undefined") console.log("Setting program_no=" + programNo + ", role_id=" + roleId); -}; \ No newline at end of file +}; diff --git a/src/main/webapp/colorpicker/colormethods.js b/src/main/webapp/colorpicker/colormethods.js index a5d18e1a4b4..8944ae7366d 100755 --- a/src/main/webapp/colorpicker/colormethods.js +++ b/src/main/webapp/colorpicker/colormethods.js @@ -76,16 +76,6 @@ Refresh.Web.ColorMethods = { var r = '00', g = '00', b = '00'; - /* - if (hex.length == 3) { - r = hex.substring(0,1); - g = hex.substring(1,2); - b = hex.substring(2,3); - } else if (hex.length == 6) { - r = hex.substring(0,2); - g = hex.substring(2,4); - b = hex.substring(4,6); - */ if (hex.length == 6) { r = hex.substring(0, 2); g = hex.substring(2, 4); @@ -263,4 +253,4 @@ Refresh.Web.ColorMethods = { return rgb; } -}; \ No newline at end of file +}; diff --git a/src/main/webapp/colorpicker/colorpicker.js b/src/main/webapp/colorpicker/colorpicker.js index 0a44ab67f34..e549d8b052e 100755 --- a/src/main/webapp/colorpicker/colorpicker.js +++ b/src/main/webapp/colorpicker/colorpicker.js @@ -27,7 +27,6 @@ Refresh.Web.ColorPicker.prototype = { this._redRadio = $(this.id + '_RedRadio'); this._greenRadio = $(this.id + '_GreenRadio'); this._blueRadio = $(this.id + '_BlueRadio'); - //this._webSafeCheck = $(this.id + '_WebSafeCheck'); this._hueRadio.value = 'h'; this._saturationRadio.value = 's'; @@ -49,9 +48,6 @@ Refresh.Web.ColorPicker.prototype = { Event.observe(this._greenRadio, 'click', this._event_onRadioClicked); Event.observe(this._blueRadio, 'click', this._event_onRadioClicked); - //this._event_webSafeClicked = this._onWebSafeClicked.bindAsEventListener(this); - //Event.observe( this._webSafeCheck, 'click', this._event_webSafeClicked); - // attach simple properties this._preview = $(this.id + '_Preview'); @@ -314,8 +310,6 @@ Refresh.Web.ColorPicker.prototype = { this.setImg(this._barL2, this.settings.clientFilesPath + 'bar-blue-br.png'); this.setImg(this._barL1, this.settings.clientFilesPath + 'bar-blue-bl.png'); - //this.setImg(this._barL4, this.settings.clientFilesPath + 'bar-hue.png'); - break; default: diff --git a/src/main/webapp/colorpicker/prototype.js b/src/main/webapp/colorpicker/prototype.js index 632ba83df54..11e00b102f4 100755 --- a/src/main/webapp/colorpicker/prototype.js +++ b/src/main/webapp/colorpicker/prototype.js @@ -4285,4 +4285,4 @@ Object.extend(Element.ClassNames.prototype, Enumerable); /*--------------------------------------------------------------------------*/ -Element.addMethods(); \ No newline at end of file +Element.addMethods(); diff --git a/src/main/webapp/colorpicker/slider.js b/src/main/webapp/colorpicker/slider.js index 43fcf467606..db4d1c72623 100755 --- a/src/main/webapp/colorpicker/slider.js +++ b/src/main/webapp/colorpicker/slider.js @@ -270,5 +270,3 @@ Refresh.Web.Slider.prototype = { } } - - diff --git a/src/main/webapp/commons/scripts/sort_table/common.js b/src/main/webapp/commons/scripts/sort_table/common.js index 800d41cd8f8..9b44ab0be3a 100755 --- a/src/main/webapp/commons/scripts/sort_table/common.js +++ b/src/main/webapp/commons/scripts/sort_table/common.js @@ -102,4 +102,3 @@ function getEventTarget(e) { return targ; } - diff --git a/src/main/webapp/commons/scripts/sort_table/css.js b/src/main/webapp/commons/scripts/sort_table/css.js index 22cb3f6a00d..3ed2341eda5 100755 --- a/src/main/webapp/commons/scripts/sort_table/css.js +++ b/src/main/webapp/commons/scripts/sort_table/css.js @@ -122,4 +122,4 @@ var css = { el.className = this.privateCreateClassString(classArray); } -} \ No newline at end of file +} diff --git a/src/main/webapp/commons/scripts/sort_table/standardista-table-sorting.js b/src/main/webapp/commons/scripts/sort_table/standardista-table-sorting.js index f1fb730d560..f8b58a3e8aa 100755 --- a/src/main/webapp/commons/scripts/sort_table/standardista-table-sorting.js +++ b/src/main/webapp/commons/scripts/sort_table/standardista-table-sorting.js @@ -119,7 +119,6 @@ var standardistaTableSorting = { // the column we want is indicated by td.cellIndex var column = linkEl.getAttribute('columnId') || td.cellIndex; - //var column = td.cellIndex; // find out what the current sort order of this column is var arrows = css.getElementsByClass(td, 'tableSortArrow', 'span'); @@ -379,4 +378,4 @@ function standardistaTableSortingInit() { standardistaTableSorting.init(); } -addEvent(window, 'load', standardistaTableSortingInit) \ No newline at end of file +addEvent(window, 'load', standardistaTableSortingInit) diff --git a/src/main/webapp/documentManager/showDocument.js b/src/main/webapp/documentManager/showDocument.js index 9dbfed2aa58..ee8d6ebc2bd 100644 --- a/src/main/webapp/documentManager/showDocument.js +++ b/src/main/webapp/documentManager/showDocument.js @@ -58,4 +58,3 @@ function setupDemoAutoCompletion(docId, contextPath) { }); } } - diff --git a/src/main/webapp/eform/eformFloatingToolbar/eform_floating_toolbar.js b/src/main/webapp/eform/eformFloatingToolbar/eform_floating_toolbar.js index 53ac76e41ae..6d0edcbee10 100644 --- a/src/main/webapp/eform/eformFloatingToolbar/eform_floating_toolbar.js +++ b/src/main/webapp/eform/eformFloatingToolbar/eform_floating_toolbar.js @@ -824,4 +824,4 @@ jQuery(window).on('load', function () { }).appendTo("form[method='POST']"); }) } -}) \ No newline at end of file +}) diff --git a/src/main/webapp/form/eCARES/dictionary.js b/src/main/webapp/form/eCARES/dictionary.js index 9af7f8c6186..64480973bea 100644 --- a/src/main/webapp/form/eCARES/dictionary.js +++ b/src/main/webapp/form/eCARES/dictionary.js @@ -931,4 +931,4 @@ const ECGA_SCORE = ECGA_DICTIONARY.filter(d => { } return false -}) \ No newline at end of file +}) diff --git a/src/main/webapp/form/eCARES/eCARES_v1.js b/src/main/webapp/form/eCARES/eCARES_v1.js index 6499f0183e2..2858c8f537e 100644 --- a/src/main/webapp/form/eCARES/eCARES_v1.js +++ b/src/main/webapp/form/eCARES/eCARES_v1.js @@ -371,7 +371,6 @@ function renderGraph() { } $(document).ready(function ($) { - // audit(); handleFallsNumber(); const contextPath = $("#contextPath").html(); const formId = $('input[name="formId"]').val(); diff --git a/src/main/webapp/form/formScripts.js b/src/main/webapp/form/formScripts.js index c91ec1dcc1f..c52a5d66552 100755 --- a/src/main/webapp/form/formScripts.js +++ b/src/main/webapp/form/formScripts.js @@ -327,36 +327,22 @@ function isFormCompleted(startEle, endEle, nbCheck, nbText) { var countCheck = 0; var countText = 0; var confirmed = true; - //var nbItems = endEle - startEle + 1; - //var emptyFields = new Array(nbItems); - //var index = 0; + for (var i = startEle; i <= endEle; i++) { - //document.forms[0].elements[i].style.backgroundColor='white'; if (document.forms[0].elements[i].type == "checkbox") { if (document.forms[0].elements[i].checked == true) { countCheck++; } - //else{ - // emptyFields[index] = i; - // index++; - //} } else if (document.forms[0].elements[i].type == "text") { if (document.forms[0].elements[i].value != null) { var text = trim(document.forms[0].elements[i].value); if (text.length != 0) countText++; } - //else{ - // emptyFields[index] = i; - // index++; - //} } } if (countCheck < nbCheck || countText < nbText) { - //for(var i=0; iThis health card has expired."); - } - - } - - jQuery("input[name='keyword']").val(args["hin"]); - jQuery("input[name='search_mode'][value='search_hin']").attr("checked", "checked"); - - jQuery("form[name='titlesearch']").submit(); - - _hc_windowTimeout = setTimeout(function () { - jQuery("#_hc_window").css("display", "none"); - }, 3000); - } - - jQuery(window).css("display", "block"); -} - -jQuery(document).ready(function () { - jQuery("#_hc_window #_hc_matchSearch img").attr("src", ctx + "/images/DMSLoader.gif"); - - jQuery("#_hc_window #_hc_closeBtn").click(function () { - jQuery("#_hc_window").hide(); - }); - - new HealthCardHandler(_hc_searchHandler); -}); \ No newline at end of file diff --git a/src/main/webapp/hospitalReportManager/hrmActions.js b/src/main/webapp/hospitalReportManager/hrmActions.js index 6d4ba81bf3b..43f240fe694 100644 --- a/src/main/webapp/hospitalReportManager/hrmActions.js +++ b/src/main/webapp/hospitalReportManager/hrmActions.js @@ -245,4 +245,4 @@ function setupHrmDemoAutoCompletion(docId, csrfToken) { } }); } -} \ No newline at end of file +} diff --git a/src/main/webapp/hospitalReportManager/inbox.js b/src/main/webapp/hospitalReportManager/inbox.js index 7f1f7d6dede..3b54ce8972f 100644 --- a/src/main/webapp/hospitalReportManager/inbox.js +++ b/src/main/webapp/hospitalReportManager/inbox.js @@ -165,7 +165,6 @@ function updateProviderFilter() { $("#libraryTable").DataTable().ajax.reload(); - //alert(providerNoVal + "\n" + providerUnmatchedVal); } function reloadTable() { @@ -204,4 +203,4 @@ function getHrmStatus() { } }); -} \ No newline at end of file +} diff --git a/src/main/webapp/js/AlphaTextBox.js b/src/main/webapp/js/AlphaTextBox.js index 45478b76df8..4b38a59ff0f 100755 --- a/src/main/webapp/js/AlphaTextBox.js +++ b/src/main/webapp/js/AlphaTextBox.js @@ -34,4 +34,3 @@ dojo.widget.defineWidget( return dojo.validate.isText(this.textbox.value, this.flags) && this.textbox.value.match('[^0-9]'); } }) - diff --git a/src/main/webapp/js/DT_bootstrap.js b/src/main/webapp/js/DT_bootstrap.js index 9ceb2a24483..7da0fdaee5e 100644 --- a/src/main/webapp/js/DT_bootstrap.js +++ b/src/main/webapp/js/DT_bootstrap.js @@ -143,4 +143,3 @@ if ($.fn.DataTable.TableTools) { } }); } - diff --git a/src/main/webapp/js/DemographicInfo.js b/src/main/webapp/js/DemographicInfo.js deleted file mode 100755 index 5571cf3a63b..00000000000 --- a/src/main/webapp/js/DemographicInfo.js +++ /dev/null @@ -1,182 +0,0 @@ -function redirectToClientSearch(demographicNo, startRowCount, path) { - - document.demographicForm.action = path + "?demographicNo=" + demographicNo + - "&rowCountPassStr=" + startRowCount; - document.demographicForm.submit(); -} - -function rs(n, u, w, h, x) { - args = "width=" + w + ",height=" + h + ",resizable=yes,scrollbars=yes,status=0,top=360,left=30"; - remote = window.open(u, n, args); - if (remote != null) { - if (remote.opener == null) - remote.opener = self; - } - if (x == 1) { - return remote; - } -} - -var awnd = null; - -function ScriptAttach() { - awnd = rs('swipe', 'zdemographicswipe.htm', 600, 600, 1); - awnd.focus(); -} - -function setfocus() { - this.focus(); - document.titlesearch.keyword.focus(); - document.titlesearch.keyword.select(); -} - -function upCaseCtrl(ctrl) { - ctrl.value = ctrl.value.toUpperCase(); -} - -function popupPage(vheight, vwidth, varpage) { //open a new popup window - var page = "" + varpage; - windowprops = "height=" + vheight + ",width=" + vwidth + ",location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,screenX=50,screenY=50,top=20,left=20"; - var popup = window.open(page, "demodetail", windowprops); - if (popup != null) { - if (popup.opener == null) { - popup.opener = self; - } - } -} - -function popupEChart(vheight, vwidth, varpage) { //open a new popup window - var page = "" + varpage; - windowprops = "height=" + vheight + ",width=" + vwidth + ",location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,screenX=50,screenY=50,top=20,left=20"; - var popup = window.open(page, "apptProvider", windowprops); - if (popup != null) { - if (popup.opener == null) { - popup.opener = self; - } - } -} - -function popupOscarRx(vheight, vwidth, varpage) { //open a new popup window - var page = varpage; - windowprops = "height=" + vheight + ",width=" + vwidth + ",location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,screenX=0,screenY=0,top=0,left=0"; - var popup = window.open(varpage, "oscarRx", windowprops); - if (popup != null) { - if (popup.opener == null) { - popup.opener = self; - } - } -} - -function checkTypeIn() { - var dob = document.titlesearch.keyword; - typeInOK = false; - - if (document.titlesearch.search_mode[2].checked) { - if (dob.value.length == 8) { - dob.value = dob.value.substring(0, 4) + "-" + dob.value.substring(4, 6) + "-" + dob.value.substring(6, 8); - //alert(dob.value.length); - typeInOK = true; - } - if (dob.value.length != 10) { - alert("You have a wrong DOB input!!!"); - typeInOK = false; - } - - return typeInOK; - } else { - return true; - } -} - -function checkTypeInEdit() { - var typeInOK = false; - if (document.updatedelete.last_name.value != "" && document.updatedelete.first_name.value != "" && document.updatedelete.sex.value != "") { - if (checkTypeNum(document.updatedelete.year_of_birth.value) && checkTypeNum(document.updatedelete.month_of_birth.value) && checkTypeNum(document.updatedelete.date_of_birth.value)) { - typeInOK = true; - } - } - if (!typeInOK) alert("You must type in the following fields: Last Name, First Name, DOB, and Sex."); - return typeInOK; -} - -function checkTypeNum(typeIn) { - var typeInOK = true; - var i = 0; - var length = typeIn.length; - var ch; - // walk through a string and find a number - if (length >= 1) { - while (i < length) { - ch = typeIn.substring(i, i + 1); - if (ch == "-") { - i++; - continue; - } - if ((ch < "0") || (ch > "9")) { - typeInOK = false; - break; - } - i++; - } - } else typeInOK = false; - return typeInOK; -} - -function formatPhoneNum() { - if (document.updatedelete.phone.value.length == 10) { - document.updatedelete.phone.value = document.updatedelete.phone.value.substring(0, 3) + "-" + document.updatedelete.phone.value.substring(3, 6) + "-" + document.updatedelete.phone.value.substring(6); - } - if (document.updatedelete.phone.value.length == 11 && document.updatedelete.phone.value.charAt(3) == '-') { - document.updatedelete.phone.value = document.updatedelete.phone.value.substring(0, 3) + "-" + document.updatedelete.phone.value.substring(4, 7) + "-" + document.updatedelete.phone.value.substring(7); - } - if (document.updatedelete.phone2.value.length == 10) { - document.updatedelete.phone2.value = document.updatedelete.phone2.value.substring(0, 3) + "-" + document.updatedelete.phone2.value.substring(3, 6) + "-" + document.updatedelete.phone2.value.substring(6); - } - if (document.updatedelete.phone2.value.length == 11 && document.updatedelete.phone2.value.charAt(3) == '-') { - document.updatedelete.phone2.value = document.updatedelete.phone2.value.substring(0, 3) + "-" + document.updatedelete.phone2.value.substring(4, 7) + "-" + document.updatedelete.phone2.value.substring(7); - } -} - -function checkONReferralNo() { - var referralNo = document.updatedelete.r_doctor_ohip.value; - if (document.updatedelete.hc_type.value == 'ON' && referralNo.length > 0 && referralNo.length != 6) { - alert("The referral doctor's no. is wrong. Please correct it!"); - } -} - -function refresh() { - //history.go(0); -} - -function rs(n, u, w, h, x) { - args = "width=" + w + ",height=" + h + ",resizable=yes,scrollbars=yes,status=0,top=60,left=30"; - remote = window.open(u, n, args); -} - -function referralScriptAttach2(elementName, name2) { - var d = elementName; - t0 = escape("document.forms[1].elements[\'" + d + "\'].value"); - t1 = escape("document.forms[1].elements[\'" + name2 + "\'].value"); - rs('att', ('../billing/CA/ON/searchRefDoc.jsp?param=' + t0 + '¶m2=' + t1), 600, 600, 1); -} - -function newStatus() { - newOpt = prompt("Please enter the new status:", ""); - if (newOpt != "") { - document.updatedelete.patient_status.options[document.updatedelete.patient_status.length] = new Option(newOpt, newOpt); - document.updatedelete.patient_status.options[document.updatedelete.patient_status.length - 1].selected = true; - } else { - alert("Invalid entry"); - } -} - -function searchInactive() { - document.titlesearch.ptstatus.value = "inactive"; - if (checkTypeIn()) document.titlesearch.submit(); -} - -function searchAll() { - document.titlesearch.ptstatus.value = ""; - if (checkTypeIn()) document.titlesearch.submit(); -} - diff --git a/src/main/webapp/js/FileSaver.js b/src/main/webapp/js/FileSaver.js index f07001bc37d..07cff2ff343 100644 --- a/src/main/webapp/js/FileSaver.js +++ b/src/main/webapp/js/FileSaver.js @@ -244,4 +244,4 @@ var saveAs = saveAs // while `this` is nsIContentFrameMessageManager // with an attribute `content` that corresponds to the window -if (typeof module !== "undefined") module.exports = saveAs; \ No newline at end of file +if (typeof module !== "undefined") module.exports = saveAs; diff --git a/src/main/webapp/js/HSFO2.js b/src/main/webapp/js/HSFO2.js index b6ceeb2babe..9148343d310 100644 --- a/src/main/webapp/js/HSFO2.js +++ b/src/main/webapp/js/HSFO2.js @@ -9,7 +9,6 @@ function confirmReset(form1) { } function confirmExit(frm) { - //if (window.confirm("Are you SURE you want to exit without saving? Click OK to continue, Cancel to return to the form and save.")) if (window.confirm("Any UNSAVED changes will be lost. Click OK to exit the form, or CANCEL to return to the form.")) { // closing script window.close(); @@ -41,14 +40,6 @@ function checkform(registrationForm) { form1.FName.focus(); return false; } - -// if (!/^\d\d\d\d$/.test(form1.consentDate_year.value) || form1.consentDate_year.value == "") -// { -// alert("Please enter patient's year of consent."); -// form1.consentDate_year.focus(); -// return false; -// } - if (!/^\d\d\d\d$/.test(form1.BirthDate_year.value) || form1.BirthDate_year.value == "") { alert("Please enter patient's year of birth."); form1.BirthDate_year.focus(); @@ -78,18 +69,6 @@ function checkform(registrationForm) { alert("Please select patient's sex."); return false; } -// if (form1.PharmacyName.value == "") -// { -// alert("Please enter patient's pharmacy name."); -// form1.PharmacyName.focus(); -// return false; -// } -// if (form1.PharmacyLocation.value == "") -// { -// alert("Please enter patient's pharmacy address."); -// form1.PharmacyLocation.focus(); -// return false; -// } if (!form1.Ethnic_White.checked && !form1.Ethnic_Black.checked && !form1.Ethnic_EIndian.checked && !form1.Ethnic_Pakistani.checked && !form1.Ethnic_SriLankan.checked && !form1.Ethnic_Bangladeshi.checked && !form1.Ethnic_Chinese.checked && !form1.Ethnic_Japanese.checked && !form1.Ethnic_Korean.checked && !form1.Ethnic_FirstNation.checked @@ -125,12 +104,6 @@ function checkform(registrationForm) { return false; } } -// if (form1.consentDate_year.value < 2007) -// { -// alert("Please check that the year of consent is greater than 2006"); -// form1.consentDate_year.focus(); -// return false; -// } if (!form1.Height_unit[0].checked && !form1.Height_unit[1].checked) { alert("Please select patient's height measurement."); @@ -172,18 +145,6 @@ function checkform(registrationForm) { form1.DBP.focus(); return false; } -// if (!form1.SBP_goal.value == "" && (form1.SBP_goal.value < 40 || form1.SBP_goal.value > 300 || isNaN(parseFloat(form1.SBP_goal.value)))) -// { -// alert("Please check that SBP goal is between 40 and 300"); -// form1.SBP_goal.focus(); -// return false; -// } -// if (!form1.DBP_goal.value == "" && (form1.DBP_goal.value < 0 || form1.DBP_goal.value > 140 || isNaN(parseFloat(form1.DBP_goal.value)))) -// { -// alert("Please check that DBP goal is between 0 and 140"); -// form1.DBP_goal.focus(); -// return false; -// } if (!form1.WeightP1.value == "" && (form1.WeightP1.value < 35 || form1.WeightP1.value > 250 || isNaN(form1.WeightP1.value)) && form1.Weight_unit[0].checked) { alert("Please check that weight is between 35 and 250 kg"); form1.WeightP1.focus(); @@ -332,27 +293,6 @@ function checkform(registrationForm) { form1.nextVisitInWeeks.focus(); return false; } -// if (!form1.exercise_minPerWk.value == "" -// && (form1.exercise_minPerWk.value < 0 || form1.exercise_minPerWk.value > 999 || isNaN(parseFloat(form1.exercise_minPerWk.value)))) -// { -// alert("Please check that exercise per week is between 0 and 999"); -// form1.exercise_minPerWk.focus(); -// return false; -// } -// if (!form1.smoking_cigsPerDay.value == "" -// && (form1.smoking_cigsPerDay.value < 0 || form1.smoking_cigsPerDay.value > 99 || isNaN(parseFloat(form1.smoking_cigsPerDay.value)))) -// { -// alert("Please check that smoking per day is between 0 and 99"); -// form1.smoking_cigsPerDay.focus(); -// return false; -// } -// if (!form1.alcohol_drinksPerWk.value == "" -// && (form1.alcohol_drinksPerWk.value < 0 || form1.alcohol_drinksPerWk.value > 99 || isNaN(parseFloat(form1.alcohol_drinksPerWk.value)))) -// { -// alert("Please check that alcohol per week is between 0 and 99"); -// form1.alcohol_drinksPerWk.focus(); -// return false; -// } if (!form1.assessActivity.value == "" && (form1.assessActivity.value < 0 || form1.assessActivity.value > 999 || isNaN(form1.assessActivity.value))) { @@ -510,18 +450,14 @@ function popupXmlMsg(path) { function flipview() { var regtable = document.getElementById('registartiontable'); var formtable = document.getElementById('graphtable'); - //alert(formtable.style.display); - //alert(regtable.style.display); if (regtable.style.display == "none") { - //alert("regtable"); regtable.style.display = ""; formtable.style.display = "none"; return false; } if (formtable.style.display == "none") { - //alert("formtable"); formtable.style.display = ""; regtable.style.display = "none"; return false; diff --git a/src/main/webapp/js/bootstrap-datepicker.js b/src/main/webapp/js/bootstrap-datepicker.js index 45260e4f11c..cf7d4d1eafd 100644 --- a/src/main/webapp/js/bootstrap-datepicker.js +++ b/src/main/webapp/js/bootstrap-datepicker.js @@ -28,7 +28,6 @@ .appendTo('body') .on({ click: $.proxy(this.click, this)//, - //mousedown: $.proxy(this.mousedown, this) }); this.isInput = this.element.is('input'); this.component = this.element.is('.date') ? this.element.find('.add-on') : false; @@ -36,7 +35,6 @@ if (this.isInput) { this.element.on({ focus: $.proxy(this.show, this), - //blur: $.proxy(this.hide, this), keyup: $.proxy(this.update, this) }); } else { @@ -119,7 +117,6 @@ if (!this.isInput) { $(document).off('mousedown', this.hide); } - //this.set(); this.element.trigger({ type: 'hide', date: this.date @@ -471,4 +468,4 @@ '' + ''; -}(window.jQuery); \ No newline at end of file +}(window.jQuery); diff --git a/src/main/webapp/js/bootstrap-multiselect.js b/src/main/webapp/js/bootstrap-multiselect.js index 0bb1efe5493..bc4ab578aa8 100644 --- a/src/main/webapp/js/bootstrap-multiselect.js +++ b/src/main/webapp/js/bootstrap-multiselect.js @@ -8,7 +8,7 @@ */ !function ($) { - "use strict";// jshint ;_; + "use strict"; if (typeof ko !== 'undefined' && ko.bindingHandlers && !ko.bindingHandlers.multiselect) { ko.bindingHandlers.multiselect = { @@ -163,7 +163,6 @@ enableFiltering: false, enableCaseInsensitiveFiltering: false, filterPlaceholder: 'Search', - // possible options: 'text', 'value', 'both' filterBehavior: 'text', preventInputChangeEvent: false, nonSelectedText: 'None selected', diff --git a/src/main/webapp/js/bootstrap.js b/src/main/webapp/js/bootstrap.js index 2843fa43983..2a706532baa 100644 --- a/src/main/webapp/js/bootstrap.js +++ b/src/main/webapp/js/bootstrap.js @@ -2290,4 +2290,4 @@ }) -}(window.jQuery); \ No newline at end of file +}(window.jQuery); diff --git a/src/main/webapp/js/caisi_report_tools.js b/src/main/webapp/js/caisi_report_tools.js index 4862f770fd5..3be751261d8 100755 --- a/src/main/webapp/js/caisi_report_tools.js +++ b/src/main/webapp/js/caisi_report_tools.js @@ -51,7 +51,6 @@ function createStreetHealthReport() { alert('Generating report for date ' + startDate); - //popupPage2('?startDate=' + startDate, "StreetHealthReport"); popupPage2("../PMmodule/StreetHealthIntakeReportAction.do?startDate=" + startDate, "StreetHealthReport"); } @@ -67,5 +66,3 @@ function popupPage2(varpage, windowname) { popup.focus(); } } - - diff --git a/src/main/webapp/js/custom/default/adddemo.js b/src/main/webapp/js/custom/default/adddemo.js deleted file mode 100644 index 44d0c5d90bb..00000000000 --- a/src/main/webapp/js/custom/default/adddemo.js +++ /dev/null @@ -1,11 +0,0 @@ -jQuery(document).ready(function () { - - jQuery("#addDemographicTbl #renewDateLbl").css("display", "none"); - jQuery("#addDemographicTbl #renewDate").css("display", "none"); - jQuery("#addDemographicTbl #countryLbl").insertAfter(jQuery("#addDemographicTbl #hcType")); - jQuery("#addDemographicTbl #countryCell").insertAfter(jQuery("#addDemographicTbl #countryLbl")); - - jQuery("#last_name").focus(); - jQuery("#last_name").select(); - window.resizeTo(1100, 700); -}); diff --git a/src/main/webapp/js/custom/default/cme.js b/src/main/webapp/js/custom/default/cme.js index 6cd2d5124be..60ff0e21eb8 100755 --- a/src/main/webapp/js/custom/default/cme.js +++ b/src/main/webapp/js/custom/default/cme.js @@ -8,4 +8,4 @@ jQuery(document).ready(function () { init(); -}); \ No newline at end of file +}); diff --git a/src/main/webapp/js/custom/default/conreq.js b/src/main/webapp/js/custom/default/conreq.js index d3e5f93d80d..ce154103446 100644 --- a/src/main/webapp/js/custom/default/conreq.js +++ b/src/main/webapp/js/custom/default/conreq.js @@ -1,2 +1 @@ //blank placeholder - diff --git a/src/main/webapp/js/custom/default/main.js b/src/main/webapp/js/custom/default/main.js index 920a3ab25db..d85b9110421 100644 --- a/src/main/webapp/js/custom/default/main.js +++ b/src/main/webapp/js/custom/default/main.js @@ -1,6 +1,5 @@ //navlist jQuery(document).ready(function () { -// jQuery("#navlist").append("
  • ConReport
  • "); jQuery("
  • ConReport
  • ").insertAfter("#con"); }); diff --git a/src/main/webapp/js/custom/default/master.js b/src/main/webapp/js/custom/default/master.js deleted file mode 100644 index 3c1456cb63b..00000000000 --- a/src/main/webapp/js/custom/default/master.js +++ /dev/null @@ -1,2 +0,0 @@ -jQuery(document).ready(function () { -}); diff --git a/src/main/webapp/js/custom/eyeform/cme.js b/src/main/webapp/js/custom/eyeform/cme.js index 56df5d77914..d1c8197efce 100644 --- a/src/main/webapp/js/custom/eyeform/cme.js +++ b/src/main/webapp/js/custom/eyeform/cme.js @@ -284,7 +284,6 @@ function notifyDivLoaded(divId) { } function messagesLoaded(savedId) { - //alert('messagesLoaded() - savedNoteId=' + savedId); var noteAddonUrl = ctx + "/eyeform/NoteData.do?method=getCurrentNoteData&demographicNo=" + demographicNo + "¬eId=" + savedId + "&appointmentNo=" + appointmentNo; jQuery.ajax({ url: noteAddonUrl, dataType: "html", success: function (data) { @@ -307,4 +306,4 @@ function messagesLoaded(savedId) { }); -} \ No newline at end of file +} diff --git a/src/main/webapp/js/custom/eyeform/global.js b/src/main/webapp/js/custom/eyeform/global.js index 940fa0c0935..383681cb9b2 100644 --- a/src/main/webapp/js/custom/eyeform/global.js +++ b/src/main/webapp/js/custom/eyeform/global.js @@ -7,7 +7,6 @@ function sendConRequestTickler(ctx, demographicNo) { req += '&frontFlag=true&providerNo='; req += document.EctConsultationFormRequestForm.providerl.value; } - //alert(req); jQuery.ajax({url: req, dataType: 'script'}); } else { alert("Please check the checkbox before click this button!"); @@ -18,7 +17,6 @@ function sendConReportTickler(ctx, demographicNo) { var req = ctx + "/eyeform/Eyeform.do?method=specialRepTickler&demographicNo=" + demographicNo; if (document.eyeForm.ack.checked == true) { req += '&docFlag=true'; - //alert(req); jQuery.ajax({url: req, dataType: 'script'}); } else { alert("Please check the checkbox before click this button!"); @@ -40,8 +38,6 @@ function addExam(ctx, listId, whereTo, appointmentNo) { } function addSection(fromList, toList) { - //alert(fromList); - //alert(toList); for (var x = 0; x < fromList.options.length; x++) { if (fromList.options[x].selected) { selectHeaderFromSection(fromList.options[x].value, toList); @@ -64,7 +60,6 @@ function selectHeaderFromSection(section, toList) { selectOption(toList, 'Manifest distance'); selectOption(toList, 'Manifest near'); selectOption(toList, 'Cycloplegic refraction'); - //selectOption(toList,'Best corrected distance vision'); } if (section == 'INTRAOCULAR PRESSURE') { @@ -128,4 +123,4 @@ function selectOption(toList, val) { toList.options[x].selected = true; } } -} \ No newline at end of file +} diff --git a/src/main/webapp/js/custom/eyeform/main.js b/src/main/webapp/js/custom/eyeform/main.js index 920a3ab25db..d85b9110421 100644 --- a/src/main/webapp/js/custom/eyeform/main.js +++ b/src/main/webapp/js/custom/eyeform/main.js @@ -1,6 +1,5 @@ //navlist jQuery(document).ready(function () { -// jQuery("#navlist").append("
  • ConReport
  • "); jQuery("
  • ConReport
  • ").insertAfter("#con"); }); diff --git a/src/main/webapp/js/custom/eyeform/master.js b/src/main/webapp/js/custom/eyeform/master.js deleted file mode 100644 index af96160c837..00000000000 --- a/src/main/webapp/js/custom/eyeform/master.js +++ /dev/null @@ -1,3 +0,0 @@ -jQuery(document).ready(function () { - jQuery("#appt_hx").after("Exam History"); -}); diff --git a/src/main/webapp/js/custom/eyeform_poc/cme.js b/src/main/webapp/js/custom/eyeform_poc/cme.js index 20f8a7b6ac0..7127fca6a3b 100644 --- a/src/main/webapp/js/custom/eyeform_poc/cme.js +++ b/src/main/webapp/js/custom/eyeform_poc/cme.js @@ -245,11 +245,7 @@ jQuery(document).ready(function () { removeNavDiv('OMeds'); removeNavDiv('allergies'); removeNavDiv('FamHistory'); - /* - var ocularMedsLabel = "oscarEncounter.NavBar.OcularMeds"; - addRightNavDiv("OcularMedication"); - popColumn(ctx + "/CaseManagementView.do?hc=CCDDAA&method=listNotes&providerNo=" + providerNo + "&demographicNo=" + demographicNo + "&issue_code=OcularMedication&title="+ocularMedsLabel+"&cmd=OcularMedication&appointment_no="+appointmentNo +"&noheight=true","OcularMedication","OcularMedication", "rightNavBar", this); - */ + addRightNavDiv("macro"); popColumn(ctx + "/oscarEncounter/displayMacro.do?hC=009999&appointment_no=" + appointmentNo, "macro", "macro", "rightNavBar", this); @@ -337,4 +333,4 @@ function messagesLoaded(savedId) { jQuery("#topContent").hide(); -} \ No newline at end of file +} diff --git a/src/main/webapp/js/custom/eyeform_poc/global.js b/src/main/webapp/js/custom/eyeform_poc/global.js index 6cc87fcce12..b3d7f7ea734 100644 --- a/src/main/webapp/js/custom/eyeform_poc/global.js +++ b/src/main/webapp/js/custom/eyeform_poc/global.js @@ -133,7 +133,6 @@ function sendConRequestTickler(ctx, demographicNo) { req += '&frontFlag=true&providerNo='; req += document.EctConsultationFormRequestForm.providerl.value; } - //alert(req); jQuery.ajax({url: req, dataType: 'script'}); } else { alert("Please check the checkbox before click this button!"); @@ -144,7 +143,6 @@ function sendConReportTickler(ctx, demographicNo) { var req = ctx + "/eyeform/Eyeform.do?method=specialRepTickler&demographicNo=" + demographicNo; if (document.eyeForm.ack.checked == true) { req += '&docFlag=true'; - //alert(req); jQuery.ajax({url: req, dataType: 'script'}); } else { alert("Please check the checkbox before click this button!"); @@ -166,8 +164,6 @@ function addExam(ctx, listId, whereTo, appointmentNo) { } function addSection(fromList, toList) { - //alert(fromList); - //alert(toList); for (var x = 0; x < fromList.options.length; x++) { if (fromList.options[x].selected) { selectHeaderFromSection(fromList.options[x].value, toList); @@ -190,7 +186,6 @@ function selectHeaderFromSection(section, toList) { selectOption(toList, 'Manifest distance'); selectOption(toList, 'Manifest near'); selectOption(toList, 'Cycloplegic refraction'); - //selectOption(toList,'Best corrected distance vision'); } if (section == 'INTRAOCULAR PRESSURE') { @@ -254,4 +249,4 @@ function selectOption(toList, val) { toList.options[x].selected = true; } } -} \ No newline at end of file +} diff --git a/src/main/webapp/js/custom/eyeform_poc/main.js b/src/main/webapp/js/custom/eyeform_poc/main.js index 920a3ab25db..d85b9110421 100644 --- a/src/main/webapp/js/custom/eyeform_poc/main.js +++ b/src/main/webapp/js/custom/eyeform_poc/main.js @@ -1,6 +1,5 @@ //navlist jQuery(document).ready(function () { -// jQuery("#navlist").append("
  • ConReport
  • "); jQuery("
  • ConReport
  • ").insertAfter("#con"); }); diff --git a/src/main/webapp/js/custom/eyeform_poc/master.js b/src/main/webapp/js/custom/eyeform_poc/master.js deleted file mode 100644 index af96160c837..00000000000 --- a/src/main/webapp/js/custom/eyeform_poc/master.js +++ /dev/null @@ -1,3 +0,0 @@ -jQuery(document).ready(function () { - jQuery("#appt_hx").after("Exam History"); -}); diff --git a/src/main/webapp/js/custom/ocan-staff.js b/src/main/webapp/js/custom/ocan-staff.js deleted file mode 100755 index 0a180603bd4..00000000000 --- a/src/main/webapp/js/custom/ocan-staff.js +++ /dev/null @@ -1,67 +0,0 @@ -$(document).ready(function () { - - - $("input[name='intake.answerMapped(201146).value']").change(function () { - $("input[name='intake.answerMapped(201145).value']").attr('checked', true); - }); - - //initialize validate - we can just do this in main jsp - $("form").validate({meta: "validate"}); - - //service org name/number - set variables, and set to read-only - $("input[question_id='service_org_name']").val($("#facility_name").val()); - $("input[question_id='service_org_number']").val($("#ocan_service_org_number").val()); - $("input[question_id='service_org_name']").attr("disabled", true); - $("input[question_id='service_org_number']").attr("disabled", true); - - - //onsubmit - $("form").submit(function () { - if (!$("form").valid()) { - return false; - } - - if (!validateStartAndCompletionDates()) { - return false; - } - - if ($("select[question_id='reason_for_assessment']").val() == 'OTHR') { - if ($("[question_id='reason_for_assessment_other']").val().length == 0) { - alert('Reason for assessment - Please specify other'); - return false; - } - } - - alert('passed validation'); - return false; - }); - -}); - -function validateStartAndCompletionDates() { - var start_date = $("input[question_id='start_date']").val(); - var completion_date = $("input[question_id='completion_date']").val(); - - sd = start_date.split("-"); - cd = completion_date.split("-"); - - var sdd = new Date(sd[0], sd[1] - 1, sd[2]); - var cdd = new Date(cd[0], cd[1] - 1, cd[2]); - - if (cdd <= sdd) { - alert('Completion Date must be after Start Date'); - return false; - } - - var millis = cdd.getTime() - sdd.getTime(); - var secs = millis / 1000; - var mins = secs / 60; - var hours = mins / 60; - var days = hours / 24; - - if (days > 30) { - alert('Completion Date must be within 30 days of Start Date'); - return false; - } - return true; -} \ No newline at end of file diff --git a/src/main/webapp/js/custom/ocean/adddemo.js b/src/main/webapp/js/custom/ocean/adddemo.js deleted file mode 100644 index 44d0c5d90bb..00000000000 --- a/src/main/webapp/js/custom/ocean/adddemo.js +++ /dev/null @@ -1,11 +0,0 @@ -jQuery(document).ready(function () { - - jQuery("#addDemographicTbl #renewDateLbl").css("display", "none"); - jQuery("#addDemographicTbl #renewDate").css("display", "none"); - jQuery("#addDemographicTbl #countryLbl").insertAfter(jQuery("#addDemographicTbl #hcType")); - jQuery("#addDemographicTbl #countryCell").insertAfter(jQuery("#addDemographicTbl #countryLbl")); - - jQuery("#last_name").focus(); - jQuery("#last_name").select(); - window.resizeTo(1100, 700); -}); diff --git a/src/main/webapp/js/custom/ocean/cme.js b/src/main/webapp/js/custom/ocean/cme.js index 5dd9af623f1..e7017eb50a5 100755 --- a/src/main/webapp/js/custom/ocean/cme.js +++ b/src/main/webapp/js/custom/ocean/cme.js @@ -28,7 +28,6 @@ jQuery(document).ready(function () { return; } - // init(); // rather than highjacking a
    lets put OCEAN where the OSCAR instance has allowance jQuery("#ocean_placeholder").show(); jQuery("#ocean_placeholder").append(""); diff --git a/src/main/webapp/js/custom/ocean/conreq.js b/src/main/webapp/js/custom/ocean/conreq.js index 2d1ef4f9f48..e535ec3b386 100644 --- a/src/main/webapp/js/custom/ocean/conreq.js +++ b/src/main/webapp/js/custom/ocean/conreq.js @@ -90,4 +90,3 @@ function attachOceanAttachments() { } }); } - diff --git a/src/main/webapp/js/custom/ocean/master.js b/src/main/webapp/js/custom/ocean/master.js deleted file mode 100644 index 3c1456cb63b..00000000000 --- a/src/main/webapp/js/custom/ocean/master.js +++ /dev/null @@ -1,2 +0,0 @@ -jQuery(document).ready(function () { -}); diff --git a/src/main/webapp/js/custom/renal/adddemo.js b/src/main/webapp/js/custom/renal/adddemo.js deleted file mode 100644 index 44d0c5d90bb..00000000000 --- a/src/main/webapp/js/custom/renal/adddemo.js +++ /dev/null @@ -1,11 +0,0 @@ -jQuery(document).ready(function () { - - jQuery("#addDemographicTbl #renewDateLbl").css("display", "none"); - jQuery("#addDemographicTbl #renewDate").css("display", "none"); - jQuery("#addDemographicTbl #countryLbl").insertAfter(jQuery("#addDemographicTbl #hcType")); - jQuery("#addDemographicTbl #countryCell").insertAfter(jQuery("#addDemographicTbl #countryLbl")); - - jQuery("#last_name").focus(); - jQuery("#last_name").select(); - window.resizeTo(1100, 700); -}); diff --git a/src/main/webapp/js/custom/renal/diab.js b/src/main/webapp/js/custom/renal/diab.js deleted file mode 100644 index c5e5cc5c949..00000000000 --- a/src/main/webapp/js/custom/renal/diab.js +++ /dev/null @@ -1,73 +0,0 @@ -function addToDx(codingSystem, code) { - jQuery.ajax({ - url: getContextPath() + "/renal/Renal.do?method=addtoDx&demographicNo=" + getDemographicNo() + "&codingSystem=" + codingSystem + "&code=" + code, - async: false, - success: function (data) { - if (data.result != '0') { - alert('added to Dx'); - } - location.href = 'TemplateFlowSheet.jsp?demographic_no=' + getDemographicNo() + '&template=diab2'; - } - }); -} - -jQuery(document).ready(function () { - jQuery("#print_box").before( - "
    " + - "

     Renal show/hide

    " + - "
    " + - "
      " + - "
    • Next Steps:
    • " + - "
    " + - "
    " + - "
    "); - - jQuery("#add_overdue").after( - "

    " + - "" + - "Add Renal" + - "

    " - ); - - jQuery.ajax({ - url: getContextPath() + "/renal/Renal.do?method=checkForDx&demographicNo=" + getDemographicNo() + "&codingSystem=icd9&code=250", - async: false, - success: function (data) { - //got it - if (data.result == false) { - jQuery('#dxaddshortcut_list').append("
  • Add Diabetes to Dx
  • "); - } - } - }); - jQuery.ajax({ - url: getContextPath() + "/renal/Renal.do?method=checkForDx&demographicNo=" + getDemographicNo() + "&codingSystem=icd9&code=401", - async: false, - success: function (data) { - //got it - if (data.result == false) { - jQuery('#dxaddshortcut_list').append("
  • Add Hypertension to Dx
  • "); - } - } - }); - jQuery.ajax({ - url: getContextPath() + "/renal/Renal.do?method=checkForDx&demographicNo=" + getDemographicNo() + "&codingSystem=icd9&code=585", - async: false, - success: function (data) { - //got it - if (data.result == false) { - jQuery('#dxaddshortcut_list').append("
  • Add Chronic Renal Failure to Dx
  • "); - } - } - }); - - //next steps - jQuery.ajax({ - url: getContextPath() + "/renal/Renal.do?method=getNextSteps&demographicNo=" + getDemographicNo(), - async: false, - success: function (data) { - jQuery("#renal_next_steps").html(data.result); - } - }); - - -}); \ No newline at end of file diff --git a/src/main/webapp/js/custom/renal/health_tracker.js b/src/main/webapp/js/custom/renal/health_tracker.js deleted file mode 100644 index 9e6ad8b4464..00000000000 --- a/src/main/webapp/js/custom/renal/health_tracker.js +++ /dev/null @@ -1,25 +0,0 @@ -function addToDx(codingSystem, code) { - jQuery.ajax({ - url: getContextPath() + "/renal/Renal.do?method=addtoDx&demographicNo=" + getDemographicNo() + "&codingSystem=" + codingSystem + "&code=" + code, - async: false, - success: function (data) { - if (data.result != '0') { - alert('added to Dx'); - location.href = 'TemplateFlowSheet.jsp?demographic_no=' + getDemographicNo() + '&template=diab3'; - } - } - }); -} - -jQuery(document).ready(function () { - - //next steps - jQuery.ajax({ - url: getContextPath() + "/renal/Renal.do?method=getNextSteps&demographicNo=" + getDemographicNo(), - async: false, - success: function (data) { - jQuery("#renal_next_steps").html(data.result); - } - }); - -}); diff --git a/src/main/webapp/js/custom/renal/indicators.js b/src/main/webapp/js/custom/renal/indicators.js deleted file mode 100644 index 321e0a35a9c..00000000000 --- a/src/main/webapp/js/custom/renal/indicators.js +++ /dev/null @@ -1,66 +0,0 @@ -function addToDx(codingSystem, code) { - jQuery.ajax({ - url: getContextPath() + "/renal/Renal.do?method=addtoDx&demographicNo=" + getDemographicNo() + "&codingSystem=" + codingSystem + "&code=" + code, - async: false, - success: function (data) { - if (data.result != '0') { - alert('added to Dx'); - location.href = 'TemplateFlowSheet.jsp?demographic_no=' + getDemographicNo() + '&template=diab3'; - } - } - }); -} - -jQuery(document).ready(function () { - $('#Renal_update').before( - "Next Steps" + - "Consider Referral" + - "" + - "Web Links" + - "CSN Algorithm Detection, Monitoring & Referral of CKD" + - " Kidney Foundation of Canada" + - "" + - "" - ); - - - $('#Renal_update_comments').css('border', 'none'); - - jQuery.ajax({ - url: getContextPath() + "/renal/Renal.do?method=checkForDx&demographicNo=" + getDemographicNo() + "&codingSystem=icd9&code=250", - async: false, - success: function (data) { - if (data.result == false) { - jQuery('#dxaddshortcut_list').append(" "); - } - } - }); - jQuery.ajax({ - url: getContextPath() + "/renal/Renal.do?method=checkForDx&demographicNo=" + getDemographicNo() + "&codingSystem=icd9&code=401", - async: false, - success: function (data) { - if (data.result == false) { - jQuery('#dxaddshortcut_list').append(" "); - } - } - }); - jQuery.ajax({ - url: getContextPath() + "/renal/Renal.do?method=checkForDx&demographicNo=" + getDemographicNo() + "&codingSystem=icd9&code=585", - async: false, - success: function (data) { - if (data.result == false) { - jQuery('#dxaddshortcut_list').append(""); - } - } - }); - - //next steps - jQuery.ajax({ - url: getContextPath() + "/renal/Renal.do?method=getNextSteps&demographicNo=" + getDemographicNo(), - async: false, - success: function (data) { - jQuery("#renal_next_steps").html(data.result); - } - }); - -}); diff --git a/src/main/webapp/js/custom/renal/master.js b/src/main/webapp/js/custom/renal/master.js deleted file mode 100644 index 3c1456cb63b..00000000000 --- a/src/main/webapp/js/custom/renal/master.js +++ /dev/null @@ -1,2 +0,0 @@ -jQuery(document).ready(function () { -}); diff --git a/src/main/webapp/js/custom/westernu/adddemo.js b/src/main/webapp/js/custom/westernu/adddemo.js deleted file mode 100644 index 335c2a7e3a3..00000000000 --- a/src/main/webapp/js/custom/westernu/adddemo.js +++ /dev/null @@ -1,180 +0,0 @@ -jQuery(document).ready(function () { - jQuery(jQuery("").append(jQuery("#addDemographicTbl #chartNoLbl")).append(jQuery("#addDemographicTbl #chartNo")).append(jQuery("#addDemographicTbl #hinLbl")).append(jQuery("#addDemographicTbl #hinVer"))).insertBefore(jQuery("#addDemographicTbl tr:first")); - jQuery("#addDemographicTbl #hcTypeLbl").insertAfter(jQuery("#addDemographicTbl #lastName")); - jQuery("#addDemographicTbl #hcType").insertAfter(jQuery("#addDemographicTbl #hcTypeLbl")); - - jQuery(jQuery("").append(jQuery("#addDemographicTbl #firstNameLbl")).append(jQuery("#addDemographicTbl #firstName"))).insertAfter(jQuery("#addDemographicTbl #rowWithLastName")); - jQuery("#addDemographicTbl #rosterStatusLbl").insertAfter(jQuery("#addDemographicTbl #firstName")); - jQuery("#addDemographicTbl #rosterStatus").insertAfter(jQuery("#addDemographicTbl #rosterStatusLbl")); - - jQuery(jQuery("").append(jQuery("#addDemographicTbl #genderLbl")).append(jQuery("#addDemographicTbl #gender"))).insertAfter(jQuery("#addDemographicTbl #rowWithFirstName")); - jQuery("#addDemographicTbl #effDateLbl").insertAfter(jQuery("#addDemographicTbl #gender")); - jQuery("#addDemographicTbl #effDate").insertAfter(jQuery("#addDemographicTbl #effDateLbl")); - - jQuery(jQuery("").append(jQuery("#addDemographicTbl #dobLbl")).append(jQuery("#addDemographicTbl #dobTbl"))).insertAfter(jQuery("#addDemographicTbl #rowWithGender")); - jQuery("#addDemographicTbl #renewDateLbl").insertAfter(jQuery("#addDemographicTbl #dobTbl")); - jQuery("#addDemographicTbl #renewDate").insertAfter(jQuery("#addDemographicTbl #renewDateLbl")); - - jQuery("#addDemographicTbl #dobLbl").css("padding-bottom", "1em"); - jQuery("#addDemographicTbl #dobTbl").css("padding-bottom", "1em"); - - jQuery(jQuery("").append(jQuery("#addDemographicTbl #addrLbl")).append(jQuery("#addDemographicTbl #addressCell"))).insertAfter(jQuery("#addDemographicTbl #rowWithDob")); - jQuery(jQuery("").append(jQuery("#addDemographicTbl #cityLbl")).append(jQuery("#addDemographicTbl #cityCell"))).insertAfter(jQuery("#addDemographicTbl #rowWithAddress")); - jQuery(jQuery("").append(jQuery("#addDemographicTbl #provLbl")).append(jQuery("#addDemographicTbl #provCell"))).insertAfter(jQuery("#addDemographicTbl #rowWithCity")); - jQuery(jQuery("").append(jQuery("#addDemographicTbl #postalLbl")).append(jQuery("#addDemographicTbl #postalCell"))).insertAfter(jQuery("#addDemographicTbl #rowWithProvince")); - - jQuery("#addDemographicTbl #postalLbl").css("padding-bottom", "1em"); - jQuery("#addDemographicTbl #postalCell").css("padding-bottom", "1em"); - - jQuery(jQuery("").append(jQuery("#addDemographicTbl #emailLbl")).append(jQuery("#addDemographicTbl #emailCell"))).insertAfter(jQuery("#addDemographicTbl #rowWithPostal")); - - jQuery(jQuery("").append(jQuery("#addDemographicTbl #phoneLbl")).append(jQuery("#addDemographicTbl #phoneCell"))).insertAfter(jQuery("#addDemographicTbl #rowWithEmail")); - jQuery("#addDemographicTbl #ptStatusLbl").insertAfter(jQuery("#addDemographicTbl #phoneCell")); - jQuery("#addDemographicTbl #ptStatusCell").insertAfter(jQuery("#addDemographicTbl #ptStatusLbl")); - - jQuery("#addDemographicTbl #phoneLbl").css("padding-bottom", "1em"); - jQuery("#addDemographicTbl #phoneCell").css("padding-bottom", "1em"); - - jQuery("#addDemographicTbl #ptStatusLbl").css("padding-bottom", "1em"); - jQuery("#addDemographicTbl #ptStatusCell").css("padding-bottom", "1em"); - - jQuery(jQuery("").append(jQuery("#addDemographicTbl #alertLbl")).append(jQuery("#addDemographicTbl #alertCell"))).insertAfter(jQuery("#addDemographicTbl #rowWithPhone")); - jQuery(jQuery("").append(jQuery("#addDemographicTbl #notesLbl")).append(jQuery("#addDemographicTbl #notesCell"))).insertAfter(jQuery("#addDemographicTbl #rowWithAlert")); - - jQuery("#addDemographicTbl #alertCell").attr("colspan", "3"); - jQuery("#addDemographicTbl #notesCell").attr("colspan", "3"); - - jQuery(jQuery("").append(jQuery("#addDemographicTbl #waitListTbl"))).insertAfter(jQuery("#addDemographicTbl #rowWithNotes")); - - jQuery("#addDemographicTbl #notesLbl").css("padding-bottom", "1em"); - jQuery("#addDemographicTbl #notesCell").css("padding-bottom", "1em"); - - jQuery("#addDemographicTbl #languageLbl").css("display", "none"); - jQuery("#addDemographicTbl #languageCell").css("display", "none"); - - jQuery("#addDemographicTbl #titleLbl").css("display", "none"); - jQuery("#addDemographicTbl #titleCell").css("display", "none"); - - jQuery("#addDemographicTbl #spokenLbl").css("display", "none"); - jQuery("#addDemographicTbl #spokenCell").css("display", "none"); - - jQuery("#addDemographicTbl #phoneWorkLbl").css("display", "none"); - jQuery("#addDemographicTbl #phoneWorkCell").css("display", "none"); - - jQuery("#addDemographicTbl #phoneCellLbl").css("display", "none"); - jQuery("#addDemographicTbl #phoneCellCell").css("display", "none"); - - jQuery("#addDemographicTbl #newsletterLbl").css("display", "none"); - jQuery("#addDemographicTbl #newsletterCell").css("display", "none"); - - jQuery("#addDemographicTbl #myOscarLbl").css("display", "none"); - jQuery("#addDemographicTbl #myOscarCell").css("display", "none"); - - jQuery("#addDemographicTbl #countryLbl").css("display", "none"); - jQuery("#addDemographicTbl #countryCell").css("display", "none"); - - jQuery("#addDemographicTbl #sinNoLbl").css("display", "none"); - jQuery("#addDemographicTbl #sinNoCell").css("display", "none"); - - jQuery("#addDemographicTbl #cytologyLbl").css("display", "none"); - jQuery("#addDemographicTbl #cytologyCell").css("display", "none"); - - jQuery("#addDemographicTbl #demoDoctorLbl").css("display", "none"); - jQuery("#addDemographicTbl #demoDoctorCell").css("display", "none"); - - jQuery("#addDemographicTbl #nurseLbl").css("display", "none"); - jQuery("#addDemographicTbl #nurseCell").css("display", "none"); - - jQuery("#addDemographicTbl #midwifeLbl").css("display", "none"); - jQuery("#addDemographicTbl #midwifeCell").css("display", "none"); - - jQuery("#addDemographicTbl #residentLbl").css("display", "none"); - jQuery("#addDemographicTbl #residentCell").css("display", "none"); - - jQuery("#addDemographicTbl #referralDocLbl").css("display", "none"); - jQuery("#addDemographicTbl #referralDocCell").css("display", "none"); - - jQuery("#addDemographicTbl #referralDocNoLbl").css("display", "none"); - jQuery("#addDemographicTbl #referralDocNoCell").css("display", "none"); - - jQuery("#addDemographicTbl #rosterDateLbl").css("display", "none"); - jQuery("#addDemographicTbl #rosterDateCell").css("display", "none"); - - jQuery("#addDemographicTbl #joinDateLbl").css("display", "none"); - jQuery("#addDemographicTbl #joinDateCell").css("display", "none"); - - jQuery("#addDemographicTbl #endDateLbl").css("display", "none"); - jQuery("#addDemographicTbl #endDateCell").css("display", "none"); - - jQuery("#addDemographicTbl #chart_no").attr("tabindex", "1"); - jQuery("#addDemographicTbl #last_name").attr("tabindex", "2"); - jQuery("#addDemographicTbl #first_name").attr("tabindex", "3"); - jQuery("#addDemographicTbl #sex").attr("tabindex", "4"); - jQuery("#addDemographicTbl #year_of_birth").attr("tabindex", "5"); - jQuery("#addDemographicTbl #month_of_birth").attr("tabindex", "6"); - jQuery("#addDemographicTbl #date_of_birth").attr("tabindex", "7"); - jQuery("#addDemographicTbl #address").attr("tabindex", "8"); - jQuery("#addDemographicTbl #city").attr("tabindex", "9"); - jQuery("#addDemographicTbl #province").attr("tabindex", "10"); - jQuery("#addDemographicTbl #postal").attr("tabindex", "11"); - jQuery("#addDemographicTbl #email").attr("tabindex", "12"); - jQuery("#addDemographicTbl #phone").attr("tabindex", "13"); - jQuery("#addDemographicTbl #hPhoneExt").attr("tabindex", "14"); - jQuery("#addDemographicTbl #hin").attr("tabindex", "15"); - jQuery("#addDemographicTbl #ver").attr("tabindex", "16"); - jQuery("#addDemographicTbl #hc_type").attr("tabindex", "17"); - jQuery("#addDemographicTbl #roster_status").attr("tabindex", "18"); - jQuery("#addDemographicTbl #eff_date_year").attr("tabindex", "19"); - jQuery("#addDemographicTbl #eff_date_month").attr("tabindex", "20"); - jQuery("#addDemographicTbl #eff_date_date").attr("tabindex", "21"); - jQuery("#addDemographicTbl #hc_renew_date_year").attr("tabindex", "22"); - jQuery("#addDemographicTbl #hc_renew_date_month").attr("tabindex", "23"); - jQuery("#addDemographicTbl #hc_renew_date_date").attr("tabindex", "24"); - jQuery("#addDemographicTbl #patient_status").attr("tabindex", "25"); - jQuery("#addDemographicTbl #cust3").attr("tabindex", "26"); - jQuery("#addDemographicTbl #content").attr("tabindex", "27"); - jQuery("#addDemographicTbl #name_list_id").attr("tabindex", "28"); - jQuery("#addDemographicTbl #waiting_list_note").attr("tabindex", "29"); - jQuery("#addDemographicTbl #waiting_list_referral_date").attr("tabindex", "30"); - jQuery("#addDemographicTbl #btnAddRecord").attr("tabindex", "31"); - jQuery("#addDemographicTbl #btnSwipeCard").attr("tabindex", "32"); - jQuery("#addDemographicTbl #btnCancel").attr("tabindex", "33"); - - //Set Default Family Doctor change XXXXXX to provider number of default doctor - jQuery("#addDemographicTbl #docXXXXXX").attr("selected", "selected"); - - //Set default city (in this case, London) - jQuery("#addDemographicTbl #city").val("London"); - - //dont prefix phone number by default - jQuery("#addDemographicTbl #phone").val(""); - - jQuery("form#adddemographic").submit(function () { - - if (!jQuery("#addDemographicTbl #chart_no").val()) { - alert("Student Number must be completed"); - return false; - } - - if (!jQuery("#addDemographicTbl #phone").val() && !jQuery("#addDemographicTbl #email").val()) { - alert("Either a phone number of email address must be completed"); - return false; - } - - if (jQuery("#addDemographicTbl #email").val() && !isValidEmailAddress(jQuery("#addDemographicTbl #email").val())) { - alert("Invalid email address format. Please correct"); - return false; - } - - }); - - function isValidEmailAddress(emailAddress) { - var pattern = new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i); - return pattern.test(emailAddress); - } - - - jQuery("#chart_no").focus(); - jQuery("#chart_no").select(); - window.resizeTo(1250, 800); -}); diff --git a/src/main/webapp/js/custom/westernu/billingInvoice.js b/src/main/webapp/js/custom/westernu/billingInvoice.js deleted file mode 100644 index ab2768266ac..00000000000 --- a/src/main/webapp/js/custom/westernu/billingInvoice.js +++ /dev/null @@ -1,6 +0,0 @@ -jQuery(document).ready(function () { - jQuery("#ptDemoNo").hide(); - jQuery("#ptGender").hide(); - jQuery("#ptDOB").hide(); - jQuery("#ptHin").hide(); -}); diff --git a/src/main/webapp/js/custom/westernu/billingreview.js b/src/main/webapp/js/custom/westernu/billingreview.js deleted file mode 100644 index 1e04e10a787..00000000000 --- a/src/main/webapp/js/custom/westernu/billingreview.js +++ /dev/null @@ -1,23 +0,0 @@ -jQuery(document).ready(function () { - var url = ctx + "/BillingONReview.do"; - jQuery.ajax({ - url: url, - dataType: 'json', - data: {method: "getDemographic", demographicNo: demographicNo}, - success: function (data) { - jQuery("textarea#billTo").val(data.firstName + " " + data.lastName + "\n" + data.address + "\n" + data.city + ", " + data.province + "\n" + data.postal + "\nEmail: " + data.email + "\nTel: " + data.phone + "\n\nStudent ID: " + data.chartNo); - } - - }); - jQuery.ajax({ - url: url, - dataType: 'json', - data: {method: "getClinic"}, - success: function (data) { - jQuery("textarea#remitTo").val(data.clinicName + "\n" + data.clinicAddress + "\n" + data.clinicCity + ", " + data.clinicProvince + "\n" + data.clinicPostal + "\nTel: 519-661-2111 x11111"); - } - - }); - jQuery("#settlePrintBtn").css("display", "none"); - -}); diff --git a/src/main/webapp/js/custom/westernu/master.js b/src/main/webapp/js/custom/westernu/master.js deleted file mode 100644 index 3c1456cb63b..00000000000 --- a/src/main/webapp/js/custom/westernu/master.js +++ /dev/null @@ -1,2 +0,0 @@ -jQuery(document).ready(function () { -}); diff --git a/src/main/webapp/js/custom/westernu/ticklerMain.js b/src/main/webapp/js/custom/westernu/ticklerMain.js index f9c11ac991f..71d6c4ba54d 100644 --- a/src/main/webapp/js/custom/westernu/ticklerMain.js +++ b/src/main/webapp/js/custom/westernu/ticklerMain.js @@ -1,4 +1,3 @@ jQuery(document).ready(function () { jQuery("#checkAllLink").hide(); }); - diff --git a/src/main/webapp/js/demographicProviderAutocomplete.js b/src/main/webapp/js/demographicProviderAutocomplete.js index 6e8ecbb11f1..182e7414c86 100644 --- a/src/main/webapp/js/demographicProviderAutocomplete.js +++ b/src/main/webapp/js/demographicProviderAutocomplete.js @@ -8,18 +8,14 @@ var highlightMatch = function (full, snippet, matchindex) { full.substring(matchindex + snippet.length); }; var resultFormatter2 = function (oResultData, sQuery, sResultMatch) { - //console.log(oResultData); var query = sQuery.toLowerCase(), fname = oResultData[0], dob = oResultData[1], status = oResultData[3], fnameMatchIndex = fname.toLowerCase().indexOf(query), displayfname = ''; - //oscarLog("in resultFormatter2"); - //oscarLog(oResultData); if (fnameMatchIndex > -1) { displayfname = highlightMatch(fname, query, fnameMatchIndex); - //oscarLog("displayfname in if="+displayfname); } else { displayfname = fname; } @@ -28,7 +24,6 @@ var resultFormatter2 = function (oResultData, sQuery, sResultMatch) { }; var resultFormatter = function (oResultData, sQuery, sResultMatch) { - //console.log(oResultData); var query = sQuery.toLowerCase(), fname = oResultData[1], lname = oResultData[2], @@ -54,7 +49,6 @@ var resultFormatter = function (oResultData, sQuery, sResultMatch) { }; var resultFormatter3 = function (oResultData, sQuery, sResultMatch) { - //console.log(oResultData); var query = sQuery.toLowerCase(), fname = oResultData[1], lname = oResultData[2], @@ -98,4 +92,4 @@ function removeProv(th) { var ele = th.up(); ele.remove(); -} \ No newline at end of file +} diff --git a/src/main/webapp/js/documentDescriptionTypeahead.js b/src/main/webapp/js/documentDescriptionTypeahead.js index d2450169d53..9602f7b0bba 100644 --- a/src/main/webapp/js/documentDescriptionTypeahead.js +++ b/src/main/webapp/js/documentDescriptionTypeahead.js @@ -9,7 +9,6 @@ var highlightMatch = function (full, snippet, matchIndex) { }; var formatDocumentDescriptionResults = function (oResultData, sQuery, sResultMatch) { - //console.log(oResultData); var query = sQuery.toLowerCase(), fname = oResultData[1], lname = oResultData[2], @@ -70,4 +69,4 @@ function checkDesc() { break; } } -} \ No newline at end of file +} diff --git a/src/main/webapp/js/dxJSONCodeSearch.js b/src/main/webapp/js/dxJSONCodeSearch.js index 5e9fb07aedf..cc793251390 100644 --- a/src/main/webapp/js/dxJSONCodeSearch.js +++ b/src/main/webapp/js/dxJSONCodeSearch.js @@ -106,4 +106,3 @@ function bindDxJSONEvents() { jQuery(document).ready(function () { bindDxJSONEvents(); }) - diff --git a/src/main/webapp/js/fg.menu.js b/src/main/webapp/js/fg.menu.js index cf930411962..6c3bb1920bf 100644 --- a/src/main/webapp/js/fg.menu.js +++ b/src/main/webapp/js/fg.menu.js @@ -126,7 +126,6 @@ function Menu(caller, options) { ; caller .addClass('fg-menu-open'); - // .addClass(options.callerOnState); container.parent().show().click(function () { menu.kill(); return false; diff --git a/src/main/webapp/js/formBCAR2020Record.js b/src/main/webapp/js/formBCAR2020Record.js index aaea36cc0d9..16e4acfc828 100644 --- a/src/main/webapp/js/formBCAR2020Record.js +++ b/src/main/webapp/js/formBCAR2020Record.js @@ -703,7 +703,6 @@ function valDate(dateBox, ds = dtCh) { try { var dateString = dateBox.value; if (dateString === "") { - // alert('dateString'+dateString); return true; } var dt = dateString.split(ds); @@ -1223,11 +1222,3 @@ const wtEnglish2Metric = function (obj) { } } } - - - - - - - - diff --git a/src/main/webapp/js/genericIntake.js b/src/main/webapp/js/genericIntake.js index ff72104aef1..cf99441da29 100644 --- a/src/main/webapp/js/genericIntake.js +++ b/src/main/webapp/js/genericIntake.js @@ -61,7 +61,6 @@ function validBedCommunityProgram() { var programId = Number(programIdStr); if (programIdStr == "") { - //alert( "Bed program is mandatory"); return false; } else { return true; @@ -85,8 +84,6 @@ function validateEdit() { return true; } - //$("form").validate({meta: "validate"}); - var programIdEl = getElement('bedCommunityProgramId'); var programId = 0; if (programIdEl != null) { diff --git a/src/main/webapp/js/global.js b/src/main/webapp/js/global.js index d8da5cf9939..9f4fe693259 100755 --- a/src/main/webapp/js/global.js +++ b/src/main/webapp/js/global.js @@ -167,4 +167,4 @@ function selectSelectListOption(selectList, optionValue) { function getSelectListValue(selectList) { return (selectList.options[selectList.selectedIndex].value); -} \ No newline at end of file +} diff --git a/src/main/webapp/js/hideexpand.js b/src/main/webapp/js/hideexpand.js deleted file mode 100755 index 4fc77cdc989..00000000000 --- a/src/main/webapp/js/hideexpand.js +++ /dev/null @@ -1,207 +0,0 @@ -// our global vars -var heightnow; -var targetheight; -var block; -var slideinterval; -var divheights = new Array(); - -// the delay between the slide in/out, and a little inertia -var inertiabase = 1; -var inertiainc = 1; -var slideintervalinc = 1; -var inertiabaseoriginal = inertiabase; - -var closedSections = []; - -function getFormField() { - return document.getElementById("closedSections"); -} - -function initSections() { - var ssv = getFormField().value; - closedSections = ssv.split(","); - for (var i = 0; i < closedSections.length; i++) { - var s = document.getElementById(closedSections[i]); - if (s != null) document.getElementById(closedSections[i]).style.display = "none"; - } -} - -function setup_slidey() { - - // detect whether the user has ie or not, how we get the height is different - var useragent = navigator.userAgent.toLowerCase(); - var ie = ((useragent.indexOf('msie') != -1) && (useragent.indexOf('opera') == -1) && (useragent.indexOf('webtv') == -1)); - var divs = getElementsByClassName(document, "div", "slideblock"); - - for (var i = 0; i < divs.length; i++) { - // get the original height - var baseheight = (ie) ? divs[i].offsetHeight + "px" : document.defaultView.getComputedStyle(divs[i], null).getPropertyValue('height', null); - - // explicitly display it (optional, you could use cookies to toggle whether to display it or not) - divs[i].style.display = "block"; - - // "save" our div height, because once it's display is set to none we can't get the original height again - var d = new div(); - d.el = divs[i]; - d.ht = baseheight.substring(0, baseheight.indexOf("p")); - - // store our saved versoin - divheights[i] = d; - } - - initSections(); - - touchColor(); -} - -// this is one of our divs, it just has a DOM reference to the element and the original height -function div(_el, _ht) { - this.el = _el; - this.ht = _ht; -} - -// this is our slidein function the interval uses, it keeps subtracting -// from the height till it's 1px then it hides it -function slidein() { - if (heightnow > targetheight) { - // reduce the height by intertiabase * inertiainc - heightnow -= inertiabase; - - // increase the intertiabase by the amount to keep it changing - inertiabase += inertiainc; - - // it's possible to exceed the height we want so we use a ternary - (condition) ? when true : when false; - block.style.height = (heightnow > 1) ? heightnow + "px" : targetheight + "px"; - } else { - // finished, so hide the div properly and kill the interval - clearInterval(slideinterval); - block.style.display = "none"; - } -} - -// this is the function our slideout interval uses, it keeps adding -// to the height till it's fully displayed -function slideout() { - if (heightnow < targetheight) { - // increases the height by the inertia stuff - heightnow += inertiabase; - - // increase the inertia stuff - inertiabase += inertiainc; - - // it's possible to exceed the height we want so we use a ternary - (condition) ? when true : when false; - block.style.height = (heightnow < targetheight) ? heightnow + "px" : targetheight + "px"; - - } else { - // finished, so make sure the height is what it's meant to be (inertia can make it off a little) - // then kill the interval - clearInterval(slideinterval); - block.style.height = targetheight + "px"; - } -} - -// returns the height of the div from our array of such things -function divheight(d) { - for (var i = 0; i < divheights.length; i++) { - if (divheights[i].el == d) { - return divheights[i].ht; - } - } -} - -/* - the getElementsByClassName function I pilfered from this guy. It's - a useful function that'll return any/all tags with a specific css class. - - Written by Jonathan Snook, http://www.snook.ca/jonathan - Add-ons by Robert Nyman, http://www.robertnyman.com -*/ -function getElementsByClassName(oElm, strTagName, strClassName) { - // first it gets all of the specified tags - var arrElements = (strTagName == "*" && document.all) ? document.all : oElm.getElementsByTagName(strTagName); - - // then it sets up an array that'll hold the results - var arrReturnElements = new Array(); - - // some regex stuff you don't need to worry about - strClassName = strClassName.replace(/\-/g, "\\-"); - - var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)"); - var oElement; - - // now it iterates through the elements it grabbed above - for (var i = 0; i < arrElements.length; i++) { - oElement = arrElements[i]; - - // if the class matches what we're looking for it ads to the results array - if (oRegExp.test(oElement.className)) { - arrReturnElements.push(oElement); - } - } - - // then it kicks the results back to us - return (arrReturnElements) -} - -function togglediv(t) { - - // reset our inertia base and interval - inertiabase = inertiabaseoriginal; - clearInterval(slideinterval); - - // get our block - block = t.parentNode.nextSibling; - - // for mozilla, it doesn't like whitespace between elements - if (block.className == undefined) - block = t.parentNode.nextSibling.nextSibling; - - if (block.style.display == "none") { - // link text - // t.innerHTML = "Hide"; - for (var i = 0; i < closedSections.length; i++) - if (closedSections[i] == block.id) - closedSections.splice(i, 1); - getFormField().value = closedSections.join(","); - - block.style.display = "block"; - block.style.height = "1px"; - - // our goal and current height - targetheight = divheight(block); - heightnow = 1; - - // our interval - slideinterval = setInterval(slideout, slideintervalinc); - } else { - // linkstext - // t.innerHTML = "Show"; - closedSections.push(block.id); - getFormField().value = closedSections.join(","); - - // our goal and current height - targetheight = 1; - heightnow = divheight(block); - - // our interval - slideinterval = setInterval(slidein, slideintervalinc); - } -} - -function expandAll() { - var divs = getElementsByClassName(document, "div", "slideblock"); - for (var i = 0; i < divs.length; i++) { - divs[i].style.height = divheight(divs[i]); - divs[i].style.display = "block"; - } - getFormField().value = ""; -} - -function collapseAll() { - var divs = getElementsByClassName(document, "div", "slideblock"); - getFormField().value = ""; - for (var i = 0; i < divs.length; i++) { - divs[i].style.display = "none"; - getFormField().value += divs[i].id + ","; - } -} diff --git a/src/main/webapp/js/history.js b/src/main/webapp/js/history.js index 7fee25c70d1..dce7535c5b8 100644 --- a/src/main/webapp/js/history.js +++ b/src/main/webapp/js/history.js @@ -720,7 +720,6 @@ } if (!api) { - // document[_a](eventPrefix + "click", function (e) { var event = e || window.event, @@ -902,4 +901,4 @@ History.pushState = pushState; -})(window, true, false, null); \ No newline at end of file +})(window, true, false, null); diff --git a/src/main/webapp/js/jqplot/plugins/jqplot.pieRenderer.js b/src/main/webapp/js/jqplot/plugins/jqplot.pieRenderer.js index dc93a2a021b..45a09da36f7 100644 --- a/src/main/webapp/js/jqplot/plugins/jqplot.pieRenderer.js +++ b/src/main/webapp/js/jqplot/plugins/jqplot.pieRenderer.js @@ -408,7 +408,6 @@ //see http://stackoverflow.com/questions/20221461/hidpi-retina-plot-drawing var cw = parseInt(ctx.canvas.style.width); var ch = parseInt(ctx.canvas.style.height); - // var w = cw - offx - 2 * this.padding; var h = ch - offy - 2 * this.padding; @@ -525,7 +524,6 @@ // dummy objects with properties so the plot will render. // called with scope of axis object. $.jqplot.PieAxisRenderer.prototype.init = function (options) { - // this.tickRenderer = $.jqplot.PieTickRenderer; $.extend(true, this, options); // I don't think I'm going to need _dataBounds here. @@ -916,5 +914,3 @@ $.jqplot.PieTickRenderer.prototype.constructor = $.jqplot.PieTickRenderer; })(jQuery); - - \ No newline at end of file diff --git a/src/main/webapp/js/jquery-1.9.1.js b/src/main/webapp/js/jquery-1.9.1.js index 88105eda92b..7dec3941a96 100644 --- a/src/main/webapp/js/jquery-1.9.1.js +++ b/src/main/webapp/js/jquery-1.9.1.js @@ -982,7 +982,7 @@ return object; } - /* +/* * Create a callback list using the following parameters: * * options: an optional list of space-separated options that will change how @@ -2713,7 +2713,7 @@ return false; } - /* +/* * Helper functions for managing events -- not part of the public interface. * Props to Dean Edwards' addEvent library for many of the ideas. */ @@ -3691,7 +3691,7 @@ } } }); - /*! +/*! * Sizzle CSS Selector Engine * Copyright 2012 jQuery Foundation and other contributors * Released under the MIT license @@ -4578,7 +4578,7 @@ }, "CHILD": function (match) { - /* matches from matchExpr["CHILD"] + /* matches from matchExpr["CHILD"] 1 type (only|nth|...) 2 what (child|of-type) 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) @@ -7443,7 +7443,7 @@ // Keep a copy of the old load method _load = jQuery.fn.load, - /* Prefilters + /* Prefilters * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) * 2) These are called: * - BEFORE asking for a transport @@ -7454,7 +7454,7 @@ */ prefilters = {}, - /* Transports bindings + /* Transports bindings * 1) key is the dataType * 2) the catchall symbol "*" can be used * 3) selection will start with transport dataType and THEN go to "*" if needed @@ -7655,17 +7655,6 @@ processData: true, async: true, contentType: "application/x-www-form-urlencoded; charset=UTF-8", - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - throws: false, - traditional: false, - headers: {}, - */ accepts: { "*": allTypes, @@ -8126,7 +8115,7 @@ } }); - /* Handles responses to an ajax request: +/* Handles responses to an ajax request: * - sets all responseXXX fields accordingly * - finds the right dataType (mediates between content-type and expected dataType) * - returns the corresponding response @@ -8474,7 +8463,7 @@ // Create the request object // (This is still attached to ajaxSettings for backward compatibility) jQuery.ajaxSettings.xhr = window.ActiveXObject ? - /* Microsoft failed to properly + /* Microsoft failed to properly * implement the XMLHttpRequest in IE7 (can't request local files), * so we use the ActiveXObject when it is available * Additionally XMLHttpRequest can be disabled in IE7/IE8 so diff --git a/src/main/webapp/js/jquery.autocomplete.js b/src/main/webapp/js/jquery.autocomplete.js index c5b8804f083..69cadf4c918 100755 --- a/src/main/webapp/js/jquery.autocomplete.js +++ b/src/main/webapp/js/jquery.autocomplete.js @@ -228,7 +228,6 @@ }); words[wordAt] = v; // TODO this should set the cursor to the right position, but it gets overriden somewhere - //$.Autocompleter.Selection(input, progress + seperator, progress + seperator); v = words.join(options.multipleSeparator); } v += options.multipleSeparator; @@ -810,4 +809,4 @@ } }; -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/src/main/webapp/js/jquery.fileDownload.js b/src/main/webapp/js/jquery.fileDownload.js index a2b619a4614..f0c2b050fcc 100644 --- a/src/main/webapp/js/jquery.fileDownload.js +++ b/src/main/webapp/js/jquery.fileDownload.js @@ -12,7 +12,6 @@ var $ = jQuery.noConflict(); $.extend({ - // //$.fileDownload('/path/to/url/', options) // see directly below for possible 'options' fileDownload: function (fileUrl, options) { @@ -409,4 +408,3 @@ $.extend({ } } }); - diff --git a/src/main/webapp/js/jquery.metadata.js b/src/main/webapp/js/jquery.metadata.js index b83f5905a1d..dfd694ad554 100755 --- a/src/main/webapp/js/jquery.metadata.js +++ b/src/main/webapp/js/jquery.metadata.js @@ -119,4 +119,4 @@ return $.metadata.get(this[0], opts); }; -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/src/main/webapp/js/jquery.treeview.js b/src/main/webapp/js/jquery.treeview.js index 5a9bcc21991..57d821b5e11 100644 --- a/src/main/webapp/js/jquery.treeview.js +++ b/src/main/webapp/js/jquery.treeview.js @@ -256,4 +256,4 @@ hitarea: "hitarea" }); -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/src/main/webapp/js/jquery.validate.js b/src/main/webapp/js/jquery.validate.js index 7d69ab376c4..3d9a2fc2adc 100644 --- a/src/main/webapp/js/jquery.validate.js +++ b/src/main/webapp/js/jquery.validate.js @@ -1236,4 +1236,4 @@ }); } }); -}(jQuery)); \ No newline at end of file +}(jQuery)); diff --git a/src/main/webapp/js/loading-bar.js b/src/main/webapp/js/loading-bar.js index 6040f224b71..4c21d0b721f 100644 --- a/src/main/webapp/js/loading-bar.js +++ b/src/main/webapp/js/loading-bar.js @@ -306,6 +306,6 @@ }; - }]; // + }]; }); // wtf javascript. srsly -})(); // \ No newline at end of file +})(); diff --git a/src/main/webapp/js/menuExpandable.js b/src/main/webapp/js/menuExpandable.js index 73cfff5bcf9..4a53289f7e9 100755 --- a/src/main/webapp/js/menuExpandable.js +++ b/src/main/webapp/js/menuExpandable.js @@ -18,8 +18,6 @@ function initializeMenu(menuId, actuatorId) { if (menu == null || actuator == null) return; - //if (window.opera) return; // I'm too tired - actuator.parentNode.style.backgroundImage = "url(../images/plus.gif)"; //expand all nodes at init diff --git a/src/main/webapp/js/messenger/messenger-theme-future.js b/src/main/webapp/js/messenger/messenger-theme-future.js index dbbd1dee21f..55b7e7a9f24 100644 --- a/src/main/webapp/js/messenger/messenger-theme-future.js +++ b/src/main/webapp/js/messenger/messenger-theme-future.js @@ -43,4 +43,4 @@ Message: FutureMessage }; -}).call(this); \ No newline at end of file +}).call(this); diff --git a/src/main/webapp/js/oscar-alert.js b/src/main/webapp/js/oscar-alert.js index 6a2615f8434..c06f210ff23 100644 --- a/src/main/webapp/js/oscar-alert.js +++ b/src/main/webapp/js/oscar-alert.js @@ -174,4 +174,3 @@ class OscarAlert { return labels[this.alertType] || 'Unknown'; } } - diff --git a/src/main/webapp/js/oscarRx.js b/src/main/webapp/js/oscarRx.js deleted file mode 100644 index 48ca48f602d..00000000000 --- a/src/main/webapp/js/oscarRx.js +++ /dev/null @@ -1,1633 +0,0 @@ -/* - * - * Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved. * - * This software is published under the GPL GNU General Public License. - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * - * - * - * This software was written for the - * Department of Family Medicine - * McMaster University - * Hamilton - * Ontario, Canada - */ - -function saveLinks(randNumber) { - $('method_' + randNumber).onblur(); - $('route_' + randNumber).onblur(); - $('frequency_' + randNumber).onblur(); - $('minimum_' + randNumber).onblur(); - $('maximum_' + randNumber).onblur(); - $('duration_' + randNumber).onblur(); - $('durationUnit_' + randNumber).onblur(); -} - - -function handleEnter(inField, ev) { - var charCode; - if (ev && ev.which) - charCode = ev.which; - else if (window.event) { - ev = window.event; - charCode = ev.keyCode; - } - var id = inField.id.split("_")[1]; - if (charCode == 13) - showHideSpecInst('siAutoComplete_' + id); -} - -//has to be in here, not prescribe.jsp for it to work in IE 6/7 and probably 8. -function showHideSpecInst(elementId) { - alert(elementId); - if ($(elementId).is(":visible")) { - $(elementId).hide("fold", 1000); - } else { - $(elementId).show("fold", 1000); - } -} - -function resetReRxDrugList() { - var rand = Math.floor(Math.random() * 10001); - var url = ctx + "/oscarRx/deleteRx.do?parameterValue=clearReRxDrugList"; - var data = "rand=" + rand; - new Ajax.Request(url, { - method: 'post', parameters: data, onSuccess: function (transport) { - } - }); -} - -function onPrint(cfgPage) { - var docF = $('printFormDD'); - - docF.action = "../form/createpdf?__title=Rx&__cfgfile=" + cfgPage + "&__template=a6blank"; - docF.target = "_blank"; - docF.submit(); - return true; -} - -function buildRoute() { - - pickRoute = ""; -} - - -function popupRxSearchWindow() { - var winX = (document.all) ? window.screenLeft : window.screenX; - var winY = (document.all) ? window.screenTop : window.screenY; - - var top = winY + 70; - var left = winX + 110; - var url = "searchDrug.do?rx2=true&searchString=" + $('searchString').value; - popup2(600, 800, top, left, url, 'windowNameRxSearch<%=demoNo%>'); - -} - - -function popupRxReasonWindow(demographic, id) { - var winX = (document.all) ? window.screenLeft : window.screenX; - var winY = (document.all) ? window.screenTop : window.screenY; - - var top = winY + 70; - var left = winX + 110; - var url = "SelectReason.jsp?demographicNo=" + demographic + "&drugId=" + id; - popup2(575, 650, top, left, url, 'windowNameRxReason<%=demoNo%>'); - -} - - -var highlightMatch = function (full, snippet, matchindex) { - return "" + full.substring(0, matchindex) + - "" + full.substr(matchindex, snippet.length) + "" + full.substring(matchindex + snippet.length) + ""; -}; - -var highlightMatchInactiveMatchWord = function (full, snippet, matchindex) { - //oscarLog(full+"--"+snippet+"--"+matchindex); - return "" + "" + full.substring(0, matchindex) + - "" + full.substr(matchindex, snippet.length) + "" + full.substring(matchindex + snippet.length) + "" + ""; -}; -var highlightMatchInactive = function (full, snippet, matchindex) { - /* oscarLog(full+"--"+snippet+"--"+matchindex); - oscarLog(" aa "+full.substring(0, matchindex) ); - oscarLog(" bb "+full.substr(matchindex, snippet.length) ); - oscarLog(" cc "+ full.substring(matchindex + snippet.length));*/ - /*return ""+""+full.substring(0, matchindex) + - full.substr(matchindex, snippet.length) +full.substring(matchindex + snippet.length)+""+"";*/ - return "" + "" + full + "" + ""; -}; -var resultFormatter = function (oResultData, sQuery, sResultMatch) { - //oscarLog("oResultData, sQuery, sResultMatch="+oResultData+"--"+sQuery+"--"+sResultMatch); - //oscarLog("oResultData[0]="+oResultData[0]); - //oscarLog("oResultData.name="+oResultData.name); - //oscarLog("oResultData.name="+oResultData.id); - var query = sQuery.toUpperCase(); - var drugName = oResultData[0]; - - var mIndex = drugName.toUpperCase().indexOf(query); - var display = ''; - - if (mIndex > -1) { - display = highlightMatch(drugName, query, mIndex); - } else { - display = drugName; - } - return display; -}; - -var resultFormatter2 = function (oResultData, sQuery, sResultMatch) { - /*oscarLog("oResultData, sQuery, sResultMatch="+oResultData+"--"+sQuery+"--"+sResultMatch); - oscarLog("oResultData[0]="+oResultData[0]); - oscarLog("oResultData.name="+oResultData.name); - oscarLog("oResultData.name="+oResultData.id);*/ - var query = sQuery.toUpperCase(); - var drugName = oResultData.name; - var isInactive = oResultData.isInactive; - //oscarLog("isInactive="+isInactive); - - var mIndex = drugName.toUpperCase().indexOf(query); - var display = ''; - if (mIndex > -1 && (isInactive == 'true' || isInactive == true)) { //match and inactive - display = highlightMatchInactiveMatchWord(drugName, query, mIndex); - } else if (mIndex > -1 && (isInactive == 'false' || isInactive == false || isInactive == undefined || isInactive == null)) { //match and active - display = highlightMatch(drugName, query, mIndex); - } else if (mIndex <= -1 && (isInactive == 'true' || isInactive == true)) {//no match and inactive - display = highlightMatchInactive(drugName, query, mIndex); - } else {//active and no match - display = drugName; - } - return display; -}; - - -addEvent(window, "load", sortables_init); - -var SORT_COLUMN_INDEX; - -function sortables_init() { - // Find all tables with class sortable and make them sortable - - if (!document.getElementsByTagName) return; - - tbls = document.getElementsByTagName("table"); - - for (ti = 0; ti < tbls.length; ti++) { - thisTbl = tbls[ti]; - - if (((' ' + thisTbl.className + ' ').indexOf("sortable") != -1) && (thisTbl.id)) { - //initTable(thisTbl.id); - ts_makeSortable(thisTbl); - } - } -} - -function ts_makeSortable(table) { - oscarLog('making ' + table + ' sortable'); - if (table.rows && table.rows.length > 0) { - var firstRow = table.rows[0]; - } - if (!firstRow) return; - oscarLog('Gets past here'); - - // We have a first row: assume it's the header, and make its contents clickable links - for (var i = 0; i < firstRow.cells.length; i++) { - var cell = firstRow.cells[i]; - var txt = ts_getInnerText(cell); - cell.innerHTML = '' + - txt + ''; - } -} - -function ts_getInnerText(el) { - if (typeof el == "string") return el; - if (typeof el == "undefined") { - return el - } - ; - if (el.innerText) return el.innerText; //Not needed but it is faster - var str = ""; - - var cs = el.childNodes; - var l = cs.length; - for (var i = 0; i < l; i++) { - switch (cs[i].nodeType) { - case 1: //ELEMENT_NODE - str += ts_getInnerText(cs[i]); - break; - case 3: //TEXT_NODE - str += cs[i].nodeValue; - break; - } - } - return str; -} - -function ts_resortTable(lnk, clid) { - // get the span - var span; - for (var ci = 0; ci < lnk.childNodes.length; ci++) { - if (lnk.childNodes[ci].tagName && lnk.childNodes[ci].tagName.toLowerCase() == 'span') span = lnk.childNodes[ci]; - } - var spantext = ts_getInnerText(span); - var td = lnk.parentNode; - var column = clid; - var table = getParent(td, 'TABLE'); - - // Work out a type for the column - if (table.rows.length <= 1) return; - - - var itm = ts_getInnerText(table.rows[1].cells[column]).trim(); - sortfn = ts_sort_caseinsensitive; - if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d\d\d$/)) sortfn = ts_sort_date; - if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d$/)) sortfn = ts_sort_date; - if (itm.match(/^[£$]/)) sortfn = ts_sort_currency; - if (itm.match(/^[\d\.]+$/)) sortfn = ts_sort_numeric; - SORT_COLUMN_INDEX = column; - var firstRow = new Array(); - var newRows = new Array(); - for (i = 0; i < table.rows[0].length; i++) { - firstRow[i] = table.rows[0][i]; - } - for (j = 1; j < table.rows.length; j++) { - newRows[j - 1] = table.rows[j]; - } - - newRows.sort(sortfn); - - if (span.getAttribute("sortdir") == 'down') { - ARROW = '  ↑'; - newRows.reverse(); - span.setAttribute('sortdir', 'up'); - } else { - ARROW = '  ↓'; - span.setAttribute('sortdir', 'down'); - } - - // We appendChild rows that already exist to the tbody, so it moves them rather than creating new ones - // don't do sortbottom rows - for (i = 0; i < newRows.length; i++) { - if (!newRows[i].className || (newRows[i].className && (newRows[i].className.indexOf('sortbottom') == -1))) table.tBodies[0].appendChild(newRows[i]); - } - // do sortbottom rows only - for (i = 0; i < newRows.length; i++) { - if (newRows[i].className && (newRows[i].className.indexOf('sortbottom') != -1)) table.tBodies[0].appendChild(newRows[i]); - } - - // Delete any other arrows there may be showing - var allspans = document.getElementsByTagName("span"); - for (var ci = 0; ci < allspans.length; ci++) { - if (allspans[ci].className == 'sortarrow') { - if (getParent(allspans[ci], "table") == getParent(lnk, "table")) { // in the same table as us? - allspans[ci].innerHTML = ''; - } - } - } - - span.innerHTML = ARROW; -} - -function getParent(el, pTagName) { - if (el == null) return null; - else if (el.nodeType == 1 && el.tagName.toLowerCase() == pTagName.toLowerCase()) // Gecko bug, supposed to be uppercase - return el; - else - return getParent(el.parentNode, pTagName); -} - -function ts_sort_date(a, b) { - // y2k notes: two digit years less than 50 are treated as 20XX, greater than 50 are treated as 19XX - aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]); - bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]); - if (aa.length == 10) { - dt1 = aa.substr(6, 4) + aa.substr(3, 2) + aa.substr(0, 2); - } else { - yr = aa.substr(6, 2); - if (parseInt(yr) < 50) { - yr = '20' + yr; - } else { - yr = '19' + yr; - } - dt1 = yr + aa.substr(3, 2) + aa.substr(0, 2); - } - if (bb.length == 10) { - dt2 = bb.substr(6, 4) + bb.substr(3, 2) + bb.substr(0, 2); - } else { - yr = bb.substr(6, 2); - if (parseInt(yr) < 50) { - yr = '20' + yr; - } else { - yr = '19' + yr; - } - dt2 = yr + bb.substr(3, 2) + bb.substr(0, 2); - } - if (dt1 == dt2) return 0; - if (dt1 < dt2) return -1; - return 1; -} - -function ts_sort_currency(a, b) { - aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]).replace(/[^0-9.]/g, ''); - bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]).replace(/[^0-9.]/g, ''); - return parseFloat(aa) - parseFloat(bb); -} - -function ts_sort_numeric(a, b) { - aa = parseFloat(ts_getInnerText(a.cells[SORT_COLUMN_INDEX])); - if (isNaN(aa)) aa = 0; - bb = parseFloat(ts_getInnerText(b.cells[SORT_COLUMN_INDEX])); - if (isNaN(bb)) bb = 0; - return aa - bb; -} - -function ts_sort_caseinsensitive(a, b) { - aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]).toLowerCase(); - bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]).toLowerCase(); - if (aa == bb) return 0; - if (aa < bb) return -1; - return 1; -} - -function ts_sort_default(a, b) { - aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]); - bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]); - if (aa == bb) return 0; - if (aa < bb) return -1; - return 1; -} - - -function addEvent(elm, evType, fn, useCapture) -// addEvent and removeEvent -// cross-browser event handling for IE5+, NS6 and Mozilla -// By Scott Andrew -{ - if (elm.addEventListener) { - elm.addEventListener(evType, fn, useCapture); - return true; - } else if (elm.attachEvent) { - var r = elm.attachEvent("on" + evType, fn); - return r; - } else { - alert("Handler could not be removed"); - } -} - -function checkFav() { - //oscarLog("****** in checkFav"); - var usefav = '<%=usefav%>'; - var favid = '<%=favid%>'; - if (usefav == "true" && favid != null && favid != 'null') { - //oscarLog("****** favid "+favid); - useFav2(favid); - } else { - } -} - -//not used , represcribe a drug -function represcribeOnLoad(drugId) { - var data = "drugId=" + drugId + "&rand=" + Math.floor(Math.random() * 10001); - var url = ctx + "/oscarRx/rePrescribe2.do?method=saveReRxDrugIdToStash"; - new Ajax.Updater('rxText', url, { - method: 'get', parameters: data, evalScripts: true, insertion: Insertion.Bottom, - onSuccess: function (transport) { - } - }); - -} - - -function moveDrugDown(drugId, swapDrugId, demographicNo) { - new Ajax.Request(ctx + '/oscarRx/reorderDrug.do?method=update&direction=down&drugId=' + drugId + '&swapDrugId=' + swapDrugId + '&demographicNo=' + demographicNo + "&rand=" + Math.floor(Math.random() * 10001), { - method: 'get', - onSuccess: function (transport) { - callReplacementWebService("ListDrugs.jsp", 'drugProfile'); - resetReRxDrugList(); - resetStash(); - } - }); -} - -function moveDrugUp(drugId, swapDrugId, demographicNo) { - new Ajax.Request(ctx + '/oscarRx/reorderDrug.do?method=update&direction=up&drugId=' + drugId + '&swapDrugId=' + swapDrugId + '&demographicNo=' + demographicNo + "&rand=" + Math.floor(Math.random() * 10001), { - method: 'get', - onSuccess: function (transport) { - callReplacementWebService("ListDrugs.jsp", 'drugProfile'); - resetReRxDrugList(); - resetStash(); - } - }); -} - -function showPreviousPrints(scriptNo) { - popupWindow(720, 700, 'ShowPreviousPrints.jsp?scriptNo=' + scriptNo, 'ShowPreviousPrints') -} - - -/**/ - -function toggleStartDateUnknown(rand) { - var cb = document.getElementById('startDateUnknown_' + rand); - var txt = document.getElementById('rxDate_' + rand); - if (cb.checked) { - - txt.disabled = true; - txt.value = new Date(); - } else { - txt.disabled = false; - } -} - -function emptyWrittenDate(rand) { - var cb = document.getElementById('pastMed_' + rand); - var txt = document.getElementById('writtenDate_' + rand); - - if (cb.checked) { - txt.value = '0001-01-01'; - txt.disabled = true; - } else { - txt.disabled = false; - - } - -} - -//this is a SJHH specific feature -function completeMedRec() { - var ok = confirm("Are you sure you would like to mark the Med Rec as complete?"); - if (ok) { - var url = ctx + "/oscarRx/completeMedRec.jsp?demographicNo=<%=bean.getDemographicNo()%>"; - var data; - new Ajax.Request(url, { - method: 'get', parameters: data, onSuccess: function (transport) { - alert('Completed.') - } - }); - } -} - - -function changeLt(drugId) { - if (confirm('') == true) { - var data = "ltDrugId=" + drugId + "&rand=" + Math.floor(Math.random() * 10001); - var url = ctx + "/oscarRx/WriteScript.do?parameterValue=changeToLongTerm"; - new Ajax.Request(url, { - method: 'post', parameters: data, onSuccess: function (transport) { - var json = transport.responseText.evalJSON(); - if (json != null && (json.success == 'true' || json.success == true)) { - $("notLongTermDrug_" + drugId).innerHTML = "*"; - $("notLongTermDrug_" + drugId).setStyle({ - textDecoration: 'none', - color: 'red' - }); - $("notLongTermDrug_" + drugId).setAttribute("onclick", ""); - $("notLongTermDrug_" + drugId).setAttribute("href", ""); - } else { - } - } - }); - } -} - -function checkReRxLongTerm() { - var url = window.location.href; - var match = url.indexOf('ltm=true'); - if (match > -1) { - RePrescribeLongTerm(); - } -} - -function changeContainerHeight(ele) { - var ss = $('searchString').value; - ss = trim(ss); - if (ss.length == 0) - $('autocomplete_choices').setStyle({height: '0%'}); - else - $('autocomplete_choices').setStyle({height: '100%'}); -} - -function addInstruction(content, randomId) { - $('instructions_' + randomId).value = content; - parseIntr($('instructions_' + randomId)); -} - -function addSpecialInstruction(content, randomId) { - if ($('siAutoComplete_' + randomId).getStyle('display') == 'none') { - Effect.BlindDown('siAutoComplete_' + randomId); - } else { - } - $('siInput_' + randomId).value = content; - $('siInput_' + randomId).setStyle({color: 'black'}); -} - -function hideMedHistory() { - mb.hide(); -} - -var modalBox = function () { - this.show = function (randomId, displaySRC, H) { - if (!document.getElementById("xmaskframe")) { - var divFram = document.createElement('iframe'); - divFram.setAttribute("id", "xmaskframe"); - divFram.setAttribute("name", "xmaskframe"); - //divFram.setAttribute("src","displayMedHistory.jsp?randomId="+randomId); - divFram.setAttribute("allowtransparency", "false"); - document.body.appendChild(divFram); - var divSty = document.getElementById("xmaskframe").style; - divSty.position = "fixed"; - divSty.top = "0px"; - divSty.right = "0px"; - divSty.width = "390px" - //divSty.border="solid"; - divSty.backgroundColor = "#F5F5F5"; - divSty.zIndex = "45"; - //divSty.cursor="move"; - } - this.waitifrm = document.getElementById("xmaskframe"); - - this.waitifrm.setAttribute("src", displaySRC + ".jsp?randomId=" + randomId); - this.waitifrm.style.display = "block"; - this.waitifrm.style.height = H; - - $("dragifm").appendChild(this.waitifrm); - Effect.Appear('xmaskframe'); - }; - this.hide = function () { - Effect.Fade('xmaskframe'); - - }; -} -var mb = new modalBox(); - -function displayMedHistory(randomId) { - var data = "randomId=" + randomId; - new Ajax.Request(ctx + "/oscarRx/WriteScript.do?parameterValue=listPreviousInstructions", - { - method: 'post', parameters: data, asynchronous: false, onSuccess: function (transport) { - mb.show(randomId, 'displayMedHistory', '200px'); - } - }); -} - -function displayInstructions(randomId) { - var data = "randomId=" + randomId; - mb.show(randomId, 'displayInstructions', '600px'); - -} - -function updateProperty(elementId) { - var randomId = elementId.split("_")[1]; - if (randomId != null) { - var url = ctx + "/oscarRx/WriteScript.do?parameterValue=updateProperty"; - var data = ""; - if (elementId.match("prnVal_") != null) - data = "elementId=" + elementId + "&propertyValue=" + $(elementId).value; - else - data = "elementId=" + elementId + "&propertyValue=" + $(elementId).innerHTML; - data = data + "&rand=" + Math.floor(Math.random() * 10001); - new Ajax.Request(url, {method: 'post', parameters: data}); - } -} - -function lookNonEdittable(elementId) { - $(elementId).className = ''; -} - -function lookEdittable(elementId) { - $(elementId).className = 'highlight'; -} - -function setPrn(randomId) { - var prnStr = $('prn_' + randomId).innerHTML; - prnStr = prnStr.strip(); - var prnStyle = $('prn_' + randomId).getStyle('textDecoration'); - if (prnStr == 'prn' || prnStr == 'PRN' || prnStr == 'Prn') { - if (prnStyle.match("line-through") != null) { - $('prn_' + randomId).setStyle({textDecoration: 'none'}); - $('prnVal_' + randomId).value = true; - } else { - $('prn_' + randomId).setStyle({textDecoration: 'line-through'}); - $('prnVal_' + randomId).value = false; - } - } -} - -function focusTo(elementId) { - $(elementId).contentEditable = 'true'; - $(elementId).focus(); - //IE 6/7 bug..will this call onfocus twice?? may need to do browser check. - document.getElementById(elementId).onfocus(); - -} - -function updateSpecialInstruction(elementId) { - var randomId = elementId.split("_")[1]; - var url = ctx + "/oscarRx/WriteScript.do?parameterValue=updateSpecialInstruction"; - var data = "randomId=" + randomId + "&specialInstruction=" + $(elementId).value; - data = data + "&rand=" + Math.floor(Math.random() * 10001); - new Ajax.Request(url, {method: 'post', parameters: data}); -} - -function changeText(elementId) { - if ($(elementId).value == 'Enter Special Instruction') { - $(elementId).value = ""; - $(elementId).setStyle({color: 'black'}); - } else if ($(elementId).value == '') { - $(elementId).value = 'Enter Special Instruction'; - $(elementId).setStyle({color: 'gray'}); - } - -} - -function updateMoreLess(elementId) { - if ($(elementId).innerHTML == 'more') - $(elementId).innerHTML = 'less'; - else - $(elementId).innerHTML = 'more'; -} - -function changeDrugName(randomId, origDrugName) { - if (confirm('If you change the drug name and write your own drug, you will lose the following functionality:' - + '\n * Known Dosage Forms / Routes' - + '\n * Drug Allergy Information' - + '\n * Drug-Drug Interaction Information' - + '\n * Drug Information' - + '\n\nAre you sure you wish to use this feature?') == true) { - - //call another function to bring up prescribe.jsp - var url = ctx + "/oscarRx/WriteScript.do?parameterValue=normalDrugSetCustom"; - var customDrugName = $("drugName_" + randomId).getValue(); - var data = "randomId=" + randomId + "&customDrugName=" + customDrugName; - new Ajax.Updater('rxText', url, { - method: 'get', - parameters: data, - asynchronous: true, - insertion: Insertion.Bottom, - onSuccess: function (transport) { - $('set_' + randomId).remove(); - - } - }); - - if (MYDRUGREF_DS == "yes") { - callReplacementWebService("GetmyDrugrefInfo.do?method=view", 'interactionsRxMyD'); - } - } else { - $("drugName_" + randomId).value = origDrugName; - } -} - -function resetStash() { - var url = ctx + "/oscarRx/deleteRx.do?parameterValue=clearStash"; - var data = "rand=" + Math.floor(Math.random() * 10001); - new Ajax.Request(url, { - method: 'post', parameters: data, onSuccess: function (transport) { - updateCurrentInteractions(); - } - }); - $('rxText').innerHTML = "";//make pending prescriptions disappear. - $("searchString").focus(); -} - -function iterateStash() { - var url = ctx + "/oscarRx/WriteScript.do?parameterValue=iterateStash"; - var data = "rand=" + Math.floor(Math.random() * 10001); - new Ajax.Updater('rxText', url, { - method: 'get', parameters: data, asynchronous: true, evalScripts: true, - insertion: Insertion.Bottom, onSuccess: function (transport) { - updateCurrentInteractions(); - } - }); - -} - -function rxPageSizeSelect() { - var ran_number = Math.round(Math.random() * 1000000); - var url = "GetRxPageSizeInfo.do?method=view"; - var params = "demographicNo=<%=demoNo%>&rand=" + ran_number; //hack to get around ie caching the page - new Ajax.Request(url, {method: 'post', parameters: params}); -} - -function reprint2(scriptNo) { - var data = "scriptNo=" + scriptNo + "&rand=" + Math.floor(Math.random() * 10001); - var url = ctx + "/oscarRx/rePrescribe2.do?method=reprint2"; - new Ajax.Request(url, - { - method: 'post', postBody: data, - onSuccess: function (transport) { - popForm2(scriptNo); - - } - }); - return false; -} - - -function deletePrescribe(randomId) { - var data = "randomId=" + randomId; - var url = ctx + "/oscarRx/rxStashDelete.do?parameterValue=deletePrescribe"; - new Ajax.Request(url, { - method: 'get', parameters: data, onSuccess: function (transport) { - updateCurrentInteractions(); - if ($('deleteOnCloseRxBox').value == 'true') { - deleteRxOnCloseRxBox(randomId); - } - } - }); -} - -function deleteRxOnCloseRxBox(randomId) { - - var data = "randomId=" + randomId; - var url = ctx + "/oscarRx/deleteRx.do?parameterValue=DeleteRxOnCloseRxBox"; - new Ajax.Request(url, { - method: 'get', parameters: data, onSuccess: function (transport) { - var json = transport.responseText.evalJSON(); - if (json != null) { - var id = json.drugId; - var rxDate = "rxDate_" + id; - var reRx = "reRx_" + id; - var del = "del_" + id; - var discont = "discont_" + id; - var prescrip = "prescrip_" + id; - $(rxDate).style.textDecoration = 'line-through'; - $(reRx).style.textDecoration = 'line-through'; - $(del).style.textDecoration = 'line-through'; - $(discont).style.textDecoration = 'line-through'; - $(prescrip).style.textDecoration = 'line-through'; - } - } - }); - -} - -function ThemeViewer() { - - var xy = Position.page($('drugProfile')); - var x = (xy[0] + 200) + 'px'; - var y = xy[1] + 'px'; - var wid = ($('drugProfile').getWidth() - 300) + 'px'; - var styleStr = {left: x, top: y, width: wid}; - - $('themeLegend').setStyle(styleStr); - $('themeLegend').show(); -} - -function useFav2(favoriteId) { - var randomId = Math.round(Math.random() * 1000000); - var data = "favoriteId=" + favoriteId + "&randomId=" + randomId; - var url = ctx + "/oscarRx/useFavorite.do?parameterValue=useFav2"; - new Ajax.Updater('rxText', url, { - method: 'get', - parameters: data, - asynchronous: true, - evalScripts: true, - insertion: Insertion.Bottom - }); -} - -function calculateRxData(randomId) { - var dummie = parseIntr($('instructions_' + randomId)); - if (dummie) - updateQty($('quantity_' + randomId)); -} - -function Delete2(element) { - - if (confirm('Are you sure you wish to delete the selected prescriptions?') == true) { - var id_str = (element.id).split("_"); - var id = id_str[1]; - //var id=element.id; - var rxDate = "rxDate_" + id; - var reRx = "reRx_" + id; - var del = "del_" + id; - var discont = "discont_" + id; - var prescrip = "prescrip_" + id; - - var url = ctx + "/oscarRx/deleteRx.do?parameterValue=Delete2"; - var data = "deleteRxId=" + element.id + "&rand=" + Math.floor(Math.random() * 10001); - new Ajax.Request(url, { - method: 'post', postBody: data, onSuccess: function (transport) { - $(rxDate).style.textDecoration = 'line-through'; - $(reRx).style.textDecoration = 'line-through'; - $(del).style.textDecoration = 'line-through'; - $(discont).style.textDecoration = 'line-through'; - $(prescrip).style.textDecoration = 'line-through'; - } - }); - } - return false; -} - -function checkAllergy(id, atcCode) { - var url = ctx + "/oscarRx/getAllergyData.jsp"; - var data = "atcCode=" + atcCode + "&id=" + id + "&rand=" + Math.floor(Math.random() * 10001); - new Ajax.Request(url, { - method: 'post', postBody: data, onSuccess: function (transport) { - var json = transport.responseText.evalJSON(); - if (json != null && json.DESCRIPTION != null && json.reaction != null) { - var str = "Allergy: " + json.DESCRIPTION + " Reaction: " + json.reaction + " Severity of Reaction: " + json.severity; - $('alleg_' + json.id).innerHTML = str; - document.getElementById('alleg_tbl_' + json.id).style.display = 'block'; - } - } - }); -} - -function checkIfInactive(id, dinNumber) { - var url = ctx + "/oscarRx/getInactiveDate.jsp"; - var data = "din=" + dinNumber + "&id=" + id + "&rand=" + Math.floor(Math.random() * 10001); - new Ajax.Request(url, { - method: 'post', postBody: data, onSuccess: function (transport) { - var json = transport.responseText.evalJSON(); - if (json != null) { - var str = "Inactive Drug Since: " + new Date(json.vec[0].time).toDateString(); - $('inactive_' + json.id).innerHTML = str; - } - } - }); -} - - -function Discontinue(event, element) { - var id_str = (element.id).split("_"); - var id = id_str[1]; - var widVal = ($('drugProfile').getWidth() - 300); - var widStr = widVal + 'px'; - var heightDrugProfile = $('discontinueUI').getHeight(); - var posx = 0, posy = 0; - if (event.pageX || event.pageY) { - posx = event.pageX; - posx = posx - widVal; - posy = event.pageY - heightDrugProfile / 2; - posx = posx + 'px'; - posy = posy + 'px'; - } else if (event.clientX || event.clientY) { - posx = event.clientX + document.body.scrollLeft - + document.documentElement.scrollLeft; - posx = posx - widVal; - posy = event.clientY + document.body.scrollTop - + document.documentElement.scrollTop - heightDrugProfile / 2; - posx = posx + 'px'; - posy = posy + 'px'; - } else { - var xy = Position.page($('drugProfile')); - posx = (xy[0] + 200) + 'px'; - if (xy[1] >= 0) - posy = xy[1] + 'px'; - else - posy = 0 + 'px'; - } - var styleStr = {left: posx, top: posy, width: widStr}; - - var drugName = $('prescrip_' + id).innerHTML; - $('discontinueUI').setStyle(styleStr); - $('disDrug').innerHTML = drugName; - $('discontinueUI').show(); - $('disDrugId').value = id; - - -} - -function Discontinue2(id, reason, comment, drugSpecial) { - var url = ctx + "/oscarRx/deleteRx.do?parameterValue=Discontinue"; - var demoNo = '<%=patient.getDemographicNo()%>'; - var data = "drugId=" + id + "&reason=" + reason + "&comment=" + comment + "&demoNo=" + demoNo + "&drugSpecial=" + drugSpecial + "&rand=" + Math.floor(Math.random() * 10001); - new Ajax.Request(url, { - method: 'post', postBody: data, onSuccess: function (transport) { - var json = transport.responseText.evalJSON(); - $('discontinueUI').hide(); - $('rxDate_' + json.id).style.textDecoration = 'line-through'; - $('reRx_' + json.id).style.textDecoration = 'line-through'; - $('del_' + json.id).style.textDecoration = 'line-through'; - $('discont_' + json.id).innerHTML = json.reason; - $('prescrip_' + json.id).style.textDecoration = 'line-through'; - } - }); - -} - -function updateCurrentInteractions() { - new Ajax.Request("GetmyDrugrefInfo.do?method=findInteractingDrugList&rand=" + Math.floor(Math.random() * 10001), { - method: 'get', onSuccess: function (transport) { - new Ajax.Request("UpdateInteractingDrugs.jsp?rand=" + Math.floor(Math.random() * 10001), { - method: 'get', onSuccess: function (transport) { - var str = transport.responseText; - str = str.replace('