aboutsummaryrefslogtreecommitdiff
path: root/includes/js/dojo/tests/dnd/test_form.html
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-13 09:49:11 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-13 09:49:11 +0000
commite44a7e37b6c7b5961adaffc62b9042b8d442938e (patch)
tree95b67c356e93163467db2451f2b8cce84ed5d582 /includes/js/dojo/tests/dnd/test_form.html
parenta62b9742ee5e28bcec6872d88f50f25b820914f6 (diff)
downloadsemanticscuttle-e44a7e37b6c7b5961adaffc62b9042b8d442938e.tar.gz
semanticscuttle-e44a7e37b6c7b5961adaffc62b9042b8d442938e.tar.bz2
New feature: basic Ajax suggestion for tags and implementation of Dojo toolkit
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@151 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojo/tests/dnd/test_form.html')
-rw-r--r--includes/js/dojo/tests/dnd/test_form.html103
1 files changed, 103 insertions, 0 deletions
diff --git a/includes/js/dojo/tests/dnd/test_form.html b/includes/js/dojo/tests/dnd/test_form.html
new file mode 100644
index 0000000..cac46c0
--- /dev/null
+++ b/includes/js/dojo/tests/dnd/test_form.html
@@ -0,0 +1,103 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Dojo DnD form test</title>
+ <style type="text/css">
+ @import "../../resources/dojo.css";
+ @import "../../resources/dnd.css";
+ @import "dndDefault.css";
+
+ body {
+ padding: 1em;
+ background:#ededed;
+ }
+
+ #container1,#container2 { width:300px; display:block; }
+ .clear { clear:both; }
+
+ </style>
+
+ <script type="text/javascript" src="../../dojo.js" djConfig="isDebug: true, parseOnLoad: true"></script>
+
+ <script type="text/javascript" src="../../dnd/Container.js"></script>
+ <script type="text/javascript" src="../../dnd/Selector.js"></script>
+ <script type="text/javascript" src="../../dnd/Source.js"></script>
+ <script type="text/javascript" src="../../dnd/Avatar.js"></script>
+ <script type="text/javascript" src="../../dnd/Manager.js"></script>
+
+ <script type="text/javascript">
+ dojo.require("dojo.parser");
+ //dojo.require("dojo.dnd.Source");
+ //dojo.require("dojo.dnd.Manager");
+
+ var c1, c2;
+
+ function init(){
+
+ c1 = new dojo.dnd.Source("container1");
+ c1.insertNodes(false, [1, 2, 3, 4, 5, 6, [1, 2, 3], function(x){ return x + x; }]);
+ c2 = new dojo.dnd.Target("container2", {accept: ["money"]});
+
+ // example subscribe to events
+ dojo.subscribe("/dnd/start",function(foo){
+ console.debug(foo);
+ });
+
+ };
+ dojo.addOnLoad(init);
+ </script>
+</head>
+<body>
+ <h1 class="testTitle">Dojo DnD form test</h1>
+
+ <p>This is a test to confirm that the DnD container does not interfere with form elements.</p>
+
+ <div id="dragLists">
+
+ <div style="float:left; margin:5px; ">
+ <h3>Target 1</h3>
+ <p id="container1" class="container"></p>
+ </div>
+
+ <div style="float:left; margin:5px; ">
+ <h3>Target 2: form controls galore</h3>
+ <form id="container2" class="container" action="http://dojotoolkit.org">
+ Input text: <input type="text" /><br />
+ Input checkbox: <input type="checkbox" /><br />
+ Input radio: <input type="radio" /><br />
+ Input password: <input type="password" /><br />
+ Input file: <input type="file" /><br />
+ Input button: <input type="button" value="Button" /><br />
+ Input reset: <input type="reset" /><br />
+ Input submit: <input type="submit" /><br />
+ Input image: <input type="image" src="http://dojotoolkit.org/misc/feed.png" /><br />
+ Button: <button>Button</button><br />
+ Select: <select><option>Yes</option><option>No</option></select><br />
+ Textarea: <textarea cols="20" rows="3">Some text.</textarea>
+ </form>
+ </div>
+ <div class="clear"></div>
+ </div>
+
+ <p>&nbsp;</p>
+
+ <div dojoType="dojo.dnd.Source" class="container">
+ <div>Source with <strong>skipForm = false</strong> (by default)</div>
+ <div class="dojoDndItem">Item <strong>X</strong>: <input type="text" value="1" /></div>
+ <div class="dojoDndItem">Item <strong>Y</strong>: <input type="text" value="2" /></div>
+ <div class="dojoDndItem">Item <strong>Z</strong>: <input type="text" value="3" /></div>
+ </div>
+
+ <p>&nbsp;</p>
+
+ <div dojoType="dojo.dnd.Source" class="container" skipForm="true">
+ <div>Source with <strong>skipForm = true</strong></div>
+ <div class="dojoDndItem">Item <strong>A</strong>: <input type="text" value="a" /></div>
+ <div class="dojoDndItem">Item <strong>B</strong>: <input type="text" value="b" /></div>
+ <div class="dojoDndItem">Item <strong>C</strong>: <input type="text" value="c" /></div>
+ </div>
+
+ <p>HTML after</p>
+
+</body>
+</html>