Mercurial > code > home > repos > homeauto
diff service/garageArduino/index.html @ 839:9cf01cee74f6
garage: videoselect and shiftbrite move from parallel to arduino
Ignore-this: 45c791caa87d4c054826020eeae8298b
darcs-hash:20120625075033-312f9-fe2b5088e638e008dd194bd450aa1bac3d48c233.gz
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Mon, 25 Jun 2012 00:50:33 -0700 |
parents | 44e1ca03ddf1 |
children | a442bc778862 |
line wrap: on
line diff
--- a/service/garageArduino/index.html Mon May 07 00:17:40 2012 -0700 +++ b/service/garageArduino/index.html Mon Jun 25 00:50:33 2012 -0700 @@ -29,8 +29,12 @@ <p><button type="submit" id="refresh">refresh</button></p> + <p>Bathroom shiftbrite</p> + <div class="colorpicker" id="p0"></div> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"/> - + <script type="text/javascript" src="http://bigasterisk.com/bathroomLight/static/farbtastic/farbtastic.js"></script> + <link rel="stylesheet" href="http://bigasterisk.com/bathroomLight/static/farbtastic/farbtastic.css" type="text/css" /> <script type="text/javascript"> // <![CDATA[ @@ -71,6 +75,19 @@ } refresh(); $("#refresh").click(refresh); + + $.each([ + ["#p0", "brite/0"], + ], function (i, row) { + var picker = $.farbtastic(row[0], function (newColor) { + $.ajax({ + type: "put", url: row[1], + contentType: "text/plain", data: newColor + }); + }); + $.get(row[1], picker.setColor); + }); + }); // ]]> </script>