diff --git a/Changelog.md b/Changelog.md index 75bc9ddb45203ad4d1586d8c8ee5358a7402e28a..4978cd8e1902aceaf810a98a38af2436af13e331 100644 --- a/Changelog.md +++ b/Changelog.md @@ -83,6 +83,7 @@ With the port to Bootstrap 3, app/views/terms/default.haml has a new structure. * Implement NodeInfo [#6239](https://github.com/diaspora/diaspora/pull/6239) * Display original author on reshares of NSFW posts [#6270](https://github.com/diaspora/diaspora/pull/6270) +* Use avatars in hovercards as links to the profile [#6297](https://github.com/diaspora/diaspora/pull/6297) # 0.5.2.0 diff --git a/app/assets/javascripts/app/views/hovercard_view.js b/app/assets/javascripts/app/views/hovercard_view.js index cfcf4976256c95e1835ba42db001b5c1152cf747..41b5f587ae665b7730511df7847b099284cafaaf 100644 --- a/app/assets/javascripts/app/views/hovercard_view.js +++ b/app/assets/javascripts/app/views/hovercard_view.js @@ -20,6 +20,7 @@ app.views.Hovercard = app.views.Base.extend({ // cache some element references this.avatar = this.$('.avatar'); + this.avatarLink = this.$("a.person_avatar"); this.dropdown = this.$('.dropdown_list'); this.dropdown_container = this.$('#hovercard_dropdown_container'); this.hashtags = this.$('.hashtags'); @@ -115,6 +116,7 @@ app.views.Hovercard = app.views.Base.extend({ var self = this; this.avatar.attr('src', person.avatar); + this.avatarLink.attr("href", person.url); this.person_link.attr('href', person.url); this.person_link.text(person.name); this.person_handle.text(person.handle); diff --git a/app/assets/templates/hovercard_tpl.jst.hbs b/app/assets/templates/hovercard_tpl.jst.hbs index 7070a36f4770da93460dcb8a6242ae60b653a09e..32908a08055f87ccf4cd5be82b83c035fe1e046e 100644 --- a/app/assets/templates/hovercard_tpl.jst.hbs +++ b/app/assets/templates/hovercard_tpl.jst.hbs @@ -1,5 +1,7 @@ <div id="hovercard"> - <img class="avatar"> + <a class='person_avatar'> + <img class="avatar"> + </a> <h4> <a class="person"></a> </h4>