Debian Codegraph @

dojox/widget/tests/test_ColorPicker.html

raw symbols SCIP
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
3 <html lang="en">
4 <head>
5
6 <title>Dojox ColorPicker Test</title>
7
8 <!-- required: a default theme file, and ColorPicker css -->
9 <link rel="stylesheet" id="themeStyles" href="../../../dijit/themes/tundra/tundra.css">
10 <link rel="stylesheet" href="../ColorPicker/ColorPicker.css">
11
12 <style type="text/css">
13 @import "../../../dojo/resources/dojo.css";
14 @import "../../../dijit/tests/css/dijitTests.css";
15 #absolutey {
16 position:absolute;
17 top: 62px;
18 left: 362px;
19 }
20 </style>
21
22 <!-- required: dojo.js -->
23 <script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="isDebug:true, parseOnLoad: true"></script>
24
25 <!-- do not use! only for testing dynamic themes
26 <script type="text/javascript" src="../../../dijit/tests/_testCommon.js"></script>
27 -->
28 <script type="text/javascript">
29 dojo.require("dojox.widget.ColorPicker");
30 dojo.require("dijit.form.Button");
31 dojo.require("dojo.parser"); // scan page for widgets and instantiate them
32
33 // generic onChange handler:
34 var handler = function(val,id){
35 dojo.byId(id).value = val;
36 };
37
38 dojo.addOnLoad(function(){
39 dojo.connect(dijit.byId("testFocusButton"), "onClick", function(){
40 dijit.byId("picker").focus();
41 });
42 });
43 </script>
44 </head>
45 <body class="tundra" role="main">
46
47 <h1 class="testTitle">Dojox ColorPicker test</h1>
48
49 <h3>defaults:</h3>
50 <div id="picker" dojoType="dojox.widget.ColorPicker"
51 value="#9ebf6c"
52 onChange="handler(arguments[0],'onchangeOne')"
53 ></div>
54 <p><label for="onchangeOne">Current value: </label><input readonly="true" id="onchangeOne" value="???" /></p>
55
56 <h3>no animation, no hsv, no rgb, no webSafe info:</h3>
57 <div id="pickerToo" dojoType="dojox.widget.ColorPicker"
58 animatePoint="false"
59 showHsv="false"
60 showRgb="false"
61 webSafe="false"
62 onChange="handler(arguments[0],'onchangeTwo')"
63 ></div>
64 <p><label for="onchangeTwo">Current value: </label><input readonly="true" id="onchangeTwo" value="???" /></p>
65
66 <h3>Fires onChange a lot:</h3>
67 <div id="pickerLive" dojoType="dojox.widget.ColorPicker"
68 webSafe="false"
69 liveUpdate="true"
70 onChange="handler(arguments[0],'onchangeThree')"
71 ></div>
72 <p><label for="onchangeThree">Current value: </label><input readonly="true" id="onchangeThree" value="???" /></p>
73
74 <div id="absolutey">
75 <h3>To See how it positions in an absolute node (editor plugin, input popup)</h3>
76 <input dojoType="dojox.widget.ColorPicker" value="#ededed">
77 </div>
78
79 <button id="testFocusButton" type="button" dojoType="dijit.form.Button">Click to focus first widget</button>
80
81 <p>that's all folks!</p>
82
83 </body>
84 </html>