Fix bug with spaces in file names.
This commit is contained in:
parent
c7d1737d47
commit
13d2c5e926
|
@ -2,6 +2,7 @@ $(document).ready(function() {
|
||||||
$('#fileList tr').each(function(){
|
$('#fileList tr').each(function(){
|
||||||
//little hack to set unescape filenames in attribute
|
//little hack to set unescape filenames in attribute
|
||||||
$(this).attr('data-file',unescape($(this).data('file')));
|
$(this).attr('data-file',unescape($(this).data('file')));
|
||||||
|
$(this).data('file',unescape($(this).data('file')));
|
||||||
});
|
});
|
||||||
|
|
||||||
if($('tr[data-file]').length==0){
|
if($('tr[data-file]').length==0){
|
||||||
|
@ -69,7 +70,7 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
procesSelection();
|
procesSelection();
|
||||||
} else {
|
} else {
|
||||||
var filename=$(this).parent().parent().data('file');
|
var filename=$(this).parent().parent().attr('data-file');
|
||||||
if(!FileList.isLoading(filename)){
|
if(!FileList.isLoading(filename)){
|
||||||
var mime=$(this).parent().parent().data('mime');
|
var mime=$(this).parent().parent().data('mime');
|
||||||
var type=$(this).parent().parent().data('type');
|
var type=$(this).parent().parent().data('type');
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
$relative_modified_date = relative_modified_date($file['mtime']);
|
$relative_modified_date = relative_modified_date($file['mtime']);
|
||||||
$relative_date_color = round((time()-$file['mtime'])/60/60/24*14); // the older the file, the brighter the shade of grey; days*14
|
$relative_date_color = round((time()-$file['mtime'])/60/60/24*14); // the older the file, the brighter the shade of grey; days*14
|
||||||
if($relative_date_color>200) $relative_date_color = 200; ?>
|
if($relative_date_color>200) $relative_date_color = 200; ?>
|
||||||
<tr data-file="<?php echo urlencode($file['name']);?>" data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>" data-mime="<?php echo $file['mime']?>" data-size='<?php echo $file['size'];?>'>
|
<tr data-file="<?php echo str_replace('+','%20',urlencode($file['name']));?>" data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>" data-mime="<?php echo $file['mime']?>" data-size='<?php echo $file['size'];?>'>
|
||||||
<td class="filename svg" style="background-image:url(<?php if($file['type'] == 'dir') echo mimetype_icon('dir'); else echo mimetype_icon($file['mime']); ?>)">
|
<td class="filename svg" style="background-image:url(<?php if($file['type'] == 'dir') echo mimetype_icon('dir'); else echo mimetype_icon($file['mime']); ?>)">
|
||||||
<?php if(!isset($_['readonly']) || !$_['readonly']) { ?><input type="checkbox" /><?php } ?>
|
<?php if(!isset($_['readonly']) || !$_['readonly']) { ?><input type="checkbox" /><?php } ?>
|
||||||
<a class="name" href="<?php if($file['type'] == 'dir') echo $_['baseURL'].$file['directory'].'/'.$file['name']; else echo $_['downloadURL'].urlencode($file['directory']).'/'.urlencode($file['name']); ?>" title="">
|
<a class="name" href="<?php if($file['type'] == 'dir') echo $_['baseURL'].$file['directory'].'/'.$file['name']; else echo $_['downloadURL'].urlencode($file['directory']).'/'.urlencode($file['name']); ?>" title="">
|
||||||
|
|
Loading…
Reference in New Issue