$('#emptyfolder').hide();
$('.file_upload_filename').removeClass('highlight');
},
- loadingDone:function(name){
+ loadingDone:function(name, id){
var mime, tr=$('tr').filterAttr('data-file',name);
tr.data('loading',false);
mime=tr.data('mime');
tr.attr('data-mime',mime);
+ tr.attr('data-id', id);
getMimeIcon(mime,function(path){
tr.find('td.filename').attr('style','background-image:url('+path+')');
});
if(size==t('files','Pending')){
$('tr').filterAttr('data-file',file.name).find('td.filesize').text(file.size);
}
- FileList.loadingDone(file.name);
+ FileList.loadingDone(file.name, file.id);
} else {
$('#notification').text(t('files', response.data.message));
$('#notification').fadeIn();
if(size==t('files','Pending')){
$('tr').filterAttr('data-file',file.name).find('td.filesize').text(file.size);
}
- FileList.loadingDone(file.name);
+ FileList.loadingDone(file.name, file.id);
} else {
$('#notification').text(t('files', response.data.message));
$('#notification').fadeIn();
FileList.addFile(name,0,date,false,hidden);
var tr=$('tr').filterAttr('data-file',name);
tr.data('mime','text/plain').data('id',result.data.id);
+ tr.attr('data-id', result.data.id);
getMimeIcon('text/plain',function(path){
tr.find('td.filename').attr('style','background-image:url('+path+')');
});
if (result.status == 'success') {
var date=new Date();
FileList.addDir(name,0,date,hidden);
+ var tr=$('tr').filterAttr('data-file',name);
+ tr.attr('data-id', result.data.id);
} else {
OC.dialogs.alert(result.data.message, 'Error');
}
FileList.addFile(localName,size,date,false,hidden);
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+')');
});