javaquery/demo-calculator-dynamic/src/main/resources/org/apidesign/bck2brwsr/demo/calc/Calculator.xhtml
1.1 --- a/javaquery/demo-calculator-dynamic/src/main/resources/org/apidesign/bck2brwsr/demo/calc/Calculator.xhtml Mon Jun 09 09:39:59 2014 +0200
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,102 +0,0 @@
1.4 -<?xml version="1.0" encoding="UTF-8"?>
1.5 -<!--
1.6 -
1.7 - Back 2 Browser Bytecode Translator
1.8 - Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
1.9 -
1.10 - This program is free software: you can redistribute it and/or modify
1.11 - it under the terms of the GNU General Public License as published by
1.12 - the Free Software Foundation, version 2 of the License.
1.13 -
1.14 - This program is distributed in the hope that it will be useful,
1.15 - but WITHOUT ANY WARRANTY; without even the implied warranty of
1.16 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.17 - GNU General Public License for more details.
1.18 -
1.19 - You should have received a copy of the GNU General Public License
1.20 - along with this program. Look for COPYING file in the top folder.
1.21 - If not, see http://opensource.org/licenses/GPL-2.0.
1.22 -
1.23 --->
1.24 -<!DOCTYPE html>
1.25 -<html xmlns="http://www.w3.org/1999/xhtml">
1.26 - <head>
1.27 - <title>Simple Calculator in HTML5 and Java</title>
1.28 -
1.29 - <style type="text/css">
1.30 - body {color: #ffffff; background-color: #121e31; font-family: Monospaced}
1.31 - pre {color: #ffffff; background-color: #121e31; font-family: Monospaced}
1.32 - table {color: #ffffff; background-color: #121e31; font-family: Monospaced}
1.33 - .string {color: #e2ce00}
1.34 - a {color: #e2ce00}
1.35 - .ST1 {color: #0000cc; font-family: Monospaced; font-weight: bold}
1.36 - .ST0 {color: #0000ff}
1.37 - .comment {color: #428bdd}
1.38 - .keyword-directive {color: #f8bb00}
1.39 - .tag {color: #f8bb00}
1.40 - .ST0 {color: #628fb5; background-color: #1b3450}
1.41 - .sgml-comment {color: #808080}
1.42 - .value {color: #99006b}
1.43 - .argument {color: #007c00}
1.44 - .sgml-declaration {color: #bf9221}
1.45 - </style>
1.46 - </head>
1.47 - <body>
1.48 - <h1>Java and HTML5 - Together at Last!</h1>
1.49 - <table border="0" cellspacing="2">
1.50 - <tbody>
1.51 - <tr>
1.52 - <td colspan="4"><input data-bind="value: display" value="0"
1.53 - style="text-align: right"/>
1.54 - </td>
1.55 - </tr>
1.56 - <tr>
1.57 - <td><button id="n1">1</button></td>
1.58 - <td><button id="n2">2</button></td>
1.59 - <td><button id="n3">3</button></td>
1.60 - <td><button id="plus">+</button></td>
1.61 - </tr>
1.62 - <tr>
1.63 - <td><button id="n4">4</button></td>
1.64 - <td><button id="n5">5</button></td>
1.65 - <td><button id="n6">6</button></td>
1.66 - <td><button id="minus">-</button></td>
1.67 - </tr>
1.68 - <tr>
1.69 - <td><button id="n7">7</button></td>
1.70 - <td><button id="n8">8</button></td>
1.71 - <td><button id="n9">9</button></td>
1.72 - <td><button id="mul">*</button></td>
1.73 - </tr>
1.74 - <tr>
1.75 - <td><button id="clear">C</button></td>
1.76 - <td><button id="n0">0</button></td>
1.77 - <td><button id="result">=</button></td>
1.78 - <td><button id="div">/</button></td>
1.79 - </tr>
1.80 - </tbody>
1.81 - </table>
1.82 - <div data-bind="text: displayPreview"></div>
1.83 -
1.84 - <h4>Previous Results</h4>
1.85 -
1.86 - <div data-bind="if: emptyHistory">No results yet.</div>
1.87 - <ul data-bind="foreach: history">
1.88 - <li>
1.89 - <span data-bind="text: $data.value"></span> -
1.90 - <a href="#" data-bind="click: $root.recoverMemory">Use</a>
1.91 - <a href="#" data-bind="click: $root.removeMemory">Remove</a>
1.92 - <a href="#" data-bind="click: $data.twice">Double</a> -
1.93 - <span data-bind="text: $data.resultOf"></span>
1.94 - </li>
1.95 - </ul>
1.96 -
1.97 - <script src="bck2brwsr.js"></script>
1.98 - <script type="text/javascript">
1.99 - var vm = bck2brwsr('demo.calculator-0.6.jar');
1.100 - vm.loadClass('org.apidesign.bck2brwsr.demo.calc.Calc');
1.101 - </script>
1.102 -
1.103 - <hr/>
1.104 - </body>
1.105 -</html>