12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <!doctype html>
- <html data-trap="App: path">
- <head>
- <title data-trap="#title"></title>
- <style>
- [data-trap] {
- display: none
- }
- </style>
- <meta name="author" content="Herbert Vojčík" />
- <link rel="stylesheet" href="todo.css"/>
- <script type='text/javascript' src='../the.js'></script>
- <script type="text/javascript">
- var blackboard;
- require.config({baseUrl: '..'});
- require(
- ["app", "trapped-todo/Trapped-Todo"],
- function (amber) {
- amber.initialize({
- //used for all new packages in IDE
- 'transport.defaultAmdNamespace': "trapped-todo"
- });
- require(["amber-ide-starter-dialog"], function (dlg) { dlg.start(); });
- $(function () {
- blackboard = amber.globals.App._new();
- amber.globals.Trapped._start_([blackboard]);
- });
- }
- );
- </script>
- </head>
- <body>
- <h2 data-trap="#title"></h2>
- <div data-trap=": (guard (#todos #notNil)) xontent" data-xontent>
- <span data-trap="#remaining"></span> of <span data-trap="#todos #size"></span> remaning
- [ <a href="" data-trap=": (signal archive) whenClicked">archive</a> ]
- <ul>
- <script type="application/x-beacon" data-trap="#todos: loopZ xontent" data-xontent="until end"></script>
- <li>
- <label>
- <input type="checkbox" data-trap="done: inputChecked"/>
- <span data-trap="done: (replace ^ with ^done-) (attr class). text" ></span>
- </label>
- </li>
- </ul>
- <form data-trap=": (signal addTodo) whenSubmitted">
- <input type="text" data-trap="#todoText: inputValue" size="30" placeholder="add new todo here"/>
- <input type="submit" class="btn-primary" value="add"/>
- </form>
- </div>
- <p data-trap=": (guard (#todos #isNil)) xontent" data-xontent>Loading (fake 2 sec pause)...</p>
- </body>
- </html>
|