active_admin_datetimepicker 0.6.3 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +10 -6
- data/Gemfile +3 -2
- data/README.md +12 -11
- data/active_admin_datetimepicker.gemspec +2 -1
- data/lib/active_admin_datetimepicker/version.rb +1 -1
- metadata +25 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d0661663f34baf520b69cc359b1b1f77e35b00030302fc06048404dc18c6aaa
|
4
|
+
data.tar.gz: a04a5cf0f10fc9bb2a0d1533482117dfde74364b72061ac4d68db7b90a71cc46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca1b83aeeb980d5220cc3157bfc2d999897e0ad0a4ec9d42a9d77bf3cc4fd04f80091fd4c62152c8cf3316702102ebda05e193775fe88fc5614387cbed44a604
|
7
|
+
data.tar.gz: 492ecff0dc6f2ba3da0ef21c79dc7d9a7e04930fe9936ceb2bf43c37249e1dbe4a68ca15bfa2567273942a20b50a7d8b774d823ac90582d99d75c6c6b01eab7b
|
data/.travis.yml
CHANGED
@@ -3,16 +3,20 @@ language: ruby
|
|
3
3
|
addons:
|
4
4
|
chrome: stable
|
5
5
|
|
6
|
-
before_install:
|
6
|
+
before_install:
|
7
|
+
- gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
|
8
|
+
- gem install bundler -v '< 2'
|
7
9
|
|
8
10
|
script: bundle exec rspec spec
|
9
11
|
|
10
12
|
env:
|
11
13
|
matrix:
|
12
|
-
- RAILS=4.2.
|
13
|
-
- RAILS=5.1.0 AA=1.2.
|
14
|
-
- RAILS=5.2.
|
14
|
+
- RAILS=4.2.0 AA=1.1.0
|
15
|
+
- RAILS=5.1.0 AA=1.2.0
|
16
|
+
- RAILS=5.2.0 AA=1.3.0
|
17
|
+
- RAILS=5.2.0 AA=1.4.0
|
18
|
+
- RAILS=5.2.0 AA=2.0.0
|
19
|
+
|
15
20
|
rvm:
|
16
|
-
- 2.3
|
17
21
|
- 2.4
|
18
|
-
- 2.
|
22
|
+
- 2.6
|
data/Gemfile
CHANGED
@@ -2,9 +2,10 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
# Specify your gem's dependencies in active_admin_datetimepicker.gemspec
|
4
4
|
gemspec
|
5
|
+
|
5
6
|
group :test do
|
6
7
|
default_rails_version = '5.2.1'
|
7
|
-
default_activeadmin_version = '
|
8
|
+
default_activeadmin_version = '2.0.0'
|
8
9
|
|
9
10
|
gem 'rails', "~> #{ENV['RAILS'] || default_rails_version}"
|
10
11
|
gem 'activeadmin', "~> #{ENV['AA'] || default_activeadmin_version}"
|
@@ -12,7 +13,7 @@ group :test do
|
|
12
13
|
gem 'rspec-rails'
|
13
14
|
gem 'coveralls', require: false # Test coverage website. Go to https://coveralls.io
|
14
15
|
gem 'sass-rails'
|
15
|
-
gem 'sqlite3'
|
16
|
+
gem 'sqlite3', '~> 1.3.6'
|
16
17
|
gem 'launchy'
|
17
18
|
gem 'database_cleaner'
|
18
19
|
gem 'capybara'
|
data/README.md
CHANGED
@@ -4,14 +4,13 @@
|
|
4
4
|
|
5
5
|
# ActiveAdminDatetimepicker
|
6
6
|
|
7
|
-
Adds
|
8
|
-
|
7
|
+
Adds XDSoft's DateTime picker as a `date_time_picker` input for forms, and `date_time_range` for filters.
|
9
8
|
|
10
9
|
![ActiveAdminDatetimepicker](https://raw.githubusercontent.com/ActiveAdminPlugins/activeadmin_datetimepicker/master/screen/screen.png "ActiveAdminDatetimepicker")
|
11
10
|
|
12
11
|
## Installation
|
13
12
|
|
14
|
-
Add this line to your application's Gemfile
|
13
|
+
Add this line to your application's `Gemfile`:
|
15
14
|
|
16
15
|
```ruby
|
17
16
|
gem 'active_admin_datetimepicker'
|
@@ -25,13 +24,13 @@ Or install it yourself as:
|
|
25
24
|
|
26
25
|
$ gem install active_admin_datetimepicker
|
27
26
|
|
28
|
-
Add following line into `app/assets/stylesheets/active_admin.css.scss
|
27
|
+
Add the following line into `app/assets/stylesheets/active_admin.css.scss`:
|
29
28
|
|
30
29
|
```css
|
31
30
|
@import "active_admin_datetimepicker";
|
32
31
|
```
|
33
32
|
|
34
|
-
Add following line into `app/assets/javascripts/active_admin.js.coffee
|
33
|
+
Add the following line into `app/assets/javascripts/active_admin.js.coffee`:
|
35
34
|
|
36
35
|
```coffee
|
37
36
|
#= require active_admin_datetimepicker
|
@@ -40,7 +39,8 @@ Add following line into `app/assets/javascripts/active_admin.js.coffee`
|
|
40
39
|
|
41
40
|
## Usage
|
42
41
|
|
43
|
-
|
42
|
+
This plugin adds the `date_time_picker` input and `date_time_range` filter, which use the [XDSoft DateTime Picker gem](https://github.com/shekibobo/xdan-datetimepicker-rails).
|
43
|
+
|
44
44
|
The `date_time_picker` input accepts many of the options available to the standard jQueryUI Datepicker. For example:
|
45
45
|
|
46
46
|
```ruby
|
@@ -57,19 +57,20 @@ The `date_time_picker` input accepts many of the options available to the standa
|
|
57
57
|
## Override behaviour in initializer
|
58
58
|
|
59
59
|
```ruby
|
60
|
-
# This if for front-end
|
60
|
+
# This if for the front-end JavaScript side
|
61
61
|
ActiveAdminDatetimepicker::Base.default_datetime_picker_options = {
|
62
62
|
defaultDate: proc { Time.current.strftime("%Y-%m-%d 00:00") }
|
63
63
|
}
|
64
|
-
# This if for backend
|
64
|
+
# This if for the Ruby backend
|
65
65
|
ActiveAdminDatetimepicker::Base.format = "%Y-%m-%d %H:%M:%S"
|
66
66
|
```
|
67
67
|
|
68
68
|
## Change datetime format
|
69
|
-
If you want to change format - you need to make sure that front-end and back-end formats are identical.
|
70
|
-
And remember JS and Ruby datetime format has different syntax.
|
71
69
|
|
72
|
-
|
70
|
+
If you want to change the format you need to make sure that front-end and back-end formats are identical.
|
71
|
+
And remember JS and Ruby datetime format have different syntaxes.
|
72
|
+
|
73
|
+
Create configuration file `config/initializers/init_datetimepicker.rb`:
|
73
74
|
|
74
75
|
```ruby
|
75
76
|
# Example "11/03/2016 13:00"
|
@@ -19,6 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.add_dependency "
|
22
|
+
spec.add_dependency "coffee-rails"
|
23
|
+
spec.add_dependency "activeadmin", ">= 1.1", "< 3.a"
|
23
24
|
spec.add_dependency "xdan-datetimepicker-rails", "~> 2.5.4"
|
24
25
|
end
|
metadata
CHANGED
@@ -1,29 +1,49 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_admin_datetimepicker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Fedoronchuk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: coffee-rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: activeadmin
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
|
-
- - "
|
31
|
+
- - ">="
|
18
32
|
- !ruby/object:Gem::Version
|
19
33
|
version: '1.1'
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 3.a
|
20
37
|
type: :runtime
|
21
38
|
prerelease: false
|
22
39
|
version_requirements: !ruby/object:Gem::Requirement
|
23
40
|
requirements:
|
24
|
-
- - "
|
41
|
+
- - ">="
|
25
42
|
- !ruby/object:Gem::Version
|
26
43
|
version: '1.1'
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 3.a
|
27
47
|
- !ruby/object:Gem::Dependency
|
28
48
|
name: xdan-datetimepicker-rails
|
29
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -83,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
103
|
version: '0'
|
84
104
|
requirements: []
|
85
105
|
rubyforge_project:
|
86
|
-
rubygems_version:
|
106
|
+
rubygems_version: 3.0.0.beta1
|
87
107
|
signing_key:
|
88
108
|
specification_version: 4
|
89
109
|
summary: datetimepicker extension for ActiveAdmin
|