alchemy_cms 7.0.0.pre.c → 7.0.0.pre.rc1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d9b2124fdbd7438389b1120a0df30d6ce57a1f353a9ccdae2c59f634b7a60de
4
- data.tar.gz: ae2985754c1cb922c8ab9c8b3e510ed13d5139c3b96102346b36710a18f2db5e
3
+ metadata.gz: cf26638792221ec3a204abb8ca19d221b16f6548d6d4a4d0cb01434962c90814
4
+ data.tar.gz: b7ad6adcb58b64e1355fd47d70d7622de73f2fc4016db83b06ffb2631c4fc837
5
5
  SHA512:
6
- metadata.gz: 8a8965055910fe95085ec5c3ed24ca588d8ab6978463ab4445d762dc1cdcb440f7f6830eb13c09e63d8cbac8fef106f0423ee7689d3bc8f0194fd9e9d474c14a
7
- data.tar.gz: f570c09d5423ef778c099c5467e7d0d21d0aab5e027581ad1644f3a3c261633a415b50a47605eed83c702d50d3962a16c6e37d8e2f63a319d2b4f43fbe6421a3
6
+ metadata.gz: ca9665f36097d622e848dc13a5eda0cdc9061e0ac07a319fca261ecfd8572a6c47d9d0ece22672012935e4a83c66768bdd86509ffe05e61e647806a98ed133a4
7
+ data.tar.gz: 85740399b154064e2070e87779abc09c2c44e08bb0b0bb119b12962bc038bd6375ca4d962951b32b3369ac535bf4f83aa714d5605ddbfbaf3e8faf46cb42e8fd
data/CHANGELOG.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  ## 7.0.0 (unreleased)
4
4
 
