source: Dev/branches/rest-dojo-ui/client/qed/view.js @ 419

Last change on this file since 419 was 419, checked in by hendrikvanantwerpen, 12 years ago

Also update module ids and include README with file layout description.

File size: 664 bytes
Line 
1require([
2    'dojo/hash',
3    'dojo/parser',
4    'qed/app/Content',
5    'qed/app/Page',
6    'qed/pages/viewSurvey',
7    'dojo/domReady!',
8    'qed/stddeps'
9],function(hash,parser,Content,Page,viewSurvey) {
10    parser.parse();
11    Content.startup();
12
13    var match = /^!\/(\w+)$/g.exec(hash());
14    if ( !match ) {
15        Content.set(new Page({
16            templateString: "<div>Something is wrong with the URL, don't know what survey to show you. Sorry.</div>"
17        }));
18        return;
19    }
20    var surveyId = match[1];
21
22    // read options from hash/url
23    //
24    // authenticate
25
26    Content.set(new viewSurvey({
27        surveyId: surveyId
28    }));
29});
Note: See TracBrowser for help on using the repository browser.