sunrise-votes 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. data/README.rdoc +2 -4
  2. data/Rakefile +0 -22
  3. data/app/controllers/manage/ballot_box/votes_controller.rb +4 -0
  4. data/app/views/manage/ballot_box/votes/show.html.erb +211 -81
  5. data/lib/generators/sunrise/votes/install_generator.rb +1 -1
  6. data/lib/generators/sunrise/votes/templates/javascripts/highcharts/highcharts.js +170 -0
  7. data/lib/generators/sunrise/votes/templates/javascripts/highcharts/highcharts.src.js +11428 -0
  8. data/lib/generators/sunrise/votes/templates/javascripts/highcharts/modules/exporting.js +22 -0
  9. data/lib/generators/sunrise/votes/templates/javascripts/highcharts/modules/exporting.src.js +711 -0
  10. data/lib/generators/sunrise/votes/templates/javascripts/highcharts/themes/dark-blue.js +263 -0
  11. data/lib/generators/sunrise/votes/templates/javascripts/highcharts/themes/dark-green.js +263 -0
  12. data/lib/generators/sunrise/votes/templates/javascripts/highcharts/themes/gray.js +262 -0
  13. data/lib/generators/sunrise/votes/templates/javascripts/highcharts/themes/grid.js +96 -0
  14. data/lib/generators/sunrise/votes/templates/javascripts/highcharts/themes/skies.js +89 -0
  15. data/lib/sunrise/votes/version.rb +1 -1
  16. metadata +33 -79
  17. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/excanvas.min.js +0 -35
  18. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/jquery.jqplot.css +0 -226
  19. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/jquery.jqplot.min.js +0 -30
  20. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.BezierCurveRenderer.js +0 -312
  21. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.BezierCurveRenderer.min.js +0 -30
  22. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.barRenderer.js +0 -702
  23. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.barRenderer.min.js +0 -30
  24. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.blockRenderer.js +0 -234
  25. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.blockRenderer.min.js +0 -30
  26. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.bubbleRenderer.js +0 -748
  27. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.bubbleRenderer.min.js +0 -30
  28. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.canvasAxisLabelRenderer.js +0 -199
  29. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.canvasAxisLabelRenderer.min.js +0 -30
  30. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.canvasAxisTickRenderer.js +0 -238
  31. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.canvasAxisTickRenderer.min.js +0 -30
  32. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.canvasOverlay.js +0 -614
  33. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.canvasOverlay.min.js +0 -30
  34. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.canvasTextRenderer.js +0 -420
  35. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.canvasTextRenderer.min.js +0 -30
  36. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.categoryAxisRenderer.js +0 -634
  37. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.categoryAxisRenderer.min.js +0 -30
  38. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.ciParser.js +0 -115
  39. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.ciParser.min.js +0 -30
  40. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.cursor.js +0 -1002
  41. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.cursor.min.js +0 -30
  42. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.dateAxisRenderer.js +0 -439
  43. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.dateAxisRenderer.min.js +0 -30
  44. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.donutRenderer.js +0 -904
  45. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.donutRenderer.min.js +0 -30
  46. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.dragable.js +0 -218
  47. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.dragable.min.js +0 -30
  48. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.enhancedLegendRenderer.js +0 -199
  49. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.enhancedLegendRenderer.min.js +0 -30
  50. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.funnelRenderer.js +0 -932
  51. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.funnelRenderer.min.js +0 -30
  52. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.highlighter.js +0 -406
  53. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.highlighter.min.js +0 -30
  54. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.json2.js +0 -475
  55. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.json2.min.js +0 -30
  56. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.logAxisRenderer.js +0 -446
  57. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.logAxisRenderer.min.js +0 -30
  58. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.mekkoAxisRenderer.js +0 -607
  59. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.mekkoAxisRenderer.min.js +0 -30
  60. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.mekkoRenderer.js +0 -432
  61. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.mekkoRenderer.min.js +0 -30
  62. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.meterGaugeRenderer.js +0 -1142
  63. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.meterGaugeRenderer.min.js +0 -30
  64. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.ohlcRenderer.js +0 -372
  65. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.ohlcRenderer.min.js +0 -30
  66. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.pieRenderer.js +0 -797
  67. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.pieRenderer.min.js +0 -30
  68. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.pointLabels.js +0 -337
  69. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.pointLabels.min.js +0 -30
  70. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.trendline.js +0 -220
  71. data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.trendline.min.js +0 -30
