From 103d45539d4db6b5c646df46acd487a05c121290 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Sat, 30 Jul 2011 15:31:11 +0200 Subject: [PATCH] fixed file size and date color calculation in JavaScript --- files/css/files.css | 2 +- files/js/filelist.js | 4 ++-- files/templates/part.list.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/files/css/files.css b/files/css/files.css index 7d0471bc26b..4aaca82f124 100644 --- a/files/css/files.css +++ b/files/css/files.css @@ -23,7 +23,7 @@ span.extention, td.date { color:#999; } div.crumb { float:left; display:block; background:no-repeat right 0; padding:8px 1.5em 0 1em; height:28px; /*36-8*/ } div.crumb:last-child { font-weight:bold; } table tr.mouseOver td { background-color:#eee; } -table th { height:2em; padding-left:.5em; color:#999; } +table th { height:2em; padding:0 .5em; color:#999; } table th .name { float:left; margin-left:.5em; } table th.multiselect { background:#ddd; color:#000; font-weight:bold; } table th, table td { border-bottom:1px solid #ddd; text-align:left; font-weight:normal; } 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+=''+simpleSize+''; html+=''+relative_modified_date(lastModified.getTime() / 1000)+''; html+=''; diff --git a/files/templates/part.list.php b/files/templates/part.list.php index 8f55440fe48..22edd9351cd 100644 --- a/files/templates/part.list.php +++ b/files/templates/part.list.php @@ -1,10 +1,10 @@ >Nothing in here. Upload something! 200) $relative_date_color = 200; ?> '>