Remove file & folder count

Remove build up of vars, data, functions and triggering the update of
this on load
This commit is contained in:
Matt Pass
2013-03-02 18:14:04 +00:00
parent d122c83535
commit 5898ebb5f0
4 changed files with 1 additions and 41 deletions

View File

@@ -1419,27 +1419,6 @@ var ICEcoder = {
document.getElementById('results').style.display = showHide=="show" ? 'inline-block' : 'none';
},
// Show file & folder count in server info screen
updateFileFolderCount: function() {
var fileText, dirText, unitSize, unitText, dContainer;
dirText = top.ICEcoder.dirCount > 1 ? "folders" : "folder";
fileText = top.ICEcoder.fileCount > 1 ? "files" : "file";
// Change into kilobytes
unitSize = Math.ceil(top.ICEcoder.fileBytes/1024);
unitText = "kb";
// Maybe we should show in megabytes?
if (unitSize >= 1024) {
unitSize = (unitSize / 1024).toFixed(2);
unitText = "mb";
}
// Update the display
dContainer = top.ICEcoder.content.contentWindow.document.getElementById('fileFolderCounts');
if (dContainer) {
dContainer.innerHTML = top.ICEcoder.fileCount+" "+fileText+", "+top.ICEcoder.dirCount+" "+dirText+"<br>~ "+unitSize+" "+unitText;
}
},
// Toggle full screen on/off
fullScreenSwitcher: function() {
// Future use