diff options
Diffstat (limited to 'apps/files_sharing/js')
-rw-r--r-- | apps/files_sharing/js/app.js | 4 | ||||
-rw-r--r-- | apps/files_sharing/js/sharedfilelist.js | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/apps/files_sharing/js/app.js b/apps/files_sharing/js/app.js index 8fb5cb02e56..1c01c880a6d 100644 --- a/apps/files_sharing/js/app.js +++ b/apps/files_sharing/js/app.js @@ -316,7 +316,9 @@ OCA.Sharing.App = { iconClass: 'icon-close', type: OCA.Files.FileActions.TYPE_INLINE, shouldRender(context) { - if (context.$file.attr('data-remote-id')) { + // disable rejecting group shares from the pending list because they anyway + // land back into that same list + if (context.$file.attr('data-remote-id') && parseInt(context.$file.attr('data-share-type'), 10) === OC.Share.SHARE_TYPE_REMOTE_GROUP) { return false } return true diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js index 2afd8a21b31..bd3de5031ab 100644 --- a/apps/files_sharing/js/sharedfilelist.js +++ b/apps/files_sharing/js/sharedfilelist.js @@ -100,6 +100,10 @@ $tr.attr('data-remote-id', fileData.remoteId) } + if (fileData.shareType) { + $tr.attr('data-share-type', fileData.shareType) + } + // add row with expiration date for link only shares - influenced by _createRow of filelist if (this._linksOnly) { var expirationTimestamp = 0 @@ -333,6 +337,8 @@ mtime: share.mtime * 1000, mimetype: share.mimetype, type: share.type, + // remote share types are different and need to be mapped + shareType: (parseInt(share.share_type, 10) === 1) ? OC.Share.SHARE_TYPE_REMOTE_GROUP : OC.Share.SHARE_TYPE_REMOTE, id: share.file_id, path: OC.dirname(share.mountpoint), permissions: share.permissions, @@ -351,7 +357,7 @@ if (!file.type) { // pending shares usually have no type, so default to showing a directory icon - file.mimetype = 'httpd/unix-directory' + file.mimetype = 'dir-shared' } file.shares = [{ |