Revert "UX: Let's try an animating heart out"

This reverts commit eb445ca2fc.
This commit is contained in:
Robin Ward 2014-12-19 17:18:00 -05:00
parent 9bb2ab6265
commit b06cb26f7f

View file

@ -13,18 +13,6 @@ export var Button = function(action, label, icon, opts) {
this.opts = this.opts || opts || {};
};
function animateHeart($elem, start, end, complete) {
$elem.stop()
.css('textIndent', start)
.animate({ textIndent: end }, {
complete: complete,
step: function(now) {
$(this).css('-webkit-transform','scale('+now+')');
},
duration: 300
}, 'linear');
}
Button.prototype.render = function(buffer) {
var opts = this.opts;
@ -48,6 +36,7 @@ export default Discourse.View.extend(StringBuffer, {
rerenderTriggers: [
'post.deleted_at',
'post.flagsAvailable.@each',
'post.reply_count',
'post.showRepliesBelow',
'post.can_delete',
@ -212,20 +201,7 @@ export default Discourse.View.extend(StringBuffer, {
},
clickLike: function(post) {
var $heart = this.$('.fa-heart'),
controller = this.get('controller');
var acted = post.get('actionByName.like.acted');
if (acted) {
controller.send('toggleLike', post);
} else {
animateHeart($heart, 1.0, 1.5, function() {
animateHeart($heart, 1.5, 1.0, function() {
controller.send('toggleLike', post);
});
});
}
this.get('controller').send('toggleLike', post);
},
// Flag button