123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <!doctype html>
- <html data-trap="App: path">
- <head>
- <title data-trap="#title"></title>
- <style>
- [data-trap] {
- display: none
- }
- </style>
- <script src="../bower_components/amber/support/amber.js"></script>
- <script type='text/javascript' src='../bower_components/amber/support/requirejs/require.min.js'></script>
- <link rel="stylesheet" href="todo.css"/>
- <script type="text/javascript">
- var blackboard;
- require.config({
- paths: {
- 'gh_herby_trapped': '../js',
- 'gh_herby_trapped_todo': 'js',
- 'gh_herby_trapped_todo/_source': 'st'
- }
- });
- require(
- ["amber/devel",
- "gh_herby_trapped/Trapped-Processors", "gh_herby_trapped_todo/Trapped-Todo" ],
- function (smalltalk) {
- smalltalk.defaultAmdNamespace = 'gh_herby_trapped_todo';
- smalltalk.initialize();
- $(function () {
- smalltalk.Browser._openOn_(smalltalk.App);
- blackboard = smalltalk.App._new();
- smalltalk.Trapped._start_([blackboard]);
- });
- }
- );
- </script>
- </head>
- <body>
- <h2 data-trap="#title"></h2>
- <div data-trap=": (guardContents (#todos #notNil))">
- <span data-trap="#remaining"></span> of <span data-trap="#todos #size"></span> remaning
- [ <a href="" data-trap=": (signal archive) whenClicked">archive</a> ]
- <ul><ins data-trap="#todos: loopContents">
- <li>
- <input type="checkbox" data-trap="done: inputChecked" />
- <span data-trap="done: (replace ^ with ^done-) (attr class). text" ></span>
- </li>
- </ins></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=": (guardContents (#todos #isNil))">Loading (fake 2 sec pause)...</p>
- </body>
- </html>
|