diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-08-18 11:34:56 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-08-18 11:34:56 +0200 |
commit | d8c71ba734d95e954d4ff3af50a44b94f9f016ff (patch) | |
tree | c89cd494a618e621f9c8941bac52bfed15dbad4c /apps/files/js/files.js | |
parent | 5c9aedac1b9e858e450ac0b1f009d8042206060b (diff) | |
parent | 12f4494de02457d51004ca6a82c1b2160189819f (diff) | |
download | nextcloud-server-d8c71ba734d95e954d4ff3af50a44b94f9f016ff.tar.gz nextcloud-server-d8c71ba734d95e954d4ff3af50a44b94f9f016ff.zip |
merge master in storage-wrapper-quota
Diffstat (limited to 'apps/files/js/files.js')
-rw-r--r-- | apps/files/js/files.js | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 98fc53b71a9..e1c53184dd1 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -121,7 +121,7 @@ $(document).ready(function() { }); // Show trash bin - $('#trash a').live('click', function() { + $('#trash').on('click', function() { window.location=OC.filePath('files_trashbin', '', 'index.php'); }); @@ -365,7 +365,9 @@ $(document).ready(function() { FileList.addFile(name,0,date,false,hidden); var tr=$('tr').filterAttr('data-file',name); tr.attr('data-mime',result.data.mime); + tr.attr('data-size',result.data.size); tr.attr('data-id', result.data.id); + tr.find('.filesize').text(humanFileSize(result.data.size)); getMimeIcon(result.data.mime,function(path){ tr.find('td.filename').attr('style','background-image:url('+path+')'); }); @@ -759,21 +761,13 @@ function procesSelection(){ $('#headerSize').text(humanFileSize(totalSize)); var selection=''; if(selectedFolders.length>0){ - if(selectedFolders.length==1){ - selection+=t('files','1 folder'); - }else{ - selection+=t('files','{count} folders',{count: selectedFolders.length}); - } + selection += n('files', '%n folder', '%n folders', selectedFolders.length); if(selectedFiles.length>0){ selection+=' & '; } } if(selectedFiles.length>0){ - if(selectedFiles.length==1){ - selection+=t('files','1 file'); - }else{ - selection+=t('files','{count} files',{count: selectedFiles.length}); - } + selection += n('files', '%n file', '%n files', selectedFiles.length); } $('#headerName>span.name').text(selection); $('#modified').text(''); @@ -845,3 +839,11 @@ function getUniqueName(name){ } return name; } + +function checkTrashStatus() { + $.post(OC.filePath('files_trashbin', 'ajax', 'isEmpty.php'), function(result){ + if (result.data.isEmpty === false) { + $("input[type=button][id=trash]").removeAttr("disabled"); + } + }); +} |