summaryrefslogtreecommitdiffstats
path: root/core/js/share.js
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-04-09 14:54:57 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-04-09 14:54:57 +0200
commitb9eaa386c4f72fcf6e347a92886897b537ade6e6 (patch)
treeadc8d01364d84587faa79baa5b8d79f1627a31c7 /core/js/share.js
parent0710db77bc59e296309e24773ffa6e77ef22991a (diff)
parent6f51beac23c48384103457c26cda71a7c7f42fc1 (diff)
downloadnextcloud-server-b9eaa386c4f72fcf6e347a92886897b537ade6e6.tar.gz
nextcloud-server-b9eaa386c4f72fcf6e347a92886897b537ade6e6.zip
Merge pull request #15235 from owncloud/remote-share-hint
Hint for remote sharing syntax
Diffstat (limited to 'core/js/share.js')
-rw-r--r--core/js/share.js17
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);