chr 0.2.1 → 0.2.4

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.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -1
  3. data/Gruntfile.coffee +50 -16
  4. data/app/assets/javascripts/chr.coffee +9 -16
  5. data/app/assets/javascripts/chr/core/chr.coffee +38 -20
  6. data/app/assets/javascripts/chr/core/item.coffee +30 -24
  7. data/app/assets/javascripts/chr/core/list.coffee +30 -60
  8. data/app/assets/javascripts/chr/core/list_config.coffee +65 -0
  9. data/app/assets/javascripts/chr/core/list_pagination.coffee +27 -0
  10. data/app/assets/javascripts/chr/core/list_reorder.coffee +75 -0
  11. data/app/assets/javascripts/chr/core/list_search.coffee +41 -0
  12. data/app/assets/javascripts/chr/core/module.coffee +55 -32
  13. data/app/assets/javascripts/chr/core/utils.coffee +34 -13
  14. data/app/assets/javascripts/chr/core/view.coffee +70 -97
  15. data/app/assets/javascripts/chr/form/form.coffee +63 -49
  16. data/app/assets/javascripts/chr/form/input-checkbox.coffee +40 -27
  17. data/app/assets/javascripts/chr/form/input-color.coffee +26 -8
  18. data/app/assets/javascripts/chr/form/input-date.coffee +0 -0
  19. data/app/assets/javascripts/chr/form/input-file.coffee +81 -46
  20. data/app/assets/javascripts/chr/form/input-form.coffee +162 -0
  21. data/app/assets/javascripts/chr/form/input-form_reorder.coffee +67 -0
  22. data/app/assets/javascripts/chr/form/input-hidden.coffee +27 -11
  23. data/app/assets/javascripts/chr/form/input-list.coffee +60 -56
  24. data/app/assets/javascripts/chr/form/input-list_reorder.coffee +37 -0
  25. data/app/assets/javascripts/chr/form/input-password.coffee +31 -0
  26. data/app/assets/javascripts/chr/form/input-select.coffee +61 -35
  27. data/app/assets/javascripts/chr/form/input-string.coffee +55 -25
  28. data/app/assets/javascripts/chr/form/input-text.coffee +22 -5
  29. data/app/assets/javascripts/chr/store/mongosteen-array-store.coffee +1 -1
  30. data/app/assets/javascripts/chr/vendor/ace.js +18280 -0
  31. data/app/assets/javascripts/chr/vendor/marked.js +1272 -0
  32. data/app/assets/javascripts/chr/vendor/mode-html.js +2436 -0
  33. data/app/assets/javascripts/chr/vendor/mode-markdown.js +2820 -0
  34. data/app/assets/javascripts/chr/vendor/redactor.fixedtoolbar.js +110 -0
  35. data/app/assets/javascripts/input-html.coffee +78 -0
  36. data/app/assets/javascripts/input-markdown.coffee +88 -0
  37. data/app/assets/javascripts/input-redactor.coffee +66 -0
  38. data/app/assets/stylesheets/_chr.scss +6 -6
  39. data/app/assets/stylesheets/_input-redactor.scss +34 -0
  40. data/app/assets/stylesheets/core/_mixins.scss +75 -0
  41. data/app/assets/stylesheets/form/_input-checkbox.scss +18 -0
  42. data/app/assets/stylesheets/form/{_input_color.scss → _input-color.scss} +0 -0
  43. data/app/assets/stylesheets/form/{_input_file.scss → _input-file.scss} +1 -0
  44. data/app/assets/stylesheets/form/{_nested_form.scss → _input-form.scss} +0 -0
  45. data/app/assets/stylesheets/form/{_input_list.scss → _input-list.scss} +0 -0
  46. data/app/assets/stylesheets/form/_input-string.scss +8 -0
  47. data/bower.json +3 -2
  48. data/{app/assets/javascripts/chr-dist.js → dist/chr.js} +1472 -1337
  49. data/dist/input-ace.js +24936 -0
  50. data/dist/input-redactor.js +156 -0
  51. data/lib/chr/version.rb +1 -1
  52. data/package.json +2 -2
  53. metadata +29 -13
  54. data/app/assets/javascripts/chr/core/list-pagination.coffee +0 -26
  55. data/app/assets/javascripts/chr/core/list-reorder.coffee +0 -70
  56. data/app/assets/javascripts/chr/core/list-search.coffee +0 -37
  57. data/app/assets/javascripts/chr/form/nested-form.coffee +0 -164
  58. data/app/assets/stylesheets/form/_input_checkbox.scss +0 -91
  59. data/app/assets/stylesheets/form/_input_string.scss +0 -8
