CC-2253:Gap until show ends should display in HH:MM:SS

This commit is contained in:
james 2011-05-30 14:57:37 -04:00
parent 6e7ad79ff0
commit f7d37adfc6

View file

@ -171,11 +171,17 @@ function createDataGrid(){
var gapTime = oSettings.aoData[ oSettings.aiDisplay[iDisplayIndex]]._aData[4]; var gapTime = oSettings.aoData[ oSettings.aiDisplay[iDisplayIndex]]._aData[4];
var hours = parseInt( gapTime / 3600 ) % 24;
var minutes = parseInt( gapTime / 60 ) % 60;
var seconds = gapTime % 60;
var gapTimeFormat = (hours < 10 ? "0" + hours : hours) + ":" + (minutes < 10 ? "0" + minutes : minutes) + ":" + (seconds < 10 ? "0" + seconds : seconds);
var nGroup = document.createElement('tr'); var nGroup = document.createElement('tr');
var nCell = document.createElement('td'); var nCell = document.createElement('td');
nCell.colSpan = iColspan; nCell.colSpan = iColspan;
nCell.className = "gap"; nCell.className = "gap";
nCell.innerHTML = "Gap until show end: " + gapTime + " seconds"; nCell.innerHTML = "Gap until show end: " + gapTimeFormat + " seconds";
nGroup.appendChild(nCell); nGroup.appendChild(nCell);
nTrs[i].parentNode.replaceChild(nGroup, nTrs[i]); nTrs[i].parentNode.replaceChild(nGroup, nTrs[i]);
} else if ( sType.indexOf("r") != -1 ){ } else if ( sType.indexOf("r") != -1 ){