diff options
author | Derrell Lipman <derrell@samba.org> | 2006-12-31 20:12:12 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:35:23 -0500 |
commit | d1e09e2e6f9db62bbab84abb53e23ee73764178a (patch) | |
tree | 18e57f756611c9d3e10fb41bf7c09eeb795028dd /swat.obsolete/apps/qooxdoo-examples/test/Fields_1.html | |
parent | 710dfce70ca9024d2f026518638bb193e914f4a0 (diff) | |
download | samba-d1e09e2e6f9db62bbab84abb53e23ee73764178a.tar.gz samba-d1e09e2e6f9db62bbab84abb53e23ee73764178a.tar.bz2 samba-d1e09e2e6f9db62bbab84abb53e23ee73764178a.zip |
r20446: rename swat directory to swat.obsolete; keeping it around since there is lots of useful info in it.
(This used to be commit 5f9f72a9cfab80561b23284001b67c4ea961757b)
Diffstat (limited to 'swat.obsolete/apps/qooxdoo-examples/test/Fields_1.html')
-rw-r--r-- | swat.obsolete/apps/qooxdoo-examples/test/Fields_1.html | 179 |
1 files changed, 179 insertions, 0 deletions
diff --git a/swat.obsolete/apps/qooxdoo-examples/test/Fields_1.html b/swat.obsolete/apps/qooxdoo-examples/test/Fields_1.html new file mode 100644 index 0000000000..997e1b0443 --- /dev/null +++ b/swat.obsolete/apps/qooxdoo-examples/test/Fields_1.html @@ -0,0 +1,179 @@ +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <title>qooxdoo » Demo</title> + <link type="text/css" rel="stylesheet" href="../../resource/css/layout.css"/> + <!--[if IE]> + <link type="text/css" rel="stylesheet" href="../../resource/css/layout_ie.css"/> + <![endif]--> + <script type="text/javascript" src="../../script/qx.js"></script> +</head> +<body> + <script type="text/javascript" src="../../script/layout.js"></script> + + <div id="demoDescription"> + <p>Test the setting of background color of form fields.</p> + </div> + + <script type="text/javascript"> + function changeBackgrounds(parent, color) + { + var children = parent.getChildren(); + var child; + + for (var i=0; i<children.length; i++) + { + child = children[i]; + + switch(child.classname) + { + case 'qx.ui.form.TextArea': + case 'qx.ui.form.TextField': + case 'qx.ui.form.ComboBox': + case 'qx.ui.form.PasswordField': + child.setBackgroundColor(color); + break; + }; + }; + }; + + qx.core.Init.getInstance().defineMain(function() + { + var d = qx.ui.core.ClientDocument.getInstance(); + + function textChange(e) { + this.debug("Text changed: " + e.getData()); + } + + var t1 = new qx.ui.form.TextField; + t1.setValue("textfield"); + t1.setTop(48); + t1.setLeft(20); + + t1.addEventListener("changeText", textChange); + t1.addEventListener("input", function(e) { + this.debug("Input: " + e.getData()); + }); + + d.add(t1); + + + + + var t2 = new qx.ui.form.PasswordField; + t2.setValue("passwordfield"); + t2.setTop(80); + t2.setLeft(20); + + t2.addEventListener("changeText", textChange); + + d.add(t2); + + + var t3 = new qx.ui.form.TextArea; + t3.setValue("textarea"); + t3.setTop(110); + t3.setLeft(20); + t3.setWidth(300); + t3.setHeight(60); + + t3.addEventListener("changeText", textChange); + + d.add(t3); + + + var t4 = new qx.ui.form.TextField; + t4.setValue("textfield"); + t4.setTop(200); + t4.setLeft(20); + t4.setWidth(200); + t4.setMaxLength(100); + t4.setReadOnly(true); + + t4.addEventListener("changeText", textChange); + + d.add(t4); + + + var t5 = new qx.ui.form.TextField; + t5.setValue("You are foo!"); + t5.setTop(240); + t5.setLeft(20); + + t5.addEventListener("changeText", textChange); + + d.add(t5); + + var c1 = new qx.ui.form.ComboBox; + c1.setTop(280); + c1.setLeft(20); + + c1.addEventListener("beforeInitialOpen", function(e) + { + var item; + + for(var i=1; i<=30; i++) + { + item = new qx.ui.form.ListItem("Item No " + i); + !(i % 10) && (item.setEnabled(false)); + c1.add(item); + }; + }); + + // this does not work here (if there is no content) + c1.setSelected(c1.getList().getFirstChild()); + + c1.addEventListener("changeValue", function(e) { + this.debug("New value: " + e.getData()); + }); + + c1.addEventListener("changeSelected", function(e) { + this.debug("New selected: " + e.getData()); + }); + + + + + var b1 = new qx.ui.form.CheckBox("Editable"); + + b1.set({ top: 282, left: 150 }); + + b1.addEventListener("changeChecked", function(e) { + c1.setEditable(e.getData()); + }); + + + var b2 = new qx.ui.form.Button("red", "icon/16/colors.png"); b2.set({left:10,top:10}); + var b3 = new qx.ui.form.Button("green", "icon/16/colors.png"); b3.set({left:10,top:40}); + var b4 = new qx.ui.form.Button("white", "icon/16/colors.png"); b4.set({left:10,top:70}); + + b2.addEventListener("click", function(e) { changeBackgrounds(d,this.getLabel()); }); + b3.addEventListener("click", function(e) { changeBackgrounds(d,this.getLabel()); }); + b4.addEventListener("click", function(e) { changeBackgrounds(d,this.getLabel()); }); + + var fs = new qx.ui.groupbox.GroupBox("BackgroundColor"); + fs.set({left:400,top:50,width:150,height:"auto"}); + fs.add(b2,b3,b4); + + + + d.add(c1, b1, fs); + + + + + + + + + // Color Themes + qx.manager.object.ColorManager.getInstance().createThemeList(d, 20, 320); + + + + + + }); + </script> +</body> +</html>
\ No newline at end of file |