decidim-core 0.8.4 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (249) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +1 -1
  3. data/app/assets/images/decidim/decidim-logo.svg +23 -23
  4. data/app/assets/images/decidim/default-avatar.svg +7 -7
  5. data/app/assets/images/decidim/icons.svg +1 -0
  6. data/app/assets/javascripts/decidim.js.es6 +5 -2
  7. data/app/assets/javascripts/decidim/append_redirect_url_to_modals.js.es6 +84 -0
  8. data/app/assets/javascripts/decidim/data_picker.js.es6 +177 -0
  9. data/app/assets/javascripts/decidim/form_filter.component.js.es6 +25 -20
  10. data/app/assets/javascripts/decidim/form_filter.component.test.js +24 -13
  11. data/app/assets/javascripts/decidim/history.js.es6 +3 -3
  12. data/app/assets/stylesheets/decidim/_decidim.scss +1 -4
  13. data/app/assets/stylesheets/decidim/_variables.scss +4 -4
  14. data/app/assets/stylesheets/decidim/editor.scss +13 -0
  15. data/app/assets/stylesheets/decidim/email.css +9 -1
  16. data/app/assets/stylesheets/decidim/extras/_add_comments.scss +3 -3
  17. data/app/assets/stylesheets/decidim/extras/_announcement.scss +1 -1
  18. data/app/assets/stylesheets/decidim/extras/_collection-sort-controls.scss +2 -2
  19. data/app/assets/stylesheets/decidim/extras/_embed.scss +6 -5
  20. data/app/assets/stylesheets/decidim/extras/_impersonation-bar.scss +4 -0
  21. data/app/assets/stylesheets/decidim/extras/_label-required.scss +1 -1
  22. data/app/assets/stylesheets/decidim/extras/_leaflet.scss +6 -4
  23. data/app/assets/stylesheets/decidim/extras/_meeting-registrations.scss +4 -4
  24. data/app/assets/stylesheets/decidim/extras/_process_stats.scss +11 -4
  25. data/app/assets/stylesheets/decidim/extras/_proposal_form.scss +3 -3
  26. data/app/assets/stylesheets/decidim/extras/_quill.scss +1 -1
  27. data/app/assets/stylesheets/decidim/extras/_reference.scss +3 -3
  28. data/app/assets/stylesheets/decidim/extras/_register_form.scss +3 -3
  29. data/app/assets/stylesheets/decidim/extras/_results-per-page.scss +10 -10
  30. data/app/assets/stylesheets/decidim/extras/_social_icons_mini.scss +4 -3
  31. data/app/assets/stylesheets/decidim/layouts/_highlighted_banner.scss +38 -0
  32. data/app/assets/stylesheets/decidim/layouts/_home.scss +33 -3
  33. data/app/assets/stylesheets/decidim/layouts/_user.scss +33 -5
  34. data/app/assets/stylesheets/decidim/layouts/_view.scss +1 -2
  35. data/app/assets/stylesheets/decidim/map.css +5 -3
  36. data/app/assets/stylesheets/decidim/modules/_address.scss +1 -0
  37. data/app/assets/stylesheets/decidim/modules/_author-avatar.scss +24 -9
  38. data/app/assets/stylesheets/decidim/modules/_buttons.scss +24 -10
  39. data/app/assets/stylesheets/decidim/modules/_callout.scss +5 -1
  40. data/app/assets/stylesheets/decidim/modules/_card-grid.scss +1 -1
  41. data/app/assets/stylesheets/decidim/modules/_cards.scss +102 -31
  42. data/app/assets/stylesheets/decidim/modules/_comments.scss +21 -20
  43. data/app/assets/stylesheets/decidim/modules/_cookie-bar.scss +4 -0
  44. data/app/assets/stylesheets/decidim/modules/_data-picker.scss +159 -0
  45. data/app/assets/stylesheets/decidim/modules/_datepicker.scss +36 -36
  46. data/app/assets/stylesheets/decidim/modules/_definition-data.scss +12 -9
  47. data/app/assets/stylesheets/decidim/modules/_extra.scss +4 -1
  48. data/app/assets/stylesheets/decidim/modules/_filter-tags.scss +3 -0
  49. data/app/assets/stylesheets/decidim/modules/_filters.scss +9 -5
  50. data/app/assets/stylesheets/decidim/modules/_flag.scss +1 -0
  51. data/app/assets/stylesheets/decidim/modules/_footer.scss +10 -0
  52. data/app/assets/stylesheets/decidim/modules/_forms.scss +2 -1
  53. data/app/assets/stylesheets/decidim/modules/_help.scss +2 -0
  54. data/app/assets/stylesheets/decidim/modules/_icons.scss +1 -0
  55. data/app/assets/stylesheets/decidim/modules/_layout.scss +4 -0
  56. data/app/assets/stylesheets/decidim/modules/_list-docs.scss +3 -0
  57. data/app/assets/stylesheets/decidim/modules/_main-container.scss +13 -7
  58. data/app/assets/stylesheets/decidim/modules/_map.scss +13 -1
  59. data/app/assets/stylesheets/decidim/modules/_margins.scss +1 -0
  60. data/app/assets/stylesheets/decidim/modules/_messages.scss +2 -1
  61. data/app/assets/stylesheets/decidim/modules/_modules.scss +3 -0
  62. data/app/assets/stylesheets/decidim/modules/_navbar.scss +36 -16
  63. data/app/assets/stylesheets/decidim/modules/_omnipresent_banner.scss +26 -0
  64. data/app/assets/stylesheets/decidim/modules/_opinion-toggle.scss +5 -0
  65. data/app/assets/stylesheets/decidim/modules/_order-by.scss +10 -10
  66. data/app/assets/stylesheets/decidim/modules/_pagination.scss +3 -2
  67. data/app/assets/stylesheets/decidim/modules/_process-header.scss +11 -2
  68. data/app/assets/stylesheets/decidim/modules/_process-info.scss +9 -1
  69. data/app/assets/stylesheets/decidim/modules/_process-nav.scss +20 -3
  70. data/app/assets/stylesheets/decidim/modules/_process-phase.scss +12 -3
  71. data/app/assets/stylesheets/decidim/modules/_progress-bar.scss +69 -0
  72. data/app/assets/stylesheets/decidim/modules/_reference.scss +1 -2
  73. data/app/assets/stylesheets/decidim/modules/_reveal.scss +1 -1
  74. data/app/assets/stylesheets/decidim/modules/_share.scss +2 -0
  75. data/app/assets/stylesheets/decidim/modules/_signup.scss +5 -1
  76. data/app/assets/stylesheets/decidim/modules/_static-pages.scss +6 -0
  77. data/app/assets/stylesheets/decidim/modules/_status-labels.scss +2 -0
  78. data/app/assets/stylesheets/decidim/modules/_tags.scss +3 -1
  79. data/app/assets/stylesheets/decidim/modules/_timeline.scss +41 -30
  80. data/app/assets/stylesheets/decidim/modules/_title-action.scss +2 -1
  81. data/app/assets/stylesheets/decidim/modules/_typography.scss +13 -4
  82. data/app/assets/stylesheets/decidim/modules/_user-form.scss +1 -0
  83. data/app/assets/stylesheets/decidim/modules/_video.scss +2 -2
  84. data/app/assets/stylesheets/decidim/utils/_fontface.scss +22 -20
  85. data/app/assets/stylesheets/decidim/utils/_helpers.scss +6 -6
  86. data/app/assets/stylesheets/decidim/utils/_keyframes.scss +6 -6
  87. data/app/assets/stylesheets/decidim/utils/_mixins.scss +24 -7
  88. data/app/assets/stylesheets/decidim/utils/_settings.scss +50 -52
  89. data/app/assets/stylesheets/decidim/utils/_toggle-expand.scss +1 -0
  90. data/app/commands/decidim/create_omniauth_registration.rb +3 -0
  91. data/app/commands/decidim/create_registration.rb +3 -1
  92. data/app/commands/decidim/destroy_account.rb +1 -0
  93. data/app/commands/decidim/invite_user_again.rb +1 -1
  94. data/app/commands/decidim/messaging/reply_to_conversation.rb +1 -3
  95. data/app/commands/decidim/unsubscribe_settings.rb +29 -0
  96. data/app/commands/decidim/update_account.rb +16 -3
  97. data/app/controllers/concerns/decidim/action_authorization.rb +1 -1
  98. data/app/controllers/concerns/decidim/devise_controllers.rb +10 -0
  99. data/app/controllers/concerns/decidim/form_factory.rb +2 -1
  100. data/app/controllers/concerns/decidim/impersonate_users.rb +13 -8
  101. data/app/controllers/concerns/decidim/participatory_space_context.rb +1 -1
  102. data/app/controllers/decidim/application_controller.rb +16 -0
  103. data/app/controllers/decidim/cookie_policy_controller.rb +2 -0
  104. data/app/controllers/decidim/devise/invitations_controller.rb +9 -1
  105. data/app/controllers/decidim/devise/omniauth_registrations_controller.rb +10 -1
  106. data/app/controllers/decidim/devise/sessions_controller.rb +9 -1
  107. data/app/controllers/decidim/locales_controller.rb +2 -3
  108. data/app/controllers/decidim/messaging/conversations_controller.rb +2 -2
  109. data/app/controllers/decidim/newsletters_controller.rb +60 -0
  110. data/app/controllers/decidim/pages_controller.rb +1 -0
  111. data/app/controllers/decidim/profiles_controller.rb +23 -0
  112. data/app/controllers/decidim/scopes_controller.rb +19 -20
  113. data/app/events/decidim/profile_updated_event.rb +27 -0
  114. data/app/forms/decidim/account_form.rb +34 -0
  115. data/app/forms/decidim/form.rb +1 -0
  116. data/app/forms/decidim/messaging/conversation_form.rb +5 -2
  117. data/app/forms/decidim/omniauth_registration_form.rb +5 -0
  118. data/app/forms/decidim/registration_form.rb +8 -1
  119. data/app/helpers/decidim/action_authorization_helper.rb +2 -2
  120. data/app/helpers/decidim/application_helper.rb +8 -0
  121. data/app/helpers/decidim/feature_path_helper.rb +12 -2
  122. data/app/helpers/decidim/feature_reference_helper.rb +1 -1
  123. data/app/helpers/decidim/messaging/conversation_helper.rb +27 -9
  124. data/app/helpers/decidim/newsletters_helper.rb +49 -0
  125. data/app/helpers/decidim/scopes_helper.rb +43 -2
  126. data/app/helpers/decidim/translations_helper.rb +6 -2
  127. data/app/mailers/decidim/decidim_devise_mailer.rb +1 -3
  128. data/app/mailers/decidim/messaging/conversation_mailer.rb +1 -1
  129. data/app/mailers/decidim/newsletter_mailer.rb +7 -8
  130. data/app/models/decidim/abilities/everyone_ability.rb +1 -0
  131. data/app/models/decidim/authorization.rb +19 -5
  132. data/app/models/decidim/impersonation_log.rb +2 -1
  133. data/app/models/decidim/messaging/conversation.rb +2 -0
  134. data/app/models/decidim/messaging/message.rb +4 -0
  135. data/app/models/decidim/organization.rb +1 -0
  136. data/app/models/decidim/scope.rb +10 -2
  137. data/app/models/decidim/user.rb +10 -2
  138. data/app/presenters/decidim/home_stats_presenter.rb +10 -4
  139. data/app/presenters/decidim/user_group_presenter.rb +28 -0
  140. data/app/presenters/decidim/user_presenter.rb +42 -0
  141. data/app/services/decidim/action_authorizer.rb +32 -68
  142. data/app/services/decidim/notification_generator_for_recipient.rb +8 -3
  143. data/app/uploaders/decidim/avatar_uploader.rb +2 -2
  144. data/app/views/decidim/account/delete.html.erb +1 -1
  145. data/app/views/decidim/account/show.html.erb +4 -1
  146. data/app/views/decidim/devise/invitations/edit.html.erb +2 -0
  147. data/app/views/decidim/devise/omniauth_registrations/new.html.erb +7 -1
  148. data/app/views/decidim/devise/registrations/new.html.erb +7 -1
  149. data/app/views/decidim/messaging/conversations/_message.html.erb +6 -12
  150. data/app/views/decidim/messaging/conversations/_reply.html.erb +1 -1
  151. data/app/views/decidim/messaging/conversations/index.html.erb +1 -1
  152. data/app/views/decidim/messaging/conversations/update.js.erb +1 -0
  153. data/app/views/decidim/newsletter_mailer/newsletter.html.erb +11 -0
  154. data/app/views/decidim/newsletters/show.html.erb +11 -0
  155. data/app/views/decidim/newsletters/unsubscribe.html.erb +4 -0
  156. data/app/views/decidim/notifications/_notification.html.erb +1 -1
  157. data/app/views/decidim/profiles/show.html.erb +64 -0
  158. data/app/views/decidim/scopes/_scopes_picker_input.html.erb +6 -0
  159. data/app/views/decidim/scopes/picker.html.erb +36 -0
  160. data/app/views/decidim/shared/_action_authorization_modal.html.erb +25 -51
  161. data/app/views/decidim/shared/_author.html.erb +21 -0
  162. data/app/views/decidim/shared/_author_reference.html.erb +12 -0
  163. data/app/views/layouts/decidim/_application.html.erb +1 -0
  164. data/app/views/layouts/decidim/_impersonation_warning.html.erb +1 -1
  165. data/app/views/layouts/decidim/_mailer_logo.html.erb +6 -1
  166. data/app/views/layouts/decidim/_omnipresent_banner.html.erb +14 -0
  167. data/app/views/layouts/decidim/_user_menu.html.erb +3 -0
  168. data/app/views/layouts/decidim/mailer.html.erb +16 -4
  169. data/app/views/layouts/decidim/widget.html.erb +14 -9
  170. data/app/views/pages/home.html.erb +2 -0
  171. data/app/views/pages/home/_highlighted_content_banner.html.erb +26 -0
  172. data/config/initializers/devise.rb +1 -3
  173. data/config/locales/ca.yml +67 -9
  174. data/config/locales/en.yml +65 -4
  175. data/config/locales/es.yml +74 -14
  176. data/config/locales/eu.yml +66 -4
  177. data/config/locales/fi.yml +87 -25
  178. data/config/locales/fr.yml +71 -9
  179. data/config/locales/gl.yml +493 -0
  180. data/config/locales/it.yml +79 -17
  181. data/config/locales/nl.yml +71 -9
  182. data/config/locales/pl.yml +66 -4
  183. data/config/locales/pt-BR.yml +493 -0
  184. data/config/locales/pt.yml +99 -37
  185. data/config/locales/ru.yml +85 -13
  186. data/config/locales/sv.yml +493 -0
  187. data/config/locales/uk.yml +78 -16
  188. data/config/routes.rb +11 -1
  189. data/db/migrate/20171212103803_create_unique_nicknames.rb +29 -0
  190. data/db/migrate/20180115090038_extend_user_profile.rb +8 -0
  191. data/db/migrate/20180123125308_add_enable_omnipresent_banner_to_decidim_organizations.rb +7 -0
  192. data/db/migrate/20180123125409_add_omnipresent_banner_title_to_decidim_organizations.rb +7 -0
  193. data/db/migrate/20180123125432_add_omnipresent_banner_short_description_to_decidim_organizations.rb +7 -0
  194. data/db/migrate/20180123125452_add_omnipresent_banner_url_to_decidim_organizations.rb +7 -0
  195. data/db/migrate/20180125063433_add_highlighted_content_banner_to_decidim_organizations.rb +13 -0
  196. data/db/seeds.rb +8 -2
  197. data/lib/decidim/abilities/participatory_process_role_ability.rb +1 -3
  198. data/lib/decidim/content_parsers.rb +8 -0
  199. data/lib/decidim/content_parsers/base_parser.rb +58 -0
  200. data/lib/decidim/content_parsers/user_parser.rb +46 -0
  201. data/lib/decidim/content_processor.rb +84 -0
  202. data/lib/decidim/content_renderers.rb +8 -0
  203. data/lib/decidim/content_renderers/base_renderer.rb +37 -0
  204. data/lib/decidim/content_renderers/user_renderer.rb +32 -0
  205. data/lib/decidim/core.rb +66 -1
  206. data/lib/decidim/core/api/author_interface.rb +3 -3
  207. data/lib/decidim/core/api/user_group_type.rb +10 -8
  208. data/lib/decidim/core/api/user_type.rb +13 -7
  209. data/lib/decidim/core/engine.rb +7 -5
  210. data/lib/decidim/core/test.rb +1 -1
  211. data/lib/decidim/core/test/factories.rb +21 -45
  212. data/lib/decidim/core/test/shared_examples/announcements_examples.rb +3 -2
  213. data/lib/decidim/core/test/shared_examples/comments_examples.rb +5 -2
  214. data/lib/decidim/core/test/shared_examples/scope_helper_examples.rb +40 -3
  215. data/lib/decidim/core/test/shared_examples/simple_event.rb +73 -0
  216. data/lib/decidim/core/version.rb +1 -1
  217. data/lib/decidim/events.rb +2 -0
  218. data/lib/decidim/events/author_event.rb +41 -0
  219. data/lib/decidim/events/base_event.rb +28 -3
  220. data/lib/decidim/events/email_event.rb +1 -1
  221. data/lib/decidim/events/notification_event.rb +1 -1
  222. data/lib/decidim/events/simple_event.rb +79 -0
  223. data/lib/decidim/filter_form_builder.rb +2 -3
  224. data/lib/decidim/form_builder.rb +39 -27
  225. data/lib/decidim/friendly_dates.rb +26 -0
  226. data/lib/decidim/has_feature.rb +1 -0
  227. data/lib/decidim/has_reference.rb +1 -1
  228. data/lib/decidim/i18n_exceptions.rb +1 -3
  229. data/lib/decidim/menu.rb +1 -1
  230. data/lib/decidim/newsletter_encryptor.rb +22 -0
  231. data/lib/decidim/nicknamizable.rb +56 -0
  232. data/lib/decidim/participable.rb +8 -0
  233. data/lib/decidim/participatory_space_manifest.rb +10 -1
  234. data/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.gl.js +13 -0
  235. data/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.pt-br.js +14 -0
  236. data/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.pt.js +5 -1
  237. data/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.ru.js +4 -1
  238. data/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.sv.js +14 -0
  239. data/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.uk.js +4 -1
  240. data/vendor/assets/javascripts/form_datepicker.js.es6 +4 -2
  241. data/vendor/assets/javascripts/foundation-datepicker.js +42 -26
  242. metadata +124 -84
  243. data/app/assets/javascripts/decidim/select2.field.js.es6 +0 -47
  244. data/app/assets/javascripts/decidim/select2.js.es6 +0 -11
  245. data/app/assets/stylesheets/decidim/editor.sass +0 -4
  246. data/app/assets/stylesheets/decidim/plugins/_select2.scss +0 -63
  247. data/app/helpers/decidim/datetime_helper.rb +0 -23
  248. data/app/queries/decidim/freetext_scopes.rb +0 -39
  249. data/lib/decidim/core/test/shared_examples/manage_moderations_examples.rb +0 -64