@@ -0,0 +1,262 @@
1
+ /**
2
+ * Gray theme for Highcharts JS
3
+ * @author Torstein Hønsi
4
+ */
5
+
6
+ Highcharts.theme = {
7
+ colors: ["#DDDF0D", "#7798BF", "#55BF3B", "#DF5353", "#aaeeee", "#ff0066", "#eeaaee",
8
+ "#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
9
+ chart: {
10
+ backgroundColor: {
11
+ linearGradient: [0, 0, 0, 400],
12
+ stops: [
13
+ [0, 'rgb(96, 96, 96)'],
14
+ [1, 'rgb(16, 16, 16)']
15
+ ]
16
+ },
17
+ borderWidth: 0,
18
+ borderRadius: 15,
19
+ plotBackgroundColor: null,
20
+ plotShadow: false,
21
+ plotBorderWidth: 0
22
+ },
23
+ title: {
24
+ style: {
25
+ color: '#FFF',
26
+ font: '16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
27
+ }
28
+ },
29
+ subtitle: {
30
+ style: {
31
+ color: '#DDD',
32
+ font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
33
+ }
34
+ },
35
+ xAxis: {
36
+ gridLineWidth: 0,
37
+ lineColor: '#999',
38
+ tickColor: '#999',
39
+ labels: {
40
+ style: {
41
+ color: '#999',
42
+ fontWeight: 'bold'
43
+ }
44
+ },
45
+ title: {
46
+ style: {
47
+ color: '#AAA',
48
+ font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
49
+ }
50
+ }
51
+ },
52
+ yAxis: {
53
+ alternateGridColor: null,
54
+ minorTickInterval: null,
55
+ gridLineColor: 'rgba(255, 255, 255, .1)',
56
+ lineWidth: 0,
57
+ tickWidth: 0,
58
+ labels: {
59
+ style: {
60
+ color: '#999',
61
+ fontWeight: 'bold'
62
+ }
63
+ },
64
+ title: {
65
+ style: {
66
+ color: '#AAA',
67
+ font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
68
+ }
69
+ }
70
+ },
71
+ legend: {
72
+ itemStyle: {
73
+ color: '#CCC'
74
+ },
75
+ itemHoverStyle: {
76
+ color: '#FFF'
77
+ },
78
+ itemHiddenStyle: {
79
+ color: '#333'
80
+ }
81
+ },
82
+ labels: {
83
+ style: {
84
+ color: '#CCC'
85
+ }
86
+ },
87
+ tooltip: {
88
+ backgroundColor: {
89
+ linearGradient: [0, 0, 0, 50],
90
+ stops: [
91
+ [0, 'rgba(96, 96, 96, .8)'],
92
+ [1, 'rgba(16, 16, 16, .8)']
93
+ ]
94
+ },
95
+ borderWidth: 0,
96
+ style: {
97
+ color: '#FFF'
98
+ }
99
+ },
100
+
101
+
102
+ plotOptions: {
103
+ line: {
104
+ dataLabels: {
105
+ color: '#CCC'
106
+ },
107
+ marker: {
108
+ lineColor: '#333'
109
+ }
110
+ },
111
+ spline: {
112
+ marker: {
113
+ lineColor: '#333'
114
+ }
115
+ },
116
+ scatter: {
117
+ marker: {
118
+ lineColor: '#333'
119
+ }
120
+ },
121
+ candlestick: {
122
+ lineColor: 'white'
123
+ }
124
+ },
125
+
126
+ toolbar: {
127
+ itemStyle: {
128
+ color: '#CCC'
129
+ }
130
+ },
131
+
132
+ navigation: {
133
+ buttonOptions: {
134
+ backgroundColor: {
135
+ linearGradient: [0, 0, 0, 20],
136
+ stops: [
137
+ [0.4, '#606060'],
138
+ [0.6, '#333333']
139
+ ]
140
+ },
141
+ borderColor: '#000000',
142
+ symbolStroke: '#C0C0C0',
143
+ hoverSymbolStroke: '#FFFFFF'
144
+ }
145
+ },
146
+
147
+ exporting: {
148
+ buttons: {
149
+ exportButton: {
150
+ symbolFill: '#55BE3B'
151
+ },
152
+ printButton: {
153
+ symbolFill: '#7797BE'
154
+ }
155
+ }
156
+ },
157
+
158
+ // scroll charts
159
+ rangeSelector: {
160
+ buttonTheme: {
161
+ fill: {
162
+ linearGradient: [0, 0, 0, 20],
163
+ stops: [
164
+ [0.4, '#888'],
165
+ [0.6, '#555']
166
+ ]
167
+ },
168
+ stroke: '#000000',
169
+ style: {
170
+ color: '#CCC',
171
+ fontWeight: 'bold'
172
+ },
173
+ states: {
174
+ hover: {
175
+ fill: {
176
+ linearGradient: [0, 0, 0, 20],
177
+ stops: [
178
+ [0.4, '#BBB'],
179
+ [0.6, '#888']
180
+ ]
181
+ },
182
+ stroke: '#000000',
183
+ style: {
184
+ color: 'white'
185
+ }
186
+ },
187
+ select: {
188
+ fill: {
189
+ linearGradient: [0, 0, 0, 20],
190
+ stops: [
191
+ [0.1, '#000'],
192
+ [0.3, '#333']
193
+ ]
194
+ },
195
+ stroke: '#000000',
196
+ style: {
197
+ color: 'yellow'
198
+ }
199
+ }
200
+ }
201
+ },
202
+ inputStyle: {
203
+ backgroundColor: '#333',
204
+ color: 'silver'
205
+ },
206
+ labelStyle: {
207
+ color: 'silver'
208
+ }
209
+ },
210
+
211
+ navigator: {
212
+ handles: {
213
+ backgroundColor: '#666',
214
+ borderColor: '#AAA'
215
+ },
216
+ outlineColor: '#CCC',
217
+ maskFill: 'rgba(16, 16, 16, 0.5)',
218
+ series: {
219
+ color: '#7798BF',
220
+ lineColor: '#A6C7ED'
221
+ }
222
+ },
223
+
224
+ scrollbar: {
225
+ barBackgroundColor: {
226
+ linearGradient: [0, 0, 0, 20],
227
+ stops: [
228
+ [0.4, '#888'],
229
+ [0.6, '#555']
230
+ ]
231
+ },
232
+ barBorderColor: '#CCC',
233
+ buttonArrowColor: '#CCC',
234
+ buttonBackgroundColor: {
235
+ linearGradient: [0, 0, 0, 20],
236
+ stops: [
237
+ [0.4, '#888'],
238
+ [0.6, '#555']
239
+ ]
240
+ },
241
+ buttonBorderColor: '#CCC',
242
+ rifleColor: '#FFF',
243
+ trackBackgroundColor: {
244
+ linearGradient: [0, 0, 0, 10],
245
+ stops: [
246
+ [0, '#000'],
247
+ [1, '#333']
248
+ ]
249
+ },
250
+ trackBorderColor: '#666'
251
+ },
252
+
253
+ // special colors for some of the demo examples
254
+ legendBackgroundColor: 'rgba(48, 48, 48, 0.8)',
255
+ legendBackgroundColorSolid: 'rgb(70, 70, 70)',
256
+ dataLabelsColor: '#444',
257
+ textColor: '#E0E0E0',
258
+ maskColor: 'rgba(255,255,255,0.3)'
259
+ };
260
+
261
+ // Apply the theme
262
+ var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Grid theme for Highcharts JS
3
+ * @author Torstein Hønsi
4
+ */
5
+
6
+ Highcharts.theme = {
7
+ colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4'],
8
+ chart: {
9
+ backgroundColor: {
10
+ linearGradient: [0, 0, 500, 500],
11
+ stops: [
12
+ [0, 'rgb(255, 255, 255)'],
13
+ [1, 'rgb(240, 240, 255)']
14
+ ]
15
+ },
16
+ borderWidth: 2,
17
+ plotBackgroundColor: 'rgba(255, 255, 255, .9)',
18
+ plotShadow: true,
19
+ plotBorderWidth: 1
20
+ },
21
+ title: {
22
+ style: {
23
+ color: '#000',
24
+ font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
25
+ }
26
+ },
27
+ subtitle: {
28
+ style: {
29
+ color: '#666666',
30
+ font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
31
+ }
32
+ },
33
+ xAxis: {
34
+ gridLineWidth: 1,
35
+ lineColor: '#000',
36
+ tickColor: '#000',
37
+ labels: {
38
+ style: {
39
+ color: '#000',
40
+ font: '11px Trebuchet MS, Verdana, sans-serif'
41
+ }
42
+ },
43
+ title: {
44
+ style: {
45
+ color: '#333',
46
+ fontWeight: 'bold',
47
+ fontSize: '12px',
48
+ fontFamily: 'Trebuchet MS, Verdana, sans-serif'
49
+
50
+ }
51
+ }
52
+ },
53
+ yAxis: {
54
+ minorTickInterval: 'auto',
55
+ lineColor: '#000',
56
+ lineWidth: 1,
57
+ tickWidth: 1,
58
+ tickColor: '#000',
59
+ labels: {
60
+ style: {
61
+ color: '#000',
62
+ font: '11px Trebuchet MS, Verdana, sans-serif'
63
+ }
64
+ },
65
+ title: {
66
+ style: {
67
+ color: '#333',
68
+ fontWeight: 'bold',
69
+ fontSize: '12px',
70
+ fontFamily: 'Trebuchet MS, Verdana, sans-serif'
71
+ }
72
+ }
73
+ },
74
+ legend: {
75
+ itemStyle: {
76
+ font: '9pt Trebuchet MS, Verdana, sans-serif',
77
+ color: 'black'
78
+
79
+ },
80
+ itemHoverStyle: {
81
+ color: '#039'
82
+ },
83
+ itemHiddenStyle: {
84
+ color: 'gray'
85
+ }
86
+ },
87
+ labels: {
88
+ style: {
89
+ color: '#99b'
90
+ }
91
+ }
92
+ };
93
+
94
+ // Apply the theme
95
+ var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
96
+
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Skies theme for Highcharts JS
3
+ * @author Torstein Hønsi
4
+ */
5
+
6
+ Highcharts.theme = {
7
+ colors: ["#514F78", "#42A07B", "#9B5E4A", "#72727F", "#1F949A", "#82914E", "#86777F", "#42A07B"],
8
+ chart: {
9
+ className: 'skies',
10
+ borderWidth: 0,
11
+ plotShadow: true,
12
+ plotBackgroundImage: '/demo/gfx/skies.jpg',
13
+ plotBackgroundColor: {
14
+ linearGradient: [0, 0, 250, 500],
15
+ stops: [
16
+ [0, 'rgba(255, 255, 255, 1)'],
17
+ [1, 'rgba(255, 255, 255, 0)']
18
+ ]
19
+ },
20
+ plotBorderWidth: 1
21
+ },
22
+ title: {
23
+ style: {
24
+ color: '#3E576F',
25
+ font: '16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
26
+ }
27
+ },
28
+ subtitle: {
29
+ style: {
30
+ color: '#6D869F',
31
+ font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
32
+ }
33
+ },
34
+ xAxis: {
35
+ gridLineWidth: 0,
36
+ lineColor: '#C0D0E0',
37
+ tickColor: '#C0D0E0',
38
+ labels: {
39
+ style: {
40
+ color: '#666',
41
+ fontWeight: 'bold'
42
+ }
43
+ },
44
+ title: {
45
+ style: {
46
+ color: '#666',
47
+ font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
48
+ }
49
+ }
50
+ },
51
+ yAxis: {
52
+ alternateGridColor: 'rgba(255, 255, 255, .5)',
53
+ lineColor: '#C0D0E0',
54
+ tickColor: '#C0D0E0',
55
+ tickWidth: 1,
56
+ labels: {
57
+ style: {
58
+ color: '#666',
59
+ fontWeight: 'bold'
60
+ }
61
+ },
62
+ title: {
63
+ style: {
64
+ color: '#666',
65
+ font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
66
+ }
67
+ }
68
+ },
69
+ legend: {
70
+ itemStyle: {
71
+ font: '9pt Trebuchet MS, Verdana, sans-serif',
72
+ color: '#3E576F'
73
+ },
74
+ itemHoverStyle: {
75
+ color: 'black'
76
+ },
77
+ itemHiddenStyle: {
78
+ color: 'silver'
79
+ }
80
+ },
81
+ labels: {
82
+ style: {
83
+ color: '#3E576F'
84
+ }
85
+ }
86
+ };
87
+
88
+ // Apply the theme
89
+ var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
@@ -1,5 +1,5 @@
1
1
  module Sunrise
2
2
  module Votes
3
- VERSION = "0.1.1".freeze
3
+ VERSION = "0.1.2".freeze
4
4
  end
5
5
  end