Merge pull request #22611 from owncloud/add-uid-on-hover

Add the uid on hover for sharing autocomplete
This commit is contained in:
Thomas Müller 2016-02-25 16:55:17 +01:00
commit 35423102af
2 changed files with 12 additions and 3 deletions

View File

@ -16,12 +16,12 @@
var TEMPLATE =
'<ul id="shareWithList" class="shareWithList">' +
'{{#each sharees}}' +
' <li data-share-id="{{shareId}}" data-share-type="{{shareType}}" data-share-with="{{shareWith}}" title="{{shareWith}}">' +
' <li data-share-id="{{shareId}}" data-share-type="{{shareType}}" data-share-with="{{shareWith}}">' +
' <a href="#" class="unshare"><span class="icon-loading-small hidden"></span><img class="svg" alt="{{unshareLabel}}" title="{{unshareLabel}}" src="{{unshareImage}}" /></a>' +
' {{#if avatarEnabled}}' +
' <div class="avatar {{#if modSeed}}imageplaceholderseed{{/if}}" data-username="{{shareWith}}" {{#if modSeed}}data-seed="{{shareWith}} {{shareType}}"{{/if}}></div>' +
' {{/if}}' +
' <span class="username">{{shareWithDisplayName}}</span>' +
' <span class="has-tooltip username" title="{{shareWith}}">{{shareWithDisplayName}}</span>' +
' {{#if mailNotificationEnabled}} {{#unless isRemoteShare}}' +
' <input id="mail-{{cid}}-{{shareWith}}" type="checkbox" name="mailNotification" class="mailNotification checkbox" {{#if wasMailSent}}checked="checked"{{/if}} />' +
' <label for="mail-{{cid}}-{{shareWith}}">{{notifyByMailLabel}}</label>' +
@ -193,6 +193,10 @@
});
}
this.$el.find('.has-tooltip').tooltip({
placement: 'bottom'
});
this.delegateEvents();
return this;

View File

@ -221,7 +221,7 @@
.tooltip('hide')
.tooltip({
placement: 'bottom',
trigger: 'manual',
trigger: 'manual'
})
.tooltip('fixTitle')
.tooltip('show');
@ -259,9 +259,14 @@
}
}
insert.text(text);
insert.attr('title', item.value.shareWith);
if(item.value.shareType === OC.Share.SHARE_TYPE_GROUP) {
insert = insert.wrapInner('<strong></strong>');
}
insert.tooltip({
placement: 'bottom',
container: 'body'
});
return $("<li>")
.addClass((item.value.shareType === OC.Share.SHARE_TYPE_GROUP) ? 'group' : 'user')
.append(insert)