Files
react/examples/todomvc-backbone/index.html
Cheng Lou 78d305eb16 Fix backbone todo example bugs.
Fixed:
- New todo not submitting correctly (page refreshes. `preventDefault`
wasn't there.
- Old checked todo being removed will leave the checkmark on the next
todo replacing its position.
- Cannot change todo (`value`'s now a controlled field).
- `autofocus` (should be `autoFocus`, how ironic given the current
situation) on new todo input isn't working. Switched to manual
`focus()` in `componentDidMount` for now.
- More consistent breathing space between lines.
- Gutter at 80.

Added:
- Use todomvc-common base.css. The old one had to change ids to
classes. No longer necessary.
- Give `cx` a better name and move it in `Utils`.
- Trim input upon finishing edit.
- Remove todo if the new edited value is empty.
- Submit edited todo value on input blur.
- README to explain the existence of this example. Being able to
maintain a non-compilant version allows nice deviations from the
todomvc specs, such as animations, in the future.
2013-09-07 17:44:05 -04:00

23 lines
887 B
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>React • TodoMVC</title>
<link rel="stylesheet" href="css/base.css">
<!--[if IE]>
<script src="js/ie.js"></script>
<![endif]-->
</head>
<body>
<div id="container"></div>
<script src="../../build/react.js"></script>
<script src="../../build/JSXTransformer.js"></script>
<script type="text/javascript" src="../shared/thirdparty/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="thirdparty/lodash.min.js" charset="utf-8"></script>
<script type="text/javascript" src="thirdparty/backbone-min.js" charset="utf-8"></script>
<script type="text/javascript" src="thirdparty/backbone.localStorage-min.js" charset="utf-8"></script>
<script type="text/jsx" src="js/app.js"></script>
</body>
</html>