card-mod-date 0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/db/migrate_core_cards/20180509141814_add_datepicker.rb +29 -0
- data/lib/javascript/script_datepicker_config.js.coffee +26 -0
- data/lib/stylesheets/tempusdominus.scss +12 -0
- data/set/all/calendar.rb +9 -0
- data/set/self/datepicker.rb +6 -0
- data/set/self/script_datepicker.rb +7 -0
- data/set/self/script_datepicker_config.rb +4 -0
- data/set/self/style_datepicker.rb +11 -0
- data/set/type/date.rb +5 -0
- metadata +56 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e3ab4579aae77cf3fdaad5dcd9e37e24f391ce9bf12dade9614d3bbee42fb93a
|
4
|
+
data.tar.gz: f24a1cfcb18348c236d496dadcddfe6270cc4cd6b7dc5c5110b4490ef679e592
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c01a9c29c606dcee37c3ba88e6c695d1c0044af8e78d31961746fea405bf6d4c8238e0329869b7c67ef8d4bc523bfbae6020d1195cab00a07cef4890ec5dcb2c
|
7
|
+
data.tar.gz: a5df3f3f4b5eb39c6e07e662705f75bc67a05cf88f7b0a0a534647349bf8fec269a517216ca8eb85712a3266b81a7235983157dcf35a8d8d316aeb9f73173262
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
|
3
|
+
class AddDatepicker < Card::Migration::Core
|
4
|
+
HELP_TEXT = <<-TEXT.strip_heredoc
|
5
|
+
Configure the date select tool using these available [[https://tempusdominus.github.io/bootstrap-4/Options/|options]]
|
6
|
+
TEXT
|
7
|
+
|
8
|
+
DEFAULT_CONFIG = <<-TEXT.strip_heredoc
|
9
|
+
{
|
10
|
+
"format": "YY-MM-DD",
|
11
|
+
"useCurrent": true,
|
12
|
+
"defaultDate": false
|
13
|
+
}
|
14
|
+
TEXT
|
15
|
+
|
16
|
+
def up
|
17
|
+
ensure_card "Date", codename: "date", type_id: Card::CardtypeID
|
18
|
+
ensure_card "script: datepicker",
|
19
|
+
codename: "script_datepicker", type_id: Card::JavaScriptID
|
20
|
+
ensure_card "style: datepicker",
|
21
|
+
codename: "style_datepicker", type_id: Card::ScssID
|
22
|
+
ensure_card "script: datepicker config",
|
23
|
+
codename: "script_datepicker_config", type_id: Card::CoffeeScriptID
|
24
|
+
ensure_card "*datepicker",
|
25
|
+
codename: "datepicker", type_id: Card::JsonID,
|
26
|
+
content: DEFAULT_CONFIG
|
27
|
+
ensure_card %i[datepicker self help], content: HELP_TEXT
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
decko.addEditor(
|
2
|
+
'.date-editor',
|
3
|
+
->
|
4
|
+
decko.initDatepicker($(this))
|
5
|
+
->
|
6
|
+
@val()
|
7
|
+
)
|
8
|
+
|
9
|
+
$.extend decko,
|
10
|
+
setDatepickerConfig: (string) ->
|
11
|
+
setter = ->
|
12
|
+
try
|
13
|
+
$.parseJSON string
|
14
|
+
catch
|
15
|
+
{}
|
16
|
+
decko.datepickerConfig = setter()
|
17
|
+
|
18
|
+
configDatepicker: () ->
|
19
|
+
conf = { format: "YY-MM-DD" }
|
20
|
+
hard_conf = {}
|
21
|
+
user_conf = if decko.datepickerConfig? then decko.datepickerConfig else {}
|
22
|
+
$.extend conf, user_conf, hard_conf
|
23
|
+
conf
|
24
|
+
|
25
|
+
initDatepicker: (input) ->
|
26
|
+
input.datetimepicker(decko.configDatepicker())
|
data/set/all/calendar.rb
ADDED
data/set/type/date.rb
ADDED
metadata
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: card-mod-date
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '0.1'
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ethan McCutchen
|
8
|
+
- Philipp Kühl
|
9
|
+
- Gerry Gleason
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
date: 2020-09-19 00:00:00.000000000 Z
|
14
|
+
dependencies: []
|
15
|
+
description: ''
|
16
|
+
email:
|
17
|
+
- info@decko.org
|
18
|
+
executables: []
|
19
|
+
extensions: []
|
20
|
+
extra_rdoc_files: []
|
21
|
+
files:
|
22
|
+
- db/migrate_core_cards/20180509141814_add_datepicker.rb
|
23
|
+
- lib/javascript/script_datepicker_config.js.coffee
|
24
|
+
- lib/stylesheets/tempusdominus.scss
|
25
|
+
- set/all/calendar.rb
|
26
|
+
- set/self/datepicker.rb
|
27
|
+
- set/self/script_datepicker.rb
|
28
|
+
- set/self/script_datepicker_config.rb
|
29
|
+
- set/self/style_datepicker.rb
|
30
|
+
- set/type/date.rb
|
31
|
+
homepage: http://decko.org
|
32
|
+
licenses:
|
33
|
+
- GPL-2.0
|
34
|
+
- GPL-3.0
|
35
|
+
metadata:
|
36
|
+
card-mod: date
|
37
|
+
post_install_message:
|
38
|
+
rdoc_options: []
|
39
|
+
require_paths:
|
40
|
+
- lib
|
41
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 2.3.0
|
46
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '0'
|
51
|
+
requirements: []
|
52
|
+
rubygems_version: 3.0.3
|
53
|
+
signing_key:
|
54
|
+
specification_version: 4
|
55
|
+
summary: Calendar editor
|
56
|
+
test_files: []
|