aboutsummaryrefslogtreecommitdiff
path: root/includes/js/dijit/tests/ondijitclick.html
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
commit1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch)
tree3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dijit/tests/ondijitclick.html
parent104d59099e048688c4dbac37d72137006e396558 (diff)
downloadsemanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.gz
semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.bz2
Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dijit/tests/ondijitclick.html')
-rw-r--r--includes/js/dijit/tests/ondijitclick.html95
1 files changed, 0 insertions, 95 deletions
diff --git a/includes/js/dijit/tests/ondijitclick.html b/includes/js/dijit/tests/ondijitclick.html
deleted file mode 100644
index 36de0e0..0000000
--- a/includes/js/dijit/tests/ondijitclick.html
+++ /dev/null
@@ -1,95 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
- "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-
- <title>Test Dijit Internal Event: "ondijitclick"</title>
-
- <script type="text/javascript" src="../../dojo/dojo.js" djConfig="isDebug: true, parseOnLoad: true"></script>
- <script type="text/javascript">
- dojo.require("doh.runner");
- dojo.require("dijit._Widget");
- dojo.require("dojo.parser");
-
- dojo.declare("dijit.WidgetWithOndijitclick",
- dijit._Widget,
- {
- clickCount: 0,
- _onClick: function() {
- this.clickCount++;
- },
- postCreate: function() {
- this.connect(this.domNode, "ondijitclick", "_onClick");
- }
- }
- );
-
- dojo.addOnLoad(function(){
- doh.register("ondijitclick",
- [
- {
- name: "ondijitclick fires once on a space-key-up",
- runTest: function(t){
- var w = dijit.byId("widget1");
- if (dojo.isSafari){ // safari has error
- this.name += " * SKIPPED *";
- return;
- }
-
- // simulate space up
- if (document.createEvent){
- var e = document.createEvent("KeyboardEvent");
- e.initKeyEvent("keyup",true,true,null,false,false,false,false,32,0);
- w.domNode.focus();
- w.clickCount = 0;
- w.domNode.dispatchEvent(e);
- t.is(1, w.clickCount);
- }
- }
- },
- {
- name: "ondijitclick fires once on an enter-key-down",
- runTest: function(t){
- var w = dijit.byId("widget1");
- if (dojo.isSafari){ // safari has error
- this.name += " * SKIPPED *";
- return;
- }
-
- // simulate enter down
- if (document.createEvent && !dojo.isSafari){
- var e = document.createEvent("KeyboardEvent");
- e.initKeyEvent("keydown",true,true,null,false,false,false,false,13,0);
- w.domNode.focus();
- w.clickCount = 0;
- w.domNode.dispatchEvent(e);
- t.is(1, w.clickCount);
- }
- }
- },
- {
- name: "ondijitclick fires once on a mouse click",
- runTest: function(t){
- var w = dijit.byId("widget1");
-
- // simulate enter up
- if (document.createEvent){
- var e = document.createEvent("MouseEvents");
- e.initMouseEvent('click', true, true, document.defaultView, 1, 0, 0, 3, 3, false, false, false, false, 0, w.domNode);
- w.clickCount = 0;
- w.domNode.dispatchEvent(e);
- t.is(1, w.clickCount);
- }
- }
- }
- ]
- );
- doh.run();
- });
-
- </script>
-</head>
-<body class="tundra">
- <div id="widget1" dojoType="dijit.WidgetWithOndijitclick"></div>
-</body>
-</html>