calendar_date_select 1.11.1 → 1.12
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/History.txt
CHANGED
data/lib/calendar_date_select.rb
CHANGED
@@ -6,6 +6,12 @@ if Object.const_defined?(:Rails) && File.directory?(Rails.root + "/public")
|
|
6
6
|
ActionView::Base.send(:include, CalendarDateSelect::FormHelper)
|
7
7
|
ActionView::Base.send(:include, CalendarDateSelect::IncludesHelper)
|
8
8
|
|
9
|
+
if ([Rails::VERSION::MAJOR, Rails::VERSION::MINOR] <=> [2, 2]) == -1
|
10
|
+
puts "This version of calendar date select (#{CalendarDateSelect.version}) requires Rails 2.2"
|
11
|
+
puts "To use an earlier version of rails, use calendar_date_select version 1.11.x"
|
12
|
+
exit
|
13
|
+
end
|
14
|
+
|
9
15
|
# install files
|
10
16
|
unless File.exists?(RAILS_ROOT + '/public/javascripts/calendar_date_select/calendar_date_select.js')
|
11
17
|
['/public', '/public/javascripts/calendar_date_select', '/public/stylesheets/calendar_date_select', '/public/images/calendar_date_select', '/public/javascripts/calendar_date_select/locale'].each do |dir|
|
@@ -15,5 +21,4 @@ if Object.const_defined?(:Rails) && File.directory?(Rails.root + "/public")
|
|
15
21
|
FileUtils.cp(Dir.glob(source+'/*.*'), dest)
|
16
22
|
end
|
17
23
|
end
|
18
|
-
|
19
24
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class CalendarDateSelect
|
2
|
-
VERSION = '1.
|
2
|
+
VERSION = '1.12'
|
3
3
|
FORMATS = {
|
4
4
|
:natural => {
|
5
5
|
:date => "%B %d, %Y",
|
@@ -176,7 +176,7 @@ class CalendarDateSelect
|
|
176
176
|
nil
|
177
177
|
end
|
178
178
|
|
179
|
-
tag = ActionView::Helpers::InstanceTag.new(object, method, self,
|
179
|
+
tag = ActionView::Helpers::InstanceTag.new(object, method, self, options.delete(:object))
|
180
180
|
calendar_date_select_output(
|
181
181
|
tag.to_input_field_tag( (calendar_options[:hidden] || calendar_options[:embedded]) ? "hidden" : "text", options),
|
182
182
|
calendar_options
|
@@ -1,4 +1,4 @@
|
|
1
|
-
// CalendarDateSelect version 1.
|
1
|
+
// CalendarDateSelect version 1.12 - a prototype based date picker
|
2
2
|
// Questions, comments, bugs? - see the project page: http://code.google.com/p/calendardateselect
|
3
3
|
if (typeof Prototype == 'undefined') alert("CalendarDateSelect Error: Prototype could not be found. Please make sure that your application's layout includes prototype.js (.g. <%= javascript_include_tag :defaults %>) *before* it includes calendar_date_select.js (.g. <%= calendar_date_select_includes %>).");
|
4
4
|
if (Prototype.Version < "1.6") alert("Prototype 1.6.0 is required. If using earlier version of prototype, please use calendar_date_select version 1.8.3");
|