diff --git a/less/modules/usercard.less b/less/modules/usercard.less
index 1b0a9f7..0fb12ef 100644
--- a/less/modules/usercard.less
+++ b/less/modules/usercard.less
@@ -67,8 +67,9 @@
}
&.plus {
+ background-color: @brand-primary;
> span > span {
- background-color: @brand-primary;
+ background-color: white;
}
}
}
diff --git a/lib/persona.js b/lib/persona.js
index 61d3a4d..853490c 100644
--- a/lib/persona.js
+++ b/lib/persona.js
@@ -1,6 +1,6 @@
"use strict";
-/*globals ajaxify, config, utils, NProgress*/
+/*globals ajaxify, config, utils, templates, app, Slideout, NProgress*/
$(document).ready(function() {
setupNProgress();
@@ -175,18 +175,23 @@ $(document).ready(function() {
var card = $(html);
avatar.parents('a').after(card.hide());
- card.find('.btn-morph').click(function(event){
- $(this).toggleClass('plus').toggleClass('heart');
+ if (parseInt(app.user.uid, 10) === parseInt(data.uid, 10)) {
+ card.find('.btn-morph').hide();
+ } else {
+ card.find('.btn-morph').click(function(ev){
+ $(this).toggleClass('plus').toggleClass('heart');
- if ($(this).find("b.drop").length == 0) {
- $(this).prepend("");
- }
+ if ($(this).find('b.drop').length === 0) {
+ $(this).prepend('');
+ }
- var drop = $(this).find("b.drop").removeClass("animate");
- x = event.pageX - drop.width()/2 - $(this).offset().left;
- y = event.pageY - drop.height()/2 - $(this).offset().top;
- drop.css({top: y+'px', left: x+'px'}).addClass("animate");
- });
+ var drop = $(this).find('b.drop').removeClass('animate'),
+ x = ev.pageX - drop.width() / 2 - $(this).offset().left,
+ y = ev.pageY - drop.height() / 2 - $(this).offset().top;
+
+ drop.css({top: y + 'px', left: x + 'px'}).addClass('animate');
+ });
+ }
utils.makeNumbersHumanReadable($('.human-readable-number'));
@@ -198,8 +203,7 @@ $(document).ready(function() {
card.fadeIn();
});
- })
- });
-
+ });
+ });
}
});
\ No newline at end of file