@@ -7,9 +7,6 @@ $comment-vote-down-color: $alert;
7
7
  $comment-nested-bg: $light-gray;
8
8
  $comment-nested-alt-bg: $white;
9
9
 
10
- $comment-highlight-bg: rgba($secondary,.15);
11
- $comment-pinned-bg: lighten($warning,45);
12
-
13
10
  $comment-form-bg: $light-gray;
14
11
 
15
12
  /* Comments */
@@ -29,26 +26,13 @@ $comment-form-bg: $light-gray;
29
26
  color: $muted;
30
27
  }
31
28
 
32
- .show-more--comment-thread{
33
- margin-top: -$card-margin-bottom / 2;
34
- margin-bottom: $card-margin-bottom;
35
- }
36
-
37
- .comment{
38
- &--highlight{
39
- background: $comment-highlight-bg !important;
40
- }
41
- &--pinned{
42
- background: $comment-pinned-bg !important;
43
- }
44
- }
45
-
46
29
  .comment__header{
47
30
  padding: $comment-padding;
48
31
  }
49
32
 
50
33
  .comment__content{
51
34
  padding: 0 $comment-padding;
35
+
52
36
  > :last-child{
53
37
  margin-bottom: 0;
54
38
  }
@@ -58,6 +42,7 @@ $comment-form-bg: $light-gray;
58
42
  .comment__additionalreply{
59
43
  padding: $comment-padding;
60
44
  font-size: 90%;
45
+
61
46
  @include clearfix;
62
47
  }
63
48
 
@@ -65,9 +50,11 @@ $comment-form-bg: $light-gray;
65
50
  background: $comment-nested-bg;
66
51
  margin: $comment-padding;
67
52
  padding-bottom: 1px;
53
+
68
54
  &.comment--nested--alt{
69
- background: $comment-nested-alt-bg;
55
+ background: $comment-nested-alt-bg;
70
56
  }
57
+
71
58
  &:first-of-type{
72
59
  margin-top: 0;
73
60
  }
@@ -81,42 +68,54 @@ $comment-form-bg: $light-gray;
81
68
  .comment__votes{
82
69
  float: right;
83
70
  }
71
+
84
72
  .comment__votes--up{
85
73
  color: $muted;
74
+
86
75
  .icon{
87
76
  color: $comment-vote-up-color;
88
77
  }
78
+
89
79
  &:hover,
90
80
  &.is-vote-selected{
91
- color: darken($comment-vote-up-color,10);
81
+ color: darken($comment-vote-up-color, 10);
82
+
92
83
  .icon{
93
84
  color: inherit;
94
85
  }
95
86
  }
87
+
96
88
  &.is-vote-notselected{
97
89
  color: $muted;
98
90
  opacity: .3;
91
+
99
92
  .icon{
100
93
  color: inherit;
101
94
  }
102
95
  }
103
96
  }
97
+
104
98
  .comment__votes--down{
105
99
  color: $muted;
106
100
  padding-left: .3rem;
101
+
107
102
  .icon{
108
103
  color: $comment-vote-down-color;
109
104
  }
105
+
110
106
  &:hover,
111
107
  &.is-vote-selected{
112
- color: darken($comment-vote-down-color,10);
108
+ color: darken($comment-vote-down-color, 10);
109
+
113
110
  .icon{
114
111
  color: inherit;
115
112
  }
116
113
  }
114
+
117
115
  &.is-vote-notselected{
118
116
  color: $muted;
119
117
  opacity: .3;
118
+
120
119
  .icon{
121
120
  color: inherit;
122
121
  }
@@ -128,6 +127,7 @@ $comment-form-bg: $light-gray;
128
127
  .add-comment{
129
128
  background: $comment-form-bg;
130
129
  padding: $comment-padding;
130
+
131
131
  .button{
132
132
  margin-bottom: 0;
133
133
  }
@@ -135,6 +135,7 @@ $comment-form-bg: $light-gray;
135
135
 
136
136
  .add-comment--reply{
137
137
  display: none;
138
+
138
139
  &.is-active{
139
140
  display: block;
140
141
  }
@@ -2,6 +2,7 @@
2
2
  background: $medium-gray;
3
3
  padding: .5em 1em;
4
4
  text-align: center;
5
+
5
6
  a{
6
7
  color: darken($anchor-color, 10%);
7
8
  }
@@ -9,12 +10,15 @@
9
10
 
10
11
  .cookie-warning__action{
11
12
  text-align: center;
13
+
12
14
  .button{
13
15
  margin: .5em 0;
14
16
  }
17
+
15
18
  @include breakpoint(mediumlarge){
16
19
  vertical-align: baseline;
17
20
  display: inline-block;
21
+
18
22
  .button{
19
23
  margin: 0 0 0 1em;
20
24
  }
@@ -0,0 +1,159 @@
1
+
2
+ .data-picker{
3
+ &.picker-single .picker-values div a,
4
+ .picker-prompt a{
5
+ background: white;
6
+ cursor: pointer;
7
+ display: block;
8
+ width: 100%;
9
+ margin-bottom: 1rem;
10
+ padding: .4rem .7rem;
11
+ border: 1px solid #e8e8e8;
12
+ border-radius: 4px;
13
+ box-shadow: inset 0 1px 2px rgba(26, 24, 29, .1);
14
+ -webkit-box-shadow: inset 0 1px 2px rgba(26, 24, 29, .1);
15
+ color: #1a181d;
16
+
17
+ &:active{
18
+ outline: none;
19
+ border: 1px solid #1a181d;
20
+ background-color: #fff;
21
+ box-shadow: 0 0 5px #adadad;
22
+ -webkit-box-shadow: 0 0 5px #adadad;
23
+ transition: border-color .25s ease-in-out, -webkit-box-shadow .5s;
24
+ -webkit-transition: border-color .25s ease-in-out, -webkit-box-shadow .5s;
25
+ }
26
+
27
+ &::after{
28
+ display: block;
29
+ width: 0;
30
+ height: 0;
31
+ border: inset 5px;
32
+ content: '';
33
+ border-right-width: 0;
34
+ border-color: transparent transparent transparent #1a181d;
35
+ float: right;
36
+ margin-top: 7px;
37
+ }
38
+ }
39
+
40
+ &.is-invalid-input.picker-single .picker-values div a,
41
+ &.is-invalid-input .picker-prompt a{
42
+ border-color: $alert-color;
43
+ background-color: #fdeeec;
44
+ }
45
+
46
+ &.picker-single .picker-values:not(:empty) + .picker-prompt{
47
+ display: none;
48
+ }
49
+
50
+ &.disabled.picker-single .picker-values div a,
51
+ &.disabled .picker-prompt a{
52
+ cursor: not-allowed;
53
+ background: #eee;
54
+
55
+ &:active{
56
+ border: inherit !important;
57
+ box-shadow: inherit !important;
58
+ -webkit-box-shadow: inherit !important;
59
+ transition: none !important;
60
+ -webkit-transition: none !important;
61
+ }
62
+ }
63
+
64
+ &.picker-multiple .picker-values{
65
+ div{
66
+ display: block;
67
+ margin: 0 0 2px;
68
+ font-size: .9rem;
69
+
70
+ input{
71
+ margin: 2px 8px 8px 2px;
72
+ vertical-align: top;
73
+ }
74
+ }
75
+ }
76
+ }
77
+
78
+ #data_picker-modal{
79
+ height: 90%;
80
+
81
+ .data_picker-modal-content{
82
+ display: flex;
83
+ flex-direction: column;
84
+ max-height: 100%;
85
+ min-height: 100%;
86
+
87
+ .picker-footer{
88
+ .buttons{
89
+ display: flex;
90
+ justify-content: center;
91
+ padding: 10px 0 50px; // bottom padding is needed to avoid hiding buttons on mobiles because of https://stackoverflow.com/questions/37112218/css3-100vh-not-constant-in-mobile-browser
92
+ }
93
+ }
94
+
95
+ .picker-content{
96
+ flex-grow: 10;
97
+ min-height: 100%;
98
+ max-height: 100%;
99
+ overflow: auto;
100
+
101
+ .picker-scrollable-content{
102
+ max-height: 100%;
103
+ overflow: auto;
104
+ }
105
+ }
106
+ }
107
+ }
108
+
109
+ .scope-picker{
110
+ ul{
111
+ margin-left: 0;
112
+
113
+ li{
114
+ list-style: none;
115
+ }
116
+ }
117
+
118
+ &.picker-header{
119
+ padding: 5px;
120
+
121
+ li:hover{
122
+ background: #ddd;
123
+ }
124
+
125
+ li ~ li a::before{
126
+ content: '';
127
+ width: 10px;
128
+ height: 2em;
129
+ float: left;
130
+ }
131
+
132
+ li:last-child a{
133
+ color: #333;
134
+ }
135
+
136
+ a{
137
+ display: block;
138
+ padding: 2px;
139
+ }
140
+ }
141
+
142
+ &.picker-content{
143
+ .picker-scrollable-content{
144
+ scroll-snap-type: mandatory;
145
+
146
+ a{
147
+ scroll-snap-coordinate: 0 0;
148
+ display: block;
149
+ border-top: 1px solid #ddd;
150
+ line-height: 1.5rem;
151
+ padding: 5px;
152
+
153
+ &:hover{
154
+ background: #ddd;
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }
@@ -1,15 +1,15 @@
1
1
  $calendar-bg-color: $white;
2
- $calendar-border: 1px solid rgba(0, 0, 0, 0.1);
3
- $calendar-border-color: rgba(0, 0, 0, 0.1);
2
+ $calendar-border: 1px solid rgba(0, 0, 0, .1);
3
+ $calendar-border-color: rgba(0, 0, 0, .1);
4
4
  $calendar-active-color: $primary-color;
5
5
  $calendar-bg-hover: $light-gray;
6
- $calendar-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
6
+ $calendar-shadow: 0 5px 10px rgba(0, 0, 0, .2);
7
7
  $calendar-color-old: $medium-gray;
8
8
  $calendar-color-disabled: $light-gray;
9
9
  $calendar-radius: $global-radius;
10
10
  $calendar-font-size: $global-font-size * .9;
11
11
 
12
- .datepicker {
12
+ .datepicker{
13
13
  display: none;
14
14
  position: absolute;
15
15
  padding: 4px;
@@ -17,7 +17,7 @@ $calendar-font-size: $global-font-size * .9;
17
17
  direction: ltr;
18
18
  }
19
19
 
20
- .datepicker.dropdown-menu {
20
+ .datepicker.dropdown-menu{
21
21
  position: absolute;
22
22
  top: 100%;
23
23
  left: 0;
@@ -35,21 +35,21 @@ $calendar-font-size: $global-font-size * .9;
35
35
  line-height: 18px;
36
36
  }
37
37
 
38
- .datepicker.dropdown-menu th {
38
+ .datepicker.dropdown-menu th{
39
39
  padding: 4px 5px;
40
40
  }
41
41
 
42
- .datepicker.dropdown-menu td {
42
+ .datepicker.dropdown-menu td{
43
43
  padding: 6px 9px;
44
44
  }
45
45
 
46
- .datepicker table {
46
+ .datepicker table{
47
47
  border: 0;
48
48
  margin: 0;
49
49
  width: auto;
50
50
  }
51
51
 
52
- .datepicker table tr td span {
52
+ .datepicker table tr td span{
53
53
  display: block;
54
54
  width: 23%;
55
55
  height: 54px;
@@ -59,7 +59,7 @@ $calendar-font-size: $global-font-size * .9;
59
59
  cursor: pointer;
60
60
  }
61
61
 
62
- .datepicker td {
62
+ .datepicker td{
63
63
  text-align: center;
64
64
  width: 20px;
65
65
  height: 20px;
@@ -71,7 +71,7 @@ $calendar-font-size: $global-font-size * .9;
71
71
  }
72
72
 
73
73
  .datepicker td.active.day,
74
- .datepicker td.active.year {
74
+ .datepicker td.active.year{
75
75
  background: $calendar-active-color;
76
76
  }
77
77
 
@@ -82,31 +82,31 @@ $calendar-font-size: $global-font-size * .9;
82
82
  .datepicker .month:hover,
83
83
  .datepicker .year:hover{
84
84
  background-color: $calendar-bg-hover;
85
+
85
86
  &.active{
86
87
  background: $calendar-active-color;
87
88
  }
88
89
  }
89
90
 
90
-
91
91
  .datepicker td.new,
92
- .datepicker td.old {
92
+ .datepicker td.old{
93
93
  color: $calendar-color-old;
94
94
  }
95
95
 
96
- .datepicker td span.active {
96
+ .datepicker td span.active{
97
97
  background: $calendar-active-color;
98
98
  }
99
99
 
100
- .datepicker td.day.disabled {
100
+ .datepicker td.day.disabled{
101
101
  color: $calendar-color-disabled;
102
102
  }
103
103
 
104
104
  .datepicker td span.month.disabled,
105
- .datepicker td span.year.disabled {
105
+ .datepicker td span.year.disabled{
106
106
  color: $calendar-color-disabled;
107
107
  }
108
108
 
109
- .datepicker th {
109
+ .datepicker th{
110
110
  text-align: center;
111
111
  width: 20px;
112
112
  height: 20px;
@@ -118,68 +118,68 @@ $calendar-font-size: $global-font-size * .9;
118
118
  }
119
119
 
120
120
  .datepicker th.active.day,
121
- .datepicker th.active.year {
121
+ .datepicker th.active.year{
122
122
  background: $calendar-active-color;
123
123
  }
124
124
 
125
- .datepicker th.date-switch {
125
+ .datepicker th.date-switch{
126
126
  width: 145px;
127
127
  }
128
128
 
129
- .datepicker th span.active {
129
+ .datepicker th span.active{
130
130
  background: $calendar-active-color;
131
131
  }
132
132
 
133
- .datepicker .cw {
133
+ .datepicker .cw{
134
134
  font-size: 10px;
135
135
  width: 12px;
136
136
  padding: 0 2px 0 5px;
137
137
  vertical-align: middle;
138
138
  }
139
139
 
140
- .datepicker.days div.datepicker-days {
140
+ .datepicker.days div.datepicker-days{
141
141
  display: block;
142
142
  }
143
143
 
144
- .datepicker.months div.datepicker-months {
144
+ .datepicker.months div.datepicker-months{
145
145
  display: block;
146
146
  }
147
147
 
148
- .datepicker.years div.datepicker-years {
148
+ .datepicker.years div.datepicker-years{
149
149
  display: block;
150
150
  }
151
151
 
152
- .datepicker thead tr:first-child th {
152
+ .datepicker thead tr:first-child th{
153
153
  cursor: pointer;
154
154
  }
155
155
 
156
- .datepicker thead tr:first-child th.cw {
156
+ .datepicker thead tr:first-child th.cw{
157
157
  cursor: default;
158
158
  background-color: transparent;
159
159
  }
160
160
 
161
- .datepicker tfoot tr:first-child th {
161
+ .datepicker tfoot tr:first-child th{
162
162
  cursor: pointer;
163
163
  }
164
164
 
165
- .datepicker-inline {
165
+ .datepicker-inline{
166
166
  width: 220px;
167
167
  }
168
168
 
169
- .datepicker-rtl {
169
+ .datepicker-rtl{
170
170
  direction: rtl;
171
171
  }
172
172
 
173
- .datepicker-rtl table tr td span {
173
+ .datepicker-rtl table tr td span{
174
174
  float: right;
175
175
  }
176
176
 
177
- .datepicker-dropdown {
177
+ .datepicker-dropdown{
178
178
  top: 0;
179
179
  left: 0;
180
180
  }
181
181
 
182
- .datepicker-dropdown:before {
182
+ .datepicker-dropdown::before{
183
183
  content: '';
184
184
  display: inline-block;
185
185
  border-left: 7px solid transparent;
@@ -191,7 +191,7 @@ $calendar-font-size: $global-font-size * .9;
191
191
  left: 6px;
192
192
  }
193
193
 
194
- .datepicker-dropdown:after {
194
+ .datepicker-dropdown::after{
195
195
  content: '';
196
196
  display: inline-block;
197
197
  border-left: 6px solid transparent;
@@ -204,11 +204,11 @@ $calendar-font-size: $global-font-size * .9;
204
204
 
205
205
  .datepicker > div,
206
206
  .datepicker-dropdown::after,
207
- .datepicker-dropdown::before {
207
+ .datepicker-dropdown::before{
208
208
  display: none;
209
209
  }
210
210
 
211
- .datepicker-close {
211
+ .datepicker-close{
212
212
  position: absolute;
213
213
  top: -30px;
214
214
  right: 0;
@@ -219,6 +219,6 @@ $calendar-font-size: $global-font-size * .9;
219
219
  }
220
220
 
221
221
  .table-striped .datepicker table tr td,
222
- .table-striped .datepicker table tr th {
222
+ .table-striped .datepicker table tr th{
223
223
  background-color: transparent;
224
224
  }