active_admin_datetimepicker 0.3.0 → 0.4.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 +5 -6
- data/Gemfile +2 -2
- data/README.md +12 -5
- data/app/assets/javascripts/active_admin_datetimepicker.js.coffee +2 -2
- data/lib/active_admin_datetimepicker/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b9c9dd279a37c84c6094dbe03dbc54dc398fdb7
|
4
|
+
data.tar.gz: d94c5298dad442e98ec8752c2cf34e5ac88c33d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7015872e440007cfceb06e98f20cb6fad15c16778ee2a116229d0562b7a52a07e0c30f89350a8ad1ecdb4b5d0f2da980538211e1f198544811812baa0939c228
|
7
|
+
data.tar.gz: 81dfcdc362abed2d40b4c06471eeaf9d1ad3f957364126cdca60bbdb4713b6f5e081bded3cac66e7e5762a699c06975425cd17e5cc513bc84a958b8331446358
|
data/.travis.yml
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
script: bundle exec rspec spec
|
2
2
|
env:
|
3
3
|
matrix:
|
4
|
-
- RAILS=4.0.13
|
5
|
-
- RAILS=4.1.5
|
6
4
|
- RAILS=4.2.6
|
5
|
+
- RAILS=5.0.0
|
7
6
|
rvm:
|
8
|
-
- 2.
|
9
|
-
- 2.
|
10
|
-
- 2.3.0
|
7
|
+
- 2.2.6
|
8
|
+
- 2.3.3
|
11
9
|
before_install:
|
12
|
-
- gem install bundler -v '= 1.9.3'
|
13
10
|
- gem update --system
|
11
|
+
- rvm @global do gem uninstall bundler -a -x
|
12
|
+
- rvm @global do gem install bundler -v 1.14.6
|
14
13
|
- gem --version
|
data/Gemfile
CHANGED
@@ -3,11 +3,11 @@ source 'https://rubygems.org'
|
|
3
3
|
# Specify your gem's dependencies in active_admin_datetimepicker.gemspec
|
4
4
|
gemspec
|
5
5
|
group :test do
|
6
|
-
default_rails_version = '4.2.
|
6
|
+
default_rails_version = '4.2.7'
|
7
7
|
gem 'sprockets-rails', '2.3.3'
|
8
8
|
gem 'rails', "#{ENV['RAILS'] || default_rails_version}"
|
9
9
|
gem 'rspec-rails'
|
10
|
-
gem 'activeadmin', github: 'activeadmin'
|
10
|
+
gem 'activeadmin', github: 'activeadmin', ref: '06aa8b2af692e46fc360832473ca63e23a70b3d4'
|
11
11
|
gem 'coveralls', require: false # Test coverage website. Go to https://coveralls.io
|
12
12
|
gem 'sass-rails'
|
13
13
|
gem 'sqlite3'
|
data/README.md
CHANGED
@@ -57,15 +57,22 @@ ActiveAdminDatetimepicker::Base.default_datetime_picker_options = {
|
|
57
57
|
ActiveAdminDatetimepicker::Base.format = "%Y-%m-%d %H:%M:%S"
|
58
58
|
```
|
59
59
|
|
60
|
+
## Change datetime format
|
61
|
+
If you want to change format - you need to make sure that front-end and back-end formats are identical. And remember JS and Ruby datetime format has different syntax.
|
60
62
|
|
61
|
-
|
62
|
-
|
63
|
+
Create configuration file '/config/initializers/init_datetimpicker.rb'
|
63
64
|
|
64
|
-
|
65
|
+
```ruby
|
66
|
+
# Example "11/03/2016 13:00"
|
67
|
+
ActiveAdminDatetimepicker::Base.default_datetime_picker_options = {
|
68
|
+
format: 'd/m/Y H:i', # JS format
|
69
|
+
defaultTime: proc { Time.current.strftime('%H:00') } # not necessary
|
70
|
+
}
|
71
|
+
ActiveAdminDatetimepicker::Base.format = "%d/%m/%Y %H:%M" # Ruby format
|
72
|
+
```
|
65
73
|
|
66
|
-
|
74
|
+
See [the datetimepicker documentation for more details](http://xdsoft.net/jqplugins/datetimepicker/).
|
67
75
|
|
68
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
69
76
|
|
70
77
|
## Contributing
|
71
78
|
|
@@ -14,7 +14,7 @@
|
|
14
14
|
options = $(entry).data 'datepicker-options'
|
15
15
|
$(entry).datetimepicker $.extend(defaults, options)
|
16
16
|
|
17
|
-
$ ->
|
17
|
+
$(document).on 'ready turbolinks:load', ->
|
18
18
|
setupDateTimePicker $('body')
|
19
19
|
$(document).on 'has_many_add:after', '.has_many_container', (e, fieldset) ->
|
20
|
-
setupDateTimePicker fieldset
|
20
|
+
setupDateTimePicker fieldset
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.4.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: 2017-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xdan-datetimepicker-rails
|
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
version: '0'
|
96
96
|
requirements: []
|
97
97
|
rubyforge_project:
|
98
|
-
rubygems_version: 2.
|
98
|
+
rubygems_version: 2.6.10
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
101
|
summary: datetimepicker extension for ActiveAdmin
|