diff options
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/filelist.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 94f161943a1..400e3e28f00 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -675,8 +675,13 @@ }).text(simpleSize); tr.append(td); - // date column - var modifiedColor = Math.round((Math.round((new Date()).getTime() / 1000) - mtime)/60/60/24*5); + // date column (1000 milliseconds to seconds, 60 seconds, 60 minutes, 24 hours) + // difference in days multiplied by 5 - brightest shade for files older than 32 days (160/5) + var modifiedColor = Math.round(((new Date()).getTime() - mtime )/1000/60/60/24*5 ); + // ensure that the brightest color is still readable + if (modifiedColor >= '160') { + modifiedColor = 160; + } td = $('<td></td>').attr({ "class": "date" }); td.append($('<span></span>').attr({ "class": "modified", |