diff --git a/examples/todos/index.html b/examples/todos/index.html
index df347a47..6f778783 100644
--- a/examples/todos/index.html
+++ b/examples/todos/index.html
@@ -13,7 +13,6 @@
@@ -24,12 +23,16 @@
+
+ Double-click to edit a todo.
+
+
Created by
@@ -48,18 +51,16 @@
diff --git a/examples/todos/todos.css b/examples/todos/todos.css
index 7a3fb126..35bdb056 100644
--- a/examples/todos/todos.css
+++ b/examples/todos/todos.css
@@ -14,51 +14,6 @@ body {
-webkit-font-smoothing: antialiased;
}
-.sr-only {
- position: absolute;
- width: 1px;
- height: 1px;
- margin: -1px;
- padding: 0;
- overflow: hidden;
- clip: rect(0,0,0,0);
- border: 0;
-}
-
-.button {
- line-height: 20px;
- text-decoration: none;
- background: rgba(0, 0, 0, 0.1);
- color: #555555;
- font-size: 11px;
- padding: 0 10px 1px;
- cursor: pointer;
- -webkit-border-radius: 12px;
- -moz-border-radius: 12px;
- -ms-border-radius: 12px;
- -o-border-radius: 12px;
- border-radius: 12px;
- -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 0 0;
- -moz-box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 0 0;
- -ms-box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 0 0;
- -o-box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 0 0;
- box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 0 0;
-}
-
-.button:hover {
- background: rgba(0, 0, 0, 0.15);
- -webkit-box-shadow: rgba(0, 0, 0, 0.3) 0 -1px 0 0;
- -moz-box-shadow: rgba(0, 0, 0, 0.3) 0 -1px 0 0;
- -ms-box-shadow: rgba(0, 0, 0, 0.3) 0 -1px 0 0;
- -o-box-shadow: rgba(0, 0, 0, 0.3) 0 -1px 0 0;
- box-shadow: rgba(0, 0, 0, 0.3) 0 -1px 0 0;
-}
-
-.button:active {
- position: relative;
- top: 1px;
-}
-
#todoapp {
background: #fff;
padding: 20px;
@@ -113,7 +68,7 @@ body {
}
#todo-list li {
- padding: 18px 70px 18px 0;
+ padding: 18px 20px 18px 0;
position: relative;
font-size: 24px;
border-bottom: 1px solid #cccccc;
@@ -132,20 +87,19 @@ body {
position: absolute;
right: 5px;
top: 20px;
+ display: none;
cursor: pointer;
width: 20px;
height: 20px;
background: url(destroy.png) no-repeat;
}
-#todo-list .edit-link {
- position: absolute;
- right: 35px;
- top: 20px;
+#todo-list li:hover .destroy {
+ display: block;
}
-#todo-list .destroy:hover, #todo-list .destroy:focus {
- background-position: 0 -20px;
+#todo-list .destroy:hover {
+ background-position: 0 -20px;
}
#todo-list li.editing {
@@ -195,14 +149,56 @@ body {
#clear-completed {
float: right;
+ line-height: 20px;
+ text-decoration: none;
+ background: rgba(0, 0, 0, 0.1);
+ color: #555555;
+ font-size: 11px;
margin-top: 8px;
margin-bottom: 8px;
+ padding: 0 10px 1px;
+ cursor: pointer;
+ -webkit-border-radius: 12px;
+ -moz-border-radius: 12px;
+ -ms-border-radius: 12px;
+ -o-border-radius: 12px;
+ border-radius: 12px;
+ -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 0 0;
+ -moz-box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 0 0;
+ -ms-box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 0 0;
+ -o-box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 0 0;
+ box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 0 0;
+}
+
+#clear-completed:hover {
+ background: rgba(0, 0, 0, 0.15);
+ -webkit-box-shadow: rgba(0, 0, 0, 0.3) 0 -1px 0 0;
+ -moz-box-shadow: rgba(0, 0, 0, 0.3) 0 -1px 0 0;
+ -ms-box-shadow: rgba(0, 0, 0, 0.3) 0 -1px 0 0;
+ -o-box-shadow: rgba(0, 0, 0, 0.3) 0 -1px 0 0;
+ box-shadow: rgba(0, 0, 0, 0.3) 0 -1px 0 0;
+}
+
+#clear-completed:active {
+ position: relative;
+ top: 1px;
}
#todo-count span {
font-weight: bold;
}
+#instructions {
+ margin: 10px auto;
+ color: #777777;
+ text-shadow: rgba(255, 255, 255, 0.8) 0 1px 0;
+ text-align: center;
+}
+
+#instructions a {
+ color: #336699;
+}
+
#credits {
margin: 30px auto;
color: #999;
diff --git a/examples/todos/todos.js b/examples/todos/todos.js
index ed8ec6af..66d6282e 100644
--- a/examples/todos/todos.js
+++ b/examples/todos/todos.js
@@ -80,11 +80,11 @@ $(function(){
// The DOM events specific to an item.
events: {
- "click .toggle" : "toggleDone",
- "click a.edit-link" : "edit",
- "click a.destroy" : "clear",
- "keypress .edit" : "updateOnEnter",
- "blur .edit" : "close"
+ "click .toggle" : "toggleDone",
+ "dblclick .view" : "edit",
+ "click a.destroy" : "clear",
+ "keypress .edit" : "updateOnEnter",
+ "blur .edit" : "close"
},
// The TodoView listens for changes to its model, re-rendering. Since there's