Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 180 lines (146 sloc) 4.91 kb
eb40ef8 Bill Initial noodling baby steps
add0n authored
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
3 <!-- ================================================================= -->
4 <!--
5 NAME: index.html
6 AUTH: William J Edney (wje)
7 NOTE: Copyright (C) 2012 Yahoo! Inc.
8 -->
9 <!-- ================================================================= -->
10
11 <html>
12 <head>
13
14 <title>A Mojito / YAF integration test project</title>
15
16 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
17
18 <style type="text/css">
19 #Message
20 {
21 position: absolute;
22 border: solid 1px black;
23
24 left: 10%;
25 right: 10%;
26 bottom: 0px;
27
28 height: 2em;
29 }
a58940d Bill Added border so that mojit views are easier to see
add0n authored
30 .mojit
31 {
32 border: solid 1px black;
33 }
eb40ef8 Bill Initial noodling baby steps
add0n authored
34 </style>
35
36 <!-- The fully minified version of YUI -->
21d7df8 Bill Converted testing to use Arrow
add0n authored
37 <script type="text/javascript"
38 src="http://yui.yahooapis.com/3.7.2/build/yui/yui-min.js"></script>
eb40ef8 Bill Initial noodling baby steps
add0n authored
39
40 <!-- The debug version of YUI -->
5a2bbb3 Bill - Reworked builder to use config map. - Changed routing to be responsibi...
add0n authored
41 <!--
eb40ef8 Bill Initial noodling baby steps
add0n authored
42 <script type="text/javascript">
43 // Put YUI in debug mode so that we can step through it.
44 YUI_config = {filter: 'debug', useConsoleOutput: true};
45 </script>
46 <script type="text/javascript" src="http://yui.yahooapis.com/3.7.2/build/yui/yui-debug.js"></script>
5a2bbb3 Bill - Reworked builder to use config map. - Changed routing to be responsibi...
add0n authored
47 -->
eb40ef8 Bill Initial noodling baby steps
add0n authored
48
d1d512d Bill - Renamed files to lessen confusion
add0n authored
49 <script type="text/javascript" src="./lib/mojito-yaf.js"></script>
de294c0 Bill Renamed templateObj to templateEngine, added methods to load view templa...
add0n authored
50 <script type="text/javascript" src="./lib/mojits/HTMLMojit/controller.client.js"></script>
e177114 Bill - Reorganized and introduced 'TestRootMojit'.
add0n authored
51
1cf0e7c Bill Updated routing to take advantage of events
add0n authored
52 <script type="text/javascript" src="./tests/test-dispatch.js"></script>
e177114 Bill - Reorganized and introduced 'TestRootMojit'.
add0n authored
53 <script type="text/javascript" src="./tests/mojits/TestRootMojit/controller.client.js"></script>
54 <script type="text/javascript" src="./tests/mojits/MsgMojit/controller.client.js"></script>
1cf0e7c Bill Updated routing to take advantage of events
add0n authored
55
1b0a849 Bill Updated index and test files
add0n authored
56 <script type="text/javascript">
e177114 Bill - Reorganized and introduced 'TestRootMojit'.
add0n authored
57 YUI().use('mojito-yaf', 'HTMLMojit', 'TestRootMojit', 'MsgMojit', function (Y) {
d1d512d Bill - Renamed files to lessen confusion
add0n authored
58
3e66c99 Bill Moved mojit initialization to inside the Y.mojito.App subclass
add0n authored
59 // ---
d1d512d Bill - Renamed files to lessen confusion
add0n authored
60
3e66c99 Bill Moved mojit initialization to inside the Y.mojito.App subclass
add0n authored
61 // !TODO! Hardcoded data in lieu of application.json / routes.json
62 // This is a hack for this test!
5a2bbb3 Bill - Reworked builder to use config map. - Changed routing to be responsibi...
add0n authored
63
64 var configData = {
65 "context":{
66 },
67 "binderMap":{
68 "mainMojit":{
69 "base":null,
70 "name":"HTMLMojitBinder",
71 "action":"index",
72 "config":{
73
74 },
75 "type":"HTMLMojit",
76 "viewId":"mainMojit",
77 "instanceId":"mainMojitA"
78 },
79 "rootMojit":{
80 "base":null,
81 "name":"TestRootMojitBinder",
82 "action":"index",
83 "config":{
84
85 },
86 "type":"mojito.TestRootMojit",
87 "viewId":"rootMojit",
88 "instanceId":"rootMojitA"
89 },
90 "msgMojit":{
91 "base":null,
92 "name":"MsgMojitBinder",
93 "action":"index",
94 "config":{
95
96 },
97 "type":"mojito.MsgMojit",
98 "viewId":"msgMojit",
99 "instanceId":"msgMojitA"
100 }
101 },
102 "routes":{
103 "root":{
104 "verbs":{
105 "GET":true
106 },
107 "path":"/",
108 "call":"frame.index",
109 "name":"root",
110 "params":{
111
112 },
113 "regex":{
114
115 },
116 "query":{
117
118 },
119 "requires":{
120
121 },
122 "ext_match":"^/$",
123 "int_match":"^$"
124 },
125 "msg":{
126 "verbs":{
127 "GET":true
128 },
129 "path":"/foo",
130 "call":"foo.bar",
131 "name":"msg",
132 "params":{
133
134 },
135 "regex":{
136
137 },
138 "query":{
139
140 },
141 "requires":{
142
143 },
144 "ext_match":"^/foo$",
145 "int_match":"^$"
146 }
147 }
148 };
d1d512d Bill - Renamed files to lessen confusion
add0n authored
149
3e66c99 Bill Moved mojit initialization to inside the Y.mojito.App subclass
add0n authored
150 // !END TODO!
1cf0e7c Bill Updated routing to take advantage of events
add0n authored
151
ea70c92 Bill Removed subclass of Mojito App and added 'builder' object
add0n authored
152 var app = new Y.App();
5a2bbb3 Bill - Reworked builder to use config map. - Changed routing to be responsibi...
add0n authored
153 new Y.mojito.Builder({configData: configData, appObj: app});
ea70c92 Bill Removed subclass of Mojito App and added 'builder' object
add0n authored
154
de294c0 Bill Renamed templateObj to templateEngine, added methods to load view templa...
add0n authored
155 app.navigate('/');
99f819b Bill Slight reorg
add0n authored
156
3e66c99 Bill Moved mojit initialization to inside the Y.mojito.App subclass
add0n authored
157 // ---
99f819b Bill Slight reorg
add0n authored
158
3e66c99 Bill Moved mojit initialization to inside the Y.mojito.App subclass
add0n authored
159 Y.one('#navigateButton').on('click',
160 function () {
161 app.navigate('/msgMojit:index');
1cf0e7c Bill Updated routing to take advantage of events
add0n authored
162 });
d1d512d Bill - Renamed files to lessen confusion
add0n authored
163
766b902 Bill Updated ATTRs declarations so they actually work, fixed handler so that ...
add0n authored
164 Y.one('#goToFooRoute').on('click',
165 function () {
3e66c99 Bill Moved mojit initialization to inside the Y.mojito.App subclass
add0n authored
166 app.navigate('/foo');
766b902 Bill Updated ATTRs declarations so they actually work, fixed handler so that ...
add0n authored
167 });
168
8504a49 Bill Mojits now register with their DOM node, making a central registry unnec...
add0n authored
169 Y.one('#alertAllMojits').on('click',
170 function () {
5a2bbb3 Bill - Reworked builder to use config map. - Changed routing to be responsibi...
add0n authored
171 var stuff = Y.mojito.Controller.findAllControllers();
8504a49 Bill Mojits now register with their DOM node, making a central registry unnec...
add0n authored
172 alert(Object.keys(stuff));
173 });
2b9ab10 Bill Removed Mojito App and Router and replaced with Handler. Factored code b...
add0n authored
174 });
1b0a849 Bill Updated index and test files
add0n authored
175 </script>
eb40ef8 Bill Initial noodling baby steps
add0n authored
176 </head>
177 <body>
178 </body>
179 </html>
Something went wrong with that request. Please try again.