Compare commits
2 commits
master
...
bugfix/noi
Author | SHA1 | Date | |
---|---|---|---|
|
357a1678b3 | ||
|
d612aeec2d |
3 changed files with 20 additions and 21 deletions
BIN
apps/files_sharing/js/dist/additionalScripts.js
vendored
BIN
apps/files_sharing/js/dist/additionalScripts.js
vendored
Binary file not shown.
BIN
apps/files_sharing/js/dist/additionalScripts.js.map
vendored
BIN
apps/files_sharing/js/dist/additionalScripts.js.map
vendored
Binary file not shown.
|
@ -28,10 +28,11 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Regular expression for splitting parts of remote share owners:
|
* Regular expression for splitting parts of remote share owners:
|
||||||
|
* "user@example.com/"
|
||||||
* "user@example.com/path/to/owncloud"
|
* "user@example.com/path/to/owncloud"
|
||||||
* "user@anotherexample.com@example.com/path/to/owncloud
|
* "user@anotherexample.com@example.com/path/to/owncloud
|
||||||
*/
|
*/
|
||||||
_REMOTE_OWNER_REGEXP: new RegExp('^([^@]*)@(([^@]*)@)?([^/]*)([/](.*)?)?$'),
|
_REMOTE_OWNER_REGEXP: new RegExp('^(([^@]*)@(([^@^/^\\s]*)@)?)([^[\\s/]*)([/](.*))?$'),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the sharing plugin.
|
* Initialize the sharing plugin.
|
||||||
|
@ -350,24 +351,22 @@
|
||||||
*/
|
*/
|
||||||
_formatRemoteShare: function(shareWith, shareWithDisplayName, message) {
|
_formatRemoteShare: function(shareWith, shareWithDisplayName, message) {
|
||||||
var parts = OCA.Sharing.Util._REMOTE_OWNER_REGEXP.exec(shareWith)
|
var parts = OCA.Sharing.Util._REMOTE_OWNER_REGEXP.exec(shareWith)
|
||||||
if (!parts) {
|
if (!parts || !parts[6]) {
|
||||||
// display avatar of the user
|
// display avatar of the user
|
||||||
var avatar = '<span class="avatar" data-username="' + escapeHTML(shareWith) + '" title="' + message + ' ' + escapeHTML(shareWithDisplayName) + '"></span>'
|
var avatar = '<span class="avatar" data-username="' + escapeHTML(shareWith) + '" title="' + message + ' ' + escapeHTML(shareWithDisplayName) + '"></span>'
|
||||||
var hidden = '<span class="hidden-visually">' + message + ' ' + escapeHTML(shareWithDisplayName) + '</span> '
|
var hidden = '<span class="hidden-visually">' + message + ' ' + escapeHTML(shareWithDisplayName) + '</span> '
|
||||||
return avatar + hidden
|
return avatar + hidden
|
||||||
}
|
}
|
||||||
|
|
||||||
var userName = parts[1]
|
var userName = parts[2]
|
||||||
var userDomain = parts[3]
|
var userDomain = parts[4]
|
||||||
var server = parts[4]
|
var server = parts[5]
|
||||||
|
|
||||||
var tooltip = message + ' ' + userName
|
var tooltip = message + ' ' + userName
|
||||||
if (userDomain) {
|
if (userDomain) {
|
||||||
tooltip += '@' + userDomain
|
tooltip += '@' + userDomain
|
||||||
}
|
}
|
||||||
if (server) {
|
if (server) {
|
||||||
if (!userDomain) {
|
|
||||||
userDomain = '…'
|
|
||||||
}
|
|
||||||
tooltip += '@' + server
|
tooltip += '@' + server
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue