Files
grecia/app/assets/javascripts/votes.js.coffee
Juanjo Bazán e6a9cb4fcc disable voting on sps if setting disabled
refactors hover messages on sps votes
2016-04-15 23:01:00 +02:00

21 lines
660 B
CoffeeScript

App.Votes =
hoverize: (votes) ->
$(votes).hover ->
$("div.anonymous-votes", votes).show();
$("div.organizations-votes", votes).show();
$("div.not-logged", votes).show();
$("div.no-supports-allowed", votes).show();
$("div.logged", votes).hide();
, ->
$("div.anonymous-votes", votes).hide();
$("div.organizations-votes", votes).hide();
$("div.not-logged", votes).hide();
$("div.no-supports-allowed", votes).hide();
$("div.logged", votes).show();
initialize: ->
App.Votes.hoverize votes for votes in $("div.votes")
App.Votes.hoverize votes for votes in $("div.supports")
false