alchemy_cms 4.0.0.beta → 4.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (205) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +4 -7
  3. data/CHANGELOG.md +23 -0
  4. data/README.md +1 -1
  5. data/alchemy_cms.gemspec +1 -1
  6. data/app/assets/javascripts/alchemy/alchemy.dragndrop.js.coffee +2 -2
  7. data/app/assets/stylesheets/alchemy/_extends.scss +3 -5
  8. data/app/assets/stylesheets/alchemy/_mixins.scss +1 -1
  9. data/app/assets/stylesheets/alchemy/base.scss +2 -2
  10. data/app/assets/stylesheets/alchemy/buttons.scss +2 -2
  11. data/app/assets/stylesheets/alchemy/dialogs.scss +3 -3
  12. data/app/assets/stylesheets/alchemy/elements.scss +2 -2
  13. data/app/assets/stylesheets/alchemy/image_library.scss +10 -10
  14. data/app/assets/stylesheets/alchemy/jquery.datetimepicker.scss +2 -2
  15. data/app/assets/stylesheets/alchemy/lists.scss +2 -1
  16. data/app/assets/stylesheets/alchemy/sitemap.scss +1 -16
  17. data/app/assets/stylesheets/alchemy/tables.scss +1 -1
  18. data/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss +4 -4
  19. data/app/controllers/alchemy/admin/attachments_controller.rb +10 -10
  20. data/app/controllers/alchemy/admin/base_controller.rb +10 -19
  21. data/app/controllers/alchemy/admin/clipboard_controller.rb +20 -7
  22. data/app/controllers/alchemy/admin/contents_controller.rb +5 -19
  23. data/app/controllers/alchemy/admin/dashboard_controller.rb +5 -3
  24. data/app/controllers/alchemy/admin/elements_controller.rb +7 -1
  25. data/app/controllers/alchemy/admin/essence_files_controller.rb +2 -2
  26. data/app/controllers/alchemy/admin/essence_pictures_controller.rb +8 -13
  27. data/app/controllers/alchemy/admin/languages_controller.rb +2 -0
  28. data/app/controllers/alchemy/admin/layoutpages_controller.rb +2 -0
  29. data/app/controllers/alchemy/admin/legacy_page_urls_controller.rb +2 -0
  30. data/app/controllers/alchemy/admin/pages_controller.rb +3 -1
  31. data/app/controllers/alchemy/admin/pictures_controller.rb +11 -9
  32. data/app/controllers/alchemy/admin/resources_controller.rb +25 -4
  33. data/app/controllers/alchemy/admin/sites_controller.rb +2 -0
  34. data/app/controllers/alchemy/admin/tags_controller.rb +2 -0
  35. data/app/controllers/alchemy/admin/trash_controller.rb +2 -0
  36. data/app/controllers/alchemy/api/base_controller.rb +2 -0
  37. data/app/controllers/alchemy/api/contents_controller.rb +2 -0
  38. data/app/controllers/alchemy/api/elements_controller.rb +2 -0
  39. data/app/controllers/alchemy/api/pages_controller.rb +2 -0
  40. data/app/controllers/alchemy/attachments_controller.rb +2 -0
  41. data/app/controllers/alchemy/base_controller.rb +3 -1
  42. data/app/controllers/alchemy/elements_controller.rb +2 -0
  43. data/app/controllers/alchemy/messages_controller.rb +2 -0
  44. data/app/controllers/alchemy/pages_controller.rb +11 -2
  45. data/app/controllers/concerns/alchemy/admin/uploader_responses.rb +2 -0
  46. data/app/controllers/concerns/alchemy/legacy_page_redirects.rb +2 -0
  47. data/app/controllers/concerns/alchemy/locale_redirects.rb +2 -0
  48. data/app/controllers/concerns/alchemy/page_redirects.rb +2 -0
  49. data/app/controllers/concerns/alchemy/site_redirects.rb +2 -0
  50. data/app/helpers/alchemy/admin/attachments_helper.rb +2 -0
  51. data/app/helpers/alchemy/admin/base_helper.rb +2 -28
  52. data/app/helpers/alchemy/admin/contents_helper.rb +2 -0
  53. data/app/helpers/alchemy/admin/elements_helper.rb +2 -0
  54. data/app/helpers/alchemy/admin/essences_helper.rb +2 -0
  55. data/app/helpers/alchemy/admin/form_helper.rb +2 -0
  56. data/app/helpers/alchemy/admin/navigation_helper.rb +2 -0
  57. data/app/helpers/alchemy/admin/pages_helper.rb +2 -0
  58. data/app/helpers/alchemy/admin/pictures_helper.rb +2 -0
  59. data/app/helpers/alchemy/admin/tags_helper.rb +24 -76
  60. data/app/helpers/alchemy/base_helper.rb +2 -0
  61. data/app/helpers/alchemy/deprecated_pages_helper.rb +2 -0
  62. data/app/helpers/alchemy/elements_block_helper.rb +2 -0
  63. data/app/helpers/alchemy/elements_helper.rb +2 -0
  64. data/app/helpers/alchemy/essences_helper.rb +2 -0
  65. data/app/helpers/alchemy/pages_helper.rb +2 -0
  66. data/app/helpers/alchemy/url_helper.rb +2 -0
  67. data/app/mailers/alchemy/base_mailer.rb +2 -0
  68. data/app/mailers/alchemy/messages_mailer.rb +2 -0
  69. data/app/models/alchemy.rb +2 -0
  70. data/app/models/alchemy/attachment.rb +6 -4
  71. data/app/models/alchemy/cell.rb +4 -2
  72. data/app/models/alchemy/content.rb +7 -5
  73. data/app/models/alchemy/content/factory.rb +7 -7
  74. data/app/models/alchemy/element.rb +21 -28
  75. data/app/models/alchemy/element/definitions.rb +4 -2
  76. data/app/models/alchemy/element/element_contents.rb +3 -1
  77. data/app/models/alchemy/element/element_essences.rb +2 -0
  78. data/app/models/alchemy/element/presenters.rb +2 -0
  79. data/app/models/alchemy/element_to_page.rb +2 -0
  80. data/app/models/alchemy/essence_boolean.rb +2 -0
  81. data/app/models/alchemy/essence_date.rb +2 -0
  82. data/app/models/alchemy/essence_file.rb +2 -0
  83. data/app/models/alchemy/essence_html.rb +2 -0
  84. data/app/models/alchemy/essence_link.rb +6 -4
  85. data/app/models/alchemy/essence_picture.rb +13 -11
  86. data/app/models/alchemy/essence_picture_view.rb +2 -0
  87. data/app/models/alchemy/essence_richtext.rb +2 -0
  88. data/app/models/alchemy/essence_select.rb +3 -1
  89. data/app/models/alchemy/essence_text.rb +6 -4
  90. data/app/models/alchemy/folded_page.rb +4 -2
  91. data/app/models/alchemy/language.rb +9 -6
  92. data/app/models/alchemy/language/code.rb +2 -0
  93. data/app/models/alchemy/legacy_page_url.rb +3 -1
  94. data/app/models/alchemy/message.rb +2 -0
  95. data/app/models/alchemy/page.rb +3 -2
  96. data/app/models/alchemy/page/fixed_attributes.rb +2 -0
  97. data/app/models/alchemy/page/page_cells.rb +2 -0
  98. data/app/models/alchemy/page/page_elements.rb +3 -1
  99. data/app/models/alchemy/page/page_naming.rb +2 -0
  100. data/app/models/alchemy/page/page_natures.rb +2 -1
  101. data/app/models/alchemy/page/page_scopes.rb +2 -0
  102. data/app/models/alchemy/page/page_users.rb +2 -0
  103. data/app/models/alchemy/picture.rb +2 -0
  104. data/app/models/alchemy/picture/transformations.rb +2 -0
  105. data/app/models/alchemy/picture/url.rb +2 -0
  106. data/app/models/alchemy/site.rb +4 -2
  107. data/app/models/alchemy/site/layout.rb +2 -0
  108. data/app/models/alchemy/tag.rb +5 -2
  109. data/app/models/alchemy/tree_node.rb +2 -0
  110. data/app/serializers/alchemy/attachment_serializer.rb +2 -0
  111. data/app/serializers/alchemy/base_serializer.rb +2 -0
  112. data/app/serializers/alchemy/cell_serializer.rb +2 -0
  113. data/app/serializers/alchemy/content_serializer.rb +2 -0
  114. data/app/serializers/alchemy/element_serializer.rb +2 -0
  115. data/app/serializers/alchemy/essence_boolean_serializer.rb +2 -0
  116. data/app/serializers/alchemy/essence_date_serializer.rb +2 -0
  117. data/app/serializers/alchemy/essence_file_serializer.rb +2 -0
  118. data/app/serializers/alchemy/essence_html_serializer.rb +2 -0
  119. data/app/serializers/alchemy/essence_link_serializer.rb +2 -0
  120. data/app/serializers/alchemy/essence_picture_serializer.rb +2 -0
  121. data/app/serializers/alchemy/essence_richtext_serializer.rb +2 -0
  122. data/app/serializers/alchemy/essence_select_serializer.rb +2 -0
  123. data/app/serializers/alchemy/essence_text_serializer.rb +2 -0
  124. data/app/serializers/alchemy/legacy_element_serializer.rb +2 -0
  125. data/app/serializers/alchemy/page_serializer.rb +2 -0
  126. data/app/serializers/alchemy/page_tree_serializer.rb +2 -0
  127. data/app/serializers/alchemy/picture_serializer.rb +2 -0
  128. data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +1 -1
  129. data/app/views/alchemy/admin/attachments/_file_to_assign.html.erb +1 -1
  130. data/app/views/alchemy/admin/attachments/_filter_bar.html.erb +1 -3
  131. data/app/views/alchemy/admin/attachments/_tag_list.html.erb +1 -1
  132. data/app/views/alchemy/admin/contents/_missing.html.erb +1 -1
  133. data/app/views/alchemy/admin/contents/create.js.erb +9 -13
  134. data/app/views/alchemy/admin/contents/new.html.erb +1 -1
  135. data/app/views/alchemy/admin/elements/_picture_gallery_editor.html.erb +4 -4
  136. data/app/views/alchemy/admin/essence_files/assign.js.erb +1 -1
  137. data/app/views/alchemy/admin/essence_pictures/assign.js.erb +1 -1
  138. data/app/views/alchemy/admin/essence_pictures/crop.html.erb +1 -1
  139. data/app/views/alchemy/admin/essence_pictures/destroy.js.erb +10 -7
  140. data/app/views/alchemy/admin/essence_pictures/edit.html.erb +8 -6
  141. data/app/views/alchemy/admin/essence_pictures/update.js.erb +1 -1
  142. data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +2 -2
  143. data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +4 -4
  144. data/app/views/alchemy/admin/pictures/_filter_bar.html.erb +1 -3
  145. data/app/views/alchemy/admin/pictures/_overlay_picture_list.html.erb +1 -1
  146. data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +1 -1
  147. data/app/views/alchemy/admin/pictures/_tag_list.html.erb +1 -1
  148. data/app/views/alchemy/admin/resources/_filter_bar.html.erb +1 -3
  149. data/app/views/alchemy/admin/resources/_tag_list.html.erb +1 -1
  150. data/app/views/alchemy/admin/uploader/_button.html.erb +1 -1
  151. data/app/views/alchemy/essences/_essence_file_editor.html.erb +2 -2
  152. data/app/views/alchemy/essences/_essence_picture_editor.html.erb +2 -2
  153. data/app/views/alchemy/essences/shared/_essence_picture_tools.html.erb +3 -3
  154. data/app/views/alchemy/navigation/_renderer.html.erb +1 -2
  155. data/config/brakeman.ignore +65 -0
  156. data/db/migrate/20130827094554_alchemy_two_point_six.rb +1 -1
  157. data/db/migrate/20130828121054_remove_do_not_index_from_alchemy_essence_texts.rb +1 -1
  158. data/db/migrate/20130828121120_remove_do_not_index_from_alchemy_essence_richtexts.rb +1 -1
  159. data/db/migrate/20130918201742_add_published_at_to_alchemy_pages.rb +1 -1
  160. data/db/migrate/20150608204610_add_parent_element_id_to_alchemy_elements.rb +1 -1
  161. data/db/migrate/20150729151825_add_link_text_to_alchemy_essence_files.rb +1 -1
  162. data/db/migrate/20150906195818_add_locale_to_alchemy_languages.rb +1 -1
  163. data/db/migrate/20160108174834_add_timebased_publishing_columns_to_pages.rb +1 -1
  164. data/db/migrate/20160422195310_add_image_file_format_to_alchemy_pictures.rb +1 -1
  165. data/db/migrate/20160617224938_change_alchemy_pages_locked_to_locked_at.rb +1 -1
  166. data/db/migrate/20160912223112_add_index_to_alchemy_pages_rgt.rb +1 -1
  167. data/db/migrate/20160927205604_add_foreign_key_indices_and_null_constraints.rb +1 -1
  168. data/db/migrate/20160928080104_add_foreign_keys.rb +1 -1
  169. data/lib/alchemy/ability_helper.rb +2 -0
  170. data/lib/alchemy/admin/locale.rb +2 -0
  171. data/lib/alchemy/auth_accessors.rb +2 -0
  172. data/lib/alchemy/cache_digests/template_tracker.rb +2 -0
  173. data/lib/alchemy/config.rb +2 -0
  174. data/lib/alchemy/configuration_methods.rb +2 -0
  175. data/lib/alchemy/controller_actions.rb +2 -0
  176. data/lib/alchemy/deprecation.rb +3 -0
  177. data/lib/alchemy/errors.rb +2 -0
  178. data/lib/alchemy/essence.rb +2 -0
  179. data/lib/alchemy/filetypes.rb +2 -0
  180. data/lib/alchemy/forms/builder.rb +2 -0
  181. data/lib/alchemy/hints.rb +2 -0
  182. data/lib/alchemy/i18n.rb +2 -0
  183. data/lib/alchemy/logger.rb +2 -0
  184. data/lib/alchemy/modules.rb +2 -0
  185. data/lib/alchemy/name_conversions.rb +2 -0
  186. data/lib/alchemy/on_page_layout.rb +2 -0
  187. data/lib/alchemy/on_page_layout/callbacks_runner.rb +2 -0
  188. data/lib/alchemy/page_layout.rb +3 -1
  189. data/lib/alchemy/paths.rb +2 -0
  190. data/lib/alchemy/permissions.rb +2 -0
  191. data/lib/alchemy/picture_attributes.rb +2 -0
  192. data/lib/alchemy/resource.rb +2 -0
  193. data/lib/alchemy/resources_helper.rb +14 -12
  194. data/lib/alchemy/routing_constraints.rb +2 -0
  195. data/lib/alchemy/ssl_protection.rb +2 -0
  196. data/lib/alchemy/test_support/controller_requests.rb +20 -0
  197. data/lib/alchemy/test_support/essence_shared_examples.rb +3 -21
  198. data/lib/alchemy/tinymce.rb +2 -0
  199. data/lib/alchemy/touching.rb +2 -0
  200. data/lib/alchemy/upgrader/three_point_four.rb +20 -3
  201. data/lib/alchemy/userstamp.rb +2 -0
  202. data/lib/alchemy/version.rb +3 -1
  203. data/lib/alchemy_cms.rb +1 -0
  204. data/lib/tasks/alchemy/upgrade.rake +5 -1
  205. metadata +7 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fea49a75834c1e4de115b939c2fd04639ca77174
