diff options
Diffstat (limited to 'files/js/files.js')
-rw-r--r-- | files/js/files.js | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/files/js/files.js b/files/js/files.js index 9f1f5368df0..f5dc40ad45d 100644 --- a/files/js/files.js +++ b/files/js/files.js @@ -387,39 +387,6 @@ function updateBreadcrumb(breadcrumbHtml) { $('p.nav').empty().html(breadcrumbHtml); } -function humanFileSize(bytes){ - if( bytes < 1024 ){ - return bytes+' B'; - } - bytes = Math.round(bytes / 1024, 1 ); - if( bytes < 1024 ){ - return bytes+' kB'; - } - bytes = Math.round( bytes / 1024, 1 ); - if( bytes < 1024 ){ - return bytes+' MB'; - } - - // Wow, heavy duty for owncloud - bytes = Math.round( bytes / 1024, 1 ); - return bytes+' GB'; -} - -function simpleFileSize(bytes) { - 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){ - var monthNames = [ t('files','January'), t('files','February'), t('files','March'), t('files','April'), t('files','May'), t('files','June'), - t('files','July'), t('files','August'), t('files','September'), t('files','October'), t('files','November'), t('files','December') ]; - return monthNames[date.getMonth()]+' '+date.getDate()+', '+date.getFullYear()+', '+((date.getHours()<10)?'0':'')+date.getHours()+':'+date.getMinutes(); -} - - //options for file drag/dropp var dragOptions={ distance: 20, revert: 'invalid', opacity: 0.7, |