alchemy_cms 6.0.0.pre.rc6 → 6.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +23 -8
  3. data/.github/workflows/stale.yml +21 -7
  4. data/.gitignore +0 -1
  5. data/.rspec +1 -0
  6. data/CHANGELOG.md +102 -0
  7. data/Gemfile +20 -5
  8. data/README.md +4 -3
  9. data/Rakefile +5 -1
  10. data/alchemy_cms.gemspec +3 -3
  11. data/app/assets/javascripts/alchemy/admin.js +0 -1
  12. data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +2 -0
  13. data/app/assets/javascripts/alchemy/page_select.js +13 -8
  14. data/app/assets/javascripts/alchemy/templates/index.js +1 -0
  15. data/app/assets/javascripts/alchemy/templates/page.hbs +17 -7
  16. data/app/assets/javascripts/alchemy/templates/page_folder.hbs +3 -0
  17. data/app/assets/stylesheets/alchemy/archive.scss +9 -0
  18. data/app/assets/stylesheets/alchemy/elements.scss +4 -0
  19. data/app/assets/stylesheets/alchemy/page-select.scss +29 -4
  20. data/app/assets/stylesheets/alchemy/sitemap.scss +2 -6
  21. data/app/controllers/alchemy/admin/elements_controller.rb +20 -17
  22. data/app/controllers/alchemy/admin/pages_controller.rb +24 -19
  23. data/app/controllers/alchemy/api/base_controller.rb +4 -3
  24. data/app/controllers/alchemy/api/contents_controller.rb +1 -5
  25. data/app/controllers/alchemy/api/elements_controller.rb +2 -6
  26. data/app/controllers/alchemy/api/nodes_controller.rb +1 -0
  27. data/app/controllers/alchemy/api/pages_controller.rb +16 -10
  28. data/app/controllers/alchemy/base_controller.rb +7 -0
  29. data/app/controllers/alchemy/messages_controller.rb +0 -3
  30. data/app/controllers/alchemy/pages_controller.rb +0 -7
  31. data/app/helpers/alchemy/elements_helper.rb +17 -12
  32. data/app/models/alchemy/element.rb +13 -6
  33. data/app/models/alchemy/ingredient.rb +10 -1
  34. data/app/models/alchemy/ingredient_validator.rb +1 -1
  35. data/app/models/alchemy/language.rb +1 -1
  36. data/app/models/alchemy/page/page_elements.rb +2 -2
  37. data/app/models/alchemy/page/page_naming.rb +1 -1
  38. data/app/models/alchemy/page.rb +1 -1
  39. data/app/models/alchemy/picture/transformations.rb +2 -2
  40. data/app/models/alchemy/picture.rb +1 -1
  41. data/app/models/alchemy/picture_variant.rb +3 -1
  42. data/app/models/alchemy/site.rb +1 -1
  43. data/app/serializers/alchemy/page_serializer.rb +7 -1
  44. data/app/serializers/alchemy/page_tree_serializer.rb +3 -3
  45. data/app/views/alchemy/admin/clipboard/insert.js.erb +13 -0
  46. data/app/views/alchemy/admin/elements/_add_nested_element_form.html.erb +27 -0
  47. data/app/views/alchemy/admin/elements/_element.html.erb +1 -23
  48. data/app/views/alchemy/admin/elements/_form.html.erb +5 -1
  49. data/app/views/alchemy/admin/pages/_form.html.erb +19 -0
  50. data/app/views/alchemy/admin/pages/_new_page_form.html.erb +16 -5
  51. data/app/views/alchemy/admin/pages/_page.html.erb +111 -133
  52. data/app/views/alchemy/admin/pages/_sitemap.html.erb +2 -8
  53. data/app/views/alchemy/admin/pages/_toolbar.html.erb +0 -12
  54. data/app/views/alchemy/admin/pages/index.html.erb +1 -1
  55. data/app/views/alchemy/admin/pages/update.js.erb +7 -0
  56. data/app/views/alchemy/admin/partials/_routes.html.erb +12 -1
  57. data/app/views/alchemy/admin/resources/_form.html.erb +5 -0
  58. data/app/views/alchemy/essences/_essence_node_editor.html.erb +1 -1
  59. data/app/views/alchemy/essences/_essence_page_editor.html.erb +1 -1
  60. data/config/alchemy/config.yml +1 -0
  61. data/config/initializers/dragonfly.rb +2 -0
  62. data/config/locales/alchemy.en.yml +0 -3
  63. data/config/routes.rb +4 -2
  64. data/lib/alchemy/config.rb +5 -1
  65. data/lib/alchemy/controller_actions.rb +2 -1
  66. data/lib/alchemy/dragonfly/processors/thumbnail.rb +27 -0
  67. data/lib/alchemy/element_definition.rb +2 -3
  68. data/lib/alchemy/elements_finder.rb +1 -2
  69. data/lib/alchemy/engine.rb +12 -1
  70. data/lib/alchemy/essence.rb +1 -27
  71. data/lib/alchemy/page_layout.rb +5 -1
  72. data/lib/alchemy/permissions.rb +2 -3
  73. data/lib/alchemy/resource.rb +16 -1
  74. data/lib/alchemy/test_support/essence_shared_examples.rb +0 -12
  75. data/lib/alchemy/test_support/shared_ingredient_examples.rb +4 -2
  76. data/lib/alchemy/upgrader/tasks/ingredients_migrator.rb +1 -1
  77. data/lib/alchemy/version.rb +1 -1
  78. data/lib/alchemy.rb +2 -4
  79. data/lib/generators/alchemy/base.rb +7 -3
  80. data/lib/generators/alchemy/install/install_generator.rb +10 -2
  81. data/package/src/image_loader.js +4 -2
  82. data/package/src/node_tree.js +13 -6
  83. data/package/src/page_publication_fields.js +15 -14
  84. data/package/src/page_sorter.js +62 -0
  85. data/package/src/picture_editors.js +8 -8
  86. data/package/src/sitemap.js +51 -36
  87. data/package/src/utils/__tests__/ajax.spec.js +52 -16
  88. data/package/src/utils/ajax.js +12 -0
  89. data/package.json +1 -1
  90. metadata +43 -42
  91. data/app/assets/javascripts/alchemy/alchemy.page_sorter.js +0 -24
  92. data/app/views/alchemy/admin/pages/fold.js.erb +0 -2
  93. data/app/views/alchemy/admin/pages/sort.html.erb +0 -19
  94. data/vendor/assets/javascripts/jquery_plugins/jquery.ui.nestedSortable.js +0 -434
