From d556948c87ab0e46b5a08c12bf3633f4000328c3 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sat, 20 Feb 2016 17:01:21 -0500 Subject: [PATCH] feature(cloudcmd) add date column --- css/query.css | 2 +- css/style.css | 13 +++++++++---- lib/cloudfunc.js | 6 +++++- package.json | 4 ++-- tmpl/fs/file.hbs | 1 + 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/css/query.css b/css/query.css index 0963e52b..584373b9 100644 --- a/css/query.css +++ b/css/query.css @@ -118,7 +118,7 @@ padding : 1%; } - .size, .owner, .mode { + .size, .date, .owner, .mode { display: none; } diff --git a/css/style.css b/css/style.css index a1831ab6..dccf08ee 100644 --- a/css/style.css +++ b/css/style.css @@ -176,7 +176,7 @@ body, pre, code { .name { float: left; - width: 35%; + width: 27%; } .name a:hover { @@ -185,14 +185,19 @@ body, pre, code { .size { float:left; - width:16%; + width:12%; margin-right: 27px; text-align: right; } +.date { + float: left; + width: 20%; +} + .owner { display : inline-block; - width : 14%; + width : 13%; /* when inline-block * vertical align should be * set top to prevent additional @@ -203,7 +208,7 @@ body, pre, code { .mode { float: right; - width: 23%; + width: 16%; } .reduce-text { diff --git a/lib/cloudfunc.js b/lib/cloudfunc.js index 1b2347bf..943763c0 100644 --- a/lib/cloudfunc.js +++ b/lib/cloudfunc.js @@ -136,7 +136,7 @@ * */ this.buildFromJSON = function(params) { - var file, i, n, type, attribute, size, owner, mode, + var file, i, n, type, attribute, size, date, owner, mode, dotDot, link, dataName, linkResult, prefix = params.prefix, @@ -166,6 +166,7 @@ type : '', name : 'name', size : 'size', + date : 'date', owner : 'owner', mode : 'mode' }); @@ -203,6 +204,7 @@ type : 'directory', name : linkResult, size : '<dir>', + date : '.', owner : '.', mode : '--- --- ---' }); @@ -223,6 +225,7 @@ size = file.size; } + date = file.date; owner = file.owner || 'root'; mode = file.mode; @@ -245,6 +248,7 @@ type : type, name : linkResult, size : size, + date : date, owner : owner, mode : mode }); diff --git a/package.json b/package.json index 4392ad8d..f27f01bc 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "express": "~4.13.0", "faust": "~1.0.0", "files-io": "~1.2.0", - "flop": "~1.3.0", + "flop": "~1.4.0", "format-io": "~0.9.6", "http-auth": "~2.2.3", "ishtar": "~1.3.0", @@ -76,7 +76,7 @@ "readjson": "~1.1.0", "remedy": "~1.3.0", "rendy": "~1.1.0", - "restafary": "~1.5.0", + "restafary": "~1.6.0", "socket.io": "~1.4.3", "spero": "~1.3.0", "try-catch": "~1.0.0", diff --git a/tmpl/fs/file.hbs b/tmpl/fs/file.hbs index fd056278..34c0197e 100644 --- a/tmpl/fs/file.hbs +++ b/tmpl/fs/file.hbs @@ -2,6 +2,7 @@ {{ name }} {{ size }} + {{ date }} {{ owner }} {{ mode }} \ No newline at end of file