diff --git a/src/biomon/static/biomon/js/biomon.patientdetail.js b/src/biomon/static/biomon/js/biomon.patientdetail.js index 349b616..b26b460 100644 --- a/src/biomon/static/biomon/js/biomon.patientdetail.js +++ b/src/biomon/static/biomon/js/biomon.patientdetail.js @@ -23,10 +23,9 @@ Last visited tab */ $("div#tabs").tabs(); - var tab_active; $('a.patient-tab').click(function() { $.cookie('patient-last-tab', $(this).attr('id'), { path: location.pathname }); - tab_active = $(this).attr('id'); + var tab_active = $(this).attr('id'); if ( tab_active == 'tab-alert' ) { ALERTS.refresh_alerts(); } else { @@ -39,8 +38,9 @@ } }); if ($.cookie('patient-last-tab')) { - tab_active = $.cookie('patient-last-tab'); $('a#' + $.cookie('patient-last-tab')).click(); + } else { + $('a#tab-dashboard').click(); }; /*