summaryrefslogtreecommitdiff
path: root/includes/js/dijit/tests/test_Dialog_focusDestroy.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/dijit/tests/test_Dialog_focusDestroy.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/dijit/tests/test_Dialog_focusDestroy.html')
-rw-r--r--includes/js/dijit/tests/test_Dialog_focusDestroy.html61
1 files changed, 61 insertions, 0 deletions
diff --git a/includes/js/dijit/tests/test_Dialog_focusDestroy.html b/includes/js/dijit/tests/test_Dialog_focusDestroy.html
new file mode 100644
index 0000000..187a5d4
--- /dev/null
+++ b/includes/js/dijit/tests/test_Dialog_focusDestroy.html
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Dialog Widget Dojo Tests</title>
+
+ <style type="text/css">
+ @import "../../dojo/resources/dojo.css";
+ @import "css/dijitTests.css";
+
+ body { font-family : sans-serif; }
+ form { margin-bottom : 0; }
+ table { border: none; }
+ #dialog3_underlay { background-color: #027 }
+ </style>
+
+ <script type="text/javascript"
+ djConfig="parseOnLoad: true, isDebug: true"
+ src="../../dojo/dojo.js"></script>
+ <script type="text/javascript" src="_testCommon.js"></script>
+
+ <script type="text/javascript">
+ dojo.require("dijit.Dialog");
+ dojo.require("dijit.form.Button");
+
+ // make dojo.toJson() print dates correctly (this feels a bit dirty)
+ function createAndShow() {
+ var node = document.createElement("div");
+ dojo.body().appendChild(node);
+ var dlg = new dijit.Dialog({ title: "test input focus" }, node);
+
+ var input = document.createElement("input");
+ dojo.attr(input,"tabIndex","0");
+ dlg.containerNode.appendChild(input);
+
+ var btn = new dijit.form.Button({ label: "Close" });
+ dlg.containerNode.appendChild(btn.domNode);
+
+ dojo.connect(btn, "onClick", function(){
+ console.log("destroying, while visible");
+ dlg.destroy();
+
+ });
+ dlg.show();
+ }
+ </script>
+</head>
+<body>
+<h1 class="testTitle">Dijit layout.Dialog tests</h1>
+
+<p>If you input this box, you can type. You should be able to type and use backspace/etc
+when you destroy the visible dialog. refs <a href="http://trac.dojotoolkit.org/ticket/5351">#5351</a>
+</p>
+
+<input id="testInput" name="foo" value="bar" />
+
+<button dojoType="dijit.form.Button" onclick="createAndShow()">Show Dialog</button>
+
+</body>
+</html>
+