| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
| 2 |
"http://www.w3.org/TR/html4/strict.dtd"> |
| 3 |
<html> |
| 4 |
<head> |
| 5 |
|
| 6 |
<title>Dojox ColorPicker Test</title> |
| 7 |
|
| 8 |
|
| 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 |
<script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="parseOnLoad:1,isDebug:1,async:1"></script> |
| 22 |
<script type="text/javascript"> |
| 23 |
require([ |
| 24 |
"dojo", |
| 25 |
"dijit", |
| 26 |
"dijit/form/Button", |
| 27 |
"dojox/widget/ColorPicker", |
| 28 |
"dojo/parser"], function(dojo,dijit){ |
| 29 |
dojo.ready(function(){ |
| 30 |
dojo.connect(dijit.byId("testFocusButton"), "onClick", function(){ |
| 31 |
dijit.byId("picker").focus(); |
| 32 |
}); |
| 33 |
}); |
| 34 |
}); |
| 35 |
var handler = function(val,id){ |
| 36 |
dojo.byId(id).value = val; |
| 37 |
}; |
| 38 |
</script> |
| 39 |
</head> |
| 40 |
<body class="tundra"> |
| 41 |
|
| 42 |
<h1 class="testTitle">Dojox ColorPicker test</h1> |
| 43 |
|
| 44 |
<h3>defaults:</h3> |
| 45 |
<div id="picker" dojoType="dojox.widget.ColorPicker" |
| 46 |
value="#9ebf6c" |
| 47 |
onChange="handler(arguments[0],'onchangeOne')" |
| 48 |
></div> |
| 49 |
<p>Current value: <input readonly="true" id="onchangeOne" value="???" /></p> |
| 50 |
|
| 51 |
<h3>no animation, no hsv, no rgb, no webSafe info:</h3> |
| 52 |
<div id="pickerToo" dojoType="dojox.widget.ColorPicker" |
| 53 |
animatePoint="false" |
| 54 |
showHsv="false" |
| 55 |
showRgb="false" |
| 56 |
webSafe="false" |
| 57 |
onChange="handler(arguments[0],'onchangeTwo')" |
| 58 |
></div> |
| 59 |
<p>Current value: <input readonly="true" id="onchangeTwo" value="???" /></p> |
| 60 |
|
| 61 |
<h3>Fires onChange a lot:</h3> |
| 62 |
<div id="pickerLive" dojoType="dojox.widget.ColorPicker" |
| 63 |
webSafe="false" |
| 64 |
liveUpdate="true" |
| 65 |
onChange="handler(arguments[0],'onchangeThree')" |
| 66 |
></div> |
| 67 |
<p>Current value: <input readonly="true" id="onchangeThree" value="???" /></p> |
| 68 |
|
| 69 |
<div id="absolutey"> |
| 70 |
<h3>To See how it positions in an absolute node (editor plugin, input popup)</h3> |
| 71 |
<input dojoType="dojox.widget.ColorPicker" value="#ededed"> |
| 72 |
</div> |
| 73 |
|
| 74 |
<button id="testFocusButton" type="button" dojoType="dijit.form.Button">Click to focus first widget</button> |
| 75 |
|
| 76 |
<p>that's all folks!</p> |
| 77 |
|
| 78 |
</body> |
| 79 |
</html> |