aboutsummaryrefslogtreecommitdiff
path: root/includes/js/dojox/sketch/tests/test_full.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/dojox/sketch/tests/test_full.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/dojox/sketch/tests/test_full.html')
-rw-r--r--includes/js/dojox/sketch/tests/test_full.html66
1 files changed, 66 insertions, 0 deletions
diff --git a/includes/js/dojox/sketch/tests/test_full.html b/includes/js/dojox/sketch/tests/test_full.html
new file mode 100644
index 0000000..b78c232
--- /dev/null
+++ b/includes/js/dojox/sketch/tests/test_full.html
@@ -0,0 +1,66 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+ <title>Annotator/Figure Testing</title>
+<style type="text/css">
+@import "../../../dojo/resources/dojo.css";
+@Import "../../../dijit/themes/tundra/tundra.css";
+</style>
+ <link href="../resources/sketch.css" type="text/css" rel="stylesheet"/>
+ <style type="text/css">
+ body {
+ background:#fff url("images/testsBodyBg.gif") repeat-x top left;
+ padding:1em 3em;
+ }
+ table { margin:0; width:100%;}
+ table tr td { padding:0; }
+ table tr td table { border:0; width:auto;}
+
+ #container{ width:600px; }
+ #toolbar{ width:100%; }
+ #canvas{ width:600px; height:600px; background-color:#fff;border:1px solid #ccc; overflow:auto;position:relative;}
+ </style>
+ <script>var djConfig={ isDebug: false };</script>
+ <script src="../../../dojo/dojo.js"></script>
+ <script src="../Toolbar.js"></script>
+ <script>
+ dojo.require("dojox.sketch");
+ dojo.require("dojox.sketch.Slider");
+ dojo.require("dojox.sketch.LeadAnnotation");
+ dojo.require("dojox.sketch.UnderlineAnnotation");
+ dojo.require("dojox.sketch.SingleArrowAnnotation");
+ dojo.require("dojox.sketch.DoubleArrowAnnotation");
+ dojo.require("dojox.sketch.PreexistingAnnotation");
+ var f, a, t;
+ function init(){
+ var ta=dojox.sketch;
+ f=new ta.Figure();
+ dojo.connect(f, "_mu", function(){ dojo.byId("output").value=f.serialize(); });
+
+ t=ta.makeToolbar(dojo.byId("toolbar"), f);
+
+ // test loading from an SVG file
+ dojo.xhrGet({
+ url:"annotation.svg",
+ preventCache:true,
+ load:function(data, ioArgs){
+ f.load(dojox.xml.DomParser.parse(data), dojo.byId("canvas"));
+ dojo.byId("output").value=f.serialize();
+ }
+ });
+ }
+ dojo.addOnLoad(init);
+ </script>
+ </head>
+ <body class="tundra">
+ <h1>Annotator/Figure Testing Platform</h1>
+ <p>This is a generic test to create a figure from an existing SVG file, to edit that figure, and to test the undo stack. Double click a shape to set new text for it.</p>
+ <div id="container">
+ <div id="toolbar"></div>
+ <div id="canvas"></div>
+ </div>
+ <h2>Serialized output</h2>
+ <textarea id="output" style="width:100%;height:180px;overflow:auto;font-size:0.8em;"></textarea>
+ </body>
+</html>