diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-07-02 21:00:32 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-07-02 21:00:32 +0200 |
commit | f1f66ff686a6b419fa06c11ecc0797238e45c7e2 (patch) | |
tree | 4bdaa33e401ea8c93286b2b2655e883f26a5618b /apps | |
parent | 3d0094723ce041e2dd0fc99af208bb9cd06f1adb (diff) | |
parent | b6aeea8c0b920eff27a2dc69b79155f3384f7f89 (diff) | |
download | nextcloud-server-f1f66ff686a6b419fa06c11ecc0797238e45c7e2.tar.gz nextcloud-server-f1f66ff686a6b419fa06c11ecc0797238e45c7e2.zip |
Merge pull request #9373 from owncloud/design-fix-modified
shade color for modified dates again, fix #9363
Diffstat (limited to 'apps')
-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", |