diff options
author | Jan-Christoph Borchardt <JanCBorchardt@fsfe.org> | 2011-07-30 15:31:11 +0200 |
---|---|---|
committer | Jan-Christoph Borchardt <JanCBorchardt@fsfe.org> | 2011-07-30 15:31:11 +0200 |
commit | 103d45539d4db6b5c646df46acd487a05c121290 (patch) | |
tree | 57fa16d6fd648c63f8b0ff686a95f0819167d531 /files/js | |
parent | 9714bab6533a0c8b7be0990b77063df7037bc0a1 (diff) | |
download | nextcloud-server-103d45539d4db6b5c646df46acd487a05c121290.tar.gz nextcloud-server-103d45539d4db6b5c646df46acd487a05c121290.zip |
fixed file size and date color calculation in JavaScript
Diffstat (limited to 'files/js')
-rw-r--r-- | files/js/filelist.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/files/js/filelist.js b/files/js/filelist.js index 862fb1797a6..359725cdc0d 100644 --- a/files/js/filelist.js +++ b/files/js/filelist.js @@ -23,9 +23,9 @@ FileList={ }else{ simpleSize='Pending'; } - sizeColor = Math.round(200-Math.pow((size/(1024*1024)),2)); + sizeColor = Math.round(200-size/1024*1024*2); lastModifiedTime=Math.round(lastModified.getTime() / 1000); - modifiedColor=Math.round((Math.round((new Date()).getTime() / 1000)-lastModifiedTime)/60/60/24*5); + modifiedColor=Math.round((Math.round((new Date()).getTime() / 1000)-lastModifiedTime)/60/60/24*14); html+='<td class="filesize" title="'+humanFileSize(size)+'" style="color:rgb('+sizeColor+','+sizeColor+','+sizeColor+')">'+simpleSize+'</td>'; html+='<td class="date" title="'+formatDate(lastModified)+'" style="color:rgb('+modifiedColor+','+modifiedColor+','+modifiedColor+')">'+relative_modified_date(lastModified.getTime() / 1000)+'</td>'; html+='</tr>'; |