Skip to content

Commit

Permalink
Fix dependent questions css and alternate column color in grid questions
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadav committed Mar 10, 2011
1 parent b10e031 commit 2de1073
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
6 changes: 5 additions & 1 deletion app/views/partials/_question_group.html.haml
Expand Up @@ -5,6 +5,10 @@
- when :grid
%li
%table
%col{:class => "pre_col"}
- qs.first.answers.size.times do |t|
%col{:class => "#{t%2==0 ? 'even':'odd'}_col"}
%col{:class => "post_col"}
%tbody
- qs.each_slice(10) do |ten_questions| # header row every 10
%tr
Expand All @@ -27,4 +31,4 @@
= submit_tag("+ add row", :name => "section[#{@section.id}][g_#{g.id}]", :class => "add_row")
- else # :inline
- qs.each do |q|
= render q.custom_renderer || "/partials/question", :g => g, :q => q, :f => f
= render q.custom_renderer || "/partials/question", :g => g, :q => q, :f => f
@@ -1,7 +1,9 @@
!background_color = #EEEEEE
!background_color = #FFDDCC
!surveyor_flash_background_color = #FFF1A8
!surveyor_color = #FFFFF1
!surveyor_text_color = #333333
!surveyor_dependents_background_color = #DFDFD4
!surveyor_dependents_legend_background_color = "#DFDFA2"

!surveyor_menus_active_color = #EBEBCC
!surveyor_menus_border_color = #ccc
Expand Down Expand Up @@ -54,10 +56,15 @@ body
// question groups
fieldset.g_inline fieldset
:display inline
fieldset.g_grid li.surveyor_radio label
:visibility hidden
input
:visibility visible
fieldset.g_grid
table col.even_col
:background-color= "#FFDDCC"
table col.odd_col
:background-color= "#FFFFCC"
li.surveyor_radio label
:visibility hidden
input
:visibility visible
fieldset.g_repeater
ol fieldset
:display inline
Expand Down Expand Up @@ -87,6 +94,13 @@ body
:display inline
&.q_inline ol li
:display inline
&.q_hidden
:display none
&.q_dependent
:background-color= !surveyor_dependents_background_color
:margin-bottom 1em
legend
:background-color= !surveyor_dependents_legend_background_color
input, textarea, select
:margin 0 3px
input[type="text"], textarea
Expand Down

0 comments on commit 2de1073

Please sign in to comment.