summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/js/filelist.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index ae92a3f1ee1..ac2e0d63588 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -32,14 +32,16 @@ var FileList={
html+='<td class="date"><span class="modified" title="'+formatDate(lastModified)+'" style="color:rgb('+modifiedColor+','+modifiedColor+','+modifiedColor+')">'+relative_modified_date(lastModified.getTime() / 1000)+'</span></td>';
html+='</tr>';
FileList.insertElement(name,'file',$(html).attr('data-file',name));
+ var row = $('tr').filterAttr('data-file',name);
if(loading){
- $('tr').filterAttr('data-file',name).data('loading',true);
+ row.data('loading',true);
}else{
- $('tr').filterAttr('data-file',name).find('td.filename').draggable(dragOptions);
+ row.find('td.filename').draggable(dragOptions);
}
if (hidden) {
- $('tr').filterAttr('data-file', name).hide();
+ row.hide();
}
+ FileActions.display(row.find('td.filename'));
},
addDir:function(name,size,lastModified,hidden){
var html, td, link_elem, sizeColor, lastModifiedTime, modifiedColor;
@@ -66,11 +68,13 @@ var FileList={
td.append($('<span></span>').attr({ "class": "modified", "title": formatDate(lastModified), "style": 'color:rgb('+modifiedColor+','+modifiedColor+','+modifiedColor+')' }).text( relative_modified_date(lastModified.getTime() / 1000) ));
html.append(td);
FileList.insertElement(name,'dir',html);
- $('tr').filterAttr('data-file',name).find('td.filename').draggable(dragOptions);
- $('tr').filterAttr('data-file',name).find('td.filename').droppable(folderDropOptions);
+ var row = $('tr').filterAttr('data-file',name);
+ row.find('td.filename').draggable(dragOptions);
+ row.find('td.filename').droppable(folderDropOptions);
if (hidden) {
- $('tr').filterAttr('data-file', name).hide();
+ row.hide();
}
+ FileActions.display(row.find('td.filename'));
},
refresh:function(data) {
var result = jQuery.parseJSON(data.responseText);