Skip to content

Commit

Permalink
CDR Module: Fixed restoreSession calls and converted redirect mechani…
Browse files Browse the repository at this point in the history
…sm to javascript.
  • Loading branch information
bradymiller committed Apr 26, 2011
1 parent b45d022 commit d94c6f8
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 14 deletions.
6 changes: 3 additions & 3 deletions interface/patient_file/reminder/clinical_reminders.php
Expand Up @@ -66,9 +66,9 @@
?>

<ul class="tabNav">
<li class='current'><a href='/play/javascript-tabbed-navigation/'><?php echo htmlspecialchars( xl('Main'), ENT_NOQUOTES); ?></a></li>
<li><a href='/play/javascript-tabbed-navigation/'><?php echo htmlspecialchars( xl('Plans'), ENT_NOQUOTES); ?></a></li>
<li><a href='/play/javascript-tabbed-navigation/'><?php echo htmlspecialchars( xl('Admin'), ENT_NOQUOTES); ?></a></li>
<li class='current'><a href='/play/javascript-tabbed-navigation/' onclick='top.restoreSession()'><?php echo htmlspecialchars( xl('Main'), ENT_NOQUOTES); ?></a></li>
<li><a href='/play/javascript-tabbed-navigation/' onclick='top.restoreSession()'><?php echo htmlspecialchars( xl('Plans'), ENT_NOQUOTES); ?></a></li>
<li><a href='/play/javascript-tabbed-navigation/' onclick='top.restoreSession()'><?php echo htmlspecialchars( xl('Admin'), ENT_NOQUOTES); ?></a></li>
</ul>

