Skip to content

Commit

Permalink
Updated deprecated $(document).ready
Browse files Browse the repository at this point in the history
  • Loading branch information
waseemahmad31 committed Apr 21, 2019
1 parent 876b3f6 commit da1ba55
Show file tree
Hide file tree
Showing 98 changed files with 112 additions and 116 deletions.
4 changes: 2 additions & 2 deletions admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,12 @@ function sqlQuery($statement, $link)
</div>
</div>
<script>
$(document).ready(function() {
$(function() {
$('#help-href').click (function(){
document.getElementById('targetiframe').src = "Documentation/help_files/openemr_multisite_admin_help.php";
})
});
$(document).ready(function() {
$(function() {
$('#print-help-href').click (function(){
$("#targetiframe").get(0).contentWindow.print();
})
Expand Down
2 changes: 1 addition & 1 deletion contrib/forms/example2/new.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@

// jQuery stuff to make the page a little easier to use

$(document).ready(function(){
$(function(){
$(".save").click(function() { top.restoreSession(); document.my_form.submit(); });
$(".dontsave").click(function() { parent.closeTab(window.name, false); });

Expand Down
2 changes: 1 addition & 1 deletion contrib/forms/example2/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function PrintForm() {
<script language="javascript">
// jQuery stuff to make the page a little easier to use

$(document).ready(function(){
$(function(){
$(".save").click(function() { top.restoreSession(); document.my_form.submit(); });
$(".dontsave").click(function() { parent.closeTab(window.name, false); });
$(".printform").click(function() { PrintForm(); });
Expand Down
2 changes: 1 addition & 1 deletion contrib/forms/psychiatrySet/brief_aan_verwijzer/new.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function getPatientDateOfLastEncounter($nPid)

?>
<script type="text/javascript">
$(document).ready(function(){
$(function(){
autosave();
$('.datepicker').datetimepicker({
<?php $datetimepicker_timepicker = false; ?>
Expand Down
2 changes: 1 addition & 1 deletion contrib/forms/psychiatrySet/brief_aan_verwijzer/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function getPatientDateOfLastEncounter($nPid)

?>
<script type="text/javascript">
$(document).ready(function(){
$(function(){
autosave();
$('.datepicker').datetimepicker({
<?php $datetimepicker_timepicker = false; ?>
Expand Down
2 changes: 1 addition & 1 deletion contrib/forms/psychiatrySet/intakeverslag/new.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function getPatientDateOfLastEncounter($nPid)

?>
<script type="text/javascript">
$(document).ready(function(){
$(function(){
autosave();
$('.datepicker').datetimepicker({
<?php $datetimepicker_timepicker = false; ?>
Expand Down
2 changes: 1 addition & 1 deletion contrib/forms/psychiatrySet/intakeverslag/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function getPatientDateOfLastEncounter($nPid)

?>
<script type="text/javascript">
$(document).ready(function(){
$(function(){
autosave();
$('.datepicker').datetimepicker({
<?php $datetimepicker_timepicker = false; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ function getPatientDateOfLastEncounter($nPid)

?>
<script type="text/javascript">
$(document).ready(function(){
$(function(){
autosave();
$('.datepicker').datetimepicker({
<?php $datetimepicker_timepicker = false; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function getPatientDateOfLastEncounter($nPid)

?>
<script type="text/javascript">
$(document).ready(function(){
$(function(){
autosave();
$('.datepicker').datetimepicker({
<?php $datetimepicker_timepicker = false; ?>
Expand Down
2 changes: 1 addition & 1 deletion contrib/util/dupecheck/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@

<script language="javascript">

$(document).ready(function(){
$(function(){

// capture RETURN keypress
$("#limit").on("keypress", function(evt) { if (evt.keyCode == 13) $("#do_search").click(); });
Expand Down
2 changes: 1 addition & 1 deletion custom/download_qrda.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
var provider_id = <?php echo js_escape($provider_id);?>;
var zipFileArray = new Array();
var failureMessage = "";
$(document).ready(function(){
$(function(){
$("#checkAll").on("change", function() {
var checked = ( $("#checkAll").prop("checked") ) ? true : false;
$("#thisForm input:checkbox").each(function() {
Expand Down
2 changes: 1 addition & 1 deletion interface/billing/billing_process.php
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ function process_form($ar)
<script type="text/javascript"
src="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-1-9-1/jquery.min.js"></script>
<script>
$(document).ready( function() {
$( function() {
$("#close-link").click( function() {
window.close();
});
Expand Down
2 changes: 1 addition & 1 deletion interface/billing/billing_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,7 @@ function MarkAsCleared(Type) {
echo "alert(" . js_escape($alertmsg) . ");\n";
}
?>
$(document).ready(function () {
$(function () {
$("#view-log-link").click( function() {
top.restoreSession();
dlgopen('customize_log.php', '_blank', 500, 400);
Expand Down
2 changes: 1 addition & 1 deletion interface/billing/edih_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@

<!-- end DataTables js Begin local js -->
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery(function() {
// activate tab interface
jQuery("#tabs").tabs();
jQuery("#tabs").tabs().css('visibility','visible');
Expand Down
2 changes: 1 addition & 1 deletion interface/patient_tracker/patient_tracker.php
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ function kiosk_FLB() {
// refreshMe();
}

$(document).ready(function () {
$(function () {
refreshMe();
$("#kiosk").val('');
$("[name='kiosk_hide']").show();
Expand Down
2 changes: 1 addition & 1 deletion interface/reports/amc_tracking.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<script LANGUAGE="JavaScript">

$(document).ready(function() {
$(function() {
var win = top.printLogSetup ? top : opener.top;
win.printLogSetup(document.getElementById('printbutton'));

Expand Down
2 changes: 1 addition & 1 deletion interface/reports/appointments_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function fetch_reminders($pid, $appt_date)
<?php Header::setupHeader(["datetime-picker","report-helper"]); ?>

<script type="text/javascript">
$(document).ready(function() {
$(function() {
var win = top.printLogSetup ? top : opener.top;
win.printLogSetup(document.getElementById('printbutton'));

Expand Down
2 changes: 1 addition & 1 deletion interface/reports/appt_encounter_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ function endDoctor(&$docrow)
</style>

<script LANGUAGE="JavaScript">
$(document).ready(function() {
$(function() {
oeFixedHeaderSetup(document.getElementById('mymaintable'));
var win = top.printLogSetup ? top : opener.top;
win.printLogSetup(document.getElementById('printbutton'));
Expand Down
2 changes: 1 addition & 1 deletion interface/reports/audit_log_tamper_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ function setpatient(pid, lname, fname, dob) {
<script language="javascript">

// jQuery stuff to make the page a little easier to use
$(document).ready(function(){
$(function(){
// funny thing here... good learning experience
// the TR has TD children which have their own background and text color
// toggling the TR color doesn't change the TD color
Expand Down
2 changes: 1 addition & 1 deletion interface/reports/cdr_log.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<?php Header::setupHeader('datetime-picker'); ?>

<script LANGUAGE="JavaScript">
$(document).ready(function() {
$(function() {
$('.datepicker').datetimepicker({
<?php $datetimepicker_timepicker = true; ?>
<?php $datetimepicker_showseconds = true; ?>
Expand Down
2 changes: 1 addition & 1 deletion interface/reports/chart_location_activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
</style>

<script language="JavaScript">
$(document).ready(function() {
$(function() {
var win = top.printLogSetup ? top : opener.top;
win.printLogSetup(document.getElementById('printbutton'));
});
Expand Down
4 changes: 2 additions & 2 deletions interface/reports/clinical_reports.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<?php Header::setupHeader(['datetime-picker', 'report-helper']); ?>

<script language="JavaScript">
$(document).ready(function() {
$(function() {
var win = top.printLogSetup ? top : opener.top;
win.printLogSetup(document.getElementById('printbutton'));
});
Expand Down Expand Up @@ -181,7 +181,7 @@ function submitForm() {
}
}

$(document).ready(function() {
$(function() {
$(".numeric_only").keydown(function(event) {
//alert(event.keyCode);
// Allow only backspace and delete
Expand Down
2 changes: 1 addition & 1 deletion interface/reports/collections_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ function editInvoice(e, id) {
});
}

$(document).ready(function() {
$(function() {
oeFixedHeaderSetup(document.getElementById('mymaintable'));
var win = top.printLogSetup ? top : opener.top;
win.printLogSetup(document.getElementById('printbutton'));
Expand Down
2 changes: 1 addition & 1 deletion interface/reports/cqm.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@

<?php require $GLOBALS['srcdir'] . "/formatting_DateToYYYYMMDD_js.js.php" ?>

$(document).ready(function() {
$(function() {
var win = top.printLogSetup ? top : opener.top;
win.printLogSetup(document.getElementById('printbutton'));

Expand Down
2 changes: 1 addition & 1 deletion interface/reports/custom_report_range.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
<script type="text/javascript" src="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-datetimepicker/build/jquery.datetimepicker.full.min.js"></script>

<script language="Javascript">
$(document).ready(function() {
$(function() {
var win = top.printLogSetup ? top : opener.top;
win.printLogSetup(document.getElementById('printbutton'));

Expand Down
2 changes: 1 addition & 1 deletion interface/reports/destroyed_drugs_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

<script language="JavaScript">

$(document).ready(function() {
$(function() {
oeFixedHeaderSetup(document.getElementById('mymaintable'));
var win = top.printLogSetup ? top : opener.top;
win.printLogSetup(document.getElementById('printbutton'));
Expand Down
2 changes: 1 addition & 1 deletion interface/reports/edi_270.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ function toggleMessage(id,x12){

}

$(document).ready(function() {
$(function() {
$('.datepicker').datetimepicker({
<?php $datetimepicker_timepicker = false; ?>
<?php $datetimepicker_showseconds = false; ?>
Expand Down
2 changes: 1 addition & 1 deletion interface/reports/encounters_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function show_doc_total($lastdocname, $doc_encounters)
</style>

<script LANGUAGE="JavaScript">
$(document).ready(function() {
$(function() {
oeFixedHeaderSetup(document.getElementById('mymaintable'));
var win = top.printLogSetup ? top : opener.top;
win.printLogSetup(document.getElementById('printbutton'));
Expand Down
4 changes: 2 additions & 2 deletions interface/reports/external_data.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<?php Header::setupHeader();?>
<title><?php echo xlt('External Data'); ?></title>
<script>
$(document).ready(function() {
$(function() {
$('.ext-tab-head li').click(function() {
$('.ext-tab-head li').removeClass("child-active");
$(this).addClass("child-active");
Expand Down Expand Up @@ -230,7 +230,7 @@
<?php $oemr_ui->oeBelowContainerDiv();?>
<script>
var listId = '#' + <?php echo js_escape($list_id); ?>;
$(document).ready(function(){
$(function(){
$(listId).addClass("active");
});
</script>
Expand Down
2 changes: 1 addition & 1 deletion interface/reports/front_receipts_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function bucks($amt)
<script language="JavaScript">
<?php require($GLOBALS['srcdir'] . "/restoreSession.php"); ?>

$(document).ready(function() {
$(function() {
var win = top.printLogSetup ? top : opener.top;
win.printLogSetup(document.getElementById('printbutton'));

Expand Down
2 changes: 1 addition & 1 deletion interface/reports/immunization_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ function format_ethnicity($ethnicity)
<script language="JavaScript">
<?php require($GLOBALS['srcdir'] . "/restoreSession.php"); ?>

$(document).ready(function() {
$(function() {
var win = top.printLogSetup ? top : opener.top;
win.printLogSetup(document.getElementById('printbutton'));

Expand Down
2 changes: 1 addition & 1 deletion interface/reports/insurance_allocation_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<?php Header::setupHeader('datetime-picker'); ?>

<script language="JavaScript">
$(document).ready(function() {
$(function() {
var win = top.printLogSetup ? top : opener.top;
win.printLogSetup(document.getElementById('printbutton'));

Expand Down
2 changes: 1 addition & 1 deletion interface/reports/inventory_activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ function thisLineItem(

<script language='JavaScript'>

$(document).ready(function() {
$(function() {
oeFixedHeaderSetup(document.getElementById('mymaintable'));
var win = top.printLogSetup ? top : opener.top;
win.printLogSetup(document.getElementById('printbutton'));
Expand Down
2 changes: 1 addition & 1 deletion interface/reports/inventory_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function addWarning($msg)

<script language="JavaScript">

$(document).ready(function() {
$(function() {
oeFixedHeaderSetup(document.getElementById('mymaintable'));
var win = top.printLogSetup ? top : opener.top;
win.printLogSetup(document.getElementById('printbutton'));
Expand Down
2 changes: 1 addition & 1 deletion interface/reports/inventory_transactions.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ function thisLineItem($row, $xfer = false)

<script language='JavaScript'>

$(document).ready(function() {
$(function() {
oeFixedHeaderSetup(document.getElementById('mymaintable'));
var win = top.printLogSetup ? top : opener.top;
win.printLogSetup(document.getElementById('printbutton'));
Expand Down
2 changes: 1 addition & 1 deletion interface/reports/ippf_cyp_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function thisLineItem($patient_id, $encounter_id, $description, $transdate, $qty
<script type="text/javascript" src="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-datetimepicker/build/jquery.datetimepicker.full.min.js"></script>

<script language="JavaScript">
$(document).ready(function() {
$(function() {
var win = top.printLogSetup ? top : opener.top;
win.printLogSetup(document.getElementById('printbutton'));

Expand Down
2 changes: 1 addition & 1 deletion interface/reports/ippf_daily.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function genNumCell($num, $cnum)
<script type="text/javascript" src="../../library/textformat.js?v=<?php echo $v_js_includes; ?>"></script>

<script language="JavaScript">
$(document).ready(function() {
$(function() {
$('.datepicker').datetimepicker({
<?php $datetimepicker_timepicker = false; ?>
<?php $datetimepicker_showseconds = false; ?>
Expand Down
2 changes: 1 addition & 1 deletion interface/reports/ippf_statistics.php
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ function selreport() {

// End experimental code

$(document).ready(function() {
$(function() {
$('.datepicker').datetimepicker({
<?php $datetimepicker_timepicker = false; ?>
<?php $datetimepicker_showseconds = false; ?>
Expand Down
2 changes: 1 addition & 1 deletion interface/reports/non_reported.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ function tr($a)

<?php require($GLOBALS['srcdir'] . "/restoreSession.php"); ?>

$(document).ready(function() {
$(function() {
var win = top.printLogSetup ? top : opener.top;
win.printLogSetup(document.getElementById('printbutton'));

Expand Down
4 changes: 2 additions & 2 deletions interface/reports/pat_ledger.php
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ function sel_patient() {
}
</style>
<script language="JavaScript">
$(document).ready(function() {
$(function() {
var win = top.printLogSetup ? top : opener.top;
win.printLogSetup(document.getElementById('printbutton'));

Expand Down Expand Up @@ -943,7 +943,7 @@ function sel_patient() {
<?php $oemr_ui->oeBelowContainerDiv();?>
<script>
var listId = '#' + <?php echo js_escape($list_id); ?>;
$(document).ready(function(){
$(function(){
$(listId).addClass("active");
});
</script>
Expand Down
Loading

0 comments on commit da1ba55

Please sign in to comment.