Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix dependent questions css and alternate column color in grid questions

  • Loading branch information...
commit 2de1073b93897d17458a8300884f9431530626d5 1 parent b10e031
Nadav authored
View
6 app/views/partials/_question_group.html.haml
@@ -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
@@ -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
View
24 generators/surveyor/templates/assets/stylesheets/sass/surveyor.sass
@@ -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
@@ -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
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.