chr 0.3.5 → 0.4.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. checksums.yaml +4 -4
  2. data/.coveralls.yml +2 -0
  3. data/.gitignore +6 -1
  4. data/.ruby-version +1 -0
  5. data/.travis.yml +18 -0
  6. data/README.md +4 -0
  7. data/Rakefile +17 -2
  8. data/app/assets/javascripts/chr.coffee +13 -26
  9. data/app/assets/javascripts/chr/{core/chr.coffee → chr.coffee} +4 -1
  10. data/app/assets/javascripts/chr/{core/chr_router.coffee → chr_router.coffee} +0 -0
  11. data/app/assets/javascripts/chr/{core/item.coffee → item.coffee} +2 -1
  12. data/app/assets/javascripts/chr/{core/list.coffee → list.coffee} +1 -1
  13. data/app/assets/javascripts/chr/{core/list_config.coffee → list_config.coffee} +0 -0
  14. data/app/assets/javascripts/chr/{core/list_pagination.coffee → list_pagination.coffee} +15 -4
  15. data/app/assets/javascripts/chr/{core/list_reorder.coffee → list_reorder.coffee} +0 -0
  16. data/app/assets/javascripts/chr/{core/list_search.coffee → list_search.coffee} +1 -1
  17. data/app/assets/javascripts/chr/{core/module.coffee → module.coffee} +0 -0
  18. data/app/assets/javascripts/chr/{core/utils.coffee → utils.coffee} +0 -0
  19. data/app/assets/javascripts/chr/{core/view.coffee → view.coffee} +21 -9
  20. data/app/assets/javascripts/chr/{core/view_local-storage.coffee → view_local-storage.coffee} +0 -0
  21. data/app/assets/javascripts/{chr/store/array-store.coffee → stores/array.coffee} +0 -0
  22. data/app/assets/javascripts/{chr/store/object-store.coffee → stores/object.coffee} +0 -0
  23. data/app/assets/javascripts/{chr/store/rails-array-store.coffee → stores/rails-array.coffee} +0 -0
  24. data/app/assets/javascripts/{chr/store → stores}/rails-form-object-parser.coffee +4 -1
  25. data/app/assets/javascripts/{chr/store/rails-object-store.coffee → stores/rails-object.coffee} +0 -0
  26. data/app/assets/javascripts/{chr/store/rest-array-store.coffee → stores/rest-array.coffee} +5 -2
  27. data/app/assets/javascripts/{chr/store/rest-object-store.coffee → stores/rest-object.coffee} +0 -0
  28. data/app/assets/stylesheets/{_chr.scss → chr.scss} +2 -7
  29. data/app/assets/stylesheets/chr/{_icons.scss → icons.scss} +0 -0
  30. data/app/assets/stylesheets/chr/{_main.scss → main.scss} +10 -3
  31. data/app/assets/stylesheets/chr/{_mixins.scss → mixins.scss} +0 -77
  32. data/app/assets/stylesheets/chr/{_settings.scss → settings.scss} +1 -1
  33. data/bin/chr +13 -0
  34. data/bin/rake +16 -0
  35. data/bin/setup +13 -0
  36. data/chr.gemspec +41 -21
  37. data/docs/tests.md +64 -0
  38. data/lib/chr.rb +10 -2
  39. data/lib/chr/app_builder.rb +385 -0
  40. data/lib/chr/generators/app_generator.rb +213 -0
  41. data/lib/chr/version.rb +3 -1
  42. data/lib/generators/chr/controller_generator.rb +18 -0
  43. data/templates/Gemfile.erb +38 -0
  44. data/templates/Procfile +1 -0
  45. data/templates/README.md.erb +45 -0
  46. data/templates/_analytics.html.erb +9 -0
  47. data/templates/_flashes.html.erb +7 -0
  48. data/templates/_javascript.html.erb +12 -0
  49. data/templates/application.coffee +2 -0
  50. data/templates/application.scss +1 -0
  51. data/templates/application.yml +6 -0
  52. data/templates/application_gitignore +14 -0
  53. data/templates/application_layout.html.erb.erb +29 -0
  54. data/templates/asset_sync.rb +28 -0
  55. data/templates/bin_setup.erb +36 -0
  56. data/templates/body_class_helper.rb +19 -0
  57. data/templates/bundler_audit.rake +12 -0
  58. data/templates/carrierwave.rb +23 -0
  59. data/templates/character_admin.coffee.erb +28 -0
  60. data/templates/character_admin.scss +3 -0
  61. data/templates/character_admin_index.html.erb +2 -0
  62. data/templates/character_admin_layout.html.erb +21 -0
  63. data/templates/character_base_controller.rb +16 -0
  64. data/templates/development_seeds.rb +12 -0
  65. data/templates/devise_overrides_passwords_controller.rb +10 -0
  66. data/templates/devise_overrides_passwords_edit.html.erb +30 -0
  67. data/templates/devise_overrides_passwords_new.html.erb +21 -0
  68. data/templates/devise_overrides_sessions_controller.rb +12 -0
  69. data/templates/devise_overrides_sessions_new.html.erb +31 -0
  70. data/templates/errors.rb +34 -0
  71. data/templates/json_encoding.rb +1 -0
  72. data/templates/newrelic.yml.erb +34 -0
  73. data/templates/puma.rb +18 -0
  74. data/templates/routes.rb +90 -0
  75. data/templates/sample.env +6 -0
  76. data/templates/secrets.yml +14 -0
  77. data/templates/smtp.rb +9 -0
  78. data/templates/staging.rb +5 -0
  79. data/test/factories/article_factory.rb +19 -0
  80. data/test/files/test.jpg +0 -0
  81. data/test/integration/article_fullsize_test.rb +33 -0
  82. data/test/integration/article_test.rb +33 -0
  83. data/test/integration/magazine_article_test.rb +33 -0
  84. data/test/integration/restricted_article_test.rb +33 -0
  85. data/test/integration/sport_article_test.rb +34 -0
  86. data/test/rails_app/Rakefile +6 -0
  87. data/test/rails_app/app/assets/javascripts/admin.coffee +137 -0
  88. data/test/rails_app/app/assets/javascripts/application.js +1 -0
  89. data/test/rails_app/app/assets/stylesheets/admin.scss +1 -0
  90. data/test/rails_app/app/assets/stylesheets/application.css +1 -0
  91. data/test/rails_app/app/controllers/admin/articles_controller.rb +7 -0
  92. data/test/rails_app/app/controllers/admin/base_controller.rb +8 -0
  93. data/test/rails_app/app/controllers/application_controller.rb +5 -0
  94. data/test/rails_app/app/helpers/application_helper.rb +2 -0
  95. data/test/rails_app/app/models/article.rb +46 -0
  96. data/test/rails_app/app/uploaders/article_image_uploader.rb +16 -0
  97. data/test/rails_app/app/views/admin/index.html.erb +4 -0
  98. data/test/rails_app/app/views/layouts/admin.html.erb +17 -0
  99. data/test/rails_app/app/views/layouts/application.html.erb +14 -0
  100. data/test/rails_app/bin/bundle +3 -0
  101. data/test/rails_app/bin/rails +8 -0
  102. data/test/rails_app/bin/rake +8 -0
  103. data/test/rails_app/bin/setup +29 -0
  104. data/test/rails_app/bin/spring +15 -0
  105. data/test/rails_app/config.ru +4 -0
  106. data/test/rails_app/config/application.rb +36 -0
  107. data/test/rails_app/config/boot.rb +3 -0
  108. data/test/rails_app/config/environment.rb +5 -0
  109. data/test/rails_app/config/environments/development.rb +38 -0
  110. data/test/rails_app/config/environments/production.rb +76 -0
  111. data/test/rails_app/config/environments/test.rb +46 -0
  112. data/test/rails_app/config/initializers/assets.rb +12 -0
  113. data/test/rails_app/config/initializers/backtrace_silencers.rb +7 -0
  114. data/test/rails_app/config/initializers/carrierwave.rb +5 -0
  115. data/test/rails_app/config/initializers/cookies_serializer.rb +3 -0
  116. data/test/rails_app/config/initializers/filter_parameter_logging.rb +4 -0
  117. data/test/rails_app/config/initializers/inflections.rb +16 -0
  118. data/test/rails_app/config/initializers/mime_types.rb +4 -0
  119. data/test/rails_app/config/initializers/session_store.rb +3 -0
  120. data/test/rails_app/config/initializers/wrap_parameters.rb +9 -0
  121. data/test/rails_app/config/locales/en.yml +23 -0
  122. data/test/rails_app/config/mongoid.yml +9 -0
  123. data/test/rails_app/config/routes.rb +8 -0
  124. data/test/rails_app/config/secrets.yml +22 -0
  125. data/test/rails_app/db/seeds.rb +7 -0
  126. data/test/rails_app/public/404.html +67 -0
  127. data/test/rails_app/public/422.html +67 -0
  128. data/test/rails_app/public/500.html +66 -0
  129. data/{app/assets/javascripts/form/input-date.coffee → test/rails_app/public/favicon.ico} +0 -0
  130. data/test/rails_app/public/robots.txt +5 -0
  131. data/test/support/character_front_end.rb +196 -0
  132. data/test/support/chr/item.rb +32 -0
  133. data/test/support/chr/list.rb +31 -0
  134. data/test/support/chr/list_pagination.rb +163 -0
  135. data/test/support/chr/list_reorder.rb +46 -0
  136. data/test/support/chr/list_search.rb +41 -0
  137. data/test/support/chr/view.rb +112 -0
  138. data/test/support/stores/array.rb +20 -0
  139. data/test/support/stores/rest-array.rb +34 -0
  140. data/test/test_helper.rb +68 -0
  141. metadata +373 -80
  142. data/Gruntfile.coffee +0 -101
  143. data/app/assets/javascripts/form/expandable-group.coffee +0 -30
  144. data/app/assets/javascripts/form/form.coffee +0 -221
  145. data/app/assets/javascripts/form/input-checkbox.coffee +0 -83
  146. data/app/assets/javascripts/form/input-color.coffee +0 -55
  147. data/app/assets/javascripts/form/input-file.coffee +0 -144
  148. data/app/assets/javascripts/form/input-form.coffee +0 -171
  149. data/app/assets/javascripts/form/input-form_reorder.coffee +0 -67
  150. data/app/assets/javascripts/form/input-hidden.coffee +0 -57
  151. data/app/assets/javascripts/form/input-list.coffee +0 -154
  152. data/app/assets/javascripts/form/input-list_reorder.coffee +0 -39
  153. data/app/assets/javascripts/form/input-list_typeahead.coffee +0 -55
  154. data/app/assets/javascripts/form/input-password.coffee +0 -32
  155. data/app/assets/javascripts/form/input-select.coffee +0 -84
  156. data/app/assets/javascripts/form/input-select2.coffee +0 -33
  157. data/app/assets/javascripts/form/input-string.coffee +0 -160
  158. data/app/assets/javascripts/form/input-text.coffee +0 -43
  159. data/app/assets/javascripts/input-html.coffee +0 -81
  160. data/app/assets/javascripts/input-markdown.coffee +0 -93
  161. data/app/assets/javascripts/input-redactor.coffee +0 -1
  162. data/app/assets/javascripts/redactor/input-redactor.coffee +0 -53
  163. data/app/assets/javascripts/redactor/input-redactor_character.coffee +0 -83
  164. data/app/assets/javascripts/redactor/input-redactor_images.coffee +0 -166
  165. data/app/assets/javascripts/vendor/ace.js +0 -18280
  166. data/app/assets/javascripts/vendor/jquery.scrollparent.js +0 -14
  167. data/app/assets/javascripts/vendor/jquery.textarea_autosize.js +0 -55
  168. data/app/assets/javascripts/vendor/jquery.typeahead.js +0 -1782
  169. data/app/assets/javascripts/vendor/marked.js +0 -1272
  170. data/app/assets/javascripts/vendor/mode-html.js +0 -2436
  171. data/app/assets/javascripts/vendor/mode-markdown.js +0 -2820
  172. data/app/assets/javascripts/vendor/redactor.fixedtoolbar.js +0 -107
  173. data/app/assets/javascripts/vendor/select2.js +0 -5274
  174. data/app/assets/stylesheets/_input-redactor.scss +0 -35
  175. data/app/assets/stylesheets/form/_expandable-group.scss +0 -16
  176. data/app/assets/stylesheets/form/_input-select2.scss +0 -94
  177. data/app/assets/stylesheets/form/_main.scss +0 -180
  178. data/app/assets/stylesheets/vendor/select2.css +0 -258
  179. data/bower.json +0 -38
  180. data/dist/chr.js +0 -5949
  181. data/dist/input-ace.js +0 -24946
  182. data/dist/input-redactor.js +0 -1
  183. data/lib/mongoid/character.rb +0 -30
  184. data/package.json +0 -10
