diff options
author | Tom Needham <tom@owncloud.com> | 2013-10-12 09:15:59 +0100 |
---|---|---|
committer | Tom Needham <tom@owncloud.com> | 2013-10-12 09:15:59 +0100 |
commit | 14617682c8b0a833655be57f2be80ba2e78658d2 (patch) | |
tree | 598c25c1c2af0c512e598608786bb4f3eafe4130 /apps/files/js | |
parent | 6f8dd547889e2479eac62f42217835d8d4f38f49 (diff) | |
parent | 22bb9762fdf0502c6fe60eb12fa102d231bd5a71 (diff) | |
download | nextcloud-server-14617682c8b0a833655be57f2be80ba2e78658d2.tar.gz nextcloud-server-14617682c8b0a833655be57f2be80ba2e78658d2.zip |
Merge branch 'master' of github.com:owncloud/core into fix-unlogged-session-error
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/file-upload.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index f1ef485fc3d..c03e9037cec 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -345,7 +345,7 @@ $(document).ready(function() { } else if (result[0].status !== 'success') { //delete data.jqXHR; data.textStatus = 'servererror'; - data.errorThrown = result.data.message; // error message has been translated on server + data.errorThrown = result[0].data.message; // error message has been translated on server var fu = $(this).data('blueimp-fileupload') || $(this).data('fileupload'); fu._trigger('fail', e, data); } @@ -523,8 +523,10 @@ $(document).ready(function() { function(result){ if (result.status == 'success') { var date=new Date(); - FileList.addFile(name,0,date,false,hidden); - var tr=$('tr').filterAttr('data-file',name); + // TODO: ideally addFile should be able to receive + // all attributes and set them automatically, + // and also auto-load the preview + var tr = FileList.addFile(name,0,date,false,hidden); tr.attr('data-size',result.data.size); tr.attr('data-mime',result.data.mime); tr.attr('data-id', result.data.id); @@ -533,6 +535,7 @@ $(document).ready(function() { lazyLoadPreview(path, result.data.mime, function(previewpath){ tr.find('td.filename').attr('style','background-image:url('+previewpath+')'); }); + FileActions.display(tr.find('td.filename')); } else { OC.dialogs.alert(result.data.message, t('core', 'Error')); } |