4
- data.tar.gz: e4c83f37c9a929cfa9044d8d6a022cf3b0e5947d
3
+ metadata.gz: 8546e849610240faac00b1a77f937ea2514d97a0
4
+ data.tar.gz: e81fd54feadee4000618c71b6a3a424695647dc8
5
5
  SHA512:
6
- metadata.gz: a41485fcb8985472b02ba15ab4e9cadde62d74aa1623f8e4280e13f38fcc6bac2ad88f8d885aefffb8a49f8ffee3aba5264652260cb2496b587df24bec5607ef
7
- data.tar.gz: aa3e7483fc33c9ae6bc502958ba65173d3d17df086b1a0eb377627daac908c35bea8e4a65fc2667cfb0a739c0aa74a4228c2f4d2a64504060fcd602d7ed73226
6
+ metadata.gz: 350b2a2ba22bec1183a4fd76d25d4de7f2e6e564d0cc51a7eb064a5e3f5c572406294e858e5010838760228024623aee4a662dc7778514a49c5c127d050a7637
7
+ data.tar.gz: 92088cb21c0643a53d87115521ca377d8dd2993dcf25737828fda5397111da952eb5804d9bcd6786973f0be4613058ead98c6cd145b3ff91224d3caeee049d9e
@@ -1,17 +1,14 @@
1
1
  language: ruby
