summaryrefslogtreecommitdiffstats
path: root/files
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2011-10-03 22:59:40 +0100
committerTom Needham <needham.thomas@gmail.com>2011-10-03 22:59:40 +0100
commit02d7b1a1fc8f4bf62bfb973acfa0ee19ffa469ff (patch)
treedbf59263769a549a09f2aa5af3ccf2c9571bb125 /files
parent0825073e8cac2a654bbc89b99b5a83cdfee7a836 (diff)
parente8c6252a4ce1151b11f1faa8e602c06aae4294d8 (diff)
downloadnextcloud-server-02d7b1a1fc8f4bf62bfb973acfa0ee19ffa469ff.tar.gz
nextcloud-server-02d7b1a1fc8f4bf62bfb973acfa0ee19ffa469ff.zip
Added breadcrumb and control bar.
Diffstat (limited to 'files')
-rw-r--r--files/ajax/delete.php2
-rw-r--r--files/css/files.css2
-rw-r--r--files/js/fileactions.js10
-rw-r--r--files/templates/part.breadcrumb.php2
-rw-r--r--files/templates/part.list.php2
5 files changed, 9 insertions, 9 deletions
diff --git a/files/ajax/delete.php b/files/ajax/delete.php
index b6bc859897c..48df5862db2 100644
--- a/files/ajax/delete.php
+++ b/files/ajax/delete.php
@@ -20,7 +20,7 @@ foreach($files as $file) {
}
}
-if(success) {
+if($success) {
OC_JSON::success(array("data" => array( "dir" => $dir, "files" => $files )));
} else {
OC_JSON::error(array("data" => array( "message" => "Could not delete:\n" . $filesWithError )));
diff --git a/files/css/files.css b/files/css/files.css
index 27ead667dc4..1766d03d967 100644
--- a/files/css/files.css
+++ b/files/css/files.css
@@ -59,7 +59,7 @@ table thead.fixed { height:2em; }
#fileList tr td.filename { -webkit-transition:background-image 500ms; -moz-transition:background-image 500ms; -o-transition:background-image 500ms; transition:background-image 500ms; }
#select_all { float:left; margin:.3em 0.6em 0 .5em; }
#uploadsize-message,#delete-confirm { display:none; }
-.selectedActions a, a.action { float:right; display:inline; margin:0 .5em; padding:.3em .3em 0 .3em !important; }
+.selectedActions a,#fileList a.action { float:right; display:inline; margin:0 .5em; padding:.3em .3em 0 .3em !important; }
.selectedActions { display:none; }
/* add breadcrumb divider to the File item in navigation panel */
diff --git a/files/js/fileactions.js b/files/js/fileactions.js
index 24e01c34db7..81aedbd98b9 100644
--- a/files/js/fileactions.js
+++ b/files/js/fileactions.js
@@ -53,7 +53,7 @@ FileActions={
},
display:function(parent){
FileActions.currentFile=parent;
- $('.action').remove();
+ $('#fileList .action').remove();
var actions=FileActions.get(FileActions.getCurrentMimeType(),FileActions.getCurrentType());
var file=FileActions.getCurrentFile();
if($('tr[data-file="'+file+'"]').data('renaming')){
@@ -104,12 +104,12 @@ FileActions={
});
parent.parent().children().last().append(element);
}
- $('.action').hide();
- $('.action').fadeIn(200);
+ $('#fileList .action').hide();
+ $('#fileList .action').fadeIn(200);
return false;
},
hide:function(){
- $('.action').fadeOut(200,function(){
+ $('#fileList .action').fadeOut(200,function(){
$(this).remove();
});
},
@@ -125,7 +125,7 @@ FileActions={
}
FileActions.register('all','Download',function(){return OC.imagePath('core','actions/download')},function(filename){
- window.location='ajax/download.php?files='+filename+'&dir='+$('#dir').val();
+ window.location='ajax/download.php?files='+encodeURIComponent(filename)+'&dir='+encodeURIComponent($('#dir').val());
});
FileActions.register('all','Delete',function(){return OC.imagePath('core','actions/delete')},function(filename){
diff --git a/files/templates/part.breadcrumb.php b/files/templates/part.breadcrumb.php
index 9a265a9c1ea..63242dd326c 100644
--- a/files/templates/part.breadcrumb.php
+++ b/files/templates/part.breadcrumb.php
@@ -2,4 +2,4 @@
<div class="crumb svg" data-dir='<?php echo $crumb["dir"];?>' style='background-image:url("<?php echo image_path('core','breadcrumb.png');?>")'>
<a href="<?php echo $_['baseURL'].$crumb["dir"]; ?>"><?php echo htmlspecialchars($crumb["name"]); ?></a>
</div>
- <?php endforeach; ?>
+ <?php endforeach; ?> \ No newline at end of file
diff --git a/files/templates/part.list.php b/files/templates/part.list.php
index 398094f56d0..6bf5efe2fb2 100644
--- a/files/templates/part.list.php
+++ b/files/templates/part.list.php
@@ -8,7 +8,7 @@
<tr data-file="<?php echo $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']); ?>)">
<?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'].$file['directory'].'/'.$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="">
<span class="nametext">
<?php if($file['type'] == 'dir'):?>
<?php echo htmlspecialchars($file['name']);?>