add missing SuspendPageRefresh() to dashboard2

SuspendPageRefresh() is called on input's onfocus (on users.php) to stop auto refresh while user is typing, however it is missing on dashboard2
pull/80/head
narspt 8 years ago committed by GitHub
parent 27377a4d62
commit b8ec26965d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -107,6 +107,7 @@ if ($CallingHome['Active']) {
if ($PageOptions['PageRefreshActive']) { if ($PageOptions['PageRefreshActive']) {
echo ' echo '
<script> <script>
var PageRefresh;
function ReloadPage() {'; function ReloadPage() {';
if ($_SERVER['REQUEST_METHOD'] === 'POST') { if ($_SERVER['REQUEST_METHOD'] === 'POST') {
@ -125,10 +126,13 @@ if ($CallingHome['Active']) {
if (!isset($_GET['show']) || (($_GET['show'] != 'liveircddb') && ($_GET['show'] != 'reflectors') && ($_GET['show'] != 'interlinks'))) { if (!isset($_GET['show']) || (($_GET['show'] != 'liveircddb') && ($_GET['show'] != 'reflectors') && ($_GET['show'] != 'interlinks'))) {
echo ' echo '
setTimeout(ReloadPage, ' . $PageOptions['PageRefreshDelay'] . ');'; PageRefresh = setTimeout(ReloadPage, ' . $PageOptions['PageRefreshDelay'] . ');';
} }
echo ' echo '
function SuspendPageRefresh() {
clearTimeout(PageRefresh);
}
</script>'; </script>';
} }
if (!isset($_GET['show'])) $_GET['show'] = ""; if (!isset($_GET['show'])) $_GET['show'] = "";

Loading…
Cancel
Save

Powered by TurnKey Linux.