aboutsummaryrefslogtreecommitdiff
path: root/includes/js/dojox/data/tests/ml
diff options
context:
space:
mode:
Diffstat (limited to 'includes/js/dojox/data/tests/ml')
-rw-r--r--includes/js/dojox/data/tests/ml/divList.html14
-rw-r--r--includes/js/dojox/data/tests/ml/orderedList.html16
-rw-r--r--includes/js/dojox/data/tests/ml/table.html46
-rw-r--r--includes/js/dojox/data/tests/ml/test_HtmlStore_declaratively.html172
-rw-r--r--includes/js/dojox/data/tests/ml/test_HtmlStore_remote.html115
-rw-r--r--includes/js/dojox/data/tests/ml/test_HtmlTableStore_declaratively.html120
-rw-r--r--includes/js/dojox/data/tests/ml/unorderedList.html17
7 files changed, 500 insertions, 0 deletions
diff --git a/includes/js/dojox/data/tests/ml/divList.html b/includes/js/dojox/data/tests/ml/divList.html
new file mode 100644
index 0000000..3f0da2f
--- /dev/null
+++ b/includes/js/dojox/data/tests/ml/divList.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <title>HTML Div List for HtmlStore</title>
+ </head>
+ <body>
+ <div id="divExample">
+ <div><b>bold</b></div>
+ <div><i>italic</i></div>
+ <div><i>normal</i></div>
+ </div>
+ </body>
+</html>
diff --git a/includes/js/dojox/data/tests/ml/orderedList.html b/includes/js/dojox/data/tests/ml/orderedList.html
new file mode 100644
index 0000000..e995377
--- /dev/null
+++ b/includes/js/dojox/data/tests/ml/orderedList.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <title>HTML Ordered List for HtmlStore</title>
+ </head>
+ <body>
+ <ol id="olExample">
+ <li>Every</li>
+ <li>Good</li>
+ <li>Boy</li>
+ <li>Does</li>
+ <li>Fine</li>
+ </ol>
+ </body>
+</html>
diff --git a/includes/js/dojox/data/tests/ml/table.html b/includes/js/dojox/data/tests/ml/table.html
new file mode 100644
index 0000000..0c556d0
--- /dev/null
+++ b/includes/js/dojox/data/tests/ml/table.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <title>HTML Ordered List for HtmlStore</title>
+ </head>
+ <body>
+ <!-- The table to link into with the HtmlStore-->
+ <table id="tableExample">
+ <thead>
+ <tr>
+ <th>X</th>
+ <th>Y</th>
+ <th>A</th>
+ <th>B</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr id="test">
+ <td>2</td>
+ <td>3</td>
+ <td></td>
+ <td>8</td>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>3</td>
+ <td>5</td>
+ <td>7</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>9</td>
+ <td>22</td>
+ <td>777</td>
+ </tr>
+ <tr>
+ <td>3231</td>
+ <td>3</td>
+ <td>535</td>
+ <td>747</td>
+ </tr>
+ </tbody>
+ </table>
+ </body>
+</html>
diff --git a/includes/js/dojox/data/tests/ml/test_HtmlStore_declaratively.html b/includes/js/dojox/data/tests/ml/test_HtmlStore_declaratively.html
new file mode 100644
index 0000000..ea36c8a
--- /dev/null
+++ b/includes/js/dojox/data/tests/ml/test_HtmlStore_declaratively.html
@@ -0,0 +1,172 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>Dojox HtmlDataStore Widget</title>
+<style>
+ @import "../../../../dijit/themes/tundra/tundra.css";
+ @import "../../../../dojo/resources/dojo.css";
+ @import "../../../../dijit/tests/css/dijitTests.css";
+</style>
+<script type="text/javascript">
+ djConfig = {
+ isDebug: true,
+ parseOnLoad: true
+ };
+</script>
+<script type="text/javascript" src="../../../../dojo/dojo.js"></script>
+<!--
+<script language="JavaScript" type="text/javascript">
+ dojo.require("doh.runner");
+ function registerTests() {
+ doh.register("t",
+ [
+ function testTableLoaded(t){
+ t.assertTrue(tableStore !== null);
+ t.assertTrue(tableStore !== undefined);
+ }
+ ]
+ );
+ doh.run();
+ };
+ dojo.addOnLoad(registerTests);
+</script>
+-->
+
+<script language="JavaScript" type="text/javascript">
+ dojo.require("dojo.parser");
+ dojo.require("dojox.data.HtmlStore");
+ dojo.require("dijit.Tree");
+ dojo.require("dijit.form.ComboBox");
+
+ function init() {
+ var table = tableStore;
+
+ function testComplete(items, request){
+ console.debug("Completed!");
+
+ var attributes = null;
+ for(var i = 0; i < items.length; i++){
+ attributes = table.getAttributes(items[i]);
+ for(var j=0; j < attributes.length; j++){
+ console.debug("attribute: [" + attributes[j] + "] have value: " + table.getValue(items[i], attributes[j]));
+ }
+ }
+
+ }
+ table.fetch({query:{X:1}, onComplete: testComplete});
+ table.fetch({query:{X:2}, onComplete: testComplete});
+ table.fetch({query:{X:3}, onComplete: testComplete});
+ table.fetch({query:{X:4}, onComplete: testComplete});
+ table.fetch({query:{X:5}, onComplete: testComplete}); // Should be empty
+ }
+ dojo.addOnLoad(init);
+</script>
+
+</head>
+<body class="tundra">
+ <h1>Dojox HtmlDataStore Widget</h1>
+ <hr/>
+ <br/>
+ <br/>
+
+ <!-- Instantiate the HtmlStore and bind it to global name tableStore -->
+ <div dojoType="dojox.data.HtmlStore" dataId="tableExample" jsId="tableStore"></div>
+ <div dojoType="dojox.data.HtmlStore" dataId="ulExample" jsId="ulStore"></div>
+ <div dojoType="dojox.data.HtmlStore" dataId="olExample" jsId="olStore"></div>
+ <div dojoType="dojox.data.HtmlStore" dataId="divExample" jsId="divStore"></div>
+
+ <!-- The table to link into with the HtmlStore-->
+ <table id="tableExample">
+ <thead>
+ <tr>
+ <th>X</th>
+ <th>Y</th>
+ <th>A</th>
+ <th>B</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr id="test">
+ <td>2</td>
+ <td>3</td>
+ <td></td>
+ <td>8</td>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>3</td>
+ <td>5</td>
+ <td>7</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>9</td>
+ <td>22</td>
+ <td>777</td>
+ </tr>
+ <tr>
+ <td>3231</td>
+ <td>3</td>
+ <td>535</td>
+ <td>747</td>
+ </tr>
+ </tbody>
+ </table>
+
+ <br/>
+ <br/>
+ <blockquote>
+ <b>Table Rows: <br/><i>(Just to show that the tree can determine that the tableStore works like a store).<br/>Should have three branches, where the row had attr Y value of 3.</i></b>
+ <div dojoType="dijit.Tree" id="tree" store="tableStore" query="{Y:3}"></div>
+ </blockquote>
+
+ <ul id="ulExample">
+ <li>Red</li>
+ <li>Orange</li>
+ <li>Yellow</li>
+ <li>Green</li>
+ <li>Blue</li>
+ <li>Violet</li>
+ </ul>
+
+ <label for="combo1">Unordered List in ComboBox: </label>
+ <input dojoType="dijit.form.ComboBox" value="Red" class="medium" store="ulStore" searchAttr="name" style="width: 300px;" name="ul.item1" id="combo1" >
+
+ <blockquote>
+ <b>Unordered List in Tree: <br/></b>
+ <div dojoType="dijit.Tree" id="tree2" labelAttr="name" store="ulStore" query="{name:'*'}"></div>
+ </blockquote>
+
+ <ol id="olExample">
+ <li>Every</li>
+ <li>Good</li>
+ <li>Boy</li>
+ <li>Does</li>
+ <li>Fine</li>
+ </ol>
+
+ <label for="combo2">Ordered List in ComboBox: </label>
+ <input dojoType="dijit.form.ComboBox" value="Every" class="medium" store="olStore" searchAttr="name" style="width: 300px;" name="ol.item1" id="combo2" >
+
+ <blockquote>
+ <b>Ordered List in Tree: <br/></b>
+ <div dojoType="dijit.Tree" id="tree3" labelAttr="name" store="olStore" query="{name:'*'}"></div>
+ </blockquote>
+
+
+ <div id="divExample">
+ <div><b>bold</b></div>
+ <div><i>italic</i></div>
+ <div><i>normal</i></div>
+ </div>
+
+ <label for="combo3">Div List in ComboBox: </label>
+ <input dojoType="dijit.form.ComboBox" value="bold" class="medium" store="divStore" searchAttr="name" style="width: 300px;" name="bold" id="combo3" >
+
+ <blockquote>
+ <b>Div list in tree: <br/></b>
+ <div dojoType="dijit.Tree" id="tree4" labelAttr="name" store="divStore" query="{name:'*'}"></div>
+ </blockquote>
+
+</body>
+</html>
diff --git a/includes/js/dojox/data/tests/ml/test_HtmlStore_remote.html b/includes/js/dojox/data/tests/ml/test_HtmlStore_remote.html
new file mode 100644
index 0000000..f9d9eff
--- /dev/null
+++ b/includes/js/dojox/data/tests/ml/test_HtmlStore_remote.html
@@ -0,0 +1,115 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>Dojox HtmlDataStore Widget</title>
+<style>
+ @import "../../../../dijit/themes/tundra/tundra.css";
+ @import "../../../../dojo/resources/dojo.css";
+ @import "../../../../dijit/tests/css/dijitTests.css";
+</style>
+<script type="text/javascript">
+ djConfig = {
+ isDebug: true,
+ parseOnLoad: true
+ };
+</script>
+<script type="text/javascript" src="../../../../dojo/dojo.js"></script>
+<!--
+<script language="JavaScript" type="text/javascript">
+ dojo.require("doh.runner");
+ function registerTests() {
+ doh.register("t",
+ [
+ function testTableLoaded(t){
+ t.assertTrue(tableStore !== null);
+ t.assertTrue(tableStore !== undefined);
+ }
+ ]
+ );
+ doh.run();
+ };
+ dojo.addOnLoad(registerTests);
+</script>
+-->
+
+<script language="JavaScript" type="text/javascript">
+ dojo.require("dojo.parser");
+ dojo.require("dojox.data.HtmlStore");
+ dojo.require("dijit.Tree");
+ dojo.require("dijit.form.ComboBox");
+
+ function init() {
+ var table = tableStore;
+
+ function testComplete(items, request){
+ console.debug("Completed!");
+
+ var attributes = null;
+ for(var i = 0; i < items.length; i++){
+ attributes = table.getAttributes(items[i]);
+ for(var j=0; j < attributes.length; j++){
+ console.debug("attribute: [" + attributes[j] + "] have value: " + table.getValue(items[i], attributes[j]));
+ }
+ }
+
+ }
+ table.fetch({query:{X:1}, onComplete: testComplete});
+ table.fetch({query:{X:2}, onComplete: testComplete});
+ table.fetch({query:{X:3}, onComplete: testComplete});
+ table.fetch({query:{X:4}, onComplete: testComplete});
+ table.fetch({query:{X:5}, onComplete: testComplete}); // Should be empty
+ }
+ dojo.addOnLoad(init);
+</script>
+
+</head>
+<body class="tundra">
+ <h1>Dojox HtmlDataStore Widget</h1>
+ <hr/>
+ <br/>
+ <br/>
+
+ <!-- Instantiate the HtmlStore and bind it to global name tableStore -->
+ <div dojoType="dojox.data.HtmlStore" url="table.html" dataId="tableExample" jsId="tableStore"></div>
+ <div dojoType="dojox.data.HtmlStore" url="unorderedList.html" dataId="ulExample" jsId="ulStore"></div>
+ <div dojoType="dojox.data.HtmlStore" url="orderedList.html" dataId="olExample" jsId="olStore"></div>
+ <div dojoType="dojox.data.HtmlStore" url="divList.html" dataId="divExample" jsId="divStore"></div>
+
+ <blockquote>
+ <b>Table Rows: <br/><i>(Just to show that the tree can determine that the tableStore works like a store).<br/>Should have three branches, where the row had attr Y value of 3.</i></b>
+ <div dojoType="dijit.Tree" id="tree" store="tableStore" query="{Y:3}"></div>
+ </blockquote>
+
+ <label for="combo1">Unordered List in ComboBox: </label>
+ <input dojoType="dijit.form.ComboBox" value="Red" class="medium" store="ulStore" searchAttr="name" style="width: 300px;" name="ul.item1" id="combo1" >
+
+ <blockquote>
+ <b>Unordered List in Tree: <br/></b>
+ <div dojoType="dijit.Tree" id="tree2" labelAttr="name" store="ulStore" query="{name:'*'}"></div>
+ </blockquote>
+
+ <label for="combo2">Ordered List in ComboBox: </label>
+ <input dojoType="dijit.form.ComboBox" value="Every" class="medium" store="olStore" searchAttr="name" style="width: 300px;" name="ol.item1" id="combo2" >
+
+ <blockquote>
+ <b>Ordered List in Tree: <br/></b>
+ <div dojoType="dijit.Tree" id="tree3" labelAttr="name" store="olStore" query="{name:'*'}"></div>
+ </blockquote>
+
+
+ <div id="divExample">
+ <div><b>bold</b></div>
+ <div><i>italic</i></div>
+ <div><i>normal</i></div>
+ </div>
+
+ <label for="combo3">Div List in ComboBox: </label>
+ <input dojoType="dijit.form.ComboBox" value="bold" class="medium" store="divStore" searchAttr="name" style="width: 300px;" name="bold" id="combo3" >
+
+ <blockquote>
+ <b>Div list in tree: <br/></b>
+ <div dojoType="dijit.Tree" id="tree4" labelAttr="name" store="divStore" query="{name:'*'}"></div>
+ </blockquote>
+
+</body>
+</html>
diff --git a/includes/js/dojox/data/tests/ml/test_HtmlTableStore_declaratively.html b/includes/js/dojox/data/tests/ml/test_HtmlTableStore_declaratively.html
new file mode 100644
index 0000000..f69ba68
--- /dev/null
+++ b/includes/js/dojox/data/tests/ml/test_HtmlTableStore_declaratively.html
@@ -0,0 +1,120 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>Dojox HtmlDataStore Widget</title>
+<style>
+ @import "../../../../dijit/themes/tundra/tundra.css";
+ @import "../../../../dojo/resources/dojo.css";
+ @import "../../../../dijit/tests/css/dijitTests.css";
+</style>
+<script type="text/javascript">
+ djConfig = {
+ isDebug: true,
+ parseOnLoad: true
+ };
+</script>
+<script type="text/javascript" src="../../../../dojo/dojo.js"></script>
+<!--
+<script language="JavaScript" type="text/javascript">
+ dojo.require("doh.runner");
+ function registerTests() {
+ doh.register("t",
+ [
+ function testTableLoaded(t){
+ t.assertTrue(tableStore !== null);
+ t.assertTrue(tableStore !== undefined);
+ }
+ ]
+ );
+ doh.run();
+ };
+ dojo.addOnLoad(registerTests);
+</script>
+-->
+
+<script language="JavaScript" type="text/javascript">
+ dojo.require("dojo.parser");
+ dojo.require("dojox.data.HtmlTableStore");
+ dojo.require("dijit.Tree");
+
+ function init() {
+ var table = tableStore;
+
+ function testComplete(items, request){
+ console.debug("Completed!");
+
+ var attributes = null;
+ for(var i = 0; i < items.length; i++){
+ attributes = table.getAttributes(items[i]);
+ for(var j=0; j < attributes.length; j++){
+ console.debug("attribute: [" + attributes[j] + "] have value: " + table.getValue(items[i], attributes[j]));
+ }
+ }
+
+ }
+ table.fetch({query:{X:1}, onComplete: testComplete});
+ table.fetch({query:{X:2}, onComplete: testComplete});
+ table.fetch({query:{X:3}, onComplete: testComplete});
+ table.fetch({query:{X:4}, onComplete: testComplete});
+ table.fetch({query:{X:5}, onComplete: testComplete}); // Should be empty
+ }
+ dojo.addOnLoad(init);
+</script>
+
+</head>
+<body class="tundra">
+ <h1>Dojox HtmlDataStore Widget</h1>
+ <hr/>
+ <br/>
+ <br/>
+
+ <!-- Instantiate the HtmlTableStore and bind it to global name tableStore -->
+ <div dojoType="dojox.data.HtmlTableStore" tableId="tableExample" jsId="tableStore"></div>
+
+ <!-- The table to link into with the HtmlTableStore-->
+ <table id="tableExample">
+ <thead>
+ <tr>
+ <th>X</th>
+ <th>Y</th>
+ <th>A</th>
+ <th>B</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr id="test">
+ <td>2</td>
+ <td>3</td>
+ <td></td>
+ <td>8</td>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>3</td>
+ <td>5</td>
+ <td>7</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>9</td>
+ <td>22</td>
+ <td>777</td>
+ </tr>
+ <tr>
+ <td>3231</td>
+ <td>3</td>
+ <td>535</td>
+ <td>747</td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <br/>
+ <br/>
+ <blockquote>
+ <b>Table Rows: <br/><i>(Just to show that the tree can determine that the tableStore works like a store).<br/>Should have three branches, where the row had attr Y value of 3.</i></b>
+ <div dojoType="dijit.Tree" id="tree" store="tableStore" query="{Y:3}" label="Test tree"></div>
+ </blockquote>
+</body>
+</html>
diff --git a/includes/js/dojox/data/tests/ml/unorderedList.html b/includes/js/dojox/data/tests/ml/unorderedList.html
new file mode 100644
index 0000000..a19149a
--- /dev/null
+++ b/includes/js/dojox/data/tests/ml/unorderedList.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <title>HTML Unorderd List for HtmlStore</title>
+ </head>
+ <body>
+ <ul id="ulExample">
+ <li>Red</li>
+ <li>Orange</li>
+ <li>Yellow</li>
+ <li>Green</li>
+ <li>Blue</li>
+ <li>Violet</li>
+ </ul>
+ </body>
+</html>