808
|
1 <?xml version="1.0" encoding="iso-8859-1"?>
|
|
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
|
3 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
|
4 <html xmlns="http://www.w3.org/1999/xhtml"
|
|
5 xmlns:n="http://nevow.com/ns/nevow/0.1">
|
|
6 <head>
|
|
7 <title>shiftweb</title>
|
|
8 <style type="text/css" media="all">
|
|
9 /* <![CDATA[ */
|
|
10 body {
|
|
11 background: #000000;
|
|
12 color: #888;
|
|
13 }
|
|
14 h1 {
|
|
15 font-size:100%;
|
|
16 }
|
|
17 div.manual {
|
|
18 margin: 10px;
|
|
19 padding: 10px;
|
|
20 background: #222;
|
|
21 width:19em;
|
|
22 }
|
|
23 div.credit {
|
|
24 font-size: 80%;
|
|
25 margin-top:41px;
|
|
26 }
|
|
27 .colorpicker {
|
|
28 display: inline-block;
|
|
29 }
|
|
30 /* ]]> */
|
|
31 </style>
|
|
32 <meta name="viewport" content="width=320; initial-scale=1.3; maximum-scale=2.0; user-scalable=1;"/>
|
|
33
|
|
34 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
|
|
35 <script type="text/javascript" src="http://bigasterisk.com/bathroomLight/static/farbtastic/farbtastic.js"></script>
|
|
36 <link rel="stylesheet" href="http://bigasterisk.com/bathroomLight/static/farbtastic/farbtastic.css" type="text/css" />
|
|
37 </head>
|
|
38 <body>
|
|
39 <h1>Light color</h1>
|
|
40 <div class="colorpicker" id="p0"></div>
|
|
41 <div class="colorpicker" id="p1"></div>
|
|
42 <div class="colorpicker" id="p2"></div>
|
|
43 <div class="colorpicker" id="p3"></div>
|
|
44 <div class="colorpicker" id="p4"></div>
|
|
45
|
|
46 <script type="text/javascript">
|
|
47 $(document).ready(function() {
|
|
48
|
|
49 $.each([
|
|
50 ["#p0", "brite/0"],
|
|
51 ["#p1", "brite/1"],
|
|
52 ["#p2", "brite/2"],
|
|
53 ["#p3", "brite/3"],
|
|
54 ["#p4", "brite/4"],
|
|
55 ], function (i, r) {
|
|
56 var elem=r[0], url=r[1];
|
|
57
|
|
58 var picker = $.farbtastic(elem, function (newColor) {
|
|
59 $.ajax({
|
|
60 type: "put",
|
|
61 url: url,
|
|
62 contentType: "text/plain",
|
|
63 data: newColor
|
|
64 });
|
|
65 });
|
|
66
|
|
67 $.get(url, picker.setColor);
|
|
68 });
|
|
69 });
|
|
70 </script>
|
|
71
|
|
72 <div class="credit">
|
|
73 Using the
|
|
74 <a href="http://acko.net/dev/farbtastic">Farbtastic color picker</a>
|
|
75 </div>
|
|
76
|
|
77 <hr/>
|
|
78
|
|
79 <div class="manual">
|
|
80 <form method="POST" action="brite/0">
|
|
81 <div>
|
|
82 Channel: <input type="text" name="channel" value="0" size="3"/>
|
|
83 Color: <input type="text" name="color" value="#ffffff" size="7"/>
|
|
84 </div>
|
|
85 <div><input type="submit" value="Post color"/></div>
|
|
86 </form>
|
|
87 </div>
|
|
88
|
|
89 </body>
|
|
90 </html>
|