<!DOCTYPE html>
<html>
<head>
    <title>Backbone Demo: Todos</title>
    <link rel="stylesheet" type="text/css" href="Content/Css/todos.css" media="all" />
    <script>        window.JSON || document.write('<script src="http://ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js">\x3C/script>')</script>
    <script src="Scripts/jquery-1.5.js"></script>
    <script src="Scripts/underscore-1.1.5.js"></script>
    <script src="Scripts/backbone.js"></script>
    <script src="Scripts/todos.js"></script>
</head>
<body>
    <a href="http://mono.servicestack.net" style="display: block; position: absolute;
        top: 5px; left: 10px;">
        <img src="http://mono.servicestack.net/icon-home-eee.jpg" alt="ServiceStack Home" />
    </a>
    <!-- Todo App Interface -->
    <div id="todoapp">
        <div class="title">
            <h1>
                Todos</h1>
        </div>
        <div class="content">
            <div id="create-todo">
                <input id="new-todo" placeholder="What needs to be done?" type="text" />
                <span class="ui-tooltip-top" style="display: none;">Press Enter to save this task</span>
            </div>
            <div id="todos">
                <ul id="todo-list">
                </ul>
            </div>
            <div id="todo-stats">
            </div>
        </div>
    </div>
    <ul id="instructions">
        <li>Double-click to edit a todo.</li>
        <li><a href="https://github.com/ServiceStack/ServiceStack.Examples/blob/master/src/Backbone.Todos/Global.asax.cs">
            1 page C# and Redis-backed</a> | <a href="http://documentcloud.github.com/backbone/examples/todos/index.html">
                Backbone.js TODO app</a> </li>
    </ul>
    <div id="credits">
        Created by
        <br />
        <a href="http://jgn.me/">J&eacute;r&ocirc;me Gravel-Niquet</a>
        <br />
        <br />
        Powered By Open Source
        <br />
        <a href="http://servicestack.net">servicestack.net</a> | <a href="http://redis.io">redis</a>
        | <a href="http://www.mono-project.com">mono</a>
    </div>
    <!-- Templates -->
    <script type="text/template" id="item-template">
      <div class="todo <%= done ? 'done' : '' %>">
        <div class="display">
          <input class="check" type="checkbox" <%= done ? 'checked="checked"' : '' %> />
          <div class="todo-content"></div>
          <span class="todo-destroy"></span>
        </div>
        <div class="edit">
          <input class="todo-input" type="text" value="" />
        </div>
      </div>
    </script>
    <script type="text/template" id="stats-template">
      <% if (total) { %>
        <span class="todo-count">
          <span class="number"><%= remaining %></span>
          <span class="word"><%= remaining == 1 ? 'item' : 'items' %></span> left.
        </span>
      <% } %>
      <% if (done) { %>
        <span class="todo-clear">
          <a href="#">
            Clear <span class="number-done"><%= done %></span>
            completed <span class="word-done"><%= done == 1 ? 'item' : 'items' %></span>
          </a>
        </span>
      <% } %>
    </script>
    <script type="text/javascript">
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-7722718-7']);
        _gaq.push(['_trackPageview']);

        (function () {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
        })();
    </script>
</body>
</html>
