diff options
author | icewind1991 <icewind1991@gmail.com> | 2012-11-12 14:57:06 -0800 |
---|---|---|
committer | icewind1991 <icewind1991@gmail.com> | 2012-11-12 14:57:06 -0800 |
commit | 66dfe270c68445de594420ba4a34a49ccb5ffb9e (patch) | |
tree | 2455c2c12efa5c349c898e56224ff07febc133af /apps/files | |
parent | 7b53c9d3f07bf630d38a7a9c92ee44a3fb9b0f21 (diff) | |
parent | 37fe9800b6979e5fe19dd9e4caf61fa1b4b2abaf (diff) | |
download | nextcloud-server-66dfe270c68445de594420ba4a34a49ccb5ffb9e.tar.gz nextcloud-server-66dfe270c68445de594420ba4a34a49ccb5ffb9e.zip |
Merge pull request #319 from owncloud/fileactions_newfile
Add fileactions to new files and folders
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/js/filelist.js | 16 |
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); |