|
|
|
@ -5,6 +5,14 @@ $(document).ready(function() { |
|
|
|
|
|
|
|
|
|
|
|
if (typeof OC.Share !== 'undefined' && typeof FileActions !== 'undefined' && !disableSharing) { |
|
|
|
if (typeof OC.Share !== 'undefined' && typeof FileActions !== 'undefined' && !disableSharing) { |
|
|
|
$('#fileList').on('fileActionsReady',function(){ |
|
|
|
$('#fileList').on('fileActionsReady',function(){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var allShared = $('#fileList').find('[data-share-owner]').find('[data-Action="Share"]'); |
|
|
|
|
|
|
|
allShared.addClass('permanent'); |
|
|
|
|
|
|
|
allShared.find('span').text(function(){ |
|
|
|
|
|
|
|
$owner = $(this).closest('tr').attr('data-share-owner'); |
|
|
|
|
|
|
|
return ' ' + t('files_sharing', 'Shared by {owner}', {owner: $owner}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (!sharesLoaded){ |
|
|
|
if (!sharesLoaded){ |
|
|
|
OC.Share.loadIcons('file'); |
|
|
|
OC.Share.loadIcons('file'); |
|
|
|
// assume that we got all shares, so switching directories
|
|
|
|
// assume that we got all shares, so switching directories
|
|
|
|
@ -17,16 +25,15 @@ $(document).ready(function() { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
FileActions.register('all', 'Share', OC.PERMISSION_READ, OC.imagePath('core', 'actions/share'), function(filename) { |
|
|
|
FileActions.register('all', 'Share', OC.PERMISSION_READ, OC.imagePath('core', 'actions/share'), function(filename) { |
|
|
|
if ($('#dir').val() == '/') { |
|
|
|
var dir = $('#dir').val(); |
|
|
|
var item = $('#dir').val() + filename; |
|
|
|
var item = dir + '/' + filename; |
|
|
|
} else { |
|
|
|
if (dir == '/') { |
|
|
|
var item = $('#dir').val() + '/' + filename; |
|
|
|
item = dir + filename; |
|
|
|
} |
|
|
|
} |
|
|
|
var tr = FileList.findFileEl(filename); |
|
|
|
var tr = FileList.findFileEl(filename); |
|
|
|
|
|
|
|
var itemType = 'file'; |
|
|
|
if ($(tr).data('type') == 'dir') { |
|
|
|
if ($(tr).data('type') == 'dir') { |
|
|
|
var itemType = 'folder'; |
|
|
|
itemType = 'folder'; |
|
|
|
} else { |
|
|
|
|
|
|
|
var itemType = 'file'; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
var possiblePermissions = $(tr).data('permissions'); |
|
|
|
var possiblePermissions = $(tr).data('permissions'); |
|
|
|
var appendTo = $(tr).find('td.filename'); |
|
|
|
var appendTo = $(tr).find('td.filename'); |
|
|
|
|