fix layout and modal issues

These were "regressions" after the bootstrap 3 migration
This commit is contained in:
Reinier Balt 2014-06-26 13:59:06 +02:00
parent 29acdc5a9d
commit 2f13da8bff
9 changed files with 89 additions and 65 deletions

View file

@ -36,8 +36,8 @@ module ApplicationHelper
days_limited = 2 if days > 2
colors = [:warning, :warning, :warning, :info, :info, :info]
color = :important if days < 0
color = :default if days > 7
color = :danger if days < 0
color = :default if days > 7
color = colors[days] if color.nil?
if prefs.due_style == Preference.due_styles[:due_on]
@ -54,8 +54,8 @@ module ApplicationHelper
"1" => t('todos.next_actions_due_date.due_tomorrow')
})
return content_tag(:a, {:title => format_date(due)}) {
content_tag(:span, {:class => "badge badge-#{color}"}) { due_text[days_limited.to_s] }
return content_tag(:span, {:class => "label label-#{color}"}) {
content_tag(:a, {:title => format_date(due)}) { due_text[days_limited.to_s] }
}
end

View file

@ -239,7 +239,7 @@ module TodosHelper
def date_span(todo=@todo)
if todo.completed?
content_tag(:span, {class: "label"}) { format_date( todo.completed_at ) }
content_tag(:span, {class: "label label-default"}) { format_date( todo.completed_at ) }
elsif todo.pending?
title = t('todos.depends_on')+ ": " + todo.uncompleted_predecessors.to_a.map(&:description).join(', ')
content_tag(:a, {:title => title}) { content_tag(:span, {:class => :orange}) { t('todos.pending') } }
@ -340,8 +340,8 @@ module TodosHelper
end
def show_date_tag(date, the_class, text)
content_tag(:a, :title => format_date(date)) do
content_tag(:span, :class => "label label-#{the_class.to_s}") { text }
content_tag(:span, :class => "label label-#{the_class.to_s}") do
content_tag(:a, :title => format_date(date)) { text }
end
end
@ -356,7 +356,7 @@ module TodosHelper
case days
# overdue or due very soon! sound the alarm!
when -1000..-1
show_date_tag(d, :important, t('todos.scheduled_overdue', :days => (days * -1).to_s))
show_date_tag(d, :danger, t('todos.scheduled_overdue', :days => (days * -1).to_s))
when 0
show_date_tag(d, :warning, t('todos.show_today'))
when 1
@ -364,9 +364,9 @@ module TodosHelper
# due 2-7 days away
when 2..7
if prefs.due_style == Preference.due_styles[:due_on]
show_date_tag(d, :important, t('todos.show_on_date', :date => d.strftime("%A")) )
show_date_tag(d, :danger, t('todos.show_on_date', :date => d.strftime("%A")) )
else
show_date_tag(d, :important, t('todos.show_in_days', :days => days.to_s) )
show_date_tag(d, :danger, t('todos.show_in_days', :days => days.to_s) )
end
# more than a week away - relax
else