~lutostag/ubuntu/utopic/maas/1.5.2

« back to all changes in this revision

Viewing changes to src/maasserver/static/jslibs/yui/3.4.1/tests/app/tests/manual/controller.html

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2012-03-15 18:14:08 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20120315181408-zgl94hzo0x4n99an
Tags: 0.1+bzr295+dfsg-0ubuntu2
* debian/patches:
  - 01-fix-database-settings.patch: Update to set PSERV_URL.
  - 02-pserv-config.patch: Set port to 8001.
* debian/maas.postinst: Run maas-import-isos on install.
* debian/control: Depends on rabbitmq-server.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html>
 
2
<html lang="en">
 
3
<head>
 
4
    <meta charset="utf-8">
 
5
    <title>Controller Test</title>
 
6
</head>
 
7
<body>
 
8
 
 
9
<textarea id="log" cols="80" rows="10"></textarea>
 
10
 
 
11
<p>
 
12
<button id="push">pushState</button>
 
13
<a href="http://www.yahoo.com/">Yahoo!</a>
 
14
</p>
 
15
 
 
16
<script src="http://platypus-lan:3000/build/yui/yui.js"></script>
 
17
<script>
 
18
document.getElementById('log').value = '';
 
19
 
 
20
var Y = YUI({filter: 'raw',}).use('controller', 'node', function (Y) {
 
21
    var logEl      = document.getElementById('log'),
 
22
        controller = new Y.Controller();
 
23
 
 
24
    controller.route('/*anything', function (req) {
 
25
        log('route called, path: ' + req.path);
 
26
    });
 
27
 
 
28
    controller.dispatch();
 
29
 
 
30
    function log(message) {
 
31
        logEl.value += message + '\n';
 
32
    }
 
33
 
 
34
    Y.one('#push').on('click', function () {
 
35
        controller.save('/' + Y.Lang.now());
 
36
    });
 
37
});
 
38
</script>
 
39
 
 
40
</body>
 
41
</html>