fustrate-rails 0.4.1 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +5 -5
  2. data/config/initializers/jbuilder.rb +13 -0
  3. data/config/initializers/renderers.rb +40 -0
  4. data/config/initializers/sanitize.rb +112 -0
  5. data/config/rubocop/default.yml +96 -0
  6. data/config/rubocop/rails.yml +22 -0
  7. data/lib/fustrate/rails/concerns/clean_attributes.rb +49 -0
  8. data/lib/fustrate/rails/concerns/model.rb +48 -0
  9. data/lib/fustrate/rails/concerns/sanitize_html.rb +34 -0
  10. data/lib/fustrate/rails/engine.rb +14 -7
  11. data/lib/fustrate/rails/services/base.rb +46 -0
  12. data/lib/fustrate/rails/services/generate_csv.rb +35 -0
  13. data/lib/fustrate/rails/services/generate_excel.rb +32 -0
  14. data/lib/fustrate/rails/services/log_edit.rb +132 -0
  15. data/lib/fustrate/rails/spec_helper.rb +62 -0
  16. data/lib/fustrate/rails/version.rb +5 -1
  17. data/lib/fustrate-rails.rb +5 -2
  18. metadata +44 -140
  19. data/vendor/assets/javascripts/awesomplete.js +0 -402
  20. data/vendor/assets/javascripts/fustrate/_module.coffee +0 -140
  21. data/vendor/assets/javascripts/fustrate/components/_module.coffee +0 -3
  22. data/vendor/assets/javascripts/fustrate/components/alert_box.coffee +0 -10
  23. data/vendor/assets/javascripts/fustrate/components/autocomplete.coffee +0 -161
  24. data/vendor/assets/javascripts/fustrate/components/disclosure.coffee +0 -12
  25. data/vendor/assets/javascripts/fustrate/components/drop_zone.coffee +0 -9
  26. data/vendor/assets/javascripts/fustrate/components/dropdown.coffee +0 -48
  27. data/vendor/assets/javascripts/fustrate/components/file_picker.coffee +0 -11
  28. data/vendor/assets/javascripts/fustrate/components/flash.coffee +0 -31
  29. data/vendor/assets/javascripts/fustrate/components/modal.coffee +0 -273
  30. data/vendor/assets/javascripts/fustrate/components/pagination.coffee +0 -84
  31. data/vendor/assets/javascripts/fustrate/components/tabs.coffee +0 -28
  32. data/vendor/assets/javascripts/fustrate/components/tooltip.coffee +0 -72
  33. data/vendor/assets/javascripts/fustrate/generic_form.coffee +0 -30
  34. data/vendor/assets/javascripts/fustrate/generic_page.coffee +0 -40
  35. data/vendor/assets/javascripts/fustrate/generic_table.coffee +0 -57
  36. data/vendor/assets/javascripts/fustrate/listenable.coffee +0 -25
  37. data/vendor/assets/javascripts/fustrate/object.coffee +0 -21
  38. data/vendor/assets/javascripts/fustrate/record.coffee +0 -23
  39. data/vendor/assets/javascripts/fustrate.coffee +0 -6
  40. data/vendor/assets/stylesheets/_fustrate.sass +0 -7
  41. data/vendor/assets/stylesheets/awesomplete.sass +0 -76
  42. data/vendor/assets/stylesheets/fustrate/_colors.sass +0 -12
  43. data/vendor/assets/stylesheets/fustrate/_settings.sass +0 -20
  44. data/vendor/assets/stylesheets/fustrate/components/_components.sass +0 -36
  45. data/vendor/assets/stylesheets/fustrate/components/_functions.sass +0 -41
  46. data/vendor/assets/stylesheets/fustrate/components/alerts.sass +0 -86
  47. data/vendor/assets/stylesheets/fustrate/components/buttons.sass +0 -99
  48. data/vendor/assets/stylesheets/fustrate/components/disclosures.sass +0 -23
  49. data/vendor/assets/stylesheets/fustrate/components/dropdowns.sass +0 -36
  50. data/vendor/assets/stylesheets/fustrate/components/flash.sass +0 -38
  51. data/vendor/assets/stylesheets/fustrate/components/forms.sass +0 -195
  52. data/vendor/assets/stylesheets/fustrate/components/grid.sass +0 -196
  53. data/vendor/assets/stylesheets/fustrate/components/labels.sass +0 -64
  54. data/vendor/assets/stylesheets/fustrate/components/modals.sass +0 -167
  55. data/vendor/assets/stylesheets/fustrate/components/pagination.sass +0 -69
  56. data/vendor/assets/stylesheets/fustrate/components/panels.sass +0 -67
  57. data/vendor/assets/stylesheets/fustrate/components/popovers.sass +0 -19
  58. data/vendor/assets/stylesheets/fustrate/components/tables.sass +0 -62
  59. data/vendor/assets/stylesheets/fustrate/components/tabs.sass +0 -44
  60. data/vendor/assets/stylesheets/fustrate/components/tooltips.sass +0 -28
  61. data/vendor/assets/stylesheets/fustrate/components/typography.sass +0 -391
