rename repeating -> recurring, repeat -> recurrence

This commit is contained in:
Carsten Otto 2015-02-10 16:25:27 +01:00
parent ab02d09830
commit dfe8735c0d
35 changed files with 125 additions and 125 deletions

View file

@ -815,7 +815,7 @@ var RecurringTodosPage = {
$( "#new-recurring-todo" ).dialog( "open" );
});
/* setup dialog for new repeating action */
/* setup dialog for new recurring action */
$( "#new-recurring-todo" ).dialog({
autoOpen: false,
height: 690,
@ -847,7 +847,7 @@ var RecurringTodosPage = {
$('#recurring_'+this.id.split('_')[4]).show();
});
/* setup dialog for new repeating action */
/* setup dialog for new recurring action */
$( "#edit-recurring-todo" ).dialog({
autoOpen: false,
height: 690,

View file

@ -129,7 +129,7 @@ class ContextsController < ApplicationController
# actions, you'll get a warning dialogue. If you choose to go ahead, any
# actions in the context will also be deleted.
def destroy
# make sure the deleted recurring patterns are removed from associated todos
# make sure the deleted recurrence patterns are removed from associated todos
@context.recurring_todos.each { |rt| rt.clear_todos_association } unless @context.recurring_todos.nil?
@context.destroy

View file

@ -23,19 +23,19 @@ module RecurringTodos
end
def daily_pattern
@daily_pattern ||= create_pattern(DailyRepeatPattern)
@daily_pattern ||= create_pattern(DailyRecurrencePattern)
end
def weekly_pattern
@weekly_pattern ||= create_pattern(WeeklyRepeatPattern)
@weekly_pattern ||= create_pattern(WeeklyRecurrencePattern)
end
def monthly_pattern
@monthly_pattern ||= create_pattern(MonthlyRepeatPattern)
@monthly_pattern ||= create_pattern(MonthlyRecurrencePattern)
end
def yearly_pattern
@yearly_pattern ||= create_pattern(YearlyRepeatPattern)
@yearly_pattern ||= create_pattern(YearlyRecurrencePattern)
end
def method_missing(method, *args)

View file

@ -72,7 +72,7 @@ class RecurringTodo < ActiveRecord::Base
def pattern
if valid_period?
@pattern = eval("RecurringTodos::#{recurring_period.capitalize}RepeatPattern.new(user)")
@pattern = eval("RecurringTodos::#{recurring_period.capitalize}RecurrencePattern.new(user)")
@pattern.build_from_recurring_todo(self)
end
@pattern

View file

@ -1,6 +1,6 @@
module RecurringTodos
class AbstractRepeatPattern
class AbstractRecurrencePattern
attr_accessor :attributes
@ -41,7 +41,7 @@ module RecurringTodos
end
def recurrence_pattern
raise "Should not call AbstractRepeatPattern.recurrence_pattern directly. Overwrite in subclass"
raise "Should not call AbstractRecurrencePattern.recurrence_pattern directly. Overwrite in subclass"
end
def xth(x)
@ -151,7 +151,7 @@ module RecurringTodos
end
def get_next_date(previous)
raise "Should not call AbstractRepeatPattern.get_next_date directly. Overwrite in subclass"
raise "Should not call AbstractRecurrencePattern.get_next_date directly. Overwrite in subclass"
end
def continues_recurring?(previous)

View file

@ -1,6 +1,6 @@
module RecurringTodos
class DailyRepeatPattern < AbstractRepeatPattern
class DailyRecurrencePattern < AbstractRecurrencePattern
def initialize(user)
super user

View file

@ -4,7 +4,7 @@ module RecurringTodos
attr_reader :recurring_todo, :pattern
def initialize(user, attributes)
super(user, attributes, DailyRepeatPattern)
super(user, attributes, DailyRecurrencePattern)
end
def attributes_to_filter

View file

@ -1,6 +1,6 @@
module RecurringTodos
class MonthlyRepeatPattern < AbstractRepeatPattern
class MonthlyRecurrencePattern < AbstractRecurrencePattern
def initialize(user)
super user

View file

@ -4,7 +4,7 @@ module RecurringTodos
attr_reader :recurring_todo
def initialize(user, attributes)
super(user, attributes, MonthlyRepeatPattern)
super(user, attributes, MonthlyRecurrencePattern)
end
def attributes_to_filter

View file

@ -1,6 +1,6 @@
module RecurringTodos
class WeeklyRepeatPattern < AbstractRepeatPattern
class WeeklyRecurrencePattern < AbstractRecurrencePattern
def initialize(user)
super user

View file

@ -4,7 +4,7 @@ module RecurringTodos
attr_reader :recurring_todo
def initialize(user, attributes)
super(user, attributes, WeeklyRepeatPattern)
super(user, attributes, WeeklyRecurrencePattern)
end
def attributes_to_filter

View file

@ -1,6 +1,6 @@
module RecurringTodos
class YearlyRepeatPattern < AbstractRepeatPattern
class YearlyRecurrencePattern < AbstractRecurrencePattern
def initialize(user)
super user

View file

@ -4,7 +4,7 @@ module RecurringTodos
attr_reader :recurring_todo
def initialize(user, attributes)
super(user, attributes, YearlyRepeatPattern)
super(user, attributes, YearlyRecurrencePattern)
end
def attributes_to_filter