making root url relative and fixing presentation of files with 0 bytes
This commit is contained in:
parent
b65106c25b
commit
7777c11584
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
var filesBaseUrl = "http://192.168.1.64:30080/files";
|
var filesBaseUrl = "/files";
|
||||||
|
|
||||||
var fileListElement = $("#file-list");
|
var fileListElement = $("#file-list");
|
||||||
var fileItemElementTemplate = fileListElement.find("li").detach();
|
var fileItemElementTemplate = fileListElement.find("li").detach();
|
||||||
|
@ -132,7 +132,7 @@ $(document).ready(function () {
|
||||||
filesData.map(function (fileData) {
|
filesData.map(function (fileData) {
|
||||||
fileData.mtime = new Date(fileData.mtime);
|
fileData.mtime = new Date(fileData.mtime);
|
||||||
|
|
||||||
if (fileData.size) {
|
if (fileData.hasOwnProperty("size")) {
|
||||||
fileData.rawSize = fileData.size;
|
fileData.rawSize = fileData.size;
|
||||||
fileData.size = fileSize(fileData.size);
|
fileData.size = fileSize(fileData.size);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue