summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-07-02 17:20:56 +0200
committerMorris Jobke <hey@morrisjobke.de>2014-07-02 17:20:56 +0200
commitb6aeea8c0b920eff27a2dc69b79155f3384f7f89 (patch)
treea9a311c8cfb44350d88339452f67b4aa5cefd90d
parent053b0a4063c9681608d62ed4af898a1a8465e357 (diff)
downloadnextcloud-server-b6aeea8c0b920eff27a2dc69b79155f3384f7f89.tar.gz
nextcloud-server-b6aeea8c0b920eff27a2dc69b79155f3384f7f89.zip
simplify formula and add comment
-rw-r--r--apps/files/js/filelist.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index c1dae4efdcc..08d0acb8c7b 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -675,8 +675,9 @@
}).text(simpleSize);
tr.append(td);
- // date column
- var modifiedColor = Math.round(((Math.round((new Date()).getTime()) - mtime)/60/60/24*5) / 1000);
+ // 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;