formtastic_calendar_date_select 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/MIT-LICENSE +20 -0
- data/Manifest +9 -0
- data/README.textile +35 -0
- data/Rakefile +12 -0
- data/formtastic_calendar_date_select.gemspec +38 -0
- data/lib/formtastic_calendar_date_select.rb +13 -0
- data/rails/init.rb +2 -0
- data/tasks/formtastic_calendar_date_select_tasks.rake +4 -0
- data/test/formtastic_calendar_date_select_test.rb +8 -0
- data/test/test_helper.rb +3 -0
- metadata +97 -0
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 Paul Smith
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Manifest
ADDED
data/README.textile
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
h1. FormtasticCalendarDateSelect
|
2
|
+
|
3
|
+
Based on Paul Smith's Formtastic_Calendar (http://github.com/elandesign/formtastic_calendar), an extension for Formtastic[1] to generate lightweight javascript calendar date inputs using the CalendarDateSelect plugin[2]
|
4
|
+
|
5
|
+
h2. Example
|
6
|
+
|
7
|
+
Where Task#due_date is a :date field
|
8
|
+
|
9
|
+
<pre><code><% semantic_form_for @task do |form| %>
|
10
|
+
<% form.inputs do %>
|
11
|
+
<%= form.input :due_date, :as => :calendardateselect %>
|
12
|
+
<% end %>
|
13
|
+
<% end %></code></pre>
|
14
|
+
|
15
|
+
h2. Dependencies
|
16
|
+
|
17
|
+
You must have the formtastic gem/plugin added to your application.
|
18
|
+
|
19
|
+
You must have the calendar_date_select gem/plugin added to your application.
|
20
|
+
|
21
|
+
(Tested with formtastic 0.9.7 and calendar_date_select 1.15)
|
22
|
+
|
23
|
+
h2. Todo
|
24
|
+
|
25
|
+
Test, test, test...
|
26
|
+
|
27
|
+
Attempt to port this to unobtrusive javascript, and provide graceful degradation if possible.
|
28
|
+
|
29
|
+
h2. References
|
30
|
+
|
31
|
+
fn1. "Formtastic @ GitHub":http://github.com/justinfrench/formtastic
|
32
|
+
|
33
|
+
fn2. "CalendarDateSelect":http://github.com/timcharper/calendar_date_select
|
34
|
+
|
35
|
+
Copyright (c) 2009 David Oshiro, released under the MIT license
|
data/Rakefile
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
require 'echoe'
|
4
|
+
|
5
|
+
Echoe.new('formtastic_calendar_date_select', '0.1.0') do |p|
|
6
|
+
p.description = "A plugin for formtastic to integrate calendar_date_select date/time picker"
|
7
|
+
p.url = "http://github.com/dyohi/formtastic_calendar_date_select"
|
8
|
+
p.author = "David Oshiro"
|
9
|
+
p.email = "david@davidoshiro.com"
|
10
|
+
p.runtime_dependencies = ['formtastic >= 0.9.7', 'calendar_date_select >= 1.15']
|
11
|
+
p.install_message = "Thank you for installing formtastic_calendar_date_select. Form more information please go to http://github.com/dyohi/formtastic_calendar_date_select."
|
12
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{formtastic_calendar_date_select}
|
5
|
+
s.version = "0.1.0"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["David Oshiro"]
|
9
|
+
s.date = %q{2010-01-13}
|
10
|
+
s.description = %q{A plugin for formtastic to integrate calendar_date_select date/time picker}
|
11
|
+
s.email = %q{david@davidoshiro.com}
|
12
|
+
s.extra_rdoc_files = ["README.textile", "lib/formtastic_calendar_date_select.rb", "tasks/formtastic_calendar_date_select_tasks.rake"]
|
13
|
+
s.files = ["MIT-LICENSE", "Manifest", "README.textile", "Rakefile", "lib/formtastic_calendar_date_select.rb", "rails/init.rb", "tasks/formtastic_calendar_date_select_tasks.rake", "test/formtastic_calendar_date_select_test.rb", "test/test_helper.rb", "formtastic_calendar_date_select.gemspec"]
|
14
|
+
s.homepage = %q{http://github.com/dyohi/formtastic_calendar_date_select}
|
15
|
+
s.post_install_message = %q{Thank you for installing formtastic_calendar_date_select. Form more information please go to http://github.com/dyohi/formtastic_calendar_date_select.}
|
16
|
+
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Formtastic_calendar_date_select", "--main", "README.textile"]
|
17
|
+
s.require_paths = ["lib"]
|
18
|
+
s.rubyforge_project = %q{formtastic_calendar_date_select}
|
19
|
+
s.rubygems_version = %q{1.3.5}
|
20
|
+
s.summary = %q{A plugin for formtastic to integrate calendar_date_select date/time picker}
|
21
|
+
s.test_files = ["test/formtastic_calendar_date_select_test.rb", "test/test_helper.rb"]
|
22
|
+
|
23
|
+
if s.respond_to? :specification_version then
|
24
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
25
|
+
s.specification_version = 3
|
26
|
+
|
27
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
28
|
+
s.add_runtime_dependency(%q<formtastic>, [">= 0", "= 0.9.7"])
|
29
|
+
s.add_runtime_dependency(%q<calendar_date_select>, [">= 0", "= 1.15"])
|
30
|
+
else
|
31
|
+
s.add_dependency(%q<formtastic>, [">= 0", "= 0.9.7"])
|
32
|
+
s.add_dependency(%q<calendar_date_select>, [">= 0", "= 1.15"])
|
33
|
+
end
|
34
|
+
else
|
35
|
+
s.add_dependency(%q<formtastic>, [">= 0", "= 0.9.7"])
|
36
|
+
s.add_dependency(%q<calendar_date_select>, [">= 0", "= 1.15"])
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module DavidOshiro
|
2
|
+
module Formtastic
|
3
|
+
module CalendarDateSelect
|
4
|
+
protected
|
5
|
+
|
6
|
+
def calendar_input(method, options = {})
|
7
|
+
self.label(method, options_for_label(options)) +
|
8
|
+
self.calendar_date_select(method, strip_formtastic_options(options))
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/rails/init.rb
ADDED
data/test/test_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,97 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: formtastic_calendar_date_select
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- David Oshiro
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2010-01-13 00:00:00 -10:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: formtastic
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
- - "="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.9.7
|
27
|
+
version:
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: calendar_date_select
|
30
|
+
type: :runtime
|
31
|
+
version_requirement:
|
32
|
+
version_requirements: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: "0"
|
37
|
+
- - "="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: "1.15"
|
40
|
+
version:
|
41
|
+
description: A plugin for formtastic to integrate calendar_date_select date/time picker
|
42
|
+
email: david@davidoshiro.com
|
43
|
+
executables: []
|
44
|
+
|
45
|
+
extensions: []
|
46
|
+
|
47
|
+
extra_rdoc_files:
|
48
|
+
- README.textile
|
49
|
+
- lib/formtastic_calendar_date_select.rb
|
50
|
+
- tasks/formtastic_calendar_date_select_tasks.rake
|
51
|
+
files:
|
52
|
+
- MIT-LICENSE
|
53
|
+
- Manifest
|
54
|
+
- README.textile
|
55
|
+
- Rakefile
|
56
|
+
- lib/formtastic_calendar_date_select.rb
|
57
|
+
- rails/init.rb
|
58
|
+
- tasks/formtastic_calendar_date_select_tasks.rake
|
59
|
+
- test/formtastic_calendar_date_select_test.rb
|
60
|
+
- test/test_helper.rb
|
61
|
+
- formtastic_calendar_date_select.gemspec
|
62
|
+
has_rdoc: true
|
63
|
+
homepage: http://github.com/dyohi/formtastic_calendar_date_select
|
64
|
+
licenses: []
|
65
|
+
|
66
|
+
post_install_message: Thank you for installing formtastic_calendar_date_select. Form more information please go to http://github.com/dyohi/formtastic_calendar_date_select.
|
67
|
+
rdoc_options:
|
68
|
+
- --line-numbers
|
69
|
+
- --inline-source
|
70
|
+
- --title
|
71
|
+
- Formtastic_calendar_date_select
|
72
|
+
- --main
|
73
|
+
- README.textile
|
74
|
+
require_paths:
|
75
|
+
- lib
|
76
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: "0"
|
81
|
+
version:
|
82
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: "1.2"
|
87
|
+
version:
|
88
|
+
requirements: []
|
89
|
+
|
90
|
+
rubyforge_project: formtastic_calendar_date_select
|
91
|
+
rubygems_version: 1.3.5
|
92
|
+
signing_key:
|
93
|
+
specification_version: 3
|
94
|
+
summary: A plugin for formtastic to integrate calendar_date_select date/time picker
|
95
|
+
test_files:
|
96
|
+
- test/formtastic_calendar_date_select_test.rb
|
97
|
+
- test/test_helper.rb
|