@@ -1,91 +0,0 @@
1
- @mixin switchControl() {
2
- $switch-width: 52px;
3
- $switch-padding: 2px;
4
- $switch-height: 32px;
5
- $switch-radius: $switch-height;
6
- $knob-size: $switch-height - ($switch-padding * 2);
7
- $knob-radius: $switch-height - ($switch-padding * 2);
8
- $knob-width: $knob-size;
9
- $switch-background: $white;
10
- $switch-border-background: $contrastColor;
11
- $switch-shadow: 0 0px 2px transparentize(black, 0.6);
12
-
13
- border-radius: $switch-radius;
14
- cursor: pointer;
15
- display: inline-block;
16
- height: $switch-height;
17
- position: relative;
18
- width: $switch-width;
19
-
20
- input[type="checkbox"] {
21
- display: none;
22
-
23
- + .checkbox {
24
- @include transition(all 0.3s ease);
25
- background: $switch-border-background;
26
- border-radius: $switch-radius;
27
- border: none;
28
- cursor: pointer;
29
- height: $switch-height;
30
- margin: 0;
31
- padding: 0;
32
- position: relative;
33
- width: $switch-width;
34
- z-index: 0;
35
-
36
- &:before {
37
- @include position(absolute, 2px 0 0 2px);
38
- @include transform(scale(1));
39
- @include transition(all 0.3s ease);
40
- background: $switch-background;
41
- border-radius: $switch-radius;
42
- content: "";
43
- height: $knob-radius;
44
- width: $switch-width - ($switch-padding * 2);
45
- z-index: 1;
46
- }
47
-
48
- &:after {
49
- @include position(absolute, 2px 0 0 2px);
50
- @include transition(all 0.3s ease);
51
- @include size($knob-size);
52
- background: $switch-background;
53
- border-radius: $knob-radius;
54
- box-shadow: $switch-shadow;
55
- content: "";
56
- z-index: 2;
57
- }
58
- }
59
-
60
- &:checked {
61
- + .checkbox {
62
- background: $positiveColor;
63
-
64
- &:before {
65
- @include transform(scale(0));
66
- }
67
-
68
- &:after {
69
- left: $switch-width - $knob-width - ($switch-padding);
70
- }
71
- }
72
- }
73
- }
74
- }
75
-
76
- /* Checkbox ---------------------------------------------------------------- */
77
- .view .input-checkbox {
78
- padding: .8em 1em 1em;
79
-
80
- input { display: inline; width: auto; margin-right: .5em; }
81
- .label { display: inline; }
82
- }
83
-
84
- /* Switch ------------------------------------------------------------------ */
85
- .view .input-switch { padding-top: .75em; }
86
- .view .input-switch .switch {
87
- float: right;
88
- margin-top: -1.8em;
89
-
90
- @include switchControl();
91
- }
@@ -1,8 +0,0 @@
1
- .view .input-string {
2
- .twitter-typeahead { width: 100%; }
3
- .tt-suggestions { padding: .1em .5em; margin: 0 0 0 -.5em; background: rgba(255,255,255, .95); }
4
- .tt-suggestion { cursor: pointer; opacity: .5;
5
- p { line-height: 1.5; margin: 0; }
6
- &.tt-cursor { opacity: 1; }
7
- }
8
- }