Permalink
Browse files

Bootstrap that shit

  • Loading branch information...
1 parent 0937801 commit 37fc14c7925cdfa000077859b1237e2914785d06 @bgentry committed Aug 30, 2011
@@ -2,7 +2,8 @@
<html>
<head>
<title>DreamforceDemo</title>
- <%= stylesheet_link_tag :all %>
+ <%= stylesheet_link_tag 'bootstrap-1.1.1.min.css' %>
+ <%= stylesheet_link_tag 'custom.css' %>
<%= javascript_include_tag :defaults %>
<%= csrf_meta_tag %>
</head>
@@ -1,9 +1,11 @@
-<tr id="task_<%= task.id %>">
+<tr id="task_<%= task.id %>" class="task">
<td><%= task.name %></td>
<td>
<%= form_for task, :html => { :method => :put, :remote => true } do |f| %>
<%= f.check_box :finished, :class => "task_finished" %>
<% end %>
</td>
- <td><%= link_to 'X', task, :method => :delete %></td>
+ <td>
+ <%= link_to 'Delete', task, :method => :delete, :class => 'btn danger' %>
+ </td>
</tr>
@@ -1,2 +1,3 @@
+$("#new-task-text").val('');
$("#task_list").append("<%= escape_javascript(render(@task)) %>");
$("#task_<%= @task.id %>").effect("highlight", {}, 2000);
@@ -1,24 +1,43 @@
-<h1>Listing tasks</h1>
+<div class="container">
-<table id="task_list">
- <tr>
- <th>Name</th>
- <th>Finished?</th>
- <th></th>
- </tr>
+ <div class="row">
+ <div class="span10 columns">
+ <h1>Tasks</h1>
- <%= render @tasks %>
-</table>
+ <table id="task_list" class="zebra-striped">
+ <tr>
+ <th>Name</th>
+ <th>Finished?</th>
+ <th></th>
+ </tr>
-<br />
+ <%= render @tasks %>
+ </table>
-<%= form_for Task.new, :html => { :remote => true } do |f| %>
- <%= f.label :name %><br />
- <%= f.text_field :name %>
- <%= f.label :finished %><br />
- <%= f.check_box :finished %>
- <%= f.submit %>
-<% end %>
+ <br />
+
+ <%= form_for Task.new, :html => { :remote => true, :style => 'margin-bottom:0;' } do |f| %>
+ <fieldset>
+ <legend>New Task</legend>
+ <div class="clearfix">
+ <%= f.label :name %>
+ <div class="input">
+ <div class="input-append">
+ <%= f.text_field :name, :class => "large", :id => 'new-task-text' %>
+ <label class="add-on">
+ <%= f.check_box :finished %>
+ </label>
+ </div>
+ </div>
+ </div>
+ <div class="actions">
+ <%= f.submit :class => 'btn primary' %>
+ </div>
+ </fieldset>
+ <% end %>
+ </div>
+ </div>
+</div>
<script type="text/javascript">
$('.task_finished').live('change', function() {
Oops, something went wrong.

0 comments on commit 37fc14c

Please sign in to comment.