This message is only shown in the `show` action, so it's shown at most once in the whole page, so it doesn't take up too much space and it isn't as overwhelming as if we were showing it on the index page, once per debate. We're only showing it when there are closed options, though, since there's already a message to sign in to comment when the question accepts open answers.
21 lines
522 B
JavaScript
21 lines
522 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");
|
|
App.Votes.hoverize("div.comment-footer");
|
|
}
|
|
};
|
|
}).call(this);
|