Files
nairobi/app/assets/javascripts/votes.js
Javi Martín a0b4e35dbd Show login to comment message in annotations
This way it's consistent with what we get when there are no comments. It
only appears once on the page so it isn't overwhelming.
2022-02-21 18:48:09 +01:00

20 lines
474 B
JavaScript

(function() {
"use strict";
App.Votes = {
hoverize: function(votes) {
$(document).on({
"mouseenter focus": function() {
$("div.participation-not-allowed", this).show();
},
mouseleave: function() {
$("div.participation-not-allowed", this).hide();
}
}, votes);
},
initialize: function() {
App.Votes.hoverize("div.votes");
App.Votes.hoverize("div.supports");
}
};
}).call(this);