From 56cb5b7e4771ce3901b82540794f787ce47a0b6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Ates?= Date: Tue, 12 Jan 2016 18:45:30 +0100 Subject: [PATCH] Do not attempt ajax call of episode not checked on login page. --- src/biomon/static/biomon/js/biomon.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/biomon/static/biomon/js/biomon.js b/src/biomon/static/biomon/js/biomon.js index 99f5c85..628ed9e 100644 --- a/src/biomon/static/biomon/js/biomon.js +++ b/src/biomon/static/biomon/js/biomon.js @@ -21,7 +21,12 @@ $(function() { var - _alerts_not_checked_url = "/alerts/livedata_provider/episodes_not_checked?"; + _alerts_not_checked_url = "/alerts/livedata_provider/episodes_not_checked?", + _login_page = false; + + if(window.location.pathname == '/login/') { + _login_page = true; + } /* Common settings @@ -149,7 +154,9 @@ _refresh_all_alerts(); }, 2000); }; - _refresh_all_alerts(); + if(!_login_page){ + _refresh_all_alerts(); + } $(document).on('click', 'div.alert-message', function(e) { window.location.href = '/patient/' + $(this).attr('patient-id'); });