summaryrefslogtreecommitdiffstats
path: root/files
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2012-01-09 21:17:41 +0000
committerTom Needham <needham.thomas@gmail.com>2012-01-09 21:17:41 +0000
commit3f67918522045db91d7bf363c81e49fc8cb754a3 (patch)
tree542f7652f8bc61347ffcaf67641faafa5f9dce3e /files
parent27d9cbd8c0f53b1859716b32aa5ca33eee4749a5 (diff)
parent5817bd10bad89cf6dab07adeffac3239dc54d459 (diff)
downloadnextcloud-server-3f67918522045db91d7bf363c81e49fc8cb754a3.tar.gz
nextcloud-server-3f67918522045db91d7bf363c81e49fc8cb754a3.zip
Merge branch 'master' of gitorious.org:owncloud/owncloud into ace-editor
Diffstat (limited to 'files')
-rw-r--r--files/ajax/move.php2
-rw-r--r--files/js/files.js6
-rw-r--r--files/templates/part.list.php3
3 files changed, 6 insertions, 5 deletions
diff --git a/files/ajax/move.php b/files/ajax/move.php
index 8a56a015486..3517901c6cf 100644
--- a/files/ajax/move.php
+++ b/files/ajax/move.php
@@ -14,7 +14,7 @@ $target = $_GET["target"];
if(OC_Files::move($dir,$file,$target,$file)){
OC_JSON::success(array("data" => array( "dir" => $dir, "files" => $file )));
}else{
- OC_JSON::error(array("data" => array( "message" => "Could move $file" )));
+ OC_JSON::error(array("data" => array( "message" => "Could not move $file" )));
}
?>
diff --git a/files/js/files.js b/files/js/files.js
index 5a528f5122c..7c04245c223 100644
--- a/files/js/files.js
+++ b/files/js/files.js
@@ -12,7 +12,7 @@ $(document).ready(function() {
//drag/drop of files
$('#fileList tr td.filename').draggable(dragOptions);
- $('#fileList tr[data-type="dir"] td.filename').droppable(folderDropOptions);
+ $('#fileList tr[data-type="dir"][data-write="true"] td.filename').droppable(folderDropOptions);
$('div.crumb').droppable(crumbDropOptions);
$('ul#apps>li:first-child').data('dir','');
$('ul#apps>li:first-child').droppable(crumbDropOptions);
@@ -71,8 +71,8 @@ $(document).ready(function() {
} else {
var filename=$(this).parent().parent().attr('data-file');
var tr=$('tr').filterAttr('data-file',filename);
- var renaming=tr.data('renaming')
- if(!renaming && !FileList.isLoading(filename)){
+ var renaming=tr.data('renaming');
+ if(!renaming && !FileList.isLoading(filename)){
var mime=$(this).parent().parent().data('mime');
var type=$(this).parent().parent().data('type');
var action=FileActions.getDefault(mime,type);
diff --git a/files/templates/part.list.php b/files/templates/part.list.php
index ae3f32b2e9f..a364862119d 100644
--- a/files/templates/part.list.php
+++ b/files/templates/part.list.php
@@ -1,4 +1,5 @@
<?php foreach($_['files'] as $file):
+ $write = ($file['writeable']) ? 'true' : 'false';
$simple_file_size = simple_file_size($file['size']);
$simple_size_color = intval(200-$file['size']/(1024*1024)*2); // the bigger the file, the darker the shade of grey; megabytes*2
if($simple_size_color<0) $simple_size_color = 0;
@@ -9,7 +10,7 @@
$name = str_replace('%2F','/', $name);
$directory = str_replace('+','%20',urlencode($file['directory']));
$directory = str_replace('%2F','/', $directory); ?>
- <tr data-file="<?php echo $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 $name;?>" data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>" data-mime="<?php echo $file['mime']?>" data-size='<?php echo $file['size'];?>' data-write='<?php echo $write;?>'>
<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'].$directory.'/'.$name; else echo $_['downloadURL'].$directory.'/'.$name; ?>" title="">