diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index c847e2eff8..04a9fb9164 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -47,7 +47,7 @@ var FileList={ //size column if(size!=t('files', 'Pending')){ - simpleSize=simpleFileSize(size); + simpleSize = humanFileSize(size); }else{ simpleSize=t('files', 'Pending'); } @@ -55,7 +55,6 @@ var FileList={ var lastModifiedTime = Math.round(lastModified.getTime() / 1000); td = $('').attr({ "class": "filesize", - "title": humanFileSize(size), "style": 'color:rgb('+sizeColor+','+sizeColor+','+sizeColor+')' }).text(simpleSize); tr.append(td); diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 51b3f31fb9..98fc53b71a 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -756,9 +756,7 @@ function procesSelection(){ for(var i=0;i0){ if(selectedFolders.length==1){ diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index 7d679bc4bf..fa4cda6f6b 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -77,7 +77,7 @@ - t('Size (MB)')); ?> + t('Size')); ?> t( 'Modified' )); ?> diff --git a/apps/files/templates/part.list.php b/apps/files/templates/part.list.php index 97a9026860..0c7d693669 100644 --- a/apps/files/templates/part.list.php +++ b/apps/files/templates/part.list.php @@ -9,7 +9,6 @@ $totalsize = 0; ?> } else { $totalfiles++; } - $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(160-$file['size']/(1024*1024)*2); if($simple_size_color<0) $simple_size_color = 0; @@ -52,9 +51,8 @@ $totalsize = 0; ?> - + } ?> - + diff --git a/core/js/js.js b/core/js/js.js index 5158b66d73..cf4e72324d 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -666,8 +666,6 @@ $(document).ready(function(){ $('.selectedActions a').tipsy({gravity:'s', fade:true, live:true}); $('a.delete').tipsy({gravity: 'e', fade:true, live:true}); $('a.action').tipsy({gravity:'s', fade:true, live:true}); - $('#headerSize').tipsy({gravity:'s', fade:true, live:true}); - $('td.filesize').tipsy({gravity:'s', fade:true, live:true}); $('td .modified').tipsy({gravity:'s', fade:true, live:true}); $('input').tipsy({gravity:'w', fade:true}); @@ -697,14 +695,6 @@ function humanFileSize(size) { return relativeSize + ' ' + readableFormat; } -function simpleFileSize(bytes) { - var mbytes = Math.round(bytes/(1024*1024/10))/10; - if(bytes == 0) { return '0'; } - else if(mbytes < 0.1) { return '< 0.1'; } - else if(mbytes > 1000) { return '> 1000'; } - else { return mbytes.toFixed(1); } -} - function formatDate(date){ if(typeof date=='number'){ date=new Date(date); diff --git a/lib/public/template.php b/lib/public/template.php index ccf19cf052..d81a169579 100644 --- a/lib/public/template.php +++ b/lib/public/template.php @@ -76,16 +76,6 @@ function relative_modified_date($timestamp) { } -/** - * @brief Return a human readable outout for a file size. - * @param $byte size of a file in byte - * @returns human readable interpretation of a file size - */ -function simple_file_size($bytes) { - return(\simple_file_size($bytes)); -} - - /** * @brief Generate html code for an options block. * @param $options the options diff --git a/lib/template.php b/lib/template.php index ae9ea18744..08df168afc 100644 --- a/lib/template.php +++ b/lib/template.php @@ -84,24 +84,6 @@ function human_file_size( $bytes ) { return OC_Helper::humanFileSize( $bytes ); } -function simple_file_size($bytes) { - if ($bytes < 0) { - return '?'; - } - $mbytes = round($bytes / (1024 * 1024), 1); - if ($bytes == 0) { - return '0'; - } - if ($mbytes < 0.1) { - return '< 0.1'; - } - if ($mbytes > 1000) { - return '> 1000'; - } else { - return number_format($mbytes, 1); - } -} - function relative_modified_date($timestamp) { $l=OC_L10N::get('lib'); $timediff = time() - $timestamp;