refinerycms-sl-calendar 2.0.6.2 → 2.0.6.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,12 +19,12 @@
19
19
 
20
20
  <div class='field'>
21
21
  <%= f.label :from -%>
22
- <%= f.text_field :from, :class => 'datetime_range' -%>
22
+ <%= text_field_tag "event[from]", l(@event.starts_at || Time.now, :format => "%Y-%m-%d %I:%M %p"), :class => 'datetime_range' -%>
23
23
  </div>
24
24
 
25
25
  <div class='field'>
26
26
  <%= f.label :to -%>
27
- <%= f.text_field :to, :class => 'datetime_range' -%>
27
+ <%= text_field_tag "event[to]", l(@event.ends_at || Time.now, :format => "%Y-%m-%d %I:%M %p"), :class => 'datetime_range' -%>
28
28
  </div>
29
29
 
30
30
  <div class='field'>
@@ -4,22 +4,22 @@ class ChangeFromToAttributesInEvents < ActiveRecord::Migration
4
4
  add_column :refinery_calendar_events, :starts_at, :datetime
5
5
  add_column :refinery_calendar_events, :ends_at, :datetime
6
6
 
7
- Refinery::Calendar::Event.update_all '"starts_at" = "from", "ends_at" = "to"'
7
+ Refinery::Calendar::Event.update_all '`starts_at` = `from`, `ends_at` = `to`'
8
8
 
9
- remove_column :refinery_calendar_events, :from, :datetime
10
- remove_column :refinery_calendar_events, :to, :datetime
9
+ remove_column :refinery_calendar_events, :from
10
+ remove_column :refinery_calendar_events, :to
11
11
 
12
12
  end
13
13
 
14
14
  def down
15
15
 
16
- add_column :refinery_calendar_events, :starts_at, :datetime
17
- add_column :refinery_calendar_events, :ends_at, :datetime
16
+ add_column :refinery_calendar_events, :from, :date
17
+ add_column :refinery_calendar_events, :to, :date
18
18
 
19
- Refinery::Calendar::Event.update_all '"starts_at" = "from", "ends_at" = "to"'
19
+ Refinery::Calendar::Event.update_all '`from` = `starts_at`, `to` = `ends_at`'
20
20
 
21
- remove_column :refinery_calendar_events, :from, :datetime
22
- remove_column :refinery_calendar_events, :to, :datetime
21
+ remove_column :refinery_calendar_events, :starts_at
22
+ remove_column :refinery_calendar_events, :ends_at
23
23
 
24
24
  end
25
25
  end
data/readme.md CHANGED
@@ -11,7 +11,7 @@ This is a calendar gem for refinery forked from (https://github.com/refinery/ref
11
11
 
12
12
  ```ruby
13
13
  # in Gemfile:
14
- gem 'refinerycms-sl-calendar', '~> 2.0.6.2'
14
+ gem 'refinerycms-sl-calendar', '~> 2.0.6.3'
15
15
  ```
16
16
 
17
17
  ```
@@ -1,7 +1,8 @@
1
1
  jQuery ->
2
2
  datetimes = $(".datetime_range").datetimepicker
3
3
  ampm: true
4
- dateFormat: 'M d, yy'
4
+ dateFormat: 'yy-mm-dd'
5
+ timeFormat: 'hh:mm tt'
5
6
  changeMonth: true
6
7
  changeYear: true
7
8
  numberOfMonths: 2
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms-sl-calendar
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6.2
4
+ version: 2.0.6.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: