Add the following function to the HEAD of the Vicidial.php:
- Code: Select all
<script type="text/javascript">
function LiveCallSeconds(totalSeconds) {
var hours = Math.floor(totalSeconds / 3600);
var minutes = Math.floor((totalSeconds - (hours * 3600)) / 60);
var seconds = totalSeconds - (hours * 3600) - (minutes * 60);
// round seconds
seconds = Math.round(seconds * 100) / 100
var result = (hours < 10 ? "0" + hours : hours);
result += ":" + (minutes < 10 ? "0" + minutes : minutes);
result += ":" + (seconds < 10 ? "0" + seconds : seconds);
return result;
}
</script>
Change innerHTML to:
- Code: Select all
document.getElementById("SecondSDISP").innerHTML = LiveCallSeconds(VD_live_call_secondS);
Modify $SCwidth to $SCwidth-30 and change “seconds:” to “Duration:”
- Code: Select all
<span style="position:absolute;left:<?php echo $SCwidth-30 ?>px;top:<?php echo $SCheight ?>px;z-index:<?php $zi++; echo $zi ?>;" id="SecondSspan"><font class="body_text"> <?php echo _QXZ("Duration:"); ?>
I hope this helps others who may find this useful, and would be good to add as the default in future releases.