Last change
on this file since 256 was
256,
checked in by hendrikvanantwerpen, 13 years ago
|
Reworked project structure based on REST interaction and Dojo library. As
soon as this is stable, the old jQueryUI branch can be removed (it's
kept for reference).
|
File size:
926 bytes
|
Line | |
---|
1 | <html> |
---|
2 | <head> |
---|
3 | <script src="../../../dojo/dojo.js" djConfig="parseOnLoad: true"></script> |
---|
4 | <script> |
---|
5 | dojo.require("dojo.io.script") |
---|
6 | dojo.require("dojox.rpc.Service"); |
---|
7 | dojo.require("dijit._Widget"); |
---|
8 | dojo.require("dojox.dtl._Templated"); |
---|
9 | dojo.require("dojo.parser"); |
---|
10 | |
---|
11 | dojo.declare("API", [dijit._Widget, dojox.dtl._Templated], { |
---|
12 | constructor: function(params, node){ |
---|
13 | this.jsonp = new dojox.rpc.Service(dojo.moduleUrl("dojox.rpc", "SMDLibrary/dojo-api.smd")); |
---|
14 | }, |
---|
15 | onSearch: function(e){ |
---|
16 | if(e.keyCode == dojo.keys.ENTER){ |
---|
17 | this.jsonp.get({ |
---|
18 | name: e.target.value |
---|
19 | }).addCallback(this, function(results){ |
---|
20 | console.debug(results); |
---|
21 | this.results = results; |
---|
22 | this.render(); |
---|
23 | }); |
---|
24 | } |
---|
25 | }, |
---|
26 | templateString: dojo.cache("dojox.rpc.demos.templates", "documentation.html") |
---|
27 | }); |
---|
28 | </script> |
---|
29 | </head> |
---|
30 | <body> |
---|
31 | <div dojoType="API"></div> |
---|
32 | </body> |
---|
33 | </html> |
---|
Note: See
TracBrowser
for help on using the repository browser.