diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-11-04 03:00:03 +0100 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-11-04 03:00:03 +0100 |
commit | 2c68aab1983c912e52af6c0f62bc04850178894b (patch) | |
tree | 0cbf68f3be22624f2dbb8e1b752ad99e1679b625 /files/js/files.js | |
parent | 0c890a501cc7c24fb7eb5a4e4bff35dd2bb56b6d (diff) | |
parent | ce2b39b398b1bf2143e1b16523de5325a766d24d (diff) | |
download | nextcloud-server-2c68aab1983c912e52af6c0f62bc04850178894b.tar.gz nextcloud-server-2c68aab1983c912e52af6c0f62bc04850178894b.zip |
Merge branch 'master' into newbutton
Diffstat (limited to 'files/js/files.js')
-rw-r--r-- | files/js/files.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/files/js/files.js b/files/js/files.js index db3f3135b9f..4f9cde49aa9 100644 --- a/files/js/files.js +++ b/files/js/files.js @@ -1,4 +1,10 @@ $(document).ready(function() { + $('#fileList tr').each(function(){ + //little hack to set unescape filenames in attribute + $(this).attr('data-file',unescape($(this).data('file'))); + $(this).data('file',unescape($(this).data('file'))); + }); + if($('tr[data-file]').length==0){ $('.file_upload_filename').addClass('highlight'); } @@ -64,7 +70,7 @@ $(document).ready(function() { } procesSelection(); } else { - var filename=$(this).parent().parent().data('file'); + var filename=$(this).parent().parent().attr('data-file'); if(!FileList.isLoading(filename)){ var mime=$(this).parent().parent().data('mime'); var type=$(this).parent().parent().data('type'); @@ -185,9 +191,9 @@ $(document).ready(function() { if(response[0] != undefined && response[0].status == 'success'){ for(var i=0;i<response.length;i++){ var file=response[i]; - $('tr[data-file="'+file.name+'"]').data('mime',file.mime); + $('tr').filterAttr('data-file',file.name).data('mime',file.mime); if(size=='Pending'){ - $('tr[data-file='+file.name+'] td.filesize').text(file.size); + $('tr').filterAttr('data-file',file.name).find('td.filesize').text(file.size); } FileList.loadingDone(file.name); } @@ -388,7 +394,7 @@ var folderDropOptions={ url: 'ajax/move.php', data: "dir="+dir+"&file="+file+'&target='+dir+'/'+target, complete: function(data){boolOperationFinished(data, function(){ - var el=$('#fileList tr[data-file="'+file+'"] td.filename'); + var el = $('#fileList tr').filterAttr('data-file',file).find('td.filename'); el.draggable('destroy'); FileList.remove(file); });} |