Fix bug.
This commit is contained in:
parent
121fdbb51b
commit
ba79afadd0
|
@ -170,7 +170,8 @@ class Event
|
||||||
:recurring => self.recurring,
|
:recurring => self.recurring,
|
||||||
:calendar => self.calendar_type_id.to_s,
|
:calendar => self.calendar_type_id.to_s,
|
||||||
:color => (self.calendar_type.color rescue nil),
|
:color => (self.calendar_type.color rescue nil),
|
||||||
:diff_day => self.all_day
|
:diff_day => self.all_day,
|
||||||
|
:url_linked => self.url
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
@ -195,6 +196,7 @@ class Event
|
||||||
:diff_day => self.all_day,
|
:diff_day => self.all_day,
|
||||||
:edit_url => Rails.application.routes.url_helpers.edit_admin_calendar_path(:locale=>I18n.locale, :id=>self.id),
|
:edit_url => Rails.application.routes.url_helpers.edit_admin_calendar_path(:locale=>I18n.locale, :id=>self.id),
|
||||||
:delete_url => Rails.application.routes.url_helpers.admin_calendar_path(:locale=>I18n.locale, :id=>self.id),
|
:delete_url => Rails.application.routes.url_helpers.admin_calendar_path(:locale=>I18n.locale, :id=>self.id),
|
||||||
|
:url_linked => self.url,
|
||||||
:hide => need_hide,
|
:hide => need_hide,
|
||||||
:org_color => org_color,
|
:org_color => org_color,
|
||||||
:hide_color => "#c0c0c0"
|
:hide_color => "#c0c0c0"
|
||||||
|
@ -277,7 +279,7 @@ class Event
|
||||||
add_interval -= @start_date.wday.day
|
add_interval -= @start_date.wday.day
|
||||||
need_check_start = true
|
need_check_start = true
|
||||||
end
|
end
|
||||||
start_date = [start_date, @start_date].max
|
tmp_start_date = [start_date, @start_date].max
|
||||||
@start_date += add_interval
|
@start_date += add_interval
|
||||||
@end_date += add_interval
|
@end_date += add_interval
|
||||||
new_end_date = has_recurring_end_date ? [re.recurring_end_date,end_date].min : end_date
|
new_end_date = has_recurring_end_date ? [re.recurring_end_date,end_date].min : end_date
|
||||||
|
@ -310,7 +312,7 @@ class Event
|
||||||
end
|
end
|
||||||
weekdays.each do |w|
|
weekdays.each do |w|
|
||||||
new_start = (@start_date + w.day)
|
new_start = (@start_date + w.day)
|
||||||
if need_check_start && new_start < start_date
|
if need_check_start && new_start < tmp_start_date
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
if new_start != org_start
|
if new_start != org_start
|
||||||
|
|
Loading…
Reference in New Issue