diff options
Diffstat (limited to 'core/js/share.js')
-rw-r--r-- | core/js/share.js | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/core/js/share.js b/core/js/share.js index b9b4a5bc754..5018d10ee9c 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -391,8 +391,18 @@ OC.Share={ } }); + var sharePlaceholder = t('core', 'Share with users or groups …'); + if(oc_appconfig.core.remoteShareAllowed) { + sharePlaceholder = t('core', 'Share with users, groups or remote users …'); + } + html += '<label for="shareWith" class="hidden-visually">'+t('core', 'Share')+'</label>'; - html += '<input id="shareWith" type="text" placeholder="'+t('core', 'Share with user or group …')+'" />'; + html += '<input id="shareWith" type="text" placeholder="' + sharePlaceholder + '" />'; + if(oc_appconfig.core.remoteShareAllowed) { + var federatedCloudSharingDoc = '<a target="_blank" class="icon-info svg shareWithRemoteInfo" href="{docLink}" ' + + 'title="' + t('core', 'Share with people on other ownClouds using the syntax username@example.com/owncloud') + '"></a>'; + html += federatedCloudSharingDoc.replace('{docLink}', oc_appconfig.core.federatedCloudShareDoc); + } html += '<span class="shareWithLoading icon-loading-small hidden"></span>'; html += '<ul id="shareWithList">'; html += '</ul>'; @@ -443,6 +453,11 @@ OC.Share={ dropDownEl = $(html); dropDownEl = dropDownEl.appendTo(appendTo); + // trigger remote share info tooltip + if(oc_appconfig.core.remoteShareAllowed) { + $('.shareWithRemoteInfo').tipsy({gravity: 'e'}); + } + //Get owner avatars if (oc_config.enable_avatars === true && data !== false && data.reshare !== false && data.reshare.uid_owner !== undefined) { dropDownEl.find(".avatar").avatar(data.reshare.uid_owner, 32); |