Skip to content

Commit

Permalink
update deprecated jquery code (openemr#2748)
Browse files Browse the repository at this point in the history
  • Loading branch information
litemikx authored and bradymiller committed Oct 27, 2019
1 parent 3d23be5 commit 06e25e2
Show file tree
Hide file tree
Showing 22 changed files with 29 additions and 29 deletions.
4 changes: 2 additions & 2 deletions interface/patient_file/history/history.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<?php Header::setupHeader('common'); ?>

<script type="text/javascript">
$(document).ready(function(){
$(function(){
tabbify();
});
<?php require_once("$include_root/patient_file/erx_patient_portal_js.php"); // jQuery for popups for eRx and patient portal ?>
Expand Down Expand Up @@ -144,7 +144,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/patient_file/history/history_full.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ function sel_related(e) {

<script type="text/javascript">
/// todo, move this to a common library
$(document).ready(function(){
$(function(){
if($("#form_tobacco").val()!=""){
if(code_options_js[$("#form_tobacco").val()]!=""){
$("#smoke_code").html(" ( "+code_options_js[$("#form_tobacco").val()]+" )");
Expand Down
2 changes: 1 addition & 1 deletion interface/patient_file/letter.php
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ function insertAtCursor(myField, myValue) {

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

$(document).ready(function(){
$(function(){
$("#form_generate").click(function() { $("#formaction").val("generate"); $("#theform").submit(); });
$("#form_template").change(function() { $("#formaction").val("loadtemplate"); $("#theform").submit(); });

Expand Down
2 changes: 1 addition & 1 deletion interface/patient_file/printed_fee_sheet.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ function genColumn($ix)
<script language=\"JavaScript\">";

$html .= "
$(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/patient_file/reminder/patient_reminders.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ function sel_patient() {
<?php $oemr_ui->oeBelowContainerDiv();?>
<script language="javascript">

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

tabbify();

Expand Down
4 changes: 2 additions & 2 deletions interface/patient_file/report/patient_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ function show_date_fun(){
<script language="javascript">

// jQuery stuff to make the page a little easier to use
$(document).ready(function(){
$(function(){
$('.datepicker').datetimepicker({
<?php $datetimepicker_timepicker = false; ?>
<?php $datetimepicker_showseconds = false; ?>
Expand Down Expand Up @@ -798,7 +798,7 @@ function issueClick(issue) {
}

var listId = '#' + <?php echo js_escape($list_id); ?>;
$(document).ready(function(){
$(function(){
$(listId).addClass("active");
});

Expand Down
2 changes: 1 addition & 1 deletion interface/patient_file/rules/patient_data.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function submitme() {
}
}

$(document).ready(function(){
$(function(){
$("#cancel").click(function() {
dlgclose();
});
Expand Down
2 changes: 1 addition & 1 deletion interface/patient_file/summary/add_edit_issue.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ function newtype(index) {
// Show or hide various rows depending on issue type, except do not
// hide the comments or referred-by fields if they have data.

$(document).ready(function(){
$(function(){
var comdisp = (aitypes[index] == 1) ? 'none' : '';
var revdisp = (aitypes[index] == 1) ? '' : 'none';
var injdisp = (aitypes[index] == 2) ? '' : 'none';
Expand Down
2 changes: 1 addition & 1 deletion interface/patient_file/summary/advancedirectives.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function validate(f) {
return true;
}

$(document).ready(function(){
$(function(){
$("#cancel").click(function() { dlgclose(); });

$('.datepicker').datetimepicker({
Expand Down
2 changes: 1 addition & 1 deletion interface/patient_file/summary/browse.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<?php Header::setupHeader(['datetime-picker', 'opener']); ?>

<script language="javascript">
$(document).ready(function(){
$(function(){
$('[name="findBy"').on('change', function () {
if($(this).val() === 'DOB'){
$('#searchparm').datetimepicker({
Expand Down
4 changes: 2 additions & 2 deletions interface/patient_file/summary/demographics.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ function doPublish() {
});
}

$(document).ready(function(){
$(function(){
var msg_updation='';
<?php
if ($GLOBALS['erx_enable']) {
Expand Down Expand Up @@ -1934,7 +1934,7 @@ function setMyPatient() {

var isPost = <?php echo js_escape($showEligibility); ?>;
var listId = '#' + <?php echo js_escape($list_id); ?>;
$(document).ready(function(){
$(function(){
$(listId).addClass("active");
if(isPost === true) {
$("#eligibility").click();
Expand Down
4 changes: 2 additions & 2 deletions interface/patient_file/summary/demographics_full.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
// Support for beforeunload handler.
var somethingChanged = false;

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

$(".medium_modal").on('click', function(e) {
Expand Down Expand Up @@ -926,7 +926,7 @@ function end_group()

<?php endif;?>

$(document).ready(function(){
$(function(){
//When document is ready collect all the values Marked with D (check duplicate) stored in the db into array duplicateFieldsArray.
var flds = new Array(<?php echo $mflist; ?>);
for (var i = 0; i < flds.length; ++i) {
Expand Down
2 changes: 1 addition & 1 deletion interface/patient_file/summary/disclosure_full.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class='css_button_small iframe' onclick='top.restoreSession()'><span><?php echo
</body>

<script type="text/javascript">
$(document).ready(function () {
$(function() {
// todo, move this to a common library
//for row highlight.
$(".noterow").mouseover(function () {
Expand Down
2 changes: 1 addition & 1 deletion interface/patient_file/summary/immunizations.php
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ function saveImmunizationObservationResults($id, $immunizationdata)

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

$(document).ready(function(){
$(function(){
<?php if (!($useCVX)) { ?>
$("#save").click(function() { SaveForm(); });
<?php } else { ?>
Expand Down
2 changes: 1 addition & 1 deletion interface/patient_file/summary/pnotes.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<script language="javascript">
// jQuery stuff to make the page a little easier to use

$(document).ready(function(){
$(function(){
$(".noterow").on("mouseover", function() { $(this).toggleClass("highlight"); });
$(".noterow").on("mouseout", function() { $(this).toggleClass("highlight"); });
});
Expand Down
2 changes: 1 addition & 1 deletion interface/patient_file/summary/pnotes_fragment.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@

tabbify();

$(document).ready(function(){
$(function(){
$(".noterow").mouseover(function() { $(this).toggleClass("highlight"); });
$(".noterow").mouseout(function() { $(this).toggleClass("highlight"); });

Expand Down
4 changes: 2 additions & 2 deletions interface/patient_file/summary/pnotes_full.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
<script type="text/javascript">
/// todo, move this to a common library

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

$("#dem_view").click( function() {
toggle( $(this), "#DEM" );
Expand Down Expand Up @@ -777,7 +777,7 @@ class="" id='Submit' onclick='return top.restoreSession()'><span><?php echo xlt(

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

$(document).ready(function(){
$(function(){
$("#appendnote").click(function() { AppendNote(); });
$("#newnote").click(function() { NewNote(); });
$("#printnote").click(function() { PrintNote(); });
Expand Down
4 changes: 2 additions & 2 deletions interface/patient_file/summary/pnotes_full_add.php
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ function submitform(attr) {

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

$(document).ready(function(){
$(function(){
$("#appendnote").click(function() { AppendNote(); });
$("#newnote").click(function() { NewNote(); });
$("#printnote").click(function() { PrintNote(); });
Expand Down Expand Up @@ -450,7 +450,7 @@ function submitform(attr) {
}

});
$(document).ready(function(){
$(function(){
$("#cancel").click(function() {
dlgclose();
});
Expand Down
2 changes: 1 addition & 1 deletion interface/patient_file/summary/record_disclosure.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function submitform() {
}
}

$(document).ready(function () {
$(function() {
$("#disclosure_form").submit(function (event) {
event.preventDefault(); //prevent default action
var post_url = $(this).attr("action");
Expand Down
4 changes: 2 additions & 2 deletions interface/patient_file/summary/stats_full.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ function newEncounter() {
<script language="javascript">
// jQuery stuff to make the page a little easier to use

$(document).ready(function(){
$(function(){
$(".statrow").mouseover(function() { $(this).toggleClass("highlight"); });
$(".statrow").mouseout(function() { $(this).toggleClass("highlight"); });

Expand Down Expand Up @@ -341,7 +341,7 @@ function newEncounter() {
}

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/patient_file/transaction/add_transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function end_group()

var mypcc = <?php echo js_escape($GLOBALS['phone_country_code']); ?>;

$(document).ready(function(){
$(function(){
$("#send_sum_flag").click(function() {
if ( $('#send_sum_flag').prop('checked') ) {
// Enable the send_sum_elec_flag checkbox
Expand Down
2 changes: 1 addition & 1 deletion interface/patient_file/transaction/transactions.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class='btn btn-print btn-default'>
<?php $oemr_ui->oeBelowContainerDiv();?>
<script>
var listId = '#' + <?php echo js_escape($list_id); ?>;
$(document).ready(function(){
$(function(){
$(listId).addClass("active");
});
</script>
Expand Down

0 comments on commit 06e25e2

Please sign in to comment.