|
|
|
@ -571,10 +571,16 @@ function warnLeavingUnsaved(message) {
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function setupAjaxIndicator() {
|
|
|
|
|
function setupHeartBeat(){
|
|
|
|
|
var time = 60*1000*30; // 30 mins
|
|
|
|
|
setInterval(function(){$.getJSON('/account/heartbeat');},time);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function setupAjaxIndicator() {
|
|
|
|
|
$('#ajax-indicator').bind('ajaxSend', function(event, xhr, settings) {
|
|
|
|
|
|
|
|
|
|
if(settings && settings.url && settings.url.endsWith('account/heartbeat')){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($('.ajax-loading').length === 0 && settings.contentType != 'application/octet-stream') {
|
|
|
|
|
$('#ajax-indicator').show();
|
|
|
|
|
}
|
|
|
|
@ -622,6 +628,7 @@ function transpotUrl (scope) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$(document).ready(setupAjaxIndicator);
|
|
|
|
|
$(document).ready(setupHeartBeat);
|
|
|
|
|
$(document).ready(hideOnLoad);
|
|
|
|
|
$(document).ready(addFormObserversForDoubleSubmit);
|
|
|
|
|
|
|
|
|
|