2
+ dist: trusty
2
3
  sudo: false
3
4
  cache:
4
5
  bundler: true
5
6
  directories:
6
7
  - "travis_phantomjs"
7
8
  rvm:
8
- - 2.2.6
9
- - 2.3.3
10
- - 2.4.0
11
- branches:
12
- only:
13
- - master
14
-
9
+ - 2.2.7
10
+ - 2.3.4
11
+ - 2.4.1
15
12
  before_install:
16
13
  - "phantomjs --version"
17
14
  - "export PATH=$PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH"
@@ -1,9 +1,32 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.0.0.rc1 (2017-0817)
4
+
5
+ * Removed `merge_params` from `Alchemy::Admin::BaseHelper`
6
+ Use `ActionController::Parameters#merge` instead
7
+ * Removed `merge_params_only` from `Alchemy::Admin::BaseHelper`
8
+ Use methods from `ActionController::Parameters` instead
9
+ * Removed `merge_params_without` from `Alchemy::Admin::BaseHelper`
10
+ Use `ActionController::Parameters#delete_if` instead
11
+ * Removed `tag_list_tag_active?` from `Alchemy::Admin::TagsHelper`
12
+ Use `filtered_by_tag?` instead
13
+ * Removed `add_to_tag_filter` and `remove_from_tag_filter` from `Alchemy::Admin::TagsHelper`
14
+ Use `tags_for_filter` and pass the `current` tag instead
15
+ * Removes the possibility to pass options param as JSON string. [#1291](https://github.com/AlchemyCMS/alchemy_cms/pull/1291) by [tvdeyen](https://github.com/tvdeyen)
16
+ Pass normal params instead.
17
+ * Removed `redirect_back_or_to_default` from `Alchemy::Admin::BaseController`
18
+ Use Rails' `redirect_back` with a `fallback_location` instead
19
+ * Deprecated controller requests test helpers [#1284](https://github.com/AlchemyCMS/alchemy_cms/pull/1284) by [tvdeyen](https://github.com/tvdeyen)
20
+
3
21
  ## 4.0.0.beta (2017-06-20)
4
22
 
5
23
  * Rails 5
6
24
 
25
+ ## 3.6.1 (2017-08-16)
26
+
27
+ * Do not ask `systempage?` everytime we load the page definition [#1239](https://github.com/AlchemyCMS/alchemy_cms/pull/1283) by [tvdeyen](https://github.com/tvdeyen)
28
+ This speeds up rendering large sitemaps by about 6 times.
29
+
7
30
  ## 3.6.0 (2017-06-20)
8
31
 
9
32
  __Notable Changes__
data/README.md CHANGED
@@ -188,7 +188,7 @@ something like S3.
188
188
 
189
189
  Please follow the guidelines about picture caching on the Dragonfly homepage for further instructions:
190
190
 
191
- http://markevans.github.io/dragonfly/cache/
191
+ http://markevans.github.io/dragonfly/cache
192
192
 
193
193
 
194
194
  ## Upgrading
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
20
20
 
21
21
  gem.add_runtime_dependency 'active_model_serializers', ['~> 0.9.0']
22
22
  gem.add_runtime_dependency 'acts_as_list', ['~> 0.3']
23
- gem.add_runtime_dependency 'acts-as-taggable-on', ['~> 4.0']
23
+ gem.add_runtime_dependency 'acts-as-taggable-on', ['~> 5.0']
24
24
  gem.add_runtime_dependency 'awesome_nested_set', ['~> 3.1']
25
25
  gem.add_runtime_dependency 'bourbon', ['~> 4.2']
26
26
  gem.add_runtime_dependency 'cancancan', ['~> 1.9']
@@ -79,14 +79,14 @@ $.extend Alchemy,
79
79
 
80
80
  SortableContents: (selector, token) ->
81
81
  $(selector).sortable
82
- items: "div.dragable_picture"
82
+ items: "div.draggable_picture"
83
83
  handle: "div.picture_handle"
84
84
  opacity: 0.5
85
85
  cursor: "move"
86
86
  tolerance: "pointer"
87
87
  containment: "parent"
88
88
  update: (event, ui) ->
89
- ids = $.map $(this).children("div.dragable_picture"), (child) ->
89
+ ids = $.map $(this).children("div.draggable_picture"), (child) ->
90
90
  child.id.replace /essence_picture_/, ""
91
91
  $(event.originalTarget).css "cursor", "progress"
92
92
  $.ajax
@@ -48,11 +48,9 @@
48
48
  font-size: 12px;
49
49
  line-height: 12px;
50
50
  height: $default-form-field-height;
51
- @include transition(
52
- box-shadow 0.25s ease-in-out,
53
- background-color 0.25s ease-in-out,
54
- border 0.25s ease-in-out
55
- );
51
+ transition-property: box-shadow, background-color, border;
52
+ transition-duration: 0.25s;
53
+ transition-timing-function: ease-in-out;
56
54
 
57
55
  &:focus {
58
56
  @extend %blue-focus-style;
@@ -27,7 +27,7 @@
27
27
  color: $text-color;
28
28
  text-shadow: $button-text-shadow;
29
29
  margin: $margin;
30
- @include appearance(none);
30
+ -webkit-appearance: none;
31
31
 
32
32
  &:hover {
33
33
  text-decoration: none;
@@ -157,7 +157,7 @@ kbd {
157
157
  }
158
158
 
159
159
  .disable-user-select {
160
- @include user-select(none);
160
+ user-select: none;
161
161
  }
162
162
 
163
163
  .border-box-sizing {
@@ -516,7 +516,7 @@ div.browse {
516
516
  border: 0 none;
517
517
  background: #fff;
518
518
  border-right: $default-border;
519
- @include transition(200ms ease-in-out);
519
+ transition: 200ms ease-in-out;
520
520
 
521
521
  .collapsed-menu & {
522
522
  left: $collapsed-main-menu-width;
@@ -28,7 +28,7 @@ button, input[type="submit"], a.button, input.button {
28
28
  padding: 0;
29
29
  border: 0 none;
30
30
  box-shadow: none;
31
- @include background(none);
31
+ background: none;
32
32
  border-radius: 0;
33
33
 
34
34
  .icon {
@@ -92,7 +92,7 @@ button, input[type="submit"], a.button, input.button {
92
92
  position: absolute;
93
93
  top: 50%;
94
94
  height: 8px;
95
- @include transform(translateX(-50%) translateY(-50%));
95
+ transform: translateX(-50%) translateY(-50%);
96
96
 
97
97
  &:before {
98
98
  line-height: 10px;
@@ -10,7 +10,7 @@
10
10
  text-align: center;
11
11
  white-space: nowrap;
12
12
  opacity: 0;
13
- @include transition(opacity 200ms linear);
13
+ transition: opacity 200ms linear;
14
14
 
15
15
  // vertical aligment
16
16
  &:before {
@@ -36,7 +36,7 @@
36
36
  width: 100%;
37
37
  height: 100%;
38
38
  background-color: rgba(0, 0, 0, 0.0);
39
- @include transition(background-color 200ms linear);
39
+ transition: background-color 200ms linear;
40
40
 
41
41
  &.closable {
42
42
  cursor: pointer;
@@ -65,7 +65,7 @@
65
65
  margin: 2*$default-margin;
66
66
  @include border-top-radius($default-border-radius);
67
67
  box-shadow: 0 0 2px rgba(#000,0.8);
68
- @include transition(min-height 200ms ease-in-out);
68
+ transition: min-height 200ms ease-in-out;
69
69
 
70
70
  &.modal {
71
71
  box-shadow: 0 0 4px #666;
@@ -6,7 +6,7 @@
6
6
  width: 400px;
7
7
  height: auto;
8
8
  border-left: $default-border;
9
- @include transition(200ms ease-in-out);
9
+ transition: 200ms ease-in-out;
10
10
  }
11
11
 
12
12
  #element_area {
@@ -484,7 +484,7 @@
484
484
  }
485
485
  }
486
486
 
487
- .dragable_picture {
487
+ .draggable_picture {
488
488
  float: left;
489
489
 
490
490
  .picture_handle {
@@ -42,7 +42,7 @@ $image-overlay-transition-easing: ease-in;
42
42
  right: 0;
43
43
 
44
44
  .icon-angle-double-right {
45
- @include transform(rotate(180deg) translate(50%, 50%));
45
+ transform: rotate(180deg) translate(50%, 50%);
46
46
  }
47
47
  }
48
48
  }
@@ -64,13 +64,13 @@ $image-overlay-transition-easing: ease-in;
64
64
  top: 2*$default-padding;
65
65
  right: 2*$default-padding + $picture-overlay-handle-width + $image-overlay-form-width;
66
66
  cursor: pointer;
67
- @include transition(right $image-overlay-transition-duration $image-overlay-transition-easing);
67
+ transition: right $image-overlay-transition-duration $image-overlay-transition-easing;
68
68
 
69
69
  .icon.close.small {
70
70
  font-size: 32px;
71
71
  color: $medium-gray;
72
72
  text-shadow: 0 0 $default-padding $text-color;
73
- @include transition(color $image-overlay-transition-duration linear);
73
+ transition: color $image-overlay-transition-duration linear;
74
74
 
75
75
  &:hover {
76
76
  color: $white;
@@ -84,7 +84,7 @@ $image-overlay-transition-easing: ease-in;
84
84
  top: 0;
85
85
  background-color: $medium-gray;
86
86
  box-shadow: -2px 0 $default-padding -2px $text-color;
87
- @include transition(right $image-overlay-transition-duration $image-overlay-transition-easing);
87
+ transition: right $image-overlay-transition-duration $image-overlay-transition-easing;
88
88
  }
89
89
 
90
90
  .picture-details-overlay {
@@ -126,10 +126,10 @@ $image-overlay-transition-easing: ease-in;
126
126
  position: absolute;
127
127
  top: 50%;
128
128
  left: 50%;
129
- @include transform(translate(-50%, -50%));
129
+ transform: translate(-50%, -50%);
130
130
  font-size: 14px;
131
131
  color: $text-color;
132
- @include transition(transform $image-overlay-transition-duration $image-overlay-transition-easing);
132
+ transition: transform $image-overlay-transition-duration $image-overlay-transition-easing;
133
133
  }
134
134
 
135
135
  &:hover {
@@ -148,7 +148,7 @@ $image-overlay-transition-easing: ease-in;
148
148
  margin: 0 auto;
149
149
  text-align: center;
150
150
  cursor: pointer;
151
- @include transition(padding-right $image-overlay-transition-duration $image-overlay-transition-easing);
151
+ transition: padding-right $image-overlay-transition-duration $image-overlay-transition-easing;
152
152
 
153
153
  &:before {
154
154
  content: '';
@@ -222,7 +222,7 @@ $image-overlay-transition-easing: ease-in;
222
222
  cursor: pointer;
223
223
  text-align: center;
224
224
  text-decoration: none;
225
- @include transition(background-color $image-overlay-transition-duration linear);
225
+ transition: background-color $image-overlay-transition-duration linear;
226
226
 
227
227
  &:hover {
228
228
  background-color: rgba(0,0,0, 0.3);
@@ -240,7 +240,7 @@ $image-overlay-transition-easing: ease-in;
240
240
  font-size: 48px;
241
241
  color: $medium-gray;
242
242
  text-shadow: 0 0 $default-padding $text-color;
243
- @include transition(all $image-overlay-transition-duration linear);
243
+ transition: all $image-overlay-transition-duration linear;
244
244
  }
245
245
 
246
246
  .previous-picture {
@@ -251,6 +251,6 @@ $image-overlay-transition-easing: ease-in;
251
251
  .next-picture {
252
252
  right: $image-overlay-form-width + $picture-overlay-handle-width;
253
253
  @include border-left-radius($default-border-radius);
254
- @include transition(right $image-overlay-transition-duration $image-overlay-transition-easing);
254
+ transition: right $image-overlay-transition-duration $image-overlay-transition-easing;
255
255
  }
256
256
  }
@@ -498,10 +498,10 @@ $datepicker_day_color: $text-color !default;
498
498
  position: relative;
499
499
  padding: 4px 17px 4px 33px;
500
500
  border: 1px solid #d7d8da;
501
- @include background(linear-gradient(top, #fff 0%, #f4f8fa 73%));
501
+ background: linear-gradient(#fff, #f4f8fa 73%);
502
502
  }
503
503
 
504
504
  .xdsoft_datetimepicker .blue-gradient-button:hover, .xdsoft_datetimepicker .blue-gradient-button:focus, .xdsoft_datetimepicker .blue-gradient-button:hover span, .xdsoft_datetimepicker .blue-gradient-button:focus span {
505
505
  color: #454551;
506
- @include background(linear-gradient(top, #f4f8fa 0%, #FFF 73%));
506
+ background: linear-gradient(#f4f8fa, #fff 73%);
507
507
  }
@@ -20,7 +20,8 @@ ul.list {
20
20
  display: block;
21
21
  margin-bottom: 0;
22
22
 
23
- &.legend, &.list-header {
23
+ &.list-header {
24
+ overflow: hidden;
24
25
  background-color: transparent;
25
26
  font-weight: bold;
26
27
  padding: $default-padding;
@@ -29,7 +29,7 @@
29
29
  display: block;
30
30
  padding: 0 3*$default-padding;
31
31
  text-decoration: none;
32
- @include transition(background-color, 400ms);
32
+ transition: background-color, 400ms;
33
33
 
34
34
  &.inactive {
35
35
  color: #656565;
@@ -142,21 +142,6 @@
142
142
  }
143
143
 
144
144
  ul#sitemap {
145
-
146
- li.legend {
147
-
148
- span.right {
149
- margin-right: 52px;
150
-
151
- span.page_move {
152
- display: inline-block;
153
- vertical-align: middle;
154
- width: 74px;
155
- text-align: center;
156
- }
157
- }
158
- }
159
-
160
145
  .page_folder {
161
146
  @extend .icon;
162
147
  position: absolute;
@@ -39,7 +39,7 @@ table {
39
39
  left: 0;
40
40
  width: 100%;
41
41
  height: 4px;
42
- @include background(linear-gradient(top, $light-gray 0%, rgba($light-gray, .0) 100%));
42
+ background: linear-gradient($light-gray, rgba($light-gray, .0));
43
43
  content: '';
44
44
  }
45
45
  }
@@ -33,7 +33,7 @@
33
33
  }
34
34
 
35
35
  .mce-container *[unselectable] {
36
- @include user-select(none);
36
+ user-select: none;
37
37
  }
38
38
 
39
39
  .mce-container::-webkit-scrollbar {
@@ -630,15 +630,15 @@ body .mce-abs-layout-item {
630
630
  *display: inline;
631
631
  *zoom: 1;
632
632
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
633
- @include background(linear-gradient($button-gradient-first-color, $button-gradient-second-color));
633
+ background: linear-gradient($button-gradient-first-color, $button-gradient-second-color);
634
634
 
635
635
  &:focus,
636
636
  &:hover {
637
637
  color: #333;
638
- @include background(linear-gradient( darken($button-gradient-first-color, 5%), darken($button-gradient-second-color, 5%) ));
638
+ background: linear-gradient(darken($button-gradient-first-color, 5%), darken($button-gradient-second-color, 5%));
639
639
 
640
640
  button {
641
- @include background(inherit);
641
+ background: inherit;
642
642
  }
643
643
  }
644
644
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Alchemy
2
4
  module Admin
3
5
  class AttachmentsController < ResourcesController
@@ -21,7 +23,6 @@ module Alchemy
21
23
  .page(params[:page] || 1)
22
24
  .per(15)
23
25
 
24
- @options = options_from_params
25
26
  if in_overlay?
26
27
  archive_overlay
27
28
  end
@@ -44,7 +45,7 @@ module Alchemy
44
45
  else
45
46
  render_errors_or_redirect(
46
47
  @attachment,
47
- admin_attachments_path(search_params),
48
+ admin_attachments_path(search_filter_params),
48
49
  Alchemy.t("File successfully updated")
49
50
  )
50
51
  end
@@ -53,7 +54,7 @@ module Alchemy
53
54
  def destroy
54
55
  name = @attachment.name
55
56
  @attachment.destroy
56
- @url = admin_attachments_url(search_params)
57
+ @url = admin_attachments_url(search_filter_params)
57
58
  flash[:notice] = Alchemy.t('File deleted successfully', name: name)
58
59
  end
59
60
 
@@ -67,12 +68,12 @@ module Alchemy
67
68
 
68
69
  private
69
70
 
70
- def search_params
71
- params.except(:attachment, :id).permit(
72
- :file_type,
73
- :page,
74
- {q: resource_handler.search_field_name},
75
- :tagged_with
71
+ def search_filter_params
72
+ params.except(*COMMON_SEARCH_FILTER_EXCLUDES + [:attachment]).permit(
73
+ *common_search_filter_includes + [
74
+ :file_type,
75
+ :content_id
76
+ ]
76
77
  )
77
78
  end
78
79
 
@@ -90,7 +91,6 @@ module Alchemy
90
91
 
91
92
  def archive_overlay
92
93
  @content = Content.find_by(id: params[:content_id])
93
- @options = options_from_params
94
94
  respond_to do |format|
95
95
  format.html { render partial: 'archive_overlay' }
96
96
  format.js { render action: 'archive_overlay' }
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Alchemy
2
4
  module Admin
3
5
  class BaseController < Alchemy::BaseController
@@ -7,7 +9,8 @@ module Alchemy
7
9
  before_action { enforce_ssl if ssl_required? && !request.ssl? }
8
10
  before_action :load_locked_pages
9
11
 
10
- helper_method :clipboard_empty?, :trash_empty?, :get_clipboard, :is_admin?
12
+ helper_method :clipboard_empty?, :trash_empty?, :get_clipboard, :is_admin?,
13
+ :options_from_params
11
14
 
12
15
  check_authorization
13
16
 
@@ -57,14 +60,6 @@ module Alchemy
57
60
  end
58
61
  end
59
62
 
60
- def redirect_back_or_to_default(default_path = admin_dashboard_path)
61
- if request.referer.present?
62
- redirect_to :back
63
- else
64
- redirect_to default_path
65
- end
66
- end
67
-
68
63
  # Returns clipboard items for given category
69
64
  def get_clipboard(category)
70
65
  session[:alchemy_clipboard] ||= {}
@@ -132,19 +127,15 @@ module Alchemy
132
127
  end
133
128
  end
134
129
 
135
- # Extracts options from params.
130
+ # Extracts options from params and permits all keys
136
131
  #
137
- # Helps to parse JSONified options into Hash or Array
132
+ # If no options are present it returns an empty parameters hash.
138
133
  #
134
+ # @returns [ActionController::Parameters]
139
135
  def options_from_params
140
- case params[:options]
141
- when '', nil
142
- {}
143
- when String
144
- JSON.parse(params[:options])
145
- else
146
- params[:options].permit!.to_h
147
- end.deep_symbolize_keys
136
+ @_options_from_params ||= begin
137
+ (params[:options] || ActionController::Parameters.new).permit!
138
+ end
148
139
  end
149
140
 
150
141
  # This method decides if we want to raise an exception or not.