1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <!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({
- shim: {
- 'amber_lib/xontent/jquery.xontent': {
- deps: [ 'jquery' ]
- }
- },
- 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", "amber_lib/xontent/jquery.xontent" ],
- 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=": (guardXon (#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>
- <script type="application/x-beacon" data-trap="#todos: loopXonZ" 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=": (guardXon (#todos #isNil))">Loading (fake 2 sec pause)...</p>
- </body>
- </html>
|