From 8e7066ecab24bf4f9795cf624e45804f27c5c005 Mon Sep 17 00:00:00 2001 From: Date: Thu, 22 May 2008 14:29:58 -0400 Subject: [PATCH] The results page should now work for scaling embeddableelections as well. --- app/views/embed/_backdrop.rhtml | 13 +++++++++++++ app/views/embed/full_vote.rhtml | 15 ++------------- app/views/embed/results.rhtml | 11 +++++++++-- public/stylesheets/embed.css | 8 ++++++++ 4 files changed, 32 insertions(+), 15 deletions(-) create mode 100644 app/views/embed/_backdrop.rhtml diff --git a/app/views/embed/_backdrop.rhtml b/app/views/embed/_backdrop.rhtml new file mode 100644 index 0000000..847f9a3 --- /dev/null +++ b/app/views/embed/_backdrop.rhtml @@ -0,0 +1,13 @@ +<%@election.candidates.length.times do |count|-%> + <% if (count%2)==0-%> + + <% else -%> + + <% end -%> +

+ <%=count+1 -%> +

+ +<%end%> \ No newline at end of file diff --git a/app/views/embed/full_vote.rhtml b/app/views/embed/full_vote.rhtml index 89e384c..56715eb 100644 --- a/app/views/embed/full_vote.rhtml +++ b/app/views/embed/full_vote.rhtml @@ -4,19 +4,8 @@
- <%@election.candidates.length.times do |count|%> - <% if (count%2)==0%> - - <% else %> - - <% end %> -

- <%=count+1%> -

- <%end%> + + <%= render :partial => '/embed/backdrop' %>
-
+
+ + <%= render :partial => '/embed/backdrop' %>
    <% @election.ssd_result.ranked_candidates.flatten.each do |ranking_id| %> @@ -24,7 +26,12 @@
    -
    +
    'true' %>">

    Results

    diff --git a/public/stylesheets/embed.css b/public/stylesheets/embed.css index 86248c1..164381f 100644 --- a/public/stylesheets/embed.css +++ b/public/stylesheets/embed.css @@ -113,6 +113,7 @@ p.position { color: #000000; font-size:32px; font-family:'arial'; + position:absolute; } ul { @@ -124,6 +125,7 @@ ul { .ranking { margin: 0px; height: 53px; + position:relative; overflow: hidden !important; } @@ -156,6 +158,12 @@ ul { height:53px; } +#results-bottom { + position: absolute; + width: 330px; + height:53px; +} + #container { margin: 0 auto 0 auto; width: 90%; -- 2.39.5