mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-21 21:40:48 +02:00
applied the patches from Jakub to improve the mobile html
Thanks Jakub
This commit is contained in:
parent
cc1c629018
commit
4dcb370389
9 changed files with 87 additions and 48 deletions
|
@ -117,7 +117,7 @@ module TodosHelper
|
||||||
"<span class=\"tag\">" +
|
"<span class=\"tag\">" +
|
||||||
link_to(t.name, {:action => "tag", :controller => "todos", :id => t.name+".m"}) +
|
link_to(t.name, {:action => "tag", :controller => "todos", :id => t.name+".m"}) +
|
||||||
"</span>"}.join('')
|
"</span>"}.join('')
|
||||||
if not tag_list.empty? then "<span class=\"tags\">#{tag_list}</span>" end
|
if tag_list.empty? then "" else "<span class=\"tags\">#{tag_list}</span>" end
|
||||||
end
|
end
|
||||||
|
|
||||||
def deferred_due_date
|
def deferred_due_date
|
||||||
|
|
|
@ -6,9 +6,9 @@ if not @not_done.empty?
|
||||||
# only show a context when there are actions in it
|
# only show a context when there are actions in it
|
||||||
-%>
|
-%>
|
||||||
<h2><%=mobile_context.name%></h2>
|
<h2><%=mobile_context.name%></h2>
|
||||||
<table cellpadding="0" cellspacing="0" border="0" class="c">
|
<ul class="c">
|
||||||
<%= render :partial => "todos/mobile_todo",
|
<%= render :partial => "todos/mobile_todo",
|
||||||
:collection => @not_done,
|
:collection => @not_done,
|
||||||
:locals => { :parent_container_type => "context" }-%>
|
:locals => { :parent_container_type => "context" }-%>
|
||||||
</table>
|
</ul>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
|
@ -2,35 +2,40 @@
|
||||||
new_todo_params = {}
|
new_todo_params = {}
|
||||||
new_todo_params[:from_project] = @mobile_from_project if @mobile_from_project
|
new_todo_params[:from_project] = @mobile_from_project if @mobile_from_project
|
||||||
new_todo_params[:from_context] = @mobile_from_context if @mobile_from_context
|
new_todo_params[:from_context] = @mobile_from_context if @mobile_from_context
|
||||||
-%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
-%><?xml version="1.0"?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<meta name="viewport" content="initial-scale = 1.0" />
|
<meta name="viewport" content="initial-scale = 1.0" />
|
||||||
<%= stylesheet_link_tag "mobile"%>
|
<%= stylesheet_link_tag "mobile", :media => 'handheld,all' %>
|
||||||
<title><%= @page_title %></title>
|
<title><%= @page_title %></title>
|
||||||
</head><body>
|
</head><body>
|
||||||
<% if !(@new_mobile || @edit_mobile)
|
<% if !(@new_mobile || @edit_mobile)
|
||||||
if !@prefs.nil? -%>
|
if !@prefs.nil? -%>
|
||||||
<h1><span class="count"><%= @down_count %></span> <%=
|
<h1><span class="count"><%= @down_count %></span> <%=
|
||||||
user_time.strftime(@prefs.title_date_format) -%></h1>
|
user_time.strftime(@prefs.title_date_format) -%></h1>
|
||||||
<%= (link_to("0-Add new action", formatted_new_todo_path(:m, new_todo_params))+" | ") unless @new_mobile -%>
|
<div class="nav">
|
||||||
|
<%= (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("1-Home", formatted_todos_path(:m))+" | ") unless @home -%>
|
||||||
<%= (link_to("2-Contexts", formatted_contexts_path(:m))+" | ") -%>
|
<%= (link_to("2-Contexts", formatted_contexts_path(:m))+" | ") -%>
|
||||||
<%= (link_to("3-Projects", formatted_projects_path(:m))+" | ") -%>
|
<%= (link_to("3-Projects", formatted_projects_path(:m))+" | ") -%>
|
||||||
<%= (link_to("4-Starred", {:action => "tag", :controller => "todos", :id => "starred.m"})) -%>
|
<%= (link_to("4-Starred", {:action => "tag", :controller => "todos", :id => "starred.m"})) -%>
|
||||||
<% end
|
<% end
|
||||||
end -%><%= render_flash -%>
|
end -%><%= render_flash -%>
|
||||||
<hr/><%= yield -%>
|
</div>
|
||||||
|
<%= yield -%>
|
||||||
<hr/><% if !@prefs.nil? -%>
|
<hr/><% if !@prefs.nil? -%>
|
||||||
|
<div class="nav">
|
||||||
<%= (link_to("Logout", formatted_logout_path(:format => 'm')) +" | ") -%>
|
<%= (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("1-Home", formatted_todos_path(:m), {:accesskey => "1"})+" | ") unless @home -%>
|
||||||
<%= (link_to("2-Contexts", formatted_contexts_path(:m), {:accesskey => "2"})+" | ") -%>
|
<%= (link_to("2-Contexts", formatted_contexts_path(:m), {:accesskey => "2"})+" | ") -%>
|
||||||
<%= (link_to("3-Projects", formatted_projects_path(:m), {:accesskey => "3"})+" | ") -%>
|
<%= (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("4-Starred", {:action => "tag", :controller => "todos", :id => "starred.m"}, {:accesskey => "4"})+" | ") -%>
|
||||||
<%= (link_to("Tickler", {:action => "index", :controller => "tickler.m"})+" | ") -%>
|
<%= (link_to("Tickler", {:action => "index", :controller => "tickler.m"})+" | ") -%>
|
||||||
<%= (link_to("Feeds", {:action => "index", :controller => "feeds.m"})) -%>
|
<%= (link_to("Feeds", {:action => "index", :controller => "feeds.m"})) -%>
|
||||||
|
</div>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<%= render :partial => "shared/mobile_footer" -%>
|
<%= render :partial => "shared/mobile_footer" -%>
|
||||||
</body></html>
|
</body></html>
|
|
@ -14,19 +14,19 @@
|
||||||
<% form_tag :action=> 'login' do %>
|
<% form_tag :action=> 'login' do %>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="100px"><label for="user_login">Login:</label></td>
|
<td><label for="user_login">Login:</label></td>
|
||||||
<td width="100px"><input type="text" name="user_login" id="user_login" value="" class="login_text" /></td>
|
<td><input type="text" name="user_login" id="user_login" value="" class="login_text" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="100px"><label for="user_password">Password:</label></td>
|
<td><label for="user_password">Password:</label></td>
|
||||||
<td width="100px"><input type="password" name="user_password" id="user_password" class="login_text" /></td>
|
<td><input type="password" name="user_password" id="user_password" class="login_text" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="100px"><label for="user_noexpiry">Stay logged in:</label></td>
|
<td><label for="user_noexpiry">Stay logged in:</label></td>
|
||||||
<td width="100px"><input type="checkbox" name="user_noexpiry" id="user_noexpiry" checked /></td>
|
<td><input type="checkbox" name="user_noexpiry" id="user_noexpiry" checked /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="100px"></td>
|
<td></td>
|
||||||
<td><input type="submit" name="login" value="Sign In »" class="primary" /></td>
|
<td><input type="submit" name="login" value="Sign In »" class="primary" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -39,15 +39,15 @@
|
||||||
<% form_tag :action=> 'login', :action => 'begin' do %>
|
<% form_tag :action=> 'login', :action => 'begin' do %>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="100px"><label for="openid_url">Identity URL:</label></td>
|
<td><label for="openid_url">Identity URL:</label></td>
|
||||||
<td width="100px"><input type="text" name="openid_url" id="openid_url" value="<%= @openid_url %>" class="login_text open_id" /></td>
|
<td><input type="text" name="openid_url" id="openid_url" value="<%= @openid_url %>" class="login_text open_id" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="100px"><label for="user_noexpiry">Stay logged in:</label></td>
|
<td><label for="user_noexpiry">Stay logged in:</label></td>
|
||||||
<td width="100px"><input type="checkbox" name="user_noexpiry" id="user_noexpiry" checked /></td>
|
<td><input type="checkbox" name="user_noexpiry" id="user_noexpiry" checked /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="100px"></td>
|
<td></td>
|
||||||
<td><input type="submit" name="login" value="Sign In »" class="primary" /></td>
|
<td><input type="submit" name="login" value="Sign In »" class="primary" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -14,19 +14,19 @@
|
||||||
<% form_tag formatted_login_path(:format => 'm') do %>
|
<% form_tag formatted_login_path(:format => 'm') do %>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="100px"><label for="user_login">Login:</label></td>
|
<td><label for="user_login">Login:</label></td>
|
||||||
<td width="100px"><input type="text" name="user_login" id="user_login" value="" class="login_text" /></td>
|
<td><input type="text" name="user_login" id="user_login" value="" class="login_text" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="100px"><label for="user_password">Password:</label></td>
|
<td><label for="user_password">Password:</label></td>
|
||||||
<td width="100px"><input type="password" name="user_password" id="user_password" class="login_text" /></td>
|
<td><input type="password" name="user_password" id="user_password" class="login_text" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="100px"><label for="user_noexpiry">Stay logged in:</label></td>
|
<td><label for="user_noexpiry">Stay logged in:</label></td>
|
||||||
<td width="100px"><input type="checkbox" name="user_noexpiry" id="user_noexpiry" checked /></td>
|
<td><input type="checkbox" name="user_noexpiry" id="user_noexpiry" checked="checked" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="100px"></td>
|
<td> </td>
|
||||||
<td><input type="submit" name="login" value="Sign In »" class="primary" /></td>
|
<td><input type="submit" name="login" value="Sign In »" class="primary" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -10,7 +10,7 @@ if parent_container_type == 'show_mobile' -%>
|
||||||
<h2><label for="todo_description">Description</label></h2>
|
<h2><label for="todo_description">Description</label></h2>
|
||||||
<%= text_field( "todo", "description", "tabindex" => 2) %>
|
<%= text_field( "todo", "description", "tabindex" => 2) %>
|
||||||
<h2><label for="todo_notes">Notes</label></h2>
|
<h2><label for="todo_notes">Notes</label></h2>
|
||||||
<%= text_area( "todo", "notes", "cols" => 30, "rows" => 5, "tabindex" => 3) %>
|
<%= text_area( "todo", "notes", "cols" => 30, "rows" => 2, "tabindex" => 3) %>
|
||||||
<h2><label for="todo_context_id">Context</label></h2>
|
<h2><label for="todo_context_id">Context</label></h2>
|
||||||
<%= unless @mobile_from_context
|
<%= unless @mobile_from_context
|
||||||
collection_select( "todo", "context_id", @contexts, "id", "name", {}, {"tabindex" => 4} )
|
collection_select( "todo", "context_id", @contexts, "id", "name", {}, {"tabindex" => 4} )
|
||||||
|
@ -22,7 +22,7 @@ end %>
|
||||||
<h2><label for="todo_project_id">Project</label></h2>
|
<h2><label for="todo_project_id">Project</label></h2>
|
||||||
<%= unless @mobile_from_project
|
<%= unless @mobile_from_project
|
||||||
collection_select( "todo", "project_id", @projects, "id", "name",
|
collection_select( "todo", "project_id", @projects, "id", "name",
|
||||||
{:include_blank => true}, {"tabindex" => 5} )
|
{:include_blank => '--No project--'}, {"tabindex" => 5} )
|
||||||
else
|
else
|
||||||
# manually add blank option since :include_blank does not work
|
# manually add blank option since :include_blank does not work
|
||||||
# with options_from_collection_for_select
|
# with options_from_collection_for_select
|
||||||
|
@ -34,7 +34,7 @@ end %>
|
||||||
<%= text_field_tag "tag_list", @tag_list_text, :size => 30, :tabindex => 6 %>
|
<%= text_field_tag "tag_list", @tag_list_text, :size => 30, :tabindex => 6 %>
|
||||||
<h2><label for="todo_due">Due</label></h2>
|
<h2><label for="todo_due">Due</label></h2>
|
||||||
<%= date_select("todo", "due", {:order => [:day, :month, :year],
|
<%= 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) %>
|
||||||
<h2><label for="todo_show_from">Show from</label></h2>
|
<h2><label for="todo_show_from">Show from</label></h2>
|
||||||
<%= date_select("todo", "show_from", {:order => [:day, :month, :year],
|
<%= date_select("todo", "show_from", {:order => [:day, :month, :year],
|
||||||
:start_year => this_year, :include_blank => true}, :tabindex => 8) %>
|
:start_year => this_year, :include_blank => true}, :tabindex => 8) %>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<% @todo = mobile_todo
|
<% @todo = mobile_todo
|
||||||
if mobile_todo.starred?
|
if mobile_todo.starred?
|
||||||
bullet = "<span class=star>"+image_tag("menustar_small.gif")+"</span>"
|
li_class = " class=\"star\""
|
||||||
else
|
else
|
||||||
bullet = "<span class=r>» </span>"
|
li_class = ""
|
||||||
end -%>
|
end -%>
|
||||||
<tr class="t" id="<%= dom_id(mobile_todo) %>" valign="top"><td><%= bullet %></td><td><%
|
<li id="<%= dom_id(mobile_todo) %>" <%= li_class %>><%
|
||||||
if mobile_todo.completed?
|
if mobile_todo.completed?
|
||||||
-%><span class="m_t_d">
|
-%><span class="m_t_d">
|
||||||
<% else
|
<% else
|
||||||
|
@ -22,4 +22,4 @@ end -%>
|
||||||
")</span>" -%>
|
")</span>" -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<%= tag_list_mobile -%>
|
<%= tag_list_mobile -%>
|
||||||
</span></td></tr>
|
</span></li>
|
||||||
|
|
|
@ -39,4 +39,4 @@ RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
|
||||||
# Example:
|
# Example:
|
||||||
# ErrorDocument 500 /500.html
|
# ErrorDocument 500 /500.html
|
||||||
|
|
||||||
ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
|
ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
|
||||||
|
|
|
@ -29,15 +29,18 @@ div.footer a {
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
color: #f00;
|
color: #f00;
|
||||||
font-size: small;
|
font-size: small;
|
||||||
|
margin-top:.3em;
|
||||||
|
margin-bottom:.3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
background-color: #cccccc;
|
background-color: #aaaaaa;
|
||||||
font-size : small;
|
font-size : small;
|
||||||
margin-top: 10px;
|
margin: .3em 0;
|
||||||
margin-bottom: 0;
|
padding: .3em 0 .1em .3em;
|
||||||
|
border-top: 1px solid #777777;
|
||||||
}
|
}
|
||||||
|
|
||||||
h4.alert {
|
h4.alert {
|
||||||
|
@ -61,7 +64,7 @@ h4.notice {
|
||||||
}
|
}
|
||||||
|
|
||||||
span.tag {
|
span.tag {
|
||||||
font-size: XX-small;
|
font-size: x-small;
|
||||||
background-color: #CCE7FF;
|
background-color: #CCE7FF;
|
||||||
color: #000;
|
color: #000;
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
|
@ -82,47 +85,78 @@ span.prj, span.ctx{
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #f00;
|
background: #f00;
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
font-size: 10px;
|
font-size: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.amber {
|
.amber {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #ff6600;
|
background: #ff6600;
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
font-size: 10px;
|
font-size: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.orange {
|
.orange {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #FFA500;
|
background: #FFA500;
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
font-size: 10px;
|
font-size: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.green {
|
.green {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #33cc00;
|
background: #33cc00;
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
font-size: 10px;
|
font-size: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grey {
|
.grey {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #999;
|
background: #999;
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
font-size: 10px;
|
font-size: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.count {
|
.count {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #000;
|
background: #000;
|
||||||
font-size: medium;
|
font-size: medium;
|
||||||
}
|
}
|
||||||
|
|
||||||
.errors {
|
.errors {
|
||||||
background: #FFC2C2;
|
background: #FFC2C2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul.c li.star {
|
||||||
|
list-style-image:url(../images/menustar_small.gif)
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
table.c {
|
table.c {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue