alchemy_cms 7.1.4 → 7.1.6

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: a6c615cf9ac7a5ea2ca6d9a146cf61aab6511bcfa4277740e8989492288427e9
4
- data.tar.gz: 3a35e7708046a45c5abdc50403428c9fe153e95634a97a3ee6dc3552b3401030
3
+ metadata.gz: 317caab1ef8a6019ed85b61349817e4ae3f04db4a886442aa66a08ef24ea21d3
4
+ data.tar.gz: 5aa12003198319cabf9cb4c7a2daa4a83bece9b59ce886bcc1082f5f57e709e1
5
5
  SHA512:
6
- metadata.gz: 78fedab87a5984f88f012177c31133570647b7c7816a55ded8f56127fdf54070b6d6367db843214af1d38e45099502e309be950ceeb14bc78580158e5958ef21
7
- data.tar.gz: 1d251b4a5ba8c0e0287d314d7c06a343ba83bf068b1afb243b026fa9dae254477c73639b4c5c67f7e96e820124255dd08d0eedb11eff127b1d53553e40e8d77e
6
+ metadata.gz: 67ed51a034f0ce690906cfaa8a7d4d06d24184ef7402342c166d9ebcc84e0a3183c9bcc58be7fa8d66671e7e89a3738780cddc0ee97a38c3b4e072ce9454b204
7
+ data.tar.gz: 4af3eb0ecde2863da57720bf1da7cb63cb298dfcc4647de80b8999feadfe6e0c84dae67c7151f602d52c8d7ca686b52b49b4b1714f1a84e210e32dd77efdc667
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 7.1.6 (2024-03-05)
4
+
5
+ - [7.1-stable] Do not include timezone in datepickers only displaying date [#2768](https://github.com/AlchemyCMS/alchemy_cms/pull/2768) ([alchemycms-bot](https://github.com/alchemycms-bot))
6
+
7
+ ## 7.1.5 (2024-02-29)
8
+
9
+ - [7.1-stable] Fix taggable uniqueness in tags admin table [#2764](https://github.com/AlchemyCMS/alchemy_cms/pull/2764) ([alchemycms-bot](https://github.com/alchemycms-bot))
10
+ - [7.1-stable] Fix datepicker in resource forms [#2762](https://github.com/AlchemyCMS/alchemy_cms/pull/2762) ([alchemycms-bot](https://github.com/alchemycms-bot))
11
+
3
12
  ## 7.1.4 (2024-02-27)
4
13
 
5
14
  - [7.1-stable] Merge pull request #2752 from tvdeyen/fix-copy-elements-order [#2754](https://github.com/AlchemyCMS/alchemy_cms/pull/2754) ([alchemycms-bot](https://github.com/alchemycms-bot))
@@ -13,14 +13,25 @@ class Datepicker extends AlchemyHTMLElement {
13
13
  }
14
14
 
15
15
  afterRender() {
16
+ this.flatpickr = flatpickr(
17
+ this.getElementsByTagName("input")[0],
18
+ this.flatpickrOptions
19
+ )
20
+ }
21
+
22
+ disconnected() {
23
+ this.flatpickr.destroy()
24
+ }
25
+
26
+ get flatpickrOptions() {
27
+ const enableTime = /time/.test(this.inputType)
16
28
  const options = {
17
29
  // alchemy_i18n supports `zh_CN` etc., but flatpickr only has two-letter codes (`zh`)
18
30
  locale: currentLocale().slice(0, 2),
19
31
  altInput: true,
20
32
  altFormat: translate(`formats.${this.inputType}`),
21
33
  altInputClass: "flatpickr-input",
22
- dateFormat: "Z",
23
- enableTime: /time/.test(this.inputType),
34
+ enableTime,
24
35
  noCalendar: this.inputType === "time",
25
36
  time_24hr: translate("formats.time_24hr"),
26
37
  onValueUpdate(_selectedDates, _dateStr, instance) {
@@ -28,11 +39,11 @@ class Datepicker extends AlchemyHTMLElement {
28
39
  }
29
40
  }
30
41
 
31
- this.flatpickr = flatpickr(this.getElementsByTagName("input")[0], options)
32
- }
42
+ if (enableTime) {
43
+ options.dateFormat = "Z"
44
+ }
33
45
 
34
- disconnected() {
35
- this.flatpickr.destroy()
46
+ return options
36
47
  }
37
48
  }
38
49
 
@@ -2,7 +2,7 @@
2
2
  <td class="icon"><%= render_icon(:tag, size: "xl") %></td>
3
3
  <td class="name"><%= tag.name %></td>
4
4
  <td>
5
- <% tag.taggings.collect(&:taggable).compact.uniq.each do |taggable| %>
5
+ <% tag.taggings.collect(&:taggable).compact.uniq(&:class).each do |taggable| %>
6
6
  <span class="label">
7
7
  <%= taggable.class.model_name.human %>
8
8
  </span>
@@ -40,7 +40,7 @@ module Alchemy
40
40
  }.merge(options[:input_html] || {})
41
41
 
42
42
  date_field = input attribute_name, as: :string, input_html: input_options
43
- template.content_tag("alchemy-datepicker", date_field, type: type)
43
+ template.content_tag("alchemy-datepicker", date_field, "input-type" => type)
44
44
  end
45
45
 
46
46
  # Renders a simple_form input that displays a richtext editor
@@ -107,12 +107,7 @@ module Alchemy
107
107
  when "boolean"
108
108
  options
109
109
  when "date", "time", "datetime"
110
- options.merge(
111
- as: "string",
112
- input_html: {
113
- data: {datepicker_type: input_type}
114
- }
115
- )
110
+ options.merge(as: input_type)
116
111
  when "text"
117
112
  options.merge(as: "text", input_html: {rows: 4})
118
113
  else
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "7.1.4"
4
+ VERSION = "7.1.6"
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.1.4
4
+ version: 7.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2024-02-27 00:00:00.000000000 Z
16
+ date: 2024-03-05 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: actionmailer