mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-04 07:44:01 +01:00
Check if container exists before updating
A quick check is performed container exists before attemping update
This commit is contained in:
@@ -1501,7 +1501,7 @@ var ICEcoder = {
|
||||
|
||||
// Show file & folder count in server info screen
|
||||
updateFileFolderCount: function() {
|
||||
var fileText, dirText, unitSize, unitText;
|
||||
var fileText, dirText, unitSize, unitText, dContainer;
|
||||
|
||||
top.ICEcoder.dirCount > 1 ? dirText = "folders" : dirText = "folder";
|
||||
top.ICEcoder.fileCount > 1 ? fileText = "files" : fileText = "file";
|
||||
@@ -1514,6 +1514,9 @@ var ICEcoder = {
|
||||
unitText = "mb";
|
||||
}
|
||||
// Update the display
|
||||
top.ICEcoder.content.contentWindow.document.getElementById('fileFolderCounts').innerHTML = top.ICEcoder.fileCount+" "+fileText+", "+top.ICEcoder.dirCount+" "+dirText+"<br>~ "+unitSize+" "+unitText;
|
||||
dContainer = top.ICEcoder.content.contentWindow.document.getElementById('fileFolderCounts');
|
||||
if (dContainer) {
|
||||
dContainer.innerHTML = top.ICEcoder.fileCount+" "+fileText+", "+top.ICEcoder.dirCount+" "+dirText+"<br>~ "+unitSize+" "+unitText;
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user