]> source.dussan.org Git - nextcloud-server.git/commitdiff
darker low threshold color for file size and age fading, better contrast
authorJan-Christoph Borchardt <hey@jancborchardt.net>
Tue, 11 Jun 2013 12:30:13 +0000 (14:30 +0200)
committerJan-Christoph Borchardt <hey@jancborchardt.net>
Tue, 11 Jun 2013 12:30:13 +0000 (14:30 +0200)
apps/files/js/filelist.js
apps/files/templates/part.list.php

index c24d1fd8244dd124d781e41f140cae700b6bb528..e19a35bbc5b6f3542506785e811cd917b70ad567 100644 (file)
@@ -51,7 +51,7 @@ var FileList={
                }else{
                        simpleSize=t('files', 'Pending');
                }
-               var sizeColor = Math.round(200-Math.pow((size/(1024*1024)),2));
+               var sizeColor = Math.round(160-Math.pow((size/(1024*1024)),2));
                var lastModifiedTime = Math.round(lastModified.getTime() / 1000);
                td = $('<td></td>').attr({
                        "class": "filesize",
index 1719d25e660103893c20d07fb3cf85e8fb4053e8..1e94275dcba006540f52af21a2b40b2d5fdc92c4 100644 (file)
@@ -3,12 +3,12 @@
 <?php foreach($_['files'] as $file):
        $simple_file_size = OCP\simple_file_size($file['size']);
        // the bigger the file, the darker the shade of grey; megabytes*2
-       $simple_size_color = intval(200-$file['size']/(1024*1024)*2);
+       $simple_size_color = intval(160-$file['size']/(1024*1024)*2);
        if($simple_size_color<0) $simple_size_color = 0;
        $relative_modified_date = OCP\relative_modified_date($file['mtime']);
        // the older the file, the brighter the shade of grey; days*14
        $relative_date_color = round((time()-$file['mtime'])/60/60/24*14);
-       if($relative_date_color>200) $relative_date_color = 200;
+       if($relative_date_color>160) $relative_date_color = 160;
        $name = rawurlencode($file['name']);
        $name = str_replace('%2F', '/', $name);
        $directory = rawurlencode($file['directory']);