1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <!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 (amberPromise) {
- Promise.resolve(amberPromise).then(function (amber) {
- amber.initialize({
- //used for all new packages in IDE
- 'transport.defaultAmdNamespace': "trapped-todo"
- }).then(function () {
- 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>
|