card-mod-date 0.14.2 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
data/data/real.yml ADDED
@@ -0,0 +1,21 @@
1
+ ---
2
+ - :name: Date
3
+ :type: :cardtype
4
+ :codename: date
5
+ :fields:
6
+ :description: "<p>Date cards contain a date.</p>"
7
+ - :name: "*when created"
8
+ :codename: when_created
9
+ - :name: "*when last edited"
10
+ :codename: when_last_edited
11
+ - :name: "*now"
12
+ :codename: now
13
+ - :name: "*datepicker"
14
+ :type: :json
15
+ :codename: datepicker
16
+ :content: |
17
+ {
18
+ "format": "YY-MM-DD",
19
+ "useCurrent": true,
20
+ "defaultDate": false
21
+ }
data/data/test.yml ADDED
@@ -0,0 +1,23 @@
1
+ - :name: "*test context"
2
+ :codename: test_context
3
+ - :name:
4
+ - :test_context
5
+ - :right
6
+ - :default
7
+ :type: :list
8
+ - :name:
9
+ - :verification_email
10
+ - :test_context
11
+ :content: Decko Bot+*account
12
+ - :name:
13
+ - :password_reset_email
14
+ - :test_context
15
+ :content: Decko Bot+*account
16
+ - :name:
17
+ - :signup_alert_email
18
+ - :test_context
19
+ :content: User
20
+ - :name:
21
+ - :follower_notification_email
22
+ - :test_context
23
+ :content: "*changed card"
@@ -14,16 +14,16 @@ class AddDatepicker < Cardio::Migration::Core
14
14
  TEXT
15
15
 
16
16
  def up
17
- ensure_card "Date", codename: "date", type_id: Card::CardtypeID
18
- ensure_card "script: datepicker",
17
+ Card.ensure name: "Date", codename: "date", type_id: Card::CardtypeID
18
+ Card.ensure name: "script: datepicker",
19
19
  codename: "script_datepicker", type_id: Card::JavaScriptID
20
- ensure_card "style: datepicker",
20
+ Card.ensure name: "style: datepicker",
21
21
  codename: "style_datepicker", type_id: Card::ScssID
22
- ensure_card "script: datepicker config",
22
+ Card.ensure name: "script: datepicker config",
23
23
  codename: "script_datepicker_config", type_id: Card::CoffeeScriptID
24
- ensure_card "*datepicker",
24
+ Card.ensure name: "*datepicker",
25
25
  codename: "datepicker", type_id: Card::JsonID,
26
26
  content: DEFAULT_CONFIG
27
- ensure_card %i[datepicker self help], content: HELP_TEXT
27
+ Card.ensure name: %i[datepicker self help], content: HELP_TEXT
28
28
  end
29
29
  end
data/set/all/calendar.rb CHANGED
@@ -1,10 +1,14 @@
1
1
  basket[:list_input_options] << "calendar"
2
- basket[:script_config][:datepicker] = "setDatepickerConfig"
2
+ basket[:script_calls]["setDatepickerConfig"] = :datepicker_config
3
3
 
4
4
  format :html do
5
+ def datepicker_config
6
+ Card::Rule.global_setting :datepicker
7
+ end
8
+
5
9
  def calendar_input
6
10
  text_field :content, class: "date-editor datetimepicker-input",
7
- "data-toggle": "datetimepicker",
8
- "data-target": "##{form_prefix}_content.date-editor"
11
+ "data-bs-toggle": "datetimepicker",
12
+ "data-bs-target": "##{form_prefix}_content.date-editor"
9
13
  end
10
14
  end
@@ -1,3 +1,9 @@
1
+ assign_type :phrase
2
+
3
+ def virtual?
4
+ new?
5
+ end
6
+
1
7
  def content
2
8
  return "" unless left&.real?
3
9
 
@@ -1,3 +1,9 @@
1
+ assign_type :phrase
2
+
3
+ def virtual?
4
+ new?
5
+ end
6
+
1
7
  def content
2
8
  return "" unless left&.real?
3
9
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-date
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.2
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-01-08 00:00:00.000000000 Z
13
+ date: 2023-01-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: card
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.104.2
21
+ version: 1.105.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 1.104.2
28
+ version: 1.105.0
29
29
  description: ''
30
30
  email:
31
31
  - info@decko.org
@@ -37,6 +37,10 @@ files:
37
37
  - assets/script/script_datepicker_config.js.coffee
38
38
  - assets/style/manifest.yml
39
39
  - assets/style/tempusdominus.scss
40
+ - data/files/mod_date_script_asset_output/file.js
41
+ - data/files/mod_date_script_datepicker_machine_output/file.js
42
+ - data/real.yml
43
+ - data/test.yml
40
44
  - db/migrate_core_cards/20180509141814_add_datepicker.rb
41
45
  - db/migrate_core_cards/20210509141814_remove_datepicker_script_card.rb
42
46
  - set/all/calendar.rb
@@ -932,6 +936,7 @@ metadata:
932
936
  wiki_uri: https://decko.org
933
937
  documentation_url: http://docs.decko.org/
934
938
  card-mod: date
939
+ card-mod-group: gem-defaults
935
940
  post_install_message:
936
941
  rdoc_options: []
937
942
  require_paths:
@@ -947,7 +952,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
947
952
  - !ruby/object:Gem::Version
948
953
  version: '0'
949
954
  requirements: []
950
- rubygems_version: 3.2.15
955
+ rubygems_version: 3.3.11
951
956
  signing_key:
952
957
  specification_version: 4
953
958
  summary: Calendar editor