histogram/src/main/webapp/pages/index.html
author Jaroslav Tulach <jtulach@netbeans.org>
Sun, 17 Nov 2013 09:46:45 +0100
branchchess
changeset 87 c2293ae622df
permissions -rw-r--r--
Adding histogram demo
     1 <!--
     2 
     3     The MIT License (MIT)
     4 
     5     Copyright (C) 2013 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
     6 
     7     Permission is hereby granted, free of charge, to any person obtaining a copy
     8     of this software and associated documentation files (the "Software"), to deal
     9     in the Software without restriction, including without limitation the rights
    10     to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    11     copies of the Software, and to permit persons to whom the Software is
    12     furnished to do so, subject to the following conditions:
    13 
    14     The above copyright notice and this permission notice shall be included in
    15     all copies or substantial portions of the Software.
    16 
    17     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    18     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    19     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    20     AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    21     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    22     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    23     THE SOFTWARE.
    24 
    25 -->
    26 <!DOCTYPE html>
    27 <html>
    28     <head>
    29         <title></title>
    30         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    31 
    32         <style type="text/css">
    33             #graph {
    34                 position: relative;
    35                 width: 660px;
    36                 height: 216px;
    37                 margin: 8px;
    38                 padding: 0;
    39             }
    40             
    41             #graph ul {
    42                 position: absolute;
    43                 top: 0;
    44                 left: 32px;
    45                 width: 600px;
    46                 height: 200px;
    47                 border-left: 1px solid black;
    48                 border-bottom: 1px solid black;
    49             }
    50             
    51             #graph li {
    52                 position: absolute;
    53                 list-style: none;
    54                 background: lightblue;
    55                 width: 40px;
    56                 text-align: center;
    57                 border: 1px solid black;
    58                 top: 60px;
    59                 visibility: hidden;
    60             }
    61         </style>
    62 
    63     </head>
    64     <body>
    65         <h1>Histogram Demo</h1>
    66         <input data-bind="value: numbers, valueUpdate: 'afterkeydown'" size="80">
    67 
    68         <div id="graph">
    69             <ul data-bind="foreach: bars">
    70                 <li data-bind="style: { left : left, top: top, height : height, visibility : 'visible' }"> 
    71                     <span style="margin:8px; background: lightblue"></span>
    72                 </li>
    73             </ul>
    74         </div>
    75         
    76         <script type="text/javascript" src="bck2brwsr.js"></script>
    77         <script>
    78             var vm = bck2brwsr('${project.build.finalName}.jar');
    79             vm.loadClass('dew.demo.histogram.MainBrwsr');
    80         </script>
    81         
    82     </body>
    83 </html>