From 81fbc45191a8c9bc5b23e3a997783af59321ff4f Mon Sep 17 00:00:00 2001 From: Date: Mon, 12 May 2008 19:44:22 -0400 Subject: [PATCH] Embeddable elctions now scale based on how many candidates in the election there are. However, the iframe adds a scroolbar if there's more than 5 candidates, and shows whitespace at the bottom when there's less than five. --- app/views/embed/full_vote.rhtml | 22 ++++++++++++++++++++-- public/images/bottom_dark.png | Bin 0 -> 634 bytes public/images/bottom_light.png | Bin 0 -> 1036 bytes public/stylesheets/embed.css | 6 ++---- 4 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 public/images/bottom_dark.png create mode 100644 public/images/bottom_light.png diff --git a/app/views/embed/full_vote.rhtml b/app/views/embed/full_vote.rhtml index 170b1f5..69eed9c 100644 --- a/app/views/embed/full_vote.rhtml +++ b/app/views/embed/full_vote.rhtml @@ -2,9 +2,22 @@ <%= link_to '', {:controller => 'front'}, {:target => "_parent"} %>

Vote Now

-
+ +
+ <%@election.candidates.length.times do |count|%> + <% if (count%2)==0%> + + <% else %> + + <% end %> + <%end%>
    + + + <% @voter.vote.rankings.each do |ranking| %>
  • <%= white_list ranking.candidate.name %>
-
+

Submit Vote

Drag and drop to rank the choices.

diff --git a/public/images/bottom_dark.png b/public/images/bottom_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..94dd72f178954d6e0f8d4c02aabe62de8e746eb3 GIT binary patch literal 634 zcmV-=0)_pFP)001=z0ssI2s7N*P0000PbVXQnQ*UN; zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU!97#k$RCwC#-A$6yFc1b%b<0pJxc?cr z6bBh9RwE@DiVYjet_kM7RmQXH>Q6tZSc>o8zBZ1OS))aaR#EHkJ==QHQfWBB7?FLf zPZhJtqE*c&^Lf*A#}_+(%urY5h*j>^dRD44XHF-xyZUUl)pC_}Z^Fm_Hsv{1AKN|E zd)8w>-PMG%=ahTP%|+s~-?E;$Hme-0A{2p-7UF$QU8S2Bm}SKKoORL|iomPv%a!2h zigq>NMRthdeRR6b-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