datetimepicker 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +29 -0
- data/Rakefile +2 -0
- data/app/assets/javascripts/datetimepicker.js.coffee +12 -0
- data/app/assets/javascripts/datetimepicker/bootstrap_datepicker.js +401 -0
- data/app/assets/javascripts/datetimepicker/bootstrap_timepicker.js +800 -0
- data/app/assets/stylesheets/_datetimepicker.css.scss +2 -0
- data/app/assets/stylesheets/datetimepicker/bootstrap_datepicker.css +156 -0
- data/app/assets/stylesheets/datetimepicker/bootstrap_timepicker.css +81 -0
- data/datetimepicker.gemspec +17 -0
- data/lib/datetimepicker.rb +14 -0
- data/lib/datetimepicker/activerecord.rb +122 -0
- data/lib/datetimepicker/date_and_time_manipulator.rb +84 -0
- data/lib/datetimepicker/date_formats.rb +2 -0
- data/lib/datetimepicker/engine.rb +5 -0
- data/lib/datetimepicker/simple_form/inputs/datetimepicker_input.rb +29 -0
- data/lib/datetimepicker/version.rb +3 -0
- metadata +65 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
module SimpleForm
|
2
|
+
module Inputs
|
3
|
+
|
4
|
+
class DatetimepickerInput < Base
|
5
|
+
def input
|
6
|
+
multiple_inputs_buffer = ""
|
7
|
+
|
8
|
+
# Build the CSS and input necessary for datetimepicker_date
|
9
|
+
input_html_classes.push(partial_input_name(:date))
|
10
|
+
multiple_inputs_buffer << @builder.text_field("#{attribute_name}_#{partial_input_name(:date)}", input_html_options)
|
11
|
+
input_html_classes.delete(partial_input_name(:date))
|
12
|
+
|
13
|
+
# Build the CSS and input necessary for datetimepicker_time
|
14
|
+
input_html_classes.push(partial_input_name(:time))
|
15
|
+
multiple_inputs_buffer << @builder.text_field("#{attribute_name}_#{partial_input_name(:time)}", input_html_options)
|
16
|
+
input_html_classes.delete(partial_input_name(:time))
|
17
|
+
|
18
|
+
return multiple_inputs_buffer
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def partial_input_name(which_input)
|
24
|
+
"datetimepicker_#{which_input}"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: datetimepicker
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Daniel Ott
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-09-11 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: Custom field for individual setting of date and time for Rails :datetime
|
15
|
+
attributes.
|
16
|
+
email:
|
17
|
+
- danott@marshill.com
|
18
|
+
executables: []
|
19
|
+
extensions: []
|
20
|
+
extra_rdoc_files: []
|
21
|
+
files:
|
22
|
+
- Gemfile
|
23
|
+
- LICENSE
|
24
|
+
- README.md
|
25
|
+
- Rakefile
|
26
|
+
- app/assets/javascripts/datetimepicker.js.coffee
|
27
|
+
- app/assets/javascripts/datetimepicker/bootstrap_datepicker.js
|
28
|
+
- app/assets/javascripts/datetimepicker/bootstrap_timepicker.js
|
29
|
+
- app/assets/stylesheets/_datetimepicker.css.scss
|
30
|
+
- app/assets/stylesheets/datetimepicker/bootstrap_datepicker.css
|
31
|
+
- app/assets/stylesheets/datetimepicker/bootstrap_timepicker.css
|
32
|
+
- datetimepicker.gemspec
|
33
|
+
- lib/datetimepicker.rb
|
34
|
+
- lib/datetimepicker/activerecord.rb
|
35
|
+
- lib/datetimepicker/date_and_time_manipulator.rb
|
36
|
+
- lib/datetimepicker/date_formats.rb
|
37
|
+
- lib/datetimepicker/engine.rb
|
38
|
+
- lib/datetimepicker/simple_form/inputs/datetimepicker_input.rb
|
39
|
+
- lib/datetimepicker/version.rb
|
40
|
+
homepage: ''
|
41
|
+
licenses: []
|
42
|
+
post_install_message:
|
43
|
+
rdoc_options: []
|
44
|
+
require_paths:
|
45
|
+
- lib
|
46
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
47
|
+
none: false
|
48
|
+
requirements:
|
49
|
+
- - ! '>='
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0'
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
55
|
+
- - ! '>='
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '0'
|
58
|
+
requirements: []
|
59
|
+
rubyforge_project:
|
60
|
+
rubygems_version: 1.8.17
|
61
|
+
signing_key:
|
62
|
+
specification_version: 3
|
63
|
+
summary: Custom field for individual setting of date and time for Rails :datetime
|
64
|
+
attributes.
|
65
|
+
test_files: []
|