diff options
author | Georg Ehrke <developer@georgehrke.com> | 2013-08-26 12:24:33 +0200 |
---|---|---|
committer | Georg Ehrke <developer@georgehrke.com> | 2013-08-26 12:24:33 +0200 |
commit | 6f0c1e8d452ce6a0e843e219dbda0ede87f54a38 (patch) | |
tree | 6fed1f8c7854887e70970af24c56131ab83cb9f1 /apps/files/js/file-upload.js | |
parent | 46cbd7cd3b37e073ebb497f34d54ab67e4761969 (diff) | |
parent | 653bc9a477a6f4833d9f34e1442d419cbb9429f8 (diff) | |
download | nextcloud-server-6f0c1e8d452ce6a0e843e219dbda0ede87f54a38.tar.gz nextcloud-server-6f0c1e8d452ce6a0e843e219dbda0ede87f54a38.zip |
Merge master into oc_preview
Diffstat (limited to 'apps/files/js/file-upload.js')
-rw-r--r-- | apps/files/js/file-upload.js | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index c401419fa42..191f7ed66bc 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -205,6 +205,13 @@ $(document).ready(function() { } }); }); + $('#new').click(function(event){ + event.stopPropagation(); + }); + $('#new>a').click(function(){ + $('#new>ul').toggle(); + $('#new').toggleClass('active'); + }); $('#new li').click(function(){ if($(this).children('p').length==0){ return; @@ -263,8 +270,9 @@ $(document).ready(function() { tr.attr('data-mime',result.data.mime); 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+')'); + var path = getPathForPreview(name); + lazyLoadPreview(path, result.data.mime, function(previewpath){ + tr.find('td.filename').attr('style','background-image:url('+previewpath+')'); }); } else { OC.dialogs.alert(result.data.message, t('core', 'Error')); @@ -325,8 +333,9 @@ $(document).ready(function() { var tr=$('tr').filterAttr('data-file',localName); tr.data('mime',mime).data('id',id); tr.attr('data-id', id); - getMimeIcon(mime,function(path){ - tr.find('td.filename').attr('style','background-image:url('+path+')'); + var path = $('#dir').val()+'/'+localName; + lazyLoadPreview(path, mime, function(previewpath){ + tr.find('td.filename').attr('style','background-image:url('+previewpath+')'); }); }); eventSource.listen('error',function(error){ |