diff options
author | Joas Schilling <coding@schilljs.com> | 2016-11-29 14:30:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-29 14:30:30 +0100 |
commit | f9271ebbd612c42eb33fb2b74023f7f7c8c1e05f (patch) | |
tree | f02f8b1800a800b9c36d734f35cd361448042b9d | |
parent | eebef56f4c6915a63fb1ab1dfcfda225ca78d5f6 (diff) | |
parent | e7a146bd62bd423810f3e87340234e2a49813c45 (diff) | |
download | nextcloud-server-f9271ebbd612c42eb33fb2b74023f7f7c8c1e05f.tar.gz nextcloud-server-f9271ebbd612c42eb33fb2b74023f7f7c8c1e05f.zip |
Merge pull request #2394 from nextcloud/use-displayname-for-sharee-view
Use displayname instead of username for sharee view
-rw-r--r-- | core/js/sharedialogshareelistview.js | 5 | ||||
-rw-r--r-- | core/js/tests/specs/sharedialogviewSpec.js | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js index 226f18b2d76..7fcda92d5fd 100644 --- a/core/js/sharedialogshareelistview.js +++ b/core/js/sharedialogshareelistview.js @@ -22,7 +22,7 @@ '{{#each sharees}}' + '<li data-share-id="{{shareId}}" data-share-type="{{shareType}}" data-share-with="{{shareWith}}">' + '{{#if avatarEnabled}}' + - '<div class="avatar {{#if modSeed}}imageplaceholderseed{{/if}}" data-username="{{shareWith}}" {{#if modSeed}}data-seed="{{shareWith}} {{shareType}}"{{/if}}></div>' + + '<div class="avatar {{#if modSeed}}imageplaceholderseed{{/if}}" data-username="{{shareWith}}" data-displayname="{{shareWithDisplayName}}" {{#if modSeed}}data-seed="{{shareWith}} {{shareType}}"{{/if}}></div>' + '{{/if}}' + '<span class="has-tooltip username" title="{{shareWithTitle}}">{{shareWithDisplayName}}</span>' + '<span class="sharingOptionsGroup">' + @@ -269,7 +269,8 @@ $this.css({width: 32, height: 32}); $this.imageplaceholder($this.data('seed')); } else { - $this.avatar($this.data('username'), 32); + // user, size, ie8fix, hidedefault, callback, displayname + $this.avatar($this.data('username'), 32, undefined, undefined, undefined, $this.data('displayname')); } }); } diff --git a/core/js/tests/specs/sharedialogviewSpec.js b/core/js/tests/specs/sharedialogviewSpec.js index a44bb309c5c..985610d51fb 100644 --- a/core/js/tests/specs/sharedialogviewSpec.js +++ b/core/js/tests/specs/sharedialogviewSpec.js @@ -464,8 +464,9 @@ describe('OC.Share.ShareDialogView', function() { it('test avatar user', function() { var args = avatarStub.getCall(1).args; - expect(args.length).toEqual(2); + expect(args.length).toEqual(6); expect(args[0]).toEqual('user1'); + expect(args[5]).toEqual('User One'); }); it('test avatar for groups', function() { |