Below is code to allow a small countdown text below the "Refresh" button and also refresh the page in /scp/tickets.php. It's tested in IE7 & FF3 but I'm sure it works in others.
/scp/js/refresh.js (Created)
var refreshTime=30;
function refreshCountDown()
{
refreshTime--;
if (refreshTime <=0)
{
clearTimeout(counter)
window.location.reload()
return
}
document.getElementById("refreshText").innerHTML=refreshTime+" secs"
counter=setTimeout("refreshCountDown()", 1000);
}
function refreshInit()
{
document.getElementById("refreshText").innerHTML=refreshTime+" secs"
refreshCountDown()
}
window.onload=refreshInit
/include/staff/tickets.inc.php (Modified)
~ Line 310
<a href="tickets.php"> <img src="images/refresh.gif" alt="Refresh" border=0></a>
Refresh Countdown addition by webPragmatist
<p id="refreshText" style="height: 10px; margin-left: 220px;"></p>
End Refresh Countdown addition by webPragmatist
/include/staff/header.inc.php (Modified)
~ Line 18
<script type="text/javascript" src="js/autolock.js" charset="utf-8"></script>
<?}?>
Refresh Countdown addition by webPragmatist
<?
if (empty($_GET) || array_key_exists('sort', $_GET) && array_key_exists('order', $_GET))
{?>
<script type="text/javascript" src="js/refresh.js" charset="utf-8"></script>
<? } ?>
End Refresh Countdown addition by webPragmatist
It seems this might break aprovals?
Check out (http://osticket.com/forums/showthread.php?p=13674#post13674)