aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/fileactions.js
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2012-06-04 10:42:09 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2012-06-04 10:42:09 +0200
commit2d80c148ba8c1e83508a4c9e7318fa388740c9ff (patch)
tree82775a580260568c4578185e4ceb81f398affe27 /apps/files/js/fileactions.js
parentf3c1d1eded96e948b2ddc608de48778b62232231 (diff)
downloadnextcloud-server-2d80c148ba8c1e83508a4c9e7318fa388740c9ff.tar.gz
nextcloud-server-2d80c148ba8c1e83508a4c9e7318fa388740c9ff.zip
Don't allow user to delete, rename and re-share the "Shared" directory
Diffstat (limited to 'apps/files/js/fileactions.js')
-rw-r--r--apps/files/js/fileactions.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js
index 19978b61a7d..0c672cd6708 100644
--- a/apps/files/js/fileactions.js
+++ b/apps/files/js/fileactions.js
@@ -51,7 +51,7 @@ FileActions={
var actions=this.get(mime,type);
return actions[name];
},
- display:function(parent){
+ display:function(parent, filename, type){
FileActions.currentFile=parent;
$('#fileList span.fileactions, #fileList td.date a.action').remove();
var actions=FileActions.get(FileActions.getCurrentMimeType(),FileActions.getCurrentType());
@@ -62,6 +62,8 @@ FileActions={
parent.children('a.name').append('<span class="fileactions" />');
var defaultAction=FileActions.getDefault(FileActions.getCurrentMimeType(),FileActions.getCurrentType());
for(name in actions){
+ // no rename and share action for the 'Shared' dir
+ if((name=='Rename' || name =='Share') && type=='dir' && filename=='Shared') { continue; }
if((name=='Download' || actions[name]!=defaultAction) && name!='Delete'){
var img=FileActions.icons[name];
if(img.call){
@@ -84,7 +86,7 @@ FileActions={
parent.find('a.name>span.fileactions').append(element);
}
}
- if(actions['Delete']){
+ if(actions['Delete'] && (type!='dir' || filename != 'Shared')){ // no delete action for the 'Shared' dir
var img=FileActions.icons['Delete'];
if(img.call){
img=img(file);