aboutsummaryrefslogtreecommitdiff
path: root/includes/js/dojox/rpc/demos
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/dojox/rpc/demos
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/dojox/rpc/demos')
-rw-r--r--includes/js/dojox/rpc/demos/demo_JsonRestStore_CouchDB.html125
-rw-r--r--includes/js/dojox/rpc/demos/demo_JsonRestStore_Persevere.html65
-rw-r--r--includes/js/dojox/rpc/demos/documentation.html33
-rw-r--r--includes/js/dojox/rpc/demos/templates/documentation.html8
-rw-r--r--includes/js/dojox/rpc/demos/templates/yahoo.html31
-rw-r--r--includes/js/dojox/rpc/demos/yahoo.html39
6 files changed, 0 insertions, 301 deletions
diff --git a/includes/js/dojox/rpc/demos/demo_JsonRestStore_CouchDB.html b/includes/js/dojox/rpc/demos/demo_JsonRestStore_CouchDB.html
deleted file mode 100644
index f5fc26c..0000000
--- a/includes/js/dojox/rpc/demos/demo_JsonRestStore_CouchDB.html
+++ /dev/null
@@ -1,125 +0,0 @@
-<!--
-
- This file is a demo of the JsonRestStore connected to CouchDB.
-
--->
-
-<html>
-
-<head>
-
- <title>Demo of JsonRestStore</title>
-
- <style type="text/css">
-
-
-
- @import "../../../dijit/themes/tundra/tundra.css";
-
- @import "../../../dojo/resources/dojo.css";
-
- </style>
-
-
-
- <script type="text/javascript" src="../../../dojo/dojo.js" djConfig="isDebug: true, parseOnLoad: true"></script>
-
- <script type="text/javascript">
-
- dojo.require("dojox.rpc.Service");
- dojo.require("dojox.data.CouchDBRestStore");
- function init(){
- var couchSMD = dojox.data.CouchDBRestStore.generateSMD("/couchDB/");
- var couchServices = new dojox.rpc.Service(couchSMD); // just connect to the auto-generated SMD from persevere
- friendStore = new dojox.data.CouchDBRestStore({service:couchServices.friends}); // and create a store for it
- }
-
- dojo.addOnLoad(init);
-
- function invokeSearch() {
- friendStore.fetch({count:3,onComplete:function(friends) {
- var firstFriend = friendStore.getValue(friends.rows,0);
- var name = friendStore.getValue(firstFriend,"name");
- alert("old name " + name);
- friendStore.setValue(firstFriend,"name","new name" + Math.random());
- var newItem = {"name":"Another friend",age:31};
- friendStore.newItem(newItem);
- friendStore.onSave= function() {
- delete friendStore.onSave;
- friendStore.setValue(newItem,"name","change after creating");
- friendStore.save();
- }
- friendStore.save();
-
- }});
-
- }
-
- </script>
-
-</head>
-
-
-
-<body class="tundra">
-
- <h1>
-
- DEMO: JsonRestStore Search
-
- </h1>
-
- <hr>
-
- <h3>
-
- Description:
-
- </h3>
-
- <p>
-
- This simple demo shows how JsonRestStore can be used with Persevere.
-
- </p>
-
- <p>
-
- </p>
-
-
-
- <blockquote>
-
-
-
- <!--
-
- The store instance used by this demo.
-
- -->
-
- <table>
-
- <tbody>
-
- <tr>
-
- <td>
-
- <button name="search" id="searchButton" onclick="invokeSearch()">Search</button>
-
- </td>
-
- </tr>
-
- </tbody>
-
- </table>
-
- <hr/>
-
-</body>
-
-</html>
-
diff --git a/includes/js/dojox/rpc/demos/demo_JsonRestStore_Persevere.html b/includes/js/dojox/rpc/demos/demo_JsonRestStore_Persevere.html
deleted file mode 100644
index 40c6bac..0000000
--- a/includes/js/dojox/rpc/demos/demo_JsonRestStore_Persevere.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<!--
-This file is a demo of the JsonRestStore connected to Persevere
--->
-<html>
-<head>
- <title>Demo of JsonRestStore</title>
- <style type="text/css">
-
- @import "../../../dijit/themes/tundra/tundra.css";
- @import "../../../dojo/resources/dojo.css";
- </style>
-
- <script type="text/javascript" src="../../../dojo/dojo.js" djConfig="isDebug: true, parseOnLoad: true"></script>
- <script type="text/javascript">
- dojo.require("dojox.rpc.Service");
- dojo.require("dojox.data.JsonRestStore");
-
- function init(){
- var persevereServices = new dojox.rpc.Service("/persevere/SMD"); // just connect to the auto-generated SMD from persevere
- dynaStore = new dojox.data.JsonRestStore({service:persevereServices.dyna}); // and create a store for it
-
- }
- dojo.addOnLoad(init);
- function invokeSearch() {
- dynaStore.fetch({query:"0",onComplete:function(root) {
- var name = dynaStore.getValue(root,"name");
- alert("old name " + name);
- dynaStore.setValue(root,"name","new name" + Math.random());
- dynaStore.save();
- }});
- }
- </script>
-</head>
-
-<body class="tundra">
- <h1>
- DEMO: JsonRestStore Search
- </h1>
- <hr>
- <h3>
- Description:
- </h3>
- <p>
- This simple demo shows how JsonRestStore can be used with Persevere.
- </p>
- <p>
- </p>
-
- <blockquote>
-
- <!--
- The store instance used by this demo.
- -->
- <table>
- <tbody>
- <tr>
- <td>
- <button name="search" id="searchButton" onclick="invokeSearch()">Search</button>
- </td>
- </tr>
- </tbody>
- </table>
- <hr/>
-</body>
-</html>
diff --git a/includes/js/dojox/rpc/demos/documentation.html b/includes/js/dojox/rpc/demos/documentation.html
deleted file mode 100644
index 4c28103..0000000
--- a/includes/js/dojox/rpc/demos/documentation.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<html>
- <head>
- <script src="../../../dojo/dojo.js" djConfig="parseOnLoad: true"></script>
- <script>
- dojo.require("dojo.io.script")
- dojo.require("dojox.rpc.Service");
- dojo.require("dijit._Widget");
- dojo.require("dojox.dtl._Templated");
- dojo.require("dojo.parser");
-
- dojo.declare("API", [dijit._Widget, dojox.dtl._Templated], {
- constructor: function(params, node){
- this.jsonp = new dojox.rpc.Service(dojo.moduleUrl("dojox.rpc", "documentation.smd"));
- },
- onSearch: function(e){
- if(e.keyCode == dojo.keys.ENTER){
- this.jsonp.get({
- name: e.target.value
- }).addCallback(this, function(results){
- console.debug(results);
- this.results = results;
- this.render();
- });
- }
- },
- templatePath: dojo.moduleUrl("dojox.rpc.demos.templates", "documentation.html")
- });
- </script>
- </head>
- <body>
- <div dojoType="API"></div>
- </body>
-</html> \ No newline at end of file
diff --git a/includes/js/dojox/rpc/demos/templates/documentation.html b/includes/js/dojox/rpc/demos/templates/documentation.html
deleted file mode 100644
index d14cf16..0000000
--- a/includes/js/dojox/rpc/demos/templates/documentation.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<div>
- <input dojotAttachPoint="search" dojoAttachEvent="onkeyup: onSearch">
- <ul>
- {% for result in results %}
- <li>{% if result.type %}<i>{{ result.type }}</i> {% endif %}{% ifequal result.type "Function" %}{% if not result.resources %}function {% endif %}{% endifequal %}{{ result.name }}{% ifequal result.type "Function" %}{% if not result.resources %}({% for parameter in result.parameters %}{% if not forloop.first %}, {% endif %}{% if parameter.types %}<i>{% for type in parameter.types %}{% if not forloop.first %}|{% endif %}{{ type.title }}{% endfor %}{% if parameter.optional %}?{% endif %}{% if parameter.repeating %}...{% endif %}</i> {% endif %}{{ parameter.name }}{% endfor %}{% endif %}{% endifequal %}{% ifequal result.type "Function" %}{% if not result.resources %}){% endif %}{% endifequal %}</li>
- {% endfor %}
- </ul>
-</div> \ No newline at end of file
diff --git a/includes/js/dojox/rpc/demos/templates/yahoo.html b/includes/js/dojox/rpc/demos/templates/yahoo.html
deleted file mode 100644
index 04339d2..0000000
--- a/includes/js/dojox/rpc/demos/templates/yahoo.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<div>
- <input dojotAttachPoint="search" dojoAttachEvent="onkeyup: onSearch">
- <ul>
- {% for result in results.Result %}
- <li><a href="{{ result.Url }}">{{ result.Title }}</a><br/>{{ result.Summary }}</li>
- {% endfor %}
- </ul>
- <table>
- {% if results.firstResultPosition %}
- <tr>
- <th align="left">First Result</th>
- <td>{{ results.firstResultPosition }}</td>
- </tr>
- {% endif %}{% if results.totalResultsAvailable %}
- <tr>
- <th align="left">Total Results Available</th>
- <td>{{ results.totalResultsAvailable }}</td>
- </tr>
- {% endif %}{% if results.totalResultsReturned %}
- <tr>
- <th align="left">Results Returned</th>
- <td>{{ results.totalResultsReturned }}</td>
- </tr>
- {% endif %}{% if results.type %}
- <tr>
- <th align="left">Type</th>
- <td>{{ results.type }}</td>
- </tr>
- {% endif %}
- </table>
-</div>
diff --git a/includes/js/dojox/rpc/demos/yahoo.html b/includes/js/dojox/rpc/demos/yahoo.html
deleted file mode 100644
index 39cee00..0000000
--- a/includes/js/dojox/rpc/demos/yahoo.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<html>
- <head>
- <title>
- Yahoo Search Demo
- </title>
- <script src="../../../dojo/dojo.js" type="text/javascript"
- djConfig="parseOnLoad: true, isDebug: true"></script>
- <script type="text/javascript">
- dojo.require("dojo.io.script")
- dojo.require("dojox.rpc.Service");
- dojo.require("dijit._Widget");
- dojo.require("dojox.dtl._Templated");
- dojo.require("dojo.parser");
-
- dojo.declare("YahooWebSearchApiWidget", [dijit._Widget, dojox.dtl._Templated], {
- constructor: function(params, node){
- var mu = dojo.moduleUrl("dojox.rpc.SMDLibrary", "yahoo.smd");
- this.yahoo = new dojox.rpc.Service(mu);
- },
- onSearch: function(e){
- if(e.keyCode == dojo.keys.ENTER){
- this.yahoo.webSearch({
- query: e.target.value
- }).addCallback(this, function(results){
- console.debug(results.ResultSet);
- this.results = results.ResultSet;
- this.render();
- });
- }
- },
- templatePath: dojo.moduleUrl("dojox.rpc.demos.templates", "yahoo.html")
- });
- </script>
- </head>
- <body>
- <h1>Yahoo Web Search</h1>
- <div dojoType="YahooWebSearchApiWidget"></div>
- </body>
-</html>