veto

Simple Sinatra voting website.
git clone git://git.knutsen.co/veto
Log | Files | Refs | README | LICENSE

commit a9d39b5b3b1a56f5232b3b02ccc398fcc9d6026c
parent 3c66bb7323452af65dd43e256e03ed0f7444cdac
Author: Fredrik <moi@knutsen.co>
Date:   Wed, 31 Oct 2018 18:40:07 +0000

Merge pull request #10 from Demonstrandum/devel

Fixed other not showing in pie chart and styled tables
Diffstat:
Mpublic/poller.js | 2+-
Mviews/poll.erb | 9+++++++++
2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/public/poller.js b/public/poller.js @@ -103,7 +103,7 @@ const update_votes = () => { `) } } - if (other_allowed && enough_other) { + if (other_allowed) { $('#bar').show(); push_data(pie, 'Other', Math.round(total_other(votes))); bar.options.scales.xAxes[0].ticks.min = -1 + Math.min(...( diff --git a/views/poll.erb b/views/poll.erb @@ -63,6 +63,15 @@ tr td:nth-child(4) { background: #d7d7d7; } + .row { + display: flex; + align-items: center; + justify-content: center; + } + .row .columns { + height: 100%; + overflow: auto; + } #vote { width: calc(100% - 11em);