source: Dev/branches/rest-dojo-ui/client/rft/run.js @ 376

Last change on this file since 376 was 376, checked in by jkraaijeveld, 13 years ago

Started the QuestionEditorPreview? bit - now works with headers and texts, fully stores and restores this in order properly.

Note: there must be a better way for this, but seeing as all content pieces can differ greatly I couldn't think of a way to make it properly generic. @Hendrik: need discussion about this.

Note2: Currently I don't use any internal events in the question editor. Not sure if it would be a lot better we would.

File size: 2.0 KB
Line 
1require([
2    // functions required for run
3    'dojo/_base/window','dojo/parser', 'rft/ui/LoginDialog',
4    'dojo/dom', 'dojo/_base/connect', 'rft/auth', 'rft/content',
5    'dojo/domReady!',
6   
7    // general widgets
8    'dojo/data/ObjectStore',
9    'dojo/store/JsonRest',
10    'dijit/InlineEditBox',
11    'dijit/MenuBar',
12    'dijit/MenuBarItem',
13    'dijit/PopupMenuBarItem',
14    'dijit/DropDownMenu',
15    'dijit/TitlePane',
16    'dijit/layout/BorderContainer',
17    'dijit/layout/ContentPane',
18    'dijit/layout/TabContainer',
19    'dijit/layout/AccordionContainer',
20    'dijit/form/DateTextBox',
21    'dijit/form/Form',
22    'dijit/form/TextBox',
23    'dijit/form/Button',
24    'dijit/form/Textarea',
25    'dijit/form/SimpleTextarea',
26    'dijit/form/ComboBox',
27    'dijit/form/Select',
28    'dojox/grid/DataGrid',
29    'dojox/widget/TitleGroup',
30    'dojox/data/QueryReadStore',
31    'rft/elastic/ElasticReadStore',
32    'rft/ui/List',
33    'rft/ui/OrderedList',
34    'rft/ui/AccountListView',
35    'rft/ui/MainMenu',
36    'rft/ui/MenuBarLink',
37    'rft/ui/MenuLink',
38    'rft/ui/Notifications',
39    'rft/ui/LineWithActionsWidget',
40    'rft/ui/ObjectBox',
41    'rft/ui/QuestionWidget',
42    'rft/ui/Selector',
43    'rft/ui/TitleGroup',
44    'rft/ui/PreviewWidgets/HeaderItem',
45    'rft/ui/PreviewWidgets/TextItem',
46    // pages -> load dynamically?
47    'rft/pages/index',
48    'rft/pages/questions',
49    'rft/pages/question',
50    'rft/pages/session',
51    'rft/pages/sessions',
52    'rft/pages/surveys',
53    'rft/pages/survey'
54    ],
55    function(win,parser,LoginDialog,dom,connect,auth,content) {
56        parser.parse();
57
58        var login = new LoginDialog().placeAt(win.body());
59        login.startup();
60
61        auth.restore()
62        .then(function(){
63            content.initial();
64        },function(){
65            login.show();
66        });
67
68        connect.connect(dom.byId('loginMenu'),'click',function(){
69            login.show();
70        });
71
72    });
73
74function goToPage(page) {
75    throw "Obsolete navigation to "+page;
76}
Note: See TracBrowser for help on using the repository browser.