@@ -1,35 +0,0 @@
1
- @import "redactor";
2
-
3
-
4
- // input
5
- .input-inverter,
6
- .input-redactor {
7
- .redactor-box { margin-bottom: 0; }
8
- .redactor-toolbar { box-shadow: none; border-bottom: 2px solid $neutralColor; }
9
- .redactor-editor { border: 0; padding: 1em .5em 0 .5em; }
10
- }
11
-
12
- // toolbar
13
- .redactor-toolbar li a:hover { background-color: $positiveColor; }
14
- .redactor-dropdown a:hover { background-color: $positiveColor; }
15
-
16
- // placeholder
17
- .redactor-placeholder:after { color: $lightColor!important; left: .5em; top: 18px; }
18
-
19
- // scrollbars
20
- .redactor-editor, textarea.redactor { @include custom-scrollbar; }
21
-
22
- // line-height issue fix
23
- .redactor-editor { line-height: inherit !important; }
24
-
25
- // modal
26
- #redactor-modal-close { line-height: 30px; text-align: center; }
27
- #redactor-modal footer button {
28
- &.redactor-modal-close-btn { background-color: $lightColor;
29
- &:hover { background-color: $lightColor; opacity: .75; } }
30
- &.redactor-modal-action-btn { background-color: $positiveColor;
31
- &:hover { background-color: $positiveColor; opacity: .75; color: $white; } }
32
- &.redactor-modal-delete-btn { background-color: $assertiveColor;
33
- &:hover { background-color: $assertiveColor; opacity: .75; color: $white; } }
34
- }
35
-
@@ -1,16 +0,0 @@
1
-
2
- // expandable group
3
- .group-edit { color: $stableColor; font-size: .9em; @include position(absolute, null .5em null null); text-transform: lowercase; margin-top: -1.5em;
4
- &:hover { color: $positiveColor; }
5
- }
6
-
7
- .group-edit:before {
8
- content: '-';
9
- display: block; width: 1em; height: 1em;
10
- @include position(absolute, null null null -.75em);
11
- }
12
-
13
- .group-edit.hidden:before { content: '+'; }
14
- .group-edit.hidden + .group { display: none; }
15
-
16
- .form .group .input-stacked:last-child { @include bottom-border($neutralColor); }
@@ -1,94 +0,0 @@
1
- @import "vendor/select2";
2
-
3
-
4
- .input-stacked.input-select2 {
5
- padding-bottom: .3em;
6
- }
7
-
8
- .select2-dropdown,
9
- .select2-container--default .select2-selection--single {
10
- border-color: $neutralColor;
11
- border-radius: 0;
12
- }
13
-
14
- .select2-container--default .select2-selection--single {
15
- border: 0;
16
- }
17
-
18
- .select2-container--open .select2-dropdown--above {
19
- border: 1px solid $neutralColor; border-top: none;
20
- }
21
-
22
- .select2-container--default .select2-selection--single .select2-selection__rendered {
23
- line-height: 1.4em;
24
- color: $black;
25
- }
26
-
27
- .select2-container--default .select2-selection--single .select2-selection__arrow b {
28
- border-color: $positiveColor transparent transparent transparent;
29
- }
30
-
31
- .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
32
- border-color: transparent transparent $positiveColor transparent;
33
- }
34
-
35
- .select2-container--default .select2-search--dropdown .select2-search__field {
36
- border-color: $contrastColor;
37
- &:focus {
38
- border-color: $stableColor;
39
- }
40
- }
41
-
42
- .select2-container--default * {
43
- &:focus {
44
- outline: none;
45
- }
46
- }
47
-
48
- .select2-container--default .select2-results__option[aria-selected=true] {
49
- background-color: $neutralColor;
50
- color: $black;
51
- }
52
-
53
- .select2-results__option {
54
- font-weight: 300;
55
- }
56
-
57
- .select2-container--default .select2-results__option--highlighted[aria-selected] {
58
- background-color: $positiveColor;
59
- color: $white;
60
- }
61
-
62
- .select2-container--default .select2-results__option[aria-selected=true] {
63
- &:hover {
64
- background-color: $positiveColor;
65
- color: $white;
66
- }
67
- }
68
-
69
- .select2-container--default .select2-results > .select2-results__options {
70
- @include custom-scrollbar();
71
- }
72
-
73
- .select2-dropdown--below {
74
- top: -4px;
75
- }
76
-
77
- .select2-container--default .select2-selection--single .select2-selection__arrow {
78
- left: 1px;
79
- top: -1px;
80
- }
81
-
82
- .select2-container .select2-selection--single .select2-selection__rendered {
83
- padding-left: 20px;
84
- padding-right: 8px;
85
- }
86
-
87
- .select2-search--dropdown {
88
- padding: 0;
89
- margin: 0 -1px;
90
- }
91
-
92
-
93
-
94
-
@@ -1,180 +0,0 @@
1
-
2
- .form {
3
- // label
4
- label { display: block; }
5
-
6
-
7
- // general
8
- .input-stacked {
9
- @include position(relative); padding: .5em 1em .9em;
10
- @include bottom-border($neutralColor); &:last-child { @include no-bottom-border; }
11
-
12
- textarea, input { width: 100%; @include no-outline; @include placeholder { color: $lightColor; } }
13
-
14
- .label { display: block; line-height: 1.8; color: $stableColor; }
15
- }
16
-
17
-
18
- // validation error
19
- .error-message { color: $assertiveColor; font-size: .8em; margin-left: .5em; }
20
-
21
-
22
- // nested form
23
- .nested-forms {
24
- & > .label { margin-bottom: .25em; }
25
- & > ul { margin: 0; padding: 0; }
26
- & > ul > li { list-style-type: none; margin-top: 1em; @include position(relative); border: 1px solid $neutralColor; }
27
- & > ul > li:first-child { margin-top: 0; }
28
- & > ul > li > .icon-reorder { left: 0; top: 1em; }
29
- & > ul li.reorderable { background-color: $white; }
30
- & > ul li.reorderable > .input-stacked:first-child { padding-left: 2.4em; }
31
- }
32
-
33
- .nested-form-new {
34
- color: $positiveColor; margin-top: .75em; display: inline-block; font-size: .9em;
35
- &:hover { opacity: .5; }
36
- }
37
-
38
- .nested-form-delete {
39
- @include position(absolute, .35em .3em null null); border-radius: 1em;
40
- @include hide-text; width: 1.5em; height: 1.5em; background-color: rgba(0,0,0,.05);
41
- &:before { content: '\00d7'; color: $stableColor; line-height: 1.35em; @include position(absolute, null 7px null null); }
42
- &:hover { background-color: $positiveColor; &:before { color: $white; } }
43
- }
44
-
45
-
46
- // required
47
- .input-required .label:before { content: '*'; color: $assertiveColor; @include position(absolute, null null null .38em); }
48
-
49
-
50
- // disabled
51
- .input-disabled { textarea, input { color: $stableColor; } }
52
-
53
-
54
- // string
55
- .input-string {
56
- .twitter-typeahead { width: 100%; }
57
- .tt-suggestions { padding: .1em .5em; margin: 0 0 0 -.5em; background: rgba(255,255,255, .95); }
58
- .tt-suggestion { cursor: pointer; opacity: .5;
59
- p { line-height: 1.5; margin: 0; }
60
- &.tt-cursor { opacity: 1; }
61
- }
62
- }
63
-
64
- // character counter
65
- .input-character-counter { font-size: .8em; margin-left: .5em; &.exceeds { color: $assertiveColor; } }
66
-
67
-
68
- // text
69
- .input-text { min-height: 82px;
70
- textarea { resize: none; overflow: auto; box-sizing: border-box; min-height: 20px; }
71
- }
72
-
73
-
74
- // select
75
- .input-select select { margin-top: 0.15em; }
76
-
77
-
78
- // checkbox
79
- .input-checkbox { padding: .8em 1em 1em;
80
- input { display: inline; width: auto; margin-right: .5em; }
81
- .label { display: inline; cursor: pointer; }
82
- }
83
-
84
-
85
- // switch
86
- .input-switch { padding-top: .75em;
87
- .label { cursor: pointer; }
88
- .switch { @include switch; float: right; }
89
- }
90
-
91
-
92
- // color
93
- .input-color {
94
- position: relative; padding-left: 4.75em;
95
-
96
- .preview {
97
- @include position(absolute, .65em null null 1em);
98
- width: 50px; height: 50px; border-radius: 4px; background-color: #eee;
99
- }
100
- }
101
-
102
-
103
- // list
104
- .input-list {
105
- input { padding-left: 2em; margin-top: .1em; }
106
- ul { line-height: 1.5; margin: 0 0 0 2em; list-style: none; padding: 0; }
107
- ul li { @include user-select(none); position: relative; }
108
- ul li a { color: $assertiveColor; font-size: .75em; }
109
-
110
- .slip-reordering { color: $positiveColor; }
111
-
112
- .icon-reorder {
113
- width: 25px;
114
- height: 25px;
115
- left: -1.75em;
116
- &:before { left: 0; top: 9px; }
117
- &:after { left: 0; top: 14px; }
118
- }
119
-
120
- .twitter-typeahead { width: 100%; }
121
- .twitter-typeahead:after {
122
- content: '+';
123
- display: block;
124
- width: 40px;
125
- height: 24px;
126
- position: absolute; left: 12px; top: -3px;
127
- font-size: 22px;
128
- color: $contrastColor;
129
- }
130
-
131
- .tt-suggestions { padding: .1em .5em; margin: 0 0 0 1.55em; background: rgba(255,255,255, .95); }
132
- .tt-suggestion { cursor: pointer; opacity: .5;
133
- p { line-height: 1.5; margin: 0; }
134
- &.tt-cursor { opacity: 1; }
135
- }
136
- }
137
-
138
-
139
- // file
140
- .input-file { min-height: 102px; // NOTE: calculated based on image thumbnail size
141
-
142
- a { color: $positiveColor; @include truncate; }
143
- a:hover { text-decoration: underline; }
144
-
145
- input[type=file] { margin-top: .5em; margin-left: 1.75em; }
146
- input[type=checkbox] { display: inline; width: auto; margin-right: .5em; margin-left: 1em; }
147
- label { display: inline; font-size: .8em; }
148
-
149
- &.empty {
150
- img, a, label, input[type=checkbox] { @include hide; }
151
- input[type=file] { margin-top: .2em; }
152
- }
153
- }
154
-
155
- .input-file-clear {
156
- display: inline-block; width: 1.5em; height: 1.5em; background-color: rgba(0,0,0,.05);
157
- @include position(absolute); border-radius: 1em; margin-top: -22px;
158
- &:before { content: '\00d7'; color: $stableColor; line-height: 1.35em; @include position(absolute, null 7px null null); }
159
- &:hover { background-color: $positiveColor; &:before { color: $white; } }
160
- }
161
-
162
-
163
- // input
164
- .input-image { @extend .input-file; }
165
- .input-image:not(.empty) {
166
- padding-left: 6.5em;
167
- position: relative;
168
- img {
169
- position: absolute;
170
- border-radius: 4px;
171
- left: 1em;
172
- top: .8em;
173
- width: 4.7em;
174
- }
175
- }
176
- }
177
-
178
-
179
-
180
-
@@ -1,258 +0,0 @@
1
- .select2-container {
2
- box-sizing: border-box;
3
- display: inline-block;
4
- margin: 0;
5
- position: relative;
6
- vertical-align: middle; }
7
- .select2-container .select2-selection--single {
8
- box-sizing: border-box;
9
- cursor: pointer;
10
- display: block;
11
- height: 28px;
12
- user-select: none;
13
- -webkit-user-select: none; }
14
- .select2-container .select2-selection--single .select2-selection__rendered {
15
- display: block;
16
- padding-left: 8px;
17
- padding-right: 20px;
18
- overflow: hidden;
19
- text-overflow: ellipsis;
20
- white-space: nowrap; }
21
- .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
22
- padding-right: 8px;
23
- padding-left: 20px; }
24
- .select2-container .select2-selection--multiple {
25
- box-sizing: border-box;
26
- cursor: pointer;
27
- display: block;
28
- min-height: 32px;
29
- user-select: none;
30
- -webkit-user-select: none; }
31
- .select2-container .select2-selection--multiple .select2-selection__rendered {
32
- display: inline-block;
33
- overflow: hidden;
34
- padding-left: 8px;
35
- text-overflow: ellipsis;
36
- white-space: nowrap; }
37
- .select2-container .select2-search--inline {
38
- float: left; }
39
- .select2-container .select2-search--inline .select2-search__field {
40
- box-sizing: border-box;
41
- border: none;
42
- font-size: 100%;
43
- margin-top: 5px; }
44
- .select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
45
- -webkit-appearance: none; }
46
-
47
- .select2-dropdown {
48
- background-color: white;
49
- border: 1px solid #aaa;
50
- border-radius: 4px;
51
- box-sizing: border-box;
52
- display: block;
53
- position: absolute;
54
- left: -100000px;
55
- width: 100%;
56
- z-index: 1051; }
57
-
58
- .select2-results {
59
- display: block; }
60
-
61
- .select2-results__options {
62
- list-style: none;
63
- margin: 0;
64
- padding: 0; }
65
-
66
- .select2-results__option {
67
- padding: 6px;
68
- user-select: none;
69
- -webkit-user-select: none; }
70
- .select2-results__option[aria-selected] {
71
- cursor: pointer; }
72
-
73
- .select2-container--open .select2-dropdown {
74
- left: 0; }
75
-
76
- .select2-container--open .select2-dropdown--above {
77
- border-bottom: none;
78
- border-bottom-left-radius: 0;
79
- border-bottom-right-radius: 0; }
80
-
81
- .select2-container--open .select2-dropdown--below {
82
- border-top: none;
83
- border-top-left-radius: 0;
84
- border-top-right-radius: 0; }
85
-
86
- .select2-search--dropdown {
87
- display: block;
88
- padding: 4px; }
89
- .select2-search--dropdown .select2-search__field {
90
- padding: 4px;
91
- width: 100%;
92
- box-sizing: border-box; }
93
- .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
94
- -webkit-appearance: none; }
95
- .select2-search--dropdown.select2-search--hide {
96
- display: none; }
97
-
98
- .select2-close-mask {
99
- border: 0;
100
- margin: 0;
101
- padding: 0;
102
- display: block;
103
- position: fixed;
104
- left: 0;
105
- top: 0;
106
- min-height: 100%;
107
- min-width: 100%;
108
- height: auto;
109
- width: auto;
110
- opacity: 0;
111
- z-index: 99;
112
- background-color: #fff;
113
- filter: alpha(opacity=0); }
114
-
115
- .select2-container--default .select2-selection--single {
116
- background-color: #fff;
117
- border: 1px solid #aaa;
118
- border-radius: 4px; }
119
- .select2-container--default .select2-selection--single .select2-selection__rendered {
120
- color: #444;
121
- line-height: 28px; }
122
- .select2-container--default .select2-selection--single .select2-selection__clear {
123
- cursor: pointer;
124
- float: right;
125
- font-weight: bold; }
126
- .select2-container--default .select2-selection--single .select2-selection__placeholder {
127
- color: #999; }
128
- .select2-container--default .select2-selection--single .select2-selection__arrow {
129
- height: 26px;
130
- position: absolute;
131
- top: 1px;
132
- right: 1px;
133
- width: 20px; }
134
- .select2-container--default .select2-selection--single .select2-selection__arrow b {
135
- border-color: #888 transparent transparent transparent;
136
- border-style: solid;
137
- border-width: 5px 4px 0 4px;
138
- height: 0;
139
- left: 50%;
140
- margin-left: -4px;
141
- margin-top: -2px;
142
- position: absolute;
143
- top: 50%;
144
- width: 0; }
145
- .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
146
- float: left; }
147
- .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
148
- left: 1px;
149
- right: auto; }
150
- .select2-container--default.select2-container--disabled .select2-selection--single {
151
- background-color: #eee;
152
- cursor: default; }
153
- .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
154
- display: none; }
155
- .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
156
- border-color: transparent transparent #888 transparent;
157
- border-width: 0 4px 5px 4px; }
158
- .select2-container--default .select2-selection--multiple {
159
- background-color: white;
160
- border: 1px solid #aaa;
161
- border-radius: 4px;
162
- cursor: text; }
163
- .select2-container--default .select2-selection--multiple .select2-selection__rendered {
164
- box-sizing: border-box;
165
- list-style: none;
166
- margin: 0;
167
- padding: 0 5px;
168
- width: 100%; }
169
- .select2-container--default .select2-selection--multiple .select2-selection__placeholder {
170
- color: #999;
171
- margin-top: 5px;
172
- float: left; }
173
- .select2-container--default .select2-selection--multiple .select2-selection__clear {
174
- cursor: pointer;
175
- float: right;
176
- font-weight: bold;
177
- margin-top: 5px;
178
- margin-right: 10px; }
179
- .select2-container--default .select2-selection--multiple .select2-selection__choice {
180
- background-color: #e4e4e4;
181
- border: 1px solid #aaa;
182
- border-radius: 4px;
183
- cursor: default;
184
- float: left;
185
- margin-right: 5px;
186
- margin-top: 5px;
187
- padding: 0 5px; }
188
- .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
189
- color: #999;
190
- cursor: pointer;
191
- display: inline-block;
192
- font-weight: bold;
193
- margin-right: 2px; }
194
- .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
195
- color: #333; }
196
- .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder {
197
- float: right; }
198
- .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
199
- margin-left: 5px;
200
- margin-right: auto; }
201
- .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
202
- margin-left: 2px;
203
- margin-right: auto; }
204
- .select2-container--default.select2-container--focus .select2-selection--multiple {
205
- border: solid black 1px;
206
- outline: 0; }
207
- .select2-container--default.select2-container--disabled .select2-selection--multiple {
208
- background-color: #eee;
209
- cursor: default; }
210
- .select2-container--default.select2-container--disabled .select2-selection__choice__remove {
211
- display: none; }
212
- .select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
213
- border-top-left-radius: 0;
214
- border-top-right-radius: 0; }
215
- .select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
216
- border-bottom-left-radius: 0;
217
- border-bottom-right-radius: 0; }
218
- .select2-container--default .select2-search--dropdown .select2-search__field {
219
- border: 1px solid #aaa; }
220
- .select2-container--default .select2-search--inline .select2-search__field {
221
- background: transparent;
222
- border: none;
223
- outline: 0; }
224
- .select2-container--default .select2-results > .select2-results__options {
225
- max-height: 200px;
226
- overflow-y: auto; }
227
- .select2-container--default .select2-results__option[role=group] {
228
- padding: 0; }
229
- .select2-container--default .select2-results__option[aria-disabled=true] {
230
- color: #999; }
231
- .select2-container--default .select2-results__option[aria-selected=true] {
232
- background-color: #ddd; }
233
- .select2-container--default .select2-results__option .select2-results__option {
234
- padding-left: 1em; }
235
- .select2-container--default .select2-results__option .select2-results__option .select2-results__group {
236
- padding-left: 0; }
237
- .select2-container--default .select2-results__option .select2-results__option .select2-results__option {
238
- margin-left: -1em;
239
- padding-left: 2em; }
240
- .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
241
- margin-left: -2em;
242
- padding-left: 3em; }
243
- .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
244
- margin-left: -3em;
245
- padding-left: 4em; }
246
- .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
247
- margin-left: -4em;
248
- padding-left: 5em; }
249
- .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
250
- margin-left: -5em;
251
- padding-left: 6em; }
252
- .select2-container--default .select2-results__option--highlighted[aria-selected] {
253
- background-color: #5897fb;
254
- color: white; }
255
- .select2-container--default .select2-results__group {
256
- cursor: default;
257
- display: block;
258
- padding: 6px; }