summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-10-11 08:45:42 -0700
committerVincent Petry <pvince81@owncloud.com>2013-10-11 08:45:42 -0700
commit067475a9071753d018f48cb42cb78d5baa13f0fc (patch)
treeb26319a2a0cb49266d2bb85b0093314b1dbdff94 /apps
parentb2986e1994db36be0efb56c9e49f514a63e382a5 (diff)
parente98ea06890e87a67f2ae501b7daa55882d1d3a03 (diff)
downloadnextcloud-server-067475a9071753d018f48cb42cb78d5baa13f0fc.tar.gz
nextcloud-server-067475a9071753d018f48cb42cb78d5baa13f0fc.zip
Merge pull request #5302 from owncloud/files-missingfileactionsafteradd
File actions are now updated after create/upload file
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/file-upload.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index f1ef485fc3d..fbb53b3530a 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -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'));
}