alchemy_cms 5.2.1 → 6.0.0.pre.b4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +6 -14
- data/.gitignore +0 -1
- data/.hound.yml +1 -1
- data/.rubocop.yml +46 -4
- data/CHANGELOG.md +121 -8
- data/Gemfile +4 -2
- data/README.md +19 -4
- data/Rakefile +37 -23
- data/alchemy_cms.gemspec +78 -65
- data/app/assets/javascripts/alchemy/admin.js +0 -2
- data/app/assets/javascripts/alchemy/alchemy.base.js.coffee +0 -27
- data/app/assets/javascripts/alchemy/alchemy.confirm_dialog.js.coffee +2 -1
- data/app/assets/javascripts/alchemy/alchemy.dialog.js.coffee +1 -1
- data/app/assets/javascripts/alchemy/alchemy.dragndrop.js.coffee +0 -25
- data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +1 -1
- data/app/assets/javascripts/alchemy/alchemy.elements_window.js.coffee +2 -0
- data/app/assets/javascripts/alchemy/alchemy.fixed_elements.js +1 -1
- data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +3 -1
- data/app/assets/javascripts/alchemy/alchemy.image_overlay.coffee +1 -1
- data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +40 -27
- data/app/assets/javascripts/alchemy/templates/node_folder.hbs +1 -1
- data/app/assets/stylesheets/alchemy/_extends.scss +15 -2
- data/app/assets/stylesheets/alchemy/admin.scss +1 -1
- data/app/assets/stylesheets/alchemy/archive.scss +20 -5
- data/app/assets/stylesheets/alchemy/buttons.scss +0 -4
- data/app/assets/stylesheets/alchemy/elements.scss +73 -61
- data/app/assets/stylesheets/alchemy/fonts.scss +0 -0
- data/app/assets/stylesheets/alchemy/images.scss +8 -0
- data/app/assets/stylesheets/alchemy/node-select.scss +4 -3
- data/app/assets/stylesheets/alchemy/page-select.scss +1 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.svg +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.ttf +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.woff +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.svg +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.ttf +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.woff +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/img/anchor.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/img/loader.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/img/object.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/img/trans.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss +0 -0
- data/app/controllers/alchemy/admin/attachments_controller.rb +8 -4
- data/app/controllers/alchemy/admin/base_controller.rb +5 -7
- data/app/controllers/alchemy/admin/elements_controller.rb +59 -34
- data/app/controllers/alchemy/admin/essence_audios_controller.rb +30 -0
- data/app/controllers/alchemy/admin/essence_files_controller.rb +0 -14
- data/app/controllers/alchemy/admin/essence_pictures_controller.rb +8 -79
- data/app/controllers/alchemy/admin/essence_videos_controller.rb +33 -0
- data/app/controllers/alchemy/admin/ingredients_controller.rb +30 -0
- data/app/controllers/alchemy/admin/layoutpages_controller.rb +0 -1
- data/app/controllers/alchemy/admin/pages_controller.rb +7 -22
- data/app/controllers/alchemy/admin/pictures_controller.rb +56 -17
- data/app/controllers/alchemy/admin/resources_controller.rb +84 -10
- data/app/controllers/alchemy/api/elements_controller.rb +13 -4
- data/app/controllers/alchemy/api/pages_controller.rb +4 -3
- data/app/controllers/concerns/alchemy/admin/archive_overlay.rb +13 -3
- data/app/controllers/concerns/alchemy/admin/crop_action.rb +26 -0
- data/app/decorators/alchemy/element_editor.rb +26 -1
- data/app/decorators/alchemy/ingredient_editor.rb +158 -0
- data/app/helpers/alchemy/admin/elements_helper.rb +1 -0
- data/app/helpers/alchemy/admin/essences_helper.rb +1 -1
- data/app/helpers/alchemy/admin/ingredients_helper.rb +42 -0
- data/app/helpers/alchemy/elements_block_helper.rb +29 -6
- data/app/helpers/alchemy/elements_helper.rb +12 -5
- data/app/helpers/alchemy/pages_helper.rb +3 -11
- data/app/jobs/alchemy/base_job.rb +11 -0
- data/app/jobs/alchemy/publish_page_job.rb +11 -0
- data/app/models/alchemy/attachment.rb +24 -7
- data/app/models/alchemy/content/factory.rb +23 -27
- data/app/models/alchemy/content.rb +1 -6
- data/app/models/alchemy/element/definitions.rb +29 -27
- data/app/models/alchemy/element/element_contents.rb +131 -122
- data/app/models/alchemy/element/element_essences.rb +111 -98
- data/app/models/alchemy/element/element_ingredients.rb +184 -0
- data/app/models/alchemy/element/presenters.rb +104 -85
- data/app/models/alchemy/element.rb +39 -86
- data/app/models/alchemy/elements_repository.rb +126 -0
- data/app/models/alchemy/essence_audio.rb +12 -0
- data/app/models/alchemy/essence_headline.rb +40 -0
- data/app/models/alchemy/essence_picture.rb +4 -116
- data/app/models/alchemy/essence_richtext.rb +12 -0
- data/app/models/alchemy/essence_video.rb +12 -0
- data/app/models/alchemy/image_cropper_settings.rb +87 -0
- data/app/models/alchemy/ingredient.rb +183 -0
- data/app/models/alchemy/ingredient_validator.rb +97 -0
- data/app/models/alchemy/ingredients/audio.rb +29 -0
- data/app/models/alchemy/ingredients/boolean.rb +21 -0
- data/app/models/alchemy/ingredients/datetime.rb +20 -0
- data/app/models/alchemy/ingredients/file.rb +30 -0
- data/app/models/alchemy/ingredients/headline.rb +42 -0
- data/app/models/alchemy/ingredients/html.rb +19 -0
- data/app/models/alchemy/ingredients/link.rb +16 -0
- data/app/models/alchemy/ingredients/node.rb +23 -0
- data/app/models/alchemy/ingredients/page.rb +23 -0
- data/app/models/alchemy/ingredients/picture.rb +41 -0
- data/app/models/alchemy/ingredients/richtext.rb +57 -0
- data/app/models/alchemy/ingredients/select.rb +10 -0
- data/app/models/alchemy/ingredients/text.rb +17 -0
- data/app/models/alchemy/ingredients/video.rb +33 -0
- data/app/models/alchemy/language.rb +0 -11
- data/app/models/alchemy/page/fixed_attributes.rb +53 -51
- data/app/models/alchemy/page/page_elements.rb +186 -205
- data/app/models/alchemy/page/page_naming.rb +66 -64
- data/app/models/alchemy/page/page_natures.rb +131 -143
- data/app/models/alchemy/page/page_scopes.rb +117 -102
- data/app/models/alchemy/page/publisher.rb +50 -0
- data/app/models/alchemy/page/url_path.rb +1 -1
- data/app/models/alchemy/page.rb +79 -36
- data/app/models/alchemy/page_version.rb +58 -0
- data/app/models/alchemy/picture/calculations.rb +2 -8
- data/app/models/alchemy/picture/preprocessor.rb +2 -0
- data/app/models/alchemy/picture/transformations.rb +24 -96
- data/app/models/alchemy/picture.rb +17 -39
- data/app/models/concerns/alchemy/picture_thumbnails.rb +181 -0
- data/app/models/concerns/alchemy/touch_elements.rb +2 -2
- data/app/presenters/alchemy/picture_view.rb +88 -0
- data/app/serializers/alchemy/element_serializer.rb +5 -0
- data/app/serializers/alchemy/page_tree_serializer.rb +3 -2
- data/app/services/alchemy/delete_elements.rb +44 -0
- data/app/services/alchemy/duplicate_element.rb +56 -0
- data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +2 -3
- data/app/views/alchemy/admin/attachments/_file_to_assign.html.erb +3 -3
- data/app/views/alchemy/admin/attachments/assign.js.erb +11 -0
- data/app/views/alchemy/admin/attachments/index.html.erb +2 -3
- data/app/views/alchemy/admin/crop.html.erb +36 -0
- data/app/views/alchemy/admin/elements/_element.html.erb +14 -10
- data/app/views/alchemy/admin/elements/{_element_footer.html.erb → _footer.html.erb} +0 -0
- data/app/views/alchemy/admin/elements/{_new_element_form.html.erb → _form.html.erb} +1 -1
- data/app/views/alchemy/admin/elements/{_element_header.html.erb → _header.html.erb} +1 -1
- data/app/views/alchemy/admin/elements/{_element_toolbar.html.erb → _toolbar.html.erb} +5 -6
- data/app/views/alchemy/admin/elements/create.js.erb +1 -1
- data/app/views/alchemy/admin/elements/{trash.js.erb → destroy.js.erb} +2 -6
- data/app/views/alchemy/admin/elements/fold.js.erb +2 -2
- data/app/views/alchemy/admin/elements/new.html.erb +3 -3
- data/app/views/alchemy/admin/elements/order.js.erb +0 -17
- data/app/views/alchemy/admin/elements/update.js.erb +3 -2
- data/app/views/alchemy/admin/essence_audios/edit.html.erb +7 -0
- data/app/views/alchemy/admin/essence_pictures/update.js.erb +0 -1
- data/app/views/alchemy/admin/essence_videos/edit.html.erb +11 -0
- data/app/views/alchemy/admin/ingredients/_audio_fields.html.erb +4 -0
- data/app/views/alchemy/admin/ingredients/_file_fields.html.erb +18 -0
- data/app/views/alchemy/admin/ingredients/_picture_fields.html.erb +25 -0
- data/app/views/alchemy/admin/ingredients/_video_fields.html.erb +8 -0
- data/app/views/alchemy/admin/ingredients/edit.html.erb +4 -0
- data/app/views/alchemy/admin/layoutpages/edit.html.erb +0 -5
- data/app/views/alchemy/admin/nodes/_node.html.erb +2 -2
- data/app/views/alchemy/admin/pages/_anchor_link.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_external_link.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_file_link.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_form.html.erb +0 -6
- data/app/views/alchemy/admin/pages/_internal_link.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_tinymce_custom_config.html.erb +5 -2
- data/app/views/alchemy/admin/pages/_toolbar.html.erb +1 -1
- data/app/views/alchemy/admin/pages/edit.html.erb +37 -25
- data/app/views/alchemy/admin/pages/index.html.erb +2 -9
- data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +2 -4
- data/app/views/alchemy/admin/partials/_routes.html.erb +7 -11
- data/app/views/alchemy/admin/partials/_search_form.html.erb +9 -0
- data/app/views/alchemy/admin/pictures/_archive.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +5 -7
- data/app/views/alchemy/admin/pictures/_infos.html.erb +0 -1
- data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +4 -4
- data/app/views/alchemy/admin/pictures/assign.js.erb +10 -0
- data/app/views/alchemy/admin/pictures/index.html.erb +8 -3
- data/app/views/alchemy/admin/resources/_filter.html.erb +12 -0
- data/app/views/alchemy/admin/resources/_filter_bar.html.erb +14 -17
- data/app/views/alchemy/admin/resources/_form.html.erb +3 -0
- data/app/views/alchemy/admin/resources/_table_header.html.erb +15 -0
- data/app/views/alchemy/admin/resources/index.html.erb +3 -11
- data/app/views/alchemy/essences/_essence_audio_editor.html.erb +4 -0
- data/app/views/alchemy/essences/_essence_audio_view.html.erb +15 -0
- data/app/views/alchemy/essences/_essence_file_editor.html.erb +15 -6
- data/app/views/alchemy/essences/_essence_headline_editor.html.erb +36 -0
- data/app/views/alchemy/essences/_essence_headline_view.html.erb +10 -0
- data/app/views/alchemy/essences/_essence_link_editor.html.erb +8 -4
- data/app/views/alchemy/essences/_essence_picture_editor.html.erb +27 -12
- data/app/views/alchemy/essences/_essence_picture_view.html.erb +3 -3
- data/app/views/alchemy/essences/_essence_text_editor.html.erb +12 -4
- data/app/views/alchemy/essences/_essence_video_editor.html.erb +4 -0
- data/app/views/alchemy/essences/_essence_video_view.html.erb +18 -0
- data/app/views/alchemy/essences/shared/_essence_picture_tools.html.erb +21 -16
- data/app/views/alchemy/essences/shared/_linkable_essence_tools.html.erb +2 -2
- data/app/views/alchemy/ingredients/_audio_editor.html.erb +5 -0
- data/app/views/alchemy/ingredients/_audio_view.html.erb +14 -0
- data/app/views/alchemy/ingredients/_boolean_editor.html.erb +11 -0
- data/app/views/alchemy/ingredients/_boolean_view.html.erb +1 -0
- data/app/views/alchemy/ingredients/_datetime_editor.html.erb +17 -0
- data/app/views/alchemy/ingredients/_datetime_view.html.erb +9 -0
- data/app/views/alchemy/ingredients/_file_editor.html.erb +52 -0
- data/app/views/alchemy/ingredients/_file_view.html.erb +17 -0
- data/app/views/alchemy/ingredients/_headline_editor.html.erb +30 -0
- data/app/views/alchemy/ingredients/_headline_view.html.erb +9 -0
- data/app/views/alchemy/ingredients/_html_editor.html.erb +8 -0
- data/app/views/alchemy/ingredients/_html_view.html.erb +1 -0
- data/app/views/alchemy/ingredients/_link_editor.html.erb +24 -0
- data/app/views/alchemy/ingredients/_link_view.html.erb +9 -0
- data/app/views/alchemy/ingredients/_node_editor.html.erb +26 -0
- data/app/views/alchemy/ingredients/_node_view.html.erb +1 -0
- data/app/views/alchemy/ingredients/_page_editor.html.erb +25 -0
- data/app/views/alchemy/ingredients/_page_view.html.erb +4 -0
- data/app/views/alchemy/ingredients/_picture_editor.html.erb +60 -0
- data/app/views/alchemy/ingredients/_picture_view.html.erb +5 -0
- data/app/views/alchemy/ingredients/_richtext_editor.html.erb +12 -0
- data/app/views/alchemy/ingredients/_richtext_view.html.erb +3 -0
- data/app/views/alchemy/ingredients/_select_editor.html.erb +30 -0
- data/app/views/alchemy/ingredients/_select_view.html.erb +1 -0
- data/app/views/alchemy/ingredients/_text_editor.html.erb +20 -0
- data/app/views/alchemy/ingredients/_text_view.html.erb +16 -0
- data/app/views/alchemy/ingredients/_video_editor.html.erb +5 -0
- data/app/views/alchemy/ingredients/_video_view.html.erb +17 -0
- data/app/views/alchemy/ingredients/shared/_link_tools.html.erb +20 -0
- data/app/views/alchemy/ingredients/shared/_picture_tools.html.erb +57 -0
- data/config/brakeman.ignore +66 -159
- data/config/initializers/dragonfly.rb +10 -0
- data/config/locales/alchemy.en.yml +108 -64
- data/config/routes.rb +17 -22
- data/db/migrate/20201207131309_create_page_versions.rb +19 -0
- data/db/migrate/20201207135820_add_page_version_id_to_alchemy_elements.rb +76 -0
- data/db/migrate/20210205143548_rename_public_on_and_public_until_on_alchemy_pages.rb +10 -0
- data/db/migrate/20210326105046_add_sanitized_body_to_alchemy_essence_richtexts.rb +7 -0
- data/db/migrate/20210406093436_add_alchemy_essence_headlines.rb +12 -0
- data/db/migrate/20210506135919_create_essence_audios.rb +19 -0
- data/db/migrate/20210506140258_create_essence_videos.rb +23 -0
- data/db/migrate/20210508091432_create_alchemy_ingredients.rb +22 -0
- data/lib/alchemy/admin/preview_url.rb +2 -0
- data/lib/alchemy/deprecation.rb +1 -1
- data/lib/alchemy/dragonfly/processors/auto_orient.rb +18 -0
- data/lib/alchemy/dragonfly/processors/crop_resize.rb +35 -0
- data/lib/alchemy/elements_finder.rb +14 -60
- data/lib/alchemy/essence.rb +1 -2
- data/lib/alchemy/forms/builder.rb +21 -1
- data/lib/alchemy/hints.rb +8 -4
- data/lib/alchemy/page_layout.rb +0 -13
- data/lib/alchemy/permissions.rb +30 -29
- data/lib/alchemy/resource.rb +13 -3
- data/lib/alchemy/resource_filter.rb +40 -0
- data/lib/alchemy/resources_helper.rb +1 -16
- data/lib/alchemy/tasks/tidy.rb +29 -0
- data/lib/alchemy/test_support/essence_shared_examples.rb +0 -1
- data/lib/alchemy/test_support/factories/element_factory.rb +8 -8
- data/lib/alchemy/test_support/factories/essence_audio_factory.rb +7 -0
- data/lib/alchemy/test_support/factories/essence_video_factory.rb +7 -0
- data/lib/alchemy/test_support/factories/ingredient_factory.rb +25 -0
- data/lib/alchemy/test_support/factories/page_factory.rb +20 -1
- data/lib/alchemy/test_support/factories/page_version_factory.rb +23 -0
- data/lib/alchemy/test_support/having_crop_action_examples.rb +170 -0
- data/lib/alchemy/test_support/having_picture_thumbnails_examples.rb +646 -0
- data/lib/alchemy/test_support/shared_ingredient_editor_examples.rb +21 -0
- data/lib/alchemy/test_support/shared_ingredient_examples.rb +75 -0
- data/lib/alchemy/test_support.rb +2 -11
- data/lib/alchemy/tinymce.rb +21 -0
- data/lib/alchemy/upgrader/six_point_zero.rb +21 -0
- data/lib/alchemy/upgrader/tasks/add_page_versions.rb +33 -0
- data/lib/alchemy/upgrader/tasks/ingredients_migrator.rb +62 -0
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy_cms.rb +1 -0
- data/lib/generators/alchemy/elements/elements_generator.rb +1 -0
- data/lib/generators/alchemy/elements/templates/view.html.erb +9 -0
- data/lib/generators/alchemy/elements/templates/view.html.haml +9 -0
- data/lib/generators/alchemy/elements/templates/view.html.slim +9 -0
- data/lib/generators/alchemy/ingredient/ingredient_generator.rb +38 -0
- data/lib/generators/alchemy/ingredient/templates/editor.html.erb +14 -0
- data/lib/generators/alchemy/ingredient/templates/model.rb.tt +13 -0
- data/lib/generators/alchemy/ingredient/templates/view.html.erb +1 -0
- data/lib/generators/alchemy/install/templates/dragonfly.rb.tt +1 -1
- data/lib/generators/alchemy/menus/templates/node.html.erb +1 -1
- data/lib/generators/alchemy/menus/templates/node.html.haml +1 -1
- data/lib/generators/alchemy/menus/templates/node.html.slim +1 -1
- data/lib/generators/alchemy/menus/templates/wrapper.html.erb +1 -1
- data/lib/generators/alchemy/menus/templates/wrapper.html.haml +1 -1
- data/lib/generators/alchemy/menus/templates/wrapper.html.slim +1 -1
- data/lib/tasks/alchemy/thumbnails.rake +2 -0
- data/lib/tasks/alchemy/tidy.rake +12 -0
- data/lib/tasks/alchemy/upgrade.rake +26 -0
- data/package/admin.js +11 -1
- data/package/src/__tests__/i18n.spec.js +23 -0
- data/package/src/file_editors.js +28 -0
- data/package/src/i18n.js +1 -3
- data/package/src/image_cropper.js +103 -0
- data/package/src/image_loader.js +58 -0
- data/package/src/node_tree.js +5 -5
- data/package/src/picture_editors.js +169 -0
- data/package/src/utils/__tests__/ajax.spec.js +20 -12
- data/package/src/utils/ajax.js +8 -3
- data/package.json +3 -2
- data/vendor/assets/javascripts/jquery_plugins/jquery.Jcrop.min.js +3 -18
- data/vendor/assets/stylesheets/jquery.Jcrop.min.scss +2 -28
- metadata +289 -53
- data/app/assets/javascripts/alchemy/alchemy.image_cropper.js.coffee +0 -44
- data/app/assets/javascripts/alchemy/alchemy.trash_window.js.coffee +0 -30
- data/app/assets/stylesheets/alchemy/trash.scss +0 -8
- data/app/controllers/alchemy/admin/trash_controller.rb +0 -44
- data/app/views/alchemy/admin/attachments/_filter_bar.html.erb +0 -29
- data/app/views/alchemy/admin/essence_files/assign.js.erb +0 -3
- data/app/views/alchemy/admin/essence_pictures/assign.js.erb +0 -4
- data/app/views/alchemy/admin/essence_pictures/crop.html.erb +0 -48
- data/app/views/alchemy/admin/pictures/_filter_bar.html.erb +0 -30
- data/app/views/alchemy/admin/trash/clear.js.erb +0 -4
- data/app/views/alchemy/admin/trash/index.html.erb +0 -31
- data/lib/alchemy/test_support/factories.rb +0 -20
@@ -10,7 +10,7 @@ beforeEach(() => {
|
|
10
10
|
|
11
11
|
describe("ajax('get')", () => {
|
12
12
|
it("sends X-CSRF-TOKEN header", async () => {
|
13
|
-
xhrMock.get("/users", (req, res) => {
|
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
|
})
|
@@ -18,7 +18,7 @@ describe("ajax('get')", () => {
|
|
18
18
|
})
|
19
19
|
|
20
20
|
it("sends Content-Type header", async () => {
|
21
|
-
xhrMock.get("/users", (req, res) => {
|
21
|
+
xhrMock.get("http://localhost/users", (req, res) => {
|
22
22
|
expect(req.header("Content-Type")).toEqual(
|
23
23
|
"application/json; charset=utf-8"
|
24
24
|
)
|
@@ -28,7 +28,7 @@ describe("ajax('get')", () => {
|
|
28
28
|
})
|
29
29
|
|
30
30
|
it("sends Accept header", async () => {
|
31
|
-
xhrMock.get("/users", (req, res) => {
|
31
|
+
xhrMock.get("http://localhost/users", (req, res) => {
|
32
32
|
expect(req.header("Accept")).toEqual("application/json")
|
33
33
|
return res.status(200).body('{"message":"Ok"}')
|
34
34
|
})
|
@@ -36,7 +36,7 @@ describe("ajax('get')", () => {
|
|
36
36
|
})
|
37
37
|
|
38
38
|
it("returns JSON", async () => {
|
39
|
-
xhrMock.get("/users", (_req, res) => {
|
39
|
+
xhrMock.get("http://localhost/users", (_req, res) => {
|
40
40
|
return res.status(200).body('{"email":"mail@example.com"}')
|
41
41
|
})
|
42
42
|
await ajax("get", "/users").then((res) => {
|
@@ -45,7 +45,7 @@ describe("ajax('get')", () => {
|
|
45
45
|
})
|
46
46
|
|
47
47
|
it("JSON parse errors get rejected", async () => {
|
48
|
-
xhrMock.get("/users", (_req, res) => {
|
48
|
+
xhrMock.get("http://localhost/users", (_req, res) => {
|
49
49
|
return res.status(200).body('email => "mail@example.com"')
|
50
50
|
})
|
51
51
|
expect.assertions(1)
|
@@ -55,7 +55,7 @@ describe("ajax('get')", () => {
|
|
55
55
|
})
|
56
56
|
|
57
57
|
it("network errors get rejected", async () => {
|
58
|
-
xhrMock.get("/users", () => {
|
58
|
+
xhrMock.get("http://localhost/users", () => {
|
59
59
|
return Promise.reject(new Error())
|
60
60
|
})
|
61
61
|
expect.assertions(1)
|
@@ -65,7 +65,7 @@ describe("ajax('get')", () => {
|
|
65
65
|
})
|
66
66
|
|
67
67
|
it("server errors get rejected", async () => {
|
68
|
-
xhrMock.get("/users", (_req, res) => {
|
68
|
+
xhrMock.get("http://localhost/users", (_req, res) => {
|
69
69
|
return res.status(401).body('{"error":"Unauthorized"}')
|
70
70
|
})
|
71
71
|
expect.assertions(1)
|
@@ -75,7 +75,7 @@ describe("ajax('get')", () => {
|
|
75
75
|
})
|
76
76
|
|
77
77
|
it("server errors parsing errors get rejected", async () => {
|
78
|
-
xhrMock.get("/users", (_req, res) => {
|
78
|
+
xhrMock.get("http://localhost/users", (_req, res) => {
|
79
79
|
return res.status(401).body("Unauthorized")
|
80
80
|
})
|
81
81
|
expect.assertions(1)
|
@@ -83,11 +83,19 @@ describe("ajax('get')", () => {
|
|
83
83
|
expect(e.message).toMatch("Unexpected token")
|
84
84
|
})
|
85
85
|
})
|
86
|
+
|
87
|
+
it("params get attached as query string", async () => {
|
88
|
+
xhrMock.get("http://localhost/users?name=foo", (_req, res) => {
|
89
|
+
return res.status(200).body(`{"name":"foo"}`)
|
90
|
+
})
|
91
|
+
const { data } = await ajax("get", "/users", { name: "foo" })
|
92
|
+
expect(data.name).toEqual("foo")
|
93
|
+
})
|
86
94
|
})
|
87
95
|
|
88
96
|
describe("ajax('post')", () => {
|
89
97
|
it("sends X-CSRF-TOKEN header", async () => {
|
90
|
-
xhrMock.post("/users", (req, res) => {
|
98
|
+
xhrMock.post("http://localhost/users", (req, res) => {
|
91
99
|
expect(req.header("X-CSRF-TOKEN")).toEqual(token)
|
92
100
|
return res.status(200).body('{"message":"Ok"}')
|
93
101
|
})
|
@@ -95,7 +103,7 @@ describe("ajax('post')", () => {
|
|
95
103
|
})
|
96
104
|
|
97
105
|
it("sends Content-Type header", async () => {
|
98
|
-
xhrMock.post("/users", (req, res) => {
|
106
|
+
xhrMock.post("http://localhost/users", (req, res) => {
|
99
107
|
expect(req.header("Content-Type")).toEqual(
|
100
108
|
"application/json; charset=utf-8"
|
101
109
|
)
|
@@ -105,7 +113,7 @@ describe("ajax('post')", () => {
|
|
105
113
|
})
|
106
114
|
|
107
115
|
it("sends Accept header", async () => {
|
108
|
-
xhrMock.post("/users", (req, res) => {
|
116
|
+
xhrMock.post("http://localhost/users", (req, res) => {
|
109
117
|
expect(req.header("Accept")).toEqual("application/json")
|
110
118
|
return res.status(200).body('{"message":"Ok"}')
|
111
119
|
})
|
@@ -113,7 +121,7 @@ describe("ajax('post')", () => {
|
|
113
121
|
})
|
114
122
|
|
115
123
|
it("sends JSON data", async () => {
|
116
|
-
xhrMock.post("/users", (req, res) => {
|
124
|
+
xhrMock.post("http://localhost/users", (req, res) => {
|
117
125
|
expect(req.body()).toEqual('{"email":"mail@example.com"}')
|
118
126
|
return res.status(200).body('{"message":"Ok"}')
|
119
127
|
})
|
data/package/src/utils/ajax.js
CHANGED
@@ -29,16 +29,21 @@ function getToken() {
|
|
29
29
|
return metaTag.attributes.content.textContent
|
30
30
|
}
|
31
31
|
|
32
|
-
export default function ajax(method,
|
32
|
+
export default function ajax(method, path, data) {
|
33
33
|
const xhr = new XMLHttpRequest()
|
34
34
|
const promise = buildPromise(xhr)
|
35
|
+
const url = new URL(window.location.origin + path)
|
35
36
|
|
36
|
-
|
37
|
+
if (data && method.toLowerCase() === "get") {
|
38
|
+
url.search = new URLSearchParams(data).toString()
|
39
|
+
}
|
40
|
+
|
41
|
+
xhr.open(method, url.toString())
|
37
42
|
xhr.setRequestHeader("Content-type", "application/json; charset=utf-8")
|
38
43
|
xhr.setRequestHeader("Accept", "application/json")
|
39
44
|
xhr.setRequestHeader("X-CSRF-Token", getToken())
|
40
45
|
|
41
|
-
if (data) {
|
46
|
+
if (data && method.toLowerCase() !== "get") {
|
42
47
|
xhr.send(JSON.stringify(data))
|
43
48
|
} else {
|
44
49
|
xhr.send()
|
data/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@alchemy_cms/admin",
|
3
|
-
"version": "0.
|
3
|
+
"version": "6.0.0-b4",
|
4
4
|
"description": "AlchemyCMS",
|
5
5
|
"browser": "package/admin.js",
|
6
6
|
"files": [
|
@@ -24,12 +24,13 @@
|
|
24
24
|
},
|
25
25
|
"homepage": "https://github.com/AlchemyCMS/alchemy_cms#readme",
|
26
26
|
"dependencies": {
|
27
|
+
"lodash-es": "^4.17.21",
|
27
28
|
"sortablejs": "^1.10.2"
|
28
29
|
},
|
29
30
|
"devDependencies": {
|
30
31
|
"@babel/core": "^7.9.6",
|
31
32
|
"@babel/preset-env": "^7.9.6",
|
32
|
-
"babel-jest": "^
|
33
|
+
"babel-jest": "^27.0.1",
|
33
34
|
"jest": "^25.2.7",
|
34
35
|
"prettier": "^2.0.2",
|
35
36
|
"xhr-mock": "^2.5.1"
|
@@ -1,22 +1,7 @@
|
|
1
1
|
/**
|
2
|
-
* jquery.Jcrop.min.js v0.9.
|
2
|
+
* jquery.Jcrop.min.js v0.9.15 (build:20180819)
|
3
3
|
* jQuery Image Cropping Plugin - released under MIT License
|
4
|
-
* Copyright (c) 2008-
|
4
|
+
* Copyright (c) 2008-2018 Tapmodo Interactive LLC
|
5
5
|
* https://github.com/tapmodo/Jcrop
|
6
6
|
*/
|
7
|
-
(function(a){a.Jcrop=function(b,c){function i(a){return Math.round(a)+"px"}function j(a){return d.baseClass+"-"+a}function k(){return a.fx.step.hasOwnProperty("backgroundColor")}function l(b){var c=a(b).offset();return[c.left,c.top]}function m(a){return[a.pageX-e[0],a.pageY-e[1]]}function n(b){typeof b!="object"&&(b={}),d=a.extend(d,b),a.each(["onChange","onSelect","onRelease","onDblClick"],function(a,b){typeof d[b]!="function"&&(d[b]=function(){})})}function o(a,b,c){e=l(D),bc.setCursor(a==="move"?a:a+"-resize");if(a==="move")return bc.activateHandlers(q(b),v,c);var d=_.getFixed(),f=r(a),g=_.getCorner(r(f));_.setPressed(_.getCorner(f)),_.setCurrent(g),bc.activateHandlers(p(a,d),v,c)}function p(a,b){return function(c){if(!d.aspectRatio)switch(a){case"e":c[1]=b.y2;break;case"w":c[1]=b.y2;break;case"n":c[0]=b.x2;break;case"s":c[0]=b.x2}else switch(a){case"e":c[1]=b.y+1;break;case"w":c[1]=b.y+1;break;case"n":c[0]=b.x+1;break;case"s":c[0]=b.x+1}_.setCurrent(c),bb.update()}}function q(a){var b=a;return bd.watchKeys
|
8
|
-
(),function(a){_.moveOffset([a[0]-b[0],a[1]-b[1]]),b=a,bb.update()}}function r(a){switch(a){case"n":return"sw";case"s":return"nw";case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function s(a){return function(b){return d.disabled?!1:a==="move"&&!d.allowMove?!1:(e=l(D),W=!0,o(a,m(b)),b.stopPropagation(),b.preventDefault(),!1)}}function t(a,b,c){var d=a.width(),e=a.height();d>b&&b>0&&(d=b,e=b/a.width()*a.height()),e>c&&c>0&&(e=c,d=c/a.height()*a.width()),T=a.width()/d,U=a.height()/e,a.width(d).height(e)}function u(a){return{x:a.x*T,y:a.y*U,x2:a.x2*T,y2:a.y2*U,w:a.w*T,h:a.h*U}}function v(a){var b=_.getFixed();b.w>d.minSelect[0]&&b.h>d.minSelect[1]?(bb.enableHandles(),bb.done()):bb.release(),bc.setCursor(d.allowSelect?"crosshair":"default")}function w(a){if(d.disabled)return!1;if(!d.allowSelect)return!1;W=!0,e=l(D),bb.disableHandles(),bc.setCursor("crosshair");var b=m(a);return _.setPressed(b),bb.update(),bc.activateHandlers(x,v,a.type.substring
|
9
|
-
(0,5)==="touch"),bd.watchKeys(),a.stopPropagation(),a.preventDefault(),!1}function x(a){_.setCurrent(a),bb.update()}function y(){var b=a("<div></div>").addClass(j("tracker"));return g&&b.css({opacity:0,backgroundColor:"white"}),b}function be(a){G.removeClass().addClass(j("holder")).addClass(a)}function bf(a,b){function t(){window.setTimeout(u,l)}var c=a[0]/T,e=a[1]/U,f=a[2]/T,g=a[3]/U;if(X)return;var h=_.flipCoords(c,e,f,g),i=_.getFixed(),j=[i.x,i.y,i.x2,i.y2],k=j,l=d.animationDelay,m=h[0]-j[0],n=h[1]-j[1],o=h[2]-j[2],p=h[3]-j[3],q=0,r=d.swingSpeed;c=k[0],e=k[1],f=k[2],g=k[3],bb.animMode(!0);var s,u=function(){return function(){q+=(100-q)/r,k[0]=Math.round(c+q/100*m),k[1]=Math.round(e+q/100*n),k[2]=Math.round(f+q/100*o),k[3]=Math.round(g+q/100*p),q>=99.8&&(q=100),q<100?(bh(k),t()):(bb.done(),bb.animMode(!1),typeof b=="function"&&b.call(bs))}}();t()}function bg(a){bh([a[0]/T,a[1]/U,a[2]/T,a[3]/U]),d.onSelect.call(bs,u(_.getFixed())),bb.enableHandles()}function bh(a){_.setPressed([a[0],a[1]]),_.setCurrent([a[2],
|
10
|
-
a[3]]),bb.update()}function bi(){return u(_.getFixed())}function bj(){return _.getFixed()}function bk(a){n(a),br()}function bl(){d.disabled=!0,bb.disableHandles(),bb.setCursor("default"),bc.setCursor("default")}function bm(){d.disabled=!1,br()}function bn(){bb.done(),bc.activateHandlers(null,null)}function bo(){G.remove(),A.show(),A.css("visibility","visible"),a(b).removeData("Jcrop")}function bp(a,b){bb.release(),bl();var c=new Image;c.onload=function(){var e=c.width,f=c.height,g=d.boxWidth,h=d.boxHeight;D.width(e).height(f),D.attr("src",a),H.attr("src",a),t(D,g,h),E=D.width(),F=D.height(),H.width(E).height(F),M.width(E+L*2).height(F+L*2),G.width(E).height(F),ba.resize(E,F),bm(),typeof b=="function"&&b.call(bs)},c.src=a}function bq(a,b,c){var e=b||d.bgColor;d.bgFade&&k()&&d.fadeTime&&!c?a.animate({backgroundColor:e},{queue:!1,duration:d.fadeTime}):a.css("backgroundColor",e)}function br(a){d.allowResize?a?bb.enableOnly():bb.enableHandles():bb.disableHandles(),bc.setCursor(d.allowSelect?"crosshair":"default"),bb
|
11
|
-
.setCursor(d.allowMove?"move":"default"),d.hasOwnProperty("trueSize")&&(T=d.trueSize[0]/E,U=d.trueSize[1]/F),d.hasOwnProperty("setSelect")&&(bg(d.setSelect),bb.done(),delete d.setSelect),ba.refresh(),d.bgColor!=N&&(bq(d.shade?ba.getShades():G,d.shade?d.shadeColor||d.bgColor:d.bgColor),N=d.bgColor),O!=d.bgOpacity&&(O=d.bgOpacity,d.shade?ba.refresh():bb.setBgOpacity(O)),P=d.maxSize[0]||0,Q=d.maxSize[1]||0,R=d.minSize[0]||0,S=d.minSize[1]||0,d.hasOwnProperty("outerImage")&&(D.attr("src",d.outerImage),delete d.outerImage),bb.refresh()}var d=a.extend({},a.Jcrop.defaults),e,f=navigator.userAgent.toLowerCase(),g=/msie/.test(f),h=/msie [1-6]\./.test(f);typeof b!="object"&&(b=a(b)[0]),typeof c!="object"&&(c={}),n(c);var z={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0},A=a(b),B=!0;if(b.tagName=="IMG"){if(A[0].width!=0&&A[0].height!=0)A.width(A[0].width),A.height(A[0].height);else{var C=new Image;C.src=A[0].src,A.width(C.width),A.height(C.height)}var D=A.clone().removeAttr("id").
|
12
|
-
css(z).show();D.width(A.width()),D.height(A.height()),A.after(D).hide()}else D=A.css(z).show(),B=!1,d.shade===null&&(d.shade=!0);t(D,d.boxWidth,d.boxHeight);var E=D.width(),F=D.height(),G=a("<div />").width(E).height(F).addClass(j("holder")).css({position:"relative",backgroundColor:d.bgColor}).insertAfter(A).append(D);d.addClass&&G.addClass(d.addClass);var H=a("<div />"),I=a("<div />").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),J=a("<div />").width("100%").height("100%").css("zIndex",320),K=a("<div />").css({position:"absolute",zIndex:600}).dblclick(function(){var a=_.getFixed();d.onDblClick.call(bs,a)}).insertBefore(D).append(I,J);B&&(H=a("<img />").attr("src",D.attr("src")).css(z).width(E).height(F),I.append(H)),h&&K.css({overflowY:"hidden"});var L=d.boundary,M=y().width(E+L*2).height(F+L*2).css({position:"absolute",top:i(-L),left:i(-L),zIndex:290}).mousedown(w),N=d.bgColor,O=d.bgOpacity,P,Q,R,S,T,U,V=!0,W,X,Y;e=l(D);var Z=function(){function a(){var a={},b=["touchstart"
|
13
|
-
,"touchmove","touchend"],c=document.createElement("div"),d;try{for(d=0;d<b.length;d++){var e=b[d];e="on"+e;var f=e in c;f||(c.setAttribute(e,"return;"),f=typeof c[e]=="function"),a[b[d]]=f}return a.touchstart&&a.touchend&&a.touchmove}catch(g){return!1}}function b(){return d.touchSupport===!0||d.touchSupport===!1?d.touchSupport:a()}return{createDragger:function(a){return function(b){return d.disabled?!1:a==="move"&&!d.allowMove?!1:(e=l(D),W=!0,o(a,m(Z.cfilter(b)),!0),b.stopPropagation(),b.preventDefault(),!1)}},newSelection:function(a){return w(Z.cfilter(a))},cfilter:function(a){return a.pageX=a.originalEvent.changedTouches[0].pageX,a.pageY=a.originalEvent.changedTouches[0].pageY,a},isSupported:a,support:b()}}(),_=function(){function h(d){d=n(d),c=a=d[0],e=b=d[1]}function i(a){a=n(a),f=a[0]-c,g=a[1]-e,c=a[0],e=a[1]}function j(){return[f,g]}function k(d){var f=d[0],g=d[1];0>a+f&&(f-=f+a),0>b+g&&(g-=g+b),F<e+g&&(g+=F-(e+g)),E<c+f&&(f+=E-(c+f)),a+=f,c+=f,b+=g,e+=g}function l(a){var b=m();switch(a){case"ne":return[
|
14
|
-
b.x2,b.y];case"nw":return[b.x,b.y];case"se":return[b.x2,b.y2];case"sw":return[b.x,b.y2]}}function m(){if(!d.aspectRatio)return p();var f=d.aspectRatio,g=d.minSize[0]/T,h=d.maxSize[0]/T,i=d.maxSize[1]/U,j=c-a,k=e-b,l=Math.abs(j),m=Math.abs(k),n=l/m,r,s,t,u;return h===0&&(h=E*10),i===0&&(i=F*10),n<f?(s=e,t=m*f,r=j<0?a-t:t+a,r<0?(r=0,u=Math.abs((r-a)/f),s=k<0?b-u:u+b):r>E&&(r=E,u=Math.abs((r-a)/f),s=k<0?b-u:u+b)):(r=c,u=l/f,s=k<0?b-u:b+u,s<0?(s=0,t=Math.abs((s-b)*f),r=j<0?a-t:t+a):s>F&&(s=F,t=Math.abs(s-b)*f,r=j<0?a-t:t+a)),r>a?(r-a<g?r=a+g:r-a>h&&(r=a+h),s>b?s=b+(r-a)/f:s=b-(r-a)/f):r<a&&(a-r<g?r=a-g:a-r>h&&(r=a-h),s>b?s=b+(a-r)/f:s=b-(a-r)/f),r<0?(a-=r,r=0):r>E&&(a-=r-E,r=E),s<0?(b-=s,s=0):s>F&&(b-=s-F,s=F),q(o(a,b,r,s))}function n(a){return a[0]<0&&(a[0]=0),a[1]<0&&(a[1]=0),a[0]>E&&(a[0]=E),a[1]>F&&(a[1]=F),[Math.round(a[0]),Math.round(a[1])]}function o(a,b,c,d){var e=a,f=c,g=b,h=d;return c<a&&(e=c,f=a),d<b&&(g=d,h=b),[e,g,f,h]}function p(){var d=c-a,f=e-b,g;return P&&Math.abs(d)>P&&(c=d>0?a+P:a-P),Q&&Math.abs
|
15
|
-
(f)>Q&&(e=f>0?b+Q:b-Q),S/U&&Math.abs(f)<S/U&&(e=f>0?b+S/U:b-S/U),R/T&&Math.abs(d)<R/T&&(c=d>0?a+R/T:a-R/T),a<0&&(c-=a,a-=a),b<0&&(e-=b,b-=b),c<0&&(a-=c,c-=c),e<0&&(b-=e,e-=e),c>E&&(g=c-E,a-=g,c-=g),e>F&&(g=e-F,b-=g,e-=g),a>E&&(g=a-F,e-=g,b-=g),b>F&&(g=b-F,e-=g,b-=g),q(o(a,b,c,e))}function q(a){return{x:a[0],y:a[1],x2:a[2],y2:a[3],w:a[2]-a[0],h:a[3]-a[1]}}var a=0,b=0,c=0,e=0,f,g;return{flipCoords:o,setPressed:h,setCurrent:i,getOffset:j,moveOffset:k,getCorner:l,getFixed:m}}(),ba=function(){function f(a,b){e.left.css({height:i(b)}),e.right.css({height:i(b)})}function g(){return h(_.getFixed())}function h(a){e.top.css({left:i(a.x),width:i(a.w),height:i(a.y)}),e.bottom.css({top:i(a.y2),left:i(a.x),width:i(a.w),height:i(F-a.y2)}),e.right.css({left:i(a.x2),width:i(E-a.x2)}),e.left.css({width:i(a.x)})}function j(){return a("<div />").css({position:"absolute",backgroundColor:d.shadeColor||d.bgColor}).appendTo(c)}function k(){b||(b=!0,c.insertBefore(D),g(),bb.setBgOpacity(1,0,1),H.hide(),l(d.shadeColor||d.bgColor,1),bb.
|
16
|
-
isAwake()?n(d.bgOpacity,1):n(1,1))}function l(a,b){bq(p(),a,b)}function m(){b&&(c.remove(),H.show(),b=!1,bb.isAwake()?bb.setBgOpacity(d.bgOpacity,1,1):(bb.setBgOpacity(1,1,1),bb.disableHandles()),bq(G,0,1))}function n(a,e){b&&(d.bgFade&&!e?c.animate({opacity:1-a},{queue:!1,duration:d.fadeTime}):c.css({opacity:1-a}))}function o(){d.shade?k():m(),bb.isAwake()&&n(d.bgOpacity)}function p(){return c.children()}var b=!1,c=a("<div />").css({position:"absolute",zIndex:240,opacity:0}),e={top:j(),left:j().height(F),right:j().height(F),bottom:j()};return{update:g,updateRaw:h,getShades:p,setBgColor:l,enable:k,disable:m,resize:f,refresh:o,opacity:n}}(),bb=function(){function k(b){var c=a("<div />").css({position:"absolute",opacity:d.borderOpacity}).addClass(j(b));return I.append(c),c}function l(b,c){var d=a("<div />").mousedown(s(b)).css({cursor:b+"-resize",position:"absolute",zIndex:c}).addClass("ord-"+b);return Z.support&&d.bind("touchstart.jcrop",Z.createDragger(b)),J.append(d),d}function m(a){var b=d.handleSize,e=l(a,c++
|
17
|
-
).css({opacity:d.handleOpacity}).addClass(j("handle"));return b&&e.width(b).height(b),e}function n(a){return l(a,c++).addClass("jcrop-dragbar")}function o(a){var b;for(b=0;b<a.length;b++)g[a[b]]=n(a[b])}function p(a){var b,c;for(c=0;c<a.length;c++){switch(a[c]){case"n":b="hline";break;case"s":b="hline bottom";break;case"e":b="vline right";break;case"w":b="vline"}e[a[c]]=k(b)}}function q(a){var b;for(b=0;b<a.length;b++)f[a[b]]=m(a[b])}function r(a,b){d.shade||H.css({top:i(-b),left:i(-a)}),K.css({top:i(b),left:i(a)})}function t(a,b){K.width(Math.round(a)).height(Math.round(b))}function v(){var a=_.getFixed();_.setPressed([a.x,a.y]),_.setCurrent([a.x2,a.y2]),w()}function w(a){if(b)return x(a)}function x(a){var c=_.getFixed();t(c.w,c.h),r(c.x,c.y),d.shade&&ba.updateRaw(c),b||A(),a?d.onSelect.call(bs,u(c)):d.onChange.call(bs,u(c))}function z(a,c,e){if(!b&&!c)return;d.bgFade&&!e?D.animate({opacity:a},{queue:!1,duration:d.fadeTime}):D.css("opacity",a)}function A(){K.show(),d.shade?ba.opacity(O):z(O,!0),b=!0}function B
|
18
|
-
(){F(),K.hide(),d.shade?ba.opacity(1):z(1),b=!1,d.onRelease.call(bs)}function C(){h&&J.show()}function E(){h=!0;if(d.allowResize)return J.show(),!0}function F(){h=!1,J.hide()}function G(a){a?(X=!0,F()):(X=!1,E())}function L(){G(!1),v()}var b,c=370,e={},f={},g={},h=!1;d.dragEdges&&a.isArray(d.createDragbars)&&o(d.createDragbars),a.isArray(d.createHandles)&&q(d.createHandles),d.drawBorders&&a.isArray(d.createBorders)&&p(d.createBorders),a(document).bind("touchstart.jcrop-ios",function(b){a(b.currentTarget).hasClass("jcrop-tracker")&&b.stopPropagation()});var M=y().mousedown(s("move")).css({cursor:"move",position:"absolute",zIndex:360});return Z.support&&M.bind("touchstart.jcrop",Z.createDragger("move")),I.append(M),F(),{updateVisible:w,update:x,release:B,refresh:v,isAwake:function(){return b},setCursor:function(a){M.css("cursor",a)},enableHandles:E,enableOnly:function(){h=!0},showHandles:C,disableHandles:F,animMode:G,setBgOpacity:z,done:L}}(),bc=function(){function f(b){M.css({zIndex:450}),b?a(document).bind("touchmove.jcrop"
|
19
|
-
,k).bind("touchend.jcrop",l):e&&a(document).bind("mousemove.jcrop",h).bind("mouseup.jcrop",i)}function g(){M.css({zIndex:290}),a(document).unbind(".jcrop")}function h(a){return b(m(a)),!1}function i(a){return a.preventDefault(),a.stopPropagation(),W&&(W=!1,c(m(a)),bb.isAwake()&&d.onSelect.call(bs,u(_.getFixed())),g(),b=function(){},c=function(){}),!1}function j(a,d,e){return W=!0,b=a,c=d,f(e),!1}function k(a){return b(m(Z.cfilter(a))),!1}function l(a){return i(Z.cfilter(a))}function n(a){M.css("cursor",a)}var b=function(){},c=function(){},e=d.trackDocument;return e||M.mousemove(h).mouseup(i).mouseout(i),D.before(M),{activateHandlers:j,setCursor:n}}(),bd=function(){function e(){d.keySupport&&(b.show(),b.focus())}function f(a){b.hide()}function g(a,b,c){d.allowMove&&(_.moveOffset([b,c]),bb.updateVisible(!0)),a.preventDefault(),a.stopPropagation()}function i(a){if(a.ctrlKey||a.metaKey)return!0;Y=a.shiftKey?!0:!1;var b=Y?10:1;switch(a.keyCode){case 37:g(a,-b,0);break;case 39:g(a,b,0);break;case 38:g(a,0,-b);break;
|
20
|
-
case 40:g(a,0,b);break;case 27:d.allowSelect&&bb.release();break;case 9:return!0}return!1}var b=a('<input type="radio" />').css({position:"fixed",left:"-120px",width:"12px"}).addClass("jcrop-keymgr"),c=a("<div />").css({position:"absolute",overflow:"hidden"}).append(b);return d.keySupport&&(b.keydown(i).blur(f),h||!d.fixedSupport?(b.css({position:"absolute",left:"-20px"}),c.append(b).insertBefore(D)):b.insertBefore(D)),{watchKeys:e}}();Z.support&&M.bind("touchstart.jcrop",Z.newSelection),J.hide(),br(!0);var bs={setImage:bp,animateTo:bf,setSelect:bg,setOptions:bk,tellSelect:bi,tellScaled:bj,setClass:be,disable:bl,enable:bm,cancel:bn,release:bb.release,destroy:bo,focus:bd.watchKeys,getBounds:function(){return[E*T,F*U]},getWidgetSize:function(){return[E,F]},getScaleFactor:function(){return[T,U]},getOptions:function(){return d},ui:{holder:G,selection:K}};return g&&G.bind("selectstart",function(){return!1}),A.data("Jcrop",bs),bs},a.fn.Jcrop=function(b,c){var d;return this.each(function(){if(a(this).data("Jcrop")){if(
|
21
|
-
b==="api")return a(this).data("Jcrop");a(this).data("Jcrop").setOptions(b)}else this.tagName=="IMG"?a.Jcrop.Loader(this,function(){a(this).css({display:"block",visibility:"hidden"}),d=a.Jcrop(this,b),a.isFunction(c)&&c.call(d)}):(a(this).css({display:"block",visibility:"hidden"}),d=a.Jcrop(this,b),a.isFunction(c)&&c.call(d))}),this},a.Jcrop.Loader=function(b,c,d){function g(){f.complete?(e.unbind(".jcloader"),a.isFunction(c)&&c.call(f)):window.setTimeout(g,50)}var e=a(b),f=e[0];e.bind("load.jcloader",g).bind("error.jcloader",function(b){e.unbind(".jcloader"),a.isFunction(d)&&d.call(f)}),f.complete&&a.isFunction(c)&&(e.unbind(".jcloader"),c.call(f))},a.Jcrop.defaults={allowSelect:!0,allowMove:!0,allowResize:!0,trackDocument:!0,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:.6,bgFade:!1,borderOpacity:.4,handleOpacity:.5,handleSize:null,aspectRatio:0,keySupport:!0,createHandles:["n","s","e","w","nw","ne","se","sw"],createDragbars:["n","s","e","w"],createBorders:["n","s","e","w"],drawBorders:!0,dragEdges
|
22
|
-
:!0,fixedSupport:!0,touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}}})(jQuery);
|
7
|
+
!function($){$.Jcrop=function(obj,opt){function px(n){return Math.round(n)+"px"}function cssClass(cl){return options.baseClass+"-"+cl}function supportsColorFade(){return $.fx.step.hasOwnProperty("backgroundColor")}function getPos(obj){var pos=$(obj).offset();return[pos.left,pos.top]}function mouseAbs(e){return[e.pageX-docOffset[0],e.pageY-docOffset[1]]}function setOptions(opt){"object"!=typeof opt&&(opt={}),options=$.extend(options,opt),$.each(["onChange","onSelect","onRelease","onDblClick"],function(i,e){"function"!=typeof options[e]&&(options[e]=function(){})})}function startDragMode(mode,pos,touch){if(docOffset=getPos($img),Tracker.setCursor("move"===mode?mode:mode+"-resize"),"move"===mode)return Tracker.activateHandlers(createMover(pos),doneSelect,touch);var fc=Coords.getFixed(),opp=oppLockCorner(mode),opc=Coords.getCorner(oppLockCorner(opp));Coords.setPressed(Coords.getCorner(opp)),Coords.setCurrent(opc),Tracker.activateHandlers(dragmodeHandler(mode,fc),doneSelect,touch)}function dragmodeHandler(mode,f){return function(pos){if(options.aspectRatio)switch(mode){case"e":pos[1]=f.y+1;break;case"w":pos[1]=f.y+1;break;case"n":pos[0]=f.x+1;break;case"s":pos[0]=f.x+1}else switch(mode){case"e":pos[1]=f.y2;break;case"w":pos[1]=f.y2;break;case"n":pos[0]=f.x2;break;case"s":pos[0]=f.x2}Coords.setCurrent(pos),Selection.update()}}function createMover(pos){var lloc=pos;return KeyManager.watchKeys(),function(pos){Coords.moveOffset([pos[0]-lloc[0],pos[1]-lloc[1]]),lloc=pos,Selection.update()}}function oppLockCorner(ord){switch(ord){case"n":return"sw";case"s":return"nw";case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function createDragger(ord){return function(e){return options.disabled?!1:"move"!==ord||options.allowMove?(docOffset=getPos($img),btndown=!0,startDragMode(ord,mouseAbs(e)),e.stopPropagation(),e.preventDefault(),!1):!1}}function presize($obj,w,h){var nw=$obj.width(),nh=$obj.height();nw>w&&w>0&&(nw=w,nh=w/$obj.width()*$obj.height()),nh>h&&h>0&&(nh=h,nw=h/$obj.height()*$obj.width()),xscale=$obj.width()/nw,yscale=$obj.height()/nh,$obj.width(nw).height(nh)}function unscale(c){return{x:c.x*xscale,y:c.y*yscale,x2:c.x2*xscale,y2:c.y2*yscale,w:c.w*xscale,h:c.h*yscale}}function doneSelect(){var c=Coords.getFixed();c.w>options.minSelect[0]&&c.h>options.minSelect[1]?(Selection.enableHandles(),Selection.done()):Selection.release(),Tracker.setCursor(options.allowSelect?"crosshair":"default")}function newSelection(e){if(!options.disabled&&options.allowSelect){btndown=!0,docOffset=getPos($img),Selection.disableHandles(),Tracker.setCursor("crosshair");var pos=mouseAbs(e);return Coords.setPressed(pos),Selection.update(),Tracker.activateHandlers(selectDrag,doneSelect,"touch"===e.type.substring(0,5)),KeyManager.watchKeys(),e.stopPropagation(),e.preventDefault(),!1}}function selectDrag(pos){Coords.setCurrent(pos),Selection.update()}function newTracker(){var trk=$("<div></div>").addClass(cssClass("tracker"));return is_msie&&trk.css({opacity:0,backgroundColor:"white"}),trk}function setClass(cname){$div.removeClass().addClass(cssClass("holder")).addClass(cname)}function animateTo(a,callback){function queueAnimator(){window.setTimeout(animator,interv)}var x1=a[0]/xscale,y1=a[1]/yscale,x2=a[2]/xscale,y2=a[3]/yscale;if(!animating){var animto=Coords.flipCoords(x1,y1,x2,y2),c=Coords.getFixed(),initcr=[c.x,c.y,c.x2,c.y2],animat=initcr,interv=options.animationDelay,ix1=animto[0]-initcr[0],iy1=animto[1]-initcr[1],ix2=animto[2]-initcr[2],iy2=animto[3]-initcr[3],pcent=0,velocity=options.swingSpeed;x1=animat[0],y1=animat[1],x2=animat[2],y2=animat[3],Selection.animMode(!0);var animator=function(){return function(){pcent+=(100-pcent)/velocity,animat[0]=Math.round(x1+pcent/100*ix1),animat[1]=Math.round(y1+pcent/100*iy1),animat[2]=Math.round(x2+pcent/100*ix2),animat[3]=Math.round(y2+pcent/100*iy2),pcent>=99.8&&(pcent=100),100>pcent?(setSelectRaw(animat),queueAnimator()):(Selection.done(),Selection.animMode(!1),"function"==typeof callback&&callback.call(api))}}();queueAnimator()}}function setSelect(rect){setSelectRaw([rect[0]/xscale,rect[1]/yscale,rect[2]/xscale,rect[3]/yscale]),options.onSelect.call(api,unscale(Coords.getFixed())),Selection.enableHandles()}function setSelectRaw(l){Coords.setPressed([l[0],l[1]]),Coords.setCurrent([l[2],l[3]]),Selection.update()}function tellSelect(){return unscale(Coords.getFixed())}function tellScaled(){return Coords.getFixed()}function setOptionsNew(opt){setOptions(opt),interfaceUpdate()}function disableCrop(){options.disabled=!0,Selection.disableHandles(),Selection.setCursor("default"),Tracker.setCursor("default")}function enableCrop(){options.disabled=!1,interfaceUpdate()}function cancelCrop(){Selection.done(),Tracker.activateHandlers(null,null)}function destroy(){$div.remove(),$origimg.show(),$origimg.css("visibility","visible"),$(obj).removeData("Jcrop")}function setImage(src,callback){Selection.release(),disableCrop();var img=new Image;img.onload=function(){var iw=img.width,ih=img.height,bw=options.boxWidth,bh=options.boxHeight;$img.width(iw).height(ih),$img.attr("src",src),$img2.attr("src",src),presize($img,bw,bh),boundx=$img.width(),boundy=$img.height(),$img2.width(boundx).height(boundy),$trk.width(boundx+2*bound).height(boundy+2*bound),$div.width(boundx).height(boundy),Shade.resize(boundx,boundy),enableCrop(),"function"==typeof callback&&callback.call(api)},img.src=src}function colorChangeMacro($obj,color,now){var mycolor=color||options.bgColor;options.bgFade&&supportsColorFade()&&options.fadeTime&&!now?$obj.animate({backgroundColor:mycolor},{queue:!1,duration:options.fadeTime}):$obj.css("backgroundColor",mycolor)}function interfaceUpdate(alt){options.allowResize?alt?Selection.enableOnly():Selection.enableHandles():Selection.disableHandles(),Tracker.setCursor(options.allowSelect?"crosshair":"default"),Selection.setCursor(options.allowMove?"move":"default"),options.hasOwnProperty("trueSize")&&(xscale=options.trueSize[0]/boundx,yscale=options.trueSize[1]/boundy),options.hasOwnProperty("setSelect")&&(setSelect(options.setSelect),Selection.done(),delete options.setSelect),Shade.refresh(),options.bgColor!=bgcolor&&(colorChangeMacro(options.shade?Shade.getShades():$div,options.shade?options.shadeColor||options.bgColor:options.bgColor),bgcolor=options.bgColor),bgopacity!=options.bgOpacity&&(bgopacity=options.bgOpacity,options.shade?Shade.refresh():Selection.setBgOpacity(bgopacity)),xlimit=options.maxSize[0]||0,ylimit=options.maxSize[1]||0,xmin=options.minSize[0]||0,ymin=options.minSize[1]||0,options.hasOwnProperty("outerImage")&&($img.attr("src",options.outerImage),delete options.outerImage),Selection.refresh()}var docOffset,options=$.extend({},$.Jcrop.defaults),_ua=navigator.userAgent.toLowerCase(),is_msie=/msie/.test(_ua),ie6mode=/msie [1-6]\./.test(_ua);"object"!=typeof obj&&(obj=$(obj)[0]),"object"!=typeof opt&&(opt={}),setOptions(opt);var img_css={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0},$origimg=$(obj),img_mode=!0;if("IMG"==obj.tagName){if(0!=$origimg[0].width&&0!=$origimg[0].height)$origimg.width($origimg[0].width),$origimg.height($origimg[0].height);else{var tempImage=new Image;tempImage.src=$origimg[0].src,$origimg.width(tempImage.width),$origimg.height(tempImage.height)}var $img=$origimg.clone().removeAttr("id").css(img_css).show();$img.width($origimg.width()),$img.height($origimg.height()),$origimg.after($img).hide()}else $img=$origimg.css(img_css).show(),img_mode=!1,null===options.shade&&(options.shade=!0);presize($img,options.boxWidth,options.boxHeight);var boundx=$img.width(),boundy=$img.height(),$div=$("<div />").width(boundx).height(boundy).addClass(cssClass("holder")).css({position:"relative",backgroundColor:options.bgColor}).insertAfter($origimg).append($img);options.addClass&&$div.addClass(options.addClass);var $img2=$("<div />"),$img_holder=$("<div />").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),$hdl_holder=$("<div />").width("100%").height("100%").css("zIndex",320),$sel=$("<div />").css({position:"absolute",zIndex:600}).dblclick(function(){var c=Coords.getFixed();options.onDblClick.call(api,c)}).insertBefore($img).append($img_holder,$hdl_holder);img_mode&&($img2=$("<img />").attr("src",$img.attr("src")).css(img_css).width(boundx).height(boundy),$img_holder.append($img2)),ie6mode&&$sel.css({overflowY:"hidden"});var xlimit,ylimit,xmin,ymin,xscale,yscale,btndown,animating,shift_down,bound=options.boundary,$trk=newTracker().width(boundx+2*bound).height(boundy+2*bound).css({position:"absolute",top:px(-bound),left:px(-bound),zIndex:290}).mousedown(newSelection),bgcolor=options.bgColor,bgopacity=options.bgOpacity;docOffset=getPos($img);var Touch=function(){function hasTouchSupport(){var i,support={},events=["touchstart","touchmove","touchend"],el=document.createElement("div");try{for(i=0;i<events.length;i++){var eventName=events[i];eventName="on"+eventName;var isSupported=eventName in el;isSupported||(el.setAttribute(eventName,"return;"),isSupported="function"==typeof el[eventName]),support[events[i]]=isSupported}return support.touchstart&&support.touchend&&support.touchmove}catch(err){return!1}}function detectSupport(){return options.touchSupport===!0||options.touchSupport===!1?options.touchSupport:hasTouchSupport()}return{createDragger:function(ord){return function(e){return options.disabled?!1:"move"!==ord||options.allowMove?(docOffset=getPos($img),btndown=!0,startDragMode(ord,mouseAbs(Touch.cfilter(e)),!0),e.stopPropagation(),e.preventDefault(),!1):!1}},newSelection:function(e){return newSelection(Touch.cfilter(e))},cfilter:function(e){return e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e},isSupported:hasTouchSupport,support:detectSupport()}}(),Coords=function(){function setPressed(pos){pos=rebound(pos),x2=x1=pos[0],y2=y1=pos[1]}function setCurrent(pos){pos=rebound(pos),ox=pos[0]-x2,oy=pos[1]-y2,x2=pos[0],y2=pos[1]}function getOffset(){return[ox,oy]}function moveOffset(offset){var ox=offset[0],oy=offset[1];0>x1+ox&&(ox-=ox+x1),0>y1+oy&&(oy-=oy+y1),y2+oy>boundy&&(oy+=boundy-(y2+oy)),x2+ox>boundx&&(ox+=boundx-(x2+ox)),x1+=ox,x2+=ox,y1+=oy,y2+=oy}function getCorner(ord){var c=getFixed();switch(ord){case"ne":return[c.x2,c.y];case"nw":return[c.x,c.y];case"se":return[c.x2,c.y2];case"sw":return[c.x,c.y2]}}function getFixed(){if(!options.aspectRatio)return getRect();var xx,yy,w,h,aspect=options.aspectRatio,min_x=options.minSize[0]/xscale,max_x=options.maxSize[0]/xscale,max_y=options.maxSize[1]/yscale,rw=x2-x1,rh=y2-y1,rwa=Math.abs(rw),rha=Math.abs(rh),real_ratio=rwa/rha;return 0===max_x&&(max_x=10*boundx),0===max_y&&(max_y=10*boundy),aspect>real_ratio?(yy=y2,w=rha*aspect,xx=0>rw?x1-w:w+x1,0>xx?(xx=0,h=Math.abs((xx-x1)/aspect),yy=0>rh?y1-h:h+y1):xx>boundx&&(xx=boundx,h=Math.abs((xx-x1)/aspect),yy=0>rh?y1-h:h+y1)):(xx=x2,h=rwa/aspect,yy=0>rh?y1-h:y1+h,0>yy?(yy=0,w=Math.abs((yy-y1)*aspect),xx=0>rw?x1-w:w+x1):yy>boundy&&(yy=boundy,w=Math.abs(yy-y1)*aspect,xx=0>rw?x1-w:w+x1)),xx>x1?(min_x>xx-x1?xx=x1+min_x:xx-x1>max_x&&(xx=x1+max_x),yy=yy>y1?y1+(xx-x1)/aspect:y1-(xx-x1)/aspect):x1>xx&&(min_x>x1-xx?xx=x1-min_x:x1-xx>max_x&&(xx=x1-max_x),yy=yy>y1?y1+(x1-xx)/aspect:y1-(x1-xx)/aspect),0>xx?(x1-=xx,xx=0):xx>boundx&&(x1-=xx-boundx,xx=boundx),0>yy?(y1-=yy,yy=0):yy>boundy&&(y1-=yy-boundy,yy=boundy),makeObj(flipCoords(x1,y1,xx,yy))}function rebound(p){return p[0]<0&&(p[0]=0),p[1]<0&&(p[1]=0),p[0]>boundx&&(p[0]=boundx),p[1]>boundy&&(p[1]=boundy),[Math.round(p[0]),Math.round(p[1])]}function flipCoords(x1,y1,x2,y2){var xa=x1,xb=x2,ya=y1,yb=y2;return x1>x2&&(xa=x2,xb=x1),y1>y2&&(ya=y2,yb=y1),[xa,ya,xb,yb]}function getRect(){var delta,xsize=x2-x1,ysize=y2-y1;return xlimit&&Math.abs(xsize)>xlimit&&(x2=xsize>0?x1+xlimit:x1-xlimit),ylimit&&Math.abs(ysize)>ylimit&&(y2=ysize>0?y1+ylimit:y1-ylimit),ymin/yscale&&Math.abs(ysize)<ymin/yscale&&(y2=ysize>0?y1+ymin/yscale:y1-ymin/yscale),xmin/xscale&&Math.abs(xsize)<xmin/xscale&&(x2=xsize>0?x1+xmin/xscale:x1-xmin/xscale),0>x1&&(x2-=x1,x1-=x1),0>y1&&(y2-=y1,y1-=y1),0>x2&&(x1-=x2,x2-=x2),0>y2&&(y1-=y2,y2-=y2),x2>boundx&&(delta=x2-boundx,x1-=delta,x2-=delta),y2>boundy&&(delta=y2-boundy,y1-=delta,y2-=delta),x1>boundx&&(delta=x1-boundy,y2-=delta,y1-=delta),y1>boundy&&(delta=y1-boundy,y2-=delta,y1-=delta),makeObj(flipCoords(x1,y1,x2,y2))}function makeObj(a){return{x:a[0],y:a[1],x2:a[2],y2:a[3],w:a[2]-a[0],h:a[3]-a[1]}}var ox,oy,x1=0,y1=0,x2=0,y2=0;return{flipCoords:flipCoords,setPressed:setPressed,setCurrent:setCurrent,getOffset:getOffset,moveOffset:moveOffset,getCorner:getCorner,getFixed:getFixed}}(),Shade=function(){function resizeShades(w,h){shades.left.css({height:px(h)}),shades.right.css({height:px(h)})}function updateAuto(){return updateShade(Coords.getFixed())}function updateShade(c){shades.top.css({left:px(c.x),width:px(c.w),height:px(c.y)}),shades.bottom.css({top:px(c.y2),left:px(c.x),width:px(c.w),height:px(boundy-c.y2)}),shades.right.css({left:px(c.x2),width:px(boundx-c.x2)}),shades.left.css({width:px(c.x)})}function createShade(){return $("<div />").css({position:"absolute",backgroundColor:options.shadeColor||options.bgColor}).appendTo(holder)}function enableShade(){enabled||(enabled=!0,holder.insertBefore($img),updateAuto(),Selection.setBgOpacity(1,0,1),$img2.hide(),setBgColor(options.shadeColor||options.bgColor,1),Selection.isAwake()?setOpacity(options.bgOpacity,1):setOpacity(1,1))}function setBgColor(color,now){colorChangeMacro(getShades(),color,now)}function disableShade(){enabled&&(holder.remove(),$img2.show(),enabled=!1,Selection.isAwake()?Selection.setBgOpacity(options.bgOpacity,1,1):(Selection.setBgOpacity(1,1,1),Selection.disableHandles()),colorChangeMacro($div,0,1))}function setOpacity(opacity,now){enabled&&(options.bgFade&&!now?holder.animate({opacity:1-opacity},{queue:!1,duration:options.fadeTime}):holder.css({opacity:1-opacity}))}function refreshAll(){options.shade?enableShade():disableShade(),Selection.isAwake()&&setOpacity(options.bgOpacity)}function getShades(){return holder.children()}var enabled=!1,holder=$("<div />").css({position:"absolute",zIndex:240,opacity:0}),shades={top:createShade(),left:createShade().height(boundy),right:createShade().height(boundy),bottom:createShade()};return{update:updateAuto,updateRaw:updateShade,getShades:getShades,setBgColor:setBgColor,enable:enableShade,disable:disableShade,resize:resizeShades,refresh:refreshAll,opacity:setOpacity}}(),Selection=function(){function insertBorder(type){var jq=$("<div />").css({position:"absolute",opacity:options.borderOpacity}).addClass(cssClass(type));return $img_holder.append(jq),jq}function dragDiv(ord,zi){var jq=$("<div />").mousedown(createDragger(ord)).css({cursor:ord+"-resize",position:"absolute",zIndex:zi}).addClass("ord-"+ord);return Touch.support&&jq.bind("touchstart.jcrop",Touch.createDragger(ord)),$hdl_holder.append(jq),jq}function insertHandle(ord){var hs=options.handleSize,div=dragDiv(ord,hdep++).css({opacity:options.handleOpacity}).addClass(cssClass("handle"));return hs&&div.width(hs).height(hs),div}function insertDragbar(ord){return dragDiv(ord,hdep++).addClass("jcrop-dragbar")}function createDragbars(li){var i;for(i=0;i<li.length;i++)dragbar[li[i]]=insertDragbar(li[i])}function createBorders(li){var cl,i;for(i=0;i<li.length;i++){switch(li[i]){case"n":cl="hline";break;case"s":cl="hline bottom";break;case"e":cl="vline right";break;case"w":cl="vline"}borders[li[i]]=insertBorder(cl)}}function createHandles(li){var i;for(i=0;i<li.length;i++)handle[li[i]]=insertHandle(li[i])}function moveto(x,y){options.shade||$img2.css({top:px(-y),left:px(-x)}),$sel.css({top:px(y),left:px(x)})}function resize(w,h){$sel.width(Math.round(w)).height(Math.round(h))}function refresh(){var c=Coords.getFixed();Coords.setPressed([c.x,c.y]),Coords.setCurrent([c.x2,c.y2]),updateVisible()}function updateVisible(select){return awake?update(select):void 0}function update(select){var c=Coords.getFixed();resize(c.w,c.h),moveto(c.x,c.y),options.shade&&Shade.updateRaw(c),awake||show(),select?options.onSelect.call(api,unscale(c)):options.onChange.call(api,unscale(c))}function setBgOpacity(opacity,force,now){(awake||force)&&(options.bgFade&&!now?$img.animate({opacity:opacity},{queue:!1,duration:options.fadeTime}):$img.css("opacity",opacity))}function show(){$sel.show(),options.shade?Shade.opacity(bgopacity):setBgOpacity(bgopacity,!0),awake=!0}function release(){disableHandles(),$sel.hide(),options.shade?Shade.opacity(1):setBgOpacity(1),awake=!1,options.onRelease.call(api)}function showHandles(){seehandles&&$hdl_holder.show()}function enableHandles(){return seehandles=!0,options.allowResize?($hdl_holder.show(),!0):void 0}function disableHandles(){seehandles=!1,$hdl_holder.hide()}function animMode(v){v?(animating=!0,disableHandles()):(animating=!1,enableHandles())}function done(){animMode(!1),refresh()}var awake,hdep=370,borders={},handle={},dragbar={},seehandles=!1;options.dragEdges&&$.isArray(options.createDragbars)&&createDragbars(options.createDragbars),$.isArray(options.createHandles)&&createHandles(options.createHandles),options.drawBorders&&$.isArray(options.createBorders)&&createBorders(options.createBorders),$(document).bind("touchstart.jcrop-ios",function(e){$(e.currentTarget).hasClass("jcrop-tracker")&&e.stopPropagation()});var $track=newTracker().mousedown(createDragger("move")).css({cursor:"move",position:"absolute",zIndex:360});return Touch.support&&$track.bind("touchstart.jcrop",Touch.createDragger("move")),$img_holder.append($track),disableHandles(),{updateVisible:updateVisible,update:update,release:release,refresh:refresh,isAwake:function(){return awake},setCursor:function(cursor){$track.css("cursor",cursor)},enableHandles:enableHandles,enableOnly:function(){seehandles=!0},showHandles:showHandles,disableHandles:disableHandles,animMode:animMode,setBgOpacity:setBgOpacity,done:done}}(),Tracker=function(){function toFront(touch){$trk.css({zIndex:450}),touch?$(document).bind("touchmove.jcrop",trackTouchMove).bind("touchend.jcrop",trackTouchEnd):trackDoc&&$(document).bind("mousemove.jcrop",trackMove).bind("mouseup.jcrop",trackUp)}function toBack(){$trk.css({zIndex:290}),$(document).unbind(".jcrop")}function trackMove(e){return onMove(mouseAbs(e)),!1}function trackUp(e){return e.preventDefault(),e.stopPropagation(),btndown&&(btndown=!1,onDone(mouseAbs(e)),Selection.isAwake()&&options.onSelect.call(api,unscale(Coords.getFixed())),toBack(),onMove=function(){},onDone=function(){}),!1}function activateHandlers(move,done,touch){return btndown=!0,onMove=move,onDone=done,toFront(touch),!1}function trackTouchMove(e){return onMove(mouseAbs(Touch.cfilter(e))),!1}function trackTouchEnd(e){return trackUp(Touch.cfilter(e))}function setCursor(t){$trk.css("cursor",t)}var onMove=function(){},onDone=function(){},trackDoc=options.trackDocument;return trackDoc||$trk.mousemove(trackMove).mouseup(trackUp).mouseout(trackUp),$img.before($trk),{activateHandlers:activateHandlers,setCursor:setCursor}}(),KeyManager=function(){function watchKeys(){options.keySupport&&($keymgr.show(),$keymgr.focus())}function onBlur(){$keymgr.hide()}function doNudge(e,x,y){options.allowMove&&(Coords.moveOffset([x,y]),Selection.updateVisible(!0)),e.preventDefault(),e.stopPropagation()}function parseKey(e){if(e.ctrlKey||e.metaKey)return!0;shift_down=e.shiftKey?!0:!1;var nudge=shift_down?10:1;switch(e.keyCode){case 37:doNudge(e,-nudge,0);break;case 39:doNudge(e,nudge,0);break;case 38:doNudge(e,0,-nudge);break;case 40:doNudge(e,0,nudge);break;case 27:options.allowSelect&&Selection.release();break;case 9:return!0}return!1}var $keymgr=$('<input type="radio" />').css({position:"fixed",left:"-120px",width:"12px"}).addClass("jcrop-keymgr"),$keywrap=$("<div />").css({position:"absolute",overflow:"hidden"}).append($keymgr);return options.keySupport&&($keymgr.keydown(parseKey).blur(onBlur),ie6mode||!options.fixedSupport?($keymgr.css({position:"absolute",left:"-20px"}),$keywrap.append($keymgr).insertBefore($img)):$keymgr.insertBefore($img)),{watchKeys:watchKeys}}();Touch.support&&$trk.bind("touchstart.jcrop",Touch.newSelection),$hdl_holder.hide(),interfaceUpdate(!0);var api={setImage:setImage,animateTo:animateTo,setSelect:setSelect,setOptions:setOptionsNew,tellSelect:tellSelect,tellScaled:tellScaled,setClass:setClass,disable:disableCrop,enable:enableCrop,cancel:cancelCrop,release:Selection.release,destroy:destroy,focus:KeyManager.watchKeys,getBounds:function(){return[boundx*xscale,boundy*yscale]},getWidgetSize:function(){return[boundx,boundy]},getScaleFactor:function(){return[xscale,yscale]},getOptions:function(){return options},ui:{holder:$div,selection:$sel}};return is_msie&&$div.bind("selectstart",function(){return!1}),$origimg.data("Jcrop",api),api},$.fn.Jcrop=function(options,callback){var api;return this.each(function(){if($(this).data("Jcrop")){if("api"===options)return $(this).data("Jcrop");$(this).data("Jcrop").setOptions(options)}else"IMG"==this.tagName?$.Jcrop.Loader(this,function(){$(this).css({display:"block",visibility:"hidden"}),api=$.Jcrop(this,options),$.isFunction(callback)&&callback.call(api)}):($(this).css({display:"block",visibility:"hidden"}),api=$.Jcrop(this,options),$.isFunction(callback)&&callback.call(api))}),this},$.Jcrop.Loader=function(imgobj,success,error){function completeCheck(){img.complete?($img.unbind(".jcloader"),$.isFunction(success)&&success.call(img)):window.setTimeout(completeCheck,50)}var $img=$(imgobj),img=$img[0];$img.bind("load.jcloader",completeCheck).bind("error.jcloader",function(){$img.unbind(".jcloader"),$.isFunction(error)&&error.call(img)}),img.complete&&$.isFunction(success)&&($img.unbind(".jcloader"),success.call(img))},$.Jcrop.defaults={allowSelect:!0,allowMove:!0,allowResize:!0,trackDocument:!0,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:.6,bgFade:!1,borderOpacity:.4,handleOpacity:.5,handleSize:null,aspectRatio:0,keySupport:!0,createHandles:["n","s","e","w","nw","ne","se","sw"],createDragbars:["n","s","e","w"],createBorders:["n","s","e","w"],drawBorders:!0,dragEdges:!0,fixedSupport:!0,touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}}}(jQuery);
|
@@ -1,28 +1,2 @@
|
|
1
|
-
/* jquery.Jcrop.min.css v0.9.
|
2
|
-
.jcrop-holder{direction:ltr;text-align:left;}
|
3
|
-
.jcrop-vline,.jcrop-hline{background:#FFF image-url('Jcrop.gif') top left repeat;font-size:0;position:absolute;}
|
4
|
-
.jcrop-vline{height:100%;width:1px!important;}
|
5
|
-
.jcrop-hline{height:1px!important;width:100%;}
|
6
|
-
.jcrop-vline.right{right:0;}
|
7
|
-
.jcrop-hline.bottom{bottom:0;}
|
8
|
-
.jcrop-handle{background-color:#333;border:1px #eee solid;font-size:1px;}
|
9
|
-
.jcrop-tracker{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;height:100%;width:100%;}
|
10
|
-
.jcrop-handle.ord-n{left:50%;margin-left:-4px;margin-top:-4px;top:0;}
|
11
|
-
.jcrop-handle.ord-s{bottom:0;left:50%;margin-bottom:-4px;margin-left:-4px;}
|
12
|
-
.jcrop-handle.ord-e{margin-right:-4px;margin-top:-4px;right:0;top:50%;}
|
13
|
-
.jcrop-handle.ord-w{left:0;margin-left:-4px;margin-top:-4px;top:50%;}
|
14
|
-
.jcrop-handle.ord-nw{left:0;margin-left:-4px;margin-top:-4px;top:0;}
|
15
|
-
.jcrop-handle.ord-ne{margin-right:-4px;margin-top:-4px;right:0;top:0;}
|
16
|
-
.jcrop-handle.ord-se{bottom:0;margin-bottom:-4px;margin-right:-4px;right:0;}
|
17
|
-
.jcrop-handle.ord-sw{bottom:0;left:0;margin-bottom:-4px;margin-left:-4px;}
|
18
|
-
.jcrop-dragbar.ord-n,.jcrop-dragbar.ord-s{height:7px;width:100%;}
|
19
|
-
.jcrop-dragbar.ord-e,.jcrop-dragbar.ord-w{height:100%;width:7px;}
|
20
|
-
.jcrop-dragbar.ord-n{margin-top:-4px;}
|
21
|
-
.jcrop-dragbar.ord-s{bottom:0;margin-bottom:-4px;}
|
22
|
-
.jcrop-dragbar.ord-e{margin-right:-4px;right:0;}
|
23
|
-
.jcrop-dragbar.ord-w{margin-left:-4px;}
|
24
|
-
.jcrop-light .jcrop-vline,.jcrop-light .jcrop-hline{background:#FFF;filter:Alpha(opacity=70)!important;opacity:.70!important;}
|
25
|
-
.jcrop-light .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#000;border-color:#FFF;border-radius:3px;}
|
26
|
-
.jcrop-dark .jcrop-vline,.jcrop-dark .jcrop-hline{background:#000;filter:Alpha(opacity=70)!important;opacity:.7!important;}
|
27
|
-
.jcrop-dark .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#FFF;border-color:#000;border-radius:3px;}
|
28
|
-
.jcrop-holder img,img.jcrop-preview{max-width:none;}
|
1
|
+
/* jquery.Jcrop.min.css v0.9.15 (build:20180819) */
|
2
|
+
.jcrop-holder{direction:ltr;text-align:left;-ms-touch-action:none}.jcrop-hline,.jcrop-vline{background:#fff image-url("Jcrop.gif");font-size:0;position:absolute}.jcrop-vline{height:100%;width:1px!important}.jcrop-vline.right{right:0}.jcrop-hline{height:1px!important;width:100%}.jcrop-hline.bottom{bottom:0}.jcrop-tracker{height:100%;width:100%;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none}.jcrop-handle{background-color:#333;border:1px #eee solid;width:7px;height:7px;font-size:1px}.jcrop-handle.ord-n{left:50%;margin-left:-4px;margin-top:-4px;top:0}.jcrop-handle.ord-s{bottom:0;left:50%;margin-bottom:-4px;margin-left:-4px}.jcrop-handle.ord-e{margin-right:-4px;margin-top:-4px;right:0;top:50%}.jcrop-handle.ord-w{left:0;margin-left:-4px;margin-top:-4px;top:50%}.jcrop-handle.ord-nw{left:0;margin-left:-4px;margin-top:-4px;top:0}.jcrop-handle.ord-ne{margin-right:-4px;margin-top:-4px;right:0;top:0}.jcrop-handle.ord-se{bottom:0;margin-bottom:-4px;margin-right:-4px;right:0}.jcrop-handle.ord-sw{bottom:0;left:0;margin-bottom:-4px;margin-left:-4px}.jcrop-dragbar.ord-n,.jcrop-dragbar.ord-s{height:7px;width:100%}.jcrop-dragbar.ord-e,.jcrop-dragbar.ord-w{height:100%;width:7px}.jcrop-dragbar.ord-n{margin-top:-4px}.jcrop-dragbar.ord-s{bottom:0;margin-bottom:-4px}.jcrop-dragbar.ord-e{margin-right:-4px;right:0}.jcrop-dragbar.ord-w{margin-left:-4px}.jcrop-light .jcrop-hline,.jcrop-light .jcrop-vline{background:#fff;filter:alpha(opacity=70)!important;opacity:.7!important}.jcrop-light .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#000;border-color:#fff;border-radius:3px}.jcrop-dark .jcrop-hline,.jcrop-dark .jcrop-vline{background:#000;filter:alpha(opacity=70)!important;opacity:.7!important}.jcrop-dark .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#fff;border-color:#000;border-radius:3px}.solid-line .jcrop-hline,.solid-line .jcrop-vline{background:#fff}.jcrop-holder img,img.jcrop-preview{max-width:none}
|
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:
|
4
|
+
version: 6.0.0.pre.b4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas von Deyen
|
@@ -13,8 +13,168 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2021-
|
16
|
+
date: 2021-08-27 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
|
+
- !ruby/object:Gem::Dependency
|
19
|
+
name: actionmailer
|
20
|
+
requirement: !ruby/object:Gem::Requirement
|
21
|
+
requirements:
|
22
|
+
- - ">="
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: '6.0'
|
25
|
+
- - "<"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '6.1'
|
28
|
+
type: :runtime
|
29
|
+
prerelease: false
|
30
|
+
version_requirements: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '6.0'
|
35
|
+
- - "<"
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '6.1'
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
name: actionpack
|
40
|
+
requirement: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '6.0'
|
45
|
+
- - "<"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '6.1'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '6.0'
|
55
|
+
- - "<"
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '6.1'
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: actionview
|
60
|
+
requirement: !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: '6.0'
|
65
|
+
- - "<"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '6.1'
|
68
|
+
type: :runtime
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '6.0'
|
75
|
+
- - "<"
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '6.1'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: activejob
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '6.0'
|
85
|
+
- - "<"
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '6.1'
|
88
|
+
type: :runtime
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '6.0'
|
95
|
+
- - "<"
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '6.1'
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: activemodel
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '6.0'
|
105
|
+
- - "<"
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: '6.1'
|
108
|
+
type: :runtime
|
109
|
+
prerelease: false
|
110
|
+
version_requirements: !ruby/object:Gem::Requirement
|
111
|
+
requirements:
|
112
|
+
- - ">="
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '6.0'
|
115
|
+
- - "<"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '6.1'
|
118
|
+
- !ruby/object:Gem::Dependency
|
119
|
+
name: activerecord
|
120
|
+
requirement: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '6.0'
|
125
|
+
- - "<"
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '6.1'
|
128
|
+
type: :runtime
|
129
|
+
prerelease: false
|
130
|
+
version_requirements: !ruby/object:Gem::Requirement
|
131
|
+
requirements:
|
132
|
+
- - ">="
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '6.0'
|
135
|
+
- - "<"
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '6.1'
|
138
|
+
- !ruby/object:Gem::Dependency
|
139
|
+
name: activesupport
|
140
|
+
requirement: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '6.0'
|
145
|
+
- - "<"
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: '6.1'
|
148
|
+
type: :runtime
|
149
|
+
prerelease: false
|
150
|
+
version_requirements: !ruby/object:Gem::Requirement
|
151
|
+
requirements:
|
152
|
+
- - ">="
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: '6.0'
|
155
|
+
- - "<"
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '6.1'
|
158
|
+
- !ruby/object:Gem::Dependency
|
159
|
+
name: railties
|
160
|
+
requirement: !ruby/object:Gem::Requirement
|
161
|
+
requirements:
|
162
|
+
- - ">="
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '6.0'
|
165
|
+
- - "<"
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: '6.1'
|
168
|
+
type: :runtime
|
169
|
+
prerelease: false
|
170
|
+
version_requirements: !ruby/object:Gem::Requirement
|
171
|
+
requirements:
|
172
|
+
- - ">="
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: '6.0'
|
175
|
+
- - "<"
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
version: '6.1'
|
18
178
|
- !ruby/object:Gem::Dependency
|
19
179
|
name: active_model_serializers
|
20
180
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,20 +269,14 @@ dependencies:
|
|
109
269
|
requirements:
|
110
270
|
- - "~>"
|
111
271
|
- !ruby/object:Gem::Version
|
112
|
-
version: '1.
|
113
|
-
- - ">="
|
114
|
-
- !ruby/object:Gem::Version
|
115
|
-
version: 1.0.7
|
272
|
+
version: '1.4'
|
116
273
|
type: :runtime
|
117
274
|
prerelease: false
|
118
275
|
version_requirements: !ruby/object:Gem::Requirement
|
119
276
|
requirements:
|
120
277
|
- - "~>"
|
121
278
|
- !ruby/object:Gem::Version
|
122
|
-
version: '1.
|
123
|
-
- - ">="
|
124
|
-
- !ruby/object:Gem::Version
|
125
|
-
version: 1.0.7
|
279
|
+
version: '1.4'
|
126
280
|
- !ruby/object:Gem::Dependency
|
127
281
|
name: dragonfly_svg
|
128
282
|
requirement: !ruby/object:Gem::Requirement
|
@@ -247,26 +401,6 @@ dependencies:
|
|
247
401
|
- - "~>"
|
248
402
|
- !ruby/object:Gem::Version
|
249
403
|
version: 1.0.8
|
250
|
-
- !ruby/object:Gem::Dependency
|
251
|
-
name: rails
|
252
|
-
requirement: !ruby/object:Gem::Requirement
|
253
|
-
requirements:
|
254
|
-
- - ">="
|
255
|
-
- !ruby/object:Gem::Version
|
256
|
-
version: 5.2.0
|
257
|
-
- - "<"
|
258
|
-
- !ruby/object:Gem::Version
|
259
|
-
version: '6.1'
|
260
|
-
type: :runtime
|
261
|
-
prerelease: false
|
262
|
-
version_requirements: !ruby/object:Gem::Requirement
|
263
|
-
requirements:
|
264
|
-
- - ">="
|
265
|
-
- !ruby/object:Gem::Version
|
266
|
-
version: 5.2.0
|
267
|
-
- - "<"
|
268
|
-
- !ruby/object:Gem::Version
|
269
|
-
version: '6.1'
|
270
404
|
- !ruby/object:Gem::Dependency
|
271
405
|
name: ransack
|
272
406
|
requirement: !ruby/object:Gem::Requirement
|
@@ -555,14 +689,14 @@ dependencies:
|
|
555
689
|
requirements:
|
556
690
|
- - "~>"
|
557
691
|
- !ruby/object:Gem::Version
|
558
|
-
version: '
|
692
|
+
version: '5.0'
|
559
693
|
type: :development
|
560
694
|
prerelease: false
|
561
695
|
version_requirements: !ruby/object:Gem::Requirement
|
562
696
|
requirements:
|
563
697
|
- - "~>"
|
564
698
|
- !ruby/object:Gem::Version
|
565
|
-
version: '
|
699
|
+
version: '5.0'
|
566
700
|
- !ruby/object:Gem::Dependency
|
567
701
|
name: timecop
|
568
702
|
requirement: !ruby/object:Gem::Requirement
|
@@ -633,7 +767,6 @@ files:
|
|
633
767
|
- app/assets/javascripts/alchemy/alchemy.gui.js.coffee
|
634
768
|
- app/assets/javascripts/alchemy/alchemy.hotkeys.js.coffee
|
635
769
|
- app/assets/javascripts/alchemy/alchemy.html5.js
|
636
|
-
- app/assets/javascripts/alchemy/alchemy.image_cropper.js.coffee
|
637
770
|
- app/assets/javascripts/alchemy/alchemy.image_overlay.coffee
|
638
771
|
- app/assets/javascripts/alchemy/alchemy.initializer.js.coffee
|
639
772
|
- app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee
|
@@ -646,7 +779,6 @@ files:
|
|
646
779
|
- app/assets/javascripts/alchemy/alchemy.string_extension.js.coffee
|
647
780
|
- app/assets/javascripts/alchemy/alchemy.tinymce.js.coffee
|
648
781
|
- app/assets/javascripts/alchemy/alchemy.tooltips.coffee
|
649
|
-
- app/assets/javascripts/alchemy/alchemy.trash_window.js.coffee
|
650
782
|
- app/assets/javascripts/alchemy/alchemy.uploader.js.coffee
|
651
783
|
- app/assets/javascripts/alchemy/menubar.js.coffee
|
652
784
|
- app/assets/javascripts/alchemy/node_select.js
|
@@ -682,6 +814,7 @@ files:
|
|
682
814
|
- app/assets/stylesheets/alchemy/hints.scss
|
683
815
|
- app/assets/stylesheets/alchemy/icons.scss
|
684
816
|
- app/assets/stylesheets/alchemy/image_library.scss
|
817
|
+
- app/assets/stylesheets/alchemy/images.scss
|
685
818
|
- app/assets/stylesheets/alchemy/jquery-ui.scss
|
686
819
|
- app/assets/stylesheets/alchemy/labels.scss
|
687
820
|
- app/assets/stylesheets/alchemy/lists.scss
|
@@ -702,7 +835,6 @@ files:
|
|
702
835
|
- app/assets/stylesheets/alchemy/tables.scss
|
703
836
|
- app/assets/stylesheets/alchemy/tags.scss
|
704
837
|
- app/assets/stylesheets/alchemy/toolbar.scss
|
705
|
-
- app/assets/stylesheets/alchemy/trash.scss
|
706
838
|
- app/assets/stylesheets/alchemy/typography.scss
|
707
839
|
- app/assets/stylesheets/alchemy/upload.scss
|
708
840
|
- app/assets/stylesheets/alchemy/welcome.sass
|
@@ -724,8 +856,11 @@ files:
|
|
724
856
|
- app/controllers/alchemy/admin/contents_controller.rb
|
725
857
|
- app/controllers/alchemy/admin/dashboard_controller.rb
|
726
858
|
- app/controllers/alchemy/admin/elements_controller.rb
|
859
|
+
- app/controllers/alchemy/admin/essence_audios_controller.rb
|
727
860
|
- app/controllers/alchemy/admin/essence_files_controller.rb
|
728
861
|
- app/controllers/alchemy/admin/essence_pictures_controller.rb
|
862
|
+
- app/controllers/alchemy/admin/essence_videos_controller.rb
|
863
|
+
- app/controllers/alchemy/admin/ingredients_controller.rb
|
729
864
|
- app/controllers/alchemy/admin/languages_controller.rb
|
730
865
|
- app/controllers/alchemy/admin/layoutpages_controller.rb
|
731
866
|
- app/controllers/alchemy/admin/legacy_page_urls_controller.rb
|
@@ -736,7 +871,6 @@ files:
|
|
736
871
|
- app/controllers/alchemy/admin/sites_controller.rb
|
737
872
|
- app/controllers/alchemy/admin/styleguide_controller.rb
|
738
873
|
- app/controllers/alchemy/admin/tags_controller.rb
|
739
|
-
- app/controllers/alchemy/admin/trash_controller.rb
|
740
874
|
- app/controllers/alchemy/api/base_controller.rb
|
741
875
|
- app/controllers/alchemy/api/contents_controller.rb
|
742
876
|
- app/controllers/alchemy/api/elements_controller.rb
|
@@ -748,18 +882,21 @@ files:
|
|
748
882
|
- app/controllers/alchemy/messages_controller.rb
|
749
883
|
- app/controllers/alchemy/pages_controller.rb
|
750
884
|
- app/controllers/concerns/alchemy/admin/archive_overlay.rb
|
885
|
+
- app/controllers/concerns/alchemy/admin/crop_action.rb
|
751
886
|
- app/controllers/concerns/alchemy/admin/current_language.rb
|
752
887
|
- app/controllers/concerns/alchemy/admin/uploader_responses.rb
|
753
888
|
- app/controllers/concerns/alchemy/legacy_page_redirects.rb
|
754
889
|
- app/controllers/concerns/alchemy/site_redirects.rb
|
755
890
|
- app/decorators/alchemy/content_editor.rb
|
756
891
|
- app/decorators/alchemy/element_editor.rb
|
892
|
+
- app/decorators/alchemy/ingredient_editor.rb
|
757
893
|
- app/helpers/alchemy/admin/attachments_helper.rb
|
758
894
|
- app/helpers/alchemy/admin/base_helper.rb
|
759
895
|
- app/helpers/alchemy/admin/contents_helper.rb
|
760
896
|
- app/helpers/alchemy/admin/elements_helper.rb
|
761
897
|
- app/helpers/alchemy/admin/essences_helper.rb
|
762
898
|
- app/helpers/alchemy/admin/form_helper.rb
|
899
|
+
- app/helpers/alchemy/admin/ingredients_helper.rb
|
763
900
|
- app/helpers/alchemy/admin/navigation_helper.rb
|
764
901
|
- app/helpers/alchemy/admin/pages_helper.rb
|
765
902
|
- app/helpers/alchemy/admin/pictures_helper.rb
|
@@ -769,6 +906,8 @@ files:
|
|
769
906
|
- app/helpers/alchemy/elements_helper.rb
|
770
907
|
- app/helpers/alchemy/pages_helper.rb
|
771
908
|
- app/helpers/alchemy/url_helper.rb
|
909
|
+
- app/jobs/alchemy/base_job.rb
|
910
|
+
- app/jobs/alchemy/publish_page_job.rb
|
772
911
|
- app/mailers/alchemy/base_mailer.rb
|
773
912
|
- app/mailers/alchemy/messages_mailer.rb
|
774
913
|
- app/models/alchemy/attachment.rb
|
@@ -780,11 +919,15 @@ files:
|
|
780
919
|
- app/models/alchemy/element/definitions.rb
|
781
920
|
- app/models/alchemy/element/element_contents.rb
|
782
921
|
- app/models/alchemy/element/element_essences.rb
|
922
|
+
- app/models/alchemy/element/element_ingredients.rb
|
783
923
|
- app/models/alchemy/element/presenters.rb
|
784
924
|
- app/models/alchemy/element_to_page.rb
|
925
|
+
- app/models/alchemy/elements_repository.rb
|
926
|
+
- app/models/alchemy/essence_audio.rb
|
785
927
|
- app/models/alchemy/essence_boolean.rb
|
786
928
|
- app/models/alchemy/essence_date.rb
|
787
929
|
- app/models/alchemy/essence_file.rb
|
930
|
+
- app/models/alchemy/essence_headline.rb
|
788
931
|
- app/models/alchemy/essence_html.rb
|
789
932
|
- app/models/alchemy/essence_link.rb
|
790
933
|
- app/models/alchemy/essence_node.rb
|
@@ -794,7 +937,25 @@ files:
|
|
794
937
|
- app/models/alchemy/essence_richtext.rb
|
795
938
|
- app/models/alchemy/essence_select.rb
|
796
939
|
- app/models/alchemy/essence_text.rb
|
940
|
+
- app/models/alchemy/essence_video.rb
|
797
941
|
- app/models/alchemy/folded_page.rb
|
942
|
+
- app/models/alchemy/image_cropper_settings.rb
|
943
|
+
- app/models/alchemy/ingredient.rb
|
944
|
+
- app/models/alchemy/ingredient_validator.rb
|
945
|
+
- app/models/alchemy/ingredients/audio.rb
|
946
|
+
- app/models/alchemy/ingredients/boolean.rb
|
947
|
+
- app/models/alchemy/ingredients/datetime.rb
|
948
|
+
- app/models/alchemy/ingredients/file.rb
|
949
|
+
- app/models/alchemy/ingredients/headline.rb
|
950
|
+
- app/models/alchemy/ingredients/html.rb
|
951
|
+
- app/models/alchemy/ingredients/link.rb
|
952
|
+
- app/models/alchemy/ingredients/node.rb
|
953
|
+
- app/models/alchemy/ingredients/page.rb
|
954
|
+
- app/models/alchemy/ingredients/picture.rb
|
955
|
+
- app/models/alchemy/ingredients/richtext.rb
|
956
|
+
- app/models/alchemy/ingredients/select.rb
|
957
|
+
- app/models/alchemy/ingredients/text.rb
|
958
|
+
- app/models/alchemy/ingredients/video.rb
|
798
959
|
- app/models/alchemy/language.rb
|
799
960
|
- app/models/alchemy/language/code.rb
|
800
961
|
- app/models/alchemy/legacy_page_url.rb
|
@@ -806,7 +967,9 @@ files:
|
|
806
967
|
- app/models/alchemy/page/page_naming.rb
|
807
968
|
- app/models/alchemy/page/page_natures.rb
|
808
969
|
- app/models/alchemy/page/page_scopes.rb
|
970
|
+
- app/models/alchemy/page/publisher.rb
|
809
971
|
- app/models/alchemy/page/url_path.rb
|
972
|
+
- app/models/alchemy/page_version.rb
|
810
973
|
- app/models/alchemy/picture.rb
|
811
974
|
- app/models/alchemy/picture/calculations.rb
|
812
975
|
- app/models/alchemy/picture/preprocessor.rb
|
@@ -821,7 +984,9 @@ files:
|
|
821
984
|
- app/models/alchemy/site/layout.rb
|
822
985
|
- app/models/alchemy/tag.rb
|
823
986
|
- app/models/alchemy/tree_node.rb
|
987
|
+
- app/models/concerns/alchemy/picture_thumbnails.rb
|
824
988
|
- app/models/concerns/alchemy/touch_elements.rb
|
989
|
+
- app/presenters/alchemy/picture_view.rb
|
825
990
|
- app/serializers/alchemy/attachment_serializer.rb
|
826
991
|
- app/serializers/alchemy/base_serializer.rb
|
827
992
|
- app/serializers/alchemy/content_serializer.rb
|
@@ -839,6 +1004,8 @@ files:
|
|
839
1004
|
- app/serializers/alchemy/page_serializer.rb
|
840
1005
|
- app/serializers/alchemy/page_tree_serializer.rb
|
841
1006
|
- app/serializers/alchemy/picture_serializer.rb
|
1007
|
+
- app/services/alchemy/delete_elements.rb
|
1008
|
+
- app/services/alchemy/duplicate_element.rb
|
842
1009
|
- app/views/alchemy/_edit_mode.html.erb
|
843
1010
|
- app/views/alchemy/_menubar.html.erb
|
844
1011
|
- app/views/alchemy/_preview_mode_code.html.erb
|
@@ -846,11 +1013,11 @@ files:
|
|
846
1013
|
- app/views/alchemy/admin/attachments/_attachment.html.erb
|
847
1014
|
- app/views/alchemy/admin/attachments/_file_to_assign.html.erb
|
848
1015
|
- app/views/alchemy/admin/attachments/_files_list.html.erb
|
849
|
-
- app/views/alchemy/admin/attachments/_filter_bar.html.erb
|
850
1016
|
- app/views/alchemy/admin/attachments/_overlay_file_list.html.erb
|
851
1017
|
- app/views/alchemy/admin/attachments/_replace_button.html.erb
|
852
1018
|
- app/views/alchemy/admin/attachments/_tag_list.html.erb
|
853
1019
|
- app/views/alchemy/admin/attachments/archive_overlay.js.erb
|
1020
|
+
- app/views/alchemy/admin/attachments/assign.js.erb
|
854
1021
|
- app/views/alchemy/admin/attachments/destroy.js.erb
|
855
1022
|
- app/views/alchemy/admin/attachments/edit.html.erb
|
856
1023
|
- app/views/alchemy/admin/attachments/index.html.erb
|
@@ -860,6 +1027,7 @@ files:
|
|
860
1027
|
- app/views/alchemy/admin/clipboard/insert.js.erb
|
861
1028
|
- app/views/alchemy/admin/clipboard/remove.js.erb
|
862
1029
|
- app/views/alchemy/admin/contents/create.js.erb
|
1030
|
+
- app/views/alchemy/admin/crop.html.erb
|
863
1031
|
- app/views/alchemy/admin/dashboard/_locked_pages.html.erb
|
864
1032
|
- app/views/alchemy/admin/dashboard/_recent_pages.html.erb
|
865
1033
|
- app/views/alchemy/admin/dashboard/_sites.html.erb
|
@@ -868,26 +1036,30 @@ files:
|
|
868
1036
|
- app/views/alchemy/admin/dashboard/index.html.erb
|
869
1037
|
- app/views/alchemy/admin/dashboard/info.html.erb
|
870
1038
|
- app/views/alchemy/admin/elements/_element.html.erb
|
871
|
-
- app/views/alchemy/admin/elements/
|
872
|
-
- app/views/alchemy/admin/elements/
|
873
|
-
- app/views/alchemy/admin/elements/
|
874
|
-
- app/views/alchemy/admin/elements/
|
1039
|
+
- app/views/alchemy/admin/elements/_footer.html.erb
|
1040
|
+
- app/views/alchemy/admin/elements/_form.html.erb
|
1041
|
+
- app/views/alchemy/admin/elements/_header.html.erb
|
1042
|
+
- app/views/alchemy/admin/elements/_toolbar.html.erb
|
875
1043
|
- app/views/alchemy/admin/elements/create.js.erb
|
1044
|
+
- app/views/alchemy/admin/elements/destroy.js.erb
|
876
1045
|
- app/views/alchemy/admin/elements/fold.js.erb
|
877
1046
|
- app/views/alchemy/admin/elements/index.html.erb
|
878
1047
|
- app/views/alchemy/admin/elements/new.html.erb
|
879
1048
|
- app/views/alchemy/admin/elements/order.js.erb
|
880
1049
|
- app/views/alchemy/admin/elements/publish.js.erb
|
881
|
-
- app/views/alchemy/admin/elements/trash.js.erb
|
882
1050
|
- app/views/alchemy/admin/elements/update.js.erb
|
883
|
-
- app/views/alchemy/admin/
|
1051
|
+
- app/views/alchemy/admin/essence_audios/edit.html.erb
|
884
1052
|
- app/views/alchemy/admin/essence_files/edit.html.erb
|
885
|
-
- app/views/alchemy/admin/essence_pictures/assign.js.erb
|
886
|
-
- app/views/alchemy/admin/essence_pictures/crop.html.erb
|
887
1053
|
- app/views/alchemy/admin/essence_pictures/destroy.js.erb
|
888
1054
|
- app/views/alchemy/admin/essence_pictures/edit.html.erb
|
889
1055
|
- app/views/alchemy/admin/essence_pictures/save_link.js.erb
|
890
1056
|
- app/views/alchemy/admin/essence_pictures/update.js.erb
|
1057
|
+
- app/views/alchemy/admin/essence_videos/edit.html.erb
|
1058
|
+
- app/views/alchemy/admin/ingredients/_audio_fields.html.erb
|
1059
|
+
- app/views/alchemy/admin/ingredients/_file_fields.html.erb
|
1060
|
+
- app/views/alchemy/admin/ingredients/_picture_fields.html.erb
|
1061
|
+
- app/views/alchemy/admin/ingredients/_video_fields.html.erb
|
1062
|
+
- app/views/alchemy/admin/ingredients/edit.html.erb
|
891
1063
|
- app/views/alchemy/admin/languages/_form.html.erb
|
892
1064
|
- app/views/alchemy/admin/languages/_language.html.erb
|
893
1065
|
- app/views/alchemy/admin/languages/_table.html.erb
|
@@ -958,7 +1130,6 @@ files:
|
|
958
1130
|
- app/views/alchemy/admin/pictures/_archive.html.erb
|
959
1131
|
- app/views/alchemy/admin/pictures/_archive_overlay.html.erb
|
960
1132
|
- app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb
|
961
|
-
- app/views/alchemy/admin/pictures/_filter_bar.html.erb
|
962
1133
|
- app/views/alchemy/admin/pictures/_form.html.erb
|
963
1134
|
- app/views/alchemy/admin/pictures/_infos.html.erb
|
964
1135
|
- app/views/alchemy/admin/pictures/_overlay_picture_list.html.erb
|
@@ -966,11 +1137,13 @@ files:
|
|
966
1137
|
- app/views/alchemy/admin/pictures/_picture_to_assign.html.erb
|
967
1138
|
- app/views/alchemy/admin/pictures/_tag_list.html.erb
|
968
1139
|
- app/views/alchemy/admin/pictures/archive_overlay.js.erb
|
1140
|
+
- app/views/alchemy/admin/pictures/assign.js.erb
|
969
1141
|
- app/views/alchemy/admin/pictures/edit_multiple.html.erb
|
970
1142
|
- app/views/alchemy/admin/pictures/index.html.erb
|
971
1143
|
- app/views/alchemy/admin/pictures/index.js.erb
|
972
1144
|
- app/views/alchemy/admin/pictures/show.html.erb
|
973
1145
|
- app/views/alchemy/admin/pictures/update.js.erb
|
1146
|
+
- app/views/alchemy/admin/resources/_filter.html.erb
|
974
1147
|
- app/views/alchemy/admin/resources/_filter_bar.html.erb
|
975
1148
|
- app/views/alchemy/admin/resources/_form.html.erb
|
976
1149
|
- app/views/alchemy/admin/resources/_per_page_select.html.erb
|
@@ -992,8 +1165,6 @@ files:
|
|
992
1165
|
- app/views/alchemy/admin/tags/edit.html.erb
|
993
1166
|
- app/views/alchemy/admin/tags/index.html.erb
|
994
1167
|
- app/views/alchemy/admin/tags/new.html.erb
|
995
|
-
- app/views/alchemy/admin/trash/clear.js.erb
|
996
|
-
- app/views/alchemy/admin/trash/index.html.erb
|
997
1168
|
- app/views/alchemy/admin/uploader/_button.html.erb
|
998
1169
|
- app/views/alchemy/admin/uploader/_setup.html.erb
|
999
1170
|
- app/views/alchemy/attachments/show.html.erb
|
@@ -1009,12 +1180,16 @@ files:
|
|
1009
1180
|
- app/views/alchemy/elements/_view_not_found.html.erb
|
1010
1181
|
- app/views/alchemy/elements/show.html.erb
|
1011
1182
|
- app/views/alchemy/elements/show.js.erb
|
1183
|
+
- app/views/alchemy/essences/_essence_audio_editor.html.erb
|
1184
|
+
- app/views/alchemy/essences/_essence_audio_view.html.erb
|
1012
1185
|
- app/views/alchemy/essences/_essence_boolean_editor.html.erb
|
1013
1186
|
- app/views/alchemy/essences/_essence_boolean_view.html.erb
|
1014
1187
|
- app/views/alchemy/essences/_essence_date_editor.html.erb
|
1015
1188
|
- app/views/alchemy/essences/_essence_date_view.html.erb
|
1016
1189
|
- app/views/alchemy/essences/_essence_file_editor.html.erb
|
1017
1190
|
- app/views/alchemy/essences/_essence_file_view.html.erb
|
1191
|
+
- app/views/alchemy/essences/_essence_headline_editor.html.erb
|
1192
|
+
- app/views/alchemy/essences/_essence_headline_view.html.erb
|
1018
1193
|
- app/views/alchemy/essences/_essence_html_editor.html.erb
|
1019
1194
|
- app/views/alchemy/essences/_essence_html_view.html.erb
|
1020
1195
|
- app/views/alchemy/essences/_essence_link_editor.html.erb
|
@@ -1031,8 +1206,40 @@ files:
|
|
1031
1206
|
- app/views/alchemy/essences/_essence_select_view.html.erb
|
1032
1207
|
- app/views/alchemy/essences/_essence_text_editor.html.erb
|
1033
1208
|
- app/views/alchemy/essences/_essence_text_view.html.erb
|
1209
|
+
- app/views/alchemy/essences/_essence_video_editor.html.erb
|
1210
|
+
- app/views/alchemy/essences/_essence_video_view.html.erb
|
1034
1211
|
- app/views/alchemy/essences/shared/_essence_picture_tools.html.erb
|
1035
1212
|
- app/views/alchemy/essences/shared/_linkable_essence_tools.html.erb
|
1213
|
+
- app/views/alchemy/ingredients/_audio_editor.html.erb
|
1214
|
+
- app/views/alchemy/ingredients/_audio_view.html.erb
|
1215
|
+
- app/views/alchemy/ingredients/_boolean_editor.html.erb
|
1216
|
+
- app/views/alchemy/ingredients/_boolean_view.html.erb
|
1217
|
+
- app/views/alchemy/ingredients/_datetime_editor.html.erb
|
1218
|
+
- app/views/alchemy/ingredients/_datetime_view.html.erb
|
1219
|
+
- app/views/alchemy/ingredients/_file_editor.html.erb
|
1220
|
+
- app/views/alchemy/ingredients/_file_view.html.erb
|
1221
|
+
- app/views/alchemy/ingredients/_headline_editor.html.erb
|
1222
|
+
- app/views/alchemy/ingredients/_headline_view.html.erb
|
1223
|
+
- app/views/alchemy/ingredients/_html_editor.html.erb
|
1224
|
+
- app/views/alchemy/ingredients/_html_view.html.erb
|
1225
|
+
- app/views/alchemy/ingredients/_link_editor.html.erb
|
1226
|
+
- app/views/alchemy/ingredients/_link_view.html.erb
|
1227
|
+
- app/views/alchemy/ingredients/_node_editor.html.erb
|
1228
|
+
- app/views/alchemy/ingredients/_node_view.html.erb
|
1229
|
+
- app/views/alchemy/ingredients/_page_editor.html.erb
|
1230
|
+
- app/views/alchemy/ingredients/_page_view.html.erb
|
1231
|
+
- app/views/alchemy/ingredients/_picture_editor.html.erb
|
1232
|
+
- app/views/alchemy/ingredients/_picture_view.html.erb
|
1233
|
+
- app/views/alchemy/ingredients/_richtext_editor.html.erb
|
1234
|
+
- app/views/alchemy/ingredients/_richtext_view.html.erb
|
1235
|
+
- app/views/alchemy/ingredients/_select_editor.html.erb
|
1236
|
+
- app/views/alchemy/ingredients/_select_view.html.erb
|
1237
|
+
- app/views/alchemy/ingredients/_text_editor.html.erb
|
1238
|
+
- app/views/alchemy/ingredients/_text_view.html.erb
|
1239
|
+
- app/views/alchemy/ingredients/_video_editor.html.erb
|
1240
|
+
- app/views/alchemy/ingredients/_video_view.html.erb
|
1241
|
+
- app/views/alchemy/ingredients/shared/_link_tools.html.erb
|
1242
|
+
- app/views/alchemy/ingredients/shared/_picture_tools.html.erb
|
1036
1243
|
- app/views/alchemy/language_links/_language.html.erb
|
1037
1244
|
- app/views/alchemy/language_links/_spacer.html.erb
|
1038
1245
|
- app/views/alchemy/messages_mailer/contact_form_mail.de.text.erb
|
@@ -1076,6 +1283,14 @@ files:
|
|
1076
1283
|
- db/migrate/20200519073500_remove_visible_from_alchemy_pages.rb
|
1077
1284
|
- db/migrate/20200617110713_create_alchemy_picture_thumbs.rb
|
1078
1285
|
- db/migrate/20200907111332_remove_tri_state_booleans.rb
|
1286
|
+
- db/migrate/20201207131309_create_page_versions.rb
|
1287
|
+
- db/migrate/20201207135820_add_page_version_id_to_alchemy_elements.rb
|
1288
|
+
- db/migrate/20210205143548_rename_public_on_and_public_until_on_alchemy_pages.rb
|
1289
|
+
- db/migrate/20210326105046_add_sanitized_body_to_alchemy_essence_richtexts.rb
|
1290
|
+
- db/migrate/20210406093436_add_alchemy_essence_headlines.rb
|
1291
|
+
- db/migrate/20210506135919_create_essence_audios.rb
|
1292
|
+
- db/migrate/20210506140258_create_essence_videos.rb
|
1293
|
+
- db/migrate/20210508091432_create_alchemy_ingredients.rb
|
1079
1294
|
- lib/alchemy.rb
|
1080
1295
|
- lib/alchemy/ability_helper.rb
|
1081
1296
|
- lib/alchemy/admin/locale.rb
|
@@ -1086,6 +1301,8 @@ files:
|
|
1086
1301
|
- lib/alchemy/configuration_methods.rb
|
1087
1302
|
- lib/alchemy/controller_actions.rb
|
1088
1303
|
- lib/alchemy/deprecation.rb
|
1304
|
+
- lib/alchemy/dragonfly/processors/auto_orient.rb
|
1305
|
+
- lib/alchemy/dragonfly/processors/crop_resize.rb
|
1089
1306
|
- lib/alchemy/element_definition.rb
|
1090
1307
|
- lib/alchemy/elements_finder.rb
|
1091
1308
|
- lib/alchemy/engine.rb
|
@@ -1105,6 +1322,7 @@ files:
|
|
1105
1322
|
- lib/alchemy/paths.rb
|
1106
1323
|
- lib/alchemy/permissions.rb
|
1107
1324
|
- lib/alchemy/resource.rb
|
1325
|
+
- lib/alchemy/resource_filter.rb
|
1108
1326
|
- lib/alchemy/resources_helper.rb
|
1109
1327
|
- lib/alchemy/routing_constraints.rb
|
1110
1328
|
- lib/alchemy/seeder.rb
|
@@ -1114,30 +1332,40 @@ files:
|
|
1114
1332
|
- lib/alchemy/test_support.rb
|
1115
1333
|
- lib/alchemy/test_support/config_stubbing.rb
|
1116
1334
|
- lib/alchemy/test_support/essence_shared_examples.rb
|
1117
|
-
- lib/alchemy/test_support/factories.rb
|
1118
1335
|
- lib/alchemy/test_support/factories/attachment_factory.rb
|
1119
1336
|
- lib/alchemy/test_support/factories/content_factory.rb
|
1120
1337
|
- lib/alchemy/test_support/factories/dummy_user_factory.rb
|
1121
1338
|
- lib/alchemy/test_support/factories/element_factory.rb
|
1339
|
+
- lib/alchemy/test_support/factories/essence_audio_factory.rb
|
1122
1340
|
- lib/alchemy/test_support/factories/essence_file_factory.rb
|
1123
1341
|
- lib/alchemy/test_support/factories/essence_page_factory.rb
|
1124
1342
|
- lib/alchemy/test_support/factories/essence_picture_factory.rb
|
1125
1343
|
- lib/alchemy/test_support/factories/essence_text_factory.rb
|
1344
|
+
- lib/alchemy/test_support/factories/essence_video_factory.rb
|
1345
|
+
- lib/alchemy/test_support/factories/ingredient_factory.rb
|
1126
1346
|
- lib/alchemy/test_support/factories/language_factory.rb
|
1127
1347
|
- lib/alchemy/test_support/factories/node_factory.rb
|
1128
1348
|
- lib/alchemy/test_support/factories/page_factory.rb
|
1349
|
+
- lib/alchemy/test_support/factories/page_version_factory.rb
|
1129
1350
|
- lib/alchemy/test_support/factories/picture_factory.rb
|
1130
1351
|
- lib/alchemy/test_support/factories/picture_thumb_factory.rb
|
1131
1352
|
- lib/alchemy/test_support/factories/site_factory.rb
|
1132
1353
|
- lib/alchemy/test_support/fixtures/image.png
|
1354
|
+
- lib/alchemy/test_support/having_crop_action_examples.rb
|
1355
|
+
- lib/alchemy/test_support/having_picture_thumbnails_examples.rb
|
1133
1356
|
- lib/alchemy/test_support/integration_helpers.rb
|
1134
1357
|
- lib/alchemy/test_support/shared_contexts.rb
|
1358
|
+
- lib/alchemy/test_support/shared_ingredient_editor_examples.rb
|
1359
|
+
- lib/alchemy/test_support/shared_ingredient_examples.rb
|
1135
1360
|
- lib/alchemy/test_support/shared_uploader_examples.rb
|
1136
1361
|
- lib/alchemy/tinymce.rb
|
1137
1362
|
- lib/alchemy/upgrader.rb
|
1138
1363
|
- lib/alchemy/upgrader/five_point_zero.rb
|
1364
|
+
- lib/alchemy/upgrader/six_point_zero.rb
|
1365
|
+
- lib/alchemy/upgrader/tasks/add_page_versions.rb
|
1139
1366
|
- lib/alchemy/upgrader/tasks/element_views_updater.rb
|
1140
1367
|
- lib/alchemy/upgrader/tasks/harden_gutentag_migrations.rb
|
1368
|
+
- lib/alchemy/upgrader/tasks/ingredients_migrator.rb
|
1141
1369
|
- lib/alchemy/version.rb
|
1142
1370
|
- lib/alchemy_cms.rb
|
1143
1371
|
- lib/generators/alchemy/base.rb
|
@@ -1148,6 +1376,10 @@ files:
|
|
1148
1376
|
- lib/generators/alchemy/essence/essence_generator.rb
|
1149
1377
|
- lib/generators/alchemy/essence/templates/editor.html.erb
|
1150
1378
|
- lib/generators/alchemy/essence/templates/view.html.erb
|
1379
|
+
- lib/generators/alchemy/ingredient/ingredient_generator.rb
|
1380
|
+
- lib/generators/alchemy/ingredient/templates/editor.html.erb
|
1381
|
+
- lib/generators/alchemy/ingredient/templates/model.rb.tt
|
1382
|
+
- lib/generators/alchemy/ingredient/templates/view.html.erb
|
1151
1383
|
- lib/generators/alchemy/install/files/_article.html.erb
|
1152
1384
|
- lib/generators/alchemy/install/files/_standard.html.erb
|
1153
1385
|
- lib/generators/alchemy/install/files/alchemy.en.yml
|
@@ -1190,8 +1422,12 @@ files:
|
|
1190
1422
|
- package.json
|
1191
1423
|
- package/admin.js
|
1192
1424
|
- package/src/__tests__/i18n.spec.js
|
1425
|
+
- package/src/file_editors.js
|
1193
1426
|
- package/src/i18n.js
|
1427
|
+
- package/src/image_cropper.js
|
1428
|
+
- package/src/image_loader.js
|
1194
1429
|
- package/src/node_tree.js
|
1430
|
+
- package/src/picture_editors.js
|
1195
1431
|
- package/src/translations.js
|
1196
1432
|
- package/src/utils/__tests__/ajax.spec.js
|
1197
1433
|
- package/src/utils/__tests__/events.spec.js
|
@@ -1272,15 +1508,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1272
1508
|
requirements:
|
1273
1509
|
- - ">="
|
1274
1510
|
- !ruby/object:Gem::Version
|
1275
|
-
version: 2.
|
1511
|
+
version: 2.5.0
|
1276
1512
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1277
1513
|
requirements:
|
1278
|
-
- - "
|
1514
|
+
- - ">"
|
1279
1515
|
- !ruby/object:Gem::Version
|
1280
|
-
version:
|
1516
|
+
version: 1.3.1
|
1281
1517
|
requirements:
|
1282
1518
|
- ImageMagick (libmagick), v6.6 or greater.
|
1283
|
-
rubygems_version: 3.1.
|
1519
|
+
rubygems_version: 3.1.6
|
1284
1520
|
signing_key:
|
1285
1521
|
specification_version: 4
|
1286
1522
|
summary: A powerful, userfriendly and flexible CMS for Rails
|