aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/file-upload.js
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-09-02 14:39:45 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2013-09-02 14:39:45 +0200
commit88c4ac9b98761a5d853b8dbbc6141e1af8d1d498 (patch)
treeef93fb11166d2f8075014421f8a3ed5a49322ca4 /apps/files/js/file-upload.js
parent6572ca811fc56c71b4efc970668741630acbd63c (diff)
parent06870a6e390f68d741893b4454b8fe4063404ca8 (diff)
downloadnextcloud-server-88c4ac9b98761a5d853b8dbbc6141e1af8d1d498.tar.gz
nextcloud-server-88c4ac9b98761a5d853b8dbbc6141e1af8d1d498.zip
Merge branch 'master' into encryption_improved_error_messages_4617
Diffstat (limited to 'apps/files/js/file-upload.js')
-rw-r--r--apps/files/js/file-upload.js12
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){