diff options
author | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-14 15:39:19 +0000 |
---|---|---|
committer | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-14 15:39:19 +0000 |
commit | 1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch) | |
tree | 3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dojo/tests/behavior.html | |
parent | 104d59099e048688c4dbac37d72137006e396558 (diff) | |
download | semanticscuttle-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/dojo/tests/behavior.html')
-rw-r--r-- | includes/js/dojo/tests/behavior.html | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/includes/js/dojo/tests/behavior.html b/includes/js/dojo/tests/behavior.html deleted file mode 100644 index 280fc29..0000000 --- a/includes/js/dojo/tests/behavior.html +++ /dev/null @@ -1,106 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" - "http://www.w3.org/TR/html4/strict.dtd"> -<html> - <head> - <title>Testing dojo.behavior</title> - <style type="text/css"> - @import "../resources/dojo.css"; - </style> - <script type="text/javascript" - src="../dojo.js" djConfig="isDebug: true, popup: true"></script> - <script type="text/javascript"> - dojo.require("doh.runner"); - dojo.require("dojo.behavior"); - - var applyCount = 0; - - var behaviorObj = { - ".bar": function(elem){ - dojo.style(elem, "opacity", 0.5); - applyCount++; - }, - ".foo > span": function(elem){ - elem.style.fontStyle = "italic"; - applyCount++; - } - } - - topicCount = 0; - dojo.subscribe("/foo", function(){ topicCount++; }); - - // no behaviors should be executed when onload fires - dojo.addOnLoad(function(){ - doh.register("t", - [ - function add(t){ - t.f(dojo.behavior._behaviors[".bar"]); - t.f(dojo.behavior._behaviors[".foo > span"]); - dojo.behavior.add(behaviorObj); - // make sure they got plopped in - t.t(dojo.behavior._behaviors[".bar"]); - t.is(1, dojo.behavior._behaviors[".bar"].length); - t.t(dojo.behavior._behaviors[".foo > span"]); - t.is(1, dojo.behavior._behaviors[".foo > span"].length); - }, - function apply(t){ - t.is(0, applyCount); - dojo.behavior.apply(); - t.is(2, applyCount); - - // reapply and make sure we only match once - dojo.behavior.apply(); - t.is(2, applyCount); - }, - function reapply(t){ - t.is(2, applyCount); - // add the rules again - dojo.behavior.add(behaviorObj); - dojo.behavior.apply(); - t.is(4, applyCount); - // dojo.behavior.apply(); - // t.is(4, applyCount); - // dojo.query(".bar").styles("opacity", 1.0); - }, - function topics(t){ - var d = new doh.Deferred(); - t.is(0, topicCount); - dojo.behavior.add({ ".foo": "/foo" }); - dojo.behavior.apply(); - t.is(2, topicCount); - - dojo.behavior.add({ ".foo": { - "onfocus": "/foo" - } - }); - dojo.behavior.apply(); - t.is(2, topicCount); - dojo.byId("blah").focus(); - dojo.byId("blah").blur(); - dojo.byId("blah").focus(); - setTimeout(function(){ - // blur/focus event generation isn't synchronous on IE - try{ - t.is(4, topicCount); - d.callback(true); - }catch(e){ - d.errback(e); - } - }, 10); - return d; - } - ] - ); - doh.run(); - }); - </script> - </head> - <body> - <div class="foo" id="fooOne"> - <span>.foo > span</span> - <div class="bar"> - <span>.foo > .bar > span</span> - </div> - </div> - <input type="text" id="blah" class="foo blah" name="thinger" value="thinger" tabIndex="0"> - </body> -</html> |