diff --git a/Gemfile b/Gemfile index 66fc27a7..79dbf6a0 100644 --- a/Gemfile +++ b/Gemfile @@ -17,7 +17,9 @@ gem 'jquery-rails' # Twitter Bootstrap gem 'therubyracer' gem 'less-rails' -gem 'twitter-bootstrap-rails' +# use dev version to get fontawsome 3.2.1 +#gem 'twitter-bootstrap-rails' +gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git' # you may comment out the database driver you will not be using. # This will prevent a native build of the driver. Building native drivers is not diff --git a/Gemfile.lock b/Gemfile.lock index b70ba246..55d703f6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -5,6 +5,16 @@ GIT actionpack-xml_parser (1.0.0) actionpack (>= 4.0.0.rc1, < 4.1) +GIT + remote: git://github.com/seyhunak/twitter-bootstrap-rails.git + revision: 61c14a7a853abefcaa9e6878ade5a48a6856fb55 + specs: + twitter-bootstrap-rails (2.2.7) + actionpack (>= 3.1) + execjs + rails (>= 3.1) + railties (>= 3.1) + GEM remote: https://rubygems.org/ specs: @@ -105,7 +115,7 @@ GEM metaclass (0.0.1) mime-types (1.23) mini_portile (0.5.0) - minitest (4.7.4) + minitest (4.7.5) mocha (0.14.0) metaclass (~> 0.0.1) mousetrap-rails (0.0.10) @@ -183,11 +193,6 @@ GEM treetop (1.4.14) polyglot polyglot (>= 0.3.1) - twitter-bootstrap-rails (2.2.7) - actionpack (>= 3.1) - execjs - rails (>= 3.1) - railties (>= 3.1) tzinfo (0.3.37) uglifier (2.1.1) execjs (>= 0.3.0) @@ -235,7 +240,7 @@ DEPENDENCIES therubyracer timecop tolk - twitter-bootstrap-rails + twitter-bootstrap-rails! uglifier (>= 1.3.0) will_paginate yard diff --git a/app/assets/stylesheets/tracks.css.scss b/app/assets/stylesheets/tracks.css.scss index d95c7e58..3731643a 100644 --- a/app/assets/stylesheets/tracks.css.scss +++ b/app/assets/stylesheets/tracks.css.scss @@ -2,11 +2,7 @@ * Tracks CSS */ -footer { - text-align: center; - background-color: #000; - background-image: linear-gradient(to bottom, #FFFFFF, #F2F2F2); -} +/* Header */ .navbar-inner { border-radius: none; @@ -29,4 +25,34 @@ span.badge_count { text-shadow: none; padding: 5px 5px 5px 5px; border-radius: 2px 2px 2px 2px; +} + +/* Footer */ + +footer { + margin-top: 50px; + text-align: center; + background-color: #000; + background-image: linear-gradient(to bottom, #FFFFFF, #F2F2F2); +} + +/* Todo tags */ +span.tags { + .label { + a:hover, a:focus { + text-decoration: none; + } + a { + text-shadow: none; + color: #FFF; + font-weight: normal; + } + margin-right: 1px; + } +} + +/* Container */ + +h4 a { + color: #222; } \ No newline at end of file diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index be28052f..30763d77 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -4,7 +4,7 @@ module TodosHelper def empty_message_holder(container_name, show, title_param=nil) content_tag(:div, :id => "no_todos_in_view", :class => "container #{container_name}", :style => "display:" + (show ? "block" : "none") ) do - content_tag(:h2) { t("todos.no_actions.title", :param=>title_param) } + + content_tag(:h4) { t("todos.no_actions.title", :param=>title_param) } + content_tag(:div, :class => "message") do content_tag(:p) { t("todos.no_actions.#{container_name}", :param=>title_param) } end @@ -114,7 +114,7 @@ module TodosHelper :title => t("todos.actions.#{settings[:parent_container_type]}_#{settings[:container_name]}", :param => settings[:title_param]) }) header = settings[:link_in_header].nil? ? "" : content_tag(:div, :class=>"add_note_link"){settings[:link_in_header]} - header += content_tag(:h2) do + header += content_tag(:h4) do toggle = settings[:collapsible] ? container_toggle("toggle_#{settings[:id]}") : "" "#{toggle} #{settings[:title]} #{settings[:append_descriptor]}".html_safe end @@ -249,10 +249,10 @@ module TodosHelper def date_span(todo=@todo) if todo.completed? - content_tag(:span, {:class => :grey}) { format_date( todo.completed_at ) } + content_tag(:span, {class: "label"}) { format_date( todo.completed_at ) } elsif todo.pending? title = t('todos.depends_on')+ ": " + todo.uncompleted_predecessors.map(&:description).join(', ') - content_tag(:a, {:title => title}) { content_tag(:span, {:class => :orange}) { t('todos.pending') } } + content_tag(:a, {:title => title}) { content_tag(:span, {class: "label label-info"}) { t('todos.pending') } } elsif todo.deferred? show_date( todo.show_from ) else @@ -281,7 +281,7 @@ module TodosHelper end def tag_span (tag, mobile=false) - content_tag(:span, :class => "tag #{tag.label}") { link_to(tag.name, tag_path(tag.name, :format => mobile ? :m : nil)) } + content_tag(:span, :class => "label label-info #{tag.label}") { link_to(tag.name, tag_path(tag.name, :format => mobile ? :m : nil)) } end def tag_list(todo=@todo, mobile=false) @@ -351,7 +351,7 @@ module TodosHelper def show_date_tag(date, the_class, text) content_tag(:a, :title => format_date(date)) do - content_tag(:span, :class => the_class) { text } + content_tag(:span, :class => "label label-#{the_class.to_s}") { text } end end @@ -366,21 +366,21 @@ module TodosHelper case days # overdue or due very soon! sound the alarm! when -1000..-1 - show_date_tag(d, :red, t('todos.scheduled_overdue', :days => (days * -1).to_s)) + show_date_tag(d, :important, t('todos.scheduled_overdue', :days => (days * -1).to_s)) when 0 - show_date_tag(d, :amber, t('todos.show_today')) + show_date_tag(d, :warning, t('todos.show_today')) when 1 - show_date_tag(d, :amber, t('todos.show_tomorrow')) + show_date_tag(d, :warning, t('todos.show_tomorrow')) # due 2-7 days away when 2..7 if prefs.due_style == Preference.due_styles[:due_on] - show_date_tag(d, :orange, t('todos.show_on_date', :date => d.strftime("%A")) ) + show_date_tag(d, :important, t('todos.show_on_date', :date => d.strftime("%A")) ) else - show_date_tag(d, :orange, t('todos.show_in_days', :days => days.to_s) ) + show_date_tag(d, :important, t('todos.show_in_days', :days => days.to_s) ) end # more than a week away - relax else - show_date_tag(d, :green, t('todos.show_in_days', :days => days.to_s) ) + show_date_tag(d, :success, t('todos.show_in_days', :days => days.to_s) ) end end diff --git a/app/views/contexts/show.html.erb b/app/views/contexts/show.html.erb index fe44d124..acd791fe 100644 --- a/app/views/contexts/show.html.erb +++ b/app/views/contexts/show.html.erb @@ -4,22 +4,15 @@ done_todo_options = {:append_descriptor => suffix_completed, :suppress_context => true, :parent_container_type => 'context'} show_empty_containers = (@group_view_by == 'context') -%> -