diff --git a/app/controllers/application.rb b/app/controllers/application.rb
index 84649bd9..b24dfd54 100644
--- a/app/controllers/application.rb
+++ b/app/controllers/application.rb
@@ -115,7 +115,7 @@ class ApplicationController < ActionController::Base
def format_date(date)
if date
date_format = prefs.date_format
- formatted_date = date.to_datetime.in_time_zone(prefs.time_zone).strftime("#{date_format}")
+ formatted_date = date.in_time_zone(prefs.time_zone).strftime("#{date_format}")
else
formatted_date = ''
end
diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb
index aee59c90..79e058e9 100644
--- a/app/helpers/todos_helper.rb
+++ b/app/helpers/todos_helper.rb
@@ -117,7 +117,7 @@ module TodosHelper
"" +
link_to(t.name, {:action => "tag", :controller => "todos", :id => t.name+".m"}) +
" "}.join('')
- "#{tag_list} "
+ if tag_list.empty? then "" else "#{tag_list} " end
end
def deferred_due_date
diff --git a/app/views/contexts/_mobile_context.rhtml b/app/views/contexts/_mobile_context.rhtml
index 6510aeb4..3122bc32 100644
--- a/app/views/contexts/_mobile_context.rhtml
+++ b/app/views/contexts/_mobile_context.rhtml
@@ -6,9 +6,9 @@ if not @not_done.empty?
# only show a context when there are actions in it
-%>
<%=mobile_context.name%>
-
+
<%= render :partial => "todos/mobile_todo",
:collection => @not_done,
:locals => { :parent_container_type => "context" }-%>
-
+
<% end -%>
\ No newline at end of file
diff --git a/app/views/layouts/mobile.m.erb b/app/views/layouts/mobile.m.erb
index c53ea4c3..3ee740a5 100644
--- a/app/views/layouts/mobile.m.erb
+++ b/app/views/layouts/mobile.m.erb
@@ -2,35 +2,40 @@
new_todo_params = {}
new_todo_params[:from_project] = @mobile_from_project if @mobile_from_project
new_todo_params[:from_context] = @mobile_from_context if @mobile_from_context
--%>
+-%>
+
-<%= stylesheet_link_tag "mobile"%>
+<%= stylesheet_link_tag "mobile", :media => 'handheld,all' %>
<%= @page_title %>
<% if !(@new_mobile || @edit_mobile)
if !@prefs.nil? -%>
<%= @down_count %> <%=
user_time.strftime(@prefs.title_date_format) -%>
-<%= (link_to("0-Add new action", formatted_new_todo_path(:m, new_todo_params))+" | ") unless @new_mobile -%>
+
+<%= (link_to("0-New action", formatted_new_todo_path(:m, new_todo_params))+" | ") unless @new_mobile -%>
<%= (link_to("1-Home", formatted_todos_path(:m))+" | ") unless @home -%>
<%= (link_to("2-Contexts", formatted_contexts_path(:m))+" | ") -%>
<%= (link_to("3-Projects", formatted_projects_path(:m))+" | ") -%>
<%= (link_to("4-Starred", {:action => "tag", :controller => "todos", :id => "starred.m"})) -%>
<% end
end -%><%= render_flash -%>
-
<%= yield -%>
+
+<%= yield -%>
<% if !@prefs.nil? -%>
+
<%= (link_to("Logout", formatted_logout_path(:format => 'm')) +" | ") -%>
-<%= (link_to("0-Add new action", formatted_new_todo_path(:m), {:accesskey => "0"})+" | ") unless @new_mobile -%>
+<%= (link_to("0-New action", formatted_new_todo_path(:m), {:accesskey => "0"})+" | ") unless @new_mobile -%>
<%= (link_to("1-Home", formatted_todos_path(:m), {:accesskey => "1"})+" | ") unless @home -%>
<%= (link_to("2-Contexts", formatted_contexts_path(:m), {:accesskey => "2"})+" | ") -%>
<%= (link_to("3-Projects", formatted_projects_path(:m), {:accesskey => "3"})+" | ") -%>
<%= (link_to("4-Starred", {:action => "tag", :controller => "todos", :id => "starred.m"}, {:accesskey => "4"})+" | ") -%>
<%= (link_to("Tickler", {:action => "index", :controller => "tickler.m"})+" | ") -%>
<%= (link_to("Feeds", {:action => "index", :controller => "feeds.m"})) -%>
+
<% end -%>
<%= render :partial => "shared/mobile_footer" -%>
\ No newline at end of file
diff --git a/app/views/login/login_mobile.html.erb b/app/views/login/login_mobile.html.erb
index d88b3316..f3ff6511 100644
--- a/app/views/login/login_mobile.html.erb
+++ b/app/views/login/login_mobile.html.erb
@@ -14,19 +14,19 @@
<% form_tag formatted_login_path(:format => 'm') do %>
diff --git a/app/views/todos/_edit_mobile.rhtml b/app/views/todos/_edit_mobile.rhtml
index 0837f026..4bf4d9ea 100644
--- a/app/views/todos/_edit_mobile.rhtml
+++ b/app/views/todos/_edit_mobile.rhtml
@@ -3,14 +3,16 @@
<%= error_messages_for("todo") %>
-<% this_year = user_time.to_date.strftime("%Y").to_i
-if parent_container_type == 'show_mobile' -%>
+<%
+ this_year = user_time.to_date.strftime("%Y").to_i
+ if parent_container_type == 'show_mobile'
+-%>
Done? <%= check_box_tag("done", 1, @todo && @todo.completed?, "tabindex" => 1) %>
<% end -%>
Description
<%= text_field( "todo", "description", "tabindex" => 2) %>
Notes
-<%= text_area( "todo", "notes", "cols" => 30, "rows" => 5, "tabindex" => 3) %>
+<%= text_area( "todo", "notes", "cols" => 30, "rows" => 2, "tabindex" => 3) %>
Context
<%= unless @mobile_from_context
collection_select( "todo", "context_id", @contexts, "id", "name", {}, {"tabindex" => 4} )
@@ -22,7 +24,7 @@ end %>
Project
<%= unless @mobile_from_project
collection_select( "todo", "project_id", @projects, "id", "name",
- {:include_blank => true}, {"tabindex" => 5} )
+ {:include_blank => '--No project--'}, {"tabindex" => 5} )
else
# manually add blank option since :include_blank does not work
# with options_from_collection_for_select
@@ -34,7 +36,7 @@ end %>
<%= text_field_tag "tag_list", @tag_list_text, :size => 30, :tabindex => 6 %>
Due
<%= date_select("todo", "due", {:order => [:day, :month, :year],
- :start_year => this_year, :include_blank => true}, :tabindex => 7) %>
+ :start_year => this_year, :include_blank => '--'}, :tabindex => 7) %>
Show from
<%= date_select("todo", "show_from", {:order => [:day, :month, :year],
:start_year => this_year, :include_blank => true}, :tabindex => 8) %>
diff --git a/app/views/todos/_mobile_todo.rhtml b/app/views/todos/_mobile_todo.rhtml
index fafdd164..bac40118 100644
--- a/app/views/todos/_mobile_todo.rhtml
+++ b/app/views/todos/_mobile_todo.rhtml
@@ -1,11 +1,12 @@
<% @todo = mobile_todo
if mobile_todo.starred?
- bullet = ""+image_tag("menustar_small.gif")+" "
+ bullet = ""+image_tag("menustar_small.gif")+" "
+ li_class = " class=\"star\""
else
- bullet = "» "
+ bullet = "» "
+ li_class = ""
end -%>
-
-
<%= bullet %> <%
+><%= bullet %><%
if mobile_todo.completed?
-%>
<% else
@@ -23,4 +24,4 @@ end -%>
") " -%>
<% end -%>
<%= tag_list_mobile -%>
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/public/.htaccess b/public/.htaccess
index 3b66fccd..51a97fd7 100644
--- a/public/.htaccess
+++ b/public/.htaccess
@@ -39,4 +39,4 @@ RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
# Example:
# ErrorDocument 500 /500.html
-ErrorDocument 500 "Application error Rails application failed to start properly"
\ No newline at end of file
+ErrorDocument 500 "Application error Rails application failed to start properly"
diff --git a/public/stylesheets/mobile.css b/public/stylesheets/mobile.css
index dc7a74f0..00ed8d09 100644
--- a/public/stylesheets/mobile.css
+++ b/public/stylesheets/mobile.css
@@ -29,15 +29,18 @@ div.footer a {
}
h1 {
- color: #f00;
- font-size: small;
+ color: #f00;
+ font-size: small;
+ margin-top:.3em;
+ margin-bottom:.3em;
}
h2 {
- background-color: #cccccc;
- font-size : small;
- margin-top: 10px;
- margin-bottom: 0;
+ background-color: #aaaaaa;
+ font-size : small;
+ margin: .3em 0;
+ padding: .3em 0 .1em .3em;
+ border-top: 1px solid #777777;
}
h4.alert {
@@ -60,12 +63,8 @@ h4.notice {
color: #007E00;
}
-div.t {
- padding-left:5px;
-}
-
span.tag {
- font-size: XX-small;
+ font-size: x-small;
background-color: #CCE7FF;
color: #000;
padding: 1px;
@@ -86,43 +85,74 @@ span.prj, span.ctx{
color: #fff;
background: #f00;
padding: 1px;
- font-size: 10px;
+ font-size: 1em;
}
.amber {
color: #fff;
background: #ff6600;
padding: 1px;
- font-size: 10px;
+ font-size: 1em;
}
.orange {
color: #fff;
background: #FFA500;
padding: 1px;
- font-size: 10px;
+ font-size: 1em;
}
.green {
color: #fff;
background: #33cc00;
padding: 1px;
- font-size: 10px;
+ font-size: 1em;
}
.grey {
color: #fff;
background: #999;
padding: 1px;
- font-size: 10px;
+ font-size: 1em;
}
.count {
color: #fff;
background: #000;
- font-size: medium;
+ font-size: medium;
}
.errors {
background: #FFC2C2;
+}
+
+ul.c li.star {
+ list-style-type: circle;
+}
+
+ul.c {
+ padding: 0;
+ margin: 0;
+ padding-left: 1.1em;
+}
+
+ul.c li {
+ padding: 0;
+ margin: 0;
+}
+
+ul.c li span.r {
+ display: none;
+}
+
+span.r {
+ display:none;
+}
+
+.nav {
+ font-size: x-small;
+}
+
+#database_auth_form table td {
+ width:7em;
}
\ No newline at end of file