@@ -1,5 +1,5 @@
1
1
  import xhrMock from "xhr-mock"
2
- import ajax from "../ajax"
2
+ import { get, patch, post } from "../ajax"
3
3
 
4
4
  const token = "s3cr3t"
5
5
 
@@ -8,13 +8,13 @@ beforeEach(() => {
8
8
  xhrMock.setup()
9
9
  })
10
10
 
11
- describe("ajax('get')", () => {
11
+ describe("get", () => {
12
12
  it("sends X-CSRF-TOKEN header", async () => {
13
13
  xhrMock.get("http://localhost/users", (req, res) => {
14
14
  expect(req.header("X-CSRF-TOKEN")).toEqual(token)
15
15
  return res.status(200).body('{"message":"Ok"}')
16
16
  })
17
- await ajax("get", "/users")
17
+ await get("/users")
18
18
  })
19
19
 
20
20
  it("sends Content-Type header", async () => {
@@ -24,7 +24,7 @@ describe("ajax('get')", () => {
24
24
  )
25
25
  return res.status(200).body('{"message":"Ok"}')
26
26
  })
27
- await ajax("get", "/users")
27
+ await get("/users")
28
28
  })
29
29
 
30
30
  it("sends Accept header", async () => {
@@ -32,14 +32,14 @@ describe("ajax('get')", () => {
32
32
  expect(req.header("Accept")).toEqual("application/json")
33
33
  return res.status(200).body('{"message":"Ok"}')
34
34
  })
35
- await ajax("get", "/users")
35
+ await get("/users")
36
36
  })
37
37
 
38
38
  it("returns JSON", async () => {
39
39
  xhrMock.get("http://localhost/users", (_req, res) => {
40
40
  return res.status(200).body('{"email":"mail@example.com"}')
41
41
  })
42
- await ajax("get", "/users").then((res) => {
42
+ await get("/users").then((res) => {
43
43
  expect(res.data).toEqual({ email: "mail@example.com" })
44
44
  })
45
45
  })
@@ -49,7 +49,7 @@ describe("ajax('get')", () => {
49
49
  return res.status(200).body('email => "mail@example.com"')
50
50
  })
51
51
  expect.assertions(1)
52
- await ajax("get", "/users").catch((e) => {
52
+ await get("/users").catch((e) => {
53
53
  expect(e.message).toMatch("Unexpected token")
54
54
  })
55
55
  })
@@ -59,7 +59,7 @@ describe("ajax('get')", () => {
59
59
  return Promise.reject(new Error())
60
60
  })
61
61
  expect.assertions(1)
62
- await ajax("get", "/users").catch((e) => {
62
+ await get("/users").catch((e) => {
63
63
  expect(e.message).toEqual("An error occurred during the transaction")
64
64
  })
65
65
  })
@@ -69,7 +69,7 @@ describe("ajax('get')", () => {
69
69
  return res.status(401).body('{"error":"Unauthorized"}')
70
70
  })
71
71
  expect.assertions(1)
72
- await ajax("get", "/users").catch((e) => {
72
+ await get("/users").catch((e) => {
73
73
  expect(e.error).toEqual("Unauthorized")
74
74
  })
75
75
  })
@@ -79,7 +79,7 @@ describe("ajax('get')", () => {
79
79
  return res.status(401).body("Unauthorized")
80
80
  })
81
81
  expect.assertions(1)
82
- await ajax("get", "/users").catch((e) => {
82
+ await get("/users").catch((e) => {
83
83
  expect(e.message).toMatch("Unexpected token")
84
84
  })
85
85
  })
@@ -88,18 +88,54 @@ describe("ajax('get')", () => {
88
88
  xhrMock.get("http://localhost/users?name=foo", (_req, res) => {
89
89
  return res.status(200).body(`{"name":"foo"}`)
90
90
  })
91
- const { data } = await ajax("get", "/users", { name: "foo" })
91
+ const { data } = await get("/users", { name: "foo" })
92
92
  expect(data.name).toEqual("foo")
93
93
  })
94
94
  })
95
95
 
96
- describe("ajax('post')", () => {
96
+ describe("patch", () => {
97
+ it("sends X-CSRF-TOKEN header", async () => {
98
+ xhrMock.patch("http://localhost/users", (req, res) => {
99
+ expect(req.header("X-CSRF-TOKEN")).toEqual(token)
100
+ return res.status(200).body('{"message":"Ok"}')
101
+ })
102
+ await patch("/users")
103
+ })
104
+
105
+ it("sends Content-Type header", async () => {
106
+ xhrMock.patch("http://localhost/users", (req, res) => {
107
+ expect(req.header("Content-Type")).toEqual(
108
+ "application/json; charset=utf-8"
109
+ )
110
+ return res.status(200).body('{"message":"Ok"}')
111
+ })
112
+ await patch("/users")
113
+ })
114
+
115
+ it("sends Accept header", async () => {
116
+ xhrMock.patch("http://localhost/users", (req, res) => {
117
+ expect(req.header("Accept")).toEqual("application/json")
118
+ return res.status(200).body('{"message":"Ok"}')
119
+ })
120
+ await patch("/users")
121
+ })
122
+
123
+ it("sends JSON data", async () => {
124
+ xhrMock.patch("http://localhost/users", (req, res) => {
125
+ expect(req.body()).toEqual('{"email":"mail@example.com"}')
126
+ return res.status(200).body('{"message":"Ok"}')
127
+ })
128
+ await patch("/users", { email: "mail@example.com" })
129
+ })
130
+ })
131
+
132
+ describe("post", () => {
97
133
  it("sends X-CSRF-TOKEN header", async () => {
98
134
  xhrMock.post("http://localhost/users", (req, res) => {
99
135
  expect(req.header("X-CSRF-TOKEN")).toEqual(token)
100
136
  return res.status(200).body('{"message":"Ok"}')
101
137
  })
102
- await ajax("post", "/users")
138
+ await post("/users")
103
139
  })
104
140
 
105
141
  it("sends Content-Type header", async () => {
@@ -109,7 +145,7 @@ describe("ajax('post')", () => {
109
145
  )
110
146
  return res.status(200).body('{"message":"Ok"}')
111
147
  })
112
- await ajax("post", "/users")
148
+ await post("/users")
113
149
  })
114
150
 
115
151
  it("sends Accept header", async () => {
@@ -117,7 +153,7 @@ describe("ajax('post')", () => {
117
153
  expect(req.header("Accept")).toEqual("application/json")
118
154
  return res.status(200).body('{"message":"Ok"}')
119
155
  })
120
- await ajax("post", "/users")
156
+ await post("/users")
121
157
  })
122
158
 
123
159
  it("sends JSON data", async () => {
@@ -125,7 +161,7 @@ describe("ajax('post')", () => {
125
161
  expect(req.body()).toEqual('{"email":"mail@example.com"}')
126
162
  return res.status(200).body('{"message":"Ok"}')
127
163
  })
128
- await ajax("post", "/users", { email: "mail@example.com" })
164
+ await post("/users", { email: "mail@example.com" })
129
165
  })
130
166
  })
131
167
 
@@ -29,6 +29,18 @@ function getToken() {
29
29
  return metaTag.attributes.content.textContent
30
30
  }
31
31
 
32
+ export function get(url, params) {
33
+ return ajax("GET", url, params)
34
+ }
35
+
36
+ export function patch(url, data) {
37
+ return ajax("PATCH", url, data)
38
+ }
39
+
40
+ export function post(url, data) {
41
+ return ajax("POST", url, data)
42
+ }
43
+
32
44
  export default function ajax(method, path, data) {
33
45
  const xhr = new XMLHttpRequest()
34
46
  const promise = buildPromise(xhr)
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alchemy_cms/admin",
3
- "version": "6.0.0-rc6",
3
+ "version": "6.0.1",
4
4
  "description": "AlchemyCMS",
5
5
  "browser": "package/admin.js",
6
6
  "files": [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0.pre.rc6
4
+ version: 6.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2022-03-05 00:00:00.000000000 Z
16
+ date: 2022-04-26 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: actionmailer
@@ -24,7 +24,7 @@ dependencies:
24
24
  version: '6.0'
25
25
  - - "<"
26
26
  - !ruby/object:Gem::Version
27
- version: '6.2'
27
+ version: '7.1'
28
28
  type: :runtime
29
29
  prerelease: false
30
30
  version_requirements: !ruby/object:Gem::Requirement
@@ -34,7 +34,7 @@ dependencies:
34
34
  version: '6.0'
35
35
  - - "<"
36
36
  - !ruby/object:Gem::Version
37
- version: '6.2'
37
+ version: '7.1'
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: actionpack
40
40
  requirement: !ruby/object:Gem::Requirement
@@ -44,7 +44,7 @@ dependencies:
44
44
  version: '6.0'
45
45
  - - "<"
46
46
  - !ruby/object:Gem::Version
47
- version: '6.2'
47
+ version: '7.1'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '6.0'
55
55
  - - "<"
56
56
  - !ruby/object:Gem::Version
57
- version: '6.2'
57
+ version: '7.1'
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: actionview
60
60
  requirement: !ruby/object:Gem::Requirement
@@ -64,7 +64,7 @@ dependencies:
64
64
  version: '6.0'
65
65
  - - "<"
66
66
  - !ruby/object:Gem::Version
67
- version: '6.2'
67
+ version: '7.1'
68
68
  type: :runtime
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
@@ -74,7 +74,7 @@ dependencies:
74
74
  version: '6.0'
75
75
  - - "<"
76
76
  - !ruby/object:Gem::Version
77
- version: '6.2'
77
+ version: '7.1'
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: activejob
80
80
  requirement: !ruby/object:Gem::Requirement
@@ -84,7 +84,7 @@ dependencies:
84
84
  version: '6.0'
85
85
  - - "<"
86
86
  - !ruby/object:Gem::Version
87
- version: '6.2'
87
+ version: '7.1'
88
88
  type: :runtime
89
89
  prerelease: false
90
90
  version_requirements: !ruby/object:Gem::Requirement
@@ -94,7 +94,7 @@ dependencies:
94
94
  version: '6.0'
95
95
  - - "<"
96
96
  - !ruby/object:Gem::Version
97
- version: '6.2'
97
+ version: '7.1'
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: activemodel
100
100
  requirement: !ruby/object:Gem::Requirement
@@ -104,7 +104,7 @@ dependencies:
104
104
  version: '6.0'
105
105
  - - "<"
106
106
  - !ruby/object:Gem::Version
107
- version: '6.2'
107
+ version: '7.1'
108
108
  type: :runtime
109
109
  prerelease: false
110
110
  version_requirements: !ruby/object:Gem::Requirement
@@ -114,7 +114,7 @@ dependencies:
114
114
  version: '6.0'
115
115
  - - "<"
116
116
  - !ruby/object:Gem::Version
117
- version: '6.2'
117
+ version: '7.1'
118
118
  - !ruby/object:Gem::Dependency
119
119
  name: activerecord
120
120
  requirement: !ruby/object:Gem::Requirement
@@ -124,7 +124,7 @@ dependencies:
124
124
  version: '6.0'
125
125
  - - "<"
126
126
  - !ruby/object:Gem::Version
127
- version: '6.2'
127
+ version: '7.1'
128
128
  type: :runtime
129
129
  prerelease: false
130
130
  version_requirements: !ruby/object:Gem::Requirement
@@ -134,7 +134,7 @@ dependencies:
134
134
  version: '6.0'
135
135
  - - "<"
136
136
  - !ruby/object:Gem::Version
137
- version: '6.2'
137
+ version: '7.1'
138
138
  - !ruby/object:Gem::Dependency
139
139
  name: activesupport
140
140
  requirement: !ruby/object:Gem::Requirement
@@ -144,7 +144,7 @@ dependencies:
144
144
  version: '6.0'
145
145
  - - "<"
146
146
  - !ruby/object:Gem::Version
147
- version: '6.2'
147
+ version: '7.1'
148
148
  type: :runtime
149
149
  prerelease: false
150
150
  version_requirements: !ruby/object:Gem::Requirement
@@ -154,7 +154,7 @@ dependencies:
154
154
  version: '6.0'
155
155
  - - "<"
156
156
  - !ruby/object:Gem::Version
157
- version: '6.2'
157
+ version: '7.1'
158
158
  - !ruby/object:Gem::Dependency
159
159
  name: railties
160
160
  requirement: !ruby/object:Gem::Requirement
@@ -164,7 +164,7 @@ dependencies:
164
164
  version: '6.0'
165
165
  - - "<"
166
166
  - !ruby/object:Gem::Version
167
- version: '6.2'
167
+ version: '7.1'
168
168
  type: :runtime
169
169
  prerelease: false
170
170
  version_requirements: !ruby/object:Gem::Requirement
@@ -174,7 +174,7 @@ dependencies:
174
174
  version: '6.0'
175
175
  - - "<"
176
176
  - !ruby/object:Gem::Version
177
- version: '6.2'
177
+ version: '7.1'
178
178
  - !ruby/object:Gem::Dependency
179
179
  name: active_model_serializers
180
180
  requirement: !ruby/object:Gem::Requirement
@@ -408,9 +408,9 @@ dependencies:
408
408
  - - ">="
409
409
  - !ruby/object:Gem::Version
410
410
  version: '1.8'
411
- - - "<="
411
+ - - "<"
412
412
  - !ruby/object:Gem::Version
413
- version: 2.5.0
413
+ version: '4.0'
414
414
  type: :runtime
415
415
  prerelease: false
416
416
  version_requirements: !ruby/object:Gem::Requirement
@@ -418,9 +418,9 @@ dependencies:
418
418
  - - ">="
419
419
  - !ruby/object:Gem::Version
420
420
  version: '1.8'
421
- - - "<="
421
+ - - "<"
422
422
  - !ruby/object:Gem::Version
423
- version: 2.5.0
423
+ version: '4.0'
424
424
  - !ruby/object:Gem::Dependency
425
425
  name: request_store
426
426
  requirement: !ruby/object:Gem::Requirement
@@ -571,20 +571,6 @@ dependencies:
571
571
  - - "~>"
572
572
  - !ruby/object:Gem::Version
573
573
  version: '1.0'
574
- - !ruby/object:Gem::Dependency
575
- name: cuprite
576
- requirement: !ruby/object:Gem::Requirement
577
- requirements:
578
- - - "~>"
579
- - !ruby/object:Gem::Version
580
- version: '0.13'
581
- type: :development
582
- prerelease: false
583
- version_requirements: !ruby/object:Gem::Requirement
584
- requirements:
585
- - - "~>"
586
- - !ruby/object:Gem::Version
587
- version: '0.13'
588
574
  - !ruby/object:Gem::Dependency
589
575
  name: factory_bot_rails
590
576
  requirement: !ruby/object:Gem::Requirement
@@ -669,6 +655,20 @@ dependencies:
669
655
  - - "~>"
670
656
  - !ruby/object:Gem::Version
671
657
  version: '0.20'
658
+ - !ruby/object:Gem::Dependency
659
+ name: webdrivers
660
+ requirement: !ruby/object:Gem::Requirement
661
+ requirements:
662
+ - - "~>"
663
+ - !ruby/object:Gem::Version
664
+ version: '5.0'
665
+ type: :development
666
+ prerelease: false
667
+ version_requirements: !ruby/object:Gem::Requirement
668
+ requirements:
669
+ - - "~>"
670
+ - !ruby/object:Gem::Version
671
+ version: '5.0'
672
672
  - !ruby/object:Gem::Dependency
673
673
  name: webmock
674
674
  requirement: !ruby/object:Gem::Requirement
@@ -731,6 +731,7 @@ files:
731
731
  - ".hound.yml"
732
732
  - ".localeapp/config.rb"
733
733
  - ".prettierrc"
734
+ - ".rspec"
734
735
  - ".rubocop.yml"
735
736
  - ".yardopts"
736
737
  - CHANGELOG.md
@@ -772,7 +773,6 @@ files:
772
773
  - app/assets/javascripts/alchemy/alchemy.initializer.js.coffee
773
774
  - app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee
774
775
  - app/assets/javascripts/alchemy/alchemy.list_filter.js.coffee
775
- - app/assets/javascripts/alchemy/alchemy.page_sorter.js
776
776
  - app/assets/javascripts/alchemy/alchemy.preview.js.coffee
777
777
  - app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee
778
778
  - app/assets/javascripts/alchemy/alchemy.spinner.js
@@ -788,6 +788,7 @@ files:
788
788
  - app/assets/javascripts/alchemy/templates/node.hbs
789
789
  - app/assets/javascripts/alchemy/templates/node_folder.hbs
790
790
  - app/assets/javascripts/alchemy/templates/page.hbs
791
+ - app/assets/javascripts/alchemy/templates/page_folder.hbs
791
792
  - app/assets/javascripts/alchemy/templates/spinner.hbs
792
793
  - app/assets/javascripts/tinymce/plugins/alchemy_link/plugin.min.js
793
794
  - app/assets/stylesheets/alchemy/_defaults.scss
@@ -1036,6 +1037,7 @@ files:
1036
1037
  - app/views/alchemy/admin/dashboard/help.html.erb
1037
1038
  - app/views/alchemy/admin/dashboard/index.html.erb
1038
1039
  - app/views/alchemy/admin/dashboard/info.html.erb
1040
+ - app/views/alchemy/admin/elements/_add_nested_element_form.html.erb
1039
1041
  - app/views/alchemy/admin/elements/_element.html.erb
1040
1042
  - app/views/alchemy/admin/elements/_footer.html.erb
1041
1043
  - app/views/alchemy/admin/elements/_form.html.erb
@@ -1106,7 +1108,6 @@ files:
1106
1108
  - app/views/alchemy/admin/pages/configure.html.erb
1107
1109
  - app/views/alchemy/admin/pages/edit.html.erb
1108
1110
  - app/views/alchemy/admin/pages/flush.js.erb
1109
- - app/views/alchemy/admin/pages/fold.js.erb
1110
1111
  - app/views/alchemy/admin/pages/index.html.erb
1111
1112
  - app/views/alchemy/admin/pages/info.html.erb
1112
1113
  - app/views/alchemy/admin/pages/link.html.erb
@@ -1114,7 +1115,6 @@ files:
1114
1115
  - app/views/alchemy/admin/pages/locked.html.erb
1115
1116
  - app/views/alchemy/admin/pages/new.html.erb
1116
1117
  - app/views/alchemy/admin/pages/show.html.erb
1117
- - app/views/alchemy/admin/pages/sort.html.erb
1118
1118
  - app/views/alchemy/admin/pages/unlock.js.erb
1119
1119
  - app/views/alchemy/admin/pages/update.js.erb
1120
1120
  - app/views/alchemy/admin/partials/_autocomplete_tag_list.html.erb
@@ -1304,6 +1304,7 @@ files:
1304
1304
  - lib/alchemy/deprecation.rb
1305
1305
  - lib/alchemy/dragonfly/processors/auto_orient.rb
1306
1306
  - lib/alchemy/dragonfly/processors/crop_resize.rb
1307
+ - lib/alchemy/dragonfly/processors/thumbnail.rb
1307
1308
  - lib/alchemy/element_definition.rb
1308
1309
  - lib/alchemy/elements_finder.rb
1309
1310
  - lib/alchemy/engine.rb
@@ -1431,6 +1432,7 @@ files:
1431
1432
  - package/src/image_loader.js
1432
1433
  - package/src/node_tree.js
1433
1434
  - package/src/page_publication_fields.js
1435
+ - package/src/page_sorter.js
1434
1436
  - package/src/picture_editors.js
1435
1437
  - package/src/sitemap.js
1436
1438
  - package/src/translations.js
@@ -1457,7 +1459,6 @@ files:
1457
1459
  - vendor/assets/javascripts/flatpickr/flatpickr.min.js
1458
1460
  - vendor/assets/javascripts/jquery_plugins/jquery.Jcrop.min.js
1459
1461
  - vendor/assets/javascripts/jquery_plugins/jquery.scrollTo.min.js
1460
- - vendor/assets/javascripts/jquery_plugins/jquery.ui.nestedSortable.js
1461
1462
  - vendor/assets/javascripts/jquery_plugins/jquery.ui.tabspaging.js
1462
1463
  - vendor/assets/javascripts/jquery_plugins/select2.js
1463
1464
  - vendor/assets/javascripts/keymaster.js
@@ -1516,9 +1517,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
1516
1517
  version: 2.5.0
1517
1518
  required_rubygems_version: !ruby/object:Gem::Requirement
1518
1519
  requirements:
1519
- - - ">"
1520
+ - - ">="
1520
1521
  - !ruby/object:Gem::Version
1521
- version: 1.3.1
1522
+ version: '0'
1522
1523
  requirements:
1523
1524
  - ImageMagick (libmagick), v6.6 or greater.
1524
1525
  rubygems_version: 3.1.6
@@ -1,24 +0,0 @@
1
- Alchemy.PageSorter = function () {
2
- var $sortables = $("ul#sitemap").find("ul.level_0_children")
3
-
4
- $sortables.nestedSortable({
5
- disableNesting: "no-nest",
6
- forcePlaceholderSize: true,
7
- handle: ".handle",
8
- items: "li",
9
- listType: "ul",
10
- opacity: 0.5,
11
- placeholder: "placeholder",
12
- tabSize: 16,
13
- tolerance: "pointer",
14
- toleranceElement: "> div"
15
- })
16
-
17
- $("#save_page_order").click(function (e) {
18
- e.preventDefault()
19
- Alchemy.Buttons.disable(this)
20
- $.post(Alchemy.routes.order_admin_pages_path, {
21
- set: JSON.stringify($sortables.nestedSortable("toHierarchy"))
22
- })
23
- })
24
- }
@@ -1,2 +0,0 @@
1
- $('#fold_button_<%= @page.id %>').css('background', 'none');
2
- Alchemy.currentSitemap.reload(<%= @page.id %>);
@@ -1,19 +0,0 @@
1
- <% content_for :toolbar do %>
2
- <div class="button_with_label">
3
- <%= link_to alchemy.admin_pages_path, class: 'icon_button' do %>
4
- <%= render_icon 'angle-double-left' %>
5
- <% end %>
6
- <label><%= Alchemy.t(:cancel) %></label>
7
- </div>
8
- <% end %>
9
-
10
- <div id="sort_panel">
11
- <%= render_message do %>
12
- <%= Alchemy.t(:explain_sitemap_dragndrop_sorting) %>
13
- <% end %>
14
- <div class="buttons">
15
- <%= button_tag Alchemy.t('save order'), id: 'save_page_order' %>
16
- </div>
17
- </div>
18
-
19
- <%= render 'sitemap', page_partial: 'page', full: true %>