summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-10-29 13:58:14 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2018-11-01 21:29:40 +0100
commit1bd6d39b39dd527ad095510173e9012afaafd3b0 (patch)
tree9b3cad7e1dc621498cf519c3aadc53247f0582e1 /apps/files_sharing/js
parentfeb9f72e8bd4b5601974ec894d60e1bad3570dde (diff)
downloadnextcloud-server-1bd6d39b39dd527ad095510173e9012afaafd3b0.tar.gz
nextcloud-server-1bd6d39b39dd527ad095510173e9012afaafd3b0.zip
Migrate link shares to array
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing/js')
-rw-r--r--apps/files_sharing/js/share.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index 68529fd882f..b02c6e3d9ee 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -193,15 +193,15 @@
var $tr = fileList.findFileEl(fileInfoModel.get('name'));
// We count email shares as link share
- var hasLinkShare = shareModel.hasLinkShare();
+ var hasLinkShares = shareModel.hasLinkShares();
shareModel.get('shares').forEach(function (share) {
if (share.share_type === OC.Share.SHARE_TYPE_EMAIL) {
- hasLinkShare = true;
+ hasLinkShares = true;
}
});
OCA.Sharing.Util._updateFileListDataAttributes(fileList, $tr, shareModel);
- if (!OCA.Sharing.Util._updateFileActionIcon($tr, shareModel.hasUserShares(), hasLinkShare)) {
+ if (!OCA.Sharing.Util._updateFileActionIcon($tr, shareModel.hasUserShares(), hasLinkShares)) {
// remove icon, if applicable
OC.Share.markFileAsShared($tr, false, false);
}
@@ -249,15 +249,15 @@
*
* @param $tr file element of the file to update
* @param {boolean} hasUserShares true if a user share exists
- * @param {boolean} hasLinkShare true if a link share exists
+ * @param {boolean} hasLinkShares true if a link share exists
*
* @return {boolean} true if the icon was set, false otherwise
*/
- _updateFileActionIcon: function($tr, hasUserShares, hasLinkShare) {
+ _updateFileActionIcon: function($tr, hasUserShares, hasLinkShares) {
// if the statuses are loaded already, use them for the icon
// (needed when scrolling to the next page)
- if (hasUserShares || hasLinkShare || $tr.attr('data-share-recipient-data') || $tr.attr('data-share-owner')) {
- OC.Share.markFileAsShared($tr, true, hasLinkShare);
+ if (hasUserShares || hasLinkShares || $tr.attr('data-share-recipient-data') || $tr.attr('data-share-owner')) {
+ OC.Share.markFileAsShared($tr, true, hasLinkShares);
return true;
}
return false;