surveyor 0.9.9 → 0.9.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +15 -8
- data/VERSION +1 -1
- data/app/views/partials/_answer.html.haml +8 -2
- data/app/views/partials/_question.html.haml +1 -0
- data/generators/surveyor/templates/assets/stylesheets/reset.css +4 -0
- data/generators/surveyor/templates/assets/stylesheets/sass/surveyor.sass +6 -4
- data/generators/surveyor/templates/assets/stylesheets/surveyor.css +6 -3
- data/surveyor.gemspec +4 -5
- metadata +2 -2
data/README.md
CHANGED
@@ -6,17 +6,15 @@ Surveyor is a rails (gem) plugin, that brings surveys to your rails app. Before
|
|
6
6
|
|
7
7
|
As a plugin:
|
8
8
|
|
9
|
-
|
10
|
-
script/plugin install git://github.com/breakpointer/surveyor.git -r 'tag v0.9.
|
9
|
+
gem install haml
|
10
|
+
script/plugin install git://github.com/breakpointer/surveyor.git -r 'tag v0.9.10'
|
11
11
|
|
12
12
|
Or as a gem plugin:
|
13
13
|
|
14
|
-
|
15
|
-
|
14
|
+
# in environment.rb
|
15
|
+
config.gem "surveyor", :version => '>=0.9.10', :source => 'http://gemcutter.org'
|
16
16
|
|
17
|
-
|
18
|
-
gem tumble
|
19
|
-
sudo rake gems:install
|
17
|
+
rake gems:install
|
20
18
|
|
21
19
|
Generate assets, run migrations:
|
22
20
|
|
@@ -87,7 +85,7 @@ SurveyorController class_eval, class methods, instance methods, and actions can
|
|
87
85
|
<head>
|
88
86
|
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
|
89
87
|
<title>Survey: <%= controller.action_name %></title>
|
90
|
-
<%= surveyor_includes
|
88
|
+
<%= surveyor_includes %>
|
91
89
|
</head>
|
92
90
|
<body>
|
93
91
|
<div id="flash"><%= flash[:notice] %></div>
|
@@ -109,6 +107,15 @@ Surveyor depends on Rails 2.3 and the SASS style sheet language, part of HAML (h
|
|
109
107
|
|
110
108
|
# Changes
|
111
109
|
|
110
|
+
0.9.10
|
111
|
+
|
112
|
+
* styles, adding labels for dates, correcting labels for radio buttons
|
113
|
+
|
114
|
+
0.9.9
|
115
|
+
|
116
|
+
* count label and image questions complete when mandatory. closes #38
|
117
|
+
* validate by other responses. closes #35
|
118
|
+
|
112
119
|
0.9.8
|
113
120
|
|
114
121
|
* @current\_user.id if @current\_user isn't nil. Closes #37
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.10
|
@@ -19,13 +19,17 @@
|
|
19
19
|
- when :one_answer, :one_string
|
20
20
|
- fields_for_radio(response_obj) do |radio_form|
|
21
21
|
= radio_form.radio_button(:answer_id, answer.id, :checked => response_obj.selected?, :title => answer.text)
|
22
|
-
= radio_form.label("
|
22
|
+
= radio_form.label("answer_id_#{answer.id}", answer.text, :class => (hide_label ? "hidden" : ""))
|
23
23
|
- if renderer == :one_string
|
24
24
|
= response_form.text_field(:string_value, :size => 25, :maxlength => 250, :autocomplete => "off")
|
25
25
|
- when :none_date
|
26
|
-
= response_form.
|
26
|
+
= response_form.label(:string_value, split_text(answer.text)[:prefix], :class => "#{(disabled)? 'disabled' : 'enabled'}") unless hide_label
|
27
|
+
= response_form.text_field(:datetime_value)
|
28
|
+
= response_form.label(:string_value, split_text(answer.text)[:postfix], :class => "#{(disabled)? 'disabled' : 'enabled'}") unless hide_label
|
27
29
|
- when :none_datetime
|
30
|
+
= response_form.label(:string_value, split_text(answer.text)[:prefix], :class => "#{(disabled)? 'disabled' : 'enabled'}") unless hide_label
|
28
31
|
= response_form.datetime_select(:datetime_value, {:include_blank => true})
|
32
|
+
= response_form.label(:string_value, split_text(answer.text)[:postfix], :class => "#{(disabled)? 'disabled' : 'enabled'}") unless hide_label
|
29
33
|
- when :none_float
|
30
34
|
= response_form.label(:float_value, split_text(answer.text)[:prefix]) unless hide_label
|
31
35
|
= response_form.text_field(:float_value, :size => 5, :maxlength => 10, :autocomplete => "off")
|
@@ -43,7 +47,9 @@
|
|
43
47
|
= response_form.text_area(:text_value, :cols => 80, :rows => 10)
|
44
48
|
= response_form.label(:text_value, split_text(answer.text)[:postfix]) unless hide_label
|
45
49
|
- when :none_time
|
50
|
+
= response_form.label(:string_value, split_text(answer.text)[:prefix], :class => "#{(disabled)? 'disabled' : 'enabled'}") unless hide_label
|
46
51
|
= response_form.time_select(:datetime_value,{ :include_blank => true })
|
52
|
+
= response_form.label(:string_value, split_text(answer.text)[:postfix], :class => "#{(disabled)? 'disabled' : 'enabled'}") unless hide_label
|
47
53
|
- else
|
48
54
|
= answer.text
|
49
55
|
|
@@ -39,6 +39,7 @@
|
|
39
39
|
%span.help= question.help_text
|
40
40
|
= hidden_field_tag("response_groups[#{question.id}][#{response_group}][response_group]", response_group)
|
41
41
|
= hidden_field_tag("response_groups[#{question.id}][#{response_group}][question_id]", question.id)
|
42
|
+
%br
|
42
43
|
%ol.answers
|
43
44
|
- if renderer == :repeater_default
|
44
45
|
- question.answers.each do |answer|
|
@@ -185,7 +185,7 @@ body
|
|
185
185
|
.head
|
186
186
|
:padding-bottom 0.5em
|
187
187
|
.number
|
188
|
-
:padding 0.2em
|
188
|
+
:padding 0.2em
|
189
189
|
:font-weight bold
|
190
190
|
:font-size 1.2em
|
191
191
|
:letter-spacing 0
|
@@ -212,6 +212,9 @@ body
|
|
212
212
|
:list-style-type none
|
213
213
|
li.repeater
|
214
214
|
:display block
|
215
|
+
:clear left
|
216
|
+
.question
|
217
|
+
:float left
|
215
218
|
ol
|
216
219
|
:margin 0
|
217
220
|
:padding 0
|
@@ -225,8 +228,7 @@ body
|
|
225
228
|
:margin 0.5em 0.2em 0.5em 1em
|
226
229
|
.question
|
227
230
|
:margin 0
|
228
|
-
:padding 0em 0.3em
|
229
|
-
|
231
|
+
:padding 0em 0.3em
|
230
232
|
.text
|
231
233
|
:font-size 0.9em
|
232
234
|
.help
|
@@ -234,7 +236,7 @@ body
|
|
234
236
|
:font-style italic
|
235
237
|
:color= !page_text_color - !emphasis_shift
|
236
238
|
.number
|
237
|
-
:padding 0.2em
|
239
|
+
:padding 0.2em
|
238
240
|
:margin 0 0 0.3em 0
|
239
241
|
:font-weight bold
|
240
242
|
:font-size 1em
|
@@ -174,7 +174,7 @@ body {
|
|
174
174
|
#surveyor .question_group .head {
|
175
175
|
padding-bottom: 0.5em; }
|
176
176
|
#surveyor .question_group .head .number {
|
177
|
-
padding: 0.2em
|
177
|
+
padding: 0.2em;
|
178
178
|
font-weight: bold;
|
179
179
|
font-size: 1.2em;
|
180
180
|
letter-spacing: 0;
|
@@ -200,7 +200,10 @@ body {
|
|
200
200
|
#surveyor .question_group ul.repeater {
|
201
201
|
list-style-type: none; }
|
202
202
|
#surveyor .question_group li.repeater {
|
203
|
-
display: block;
|
203
|
+
display: block;
|
204
|
+
clear: both; }
|
205
|
+
#surveyor .question_group li.repeater .question {
|
206
|
+
float: left; }
|
204
207
|
#surveyor .question_group li.repeater ol {
|
205
208
|
margin: 0;
|
206
209
|
padding: 0; }
|
@@ -220,7 +223,7 @@ body {
|
|
220
223
|
font-style: italic;
|
221
224
|
color: black; }
|
222
225
|
#surveyor .group_questions .number {
|
223
|
-
padding: 0.2em
|
226
|
+
padding: 0.2em;
|
224
227
|
margin: 0 0 0.3em 0;
|
225
228
|
font-weight: bold;
|
226
229
|
font-size: 1em;
|
data/surveyor.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{surveyor}
|
8
|
-
s.version = "0.9.
|
8
|
+
s.version = "0.9.10"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Brian Chamberlain", "Mark Yoon"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2010-01-20}
|
13
13
|
s.email = %q{yoon@northwestern.edu}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"README.md"
|
@@ -209,4 +209,3 @@ Gem::Specification.new do |s|
|
|
209
209
|
s.add_dependency(%q<haml>, [">= 0"])
|
210
210
|
end
|
211
211
|
end
|
212
|
-
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: surveyor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Chamberlain
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date:
|
13
|
+
date: 2010-01-20 00:00:00 -06:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|