Debian Codegraph @

dijit/tests/test_ColorPalette.html

raw symbols SCIP
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta http-equiv="Content-type" content="text/html; charset=utf-8">
5 <title>ColorPalette Test</title>
6
7 <script src="boilerplate.js" data-dojo-config="extraLocale: ['en-us', 'es-mx']"></script>
8
9 <script type="text/javascript">
10 require(["dojo/dom", "dojo/parser", "dijit/ColorPalette", "dojo/domReady!"],
11 function(dom, parser, ColorPalette){
12
13 setColor = function(color){
14 var theSpan = dom.byId("outputSpan");
15 theSpan.style.color = color;
16 theSpan.innerHTML = color;
17 };
18
19 parser.parse();
20
21 var date0 = new Date();
22 var palette = new ColorPalette({palette: "7x10", id: "prog", "aria-label": "programatic label"}, "programPalette");
23 console.log("creation time for 7x10 palette: " + (new Date() - date0) );
24 });
25
26 </script>
27 </head>
28
29 <body class="claro" role="main">
30
31 <h1 class="testTitle">dijit.ColorPalette test:</h1>
32
33 <p>Large color palette (7x10), English tooltips:</p>
34 <label for="beforeBig">label:</label><input id="beforeBig" value="for tabIndex testing"/>
35 <div id="big" data-dojo-type="dijit/ColorPalette" data-dojo-props='onChange:function(){ setColor(this.value); }, lang:"en-us", "aria-label":"This is the palette label"'></div>
36 <label for="afterBig">Test color is:</label> <span id="outputSpan"></span>.
37 <input id="afterBig" value="for tabIndex testing"/>
38
39 <p>Small color palette (3x4), Spanish tooltips:</p>
40 <label for="beforeSmall">label:</label><input id="beforeSmall" value="for tabIndex testing"/>
41 <div id="small" data-dojo-type="dijit/ColorPalette" data-dojo-props='palette:"3x4", lang:"es-mx","aria-label":"Small color palette"'></div>
42 <label for="afterSmall">label:</label><input id="afterSmall" value="for tabIndex testing"/>
43
44 <p>Default color palette (7x10) created programatically:</p>
45 <div id="programPalette"></div>
46
47 <p>ColorPalette with value pre-selected, using old style parser parameters:</p>
48 <label for="beforeValuePreselected">label:"</label><input id="beforeValuePreselected" value="for tabIndex testing"/>
49 <label for="valuePreselected">label for color palette</label><div id="valuePreselected" dojoType="dijit.ColorPalette" value="#0000ff"></div>
50 <label for="afterValuePreselected">label:</label><input id="afterValuePreselected" value="for tabIndex testing"/>
51 </body>
52 </html>