ko-archetype/src/main/resources/archetype-resources/src/main/resources/index.html
Moving archetype tests into separate module - at that moment it is possible to use the previously generated archetype
1 <?xml version="1.0" encoding="UTF-8"?>
6 Copyright (C) 2013 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
8 Permission is hereby granted, free of charge, to any person obtaining a copy
9 of this software and associated documentation files (the "Software"), to deal
10 in the Software without restriction, including without limitation the rights
11 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 copies of the Software, and to permit persons to whom the Software is
13 furnished to do so, subject to the following conditions:
15 The above copyright notice and this permission notice shall be included in
16 all copies or substantial portions of the Software.
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29 Copied from knockout.js Twitter example:
30 http://knockoutjs.com/examples/twitter.html
34 <html xmlns="http://www.w3.org/1999/xhtml">
36 <title>Bck2Brwsr's Twitter</title>
39 <link href='twitterExample.css' rel='Stylesheet' ></link>
41 <style type='text/css'>
42 .liveExample select { height: 1.7em; }
43 .liveExample button { height: 2em; }
47 <h2>Bck2Brwsr's Twitter</h2>
50 This code based on original <a href="http://knockoutjs.com/examples/twitter.html">knockout.js Twitter example</a> and
51 uses almost unmodified HTML code. It just changes the model. It
52 is written in Java language and it is executed using <a href="http://bck2brwsr.apidesign.org">Bck2Brwsr</a>
53 virtual machine. The Java source code has about 190 lines and is available
54 <a href="http://source.apidesign.org/hg/bck2brwsr/file/7fc6b7e9c982/javaquery/demo-twitter/src/main/java/org/apidesign/bck2brwsr/demo/twitter/TwitterClient.java">here</a>
55 - in fact it may even be more dense than the original JavaScript model.
58 <div class='liveExample'>
59 <div class='configuration'>
60 <div class='listChooser'>
61 <button data-bind='click: deleteList, enable: activeTweetersName'>Delete</button>
62 <button data-bind='click: saveChanges, enable: hasUnsavedChanges'>Save</button>
63 <select data-bind='options: savedLists, optionsValue: "name", value: activeTweetersName'> </select>
66 <p>Currently viewing <span data-bind='text: activeTweetersCount'> </span> user(s):</p>
67 <div class='currentUsers' >
68 <ul data-bind='foreach: activeTweeters'>
70 <button data-bind='click: $root.removeUser'>Remove</button>
71 <div data-bind='text: $data'> </div>
76 <form data-bind='submit: addUser'>
77 <label>Add user:</label>
78 <input data-bind='value: userNameToAdd, valueUpdate: "keyup", css: { invalid: !userNameToAddIsValid() }' />
79 <button data-bind='enable: userNameToAddIsValid' type='submit'>Add</button>
83 <div class='loadingIndicator'>Loading...</div>
84 <table data-bind='foreach: currentTweets' width='100%'>
86 <td><img data-bind='attr: { src: profile_image_url }' /></td>
88 <a class='twitterUser' data-bind='attr: { href: userUrl }, text: from_user'> </a>
89 <span data-bind='html: html'> </span>
90 <div class='tweetInfo' data-bind='text: created_at'> </div>
97 <script src="bck2brwsr.js"></script>
98 <script type="text/javascript">
99 var vm = bck2brwsr('demo-twitter-1.0-SNAPSHOT.jar');
100 vm.loadClass('org.apidesign.html.demo.twitter.TwitterClient');