mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-15 09:46:06 +01:00
Add keepalive only on pages with data-grav-keepalive="true". Add data-grav-keepalive="true" to blueprints partials so all blueprints-generated forms are covered
This commit is contained in:
@@ -518,9 +518,10 @@ $(function () {
|
||||
remodal.find('.button.continue').attr('href', $(e.target).attr('href'));
|
||||
});
|
||||
|
||||
// Keep-alive
|
||||
setInterval(function() {
|
||||
keepAlive();
|
||||
}, (GravAdmin.config.admin_timeout/2)*1000); //Call keepAlive() 60s before the admin session timeouts
|
||||
|
||||
// Setup keep-alive on pages that have at least one element with data-grav-keepalive="true" set
|
||||
if ($(document).find('[data-grav-keepalive="true"]').length > 0) {
|
||||
setInterval(function() {
|
||||
keepAlive();
|
||||
}, (GravAdmin.config.admin_timeout/2)*1000); //Call keepAlive() 60s before the admin session timeouts
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user