
' +
+ '
' +
row.DisplayName +
- '';
+ '' + (row.IsRoot ? '
' + wsp.fileBrowser.bytesToSize(row.Size) + ' / ' + wsp.fileBrowser.bytesToSize(row.Quota) + '' : '')
+ +'
';
},
"targets": 0
},
@@ -186,6 +187,14 @@ WspFileBrowser.prototype = {
}
});
};
+ },
+
+ bytesToSize: function(bytes) {
+ if (bytes == 0) return '0 Byte';
+ var k = 1024;
+ var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
+ var i = Math.floor(Math.log(bytes) / Math.log(k));
+ return (bytes / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i];
}
};
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Web.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Web.config
index 265b5f6e..3f07e5e5 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Web.config
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Web.config
@@ -52,6 +52,7 @@