Do not attempt ajax call of episode not checked on login page.

This commit is contained in:
Mikaël Ates 2016-01-12 18:45:30 +01:00
parent bb38cef013
commit 56cb5b7e47
1 changed files with 9 additions and 2 deletions

View File

@ -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');
});