From e635b64e678225f95113eaad8827e2c8560a2b27 Mon Sep 17 00:00:00 2001 From: Steve Robbins Date: Tue, 8 Dec 2015 10:11:36 -0800 Subject: [PATCH] Fixing auto refresh so multiple intervals arent running --- .../code/community/Steverobbins/Redismanager/etc/config.xml | 2 +- .../default/template/steverobbins/redismanager/manager.phtml | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/code/community/Steverobbins/Redismanager/etc/config.xml b/src/app/code/community/Steverobbins/Redismanager/etc/config.xml index 3faf91f..43dae62 100644 --- a/src/app/code/community/Steverobbins/Redismanager/etc/config.xml +++ b/src/app/code/community/Steverobbins/Redismanager/etc/config.xml @@ -14,7 +14,7 @@ - 1.4.0 + 1.4.1 diff --git a/src/app/design/adminhtml/default/default/template/steverobbins/redismanager/manager.phtml b/src/app/design/adminhtml/default/default/template/steverobbins/redismanager/manager.phtml index b731e8b..747c686 100644 --- a/src/app/design/adminhtml/default/default/template/steverobbins/redismanager/manager.phtml +++ b/src/app/design/adminhtml/default/default/template/steverobbins/redismanager/manager.phtml @@ -71,9 +71,8 @@ var redisForm; var redismanagerRefresh; $('redismanager-refresh-set').on('click', function() { var interval = parseInt($('redismanager-refresh-interval').value); - if (!interval) { - clearInterval(redismanagerRefresh); - } else { + clearInterval(redismanagerRefresh); + if (interval) { redisRefreshGrid(); redismanagerRefresh = setInterval(function() { redisRefreshGrid();