making root url relative and fixing presentation of files with 0 bytes

This commit is contained in:
Mohammad Naghavi 2016-02-11 22:17:30 +01:00
parent b65106c25b
commit 7777c11584

View file

@ -6,7 +6,7 @@
$(document).ready(function () {
var filesBaseUrl = "http://192.168.1.64:30080/files";
var filesBaseUrl = "/files";
var fileListElement = $("#file-list");
var fileItemElementTemplate = fileListElement.find("li").detach();
@ -132,7 +132,7 @@ $(document).ready(function () {
filesData.map(function (fileData) {
fileData.mtime = new Date(fileData.mtime);
if (fileData.size) {
if (fileData.hasOwnProperty("size")) {
fileData.rawSize = fileData.size;
fileData.size = fileSize(fileData.size);
}