Merge pull request #68 from maddentim/mobile

Mobile tweaks

Thanks Tim!
This commit is contained in:
Reinier Balt 2012-03-12 09:09:01 -07:00
commit a76ff48594
3 changed files with 28 additions and 28 deletions

View file

@ -15,23 +15,18 @@
<div id="topbar"><h1><% if @down_count -%><span class="count" id="badge_count"><%= @down_count %></span><% end -%> <%= <div id="topbar"><h1><% if @down_count -%><span class="count" id="badge_count"><%= @down_count %></span><% end -%> <%=
l(Date.today, :format => current_user.prefs.title_date_format) -%></h1> l(Date.today, :format => current_user.prefs.title_date_format) -%></h1>
<div class="nav"> <div class="nav">
<%= (link_to(t('layouts.mobile_navigation.new_action'), new_todo_path(new_todo_params))+" | ") unless @new_mobile -%> <%= (link_to(t('layouts.mobile_navigation.new_action'), new_todo_path(new_todo_params))) unless @new_mobile -%>
<%= (link_to(t('layouts.mobile_navigation.home'), todos_path(:format => 'm'))+" | ") unless @home -%> <%= (link_to(t('layouts.mobile_navigation.home'), todos_path(:format => 'm'))) unless @home -%>
<%= (link_to(t('layouts.mobile_navigation.contexts'), contexts_path(:format => 'm'))+" | ") -%> <%= (link_to(t('layouts.mobile_navigation.contexts'), contexts_path(:format => 'm'))) -%>
<%= (link_to(t('layouts.mobile_navigation.projects'), projects_path(:format => 'm'))+" | ") -%> <%= (link_to(t('layouts.mobile_navigation.projects'), projects_path(:format => 'm'))) -%>
<%= (link_to(t('layouts.mobile_navigation.starred'), {:action => "tag", :controller => "todos", :id => "starred.m"})) -%> <%= (link_to(t('layouts.mobile_navigation.starred'), {:action => "tag", :controller => "todos", :id => "starred.m"})) -%>
<% end -%> <% end -%>
</div></div> </div></div>
<div id="content"><%= render_flash -%><%= yield -%></div> <div id="content"><%= render_flash -%><%= yield -%></div>
<hr/><% if current_user && !current_user.prefs.nil? -%> <hr/><% if current_user && !current_user.prefs.nil? -%>
<div class="nav"> <div class="nav">
<%= (link_to(t('layouts.mobile_navigation.logout'), logout_path(:format => 'm')) +" | ") -%> <%= (link_to(t('layouts.mobile_navigation.logout'), logout_path(:format => 'm'))) -%>
<%= (link_to(t('layouts.mobile_navigation.new_action'), new_todo_path(new_todo_params), {:accesskey => "0"})+" | ") unless @new_mobile -%> <%= (link_to(t('layouts.mobile_navigation.tickler'), {:action => "index", :controller => "tickler.m"})) -%>
<%= (link_to(t('layouts.mobile_navigation.home'), todos_path(:format => 'm'), {:accesskey => "1"})+" | ") unless @home -%>
<%= (link_to(t('layouts.mobile_navigation.contexts'), contexts_path(:format => 'm'), {:accesskey => "2"})+" | ") -%>
<%= (link_to(t('layouts.mobile_navigation.projects'), projects_path(:format => 'm'), {:accesskey => "3"})+" | ") -%>
<%= (link_to(t('layouts.mobile_navigation.starred'), {:action => "tag", :controller => "todos", :id => "starred.m"}, {:accesskey => "4"})+" | ") -%>
<%= (link_to(t('layouts.mobile_navigation.tickler'), {:action => "index", :controller => "tickler.m"})+" | ") -%>
<%= (link_to(t('layouts.mobile_navigation.feeds'), {:action => "index", :controller => "feeds.m"})) -%> <%= (link_to(t('layouts.mobile_navigation.feeds'), {:action => "index", :controller => "feeds.m"})) -%>
</div> </div>
<% end -%> <% end -%>

