diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-08-31 03:41:29 -0700 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-08-31 03:41:29 -0700 |
commit | 92e90c8eb995c886b3e9cd77c14e3f0b25b95cd7 (patch) | |
tree | ed757086fcf6d761a615eb7bbbf24ebc06407310 /apps/files/js/file-upload.js | |
parent | 0f5df181a3b1f88075193fca0bed88f289314c8e (diff) | |
parent | 668c4c2652ef4619a132d609461423aafaef424e (diff) | |
download | nextcloud-server-92e90c8eb995c886b3e9cd77c14e3f0b25b95cd7.tar.gz nextcloud-server-92e90c8eb995c886b3e9cd77c14e3f0b25b95cd7.zip |
Merge pull request #4022 from owncloud/oc_preview
\OC\Preview
Diffstat (limited to 'apps/files/js/file-upload.js')
-rw-r--r-- | apps/files/js/file-upload.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 1e6ab74fb6d..3d620c5640b 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -227,7 +227,7 @@ $(document).ready(function() { $(this).data('text',text); $(this).children('p').remove(); var form=$('<form></form>'); - var input=$('<input>'); + var input=$('<input type="text">'); form.append(input); $(this).append(form); input.focus(); @@ -268,8 +268,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')); @@ -330,8 +331,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){ |