Disable link sharing for folders temporarily - next release

This commit is contained in:
Michael Gapczynski 2012-09-09 14:52:03 -04:00
parent 6c17a4cb77
commit 5c5955b31f

View file

@ -39,8 +39,10 @@ $(document).ready(function() {
var tr = $('tr').filterAttr('data-file', filename);
if ($(tr).data('type') == 'dir') {
var itemType = 'folder';
var link = false;
} else {
var itemType = 'file';
var link = true;
}
var possiblePermissions = $(tr).data('permissions');
var appendTo = $(tr).find('td.filename');
@ -49,14 +51,14 @@ $(document).ready(function() {
if (item != $('#dropdown').data('item')) {
OC.Share.hideDropDown(function () {
$(tr).addClass('mouseOver');
OC.Share.showDropDown(itemType, $(tr).data('id'), appendTo, true, possiblePermissions);
OC.Share.showDropDown(itemType, $(tr).data('id'), appendTo, link, possiblePermissions);
});
} else {
OC.Share.hideDropDown();
}
} else {
$(tr).addClass('mouseOver');
OC.Share.showDropDown(itemType, $(tr).data('id'), appendTo, true, possiblePermissions);
OC.Share.showDropDown(itemType, $(tr).data('id'), appendTo, link, possiblePermissions);
}
});
}