View file

@ -6,24 +6,34 @@
<form method="get" action="<%= edit_todo_path(@todo, :format => :m)%>"> <form method="get" action="<%= edit_todo_path(@todo, :format => :m)%>">
<button>Edit this action</button> <button>Edit this action</button>
<input type="hidden" name="_method" value="put" /> <input type="hidden" name="_method" value="put" />
</form><br/> </form>
<form method="post" action="<%=toggle_star_todo_path(@todo, :format=>:m)%>"> <form method="post" action="<%=toggle_star_todo_path(@todo, :format=>:m)%>">
<button>Toggle Star</button> <button>Toggle Star</button>
<input type="hidden" name="_method" value="put" /> <input type="hidden" name="_method" value="put" />
</form><br/> </form>
<form method="post" action="<%=toggle_check_todo_path(@todo, :format=>:m)%>"> <form method="post" action="<%=toggle_check_todo_path(@todo, :format=>:m)%>">
<button>Mark complete</button> <button>Mark complete</button>
<input type="hidden" name="_method" value="put" /> <input type="hidden" name="_method" value="put" />
</form><br/> </form>
<form method="post" action="<%=defer_todo_path(@todo, :format=>:m, :days => 1)%>"> <form method="post" action="<%=defer_todo_path(@todo, :format=>:m, :days => 1)%>">
<button>Defer 1 day</button> <button>Defer 1 day</button>
<input type="hidden" name="_method" value="put" /> <input type="hidden" name="_method" value="put" />
</form><br/> </form>
<form method="post" action="<%=defer_todo_path(@todo, :format=>:m, :days => 2)%>">
<button>Defer 2 days</button>
<input type="hidden" name="_method" value="put" />
</form>
<form method="post" action="<%=defer_todo_path(@todo, :format=>:m, :days => 3)%>">
<button>Defer 3 days</button>
<input type="hidden" name="_method" value="put" />
</form>
<form method="post" action="<%=defer_todo_path(@todo, :format=>:m, :days => 7)%>"> <form method="post" action="<%=defer_todo_path(@todo, :format=>:m, :days => 7)%>">
<button>Defer 7 days</button> <button>Defer 7 days</button>
<input type="hidden" name="_method" value="put" /> <input type="hidden" name="_method" value="put" />
</form><br/> </form>

View file

@ -4,7 +4,7 @@ body {
} }
#content { #content {
margin-top: 50px; margin-top: 5em;
} }
div.footer { div.footer {
@ -178,9 +178,7 @@ span.r {
background-color: #000000; background-color: #000000;
clear: both; clear: both;
color: #EEEEEE; color: #EEEEEE;
height: 45px;
left: 0; left: 0;
margin-bottom: 5px;
position: fixed; position: fixed;
top: 0; top: 0;
width: 100%; width: 100%;
@ -190,19 +188,15 @@ span.r {
.nav { .nav {
color: #fff; color: #fff;
background: #000; background: #000;
padding-top: 0.2em; padding-top: 0.75em;
padding-bottom: 0.2em; padding-bottom: 0.75em;
}
#topbar .nav {
padding-left:8px;
margin-bottom:0.3em;
} }
.nav a, .nav a:link, .nav a:active, .nav a:visited { .nav a, .nav a:link, .nav a:active, .nav a:visited {
background: #666;
color: #fff; color: #fff;
padding-top: 1.0em; padding: 0.5em;
padding-bottom: 0.5em; margin-left:0.5em;
} }
.nav a:focus, .nav a:hover, .nav a:active { .nav a:focus, .nav a:hover, .nav a:active {
@ -221,6 +215,7 @@ span.r {
table.c { table.c {
margin-left: 5px; margin-left: 5px;
} }
.mobile-done { .mobile-done {
display:inline; display:inline;
} }