[263] | 1 | require([ |
---|
[288] | 2 | // functions required for run |
---|
[382] | 3 | 'dojo/_base/connect', |
---|
| 4 | 'dojo/_base/window', |
---|
| 5 | 'dojo/dom', |
---|
| 6 | 'dojo/parser', |
---|
| 7 | 'rft/auth', |
---|
| 8 | 'rft/content', |
---|
| 9 | 'rft/ui/LoginDialog', |
---|
[288] | 10 | 'dojo/domReady!', |
---|
| 11 | |
---|
[382] | 12 | // dijit & rft widgets used declaratively in templates and pages |
---|
[379] | 13 | 'dijit/Dialog', |
---|
[382] | 14 | 'dijit/DropDownMenu', |
---|
[347] | 15 | 'dijit/InlineEditBox', |
---|
[281] | 16 | 'dijit/MenuBar', |
---|
| 17 | 'dijit/MenuBarItem', |
---|
| 18 | 'dijit/PopupMenuBarItem', |
---|
| 19 | 'dijit/TitlePane', |
---|
[382] | 20 | 'dijit/layout/AccordionContainer', |
---|
[347] | 21 | 'dijit/layout/BorderContainer', |
---|
[281] | 22 | 'dijit/layout/ContentPane', |
---|
| 23 | 'dijit/layout/TabContainer', |
---|
[382] | 24 | 'dijit/form/Button', |
---|
| 25 | 'dijit/form/ComboBox', |
---|
[347] | 26 | 'dijit/form/DateTextBox', |
---|
[263] | 27 | 'dijit/form/Form', |
---|
[382] | 28 | 'dijit/form/NumberSpinner', |
---|
| 29 | 'dijit/form/Select', |
---|
| 30 | 'dijit/form/SimpleTextarea', |
---|
| 31 | 'dijit/form/Textarea', |
---|
[274] | 32 | 'dijit/form/TextBox', |
---|
[389] | 33 | |
---|
[263] | 34 | 'dojox/grid/DataGrid', |
---|
[389] | 35 | |
---|
[382] | 36 | 'rft/ui/LineWithActionsWidget', |
---|
[311] | 37 | 'rft/ui/MainMenu', |
---|
[263] | 38 | 'rft/ui/MenuBarLink', |
---|
[274] | 39 | 'rft/ui/MenuLink', |
---|
[311] | 40 | 'rft/ui/Notifications', |
---|
[350] | 41 | 'rft/ui/ObjectBox', |
---|
[281] | 42 | 'rft/ui/QuestionWidget', |
---|
[350] | 43 | 'rft/ui/Selector', |
---|
[281] | 44 | 'rft/ui/TitleGroup', |
---|
[389] | 45 | 'rft/ui/lists/AccountListView', |
---|
| 46 | 'rft/ui/lists/List', |
---|
| 47 | 'rft/ui/lists/OrderedList', |
---|
[382] | 48 | |
---|
[288] | 49 | // pages -> load dynamically? |
---|
[359] | 50 | 'rft/pages/index', |
---|
[292] | 51 | 'rft/pages/questions', |
---|
[366] | 52 | 'rft/pages/question', |
---|
[359] | 53 | 'rft/pages/session', |
---|
[350] | 54 | 'rft/pages/sessions', |
---|
[292] | 55 | 'rft/pages/surveys', |
---|
[366] | 56 | 'rft/pages/survey' |
---|
[292] | 57 | ], |
---|
[382] | 58 | function(connect,win,dom,parser,auth,content,LoginDialog) { |
---|
[260] | 59 | parser.parse(); |
---|
| 60 | |
---|
[263] | 61 | var login = new LoginDialog().placeAt(win.body()); |
---|
[260] | 62 | login.startup(); |
---|
| 63 | |
---|
| 64 | auth.restore() |
---|
[263] | 65 | .then(function(){ |
---|
[260] | 66 | content.initial(); |
---|
| 67 | },function(){ |
---|
| 68 | login.show(); |
---|
| 69 | }); |
---|
| 70 | |
---|
[274] | 71 | connect.connect(dom.byId('loginMenu'),'click',function(){ |
---|
[260] | 72 | login.show(); |
---|
| 73 | }); |
---|
[274] | 74 | |
---|
[347] | 75 | }); |
---|
| 76 | |
---|
| 77 | function goToPage(page) { |
---|
| 78 | throw "Obsolete navigation to "+page; |
---|
[350] | 79 | } |
---|