<div class="tabContainer">
Expand Down
2 changes: 1 addition & 1 deletion interface/patient_file/reminder/patient_reminders.php
Expand Up @@ -172,7 +172,7 @@ function sel_patient() {
<?php if ($mode == "simple") { // show the per patient rule setting option ?>
<ul class="tabNav">
<li class='current'><a href='/play/javascript-tabbed-navigation/'><?php echo htmlspecialchars( xl('Main'), ENT_NOQUOTES); ?></a></li>
<li ><a href='/play/javascript-tabbed-navigation/'><?php echo htmlspecialchars( xl('Rules'), ENT_NOQUOTES); ?></a></li>
<li ><a href='/play/javascript-tabbed-navigation/' onclick='top.restoreSession()'><?php echo htmlspecialchars( xl('Rules'), ENT_NOQUOTES); ?></a></li>
</ul>
<div class="tabContainer">
<div class="tab current" style="height:auto;width:97%;">
Expand Down
3 changes: 2 additions & 1 deletion interface/patient_file/rules/patient_data.php
Expand Up @@ -111,6 +111,7 @@ function submitme() {
// Close this window and refresh the patient summary display.
echo "<html>\n<body>\n<script language='JavaScript'>\n";
echo " window.close();\n";
echo " top.restoreSession();\n";
echo " if ( opener ) { opener.location.reload(); } else { parent.location.reload(); } \n";
echo "</script>\n</body>\n</html>\n";
exit();
Expand Down Expand Up @@ -143,7 +144,7 @@ function submitme() {
</table>

<br><br>
<form action='patient_data.php' name='patient_data' method='post'>
<form action='patient_data.php' name='patient_data' method='post' onsubmit='return top.restoreSession()'>
<table border=0 cellpadding=1 cellspacing=1>
<?php
echo "<tr><td class='required'>";
Expand Down
2 changes: 2 additions & 0 deletions interface/patient_file/summary/demographics.php
Expand Up @@ -241,6 +241,7 @@ function toggleIndicator(target,div) {
$("#disclosures_ps_expand").load("disc_fragment.php");

<?php if ($GLOBALS['enable_cdr'] && $GLOBALS['enable_cdr_crw']) { ?>
top.restoreSession();
$("#clinical_reminders_ps_expand").load("clinical_reminders_fragment.php", { 'embeddedScreen' : true }, function() {
// (note need to place javascript code here also to get the dynamic link to work)
$(".medium_modal").fancybox( {
Expand All @@ -257,6 +258,7 @@ function toggleIndicator(target,div) {
<?php } // end crw?>

<?php if ($GLOBALS['enable_cdr'] && $GLOBALS['enable_cdr_prw']) { ?>
top.restoreSession();
$("#patient_reminders_ps_expand").load("patient_reminders_fragment.php");
<?php } // end prw?>

Expand Down
5 changes: 3 additions & 2 deletions interface/reports/cqm.php
Expand Up @@ -53,6 +53,7 @@

function refreshme() {
// location.reload();
top.restoreSession();
document.forms[0].submit();
}

Expand Down Expand Up @@ -101,7 +102,7 @@ function GenXml(sNested) {
<span class='title'><?php echo htmlspecialchars( xl('Report'), ENT_NOQUOTES); ?> -
<?php echo htmlspecialchars( xl('Clinical Quality Measures'), ENT_NOQUOTES); ?></span>

<form method='post' name='theform' id='theform' action='cqm.php'>
<form method='post' name='theform' id='theform' action='cqm.php' onsubmit='return top.restoreSession()'>

<div id="report_parameters">

Expand Down Expand Up @@ -203,7 +204,7 @@ function GenXml(sNested) {
<tr>
<td>
<div style='margin-left:15px'>
<a href='#' class='css_button' onclick='$("#form_refresh").attr("value","true"); $("#theform").submit();'>
<a href='#' class='css_button' onclick='$("#form_refresh").attr("value","true"); top.restoreSession(); $("#theform").submit();'>
<span>
<?php echo htmlspecialchars( xl('Submit'), ENT_NOQUOTES); ?>
</span>
Expand Down
6 changes: 5 additions & 1 deletion interface/super/rules/base/template/redirect.php
Expand Up @@ -5,5 +5,9 @@
// 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.
?>
<script type="text/javascript">
top.restoreSession();
window.location = "<?php echo $_redirect ?>";
</script>

header("Location: $_redirect"); exit; ?>
3 changes: 2 additions & 1 deletion interface/super/rules/www/js/bucket.js
Expand Up @@ -20,6 +20,7 @@ var bucket = function( args ) {

var fn_prep_options = function( select, listType, hidden, showMe ) {
select.append( "<option value=''></option>");
top.restoreSession();
$.getJSON('index.php?action=edit!' + listType,
function(data) {
$.each( data, function(i, item) {
Expand Down Expand Up @@ -62,4 +63,4 @@ var bucket = function( args ) {
}
};

}
}
4 changes: 2 additions & 2 deletions interface/super/rules/www/js/custom.js
Expand Up @@ -19,7 +19,7 @@ var custom = function( args ) {
var fn_fill_columns = function( table, callback ) {
var colSelect = $("#fld_column");
colSelect.find(".populated").remove();

top.restoreSession();
$.getJSON('index.php?action=edit!columns&table=' + table,
function(data) {
$.each( data, function(i, item) {
Expand All @@ -45,4 +45,4 @@ var custom = function( args ) {
}
};

}
}
3 changes: 2 additions & 1 deletion interface/super/rules/www/js/edit.js
Expand Up @@ -81,6 +81,7 @@ var rule_edit = function( args ) {
var fn_wire_events = function() {
$('#btn_save').click( function() {
if ( fn_validate() ) {
top.restoreSession();
$('#frm_submit').submit();
}
});
Expand All @@ -95,4 +96,4 @@ var rule_edit = function( args ) {
}
};

}
}
4 changes: 3 additions & 1 deletion interface/super/rules/www/js/jQuery.autocomplete.js
Expand Up @@ -323,6 +323,7 @@ jQuery.autocomplete = function(input, options) {
receiveData(q, data);
// if an AJAX url has been supplied, try loading the data now
} else if( (typeof options.url == "string") && (options.url.length > 0) ){
top.restoreSession();
$.get(makeUrl(q), function(data) {
data = parseData(data);
addToCache(q, data);
Expand Down Expand Up @@ -393,6 +394,7 @@ jQuery.autocomplete = function(input, options) {
if (data) {
findValueCallback(q, data);
} else if( (typeof options.url == "string") && (options.url.length > 0) ){
top.restoreSession();
$.get(makeUrl(q), function(data) {
data = parseData(data)
addToCache(q, data);
Expand Down Expand Up @@ -504,4 +506,4 @@ jQuery.fn.indexOf = function(e){
if( this[i] == e ) return i;
}
return -1;
};
};
3 changes: 2 additions & 1 deletion interface/super/rules/www/js/list.js
Expand Up @@ -20,6 +20,7 @@ var list_rules = function( args ) {
sort = 'title';
}

top.restoreSession();
$.getJSON('index.php?action=browse!getrows',
function(data) {
data.sort(function(a, b) {
Expand Down Expand Up @@ -64,4 +65,4 @@ var list_rules = function( args ) {
}
};

}
}

0 comments on commit d94c6f8

Please sign in to comment.