diff options
author | Michael Jobst <mjobst+github@tecratech.de> | 2016-11-10 09:13:25 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-04-11 11:54:13 -0500 |
commit | 81b1dc4930204ca7210b595e631a4c4ce46fb79d (patch) | |
tree | 77e867b192923d51b054f529e0ab5e4a1623d204 /apps/files_sharing/js | |
parent | 45a6e376995a3ef6618b12ee65e6f903e846b1a5 (diff) | |
download | nextcloud-server-81b1dc4930204ca7210b595e631a4c4ce46fb79d.tar.gz nextcloud-server-81b1dc4930204ca7210b595e631a4c4ce46fb79d.zip |
share api expanded by tags (#26583)
* share api expanded by tags
* Modified files_sharing JS Unit tests
* modified tests. renamed request parameter. refactoring
* Update Share20OCS.php
Added missing function description
* Update Helper.php
Added missing function description
* Update Helper.php
implicit boolean conversion to !empty()
* Update Share20OCSTest.php
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_sharing/js')
-rw-r--r-- | apps/files_sharing/js/sharedfilelist.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js index 326bd1b5bf8..b11b302c6c2 100644 --- a/apps/files_sharing/js/sharedfilelist.js +++ b/apps/files_sharing/js/sharedfilelist.js @@ -56,7 +56,6 @@ if (options && options.linksOnly) { this._linksOnly = true; } - OC.Plugins.attach('OCA.Sharing.FileList', this); }, _renderRow: function() { @@ -83,7 +82,7 @@ // add row with expiration date for link only shares - influenced by _createRow of filelist if (this._linksOnly) { var expirationTimestamp = 0; - if(fileData.shares[0].expiration !== null) { + if(fileData.shares && fileData.shares[0].expiration !== null) { expirationTimestamp = moment(fileData.shares[0].expiration).valueOf(); } $tr.attr('data-expiration', expirationTimestamp); @@ -169,7 +168,8 @@ /* jshint camelcase: false */ data: { format: 'json', - shared_with_me: !!this._sharedWithUser + shared_with_me: !!this._sharedWithUser, + include_tags: true }, type: 'GET', beforeSend: function(xhr) { @@ -183,7 +183,8 @@ url: OC.linkToOCS('apps/files_sharing/api/v1') + 'remote_shares', /* jshint camelcase: false */ data: { - format: 'json' + format: 'json', + include_tags: true }, type: 'GET', beforeSend: function(xhr) { @@ -238,7 +239,8 @@ type: share.type, id: share.file_id, path: OC.dirname(share.mountpoint), - permissions: share.permissions + permissions: share.permissions, + tags: share.tags || [] }; file.shares = [{ @@ -276,7 +278,8 @@ var file = { id: share.file_source, icon: OC.MimeType.getIconUrl(share.mimetype), - mimetype: share.mimetype + mimetype: share.mimetype, + tags: share.tags || [] }; if (share.item_type === 'folder') { file.type = 'dir'; |