5
+ - Allow to create element with warning in definition [#2507](https://github.com/AlchemyCMS/alchemy_cms/pull/2507) ([tvdeyen](https://github.com/tvdeyen))
6
+ - Remove unused javascript [#2506](https://github.com/AlchemyCMS/alchemy_cms/pull/2506) ([sascha-karnatz](https://github.com/sascha-karnatz))
7
+ - Allow authors to link to all pages again [#2504](https://github.com/AlchemyCMS/alchemy_cms/pull/2504) ([tvdeyen](https://github.com/tvdeyen))
5
8
  - Lint JS code with Prettier [#2503](https://github.com/AlchemyCMS/alchemy_cms/pull/2503) ([tvdeyen](https://github.com/tvdeyen))
6
9
  - Use absolute imports in modules [#2502](https://github.com/AlchemyCMS/alchemy_cms/pull/2502) ([tvdeyen](https://github.com/tvdeyen))
7
10
  - Replace turbolinks with turbo [#2499](https://github.com/AlchemyCMS/alchemy_cms/pull/2499) ([sascha-karnatz](https://github.com/sascha-karnatz))
@@ -16,7 +16,6 @@
16
16
  //= require alchemy/templates
17
17
  //= require alchemy/alchemy.base
18
18
  //= require alchemy/alchemy.autocomplete
19
- //= require alchemy/alchemy.browser
20
19
  //= require alchemy/alchemy.buttons
21
20
  //= require alchemy/alchemy.dialog
22
21
  //= require alchemy/alchemy.char_counter
@@ -50,25 +50,4 @@ $.extend Alchemy,
50
50
  dropdownAutoWidth: true
51
51
  return
52
52
 
53
- getUrlParam: (name) ->
54
- results = new RegExp("[\\?&]" + name + "=([^&#]*)").exec(window.location.href)
55
- results[1] or 0 if results
56
- return
57
-
58
- isiPhone: navigator.userAgent.match(/iPhone/i) isnt null
59
- isiPad: navigator.userAgent.match(/iPad/i) isnt null
60
- isiPod: navigator.userAgent.match(/iPod/i) isnt null
61
- isiOS: navigator.userAgent.match(/iPad|iPhone|iPod/i) isnt null
62
- isFirefox: navigator.userAgent.match(/Firefox/i) isnt null
63
- isChrome: navigator.userAgent.match(/Chrome/i) isnt null
64
- isSafari: navigator.userAgent.match(/Safari/i) isnt null
65
- isIE: navigator.userAgent.match(/MSIE/i) isnt null
66
-
67
- Alchemy.getBrowserVersion = (browser) ->
68
- (if Alchemy["is" + browser] then parseInt(navigator.userAgent.match(new RegExp(browser + ".[0-9]+", "i"))[0].replace(new RegExp(browser + "."), ""), 10) else null)
69
- return
70
53
 
71
- Alchemy.ChromeVersion = Alchemy.getBrowserVersion("Chrome")
72
- Alchemy.FirefoxVersion = Alchemy.getBrowserVersion("Firefox")
73
- Alchemy.SafariVersion = Alchemy.getBrowserVersion("Safari")
74
- Alchemy.IEVersion = Alchemy.getBrowserVersion("MSIE")
@@ -59,17 +59,12 @@ class window.Alchemy.LinkDialog extends Alchemy.Dialog
59
59
  initPageSelect: ->
60
60
  pageTemplate = HandlebarsTemplates.page
61
61
  element_anchor_placeholder = @$element_anchor.attr('placeholder')
62
- if @link_object.dataset.languageId
63
- api_url = "#{Alchemy.routes.api_pages_path}?language_id=#{@link_object.dataset.languageId}"
64
- else
65
- api_url = Alchemy.routes.api_pages_path
66
-
67
62
  @$internal_link.select2
68
63
  placeholder: Alchemy.t('Search page')
69
64
  allowClear: true
70
65
  minimumInputLength: 3
71
66
  ajax:
72
- url: api_url
67
+ url: Alchemy.routes.api_pages_path
73
68
  datatype: 'json'
74
69
  quietMillis: 300
75
70
  data: (term, page) ->
@@ -8,9 +8,7 @@ module Alchemy
8
8
  # Returns all pages as json object
9
9
  #
10
10
  def index
11
- language = Alchemy::Language.find_by(id: params[:language_id]) || Alchemy::Language.current
12
11
  @pages = Alchemy::Page.accessible_by(current_ability, :index)
13
- @pages = @pages.where(language: language)
14
12
  @pages = @pages.includes(*page_includes)
15
13
  @pages = @pages.ransack(params[:q]).result
16
14
 
@@ -35,13 +35,14 @@ module Alchemy
35
35
  FORBIDDEN_DEFINITION_ATTRIBUTES = [
36
36
  "amount",
37
37
  "autogenerate",
38
- "nestable_elements",
38
+ "compact",
39
+ "deprecated",
39
40
  "hint",
40
41
  "ingredients",
41
- "taggable",
42
- "compact",
43
42
  "message",
44
- "deprecated"
43
+ "nestable_elements",
44
+ "taggable",
45
+ "warning"
45
46
  ].freeze
46
47
 
47
48
  # All Elements that share the same page version and parent element and are fixed or not are considered a list.
@@ -5,7 +5,6 @@
5
5
  onclick: 'new Alchemy.LinkDialog(this).open(); return false;',
6
6
  class: "icon_button#{ingredient_editor.linked? ? ' linked' : ''} link-ingredient",
7
7
  "data-parent-selector": "[data-ingredient-id='#{ingredient_editor.id}']",
8
- "data-language-id": ingredient_editor.page&.language_id,
9
8
  title: Alchemy.t(:place_link),
10
9
  id: "edit_link_#{ingredient_editor.id}"
11
10
  ) %>
@@ -34,7 +34,6 @@
34
34
  class: picture_editor.linked? ? "linked" : nil,
35
35
  title: Alchemy.t(:link_image),
36
36
  "data-parent-selector": "[data-ingredient-id='#{picture_editor.id}']",
37
- "data-language-id": picture_editor.page&.language_id,
38
37
  id: "edit_link_#{picture_editor.id}"
39
38
  } do %>
40
39
  <span class="disabled" tabindex="-1"><%= render_icon(:link) %></span>
@@ -41,8 +41,8 @@ module Alchemy
41
41
  e.public? && !e.restricted?
42
42
  end
43
43
 
44
- can :read, Alchemy::Page, Alchemy::Page.published.not_restricted do |p|
45
- p.public? && !p.restricted?
44
+ can :read, Alchemy::Page, Alchemy::Page.published.not_restricted.from_current_site do |p|
45
+ p.public? && !p.restricted? && p.site == Alchemy::Site.current
46
46
  end
47
47
  end
48
48
  end
@@ -64,8 +64,8 @@ module Alchemy
64
64
  e.public?
65
65
  end
66
66
 
67
- can :read, Alchemy::Page, Alchemy::Page.published do |p|
68
- p.public?
67
+ can :read, Alchemy::Page, Alchemy::Page.published.from_current_site do |p|
68
+ p.public? && p.site == Alchemy::Site.current
69
69
  end
70
70
  end
71
71
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "7.0.0-c"
4
+ VERSION = "7.0.0-rc1"
5
5
 
6
6
  def self.version
7
7
  VERSION
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: 7.0.0.pre.c
4
+ version: 7.0.0.pre.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
@@ -756,7 +756,6 @@ files:
756
756
  - app/assets/javascripts/alchemy/admin.js
757
757
  - app/assets/javascripts/alchemy/alchemy.autocomplete.js.coffee
758
758
  - app/assets/javascripts/alchemy/alchemy.base.js.coffee
759
- - app/assets/javascripts/alchemy/alchemy.browser.js.coffee
760
759
  - app/assets/javascripts/alchemy/alchemy.buttons.js.coffee
761
760
  - app/assets/javascripts/alchemy/alchemy.char_counter.js.coffee
762
761
  - app/assets/javascripts/alchemy/alchemy.confirm_dialog.js.coffee
@@ -770,7 +769,6 @@ files:
770
769
  - app/assets/javascripts/alchemy/alchemy.growler.js.coffee
771
770
  - app/assets/javascripts/alchemy/alchemy.gui.js.coffee
772
771
  - app/assets/javascripts/alchemy/alchemy.hotkeys.js.coffee
773
- - app/assets/javascripts/alchemy/alchemy.html5.js
774
772
  - app/assets/javascripts/alchemy/alchemy.image_overlay.coffee
775
773
  - app/assets/javascripts/alchemy/alchemy.initializer.js.coffee
776
774
  - app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee
@@ -1,22 +0,0 @@
1
- window.Alchemy = {} if typeof(Alchemy) is "undefined"
2
-
3
- Alchemy.Browser =
4
- isiPhone: navigator.userAgent.match(/iPhone/i) isnt null
5
- isiPad: navigator.userAgent.match(/iPad/i) isnt null
6
- isiPod: navigator.userAgent.match(/iPod/i) isnt null
7
- isiOS: navigator.userAgent.match(/iPad|iPhone|iPod/i) isnt null
8
- isFirefox: navigator.userAgent.match(/Firefox/i) isnt null
9
- isChrome: navigator.userAgent.match(/Chrome/i) isnt null
10
- isSafari: navigator.userAgent.match(/AppleWebKit/) and not navigator.userAgent.match(/Chrome/)
11
- isIE: navigator.userAgent.match(/MSIE/i) isnt null
12
- getVersion: (browser) ->
13
- if Alchemy.Browser["is" + browser]
14
- parseInt(navigator.userAgent.match(new RegExp(browser + ".[0-9]+", "i"))[0].replace(new RegExp(browser + "."), ""), 10)
15
- else
16
- null
17
-
18
- Alchemy.Browser.ChromeVersion = Alchemy.Browser.getVersion("Chrome")
19
- Alchemy.Browser.FirefoxVersion = Alchemy.Browser.getVersion("Firefox")
20
- Alchemy.Browser.SafariVersion = Alchemy.Browser.getVersion("Safari")
21
- Alchemy.Browser.IEVersion = Alchemy.Browser.getVersion("MSIE")
22
- Alchemy.Browser.isWebKit = Alchemy.Browser.isChrome || Alchemy.Browser.isSafari
@@ -1,22 +0,0 @@
1
- // Testing for HTML5 features
2
- if (typeof(Alchemy) === 'undefined') {
3
- var Alchemy = {};
4
- }
5
-
6
- Alchemy.HTML5 = {};
7
-
8
- Alchemy.HTML5.hasUploadSupport = function() {
9
- return typeof(window.FileReader) !== 'undefined' && supportFileAPI() && supportAjaxUploadProgressEvents();
10
-
11
- function supportFileAPI() {
12
- var fi = document.createElement('INPUT');
13
- fi.type = 'file';
14
- return 'files' in fi;
15
- }
16
-
17
- function supportAjaxUploadProgressEvents() {
18
- var xhr = new XMLHttpRequest();
19
- return !!(xhr && ('upload' in xhr) && ('onprogress' in xhr.upload));
20
- }
21
-
22
- };