Cleaned up HTML UI (js points to local testnet, public testnet version to follow.)
[robmyers:artworld-ethereum.git] / ui / registry.html
1 <html>
2 <head>
3   <script type="text/javascript"
4           src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
5   </script>
6   <script type="text/javascript" src="js/ripemd.js"></script>
7   <script type="text/javascript" src="js/registry.js">
8   </script>
9   <script>
10     if (typeof(window.eth) === "undefined") {
11       document.write('Please run in AlethZero.<br/>');
12     }
13   </script>
14   <link rel="stylesheet" type="text/css" href="css/registry.css" />
15 <title>Artwork Registry</title>
16 </head>
17 <body>
18
19  <!-- ----------------------------------------------------------------------
20        Top navigation
21     ---------------------------------------------------------------------- -->
22
23  <h2>Artwork Registry</h2>
24  <h4 id="work_count"></h4>
25
26  <center><a id="list_button" href="javascript:void(0)" onclick="toggle('list');">Artworks</a> |
27    <a id="register_button" href="javascript:void(0)" onclick="toggle('register');">Register</a> |
28     <a id="offer_button" href="javascript:void(0)" onclick="toggle('offer');">Sell</a> |
29     <a id="accept_button" href="javascript:void(0)" onclick="toggle('accept');">Buy</a></center>
30  <p id="result"></p>
31
32   <!-- ----------------------------------------------------------------------
33        List
34     ---------------------------------------------------------------------- -->
35
36   <div id="list_div">
37     <h2>Artworks</h2>
38     <h3>Get Artwork File Digest</h3>
39     <table>
40       <tr><td>URL For Digest:</td><td><input type="text" id="find_url" maxlength="960"/></td></tr>
41       <tr><td>Digest of URL:</td><td><input type="text" id="find_digest" maxlength="42"/></td></tr>
42       <tr><td><a href="javascript:void(0)" onclick="create_url_digest();">
43             create digest for url</a></td><td></td></tr>
44     </table>
45     <h3>Artwork Details</h3>
46     <table>
47       <tr><td>digest:</td><td><p id="artwork_digest"></p></td></tr>
48       <tr><td>artist:</td><td><p id="artwork_artist"></p></td></tr>
49       <tr><td>arr:</td><td><p id="artwork_arr"></p></td></tr>
50       <tr><td>owner:</td><td><p id="artwork_owner"></p></td></tr>
51       <tr><td>buyer:</td><td><p id="artwork_buyer"></p></td></tr>
52       <tr><td>price:</td><td><p id="artwork_price"></p></td></tr>
53       <tr><td>url:</td><td><p id="artwork_url"></p></td></tr>
54       <tr><td>desc:</td><td><p id="artwork_desc"></p></td></tr>
55     </table>
56     <h4>You Are The Artist Of</h4>
57     <div id="list_artist">None</div>
58     <h4>You Are The Owner Of</h4>
59     <div id="list_owner">None</div>
60     <h4>You Can Buy</h4>
61     <div id="list_buyer">None</div>
62     <h4>Other Artworks</h4>
63     <div id="list_other">None</div>
64   </div>
65
66   <!-- ----------------------------------------------------------------------
67        Register
68     ---------------------------------------------------------------------- -->
69   <div id="register_div">
70     <h2>Register</h2>
71     <table>
72       <tr><td>digest:</td><td><input type="text" id="register_digest" maxlength="42"/></td></tr>
73       <tr><td>arr:</td><td><input type="text" id="register_arr" maxlength="2" value="0"/>%</td></tr>
74       <tr><td>url:</td><td><input type="text" id="register_url" maxlength="960"></td></tr>
75       <tr><td>desc:</td><td><input type="text" id="register_desc" maxlength="896"></td></tr>
76     </table>
77     <a id="register" href="javascript:void(0)" onclick="register_artwork();">register</a>
78   </div>
79
80   <!-- ----------------------------------------------------------------------
81        Offer
82     ---------------------------------------------------------------------- -->
83   <div id="offer_div">
84     <h2>Sell</h2>
85     <table>
86       <tr><td>digest:</td><td><p id="offer_digest"></p></td></tr>
87       <tr><td>recipient:</td><td><input type="text" id="offer_recipient" maxlength="42"/>(Empty for anyone)</td></tr>
88       <tr><td>price:</td><td><input type="text" id="offer_price"/>(0 for no cost)</td></tr>
89     </table>
90     <a id="register" href="javascript:void(0)" onclick="offer_artwork();">sell</a>
91   </div>
92
93   <!-- ----------------------------------------------------------------------
94        Accept
95     ---------------------------------------------------------------------- -->
96   <div id="accept_div">
97     <h2>Buy</h2>
98     <table>
99       <tr><td>digest:</td><td><p id="accept_digest"></p></td></tr>
100       <tr><td>arr:</td><td><p id="accept_arr"></p></tr>
101       <tr><td>price:</td><td><p id="accept_price"></p></tr>
102       <tr><td>url:</td><td><p id="accept_url"></p></tr>
103       <tr><td>desc:</td><td><p id="accept_desc"></p></td></tr>
104     </table>
105     <a id="register" href="javascript:void(0)" onclick="accept_artwork();">buy</a>
106   </div>
107
108 </body>
109 </html>