1 | require([ |
---|
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 | |
---|
74 | function goToPage(page) { |
---|
75 | throw "Obsolete navigation to "+page; |
---|
76 | } |
---|