Sha256: 506c8f1e9f93a3834302cc99936f471e7f7c8cee5ae81f5b308e8a9350db7a0c

Contents?: true

Size: 1011 Bytes

Versions: 17

Compression:

Stored size: 1011 Bytes

Contents

# -*- encoding : utf-8 -*-

class AddDatepicker < Cardio::Migration::Core
  HELP_TEXT = <<-TEXT.strip_heredoc
    Configure the date select tool using these available [[https://tempusdominus.github.io/bootstrap-4/Options/|options]]
  TEXT

  DEFAULT_CONFIG = <<-TEXT.strip_heredoc
    {
      "format": "YY-MM-DD",
      "useCurrent": true,
      "defaultDate": false
    }
  TEXT

  def up
    ensure_card "Date", codename: "date", type_id: Card::CardtypeID
    ensure_card "script: datepicker",
                codename: "script_datepicker", type_id: Card::JavaScriptID
    ensure_card "style: datepicker",
                codename: "style_datepicker", type_id: Card::ScssID
    ensure_card "script: datepicker config",
                codename: "script_datepicker_config", type_id: Card::CoffeeScriptID
    ensure_card "*datepicker",
                codename: "datepicker", type_id: Card::JsonID,
                content: DEFAULT_CONFIG
    ensure_card %i[datepicker self help], content: HELP_TEXT
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
card-mod-date-0.14.2 db/migrate_core_cards/20180509141814_add_datepicker.rb
card-mod-date-0.14.1 db/migrate_core_cards/20180509141814_add_datepicker.rb
card-mod-date-0.14.0 db/migrate_core_cards/20180509141814_add_datepicker.rb
card-mod-date-0.13.4 db/migrate_core_cards/20180509141814_add_datepicker.rb
card-mod-date-0.13.3 db/migrate_core_cards/20180509141814_add_datepicker.rb
card-mod-date-0.13.2 db/migrate_core_cards/20180509141814_add_datepicker.rb
card-mod-date-0.13.1 db/migrate_core_cards/20180509141814_add_datepicker.rb
card-mod-date-0.13.0 db/migrate_core_cards/20180509141814_add_datepicker.rb
card-mod-date-0.11.7 db/migrate_core_cards/20180509141814_add_datepicker.rb
card-mod-date-0.12.0 db/migrate_core_cards/20180509141814_add_datepicker.rb
card-mod-date-0.11.6 db/migrate_core_cards/20180509141814_add_datepicker.rb
card-mod-date-0.11.5 db/migrate_core_cards/20180509141814_add_datepicker.rb
card-mod-date-0.11.4 db/migrate_core_cards/20180509141814_add_datepicker.rb
card-mod-date-0.11.3 db/migrate_core_cards/20180509141814_add_datepicker.rb
card-mod-date-0.11.2 db/migrate_core_cards/20180509141814_add_datepicker.rb
card-mod-date-0.11.1 db/migrate_core_cards/20180509141814_add_datepicker.rb
card-mod-date-0.11.0 db/migrate_core_cards/20180509141814_add_datepicker.rb