Optimalized mobile pages - span for empty tags is not included, divs around tr were against html specification and caused some mobiles render the page incorrectly.

This commit is contained in:
Jakub A.Tesinsky 2008-12-02 02:22:36 +01:00
parent 229a114441
commit a0d2362953
4 changed files with 10 additions and 11 deletions

View file

@ -117,7 +117,7 @@ module TodosHelper
"<span class=\"tag\">" +
link_to(t.name, {:action => "tag", :controller => "todos", :id => t.name+".m"}) +
"</span>"}.join('')
"<span class=\"tags\">#{tag_list}</span>"
if not tag_list.empty? then "<span class=\"tags\">#{tag_list}</span>" end
end
def deferred_due_date

View file

@ -6,9 +6,9 @@ if not @not_done.empty?
# only show a context when there are actions in it
-%>
<h2><%=mobile_context.name%></h2>
<table cellpadding="0" cellspacing="0" border="0">
<table cellpadding="0" cellspacing="0" border="0" class="c">
<%= render :partial => "todos/mobile_todo",
:collection => @not_done,
:locals => { :parent_container_type => "context" }-%>
</table>
<% end -%>
<% end -%>

View file

@ -4,8 +4,7 @@ if mobile_todo.starred?
else
bullet = "<span class=r>&raquo;&nbsp;</span>"
end -%>
<div class="t" id="<%= dom_id(mobile_todo) %>">
<tr valign="top"><td><%= bullet %></td><td><%
<tr class="t" id="<%= dom_id(mobile_todo) %>" valign="top"><td><%= bullet %></td><td><%
if mobile_todo.completed?
-%><span class="m_t_d">
<% else
@ -23,4 +22,4 @@ end -%>
")</span>" -%>
<% end -%>
<%= tag_list_mobile -%>
</span></td></tr></div>
</span></td></tr>

View file

@ -60,10 +60,6 @@ h4.notice {
color: #007E00;
}
div.t {
padding-left:5px;
}
span.tag {
font-size: XX-small;
background-color: #CCE7FF;
@ -125,4 +121,8 @@ span.prj, span.ctx{
.errors {
background: #FFC2C2;
}
}
table.c {
margin-left: 5px;
}