@@ -1,67 +0,0 @@
1
- $panel-bg: #f2f2f2 !default
2
-
3
- $panel-margin-bottom: rem-calc(20) !default
4
- $panel-padding: rem-calc(16 20) !default
5
-
6
- $panel-font-color: #333 !default
7
- $panel-font-color-alt: #fff !default
8
-
9
- =panel-color($bg: $panel-bg)
10
- background: $bg
11
- border: 1px solid darken($bg, 11%)
12
-
13
- // We set the font color based on the darkness of the bg.
14
- h1,
15
- h2,
16
- h3,
17
- h4,
18
- h5,
19
- h6,
20
- p,
21
- li,
22
- dl
23
- color: if(lightness($bg) >= 50%, $panel-font-color, $panel-font-color-alt)
24
-
25
- =fustrate-panels
26
- .panel
27
- +panel-color
28
- font-size: rem-calc(14)
29
- margin-bottom: $panel-margin-bottom
30
- padding: $panel-padding
31
-
32
- // reset header line-heights for panels
33
- h1,
34
- h2,
35
- h3,
36
- h4,
37
- h5,
38
- h6
39
- line-height: 1
40
- margin-bottom: rem-calc(20) / 2
41
-
42
- ul,
43
- ol,
44
- dl
45
- font-size: inherit
46
-
47
- // Respect the padding, fool.
48
- & > :first-child
49
- margin-top: 0
50
-
51
- & > :last-child
52
- margin-bottom: 0
53
-
54
- &.radius
55
- border-radius: 3px
56
-
57
- &.info
58
- +panel-color(lighten($info-color, 5%))
59
-
60
- &.success
61
- +panel-color(lighten($success-color, 20%))
62
-
63
- &.danger
64
- +panel-color(scale-color($danger-color, $lightness: 70%, $saturation: -20%))
65
-
66
- &.small
67
- padding: $panel-padding / 2
@@ -1,19 +0,0 @@
1
- $popover-bg-color: #f2f2f2 !default
2
- $popover-border-color: #e0e0e0 !default
3
-
4
- =fustrate-popovers
5
- .popover
6
- background: $popover-bg-color
7
- border: 1px solid $popover-border-color
8
- box-shadow: 0 0 12px scale-color($grey, $lightness: 80%)
9
- display: inline-block
10
- opacity: .9
11
- padding: rem-calc(12 16)
12
- position: absolute
13
- z-index: 9001
14
-
15
- & > :first-child
16
- margin-top: 0
17
-
18
- & > :last-child
19
- margin-bottom: 0
@@ -1,62 +0,0 @@
1
- $table-border-color: #ccc !default
2
- $table-padding: .5em !default
3
-
4
- =fustrate-tables
5
- table
6
- border-collapse: collapse
7
- margin: $table-padding 0
8
- width: 100%
9
-
10
- &.info
11
- td
12
- border-left: 1px solid darken($table-border-color, 25%)
13
-
14
- &:first-child
15
- border-left: 0
16
-
17
- th
18
- border-bottom: 1px solid darken($table-border-color, 25%)
19
- font-weight: bold
20
- padding: $table-padding
21
- text-align: left
22
-
23
- td
24
- border-top: 1px solid $table-border-color
25
- padding: $table-padding
26
-
27
- .thumbnail
28
- max-width: initial
29
-
30
- tr,
31
- td,
32
- th
33
- vertical-align: middle
34
-
35
- table table
36
- margin: 0
37
-
38
- td
39
- border-top: 0
40
- padding: $table-padding * .5
41
-
42
- .responsive-table
43
- overflow: visible
44
-
45
- tr.no-records
46
- display: none
47
- text-align: center
48
-
49
- tr.loading td
50
- text-align: center
51
-
52
- &::before
53
- +font-awesome('\f110', $spin: true)
54
-
55
- @media #{$small-only}
56
- .responsive-table
57
- table
58
- margin: 0 0 $table-padding
59
-
60
- th,
61
- td
62
- padding: $table-padding * .5
@@ -1,44 +0,0 @@
1
- @import 'buttons'
2
- @import 'panels'
3
-
4
- $tabs-padding: rem-calc(10) !default
5
- $tabs-font-size: rem-calc(12) !default
6
- $tabs-content-padding: 0 rem-calc(10) !default
7
- $tabs-active-color: $primary-color !default
8
-
9
- =fustrate-tabs
10
- ul.tabs
11
- margin-bottom: 0
12
-
13
- > li
14
- display: inline
15
-
16
- a
17
- +button-base
18
- +button-size($tabs-padding)
19
- +button-style(white)
20
-
21
- &.active
22
- +button-style($tabs-active-color, $hover: false)
23
-
24
- .tabs-content
25
- .content
26
- display: none
27
- overflow: hidden
28
- padding: $tabs-content-padding
29
-
30
- &.active
31
- display: block
32
-
33
- &.panel
34
- padding: $panel-padding
35
-
36
- &.panel
37
- padding: $tabs-content-padding
38
-
39
- .content
40
- padding: 0
41
-
42
- @media #{$small-only}
43
- ul.tabs > li a
44
- +button-size($tabs-padding * .6)
@@ -1,28 +0,0 @@
1
- $tooltip-bg-color: #222 !default
2
- $tooltip-color: #eee !default
3
- $tooltip-opacity: .9 !default
4
-
5
- =fustrate-tooltips
6
- [data-tooltip]
7
- cursor: help
8
-
9
- .tooltip
10
- background: $tooltip-bg-color
11
- color: $tooltip-color
12
- font-size: .8rem
13
- line-height: 1.2
14
- max-width: 200px
15
- opacity: $tooltip-opacity
16
- padding: 5px 7px
17
- position: absolute
18
-
19
- &::before
20
- border: 4px solid transparent
21
- border-bottom-color: $tooltip-bg-color
22
- bottom: 100%
23
- content: ' '
24
- display: block
25
- height: 0
26
- left: 8px
27
- position: absolute
28
- width: 0
@@ -1,391 +0,0 @@
1
- $body-bg-color: #fafafa !default
2
- $font-color: #222 !default
3
-
4
- $h1-font-size: rem-calc(34) !default
5
- $h2-font-size: rem-calc(30) !default
6
- $h3-font-size: rem-calc(26) !default
7
- $h4-font-size: rem-calc(22) !default
8
- $h5-font-size: rem-calc(18) !default
9
- $h6-font-size: 1rem !default
10
-
11
- $h1-font-reduction: rem-calc(10) !default
12
- $h2-font-reduction: rem-calc(10) !default
13
- $h3-font-reduction: rem-calc(5) !default
14
- $h4-font-reduction: rem-calc(5) !default
15
-
16
- $print-color: #000 !default
17
- $print-border-color: #999 !default
18
-
19
- =fustrate-typography
20
- html,
21
- body
22
- font-size: 1em
23
- height: 100%
24
-
25
- *
26
- &,
27
- &::before,
28
- &::after
29
- box-sizing: border-box
30
-
31
- body
32
- background: $body-bg-color
33
- color: $font-color
34
- cursor: default
35
- font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif
36
- font-style: normal
37
- font-weight: normal
38
- line-height: $base-line-height
39
- margin: 0
40
- padding: 0
41
- position: relative
42
-
43
- img
44
- -ms-interpolation-mode: bicubic
45
- display: inline-block
46
- height: auto
47
- max-width: 100%
48
- vertical-align: middle
49
-
50
- blockquote,
51
- dd,
52
- div,
53
- dl,
54
- dt,
55
- form,
56
- h1,
57
- h2,
58
- h3,
59
- h4,
60
- h5,
61
- h6,
62
- li,
63
- ol,
64
- p,
65
- pre,
66
- td,
67
- th,
68
- ul
69
- margin: 0
70
- padding: 0
71
-
72
- a
73
- color: $primary-color
74
- line-height: inherit
75
- text-decoration: none
76
-
77
- &:hover,
78
- &:active
79
- color: scale-color($primary-color, $lightness: -14%)
80
-
81
- &:hover
82
- cursor: pointer
83
-
84
- img
85
- border: 0
86
-
87
- p
88
- font-family: inherit
89
- font-size: 1rem
90
- font-weight: normal
91
- line-height: 1.6
92
- margin-bottom: rem-calc(20)
93
- text-rendering: optimizeLegibility
94
-
95
- &.lead
96
- font-size: 1rem + rem-calc(3.5)
97
- line-height: 1.6
98
-
99
- h1,
100
- h2,
101
- h3,
102
- h4,
103
- h5,
104
- h6
105
- color: $font-color
106
- font-family: inherit
107
- font-style: normal
108
- font-weight: normal
109
- line-height: 1.4
110
- margin-bottom: .5rem
111
- margin-top: .2rem
112
- padding: 0 rem-calc(20)
113
- text-rendering: optimizeLegibility
114
-
115
- small
116
- color: scale-color($font-color, $lightness: 35%)
117
- font-size: 60%
118
- line-height: 0
119
-
120
- h1
121
- font-size: $h1-font-size - $h1-font-reduction
122
-
123
- h2
124
- font-size: $h2-font-size - $h2-font-reduction
125
-
126
- h3
127
- font-size: $h3-font-size - $h3-font-reduction
128
-
129
- h4
130
- font-size: $h4-font-size - $h4-font-reduction
131
-
132
- h5
133
- font-size: $h5-font-size
134
-
135
- h6
136
- font-size: $h6-font-size
137
-
138
- .subheader
139
- color: scale-color($font-color, $lightness: 35%)
140
- font-weight: normal
141
- line-height: 1.4
142
- margin-bottom: .5rem
143
- margin-top: .2rem
144
-
145
- hr
146
- border: solid scale-color($font-color, $lightness: 75%)
147
- border-width: 1px 0 0
148
- clear: both
149
- height: 0
150
- margin: rem-calc(20) 0 (rem-calc(20) - rem-calc(1px))
151
-
152
- em,
153
- i
154
- font-style: italic
155
- line-height: inherit
156
-
157
- strong,
158
- b
159
- font-weight: bold
160
- line-height: inherit
161
-
162
- small
163
- font-size: 80%
164
- line-height: inherit
165
-
166
- ul,
167
- ol,
168
- dl
169
- font-family: inherit
170
- font-size: 1rem
171
- line-height: 1.6
172
- list-style-position: outside
173
- margin-bottom: rem-calc(20)
174
-
175
- ul
176
- list-style-type: none
177
- margin-left: 0
178
- padding-left: 0
179
-
180
- &.no-bullet
181
- list-style: none
182
- margin-left: 0
183
-
184
- ul,
185
- ol
186
- list-style: none
187
- margin-bottom: 0
188
- margin-left: rem-calc(20)
189
-
190
- ul,
191
- ol
192
- margin-bottom: 0
193
- margin-left: rem-calc(20)
194
-
195
- &.square,
196
- &.circle,
197
- &.disc
198
- margin-left: 1.1rem
199
-
200
- ul
201
- list-style: inherit
202
-
203
- &.square
204
- list-style-type: square
205
-
206
- &.circle
207
- list-style-type: circle
208
-
209
- &.disc
210
- list-style-type: disc
211
-
212
- ol
213
- margin-left: 1.4rem
214
-
215
- li
216
- ul,
217
- ol
218
- margin-bottom: 0
219
- margin-left: rem-calc(20)
220
-
221
- dl
222
- dt
223
- font-weight: bold
224
- margin-bottom: .3rem
225
- padding-left: 0
226
-
227
- dd
228
- margin-bottom: rem-calc(12)
229
- padding-left: 10px
230
-
231
- :last-child
232
- margin-bottom: 0
233
-
234
- address
235
- font-style: normal
236
- white-space: pre-line
237
-
238
- abbr,
239
- acronym
240
- border-bottom: 1px dotted scale-color($font-color, $lightness: 85%)
241
- color: $font-color
242
- cursor: help
243
- font-size: 90%
244
- text-transform: uppercase
245
-
246
- abbr
247
- text-transform: none
248
-
249
- blockquote
250
- border-left: 1px solid scale-color($font-color, $lightness: 85%)
251
- margin: 0 0 rem-calc(20)
252
- padding: rem-calc(9 20 9 19)
253
-
254
- // Respect the padding, fool.
255
- & > :first-child
256
- margin-top: 0
257
-
258
- & > :last-child
259
- margin-bottom: 0
260
-
261
- &,
262
- & p
263
- color: scale-color($font-color, $lightness: 35%)
264
- line-height: 1.6
265
-
266
- iframe
267
- margin-bottom: rem-calc(20)
268
-
269
- .text-left
270
- text-align: left !important
271
-
272
- .text-right
273
- text-align: right !important
274
-
275
- .text-center
276
- text-align: center !important
277
-
278
- .text-justify
279
- text-align: justify !important
280
-
281
- #map_canvas,
282
- .map_canvas
283
- img,
284
- embed,
285
- object
286
- max-width: none !important
287
-
288
- .left
289
- float: left !important
290
-
291
- .right
292
- float: right !important
293
-
294
- .clearfix
295
- +clearfix
296
-
297
- .hide
298
- display: none !important
299
-
300
- .antialiased
301
- -moz-osx-font-smoothing: grayscale
302
- -webkit-font-smoothing: antialiased
303
-
304
- .print-only
305
- display: none !important
306
-
307
- .large
308
- font-size: 1.2rem
309
- vertical-align: middle
310
-
311
- .help
312
- font-size: .8rem
313
- margin: 0
314
- opacity: .7
315
-
316
- .dim
317
- opacity: .6
318
-
319
- .preserve
320
- white-space: pre-wrap
321
-
322
- .nowrap
323
- white-space: nowrap
324
-
325
- @media #{$medium-up}
326
- h1,
327
- h2,
328
- h3,
329
- h4,
330
- h5,
331
- h6
332
- line-height: 1.4
333
-
334
- h1
335
- font-size: $h1-font-size
336
-
337
- h2
338
- font-size: $h2-font-size
339
-
340
- h3
341
- font-size: $h3-font-size
342
-
343
- h4
344
- font-size: $h4-font-size
345
-
346
- h5
347
- font-size: $h5-font-size
348
-
349
- h6
350
- font-size: $h6-font-size
351
-
352
- @media print
353
- *
354
- background: transparent !important
355
- box-shadow: none !important
356
- color: $print-color !important
357
- text-shadow: none !important
358
-
359
- blockquote,
360
- pre
361
- border: 1px solid $print-border-color
362
- page-break-inside: avoid
363
-
364
- thead
365
- display: table-header-group
366
-
367
- tr,
368
- img
369
- page-break-inside: avoid
370
-
371
- img
372
- max-width: 100% !important
373
-
374
- p,
375
- h2,
376
- h3
377
- orphans: 3
378
- widows: 3
379
-
380
- h2,
381
- h3
382
- page-break-after: avoid
383
-
384
- .print-only
385
- display: inherit !important
386
-
387
- .no-print
388
- display: none !important
389
-
390
- @page
391
- margin: .5cm