diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2015-02-13 12:08:14 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2015-02-13 12:17:22 +0100 |
commit | 90218dcd4c7e0720348d72784b624469811e62e9 (patch) | |
tree | dca258f8837da8963378410feef79fa301548089 /core/js/share.js | |
parent | ecb7d4477525942d6104168f9361337247af9c48 (diff) | |
download | nextcloud-server-90218dcd4c7e0720348d72784b624469811e62e9.tar.gz nextcloud-server-90218dcd4c7e0720348d72784b624469811e62e9.zip |
Added config check
Diffstat (limited to 'core/js/share.js')
-rw-r--r-- | core/js/share.js | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/core/js/share.js b/core/js/share.js index e708ed587c6..692ce0b0ba0 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -358,9 +358,17 @@ OC.Share={ var html = '<div id="dropdown" class="drop shareDropDown" data-item-type="'+itemType+'" data-item-source="'+itemSource+'">'; if (data !== false && data.reshare !== false && data.reshare.uid_owner !== undefined) { if (data.reshare.share_type == OC.Share.SHARE_TYPE_GROUP) { - html += '<span class="reshare">'+t('core', 'Shared with you and the group {group} by {owner}', {group: data.reshare.share_with, owner: data.reshare.displayname_owner})+' <div id="avatar-share-owner" style="display: inline-block"></div></span>'; + html += '<span class="reshare">'+t('core', 'Shared with you and the group {group} by {owner}', {group: data.reshare.share_with, owner: data.reshare.displayname_owner}); + if (oc_config.enable_avatars === true) { + html += ' <div id="avatar-share-owner" style="display: inline-block"></div>'; + } + html += '</span>'; } else { - html += '<span class="reshare">'+t('core', 'Shared with you by {owner}', {owner: data.reshare.displayname_owner})+' <div id="avatar-share-owner" style="display: inline-block"></div></span>'; + html += '<span class="reshare">'+t('core', 'Shared with you by {owner}', {owner: data.reshare.displayname_owner}); + if (oc_config.enable_avatars === true) { + html += ' <div id="avatar-share-owner" style="display: inline-block"></div>'; + } + html += '</span>'; } html += '<br />'; // reduce possible permissions to what the original share allowed @@ -439,7 +447,7 @@ OC.Share={ dropDownEl = dropDownEl.appendTo(appendTo); //Get owner avatars - if (data !== false && data.reshare !== false && data.reshare.uid_owner !== undefined) { + if (oc_config.enable_avatars === true && data !== false && data.reshare !== false && data.reshare.uid_owner !== undefined) { $('#avatar-share-owner').avatar(data.reshare.uid_owner, 32); } @@ -656,10 +664,12 @@ OC.Share={ var html = '<li style="clear: both;" data-share-type="'+escapeHTML(shareType)+'" data-share-with="'+escapeHTML(shareWith)+'" title="' + escapeHTML(shareWith) + '">'; var showCrudsButton; html += '<a href="#" class="unshare"><img class="svg" alt="'+t('core', 'Unshare')+'" title="'+t('core', 'Unshare')+'" src="'+OC.imagePath('core', 'actions/delete')+'"/></a>'; - if (shareType === OC.Share.SHARE_TYPE_USER) { - html += '<div id="avatar-' + escapeHTML(shareWith) + '" class="avatar"></div>'; - } else { - html += '<div class="avatar" style="padding-right: 32px"></div>'; + if (oc_config.enable_avatars === true) { + if (shareType === OC.Share.SHARE_TYPE_USER) { + html += '<div id="avatar-' + escapeHTML(shareWith) + '" class="avatar"></div>'; + } else { + html += '<div class="avatar" style="padding-right: 32px"></div>'; + } } html += '<span class="username">' + escapeHTML(shareWithDisplayName) + '</span>'; var mailNotificationEnabled = $('input:hidden[name=mailNotificationEnabled]').val(); @@ -692,7 +702,7 @@ OC.Share={ html += '</div>'; html += '</li>'; html = $(html).appendTo('#shareWithList'); - if (shareType === OC.Share.SHARE_TYPE_USER) { + if (oc_config.enable_avatars === true && shareType === OC.Share.SHARE_TYPE_USER) { $('#avatar-' + escapeHTML(shareWith)).avatar(escapeHTML(shareWith), 32); } // insert cruds button into last label element |